On Friday, 31 March 2023 23:15:51 BST Lee K wrote: > On Fri, Mar 31, 2023 at 02:08:47PM -0700, Alan E. Davis wrote: > > Hello: > > > > It's time to try running Gentoo again, after over a decade.
Welcome back! :-) > > I have gone through, I think, the steps, using the Gentoo LiveCD as a > > launchpad. > > > > Installing and configuring Grub has presented a little confusion, > > regarding > > the correct boot partition. I have other GNU/Linux installs on this > > machine; for all of them, I've fallen into the practice of setting up grub > > in /boot/efi. However, the Gentoo Handbook does not mention this > > approach, > > so I tried using just "/boot". As it turned out, when I > > rebooted---thinking all steps had been completed---the Gentoo system does > > not appear in the Grub Menu. Which GRUB's menu is this? Has it been updated with any new kernels/OS now available? > > I have found that manjaro's grub setup has been good at picking up any > > other installs, and, once a particular one has been booted, manjaro's grub > > defaults to that other install. Thinking that even if grub is not > > working, > > perhaps Manjaro would see Gentoo, I tried that. Manjaro and other binary distros run the grub-mkconfig command as part of their kernel & initrd update scripts, whenever a new kernel is installed/ removed. In Gentoo you will need to do this manually AND point it to the appropriate mountpoint for ESP - see below. > > So far, no luck. I am planning to try to mount the boot partition to > > /boot/efi, now, and see what happens. > > > > Any problems with this? > > > > Thank you, > > It should indeed pick it up, if you have properly built your kernel and it > is in the /boot directory. Have you tried running grub-mkconfig manually on > your manjaro distro? When UEFI MoBos started becoming mainstream and an EFI System Partition (ESP) with a FAT32 filesystem on it was necessary for UEFI firmware to boot EFI capable OS/kernels, the convention was to use /boot/efi as a mountpoint directory to mount the ESP. This would be; e.g.: /dev/sda1 /boot/efi vfat noauto,noatime 0 2 I understand this is now deprecated and it should be either: /dev/sda1 /boot vfat noauto,noatime 0 2 or, /dev/sda1 /efi vfat noauto,noatime 0 2 However, what you call the mountpoint directory in your OS for the ESP is your choice. It can be named anything you want it to be. What is important is to adhere to some logical consistency with the UEFI standard, when you store EFI executables in this mountpoint directory and any subdirectories within it. The UEFI firmware requires a FAT32 formatted partition, which is created with type 'ef00' EFI system partition GUID code C12A7328-F81F-11D2- BA4B-00A0C93EC93B. The UEFI firmware will scan this partition at boot time and expect to find a directory named \EFI at the root of its FAT32 filesystem, in which any EFI executables (including GRUB's grubx64.efi) will be stored. These are conventionally stored inside directories\subdirectories named according to the different OSs installed on the PC; e.g. ~ $ tree /boot /boot ├── BOOT │ └── boot.sdi └── EFI ├── Boot │ └── bootx64.efi ├── Gentoo │ ├── System.map-6.1.12-gentoo │ ├── System.map-6.1.19-gentoo │ ├── bootx64-6.1.12-gentoo.efi │ ├── bootx64-6.1.19-gentoo.efi │ ├── config-6.1.12-gentoo │ └── config-6.1.19-gentoo └── Microsoft └── Boot ├── BCD ├── BCD.LOG ├── BCD.LOG1 ├── BCD.LOG2 ├── BOOTSTAT.DAT [snip] When you install GRUB in your /boot directory you need to make sure you have mounted the ESP first and then you point the installer to the appropriate EFI root directory; i.e. Either use --efi-directory=/boot, if your ESP mountpoint is /boot; or --efi-directory=/boot/efi, if your ESP mountpoint is /boot/efi. Finally, running the grub-mkconfig stanza should pick up all bootable kernels within the \ESP and update the GRUB configuration file with available kernel entries. If you have already installed GRUB via manjaro, you will have the GRUB executable in the ESP and do not need to reinstall it via Gentoo. As already mentioned, grub-mkconfig run from within manjaro will probe the boot (and any other FAT32 formatted) partition and include bootable OS kernels in its configuration and menu. With the old /boot/efi mountpoint it used to be the case the /boot directory was on the root partition, or in any case formatted with a Linux filesystem which could use symlinks for vmlinuz, but /boot/efi was pointed to the ESP with its FAT32, where the x64.efi bootloader(s) were installed. When you run 'make install' as part of a new kernel installation the vmlinuz/initrd links would be refreshed, but GRUB would not know about any of them, until grub- mkconfig was run again. HTH.
signature.asc
Description: This is a digitally signed message part.