You are not logged in.

#1 2021-10-30 17:18:02

ramcourse
Member
Registered: 2021-05-23
Posts: 14

[SOLVED]efibootmgr refuses to make new boot entry

I've got a working install, booting from the EFI stub without a bootloader like grub, and I want to make a new boot entry in order to set some kernel parameters (I only installed the amd-ucode recently, and it needs to be called in the EFI incantation). I edited the command I used to make my system bootable the first time, and fed it into efibootmgr. It refuses to make the new boot entry, and gives me the cryptic error: "Could not prepare Boot variable: No such file or directory".

I already tried looking for dump files in /sys/firmware/efi/efivars/ (there were none), and I tried running efibootmgr with the --efi_no_storage_paranoia switch.

I'm running the following command:

$ sudo efibootmgr -c -d sdd -p 1 -L "Arch 202110" -l \vmlinuz-linux -u "root=LABEL=ROOT ro resume=LABEL=SWAP initrd=\amd-ucode.img initrd=\initramfs-linux.img" 

Can anybody help me to figure out what the problem is?

Last edited by ramcourse (2021-10-30 19:41:17)

Offline

#2 2021-10-30 18:17:09

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,330
Website

Re: [SOLVED]efibootmgr refuses to make new boot entry

It's not that cryptic, you're providing just names and not full paths - obviously it will not then find the device or kernel.  You're also backslash which will result in the shell interpreting it as an escaped-character/code.  Efibootmgr, as noted in the wiki, accepts forward slashes and will convert them for you to the backslashes required for EFI.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2021-10-30 19:09:49

ramcourse
Member
Registered: 2021-05-23
Posts: 14

Re: [SOLVED]efibootmgr refuses to make new boot entry

Thank you for the response.
I tried with forward slashes and with a complete path (/boot/vmlinuz-linux, for instance), but that didn't seem to make a difference:

lijster@the-cloud [SSH] ~ % sudo efibootmgr -c -d sdd -p 1 -L "Arch 202110" -l /boot/vmlinuz-linux -u "root=LABEL=ROOT ro resume=LABEL=SWAP initrd=/boot/amd-ucode.img initrd=/boot/initramfs-linux.img"
[sudo] password for lijster: 
Could not prepare Boot variable: No such file or directory
lijster@the-cloud [5] [SSH] ~ % sudo efibootmgr -c -d sdd -p 1 -L "Arch 202110" -l /vmlinuz-linux -u "root=LABEL=ROOT ro resume=LABEL=SWAP initrd=/amd-ucode.img initrd=/initramfs-linux.img" 
Could not prepare Boot variable: No such file or directory
lijster@the-cloud [5] [SSH] ~ % sudo efibootmgr -c -d sdd -p 1 -L "Arch 202110" -l \vmlinuz-linux -u "root=LABEL=ROOT ro resume=LABEL=SWAP initrd=\amd-ucode.img initrd=\initramfs-linux.img"
Could not prepare Boot variable: No such file or directory

Last edited by ramcourse (2021-10-30 19:10:08)

Offline

#4 2021-10-30 19:22:47

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED]efibootmgr refuses to make new boot entry

You changed the path passed to -l which specifies the loader not -d which specifies the disk.
See Unified_Extensible_Firmware_Interface#efibootmgr and https://man.archlinux.org/man/efibootmgr.8

Last edited by loqs (2021-10-30 19:24:12)

Offline

#5 2021-10-30 19:35:49

ramcourse
Member
Registered: 2021-05-23
Posts: 14

Re: [SOLVED]efibootmgr refuses to make new boot entry

True, but my ESP partition *is* sdd1. No issues with slashes there.

lijster@the-cloud [5] [SSH] ~ % lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
sda      8:0    0   5.5T  0 disk 
└─sda1   8:1    0   5.5T  0 part /mnt/DATA1
sdb      8:16   0   5.5T  0 disk 
└─sdb1   8:17   0   5.5T  0 part /mnt/DATA2
sdc      8:32   0   5.5T  0 disk 
└─sdc1   8:33   0   5.5T  0 part /mnt/PARITY
sdd      8:48   0 119.2G  0 disk 
├─sdd1   8:49   0   550M  0 part /boot
├─sdd2   8:50   0     4G  0 part [SWAP]
├─sdd3   8:51   0    30G  0 part /
└─sdd4   8:52   0  84.7G  0 part /home
lijster@the-cloud [SSH] ~ % 

Offline

#6 2021-10-30 19:40:55

ramcourse
Member
Registered: 2021-05-23
Posts: 14

Re: [SOLVED]efibootmgr refuses to make new boot entry

OK, solved:

I just needed to specify /dev/sdd instead of just sdd. The correct, working command turns out to be:

sudo efibootmgr -c -d /dev/sdd -p 1 -L "Arch 202110" -l \vmlinuz-linux -u "root=LABEL=ROOT ro resume=LABEL=SWAP initrd=\amd-ucode.img initrd=\initramfs-linux.img"

Thanks for the help!

Offline

#7 2021-10-30 19:42:40

loqs
Member
Registered: 2014-03-06
Posts: 18,042

Re: [SOLVED]efibootmgr refuses to make new boot entry

You were performing the command from the /dev/ directory so the device node sdd was in the working directory?
Otherwise the -d option needs to be /dev/ssd

Offline

Board footer

Powered by FluxBB