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 ?

11
  • how did you back up your class 4 card? using 'dd' command you can easily make a 1:1 image from your card which results in a .img file
    – Gotschi
    Dec 11, 2013 at 14:59
  • I know that, that is already used dd to clone it to the 16Gb card. What I want to know is how to recover my 16Gb backuped files.
    – lauhub
    Dec 11, 2013 at 15:40
  • Just too rule out the obvious how are you powering your Pi? Dec 11, 2013 at 16:36
  • I have a 2000mA power output which seems to work fine (no problem since 6 months).
    – lauhub
    Dec 11, 2013 at 16:45
  • if your Class 10 card is still recognized and can be mounted, I don't think there's any problem. Corruption can happen and can (but not have to) lead to physical damage.
    – Gotschi
    Dec 11, 2013 at 19:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.