Gentoo Archives: gentoo-user

From: "Sven Köhler" <skoehler@×××.de>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: grub weirdness
Date: Wed, 07 May 2008 02:26:56
Message-Id: fvr409$6hj$1@ger.gmane.org
In Reply to: Re: [gentoo-user] grub weirdness by Peter Ruskin
1 > When you emerged grub-0.97-r5, this was displayed on your console:
2 > WARN: postinst
3 > *** IMPORTANT NOTE: you must run grub and install
4 > the new version's stage1 to your MBR. Until you do,
5 > stage1 and stage2 will still be the old version, but
6 > later stages will be the new version, which could
7 > cause problems such as an unbootable system.
8
9 Yes, the ebuild writes that to the screen.
10
11 But silently, in the background (because every output is piped to
12 /dev/null - how evil!), the ebuild calls grub with some commands inside
13 your grub.conf.
14
15 If there's a setup-command in your grub.conf, it is indeed executed. So
16 if that command is outdated (something you won't notice, since that
17 command is not used by grub in any situation i know), the ebuild will
18 execute that setup-command and write to some device's boot sector. How
19 evil, again!
20
21 Regards,
22 Sven
23
24 P.S.: here's the code from grub-0.97-r5.ebuild:
25
26 if [[ -e ${dir}/grub.conf ]] ; then
27 egrep \
28 -v
29 '^[[:space:]]*(#|$|default|fallback|initrd|password|splashimage|timeout|title)'
30 \
31 "${dir}"/grub.conf | \
32 /sbin/grub --batch \
33 --device-map="${dir}"/device.map \
34 > /dev/null
35 fi

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] Re: grub weirdness Wolf Canis <wolf.canis@××××××××××.com>