public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] booting to grub prompt, but config works
@ 2008-05-09 19:32 Travis Osterman
  2008-05-09 19:50 ` Alex Schuster
  2008-05-09 19:52 ` Mark Knecht
  0 siblings, 2 replies; 8+ messages in thread
From: Travis Osterman @ 2008-05-09 19:32 UTC (permalink / raw
  To: gentoo-user

I'm performing a gentoo installation and have proceeding without
problem until I went to reboot.  I am greeted with the grub prompt and
when issuing $>configfile /boot/grub/grub.conf    the boot process
continues without issue.  The grub-install command seemed to work
correctly, and I've been googling for some trouble-shooting ideas
without headway.

Any advice would be appreciated.  Thank you.

===== grub.conf ====

default 0
timeout 5
splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux (2.6.23-gentoo-r7-initial)
root (hd0,0)
kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r7-initial
root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/sda3
initrd /initramfs-genkernel-x86-2.6.24-gentoo-r7-initial

title=Gentoo Linux (failsafe)
kernel /boot/kernel-genkernel-x86-2.6.24-gentoo-r7-initial root=/dev/sda3

===========

-- Travis
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-09 19:32 [gentoo-user] booting to grub prompt, but config works Travis Osterman
@ 2008-05-09 19:50 ` Alex Schuster
  2008-05-09 21:41   ` Neil Bothwick
  2008-05-09 19:52 ` Mark Knecht
  1 sibling, 1 reply; 8+ messages in thread
From: Alex Schuster @ 2008-05-09 19:50 UTC (permalink / raw
  To: gentoo-user

Travis Osterman writes:

> I'm performing a gentoo installation and have proceeding without
> problem until I went to reboot.  I am greeted with the grub prompt and
> when issuing $>configfile /boot/grub/grub.conf    the boot process
> continues without issue.  The grub-install command seemed to work
> correctly, and I've been googling for some trouble-shooting ideas
> without headway.

Check for /boot/grub/menu.lst, this is an alternate (and maybe empty) 
config file which grub seems to prefer over grub.conf. I'd make it a 
symlink to grub.conf.

	Wonko
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-09 19:32 [gentoo-user] booting to grub prompt, but config works Travis Osterman
  2008-05-09 19:50 ` Alex Schuster
@ 2008-05-09 19:52 ` Mark Knecht
  1 sibling, 0 replies; 8+ messages in thread
From: Mark Knecht @ 2008-05-09 19:52 UTC (permalink / raw
  To: gentoo-user

On Fri, May 9, 2008 at 12:32 PM, Travis Osterman <tosterman@gmail.com> wrote:
> I'm performing a gentoo installation and have proceeding without
> problem until I went to reboot.  I am greeted with the grub prompt and
> when issuing $>configfile /boot/grub/grub.conf    the boot process
> continues without issue.  The grub-install command seemed to work
> correctly, and I've been googling for some trouble-shooting ideas
> without headway.
>
> Any advice would be appreciated.  Thank you.
>

This happened to me last night. The link menu.lst was missing.

cd /boot/grub
ln -s grub.conf menu.lst

and a reboot will get you going.

Cheers,
Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-09 19:50 ` Alex Schuster
@ 2008-05-09 21:41   ` Neil Bothwick
  2008-05-09 21:51     ` Mark Knecht
  0 siblings, 1 reply; 8+ messages in thread
From: Neil Bothwick @ 2008-05-09 21:41 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 404 bytes --]

On Fri, 9 May 2008 21:50:09 +0200, Alex Schuster wrote:

> Check for /boot/grub/menu.lst, this is an alternate (and maybe empty) 
> config file which grub seems to prefer over grub.conf.

menu.lst has been the preferred config file for some years, it seem that
GRUB is a little more strict about this nowadays.


-- 
Neil Bothwick

