You are not logged in.

#1 2020-01-20 22:46:00

maboleth
Member
Registered: 2020-01-03
Posts: 220

[solved] Messing with UEFI (reorganizing, wanting to use efistab...)

Since I wanted to get rid of the windows sub partitions, everything... I deleted efi partition too. I have made a backup of everything there however.

Anyway, I recreated and formatted efi drive with gparted. It has a boot esp flag.


I want to get rid of grub2 and menus. I want to use efistab.

But when I want to create new boot entry with efibootmgr I get this

sudo efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=PARTUUID=c236c5e1-38f5-4cd1-8ac8-9b08d086d113 rw initrd=\amd-ucode.img initrd=\initramfs-linux.img' --verbose
Could not prepare Boot variable: Input/output error

What am I doing wrong?

Last edited by maboleth (2020-01-21 02:09:32)

Offline

#2 2020-01-21 02:10:00

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

I needed to reboot and also re-installed grub. It's much more user-friendly and foolproof.

Last edited by maboleth (2020-01-21 02:10:10)

Offline

#3 2020-01-21 11:30:35

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

For the benefit of anybody else who has this problem:

maboleth wrote:
sudo efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=PARTUUID=c236c5e1-38f5-4cd1-8ac8-9b08d086d113 rw initrd=\amd-ucode.img initrd=\initramfs-linux.img' --verbose
Could not prepare Boot variable: Input/output error

Check if efivarfs is mounted rw:

grep efivarfs /proc/self/mounts

https://wiki.archlinux.org/index.php/Un … le_support

maboleth wrote:

I needed to reboot and also re-installed grub

That's not a solution, it's a workaround wink

Offline

#4 2020-01-23 02:24:00

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

Head_on_a_Stick wrote:

For the benefit of anybody else who has this problem:

maboleth wrote:
sudo efibootmgr --disk /dev/nvme0n1 --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=PARTUUID=c236c5e1-38f5-4cd1-8ac8-9b08d086d113 rw initrd=\amd-ucode.img initrd=\initramfs-linux.img' --verbose
Could not prepare Boot variable: Input/output error

Check if efivarfs is mounted rw:

grep efivarfs /proc/self/mounts

https://wiki.archlinux.org/index.php/Un … le_support

maboleth wrote:

I needed to reboot and also re-installed grub

That's not a solution, it's a workaround wink

I agree, but I read that efistab is not faster at all, nor is more maintenance friendly. At best, people said grub=efistab. So I opted for (far) easier solution that worked out of the box. I also disabled menu in GRUB (since there's no Windows10 anymore) and loading of Arch is mostly an instant.

If it is possible to test efistab WITH grub installed (like bypassing it), please tell me how, curious to see.

The above problem with efi manager resolved itself when I restarted the machine. Before that I couldn't create or delete anything with efibootmgr.

Offline

#5 2020-01-23 10:19:33

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

maboleth wrote:

If it is possible to test efistab WITH grub installed (like bypassing it)

Yes, just have separate NVRAM entries for GRUB and EFI_STUB.

Offline

#6 2020-01-23 11:16:51

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

Well, my MB keeps deleting boot entries after restart. Or adding them if deleted. It all comes down to whether or not the /efi drive has .efi files in there. If not, boot entries are auto-deleted (or vice versa).

Anyway, I will stick to grub, I see no point messing these anymore. Initializing linux kernel and firing up the GDM takes much more time (like 3 sec wink ) than grub's starting, using a fraction of a second.

Offline

#7 2020-01-23 17:30:45

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

maboleth wrote:

Well, my MB keeps deleting boot entries after restart

Yes, that is infuriatingly common.

The only way to use EFI_STUB booting (or "efistab" as you so charmingly refer to it) with such a defective motherboard is to compile a custom kernel with CONFIG_CMDLINE set to declare the root partition & initramfs locations then place the kernel image at $ESP/EFI/BOOT/bootx64.efi so that it is loaded automatically even without any NVRAM boot entries.

Offline

#8 2020-01-24 00:38:37

maboleth
Member
Registered: 2020-01-03
Posts: 220

Re: [solved] Messing with UEFI (reorganizing, wanting to use efistab...)

Well, it certainly stabbed my boot screen. ;-) Thanks for making it clearer.

"defective motherboard"... pfff... blasphemy. My MSI Tomahawk Max plans revenge. ;-P

Offline

Board footer

Powered by FluxBB