public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] EFI booting problem - understanding it
@ 2020-07-02 10:56 Peter Humphrey
  2020-07-03  2:05 ` Andrew Udvare
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Humphrey @ 2020-07-02 10:56 UTC (permalink / raw
  To: gentoo-user

Morning all,

I'm trying to set the default boot entry via bootctl or efibootmgr. I know I
can set it directly by pressing D at the boot selection screen, and the system
does boot properly; I just want to understand the setup a bit better. I don't
have the rest of systemd: this is an openrc box.

# tree -L 3 /boot
/boot
├── config-5.4.48-gentoo
├── config-5.4.48-gentoo-rescue
├── config-5.7.6-gentoo
├── config-5.7.7-gentoo
├── early_ucode.cpio
├── EFI
│   ├── Boot
│   │   └── bootx64.efi
│   ├── Linux
│   ├── Microsoft
│   │   ├── Boot
│   │   └── Recovery
│   └── systemd
│       └── systemd-bootx64.efi
├── intel-uc.img
├── loader
│   ├── entries
│   │   ├── 08-gentoo-5.4.48-rescue.conf
│   │   ├── 09-gentoo-5.4.48-rescue.nonet.conf
│   │   ├── 30-gentoo-5.7.7.conf
│   │   ├── 32-gentoo-5.7.7.nox.conf
│   │   ├── 34-gentoo-5.7.7.nonet.conf
│   │   ├── 40-gentoo-5.4.48.conf
│   │   ├── 42-gentoo-5.4.48.nox.conf
│   │   └── 44-gentoo-5.4.48.nonet.conf
│   ├── loader.conf
│   └── random-seed
├── System.map-5.4.48-gentoo
├── System.map-5.4.48-gentoo-rescue
├── System.map-5.7.6-gentoo
├── System.map-5.7.7-gentoo
├── vmlinuz-5.4.48-gentoo
├── vmlinuz-5.4.48-gentoo-rescue
├── vmlinuz-5.7.6-gentoo
└── vmlinuz-5.7.7-gentoo

# bootctl status
--->8
Default Boot Loader Entry:
        title: Gentoo 5.4.48 (No network)
           id: 44-gentoo-5.4.48.nonet.conf
--->8

44-gentoo-5.4.48.nonet.conf is the last entry in /boot/loader/entries.

Man bootctl says:
set-default ID, set-oneshot ID
     Sets the default boot loader entry. Takes a single boot loader entry ID
     string as argument...

But then,
# bootctl set-default 30-gentoo-5.7.7.conf
Failed to update EFI variable: Invalid argument

...in spite of this:
# cat /boot/loader/entries/30-gentoo-5.7.7.conf
title Gentoo 5.7.7
version 5.7.7-gentoo
linux vmlinuz-5.7.7-gentoo
initrd=intel-uc.img
options root=/dev/nvme0n1p4 net.ifnames=0 raid=noautodetect

...and this:
# mount | grep efi
efivarfs on /sys/firmware/efi/efivars type efivarfs 
(rw,nosuid,nodev,noexec,relatime)

I've also tried telling efibootmgr to set the default.

# efibootmgr
BootNext: 0007
BootCurrent: 0007
Timeout: 2 seconds
BootOrder: 000B,0007,0006,0000,000C,000D
Boot0000* Windows Boot Manager
Boot0006* UEFI OS
Boot0007* Linux Boot Manager
Boot000B* CD/DVD Drive 
Boot000C* Hard Drive 
Boot000D* Removable Drive 

Efibootmgr -n 7 seems to make no difference, as expected, but:
# efibootmgr -N 7
Boot entry 0001 does not exist
# cat /boot/loader/loader.conf
default 30-gentoo-5.7.7

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-03 20:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-02 10:56 [gentoo-user] EFI booting problem - understanding it Peter Humphrey
2020-07-03  2:05 ` Andrew Udvare
2020-07-03  8:36   ` Michael
2020-07-03 14:52   ` Peter Humphrey
2020-07-03 20:57     ` Sid Spry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox