Red Hat Enterprise Linux 6: /boot/grub/menu.lst or /boot/grub/grub.conf?
Solution 1
We should use /boot/grub/grub.conf
, and /boot/grub/menu.lst
should be a symlink to grub.conf
.
These files are initially created by anaconda during the install. This is logged in /var/log/anaconda.program.log
. We can see that this anaconda execution uses grub.conf
, not 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>
Solution 2
You should use menu.lst. I have a scientific linux 6.1 installed and it uses the menu.lst. You can verify on SL official doc page: http://ftp.scientificlinux.org/linux/scientific/6.1/x86_64/os/repoview/grub.html
Related videos on Youtube
Mark Norgren
Updated on September 18, 2022Comments
-
Mark Norgren almost 2 years
I have a brand new Scientific Linux 6 system, but this same question should apply to CentOS 6, RHEL6 or any RHEL6-derivative.
I see that
/boot/grub
contains amenu.lst
as well as agrub.conf
file. There is also a symlink from/etc/grub.conf
to/boot/grub/grub.conf
which suggests that I should usegrub.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
These files aren't provided by an RPM, which makes it difficult to find a changelog describing this change:
# 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
Which file should I use? Why are there two files? Can you point me at any authoritative documentation?
Update Interestingly, on a RHEL5.6/5.7 system,
menu.lst
is typically a symlink to./grub.conf
. The symlink from/etc/grub.conf
is also there:# 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
But, this symlink is no longer present in RHEL6. I cannot find any documented reason why this would be.
-
Chad Feller almost 13 yearsRHEL6 still follows the same behavior (
menu.lst
being a symlink to./grub.conf
) by default. (All my RHEL6 boxes are like that.) I just dropped SL6 into VM to compare, and I'm still seeing the same setup (menu.lst
being a symlink to./grub.conf
) out of the box. All that to say: what version of grub is on your system (rpm -q grub
), and did you enable any 3rd party repos, or install any third party software? I'm wondering if a 3rd party package may have tried to update the bootloader, and inadvertently broke the symlink. What are the differences betweenmenu.lst
andgrub.conf
? -
Mark Norgren almost 13 yearsI am running grub-0.97-70.el6.x86_64. The serial console is enabled in
grub.conf
, but is disabled inmenu.lst
. The more I look at this, the more I think this is a bug with SL6.1, or a bug in our buildscripts (But I'm not finding evidence for a bug with my buildscripts).
-
-
Mark Norgren almost 13 yearsWhile this is helpful, that page doesn't discuss menu.lst or grub.conf. In addition, the RPM on that page doesn't provide these files either. Apparently they are created by anaconda, which calls
grub-install
(The execution ofgrub-install
can be seen in /var/log/anaconda.program.log). -
Lohrun almost 13 yearsThat page talks about grub 0.97, and, by default, that version of grub uses menu.lst. This can be verified by:
grub --version
. Thank you for helping Stefan. I had not my SL available when I replied to the question.