You are not logged in.
I'm installing Arch Linux on my first new computer in almost nine years. Which means I now have the pleasure of learning all about UEFI! Yay!
But now I'm so confused.
So, by following the instructions on the Arch Wiki page, I successfully:
Created a 512 MiB partition on a new drive (the rest is EXT4).
Formatted it to FAT32.
Set the flags to "boot" and "esp".
I plan to use EFISTUB.
I kind of get the hint that the ESP is supposed to have a very specific directory structure. My main question is... How is that directory structure created? Just "mkdir"?
Is this information in the Arch Wiki somewhere?
Thank you!
Last edited by drcouzelis (2017-05-02 13:51:20)
Offline
There's not really a specific dir structure needed. If you need a default loader (like when telling the firmware to just boot from this drive without an NVRAM entry), it's in /EFI/Boot/, but that's about it.
Offline
Ok... So I guess I'll just generally follow what's here, and plan to do this:
Mount the ESP to "/esp".
"mkdir -p /esp/EFI/arch
Bind mount "/esp/EFI/arch" to "/boot" in "/etc/fstab", so Arch Linux will just treat it like the place to keep my Linux kernel installation.
Tell my motherboard... something?
Does that look right? Sorry, I'm just kinda freaking out because I want to try to get it right the first time!
Offline
Yeah, that will work fine. Usually easier to just mount the ESP to /boot, but I can understand wanting to keep distros separate.
Offline
If mother-board does not have a bootloader determined it searches automatically for: $esp/efi/boot/bootx64.efi
Maybe this would be the next step?
https://wiki.archlinux.org/index.php/systemd-boot
Edit:
To select what to launch there will be options to chose in the mother board's UEFI(BIOS).
Edit2:
It will look in the ESP partition for EFI executables.
Last edited by Alber (2017-04-29 16:13:03)
Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.
Offline
Yeah, that will work fine. Usually easier to just mount the ESP to /boot, but I can understand wanting to keep distros separate.
That's all I need to do??? I guess that makes sense... If the directory structure doesn't even matter, and I only plan on having Arch Linux installed, then I will just mount the ESP to "/boot" and get on with my life.
Offline
Yep, mount it to /boot and add the NVRAM entry, nothing more to it. People overcomplicate UEFI; all it really does is look at the NVRAM entries (similar to bootloader entries you're familiar with) and run the executable it finds there with the arguments given.
Offline
Ok, I'm making "progress"... and also going insane.
I "add the NVRAM entry" by using "efibootmgr", correct? And I can only do that if my computer has already been started using EFI, correct?
So, I threw the latest Arch Linux ISO onto a USB drive, started my computer in a live Arch Linux environment using EFI, and used these "efibootmgr" instructions and used this command:
efibootmgr -d /dev/nvme0n1 -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/nvme0n1p2 rw initrd=/initramfs-linux.img"
I then verify the change with this command:
efibootmgr
And I see my entry for "Arch Linux". I then reboot and...
The entry for Arch Linux is now gone.
Is there something obvious I'm doing wrong??
Offline
If it's there, then not there, it sounds like your system firmware just sucks. Unfortunately, not an uncommon situation. You likely won't be able to set things up the way you're wanting to; I would suggest systemd-boot. It's a simple menu that just runs other UEFI executables, so instead of just running the kernel, you'll run this which will then run the kernel. The advantage is that it will install itself as the default UEFI loader, so it will hopefully boot. If it doesn't and your firmware is hard-coded to look for the Windows loader, you can also copy the systemd-boot executable to that location.
THIS is what makes UEFI complicated, horrible firmware.
Offline
Some UEFI also only allow new entries to be added from their own interface, so looking through your UEFI menu for an option add new entries might also be a possibility.
Offline
The issue is solved!
I decided to use systemd-boot "bootctl", and everyone is right, it really is super simple.
One strange thing is, after I used bootctl and successfully booted using UEFI, what did I find? My original EFISTUB Arch Linux entry in UEFI! Whatever. It was so easy and simple to use bootctl, I decided to stick with it and just remove the old entry for EFISTUB.
Anyway, I'm now booting a fresh Arch Linux installation using UEFI on my new NVMe drive, and it is FAST!
Thank you, everyone!
Offline