題 Raspberry Pi SD卡的問題


今天我啟動了我的Raspberry Pi,只是為了在啟動時發現這個錯誤:

[....] Checking root file system...Segmentation fault
failed (code 139)
[....] An automatic file system check (fsck) of the root file system failed. A manual fsck must be performed, then the system restarted. The fsck should be performed in maintenance mode with the root filesystem mounted in read-only.
[warn] The root filesystem is currently mounted in read-only mode. A maintenance shell will now be started. After performing system maintenance, press CONTROL-D to terminate the maintenance shell and restart the system.
Give root password for maintenance:

所以我以root身份登錄並運行:

root@pi# fsck
fsck from util-linux 2.20.1
fsck: Warning... fsck.ext for device /dev/mmcblk0p2 exited with signal 4.

接下來我將SD卡連接到工作系統,然後運行:

root# fdisk -l
Device     Boot  Start      End  Sectors  Size Id Type
/dev/sdb1         8192   122879   114688   56M  c W95 FAT32 (LBA)
/dev/sdb2       122880 30679039 30556160 14.6G 83 Linux

root# fsck -a /dev/sdb2
fsck from util-linux 2.25.2
/dev/sdb2: clean, 148547/941616 files, 1144972/3819520 blocks

所以我把卡放回我的RPI但是我得到了同樣的錯誤。

我該如何修理那張卡?

任何幫助非常感謝。


2
2018-02-23 21:15


起源


你確定讀卡器的RPI沒有問題嗎?在這種情況下,您應該嘗試從另一張卡/另一台設備啟動。
RPI很好。用另一張卡測試了它。 - Paul
您可以嘗試使用更新的Linux在常規PC上進行修復。 - ilkhd


答案:


通過運行修復它:

root# fsck /dev/sdb2 -a -f
fsck from util-linux 2.25.2
/dev/sdb2: Inodes that were part of a corrupted orphan linked list found.

/dev/sdb2: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
        (i.e., without -a or -p options)
root# fsck /dev/sdb2 -f
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix<y>? yes
Inode 449 was part of the orphaned inode list.  FIXED.
Inode 464 was part of the orphaned inode list.  FIXED.
Inode 880 was part of the orphaned inode list.  FIXED.
Inode 3478 was part of the orphaned inode list.  FIXED.

[......]

root# fsck /dev/sdb2 -f
fsck from util-linux 2.25.2
e2fsck 1.42.12 (29-Aug-2014)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sdb2: 148489/941616 files (0.4% non-contiguous), 1139108/3819520 blocks

2
2018-02-24 08:24