Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

This question already has an answer here:

My raspberry pi that runs 24/7 with raspbian has apparently a broken SD card.

When I try to boot it, i dont get far.

No filesystem could mount root, tried:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,2)
PANIC: VFS: Unable to mount root fs on unknown-block(179,2)
Entering kdb (current=0xca82ac80, pid 1) due to Keyboard Entry

Any idea what I can do to rescue that system? Could I get read access to that card again?

What can I do in the future so that this wont happen again. Is there some fs more suitable for lets face it these crappy SD cards?

Thanks in advance for the help.

The contents of the SD Card when entered into another linux box look like that:

carsten@carsten-laptop /media/carsten/C522-EA52 $ ls -la
total 18908
drwx------  2 carsten carsten   16384 Jan  1  1970 .
drwxr-x---+ 3 root    root       4096 Jun  9 19:03 ..
-rw-r--r--  1 carsten carsten   17808 May 28 08:31 bootcode.bin
-rw-r--r--  1 carsten carsten     142 Feb  9 00:27 cmdline.txt
-rw-r--r--  1 carsten carsten    1180 Feb  9 00:27 config.txt
-rw-r--r--  1 carsten carsten    2012 May 28 08:31 fixup_cd.dat
-rw-r--r--  1 carsten carsten    5880 May 28 08:31 fixup.dat
-rw-r--r--  1 carsten carsten    8830 May 28 08:31 fixup_x.dat
-rw-r--r--  1 carsten carsten     137 Feb  9 02:42 issue.txt
-rw-r--r--  1 carsten carsten 9610248 May 28 08:31 kernel_emergency.img
-rw-r--r--  1 carsten carsten 2803168 May 28 08:31 kernel.img
-rw-r--r--  1 carsten carsten  467960 May 28 08:31 start_cd.elf
-rw-r--r--  1 carsten carsten 2688564 May 28 08:31 start.elf
-rw-r--r--  1 carsten carsten 3655652 May 28 08:31 start_x.elf

There seems to be a second partiton on the card:

/dev/mmcblk0p1 on /media/carsten/C522-EA52 type vfat   (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
carsten@carsten-laptop /media/carsten/C522-EA52 $ sudo parted /dev/mmcblk0
GNU Parted 2.3
Using /dev/mmcblk0
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: SD SD16G (sd/mmc)
Disk /dev/mmcblk0: 15.9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type     File system  Flags
 1      4194kB  62.9MB  58.7MB  primary  fat16        lba
 2      62.9MB  15.9GB  15.9GB  primary

(parted)                    
share|improve this question

marked as duplicate by Breakthrough, techie007, Olli, Dave M, Mokubai Jun 10 '13 at 21:17

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
If you put the SD card in a card reader can you see any of the data? –  parkydr Jun 9 '13 at 14:02
    
Hint: There is also a beta stack exchange site for Rasperry Pi questions. –  nixda Jun 9 '13 at 14:53
    
@parkydr If I put the SDCARD into another system, I only see a 50 MB file system. The contents of it, i write in the question. –  Carsten Jun 9 '13 at 17:06
    
@Breakthrough I installed testdisk on the laptop (where I connected the card to). Now I use it to find the second partition, which seems to be corrupt. Thanks for the great tip for the tool. When the tool is through (which seems to take an hour, I will update. –  Carsten Jun 9 '13 at 17:21
    
@Carsten you can also try to restore the partition headers/tables, and I believe TestDisk will also allow you to browse through the files in the partition in a read-only state. TestDisk is a very comprehensive tool, so there may be several ways you can use it to recover your data. Also, you might want to dd the SD card before modifying anything on it, just to "preserve" it's current state (although in my experiences, TestDisk is a fairly safe tool to use). –  Breakthrough Jun 9 '13 at 20:19
show 1 more comment

1 Answer

up vote 0 down vote accepted

You can try to recover data by plugging the card into a card reader connected to a PC. The card probably has an ext family filesystem on it, so some Linux tool may be able to recover your data (or maybe just mounting it read-only will be enough).

To increase card's lifetime you can use BerryBoot - it will let you boot from external hard drive, thus limiting the number of I/O operations on SD card.

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.