In the instructions for configuring an EFI system partition in Arch Linux, it reads as follows:

mount ESP to /boot. This is the preferred method when directly booting a EFISTUB kernel from UEFI.

I don't understand how I can mount a partition when the system hasn't booted yet. It seems like a chicken and egg problem. You need to mount the partition for the UEFI to use it to boot Linux, but I can't mount anything until I have Linux booted. Note that the instructions specifically imply that EFISTUB can boot from the EFI partition without having to copy boot files to the EFI partition:

If you do not use one of the simple methods from #Mount the partition, you will need to copy your boot files to ESP

  • during installation you can do that. when you are creating partitions. – BlackCrystal Dec 4 '18 at 12:31

mount ESP to /boot. This is the preferred method when directly booting a EFISTUB kernel from UEFI.

This part of the instructions attempts to say something like this:

"If you choose EFISTUB as your boot method, then you'll should preferably do two things:

  • at installation time: mount ESP to the location that will be /boot in the Arch-to-be-installed before running the rest of the install procedure, so that the vmlinuz-* (and optionally initramfs) files that normally end up in /boot will automatically go to the ESP without further manual actions.
  • when core Arch installation is done: configure /etc/fstab (or any alternative mechanism of your choice) to automatically mount ESP to /boot, so that any kernel updates will also automatically end up on the ESP.

If you choose to do something else, it will be your responsibility to do whatever is required to make the necessary files end up on the ESP."

Apparently, Arch's "recommended procedure" actually violates the UEFI standard of placing any OS-specific files under \EFI\<OS name> within the ESP, and places the EFISTUB-equipped kernel (and optionally the initramfs file) to the root directory of the ESP instead. However, it minimizes the possibly of errors caused by the firmware ESP filesystem driver being unexpectedly case-sensitive, for example. So I can see why they've made that choice.

The chapter "Alternative mount points" then describes a number of techniques you could use if you want to use the UEFI standard paths on the ESP, and/or mount the ESP to some different location, or to keep it unmounted by default. The options are presented as a list including bind mounts and various event systems and/or scripting hooks, without explicitly describing why each solution would be applicable to a particular situation.

Basically, the Arch wiki page on EFI system partition, as it exists at the time of this writing, would be very useful to someone who already understands how UEFI and EFISTUB work, but very confusing for a beginner that doesn't necessarily have a clue what to do and how various things depend on each other. I'm not surprised about that: just listing a number of tricks applicable under a certain topic is much easier than writing a good document that introduces new concepts and dependencies between them.

| improve this answer | |
  • Hmm, ok, but as the question says I am specifically asking about EFISTUB, not using a bootloader. So, from your answer it would appear I have to manually copy the /boot directory of the kernel to my EFI partition every time I update the kernel, but that is not exactly clear from the instructions. – Tyler Durden Dec 4 '18 at 13:16
  • No, the update procedure typically puts the new kernel to some location under /boot by default; if you mount ESP to /boot, then the new kernel ends up in ESP automatically. If you leave the ESP unmounted or mount it somewhere else, you'll need to either copy it manually or set up your own automation to do that for you. – telcoM Dec 4 '18 at 13:19
  • You are just repeating what the question asks about: how can I "mount ESP to /boot" before the system has booted? Currently my EFI partition is completely empty so when the UEFI system on the motherboard starts, the system just hangs because it looks in the EFI partition and there is nothing there. – Tyler Durden Dec 4 '18 at 13:27
  • The instructions seem to imply that a system can be EFISTUB booted without copying files to the EFI partition, but it is not clear to me how that could possibly be. Note that the EFI partition is FAT32 which is readable by the motherboard firmware, but the root partition is generally in a journalled format, so the motherboard cannot read it normally, so even if it did get mounted I still don't see how I am stub booting without copying files. – Tyler Durden Dec 4 '18 at 13:38
  • 1
    The instructions are unclear and your theory about their implication is incorrect: you definitely have to have the files in the ESP to allow the firmware to load them. But if you mount the ESP to the location that will be /boot in the Arch-to-be-installed before running the rest of the installation procedure, then as the installation procedure will place the kernel into /boot/vmlinuz-* as usual, it will automatically end up on the ESP and so will be accessible to the firmware. Likewise with the initramfs file, if you choose to use it. Clear as mud? – telcoM Dec 4 '18 at 13:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.