I'm trying out grub2 for the first time on my old laptop. I'm
following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
which seems easy enough. Basically just emerge it, install and go.
However... two different questions:
When I did this from a chroot, I just got the GRUB> prompt upon
rebooting... no menu or anything. I can manually type "linux
/boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run
grub2-mkconfig from within the chroot, I don't get any "Found linux
image" lines. It does not create /boot/grub2/grub.cfg but rather
grub.cfg.new. So I don't know if it's confused about where /boot is or
what. Is there a trick to installing/updating grub2 config from within
a chroot?
Second, when running grub2-mkconfig from within my working gentoo
system, it fails with "error: failed to get canonical path of
/dev/root." which is apparently because I don't use an initramfs. I
must manually run "ln -s /dev/sda3 /dev/boot" before it will work. Is
there any trick to avoid having to do that every time? For now I have
simply added that to my after-kernel-update script but I'm curious to
know if grub2 knows how to handle this on its own somehow.
Thanks,
Paul
Wed May 16 06:30:02 2012
Return-path: <devel-bounces@lists.fedoraproject.org>
Envelope-to: tom@linux-archive.org
Delivery-date: Wed, 16 May 2012 05:47:07 +0300
Received: from bastion01.fedoraproject.org ([209.132.181.2]:58459 helo=bastion.fedoraproject.org)
by s2.java-tips.org with esmtp (Exim 4.77)
(envelope-from <devel-bounces@lists.fedoraproject.org>)
id 1SUUGZ-000167-PI
for tom@linux-archive.org; Wed, 16 May 2012 05:47:07 +0300
Received: from lists.fedoraproject.org (collab03.vpn.fedoraproject.org [192.168.1.70])
by bastion01.phx2.fedoraproject.org (Postfix) with ESMTP id 515EC20E20;
Wed, 16 May 2012 02:47:07 +0000 (UTC)
Received: from collab03.fedoraproject.org (localhost [127.0.0.1])
by lists.fedoraproject.org (Postfix) with ESMTP id 705A940A90;
Wed, 16 May 2012 02:47:05 +0000 (UTC)
X-Original-To: devel@lists.fedoraproject.org
Delivered-To: devel@lists.fedoraproject.org
Received: from smtp-mm01.fedoraproject.org (smtp-mm01.fedoraproject.org
[80.239.156.217])
by lists.fedoraproject.org (Postfix) with ESMTP id 4FF4340A67
for <devel@lists.fedoraproject.org>;
Wed, 16 May 2012 02:47:03 +0000 (UTC)
Received: from mail-ob0-f173.google.com (mail-ob0-f173.google.com
[209.85.214.173])
by smtp-mm01.fedoraproject.org (Postfix) with ESMTP id 06AA5C02EF
for <devel@lists.fedoraproject.org>;
Wed, 16 May 2012 02:47:01 +0000 (UTC)
Received: by obbwd20 with SMTP id wd20so486642obb.32
for <devel@lists.fedoraproject.org>;
Tue, 15 May 2012 19:47:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
h=mime-version:date:message-id:subject:from:to:content-type;
bh=kTzj2WXL/ZgoZ8TLGGgH/mTJyXizifp5rF+W95+9i9w=;
b=rQ0nlegEU6yLrdDnzTPBpI7hkKB19rwLK26dA7SUjtWzdBLQ tEJnR0oZUOy5SG4AP6
8rxrq3X/eDfFuY8ZhZthBCX7xlvuRSorV4RyNvO3JbsRqnv2355DORW/pF1p8RmTMsgc
raoel5MlM0cjW5/glDgZM1bbZCVnqesMM+REMA7+hvRtB4IH3qtSCx9DsvWqHS99N nED
dGzK5x7ie3GxvmqI/FownT9pxESI1/xKxSDAYog8znaXi22wg3IbxxzWUI0JRLv3v/eN
q+W/6kWC7ejyK8kDPcebVo3VO+E7gWzMWTuptguyIlKkY/LQOV8y+NMY9PqyJKfRQTvq
Ythg==
MIME-Version: 1.0
Received: by 10.60.9.170 with SMTP id a10mr1252218oeb.14.1337136422557; Tue,
15 May 2012 19:47:02 -0700 (PDT)
Received: by 10.182.57.168 with HTTP; Tue, 15 May 2012 19:47:02 -0700 (PDT)
Date: Tue, 15 May 2012 23:47:02 -0300
Message-ID: <CAHAq8pF62did6fsCGDvZ+M=aGBDNpHENK1ms+w3Ncp5yY8e2 0A@mail.gmail.com>
Subject: rpmlib(X-CheckUnifiedSystemdir) is needed by
filesystem-3-2.fc17.x86_64
From: =?ISO-8859-1?Q?Paulo_C=E9sar_Pereira_de_Andrade?=
<paulo.cesar.pereira.de.andrade@gmail.com>
To: Development discussions related to Fedora <devel@lists.fedoraproject.org>
X-BeenThere: devel@lists.fedoraproject.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: Development discussions related to Fedora
<devel@lists.fedoraproject.org>
List-Id: Development discussions related to Fedora
<devel.lists.fedoraproject.org>
List-Unsubscribe: <https://admin.fedoraproject.org/mailman/options/devel>,
<mailto:devel-request@lists.fedoraproject.org?subject=unsubscrib e>
List-Archive: <http://lists.fedoraproject.org/pipermail/devel/>
List-Post: <mailto:devel@lists.fedoraproject.org>
List-Help: <mailto:devel-request@lists.fedoraproject.org?subject=help>
List-Subscribe: <https://admin.fedoraproject.org/mailman/listinfo/devel>,
<mailto:devel-request@lists.fedoraproject.org?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: devel-bounces@lists.fedoraproject.org
Errors-To: devel-bounces@lists.fedoraproject.org
On 15 May 2012 19:37, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> Hi,
>
> I'm trying out grub2 for the first time on my old laptop. I'm
> following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
> which seems easy enough. Basically just emerge it, install and go.
>
> However... two different questions:
>
> When I did this from a chroot, I just got the GRUB> prompt upon
> rebooting... no menu or anything. I can manually type "linux
> /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run
> grub2-mkconfig from within the chroot, I don't get any "Found linux
> image" lines. It does not create /boot/grub2/grub.cfg but rather
> grub.cfg.new. So I don't know if it's confused about where /boot is or
> what. Is there a trick to installing/updating grub2 config from within
> a chroot?
I don't really understand where the chroot comes into this but ... did
you add the "-o /boot/grub2/grub.cfg" part? I forgot that bit a few
times and then couldn't figure out why my changes weren't taking
effect. :-)
> Second, when running grub2-mkconfig from within my working gentoo
> system, it fails with "error: failed to get canonical path of
> /dev/root." which is apparently because I don't use an initramfs. I
> must manually run "ln -s /dev/sda3 /dev/boot" before it will work. Is
> there any trick to avoid having to do that every time? For now I have
> simply added that to my after-kernel-update script but I'm curious to
> know if grub2 knows how to handle this on its own somehow.
>
> Thanks,
> Paul
>
05-16-2012, 03:19 AM
Paul Hartman
Grub2, chroot, initramfs
On Tue, May 15, 2012 at 9:53 PM, Hilco Wijbenga
<hilco.wijbenga@gmail.com> wrote:
> On 15 May 2012 19:37, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
>> Hi,
>>
>> I'm trying out grub2 for the first time on my old laptop. I'm
>> following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
>> which seems easy enough. Basically just emerge it, install and go.
>>
>> However... two different questions:
>>
>> When I did this from a chroot, I just got the GRUB> prompt upon
>> rebooting... no menu or anything. I can manually type "linux
>> /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run
>> grub2-mkconfig from within the chroot, I don't get any "Found linux
>> image" lines. It does not create /boot/grub2/grub.cfg but rather
>> grub.cfg.new. So I don't know if it's confused about where /boot is or
>> what. Is there a trick to installing/updating grub2 config from within
>> a chroot?
>
> I don't really understand where the chroot comes into this but ... did
> you add the "-o /boot/grub2/grub.cfg" part? I forgot that bit a few
> times and then couldn't figure out why my changes weren't taking
> effect. :-)
Hehe, yeah, I used that command. I'm installing it from chroot for the
first time because gentoo's bootloader was not yet present on the
machine (only Windows7).
05-16-2012, 08:27 AM
Hinnerk van Bruinehsen
Grub2, chroot, initramfs
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 16.05.2012 04:37, Paul Hartman wrote:
> Hi,
>
> I'm trying out grub2 for the first time on my old laptop. I'm
> following the guide at:
> https://wiki.gentoo.org/wiki/GRUB2_Quick_Start which seems easy
> enough. Basically just emerge it, install and go.
>
> However... two different questions:
>
> When I did this from a chroot, I just got the GRUB> prompt upon
> rebooting... no menu or anything. I can manually type "linux
> /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I
> run grub2-mkconfig from within the chroot, I don't get any "Found
> linux image" lines. It does not create /boot/grub2/grub.cfg but
> rather grub.cfg.new. So I don't know if it's confused about where
> /boot is or what. Is there a trick to installing/updating grub2
> config from within a chroot?
>
> Second, when running grub2-mkconfig from within my working gentoo
> system, it fails with "error: failed to get canonical path of
> /dev/root." which is apparently because I don't use an initramfs.
> I must manually run "ln -s /dev/sda3 /dev/boot" before it will
> work. Is there any trick to avoid having to do that every time? For
> now I have simply added that to my after-kernel-update script but
> I'm curious to know if grub2 knows how to handle this on its own
> somehow.
>
> Thanks, Paul
>
If I recall correctly you need to mount /sys for grub2 to sucessfully
detect devices.
mount -o bind /sys <path-to-gentoo/sys should suffice.
proc and dev should be mounted according to the manual.
If you use a /boot- partition mount it, when you are inside the chroot.
Doing so it worked like a charm for all devices I installed that way
(3 in the last 3 months, if I recall correctly).
With kind regards,
Hinnerk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/