Unravelling /boot folder mistake after dual boot install

Hello,

Requirements:

I have Searched the forum for my issue and found nothing related or helpful
I have checked the Resources category (Resources Index)
I have reviewed the Wiki for relevant information
I have read the the Release Notes and Errata

OpenMandriva Lx version:

OpenMandriva Lx release 6.0 (Vanadium) Rock for x86_64
-and-
Lubunu 24.04

Desktop environment (KDE, LXQT…):

KDE Plasma 6.3.4

Description of the issue (screenshots if relevant):

I recently set up another computer with a dual-boot installation. I firstly installed OpenMandriva and in this case the second OS was Lubuntu 24.04. I have attached a screenshot below on the main drive partition layout. This is an old PC with multiple HDD’s, the second drive has a 50/50 split with a /home folder for each OS installation.
Unfortunately I had a momentary brain fade when installing Lubuntu, and instead of tagging the vfat partition as “/boot/efi”, I tagged it as “/boot”. So my vfat partition contains /boot/efi from OMA and /boot from Lubuntu. This is a problem because Lubuntu is having symlink errors with /boot being a vfat partition, I can probably just reinstall Lubuntu.
My question here is, how can I safely identify which files in that partition do NOT belong to OpenMandriva?
I want to at least attempt to fix the Lubuntu side for the learning experience, but it’s a fresh install with no content so I won’t mind if I have to scratch it and start over.

Relevant informations (hardware involved, software version, logs or output…):

On the OMA side I see:

(edit: typo)

…and on the Lubuntu side I see this:

Everything other than the ‘EFI’ directory belongs to Lubuntu. You can see that in the 2nd image in your 2nd post. On my system, /boot/efi/EFI contains the following,

[sv@cooker-x11 ~]$ sudo ls /boot/efi/EFI
BOOT openmandriva 'OpenMandriva_Lx_[GRUB]'

Do not worry about ‘OpenMandriva_Lx_[GRUB]’ if you are able to boot into OpenMandriva. You are fine on OM side.

Since, you are OK with experimenting, you could try the following. Please note, I am writing everything from memory and I could have missed a step or misspelled/mistyped a command. If something goes wrong, please don’t kill! :sweat_smile:

  • Boot into Lubuntu. Once booted, unmount the /boot partition with sudo umount /boot
  • Create ‘/boot/efi’ if it doesn’t already exist. sudo mkdir -p /boot/efi
  • Mount efi directory correctly. sudo mount /dev/sda1 /boot/efi
  • Move everything other than ‘EFI’ in /boot/efi to /boot. shopt -s extglob; sudo cd /boot/efi ; sudo mv !(EFI) ../ First part is to enable extended glob. This set should move everything inside /boot/efi except ‘EFI’ directory to its parent directory which is /boot. You could manually move each file/directory to /boot as well.
  • Now to fix permissions of files under /boot, generally permissions for directories is 755, for files is 644, except, initrd files have permission 600. You could refer to file permissions on my OM as posted below.
  • Do not forget to update your /etc/fstab and make /dev/sda1 mount on /boot/efi instead of /boot.
  • Do not forget to update initramfs and regenerate grub file. sudo update-initramfs -u; sudo update-grub

That should do. Reboot to verify.

My OM /boot directory permissions:

[sv@cooker-x11 ~]$ ls -l /boot
total 729244
lrwxrwxrwx 1 root root 45 Jul 29 08:56 config-6.16.0-desktop-1omv2590 -> ../lib/modules/6.16.
0-desktop-1omv2590/config
lrwxrwxrwx 1 root root 45 Oct 1 03:36 config-6.17.0-desktop-1omv2590 -> ../lib/modules/6.17.
0-desktop-1omv2590/config
lrwxrwxrwx 1 root root 45 Oct 15 13:44 config-6.17.2-desktop-1omv2590 -> ../lib/modules/6.17.
2-desktop-1omv2590/config
drwx------ 3 root root 4096 Jan 1 1970 efi
drwxr-xr-x 6 root root 4096 Oct 20 06:05 grub2
lrwxrwxrwx 1 root root 40 Jul 17 09:45 initrd0.img->/boot/initrd-6.15.5-desktop-2omv2590.im
g
-rw------- 1 root root 233080586 Aug 19 04:40 initrd-6.16.0-desktop-1omv2590.img
-rw------- 1 root root 234460278 Oct 5 12:38 initrd-6.17.0-desktop-1omv2590.img
-rw------- 1 root root 234503764 Oct 20 05:38 initrd-6.17.2-desktop-1omv2590.img
-rw-r--r-- 1 root root 155992 Dec 5 2024 memtest.bin
-rw-r--r-- 1 root root 157184 Dec 5 2024 memtest.efi
-rw-r--r-- 1 root root 13250560 Oct 5 23:29 microcode.img
lrwxrwxrwx 1 root root 49 Jul 29 08:56 System.map-6.16.0-desktop-1omv2590 -> ../lib/modules/6
.16.0-desktop-1omv2590/System.map
lrwxrwxrwx 1 root root 49 Oct 1 03:36 System.map-6.17.0-desktop-1omv2590 -> ../lib/modules/6
.17.0-desktop-1omv2590/System.map
lrwxrwxrwx 1 root root 49 Oct 15 13:44 System.map-6.17.2-desktop-1omv2590 -> ../lib/modules/6
.17.2-desktop-1omv2590/System.map
-rw-r--r-- 1 root root 10985472 Jul 29 08:13 vmlinuz-6.16.0-desktop-1omv2590
-rw-r--r-- 1 root root 10067968 Oct 1 02:17 vmlinuz-6.17.0-desktop-1omv2590
-rw-r--r-- 1 root root 10072064 Oct 15 11:55 vmlinuz-6.17.2-desktop-1omv2590

Good luck!

Thanks @sigvirt, that sounds like exactly what I wanted to do, including a few extra steps that I hadn’t thought of. The unmounting and remounting steps were the ones I was struggling to visualise. I like the shell option for extended globbing using !() to select “everything except (this thing)”, I didn’t know you could do that!

I’m just about to leave for work so I won’t be able to try this until I get home, but I appreciate the help and look forward to trying this later tonight.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.