On Saturday 10 May 2008, Mark Knecht wrote:
> On Sat, May 10, 2008 at 1:55 AM, Alan McKinnon
> <[EMAIL PROTECTED]> wrote: <SNIP>
>
> >        # change menu.lst to grub.conf
> >        if [[ ! -e ${dir}/grub.conf ]] && [[ -e ${dir}/menu.lst ]] ;
> > then
> >                mv -f "${dir}"/menu.lst "${dir}"/grub.conf
> >                ewarn
> >                ewarn "*** IMPORTANT NOTE: menu.lst has been renamed
> > to grub.conf"
> >                ewarn
> >        fi
> >
> >
> > it's called essentially this way in post_inst():
> >
> > setup_boot_dir /boot
> >
> > what it does is in essence:
> >
> > 1. fail if /boot does not exist
> > 2. create /boot/boot as a link to /boot
> > 3. create /boot/grub
> > 4. if you don't have a grub.conf and do have a menu.lst then rename
> > it to grub.conf
> >
> >
> >
> > --
> > Alan McKinnon
>
> Yeah, it was that last bit that I wondered about. So, assuming you do
> have a grub.conf what happens? Does nothing in the ebuild ever make
> the menu.lst->grub.conf link? Did older ebuilds make this link? I
> have no recollection of making one by hand.

The code only does what is in the code :-)  But I seem to have missed 
this bit which comes right after the bit I quoted above:

        if [[ ! -e ${dir}/menu.lst ]]; then
                einfo "Linking from new grub.conf name to menu.lst"
                ln -snf grub.conf "${dir}"/menu.lst
        fi

Obviously, if you don't have menu.lst it is created as a symlink to 
grub.conf

However, the compile step of the ebuild doesn't write even a template 
grub.conf, this is what you get after compilation:

nazgul portage # ls -al sys-boot/grub-0.97-r5/image/boot/grub/
total 36
drwxr-xr-x 2 root root    80 May 10 20:42 ./
drwxr-xr-x 3 root root    72 May 10 20:42 ../
-rw-r--r-- 1 root root 33856 May 10 20:42 splash.xpm.gz

Presumably the user must do this manually. It's been so long since I've 
done this I forget how it works - I routinely just scp a working 
grub.conf from a working setup on another machine.

The make-links setup steps in the ebuild are obviously there for the 
case when grub is remerged in the future

> The GNU grub manual I found online talks only about menu.lst. Is
> having a grub.conf file a Gentoo thing? I've run *almost* nothing but
> Gentoo for 8 years now so I have no real knowledge of how other
> distros set this up.

Red Hat definitely uses grub.conf
Debian/Ubuntu definitely use menu.lst
from my experience. Different distros tend to do different things with 
these files, some barf if what they are looking for is absent, some 
don't.

For a long time now I've just always had a grub.conf and make a symlink 
if menu.lst doesn't exist

-- 
Alan McKinnon
alan dot mckinnon at gmail dot com

-- 
[email protected] mailing list

Reply via email to