CentOS起動時、Give root password for maintenanceと出て起動しない
Last-modified: Sat, 28 Jan 2017 18:12:35 JST (3306d)
Top > CentOS起動時、Give root password for maintenanceと出て起動しない
CentOS起動時、パテーションが壊れてFSCKに失敗し、以下のようなエラーメッセージとともにOSが起動しないことがあります。
Checking gilesystems
/: clean, xxxxxxxx/xxxxxxxx files, xxxxxxxxx/xxxxxxxxxx blocks
/usr/local: clean, xxxxxxxx/xxxxxxxx files, xxxxxxxxx/xxxxxxxxxx blocks
/home: clean, xxxxxxxx/xxxxxxxx files, xxxxxxxxx/xxxxxxxxxx blocks
/ var contains a file system with errors, check forced.
/var:
Directory inode xxxxxx, block 0, offset 0: directory corrupted
/var: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
(i.e., without -a or -p opetions)
/boot: clean, XX/XXXXX files, XXXXX/XXXXX blocks
[FAILED]
*** 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でなんとかしろや。と言う訳です。
- rootのパスワードを入力します。
- 一応マウント状況を確認しておきます。
(Repair filesystem) 1 # mount /dev/sdax on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sdax on /usr/local type ext3 (rw) /dev/sdax on /home type ext3 (rw) /dev/sdax on /var type ext3 (rw) /dev/sdax on /boot type ext3 (rw) tmpfs on /dev/shm type tmpds (rw) mount on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
- 今回壊れているのは/varなので、念のためアンマウントしておきます。
(Repair filesystem) 2 # umount /var mount: /dev/sdax: not mounted
- 該当パテーションをfsckで修復します。
(Repair filesystem) 3 # fsck -t ext3 /dev/sdax
- わらわらと壊れている個所が出てきますので、yesで修復していきます。
Pass 5: Checking group summary information /var: ***** FILE SYSTEM WAS MODIFIED ***** /var: xxxxx/xxxxxx files (3.2% non-contiguous), xxxx/xxxxxx blocks
のようなメッセージが出れば修復完了です。
ただし、修復できたからと言ってデータやファイルが無事である訳ではありません。場合によってはファイルやディレクトリが消えたりしますので、それはそれで個別に対処します。 - 起動することを祈りつつ、再起動します。
Counter: 6062,
today: 2,
yesterday: 5
このページの参照回数は、6062です。