I have a computer with 2 storage devices.
I would like to have Windows on one and Linux on the other.
For a variety of reasons, I want them as separate as possible.
I'm using UEFI.
I installed Kubuntu on one device, during the setup, I specified it should be used for the bootloader installation.
But it turns out it has not been. Boot loader has been written to another device.
I've mounted the ESP partition from the other device, copied its content to the ESP partition of the device Kubuntu is installed on, rebooted, in the firmware boot manager, I chose to boot from it, it worked.
Now using mount, I see the /boot/efi is still pointing to the ESP partition on the other device.
I looked at /etc/fstab, it's got one line for /boot/efi, which indicates UUID=931B-CB7F . This UUID doesn't match any of the 2 ESP partition GUID, nor anything returned by blkid.
How can I have /boot/efi point to the ESP partition on the same device as KUbuntu is installed on?
fstab:
/dev/mapper/vg0-root / ext4 errors=remount-ro 0 1
# /boot was on /dev/nvme1n1p1 during installation UUID=df5a10ea-a128-4c35-82f6-207493d101da /boot ext4 defaults 0 2
# /boot/efi was on /dev/nvme0n1p2 during installation
#UUID=931B-CB7F /boot/efi vfat umask=0077 0 1
/dev/mapper/vg0-home /home ext4 defaults 0 2
/dev/mapper/vg0-swap none swap sw 0 0
lsblk -f | grep -v loop:
NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
sda
nvme0n1
├─nvme0n1p1
└─nvme0n1p2 ntfs 0E68C51168C4F88B 877.3G 6% /media/xlp-admin/0E68C51168C4F88B
nvme1n1
├─nvme1n1p1 ext4 1.0 df5a10ea-a128-4c35-82f6-207493d101da 1.5G 13% /boot
├─nvme1n1p2 vfat FAT32 423D-2695
└─nvme1n1p3 crypto_LUKS 2 1fc50d65-62f7-4513-bbf8-0002ae52b6b2
└─nvme1n1p3_crypt LVM2_member LVM2 001 GNoW1G-nfU6-2yuG-MH2O-QGiC-0wmE-ONHQv8
├─vg0-swap swap 1 6dfe2158-b779-47b6-83c3-cc2df4474ec0 [SWAP]
├─vg0-root ext4 1.0 b937a6a3-c62d-445a-9709-348a27a79b57 36.1G 21% /
└─vg0-home ext4 1.0 d86b3683-d330-4eaf-a278-d82c34a3685f 849.7G 0% /home
In the meantime, I have installed Windows on the other device. Windows decided to put its bootloader on the Linux device, and while at it, removed the Linux bootloader. I had made a copy before and restored it.
But in the process, Windows having failed to install on the other device ESP, I removed it hoping Windows would just create another on the same device.
That lead to Linux not booting anymore, so I commented it out in fstab.