You are not logged in.

#1 2022-02-25 13:45:18

alnexus
Member
Registered: 2022-02-09
Posts: 20

How do I prevent getting "couldn't mount /boot/EFI"?

Yesterday I installed Arch Linux on my other PC and I ran sudo pacman -Syu to upgrade the system so that I could install xorg-server (if I didn't, it couldn't find the "mesa" package install thing, like no mirrors available). After I rebooted my PC I got "emergency mode, couldn't mount /boot/EFI" or something like that. I dunno what happened but apparently it was because I ran "sudo pacman -Syu". Is it normal for this to happen? Do I have to do something to prevent it? I'm running UEFI and I tried copying the 3 files from "/boot" to "/boot/efi/EFI/arch" yesterday but it didn't work so I reinstalled today.

If what happened yesterday isn't normal then I might have an explanation, maybe it's because I installed Arch and mounted the EFI partition (dev/sda1) to just "/boot" and installed it normally, but post install I edited the fstab file and changed the mount point to "/boot/EFI", though I'm not sure if that's why because it worked fine after I rebooted and only had the issue after a post upgrade reboot.

Do I have to do anything before using pacman -Syu on my UEFI system?


uname -r

Offline

#2 2022-02-25 13:51:17

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,292

Re: How do I prevent getting "couldn't mount /boot/EFI"?

alnexus wrote:

If what happened yesterday isn't normal then I might have an explanation, maybe it's because I installed Arch and mounted the EFI partition (dev/sda1) to just "/boot" and installed it normally, but post install I edited the fstab file and changed the mount point to "/boot/EFI", though I'm not sure if that's why because it worked fine after I rebooted and only had the issue after a post upgrade reboot.

That will definitely be the cause. If you configured your boot loader to run on the assumption that your ESP is on /boot and then you change that without doing anything else then the kernel you have on the ESP will diverge from what you have on /boot (which now is a directory on / and not a partition mount point), you either need to change that back or fix your bootloader configuration (or configure your mkinitcpio presets to drop kernels into /boot/EFI rather than /boot)

What boot loader and which config are you using?

From

I'm running UEFI and I tried copying the 3 files from "/boot" to "/boot/efi/EFI/arch"

I'm assuming systemd-boot, from that perspective you should've moved the contents under /boot into /boot/efi (no other subdirectory, so you are back on the "root" of your ESP)

Last edited by V1del (2022-02-25 13:53:09)

Offline

#3 2022-02-25 14:05:49

alnexus
Member
Registered: 2022-02-09
Posts: 20

Re: How do I prevent getting "couldn't mount /boot/EFI"?

I already reinstalled Arch Linux so I can't exactly say what files I copied, but it was something like vmlinuz, initramfs and initramfs fallback. The boot loader is GRUB and about the config, what config exactly? The grub config file I created with grub-mkconfig?

Though I think I'm fine with using pacman -Syu now. Thanks for your explanation, it cleared things up for me and I now understand what went wrong. Since the issue was editing fstab and it won't happen if I don't mess up, then I think that the question is answered and I can upgrade. Thanks a lot!


uname -r

Offline

#4 2022-02-25 14:26:29

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,292

Re: How do I prevent getting "couldn't mount /boot/EFI"?

With GRUB all you would have had to do is reconfigure GRUB. grub-mkconfig generates a config based on the kernel images it found, if you installed it with the ESP mounted differently then the identifiers in the config would've been different to fix that all you'd have had to do would be a

grub-mkconfig -o /boot/efi/grub/grub.cfg 

to generate a new config looking for the new kernel module locations.

But in any case, had you copied the files from /boot to their same logical location under /boot/efi it would've worked without that as well.

Last edited by V1del (2022-02-25 14:28:10)

Offline

Board footer

Powered by FluxBB