public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Peter Humphrey <peter@prh.myzen.co.uk>
To: gentoo-user@lists.gentoo.org
Subject: [gentoo-user] EFI booting problem - understanding it
Date: Thu, 02 Jul 2020 11:56:48 +0100	[thread overview]
Message-ID: <2538456.mvXUDI8C0e@peak> (raw)

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

             reply	other threads:[~2020-07-02 10:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-02 10:56 Peter Humphrey [this message]
2020-07-03  2:05 ` [gentoo-user] EFI booting problem - understanding it Andrew Udvare
2020-07-03  8:36   ` Michael
2020-07-03 14:52   ` Peter Humphrey
2020-07-03 20:57     ` Sid Spry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2538456.mvXUDI8C0e@peak \
    --to=peter@prh.myzen.co.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox