You are not logged in.

#1 2024-12-31 14:15:00

linuxghost
Member
Registered: 2017-06-16
Posts: 23

[SOLVED]how to migrate from /boot to /boot/efi in (Windows/arch)

Happy New Year!
Set up a new laptop where Windows was pre-installed.
It has a ESP partition of 256Mb.
With a guided install for dual boot I installed Arch.
The mistake I made was that I mounted the ESP partition to /boot instead of /boot/efi ...
Worked OK for a while until the first kernel update.
So now the /boot partition is full (not in the least for windows to put FSCK.REC in there...)
Only the initramfs-linux-fallback.img in /boot (on the ESP) is complete so fortunately I can still boot Arch.
How can I correct this mistake?
Apart from a new Arch installation?

So it seems this time I can't solve the grub issue on a live system?

Last edited by linuxghost (2025-01-09 10:51:40)


___________________________o00o_Ꝏ_o00o_______________________

                           Chaos always wins because it is better organised.

Offline

#2 2024-12-31 17:03:52

Awebb
Member
Registered: 2010-05-06
Posts: 6,672

Re: [SOLVED]how to migrate from /boot to /boot/efi in (Windows/arch)

Boot from the installer, fix your mount points, arch-chroot into the Arch root, regenerate your kernel image (wiki: mkinitcpio), fix your /etc/fstab or whatever method you're using (manually or with genfstab), clean up your ESP of kernel remnants, and possibly fix anything wrong with the bootloader (just in case).

As long as you have a bootable installer at hand, you'll probably never really need to fully reinstall.

Make sure to be extra careful in case you're using any sort of full disk encryption that you don't discard any keys or anything otherwise important.

EDIT: To be clear, you could probably fix this from your running system, I think neither/boot nor the ESP strictly need to be mounted all the time, but fixing things from the installer is just less prone to catastrophic noob errors and temporary lapses in attention.

Last edited by Awebb (2024-12-31 17:07:18)

Offline

#3 2024-12-31 17:24:27

cryptearth
Member
Registered: 2024-02-03
Posts: 1,171

Re: [SOLVED]how to migrate from /boot to /boot/efi in (Windows/arch)

although awebb already pointed out a good rescue idea using an install media it can be done from a running system - which is pretty much the same as using chroot from any other boot media
/boot doesn't need to be mounted all the time - only when mkinitcpio or kernel-install is run - same goes for (/boot)/efi which only has to be mounted when there's an update to the bootloader or its config (for grub if you have it, its files and config installed on it via the --boot-directory= option - which when not give defaults to /boot)
as for cleaning up the esp that's easy: you can safely delete everything that's not <ESP>/EFI/Microsoft
also use efibootmgr to clean a maybe affected boot entry which may require update
you could also just disable the generation of the fallback initrd as kernel+microcode+initrd all sum up to about 60mb - which along the about 25mb for the windows stuff should all fit even on a regular 100mb size esp

Offline

#4 2025-01-01 10:05:14

linuxghost
Member
Registered: 2017-06-16
Posts: 23

Re: [SOLVED]how to migrate from /boot to /boot/efi in (Windows/arch)

Awebb wrote:

Boot from the installer, fix your mount points, arch-chroot into the Arch root, regenerate your kernel image (wiki: mkinitcpio), fix your /etc/fstab or whatever method you're using (manually or with genfstab), clean up your ESP of kernel remnants, and possibly fix anything wrong with the bootloader (just in case).

Thank you for your fast answer. It painted a clear picture of the sketch I had in mind.
Two questions, just to be clear;
Is changing fstab /boot to /boot/efi enough?
After umount /boot, should I manually create the boot directory on root?


___________________________o00o_Ꝏ_o00o_______________________

                           Chaos always wins because it is better organised.

Offline

#5 2025-01-01 15:47:44

cryptearth
Member
Registered: 2024-02-03
Posts: 1,171

Re: [SOLVED]how to migrate from /boot to /boot/efi in (Windows/arch)

linuxghost wrote:

Is changing fstab /boot to /boot/efi enough?

yes, that should do the trick already

linuxghost wrote:

After umount /boot, should I manually create the boot directory on root?

well - /boot already exists - but as it was just an empty folder as a target mountpoint you have to create /boot/efi as the new target mountpoint

Offline

#6 2025-01-01 16:59:36

Awebb
Member
Registered: 2010-05-06
Posts: 6,672

Re: [SOLVED]how to migrate from /boot to /boot/efi in (Windows/arch)

To rephrase what cryptearth said: You need to create /boot/efi and change /etc/fstab. You can only mount something to an existing directory, so /boot should already exist.

Offline

Board footer

Powered by FluxBB