grub2 confusion

Michael Schwendt mschwendt at gmail.com
Thu Oct 6 19:48:26 UTC 2011


On Thu, 06 Oct 2011 12:03:22 -0500, DL (David) wrote:

> >   # rpmls grub2|grep ^l
> >   lrwxrwxrwx  /etc/grub2.cfg
> >   # file /etc/grub2.cfg
> >   /etc/grub2.cfg: symbolic link to `/boot/grub2/grub.cfg'
> > 
> > So, more symlink madness. /etc/grub2.cfg -> /boot/grub2/grub.cfg
> > and it doesn't even work flawlessly:
> > 
> >   # grub2-mkconfig -o /etc/grub2.cfg
> >   Generating grub.cfg ...
> 
> Why would you do that?

What is the purpose of the symlink and its shorter path then?

> You're asking for trouble specifying a symlink as
> an output file unless you know the program you're running will be
> appending to it instead of creating it. You know where the config
> actually is, so why test fate by using a symlink? Do we need to stop
> creating that symlink to prevent you from misusing it?

Yes, that would be a wise decision. Especially when it's known that
grub2-mkconfig cannot handle the symlink and ignores the read-only
mode of the file that is pointed at.

On the contrary, Emacs is not so stupid and can handle the old GRUB 1
/etc/grub.conf link, and it can handle /etc/grub2.cfg, too, just that the
link target is not writable and one is expected to no edit the file with
an editor.

-- 
Fedora release 16 (Verne) - Linux 3.1.0-0.rc8.git0.1.fc16.x86_64
loadavg: 0.00 0.01 0.05


More information about the test mailing list