You are not logged in.
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
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
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
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
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
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
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