-----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-----