WinErr 00A: Promotional literature overflow - Mailbox full

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-09 21:41   ` Neil Bothwick
@ 2008-05-09 21:51     ` Mark Knecht
  2008-05-10  8:55       ` Alan McKinnon
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2008-05-09 21:51 UTC (permalink / raw
  To: gentoo-user

On Fri, May 9, 2008 at 2:41 PM, Neil Bothwick <neil@digimed.co.uk> wrote:
> On Fri, 9 May 2008 21:50:09 +0200, Alex Schuster wrote:
>
>> Check for /boot/grub/menu.lst, this is an alternate (and maybe empty)
>> config file which grub seems to prefer over grub.conf.
>
> menu.lst has been the preferred config file for some years, it seem that
> GRUB is a little more strict about this nowadays.
>

I tried to read the ebuild but failed.

In my case I am sure that I was out of order WRT the way the quick
install guide says to build the system - first emerge grub, make
grub.conf, and then install grub. I was thinking I'd get the grub.conf
file from another system so I didn't bother doing it. After this
happened - and thanks for your help finding the solution - I started
wondering if the grub install or even the emerge of grub creates the
link when grub.conf is there but if it isn't there then there's
nothing to link to so we end up like my system last evening.

Anyway, just my guess since I know for a fact I didn't have a
grub.conf file when I did the emerge.

- Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-09 21:51     ` Mark Knecht
@ 2008-05-10  8:55       ` Alan McKinnon
  2008-05-10 17:29         ` Mark Knecht
  0 siblings, 1 reply; 8+ messages in thread
From: Alan McKinnon @ 2008-05-10  8:55 UTC (permalink / raw
  To: gentoo-user

On Friday 09 May 2008, Mark Knecht wrote:
> On Fri, May 9, 2008 at 2:41 PM, Neil Bothwick <neil@digimed.co.uk> 
wrote:
> > On Fri, 9 May 2008 21:50:09 +0200, Alex Schuster wrote:
> >> Check for /boot/grub/menu.lst, this is an alternate (and maybe
> >> empty) config file which grub seems to prefer over grub.conf.
> >
> > menu.lst has been the preferred config file for some years, it seem
> > that GRUB is a little more strict about this nowadays.
>
> I tried to read the ebuild but failed.

For reference:

It's this bit from the ebuild:

setup_boot_dir() {
        local boot_dir=$1
        local dir=${boot_dir}

        [[ ! -e ${dir} ]] && die "${dir} does not exist!"
        [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot"
        dir="${dir}/grub"
        if [[ ! -e ${dir} ]] ; then
                mkdir "${dir}" || die "${dir} does not exist!"
        fi

        # 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
alan dot mckinnon at gmail dot com

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-10  8:55       ` Alan McKinnon
@ 2008-05-10 17:29         ` Mark Knecht
  2008-05-10 18:57           ` Alan McKinnon
  0 siblings, 1 reply; 8+ messages in thread
From: Mark Knecht @ 2008-05-10 17:29 UTC (permalink / raw
  To: gentoo-user

On Sat, May 10, 2008 at 1:55 AM, Alan McKinnon <alan.mckinnon@gmail.com> 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 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.

- Mark
-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [gentoo-user] booting to grub prompt, but config works
  2008-05-10 17:29         ` Mark Knecht
@ 2008-05-10 18:57           ` Alan McKinnon
  0 siblings, 0 replies; 8+ messages in thread
From: Alan McKinnon @ 2008-05-10 18:57 UTC (permalink / raw
  To: gentoo-user

On Saturday 10 May 2008, Mark Knecht wrote:
> On Sat, May 10, 2008 at 1:55 AM, Alan McKinnon
> <alan.mckinnon@gmail.com> 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

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-05-10 18:57 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-09 19:32 [gentoo-user] booting to grub prompt, but config works Travis Osterman
2008-05-09 19:50 ` Alex Schuster
2008-05-09 21:41   ` Neil Bothwick
2008-05-09 21:51     ` Mark Knecht
2008-05-10  8:55       ` Alan McKinnon
2008-05-10 17:29         ` Mark Knecht
2008-05-10 18:57           ` Alan McKinnon
2008-05-09 19:52 ` Mark Knecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox