系统初始化
1.版本(内核 os)
故障排除
启动过程出现问题
1.GRUB的第一段BOOTLOADER446字节失误 GRUB菜单都无法实现
模拟: 改写GRUB的第一段BOOTLOADER446字节
dd if=dev/zero of=/dev/sda bs=446 count=1
系统无法启动
重新构建BOOTLOADER
进入救援模式
linux rescue 进入救援模式
系统提示切换到/mnt/sysp_w_picpath
chroot /mnt/sysp_w_picpath
grub-install /dev/sda 重新构建BOOTLOADER
exit
exit
系统将会重启
2.GRUB的第二段 在/boot/grub 下
grub.conf容易出错
模拟 改写grub.conf 名字
ll /boot/grub/
mv /boot/grub/grub.conf /boot/grub/grub.conf.old 文件改名
系统无法正常启动,可以通过grub命令行补救
grub>root (hd0,0) 表明引导分区
grub>kernel /vimlinuz-2.6.18-164.e15 ro root=/dev/sda2指明内核位置
grub>
grub>initrd /initrd-2.6.18-164.e15.img 加载常见的驱动
grub>boot
手工编织菜单
[root@localhost ~]# vim /boot/grub/grub.conf
default=0
timeout=5
title mylinux
kernel /vmlinuz-2.6.18-164.el5 ro root=/dev/sda2 quiet rhgb
initrd /initrd-2.6.18-164.el5.img
重启
3.fstab
引导过程中系统要加载fstab文件,在fstab改写是出现误操作
通过进入fstab修正文件
此时/etc/fstab在根文件系统
可以通过重新挂载
mount -o remount,rw/
来重新修改fstab文件
4.管理员口令丢失
步骤如下:
1.在grub选项菜单按e进入编辑模式
2. 该选项有三行语句,请用光标选中第二行,也就是“Kernel”开头的那一行;
3、在这一行再按下字母“e”键进入这一行的编辑状态;
4、在该行行尾加个空格,写上数字1,类似这样:
kernel /boot/vmlinuz-2.6.9-11.19 ro root=LABEL=/ 1 (或/single)
5.按b重启
6.进入后执行下列命令
[root@localhost ~]#passwd root (设置root的密码)
Enter new unix password:输入新的密码
[root@localhost ~]#reboot
转载于:https://blog.51cto.com/gaosc900926/786180