
我的樹莓派 24/7 使用 raspbian 運行,顯然 SD 卡損壞了。
當我嘗試啟動它時,我沒有走多遠。
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
知道我能做些什麼來拯救這個系統嗎?我可以再次獲得該卡的讀取權限嗎?
以後我該怎麼做才能避免這樣的事情再發生。有沒有更適合的fs面對現實吧這些蹩腳的SD卡?
先謝謝您的幫忙。
當進入另一個 Linux 盒子時,SD 卡的內容如下:
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
卡上似乎還有第二個分區:
/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)
答案1
您可以嘗試將卡片插入連接到 PC 的讀卡機來恢復資料。該卡上可能有一個 ext 系列檔案系統,因此某些 Linux 工具可能能夠恢復您的資料(或者也許僅將其安裝為唯讀就足夠了)。
要延長卡片的使用壽命,您可以使用莓果引導- 它將允許您從外部硬碟啟動,從而限制 SD 卡上的 I/O 操作數量。