啟動系統時,出現以下錯誤。
這意味著確認檔案系統時發現了問題,在這裡介紹一下修複檔案系統錯誤的方法。
Checking filesystems
/12: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p options)
*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
Give root password for maintenance
(or type Control-D to continue):
根據提示輸入root使用者的密碼。
Give root password for maintenance
(or type Control-D to continue): <-輸入root使用者的密碼
會開機檔案系統修複指令碼,然後利用mount命令確認需要修複的硬碟的區分。
(Repair filesystem) 1 # mount
/dev/hda6 on / type ext3 (rw) <-在這裡/dev/hda6是需要修複的硬碟
使用fsck命令進行修複,這時用-t選項指定檔案系統種類及版本。
會出現多次確認資訊,都輸入Enter(即Yes)。
(Repair filesystem) 2 # fsck -t ext3 /dev/hda6 開始修複
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
/12 contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
Inode 97349 has a bad extended attribute block 21760.
Clear? <-Enter
Inode 97249, i_blocks is 8, should be 0.
Fix? <-Enter
(省略)
Inodes that were part of a corrupted orphan linked list found.
Fix? <-Enter
Inodes 1855559 was part of the orphaned inode list. FIXED.
(省略)
Deleted inode 1856596 has zero dtime.
Fix? <-Enter
(省略)
Extended attribute block 1868847 has reference count 131,
should be 130. Fix? <-Enter
(省略)
/12: ***** FILE SYSTEM WAS MODIFIED *****
/12: ***** REBOOT LINUX *****
/12: 107499/2560864 files (1.5% non-contiguous),
936536/2560351 blocks
(Repair filesystem) 3 # exit <-退出修複模式
檔案系統的修複結束之後重啟系統,一般情況下都能修複成功,萬一修複失敗的話,就需要從系統備份進行恢複。
# reboot