From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([69.77.167.62] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1JtZqu-0001no-HB for garchives@archives.gentoo.org; Wed, 07 May 2008 02:57:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 33D9FE0457; Wed, 7 May 2008 02:57:54 +0000 (UTC) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by pigeon.gentoo.org (Postfix) with ESMTP id D0CE7E0457 for ; Wed, 7 May 2008 02:57:53 +0000 (UTC) Received: by fg-out-1718.google.com with SMTP id d23so105839fga.14 for ; Tue, 06 May 2008 19:57:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:disposition-notification-to:date:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:from; bh=O7f4xC8uaTf8QLqPxpKRh35CD8RF/f+7NvQGOIdPwAQ=; b=WwEDv08dgAKtkVPYsJrJt0X9aQlLs1brKNFItuOuXkhypl9Oo3AzhunJkTrE2BQam+e6WSFUi3PGSZPC1F/eKh20v/IqfKNTQSx7UZcYBZBaAb7nzpsFPoVvieRlSraEtbCtSeTP/JaDoU0anrf9DkVe49UiJDCYbxYgoTgvwFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:disposition-notification-to:date:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:x-enigmail-version:content-type:from; b=LLcTgfPjArbLOVCpWAI97Haf6RWssFu5lP2E8g7CcxdPP4ixyxAPPX5e//Z34R9s8NandSDmNDi0doDP2AArMRDRLIuxaEL1fNc9LtdupvPbb2Id/yzEeCKeTFWPji8d2StFiWcbXbMG0h6+8PNEbIjn4S47Ax9mwu2DjeejFQ4= Received: by 10.86.87.13 with SMTP id k13mr2912420fgb.1.1210129070965; Tue, 06 May 2008 19:57:50 -0700 (PDT) Received: from ?192.168.14.3? ( [91.64.241.126]) by mx.google.com with ESMTPS id t10sm2618193muh.17.2008.05.06.19.57.47 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 06 May 2008 19:57:48 -0700 (PDT) Message-ID: <48211AA4.8020909@googlemail.com> Date: Wed, 07 May 2008 04:57:40 +0200 User-Agent: Thunderbird 2.0.0.14 (X11/20080505) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] Re: grub weirdness References: <200805070036.32019.peter.ruskin@dsl.pipex.com> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig452E4A931A99E51D7A394A13" From: Wolf Canis X-Archives-Salt: 58f16a82-6eff-48c2-afdf-c4248e18bf9f X-Archives-Hash: 1bfc89aef221546a7cfadeb8a1a7e7d8 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig452E4A931A99E51D7A394A13 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sven K=C3=B6hler 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 =3Dgrub-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=3D"${dir}"/device.map \ > > /dev/null > fi=20 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=3D$1 local dir=3D${boot_dir} [[ ! -e ${dir} ]] && die "${dir} does not exist!" [[ ! -L ${dir}/boot ]] && ln -s . "${dir}/boot" dir=3D"${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|t= itle)' \ "${dir}"/grub.conf | \ /sbin/grub --batch \ --device-map=3D"${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=3D"${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 --------------enig452E4A931A99E51D7A394A13 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkghGqoACgkQKT9zBKF0twVujACgg67nfeSvQ+iPmiUfwYpv2Uj6 cd4An1UbvC0168ZXLIY/yeXOiLJsM1Xk =8cXV -----END PGP SIGNATURE----- --------------enig452E4A931A99E51D7A394A13-- -- gentoo-user@lists.gentoo.org mailing list