0

I just used the amd64 minimal installation iso (installed on usb drive) to install and configure gentoo linux with the following make.conf:

CFLAGS="-march=native -O2 -pipe"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j5"
ACCEPT_KEYWORDS="~amd64"
CHOST="x86_64-pc-linux-gnu"
USE="device-mapper truetype bindist mmx sse sse2 lzma logrotate graphviz"
PORTDIR="/usr/portage"
DISTDIR="${PORTDIR}/distfiles"
PKGDIR="${PORTDIR}/packages"
GENTOO_MIRRORS="http://mirror.isoc.org.il/pub/gentoo/"
GRUB_PLATFORMS="efi-64"

created a BIOS Bootand EFI System partitions as described in the installation handbook.

# parted /dev/nvme0n1
GNU Parted 3.2
Using /dev/nvme0n1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system     Name    Flags
 1      1049kB  3146kB  2097kB  ext4            grub    bios_grub
 2      3146kB  137MB   134MB   fat32           boot    boot, esp
 3      137MB   16.9GB  16.8GB  linux-swap(v1)  swap
 4      16.9GB  256GB   239GB   ext4            rootfs

Installed grub with grub-install:

grub-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
EFI variables are not supported on this system.
EFI variables are not supported on this system.
Installation finished. No error reported.

I noticed the message EFI variables are not supported on this system. but I'm guessing that the kernel that i'm booting on just doesn't support efi variables but I compiled my gentoo-sources kernel to support that.

content of my boot partition:

# ls -lsa /boot/
total 13749
    1 drwxr-xr-x  4 root root      512 Jan  1  1970 .
    4 drwxr-xr-x 21 root root     4096 Feb 15 19:00 ..
    1 drwxr-xr-x  3 root root      512 Feb 15 22:22 EFI
 3129 -rwxr-xr-x  1 root root  3203197 Feb 15 22:23 System.map-4.15.3-gentoo
  103 -rwxr-xr-x  1 root root   104849 Feb 15 22:23 config-4.15.3-gentoo
    1 drwxr-xr-x  6 root root      512 Feb 15 22:23 grub
10513 -rwxr-xr-x  1 root root 10764560 Feb 15 22:23 vmlinuz-4.15.3-gentoo

I have a Gigabyte B150M-HD3-CF motherboard that supports uefi booting. but when I reboot my computer it doesn't find a bootable drive to boot from.

what am I missing ?

  • I suspect your firmware has CSM (Compatibility Support Module) enabled, which provides BIOS compatibility. In this mode the firmware emulates a legacy PC and the EFI variables are unavailable to the kernel. – Johan Myréen Feb 16 '18 at 7:01
  • 2
    The last time I did a Gentoo install, the Gentoo boot media didn't support EFI -- I had to use a different live DVD that did have that support. – Andy Dalton Feb 16 '18 at 19:28
  • If you're using a non-Gentoo boot disk, make sure to follow the warning about needing to have /dev/shm mounted or else parts of the Gentoo infrastructure don't work properly. In a previous question, I noted that the Ubuntu Server DVD worked OK for me. – ErikF Feb 22 '18 at 8:47
0

One has to boot a system in EFI mode to be able to install EFI bootloader; read this for more insight. BTW, you might like a proper rescue image to finish this installation like this:

mount /dev/nvme0n1p4 /mnt
mount /dev/nvme0n1p2 /mnt/boot/efi # or /mnt/boot?
for i in dev proc sys; do mount --bind /$i /mnt/$i; done
chroot /mnt grub-install
  • A very nice install image is System Rescue CD. It will boot EFI, is Gentoo-based and will carry you through the handbook just fine. – SleighBoy Jun 8 '18 at 8:14
  • Yeah, it's fine but I know that ALT Rescue tends to just boot regardless of e.g. Secure Boot setting which is rare across distros like Gentoo (I actually wrote the UEFI SecureBoot mini-HOWTO and know the pain). – Michael Shigorin Jun 15 '18 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.