public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  grub weirdness
@ 2008-05-06 23:10 »Q«
  2008-05-06 23:36 ` Peter Ruskin
  2008-05-07  0:24 ` [gentoo-user] grub weirdness Ian Hilt
  0 siblings, 2 replies; 9+ messages in thread
From: »Q« @ 2008-05-06 23:10 UTC (permalink / raw
  To: gentoo-user

Earlier today, I emerged grub-0.97-r5 on my x86 laptop, replacing 0.97-r4.
I didn't run grub and didn't expect anything to be done to my boot partition.
Now I've read <http://bugs.gentoo.org/show_bug.cgi?id=218599>, and I suspect 
my current problem has to do with that, though I don't recall anything 
in grub.conf that would lead to trouble.

I can't access the boot partition right now, and I'm posting this in hopes of
pointers for what to look at once I get the chance to boot from a livecd.

When I try to boot, the word GRUB gets written to the screen over and over and 
over, filling the screen.  Pressing keys, AFAICT so far, doesn't stop this.  The
screen is just filled with "GRUB", and I think it's an ongoing thing because of 
a little flicker at the bottom right.

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



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

* Re: [gentoo-user]  grub weirdness
  2008-05-06 23:10 [gentoo-user] grub weirdness »Q«
@ 2008-05-06 23:36 ` Peter Ruskin
  2008-05-07  2:26   ` [gentoo-user] " Sven Köhler
  2008-05-07  3:54   ` [gentoo-user] Re: grub weirdness [solved] »Q«
  2008-05-07  0:24 ` [gentoo-user] grub weirdness Ian Hilt
  1 sibling, 2 replies; 9+ messages in thread
From: Peter Ruskin @ 2008-05-06 23:36 UTC (permalink / raw
  To: gentoo-user

On Wednesday 07 May 2008, »Q« wrote:
> Earlier today, I emerged grub-0.97-r5 on my x86 laptop, replacing
> 0.97-r4. I didn't run grub and didn't expect anything to be done
> to my boot partition. Now I've read
> <http://bugs.gentoo.org/show_bug.cgi?id=218599>, and I suspect my
> current problem has to do with that, though I don't recall
> anything in grub.conf that would lead to trouble.
>
> I can't access the boot partition right now, and I'm posting this
> in hopes of pointers for what to look at once I get the chance to
> boot from a livecd.
>
> When I try to boot, the word GRUB gets written to the screen over
> and over and over, filling the screen.  Pressing keys, AFAICT so
> far, doesn't stop this.  The screen is just filled with "GRUB",
> and I think it's an ongoing thing because of a little flicker at
> the bottom right.

When you emerged grub-0.97-r5, this was displayed on your console:
WARN: postinst
*** IMPORTANT NOTE: you must run grub and install
the new version's stage1 to your MBR.  Until you do,
stage1 and stage2 will still be the old version, but
later stages will be the new version, which could
cause problems such as an unbootable system.

To make life easier for situations like this, you could install grub 
on a floppy.

-- 
Peter
========================================================================
Gentoo Linux: Portage 2.1.5_rc7		kernel-2.6.24-gentoo-r5
AMD Athlon(tm) 64 X2 Dual Core Processor 4400+	gcc(GCC): 4.1.2
KDE: 3.5.8					Qt: 3.3.8
========================================================================
-- 
gentoo-user@lists.gentoo.org mailing list



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

* Re: [gentoo-user]  grub weirdness
  2008-05-06 23:10 [gentoo-user] grub weirdness »Q«
  2008-05-06 23:36 ` Peter Ruskin
@ 2008-05-07  0:24 ` Ian Hilt
  2008-05-07  9:22   ` Neil Bothwick
  1 sibling, 1 reply; 9+ messages in thread
From: Ian Hilt @ 2008-05-07  0:24 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1058 bytes --]

On Tue, 6 May 2008, »Q« wrote:

> When I try to boot, the word GRUB gets written to the screen
> over and over and over, filling the screen.  Pressing keys,
> AFAICT so far, doesn't stop this.  The screen is just filled
> with "GRUB", and I think it's an ongoing thing because of a
> little flicker at the bottom right.

<quote href="http://www.gentoo.org/doc/en/grub-error-guide.xml#doc_chap7">
7.  GRUB GRUB GRUB GRUB GRUB ...

Situation

Code Listing 7.1: Grub Output

GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
GRUB GRUB
   GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB
   GRUB GRUB GRUB
...

Solution

According to airhead this can be caused by having your bios
detect your disks automatically. Try to set your bios entry to
User Type HDD.

Another possibility is that you had Grub installed on your MBR
and tried reinstalling it (for instance due to hard disk changes)
but used the wrong setup and root commands.
</quote>

-- 
Ian Hilt
ian.hilt (at) gmail.com
GnuPG key: 0x4AFC1EE3

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

* [gentoo-user]  Re: grub weirdness
  2008-05-06 23:36 ` Peter Ruskin
@ 2008-05-07  2:26   ` Sven Köhler
  2008-05-07  2:57     ` Wolf Canis
  2008-05-07  3:54   ` [gentoo-user] Re: grub weirdness [solved] »Q«
  1 sibling, 1 reply; 9+ messages in thread
From: Sven Köhler @ 2008-05-07  2:26 UTC (permalink / raw
  To: gentoo-user

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

> When you emerged grub-0.97-r5, this was displayed on your console:
> WARN: postinst
> *** IMPORTANT NOTE: you must run grub and install
> the new version's stage1 to your MBR.  Until you do,
> stage1 and stage2 will still be the old version, but
> later stages will be the new version, which could
> cause problems such as an unbootable system.

Yes, the ebuild writes that to the screen.

But silently, in the background (because every output is piped to 
/dev/null - how evil!), the ebuild calls grub with some commands inside 
your grub.conf.

If there's a setup-command in your grub.conf, it is indeed executed. So 
if that command is outdated (something you won't notice, since that 
command is not used by grub in any situation i know), the ebuild will 
execute that setup-command and write to some device's boot sector. How 
evil, again!

Regards,
   Sven

P.S.: here's the code from grub-0.97-r5.ebuild:

         if [[ -e ${dir}/grub.conf ]] ; then
                 egrep \
                         -v 
'^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)' 
\
                         "${dir}"/grub.conf | \
                 /sbin/grub --batch \
                         --device-map="${dir}"/device.map \
                         > /dev/null
         fi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* Re: [gentoo-user]  Re: grub weirdness
  2008-05-07  2:26   ` [gentoo-user] " Sven Köhler
@ 2008-05-07  2:57     ` Wolf Canis
  2008-05-07 10:13       ` Sven Köhler
  0 siblings, 1 reply; 9+ messages in thread
From: Wolf Canis @ 2008-05-07  2:57 UTC (permalink / raw
  To: gentoo-user

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

Sven Köhler wrote:
>> When you emerged grub-0.97-r5, this was displayed on your console:
>> WARN: postinst
>> *** IMPORTANT NOTE: you must run grub and install
>> the new version's stage1 to your MBR.  Until you do,
>> stage1 and stage2 will still be the old version, but
>> later stages will be the new version, which could
>> cause problems such as an unbootable system.
>
> Yes, the ebuild writes that to the screen.
>
> But silently, in the background (because every output is piped to
> /dev/null - how evil!), the ebuild calls grub with some commands
> inside your grub.conf.

I just updated grub to version 0.97-r5 and this was,
at the end, displayed:

 To avoid automounting and autoinstalling with /boot,
 just export the DONT_MOUNT_BOOT variable.


 Your boot partition was not mounted as /boot, but portage
 was able to mount it without additional intervention.
 Files will be installed there for grub to function correctly.

 *** IMPORTANT NOTE: you must run grub and install
 the new version's stage1 to your MBR.  Until you do,
 stage1 and stage2 will still be the old version, but
 later stages will be the new version, which could
 cause problems such as an unbootable system.
 Copying files from /lib/grub and /usr/lib/grub to //boot/grub
 To install grub files to another device (like a usb stick), just run:
    emerge --config =grub-0.97-r5

>
> If there's a setup-command in your grub.conf, it is indeed executed.
> So if that command is outdated (something you won't notice, since that
> command is not used by grub in any situation i know), the ebuild will
> execute that setup-command and write to some device's boot sector. How
> evil, again!
>
> Regards,
>   Sven
>
> P.S.: here's the code from grub-0.97-r5.ebuild:
>
>         if [[ -e ${dir}/grub.conf ]] ; then
>                 egrep \
>                         -v
> '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)'
> \
>                         "${dir}"/grub.conf | \
>                 /sbin/grub --batch \
>                         --device-map="${dir}"/device.map \
>                         > /dev/null
>         fi 
And following the code of the functions which does the job:
found in ebuild: /usr/portage/sys-boot/grub/grub-0.97-r5.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

    if [[ -e ${dir}/stage2 ]] ; then
        mv "${dir}"/stage2{,.old}
        ewarn "*** IMPORTANT NOTE: you must run grub and install"
        ewarn "the new version's stage1 to your MBR.  Until you do,"
        ewarn "stage1 and stage2 will still be the old version, but"
        ewarn "later stages will be the new version, which could"
        ewarn "cause problems such as an unbootable system."
        ebeep
    fi

    einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}"
    for x in "${ROOT}"/lib*/grub/*/* "${ROOT}"/usr/lib*/grub/*/* ; do
        [[ -f ${x} ]] && cp -p "${x}" "${dir}"/
    done

    if [[ -e ${dir}/grub.conf ]] ; then
        egrep \
            -v
'^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)'
\
            "${dir}"/grub.conf | \
        /sbin/grub --batch \
            --device-map="${dir}"/device.map \
            > /dev/null
    fi

    # the grub default commands silently piss themselves if
    # the default file does not exist ahead of time
    if [[ ! -e ${dir}/default ]] ; then
        grub-set-default --root-directory="${boot_dir}" default
    fi
}


How you can see isn't the message piped to /dev/null, only
the command "/sbin/grub -batch -device-map...".

Have fun,
W. Canis



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [gentoo-user]  Re: grub weirdness [solved]
  2008-05-06 23:36 ` Peter Ruskin
  2008-05-07  2:26   ` [gentoo-user] " Sven Köhler
@ 2008-05-07  3:54   ` »Q«
  1 sibling, 0 replies; 9+ messages in thread
From: »Q« @ 2008-05-07  3:54 UTC (permalink / raw
  To: gentoo-user

Peter Ruskin <peter.ruskin@dsl.pipex.com> wrote:

> On Wednesday 07 May 2008, »Q« wrote:
> > Earlier today, I emerged grub-0.97-r5 on my x86 laptop, replacing
> > 0.97-r4. I didn't run grub and didn't expect anything to be done
> > to my boot partition. Now I've read
> > <http://bugs.gentoo.org/show_bug.cgi?id=218599>, and I suspect my
> > current problem has to do with that, though I don't recall
> > anything in grub.conf that would lead to trouble.
> >
> > I can't access the boot partition right now, and I'm posting this
> > in hopes of pointers for what to look at once I get the chance to
> > boot from a livecd.
> >
> > When I try to boot, the word GRUB gets written to the screen over
> > and over and over, filling the screen.  Pressing keys, AFAICT so
> > far, doesn't stop this.  The screen is just filled with "GRUB",
> > and I think it's an ongoing thing because of a little flicker at
> > the bottom right.
> 
> When you emerged grub-0.97-r5, this was displayed on your console:
> WARN: postinst
> *** IMPORTANT NOTE: you must run grub and install
> the new version's stage1 to your MBR.  Until you do,
> stage1 and stage2 will still be the old version, but
> later stages will be the new version, which could
> cause problems such as an unbootable system.

Thanks.  I had assumed (d'oh!) that I could wait and read the elog if I
ever decided to install the new grub to my boot partition.  I'm not so
happy with the boot partition being mounted and screwed with by the
ebuild, especially given I was using a grub from Fedora, not Gentoo.
Now I've got DONT_MOUNT_BOOT="yes" in make.conf, so I should never have
this kind of problem again.

Once I booted a livecd, running the setup command within grub fixed
the problem.  Then once I booted Gentoo, I did it again, to get
whatever goodness is in this latest revision.

> To make life easier for situations like this, you could install grub 
> on a floppy.

Even if I had a floppy drive, I'm not sure portage wouldn't find the
floppy and overwrite it.  ;)

I usually have a livecd or two in my bag, but of course not when I most
need one.


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



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

* Re: [gentoo-user]  grub weirdness
  2008-05-07  0:24 ` [gentoo-user] grub weirdness Ian Hilt
@ 2008-05-07  9:22   ` Neil Bothwick
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Bothwick @ 2008-05-07  9:22 UTC (permalink / raw
  To: gentoo-user

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

On Tue, 6 May 2008 20:24:34 -0400 (EDT), Ian Hilt wrote:

> 7.  GRUB GRUB GRUB GRUB GRUB ...

Did anyone else find themselves singing this to the tune of the Monty
Python spam song ;-)


-- 
Neil Bothwick

Change is inevitable. Except from a vending machine.

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

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

* [gentoo-user]  Re: grub weirdness
  2008-05-07  2:57     ` Wolf Canis
@ 2008-05-07 10:13       ` Sven Köhler
  2008-05-08  4:47         ` »Q«
  0 siblings, 1 reply; 9+ messages in thread
From: Sven Köhler @ 2008-05-07 10:13 UTC (permalink / raw
  To: gentoo-user

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

>  To avoid automounting and autoinstalling with /boot,
>  just export the DONT_MOUNT_BOOT variable.

Which /boot partition? I don't have any ...

>> If there's a setup-command in your grub.conf, it is indeed executed.
>> So if that command is outdated (something you won't notice, since that
>> command is not used by grub in any situation i know), the ebuild will
>> execute that setup-command and write to some device's boot sector. How
>> evil, again!
>>
>> Regards,
>>   Sven
>>
>> P.S.: here's the code from grub-0.97-r5.ebuild:
>>
>>         if [[ -e ${dir}/grub.conf ]] ; then
>>                 egrep \
>>                         -v
>> '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)'
>> \
>>                         "${dir}"/grub.conf | \
>>                 /sbin/grub --batch \
>>                         --device-map="${dir}"/device.map \
>>                         > /dev/null
>>         fi 
> And following the code of the functions which does the job:
> found in ebuild: /usr/portage/sys-boot/grub/grub-0.97-r5.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
> 
>     if [[ -e ${dir}/stage2 ]] ; then
>         mv "${dir}"/stage2{,.old}
>         ewarn "*** IMPORTANT NOTE: you must run grub and install"
>         ewarn "the new version's stage1 to your MBR.  Until you do,"
>         ewarn "stage1 and stage2 will still be the old version, but"
>         ewarn "later stages will be the new version, which could"
>         ewarn "cause problems such as an unbootable system."
>         ebeep
>     fi
> 
>     einfo "Copying files from /lib/grub and /usr/lib/grub to ${dir}"
>     for x in "${ROOT}"/lib*/grub/*/* "${ROOT}"/usr/lib*/grub/*/* ; do
>         [[ -f ${x} ]] && cp -p "${x}" "${dir}"/
>     done
> 
>     if [[ -e ${dir}/grub.conf ]] ; then
>         egrep \
>             -v
> '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)'
> \
>             "${dir}"/grub.conf | \
>         /sbin/grub --batch \
>             --device-map="${dir}"/device.map \
>             > /dev/null
>     fi
> 
>     # the grub default commands silently piss themselves if
>     # the default file does not exist ahead of time
>     if [[ ! -e ${dir}/default ]] ; then
>         grub-set-default --root-directory="${boot_dir}" default
>     fi
> }
> 
> 
> How you can see isn't the message piped to /dev/null, only
> the command "/sbin/grub -batch -device-map...".

Why should i worry about the message being piped to /dev/null?

I worry about a message saying "you have to do it by hand" although some 
harmful "magic" is going on behind the scenes (the egrep+grub command) 
although we are not informed about it (command is piped to /dev/null, 
not message about it, etc.).


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

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

* [gentoo-user]  Re: grub weirdness
  2008-05-07 10:13       ` Sven Köhler
@ 2008-05-08  4:47         ` »Q«
  0 siblings, 0 replies; 9+ messages in thread
From: »Q« @ 2008-05-08  4:47 UTC (permalink / raw
  To: gentoo-user

On Wed, 07 May 2008 12:13:47 +0200
Sven Köhler <skoehler@upb.de> wrote:

> >  To avoid automounting and autoinstalling with /boot,
> >  just export the DONT_MOUNT_BOOT variable.  
> 
> Which /boot partition? I don't have any ...

I believe you've already avoided it being mounted, then.  :)


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



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

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

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-06 23:10 [gentoo-user] grub weirdness »Q«
2008-05-06 23:36 ` Peter Ruskin
2008-05-07  2:26   ` [gentoo-user] " Sven Köhler
2008-05-07  2:57     ` Wolf Canis
2008-05-07 10:13       ` Sven Köhler
2008-05-08  4:47         ` »Q«
2008-05-07  3:54   ` [gentoo-user] Re: grub weirdness [solved] »Q«
2008-05-07  0:24 ` [gentoo-user] grub weirdness Ian Hilt
2008-05-07  9:22   ` Neil Bothwick

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