if [ x$feature_timeout_style = xy ] ; then
set timeout_style=menu
set timeout=5
# Fallback normal timeout code in case the timeout_style
feature is
# unavailable.
else
set timeout=5
fi
### END /etc/grub.d/00_header ###
#
开
始
执
行
/etc/grub.d/10_linux
,主要
针对实际
的
Linux
核心
文件
的
开
机
环
境
### BEGIN /etc/grub.d/10_linux ###
menuentry 'CentOS Linux 7 (Core), with Linux 3.10.0
-
229.el7.x86_64'
--
class rhel
fedora
\
--
class gnu
-
linux
--
class gnu
--
class os
--
unrestricted $menuentry_id_option
\
'gnulinux
-
3.10.0
-
229.el7.x86_64
-
advanced
-
299bdc5b
-
de6d
-
486a
-
a0d2
-
375402aaab27' {
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod xfs
set root='hd0,gpt2'
if [ x$feature_platform_search_hint = xy ]; then
search
--
no
-
floppy
--
fs
-
uuid
--
set=root
--
hint='hd0,gpt2' 94ac5f77
-
cb8a
-
495e
-
a65b
-
...
else
search
--
no
-
floppy
--
fs
-
uuid
--
set=root 94ac5f77
-
cb8a
-
495e
-
a65b
-
2ef7442b837c
fi
linux16 /vmlinuz
-
3.10.0
-
229.el7.x86_64 root=/dev/mapper/centos
-
root ro
\
rd.lvm.lv=centos/root rd.lvm.lv=centos/swap crashkernel=auto
rhgb quiet
\
LANG=zh_TW.UTF
-
8
initrd16 /initramfs
-
3.10.0
-
229.el7.x86_64.img
}
### END /etc/grub.d/10_linux ###
.....(
中
间
省略
).....
### BEGIN /etc/grub.d/30_os
-
prober ###
### END /etc/grub.d/30_os
-
prober ###
### BEGIN
/etc/grub.d/40_custom ###
### END /etc/grub.d/40_custom ###
.....(
底下省略
).....
基本上,
grub2
不希望你自己修改
grub.cfg
这个配置文件,取而代之的是修改几个特定的配置文件
之后,由
grub2-mkconfig
这个指令来产生新的
grub.cfg
文件。
不过,你还是得要了½一下
grub2.cfg
的大致内容。