grub.cfg的关键字介绍
grub.cfg是linux中引导系统启动的文件,位于 /boot/grub/grub.cfg,对新手来说用leafpad编辑比较方便
一般的简单格式为
menuentry name
insmod part_msdos
insmod ntfs
set root='hd1,msdos1'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 0007D96800037CCE
else
search --no-floppy --fs-uuid --set=root 0007D96800037CCE
fi
parttool ${root} hidden-
drivemap -s (hd0) ${root}
chainloader +1
名字 | 意义 |
---|---|
default=0 | 默认启动第一项 |
timeout=5 | 进入界面没有操作5s没有操作后进入默认系统 |
insmod | 磁盘格式 |
set root | 系统的位置 |
–set=root 0007D96800037CCE | 系统位置对应的uuid |
chainloader +1 | 读入分区的第一个扇区的引导记录 |