Handbook Talk:AMD64/Installation/Bootloader

GRUB2 os-prober
I think it's worth mentioning that the os-prober package needs to be emerged for the grub installer to detect other OSes (Windows for eg)


 * I mentioned it in a tip. Thanks for the suggestion! --Maffblaster (talk) 18:12, 3 October 2016 (UTC)

GRUB2 all platforms
It should be made very clear that the boot partition should be mounted prior to using the grub2-install command. Without mounting the boot partition, grub2-install will say it has installed successfully with no error, leaving you with a non-bootable system.


 * Pickledpiper, Please remember to sign your comments on discussion pages. :) I will look into your concern. If a note is necessary, then I will add one. :) --Maffblaster (talk) 17:39, 4 November 2015 (UTC)


 * Looking into this more, the Mounting section of the Disks part deals with mounting . We (the Handbook maintainers) expect newcomers to read the Installation section of the Handbook from beginning to end, section-to-section. As long as they follow the necessary steps (which are provided) the partition is available. I may consider adding a note to remount the partition if the system is using one, but for now I'm marking this discussion as done. --Maffblaster (talk) 19:15, 3 October 2016 (UTC)

GRUB UEFI instructions needed
New to wiki and gentoo, so sorry if this is the wrong place/I format this comment wrong.

In any case, the grub instructions should either link to https://wiki.gentoo.org/wiki/GRUB2#UEFI_with_GPT or talk about how you have to emerge with GRUB_PLATFORMS="efi-32 efi-64" (one of those two) and possibly use --target x86_64_efi. This took me much too long to figure out as a noob.

Mordocai (talk) 07:39, 24 May 2015 (UTC)


 * Hi, thanks for the comment. The instructions for GPT/EFI have been cleaned up quite a bit. We also have links to the GRUB2 article in various places. I believe this resolves your issue. Kind regards, --Maffblaster (talk) 18:14, 3 October 2016 (UTC)

Grub2 install UEFI fails from minimal CD
When using UEFI: grub2-install --target=x86_64-efi --efi-directory=/boot

Note: this step fails when running from a minimal CD booted in BIOS (legacy) mode. This is because the efivars module is not available there. See for example

A fix for this is to install from a Gentoo Hybrid ISO (LiveDVD) booted through UEFI.

I got caught by this. Can we at least put a warning on the page that this step will not work work if when installing from the minimal installation CD? This has now been open for more than a year. I used a systemrescue USB to finalize my installation.-Arch dude (talk) 04:45, 4 March 2017 (UTC)


 * Yes, pretty please. There should be a warning about the Minimal CD in BIOS mode not containing  module. As a EFI novice, I've spent around 3 hours on this issue! I also ended up with SystemRescue USB in EFI boot mode.


 * The other thing is that the  spits a lot of   although it finishes with a line containing  . The GRUB installation failed because of the efivars module but the output is confusing... Yuri69 (talk) 22:49, 18 April 2017 (UTC)

syslinux should be proposed here
Why syslinux has never be proposed as bootloader for Gentoo Linux? It is a mature, versatile, complete and lightweight bootloader. Also, it respect the KISS principle.

There are reason to exclude it?


 * I would agree, syslinux has stayed contemporary and is probably more widely used than LILO. Reason we haven't touched it is because of lack of interest and/or manpower on the docs/wiki teams. I would consider adding a least a reference to it as a possible alternative. One reason I don't believe it's wise to include an entire section here in the handbook is that there's not a simple, straightforward way to install syslinux because there are a lot of different options. What would you suggest as the command(s) required to install/configure it if was included in the Handbook for MBR or GPT/EFI systems? --Maffblaster (talk) 18:33, 3 October 2016 (UTC)


 * There has been no responses here by for more than one quarter of a year (3) months.  I am going to close review mentioning syslinux in the Handbook and close this discussion. --Maffblaster (talk) 21:31, 20 April 2017 (UTC)

Incomplete umount on recent kernels
Recent kernels mount some "cgroup" stuff within the chroot in, which causes the final to fail due to the mounted sub paths. I'd suggest to replace

with

which recursively umounts everything mounted in.


 * Good suggestion. I'll need to make sure though that recursive unmounts work properly. An alternative that I found online was to use something like the following:
 * --SwifT (talk) 08:44, 3 October 2016 (UTC)
 * --SwifT (talk) 08:44, 3 October 2016 (UTC)


 * I think we'd all agree the Handbooks should be kept as simple as possible, but not simpler. :) I'm liking the option and would vouch for that as long as it works as implied. I ran a test on my system and it worked nicely for me. Can you also test, ? --Maffblaster (talk) 15:57, 3 October 2016 (UTC)


 * Since there's been no reply for a few months, and this worked well for me on official installation media in my testing environments, I will implement the suggestion. Kind regards, --Maffblaster (talk) 14:02, 1 January 2017 (UTC)

