我有一个全新的科学Linux 6系统,但同样的问题应该适用于CentOS 6,RHEL6或任何RHEL6 6衍生产品。
我看到/boot/grub包含一个menu.lst和一个grub.conf文件。还有一个从/etc/grub.conf到/boot/grub/grub.conf的符号链接,这意味着我应该使用grub.conf。
# cd /boot/grub
# ls -ld grub.conf menu.lst
-rw------- 1 root root 845 Aug 29 13:00 grub.conf
-rw-------. 1 root root 847 Aug 29 13:00 menu.lst
# ls -l /etc/grub.conf
lrwxrwxrwx. 1 root root 22 Aug 29 13:00 /etc/grub.conf -> ../boot/grub/grub.conf这些文件不是由RPM提供的,因此很难找到描述此更改的变更:
# rpm -qa --whatprovides /etc/grub.conf /boot/grub/menu.lst /boot/grub/grub.conf
no package triggers /etc/grub.conf
no package triggers /boot/grub/menu.lst
no package triggers /boot/grub/grub.conf我应该使用哪个文件?为什么有两个文件?你能指给我看任何权威的文件吗?
有趣的是,在RHEL5.6 5.6/5.7系统上,menu.lst通常是指向./grub.conf的符号链接。来自/etc/grub.conf的符号链接也在那里:
# ls -l /boot/grub/menu.lst /boot/grub/grub.conf /etc/grub.conf
-rw------- 1 root root 1036 Aug 2 11:34 /boot/grub/grub.conf
lrwxrwxrwx 1 root root 11 Apr 5 00:42 /boot/grub/menu.lst -> ./grub.conf
lrwxrwxrwx 1 root root 22 Aug 3 2009 /etc/grub.conf -> ../boot/grub/grub.conf但是,这种符号链接不再存在于RHEL6中。我找不到任何有记载的理由。
发布于 2011-08-31 18:23:43
我们应该使用/boot/grub/grub.conf,而/boot/grub/menu.lst应该是到grub.conf的符号链接。
这些文件最初是由anaconda在安装期间创建的。这是登录到/var/log/anaconda.program.log中的。我们可以看到,这个anaconda执行使用的是grub.conf,而不是menu.lst:
13:00:23,089 INFO : Running... ['/sbin/grub-install', '--just-copy']
13:00:23,134 INFO : Running... ['/sbin/grub', '--batch', '--no-floppy', '--device-map=/boot/grub/device.map']
13:00:23,346 INFO :
13:00:23,347 INFO :
13:00:23,347 INFO : GNU GRUB version 0.97 (640K lower / 3072K upper memory)
13:00:23,347 INFO :
13:00:23,348 INFO : [ Minimal BASH-like line editing is supported. For the first word, TAB
13:00:23,348 INFO : lists possible command completions. Anywhere else TAB lists the possible
13:00:23,348 INFO : completions of a device/filename.]
13:00:23,348 INFO : grub> root (hd0,0)
13:00:23,348 INFO : Filesystem type is ext2fs, partition type 0x83
13:00:23,348 INFO : grub> install --stage2=/boot/grub/stage2 /boot/grub/stage1 d (hd0) /boot/grub/stage2 p (hd0,0)/boot/grub/grub.conf
13:00:23,348 INFO : grub> 发布于 2011-08-31 07:41:21
您应该使用menu.lst。我安装了一个科学的Linux6.1,它使用menu.lst。您可以在SL官方文档页:http://ftp.scientificlinux.org/linux/scientific/6.1/x86_64/os/repoview/grub.html上验证
发布于 2015-10-16 01:23:07
我不知道Red为什么选择使用/boot/grub/grub.conf作为GRUB的配置文件,因为GRUB规范是针对/boot/grub/menu.lst的。我认为符号链接是必要的,因为引导加载程序的第1阶段指的是/boot/grub/menu.lst。
https://unix.stackexchange.com/questions/19811
复制相似问题