Skip to content

EFISTUB skipped

I am trying to load arch with EFISTUB with

efibootmgr --disk /dev/sda --part 1 --create --label "ArchLinux" --loader /vmlinuz-linux --unicode "root=/dev/sda8 rw quiet modprobe.blacklist=pcspkr initrd=/EFI/Archlinux/intel-ucode.img initrd=/EFI/Archlinux/initramfs-linux.img" --verbose

Which created correctly the EFI entry. However it always skip EFISTUB and loads grub instead.

Esp is mounted in boot\efi so i copied the img files and vmlinuz to the correct folder as wiki recommends.

Can anybody help?

​

EDIT: Nevermind, solved. Need to change /vmlinuz-linux to /EFI/Archlinux/vmlinuz-linux.

EDIT: I have another doubt, can I move the mount point from boot/efi to boot without messing the system?

Edited 26 Apr 2019. We only hold this version.

1 points2 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
1 · 100% up
Kind
Text
ID
bhsvir

Author

10
posts
87
comments
4
media
View profile

2 comments

So, I am trying to understand your setup. I am assuming you are mounting esp to /boot/efi because that’s how you did with grub and now you ate trying to use that same mount point with efistub. Then, as you wanted to keep esp mounted to /boot/efi you followed this wiki section, and I assume that was the wiki section you mentioned.

I am guessing all this because I think I did very similar when I started using efistub. Even if it’s not what happened, let me point out some things that may help you. First, arch users typically mount esp at /boot. The reason is when you upgrade linux with pacman it will upgrade vmlinuz-linux and initramfs files under /boot by default. That way you can use efistub, as vmlinuz-linux is on the esp, wich is the partition that will be used by uefi, and then uefi will use always the upgraded kernel. So there are two important things: vmlinuz-linux and initramfs files must be under /boot so they can be easily upgraded and inside esp so firmware can se them.

That said, you can always tweak things. I think what grub does is place its own efi file under /boot/efi/EFI/grub and let the kernel an initramfs files be under /boot. As esp is mounted on /boot/efi, firmware can’t see the kernel, but it doesn’t matter since it will see grub efi file, which in turn is responsible for finding the kernel in the appropriate partition.

All that said, I recommend you keep things simple. If you want to use efistub with esp under /boot/efi, it will require you to tweak things to keep kernel updated, as described on the wiki page I linked. I never did this, but is more work than needed. As I mentioned earlier, the easiest way is to keep esp under /boot so everything works out of the box.

Well, then you asked how to change esp to /boot. I think you only need to change /etc/fstab to tell your system to mount esp under /boot. Of course, now you need to make sure your kernel an initramfs files are on the esp. So before rebooting, copy them to the esp. If I understood your setup well you only need to run:

# cp -a /boot/vmlinuz-linux /boot/efi

And the same for the other files (initramfs* and intel-ucode). And finally adapt the efibootmgr command to these changes.

Your esp will now have the files you just copied and an EFI directory. If you don’t have dual boot and if you don’t plan using grub again just nuke this directory and keep only the files.

And a last important comment: if your system doesn’t boot after those changes don’t panic! Just get an arch live usb and fix what you need.

2 points

Yes. Everything you said is correct. I am now able to boot with efistub with esp mounted in boot/efi. On every update I will have to copy the initramfs* files again into the boot/efi directory. Minor thing. That's why I would like to mount esp on /boot to avoid copying files.

I thought changing the mountpoint from /boot/efi to /boot would be more complicated than just modifying the fstab. As you described, it is very simple.

I mounted esp on boot/efi due to dual-boot, now I want to revert that and have a single arch boot.

Thanks for the comments!

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.