rhboot / efibootmgr

efibootmgr development tree
GNU General Public License v2.0
514 stars 97 forks source link

Could not set variable Boot0000: Invalid argument #138

Closed sebma closed 2 years ago

sebma commented 3 years ago

Hi, Cannot install grub on efi system because efibootmgr cannot create a new entry :

$ df /boot/efi/
Filesystem     1K-blocks  Used Available Use% Mounted on
/dev/sda1         258095 27837    230258  11% /boot/efi
$ sudo efibootmgr -v -v -c -d /dev/sda -p 1 -w -L ubuntu -l \EFI\ubuntu\shimx64.efi
Could not prepare Boot variable: Invalid argument
error trace:
 efivarfs.c:435 efivarfs_set_variable(): writing to fd 3 failed: Invalid argument
 lib.c:76 _efi_set_variable_mode(): ops->set_variable() failed: Invalid argument
 efibootmgr.c:331 make_var(): efi_set_variable failed: Invalid argument
 efibootmgr.c:341 make_var(): Could not set variable Boot0000: Invalid argument
$
hackedXD commented 2 years ago

So in Linux, \ is usually a special character. Try using - sudo efibootmgr -v -v -d /dev/sda -p 1 -L Ubuntu -l "\EFI\ubuntu\shimx64.efi"