So yes, it works just as easy as the doctor sez it does.
Nice that the Gentoo Handbook is updated for GPT and UEFI.
Thanks to Gentoo volunteers for that.
I presume the bios_grub partition is for Windows dual boot; I do not use one.
genkernel installed files into /boot
IIRC, the one thing slightly different was adding the arg "--efi-directory=/boot" when running grub2-install.
Code: Select all
(chroot) livecd / # grub2-install /dev/sda
Installing for x86_64-efi platform.
grub2-install: error: cannot find EFI directory.
(chroot) livecd / # grub2-install --efi-directory=/boot /dev/sda
Installing for x86_64-efi platform.
Installation finished. No error reported.
## It worked!
## Let's view some of /boot
(chroot) livecd / # ls -FlR /boot
/boot:
total 11704
drwxr-xr-x 4 root root 8192 Aug 29 01:25 efi/
drwxr-xr-x 6 root root 8192 Aug 29 01:27 grub/
-rwxr-xr-x 1 root root 3399072 Aug 29 01:08 initramfs-genkernel-x86_64-4.0.0-gentoo*
-rwxr-xr-x 1 root root 4853504 Aug 29 01:02 kernel-genkernel-x86_64-4.0.0-gentoo*
-rwxr-xr-x 1 root root 3709064 Aug 29 01:02 System.map-genkernel-x86_64-4.0.0-gentoo*
/boot/efi:
total 16
drwxr-xr-x 2 root root 8192 Aug 29 01:11 boot/
drwxr-xr-x 2 root root 8192 Aug 29 01:25 gentoo/
/boot/efi/boot:
total 4744
-rwxr-xr-x 1 root root 4853504 Aug 29 01:02 bootx64.efi*
/boot/efi/gentoo:
total 120
-rwxr-xr-x 1 root root 115712 Aug 29 08:06 grubx64.efi*
/boot/grub:
total 88
drwxr-xr-x 2 root root 8192 Aug 29 01:25 fonts/
-rwxr-xr-x 1 root root 25594 Aug 29 01:27 grub.cfg*
-rwxr-xr-x 1 root root 1024 Aug 29 01:25 grubenv*
drwxr-xr-x 2 root root 8192 Aug 29 01:25 locale/
drwxr-xr-x 3 root root 8192 Aug 29 01:25 themes/
drwxr-xr-x 2 root root 24576 Aug 29 08:06 x86_64-efi/
8< snip >8
(chroot) livecd / # efibootmgr -v
BootCurrent: 0009
Timeout: 1 seconds
BootOrder: 0000,0007,0002,0009,000A,0008
Boot0000* gentoo HD(1,GPT,8d86e60f-a447-4239-bec1-574a00d54e00,0x800,0xaf000)/File(\EFI\gentoo\grubx64.efi)
Boot0002* Linux VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0007* CD/DVD Drive BBS(CDROM,,0x0)..GO..NO........O.H.L.-.D.T.-.S.T.D.V.D.-.R.A.M. .G.H.6.0.N.................>..Gd-.;.A..MQ..L.0.M.B.0.K.5.5.8.0.2. .1. . . . . . . . ........BO
Boot0008* Hard Drive BBS(HD,,0x0)..GO..NOy.......O.S.T.3.5.0.0.4.1.8.A.S.................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .2.W.0.A.A.7.2.M........BO..NO........O.H.G.S.T. .H.D.N.7.2.4.0.3.0.A.L.E.6.4.0.................>..Gd-.;.A..MQ..L. . . . . . .K.P.2.2.4.3.9.P.9.H.E.A.Y.A........BO..NO........O.S.T.3.0.0.0.D.M.0.0.1.-.1.E.R.1.6.6.................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .5.Z.0.0.M.9.G.R........BO..NO........O.H.G.S.T. .H.D.N.7.2.4.0.3.0.A.L.E.6.4.0.................>..Gd-.;.A..MQ..L. . . . . . .K.P.2.2.4.3.9.P.9.H.9.B.Y.4........BO..NO........Q.A.D.A.T.A. .U.S.B. .F.l.a.s.h. .D.r.i.v.e.................@..Gd-.;.A..MQ..L.A.D.A.T.A. .U.S.B. .F.l.a.s.h. .D.r.i.v.e........BO
Boot0009* UEFI: ADATA USB Flash Drive PciRoot(0x0)/Pci(0x14,0x0)/USB(18,0)/USB(2,0)/HD(1,MBR,0x4294967264,0x800,0xeb7800)..BO
Boot000A* UEFI OS HD(1,GPT,3cc50af7-2598-4854-95fe-9d8a4ffa87b6,0x800,0xaf000)/File(\EFI\BOOT\BOOTX64.EFI)
(chroot) livecd / # grub2-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/kernel-genkernel-x86_64-4.0.0-gentoo
Found initrd image: /boot/initramfs-genkernel-x86_64-4.0.0-gentoo
done
# proceed to unmount everything, exit chroot, and reboot
The disk:
Code: Select all
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 175C8317-EA91-47FF-99B7-5A2354F7622A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number Start (sector) End (sector) Size Code Name
1 2048 718847 350.0 MiB EF00 EFI System
2 718848 9107455 4.0 GiB 8200 Linux swap
3 9107456 976773134 461.4 GiB 8300 Linux filesystem
As I only went through this once, so therefore no experimentation to discover what was not necessary.
For example, is the grub2-mkconfig necessary?
I thought that the UEFI boot process boots the code at this filepath: /boot/efi/boot/bootx64.efi
Also, I could not find 'cp' in my history to copy the kernel created by genkernel.
But clearly the file size is same as the kernel. It is the kernel.

I guess I ran that in another terminal session along with running genkernel (which I clearly recall. lol!).
HTH!
