2

I have a Raspbian installation on which I installed a lot of stuffs.

A few weeks ago, I bought a Class10 16Gb card and cloned my raspbian installation from my old Class4 4Gb SD card to this new SD card.

I did not expand the old FS to the whole 16Gb partition (I planned to create another partition later but this is not a problem for me).

The problem

Everything worked fine until yesterday:

  • impossible to log-in using SSH
  • after rebooting (connecting my TV screen and a keyboard) nothing happened
  • since that, every time I connect my power supply, the screen flashes but nothing happens
  • I tried to re-use my old Class4 SD: booting and running was OK
  • Connecting my Class10 SD card to another linux machine:
    • IO errors
    • unable to perform any fsck (due to errors)

When I shutdown my RPi, I always use "shutdown -h now" command. Yesterday, my RPi was up and running since 4 days.

What I already did

Testdisk

I ran testdisk and it indicated some errors

check_FAT: Unusual number of reserved sectors 16 (FAT), should be 1.
Warning: number of heads/cylinder mismatches 255 (FAT) != 1 (HD)
Warning: number of sectors per track mismatches 63 (FAT) != 1 (HD)
 1 * FAT16 LBA                   8192     122879     114688 [RPIBOOT16G]
 2 P Linux                     122880    7829503    7706624

I did not write modification to the SD card using it.

FS backup

I mounted my fs as read-only and tried to copy (cp -a) the whole files to another directory (this is because I made some changes since I cloned from Class4 to Class10 SD). Apparently, it finished without errors.

What should I do now ?

Now I have a backup of my files, but I don't know how to repair the failing SD card.

Should I rewrite partition table ? But how (which partition size for /boot, other partition to add, create a new MBR and how) ?

So what should I do now to restore my Class10 SD card with the backup I made ?

What tools, what procedure should I use ?

lauhub
  • 334
  • 3
  • 9

0 Answers0