寻觅生命中的那一片浅草......

Bypass a fsck during boot

Today,I reboot my CentOS box,It show some errors:

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):

I know what cause this:Yesterday, I remove one partition, but I didn’t remove it from /etc/fstab

I don’t know the root’s password.so what only I can do is clicking Ctl+D,then the system reboot.

During the boot procedure,I edit the grub boot menu, add “single” at the end of kernel line.
After editing, it look likes ” kernel /vmlinuz-2.6.18-92.1.22.el5 ro root=LABEL=/ single”

I think the system will boot into single user mode.But unfortunately,it show the same errors.

I google with “boot ignore system check”,and I find an useful article.It shows that we can
put fastboot at the end of the kernel line.

In the end it should look as follow:
kernel /vmlinuz-2.6.18-92.1.22.el5 ro root=LABEL=/ fastboot

Greate!It works.

I ssh to the server and remove the old partition from /etc/fstab

OK,the article’s URL is http://www.cyberciti.biz/faq/linux-unix-bypassing-fsck/

http://www.cyberciti.biz/ is a great website,it contains many tips on linux,also it contains many shell scripts makes your system administration work easy.You must add it to your Favorite。

尚无评论

发表评论

2024年四月
« 5月    
1234567
891011121314
15161718192021
22232425262728
2930