* [gentoo-user] Grub2, chroot, initramfs
@ 2012-05-16 2:37 Paul Hartman
2012-05-16 2:53 ` Hilco Wijbenga
2012-05-16 8:27 ` Hinnerk van Bruinehsen
0 siblings, 2 replies; 4+ messages in thread
From: Paul Hartman @ 2012-05-16 2:37 UTC (permalink / raw
To: Gentoo User
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Grub2, chroot, initramfs
2012-05-16 2:37 [gentoo-user] Grub2, chroot, initramfs Paul Hartman
@ 2012-05-16 2:53 ` Hilco Wijbenga
2012-05-16 3:19 ` Paul Hartman
2012-05-16 8:27 ` Hinnerk van Bruinehsen
1 sibling, 1 reply; 4+ messages in thread
From: Hilco Wijbenga @ 2012-05-16 2:53 UTC (permalink / raw
To: gentoo-user
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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Grub2, chroot, initramfs
2012-05-16 2:53 ` Hilco Wijbenga
@ 2012-05-16 3:19 ` Paul Hartman
0 siblings, 0 replies; 4+ messages in thread
From: Paul Hartman @ 2012-05-16 3:19 UTC (permalink / raw
To: gentoo-user
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).
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [gentoo-user] Grub2, chroot, initramfs
2012-05-16 2:37 [gentoo-user] Grub2, chroot, initramfs Paul Hartman
2012-05-16 2:53 ` Hilco Wijbenga
@ 2012-05-16 8:27 ` Hinnerk van Bruinehsen
1 sibling, 0 replies; 4+ messages in thread
From: Hinnerk van Bruinehsen @ 2012-05-16 8:27 UTC (permalink / raw
To: gentoo-user
-----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/
iQEcBAEBAgAGBQJPs2UIAAoJEJwwOFaNFkYcgrcIALVB1QY/HOX/xkDesJkRSLjS
rvK4m/WDde6FsmT2B3XSSZ9W6aVAfdJO8+GM+0MolpRT64fp7wNtAr0yaV4ALRr8
tNxk0YqWXPcSmh4LIsagKKnMuCCajHXZMK7AWPqnyAtifKPlP14j4H2T9cNegPvz
doR9DF2sU/TPyCzVrvq1ouMelXkao9EC7ejQ39nnZ12PrxrdqapITpkqjJ2OuTOn
NylZS6HQnZw+A8uLVuUD+Mclu/Z+sRbSEUAQelHSDe3knA7MZTkeXBrUoKj4g63r
2YRnrJACxeeJkIVxGOuVTQIT7a0A5TZHzMiv8wWTbIfDstPUBkGd3iV6Jvl3ndM=
=tTo+
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-05-16 8:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-16 2:37 [gentoo-user] Grub2, chroot, initramfs Paul Hartman
2012-05-16 2:53 ` Hilco Wijbenga
2012-05-16 3:19 ` Paul Hartman
2012-05-16 8:27 ` Hinnerk van Bruinehsen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox