2013年5月20日 星期一

linux無法開機:contains a file system with errors, check forced解決方式


Checking root filesystem
/contains a file system with errors,check forced.
/:
Unattached inode 34190
/: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 shell
Give root password for maintenance
(or type Control-D for normal startup):

輸入root密碼後,執行fcsk

#fcsk.ext3 -y /dev/sda1

-y(指所有問題都用yes)

修復完畢之後 
#reboot 

80~90%都可以正常開機。


使用方式 : fsck --help
fsck 1.35 (28-Feb-2004)
fsck.ext3: invalid option -- h
Usage: fsck.ext3 [-panyrcdfvstDFSV] [-b superblock] [-B blocksize]
[-I inode_buffer_blocks] [-P process_inode_size]
[-l|-L bad_blocks_file] [-C fd] [-j ext-journal]
[-E extended-options] device
Emergency help:
-p Automatic repair (no questions) ;自動修復
-n Make no changes to the filesystem ;模擬修復
-y Assume "yes" to all questions ;所有的問題都回答yes
-c Check for bad blocks and add them to the badblock list
;檢查損壞的區塊,並記錄
-f Force checking even if filesystem is marked clean
;對標記乾淨的區塊作詳細檢查v Be verbose ;詳細Log
-b superblock Use alternative superblock
-B blocksize Force blocksize when looking for superblock
-j external-journal Set location of the external journal
-l bad_blocks_file Add to badblocks list
-L bad_blocks_file Set badblocks list