grub:启动四步骤:
1)指令来指定/boot所在的分区
grub>root (hd0,0)
2) 加载内核,kernel指令来指定linux的内核,及所在的分区
grub>kernel /vmlinuz-3.0.76-0.11-default
3)用initrd命令来指定initrd文件
grub>initrd /initrd-3.0.76-0.11-default
4)boot启动
grub>boot
1、进入字符界面
2、键盘输入字符‘c',进入grub界面
3、help查看grub有哪些命令可以使用
4、cat命令
grub> cat ( 按tab 键会出来hd0或hd1之类的;
grub> cat (hd0, 注:输入hd0,然后再按tab键;会出来分区之类的;
grub> cat (hd0,6)
Possible partitions are:
Partition num: 0, Filesystem type unknown, partition type 0x7
Partition num: 4, Filesystem type is fat, partition type 0xb
Partition num: 5, Filesystem type is reiserfs, partition type 0x83
Partition num: 6, Filesystem type is ext2fs, partition type 0x83
Partition num: 7, Filesystem type unknown, partition type 0x83
Partition num: 8, Filesystem type is reiserfs, partition type 0x83
Partition num: 9, Filesystem type unknown, partition type 0x82
grub> cat (hd0,6)/etc/fstab 注:比如我想查看一下 (hd0,6)/etc/fstab的内容就这样输入;注意,前提是/ 根分区必须是物理分区,如果是lvm分区,则cat无法识别到根目录下的文件
LABEL=/ / ext3 defaults 1 1
/dev/devpts /dev/pts devpts gid=5,mode=620 0 0
/dev/shm /dev/shm tmpfs defaults 0 0
/dev/proc /proc proc defaults 0 0
/dev/sys /sys sysfs defaults 0 0
LABEL=SWAP-hda1 swap swap defaults 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,
managed 0 0
5、root指令来指定/boot所在的分区
如:grub> root (hd0,0)
6、kernel指令来指定linux的内核,及所在的分区
7、用initrd命令来指定initrd文件
8、boot引导系统
grub> boot
详解转自 https://www.cnblogs.com/linuxde/p/8719378.html
文章评论