Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: Gentoo User <gentoo-user@l.g.o>
Subject: [gentoo-user] Grub2, chroot, initramfs
Date: Wed, 16 May 2012 02:40:05
Message-Id: CAEH5T2PvAOPkkSWp403rRoe3jfoNFkTUxywh=xDYDMRJjf=a6Q@mail.gmail.com
1 Hi,
2
3 I'm trying out grub2 for the first time on my old laptop. I'm
4 following the guide at: https://wiki.gentoo.org/wiki/GRUB2_Quick_Start
5 which seems easy enough. Basically just emerge it, install and go.
6
7 However... two different questions:
8
9 When I did this from a chroot, I just got the GRUB> prompt upon
10 rebooting... no menu or anything. I can manually type "linux
11 /boot/vmlinuz root=/dev/sda3" and then boot into my system. When I run
12 grub2-mkconfig from within the chroot, I don't get any "Found linux
13 image" lines. It does not create /boot/grub2/grub.cfg but rather
14 grub.cfg.new. So I don't know if it's confused about where /boot is or
15 what. Is there a trick to installing/updating grub2 config from within
16 a chroot?
17
18 Second, when running grub2-mkconfig from within my working gentoo
19 system, it fails with "error: failed to get canonical path of
20 /dev/root." which is apparently because I don't use an initramfs. I
21 must manually run "ln -s /dev/sda3 /dev/boot" before it will work. Is
22 there any trick to avoid having to do that every time? For now I have
23 simply added that to my after-kernel-update script but I'm curious to
24 know if grub2 knows how to handle this on its own somehow.
25
26 Thanks,
27 Paul

Replies

Subject Author
Re: [gentoo-user] Grub2, chroot, initramfs Hilco Wijbenga <hilco.wijbenga@×××××.com>
Re: [gentoo-user] Grub2, chroot, initramfs Hinnerk van Bruinehsen <h.v.bruinehsen@×××××××××.de>