Incomplete Grub2 EFI installation command
When using

the GRUB2 installation is not complete. Booting this system fails.

would be the correct way to install GRUB2 (if you chose grub as your bootloader id).

— The preceding unsigned comment was added by Lukiwuki (talk • contribs) October 24, 2016

Information for systemd users needed in Grub2 section
I would at least link to: https://wiki.gentoo.org/wiki/Systemd#GRUB_2

Also adding a mention about the usage of GRUB_CMDLINE_LINUX would probably help a lot to other people to migrate from old grub specially when needing to append kernel options

Thanks, — The preceding unsigned comment was added by Pacho (talk • contribs) November 17, 2016‎


 * Hi, please remember to sign your contributions to discussion pages so we can track how long the discussion has been open. :). I will look into this and mark it closed when I finish. --Maffblaster (talk) 20:54, 9 February 2017 (UTC)

A critical typo at grub-install for UEFI
It currently has a space at --target=x86 64-efi.[1] It should have an underscore, ie. grub-install --target=x86_64-efi --efi-directory=/boot

Could someone with editing rights please fix this ASAP? Thanks, --Fcl (talk) 19:17, 11 February 2017 (UTC)


 * Yes, sorry. Fixed it yesterday. Thanks for closing! --Maffblaster (talk) 15:42, 15 February 2017 (UTC)

GRUB2 (UEFI) bootable file
Some UEFI firmware expects a bootable file at a known location (Which isn't configured using the default GRUB2 UEFI instructions). When rebooting after the installation the error "Please select a proper boot devices" would show up. This can be fixed by using the following command:

This copies the grubx64 bootfile to the known location so the UEFI firmware is like "Hey, I found a boot file at the expected location!" .

Hopefully this can be implemented in the docs so other people know what to do when experiencing this problem.


 * Hi, yes, I can add this to the AMD64 Handbook. Your path for the destination is not correct, though, you're missing the boot/ directory. I can fix this when I add it to the Handbook, though. Thanks! --Maffblaster (talk) 00:15, 21 April 2017 (UTC)

Grub2 EFI misses correct platform with empty GRUB_PLATFORMS
I am installing a Gentoo to EFI host (Installed quite many Gentoos before, but not that many on EFI hosts). According to handbook, I should use 'GRUB_PLATFORMS=""' in make.conf. But this installed only "i386-pc" platform for Grub2: ''ls -l usr/lib/grub/ total 24 drwxr-xr-x 2 root root 24576 Feb 23 17:15 i386-pc''

So I did get this error, when trying to install Grub2: ''grub-install: error: /usr/lib/grub/modinfo.sh doesn't exist. Please specify --target or --directory.''

So after I fixed the platforms var in make.conf to GRUB_PLATFORMS="efi-64 efi-32 pc" and re-emerged grub2, I was able to install grub2, with "grub-install --target=x86_64-efi --efi-directory=/boot" (it still needed the target).

And yes, I was making the installation through common minimal-installation-cd, through server's one-time boot menu as legacy boot. Even if this was the reason why grub2 didn't install efi platform with empty "" in GRUB_PLATFORMS, it should be noted in the handbook (as there are probably more people than just me, who do it like this). Probably one-liner hint would do it. Or maybe there could be a hint in the point of handbook where grub2 is being installed, that EFI users installing grub2 should check that efi-32 and/or efi-64 are included in USE arguments of grub2 installation. --Arackhaen (talk) 16:29, 23 February 2017 (UTC)

Broken internal link
The https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#Default:_Using_GRUB2 link doesn't work anymore. Please fix it to https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Bootloader#Default:_GRUB2

Fturco (talk) 15:53, 16 April 2017 (UTC)

Fix capitalization
Please fix "(I.E. install itself on the disk)" to "(i.e. install itself on the disk)". id est (i.e.) should be written with lowercase letters. Fturco (talk) 16:01, 16 April 2017 (UTC)

CONFIG_CMDLINE
"The Linux kernel itself can be booted immediately, and additional kernel command-line options can be built-in to the Linux kernel (there is a kernel configuration option called CONFIG_CMDLINE that allows the user to specify boot parameters as command-line options). Even an initramfs can be 'built-in' to the kernel."

Please add the parts written in bold.

Fturco (talk) 16:10, 16 April 2017 (UTC)

Also might be worth to mention which overruns which? CONFIG_CMDLINE vs. parameters passed by bootloader. --Zucca (talk) 17:51, 16 April 2017 (UTC)