Sample Header Ad - 728x90

How to make a common /boot partition for multiple linux distros?

2 votes
0 answers
1803 views
I'm trying to multiboot windows along with two linux distros namely Parrot OS Electro Ara and Ubuntu 20.04 and grub and bootloader was initially installed by Parrot OS. So to not interfere that I installed Ubuntu without bootloader i.e. by
-b
because I just want to use the grub of Parrot itself. But I used the same **/boot** partition (
/dev/nvme0n1p9
) as mountpoint for both OS. Here are my mount points from Parrot OS by
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 953.9G 0 disk ├─nvme0n1p1 259:1 0 260M 0 part /boot/efi ├─(windows partitions were hided) ├─nvme0n1p7 259:7 0 200M 0 part ├─nvme0n1p8 259:8 0 4G 0 part [SWAP] ├─nvme0n1p9 259:9 0 1G 0 part /boot ├─nvme0n1p10 259:10 0 20G 0 part / ├─nvme0n1p11 259:11 0 40G 0 part /opt ├─nvme0n1p12 259:12 0 40G 0 part │ └─luks-...(UUID Hided) 253:0 0 40G 0 crypt /home └─nvme0n1p15 259:15 0 47.4G 0 part Note: I had shared same
/opt
and
/boot
(efi partition is shared by default) I'm getting a message like ubuntu was detected on the /dev/nvme0n1p15 but when I see the source code or boot from grub screen it points me directly to parrot OS. The thing is parrot OS was booted by initramfs and vmlinuz file of ubuntu and it got booted into parrot without a problem. Similarly when I tried
-grub
from ubuntu I says parrot OS but still it uses kernels (5.16 and 5.18) of Parrot OS to boot into ubuntu due to which I got errors due to initramfs but no error when I boot from its kernel 5.15. Here is my grub-customizer page to show how it looks like. (The custom ones are I made them to boot temporarily into Ubuntu image). enter image description here Here I also attach the files that were present in the
/boot
folder before installing, after installing ubuntu and after running update-grub. **Before installing Ubuntu (only Parrot and Windows)** config-5.16.0-12parrot1-amd64 config-5.18.0-1parrot1-amd64 efi grub initrd.img-5.16.0-12parrot1-amd64 initrd.img-5.18.0-1parrot1-amd64 System.map-5.16.0-12parrot1-amd64 System.map-5.18.0-1parrot1-amd64 vmlinuz-5.16.0-12parrot1-amd64 vmlinuz-5.18.0-1parrot1-amd64 **After installing ubuntu and running update grub from it by chrooting** total 256M drwxr-xr-x 2 root root 4.0K செப். 20 16:36 efi drwxr-xr-x 5 root root 4.0K செப். 20 16:36 grub lrwxrwxrwx 1 root root 28 செப். 20 16:36 initrd.img -> initrd.img-5.15.0-46-generic -rw-r--r-- 1 root root 117M செப். 20 16:36 initrd.img-5.15.0-46-generic -rwxr-xr-x 1 root root 94M செப். 20 16:36 initrd.img-5.16.0-12parrot1-amd64 -rw-r--r-- 1 root root 14M செப். 20 16:36 initrd.img-5.18.0-1parrot1-amd64 lrwxrwxrwx 1 root root 32 செப். 20 16:36 initrd.img.old -> initrd.img-5.18.0-1parrot1-amd64 -rw-r--r-- 1 root root 179K செப். 20 16:36 memtest86+.bin -rw-r--r-- 1 root root 181K செப். 20 16:36 memtest86+.elf -rw-r--r-- 1 root root 181K செப். 20 16:36 memtest86+_multiboot.bin -rw------- 1 root root 6.0M செப். 20 16:36 System.map-5.15.0-46-generic -rwxr-xr-x 1 root root 83 செப். 20 16:36 System.map-5.16.0-12parrot1-amd64 -rwxr-xr-x 1 root root 83 செப். 20 16:36 System.map-5.18.0-1parrot1-amd64 lrwxrwxrwx 1 root root 25 செப். 20 16:36 vmlinuz -> vmlinuz-5.15.0-46-generic -rw-r--r-- 1 root root 11M செப். 20 16:36 vmlinuz-5.15.0-46-generic -rwxr-xr-x 1 root root 7.1M செப். 20 16:36 vmlinuz-5.16.0-12parrot1-amd64 -rwxr-xr-x 1 root root 7.2M செப். 20 16:36 vmlinuz-5.18.0-1parrot1-amd64 **Finally running update-grub from Parrot OS and removed symlinks** config-5.16.0-12parrot1-amd64 config-5.18.0-1parrot1-amd64 efi grub initrd.img-5.15.0-46-generic initrd.img-5.16.0-12parrot1-amd64 initrd.img-5.18.0-1parrot1-amd64 memtest86+.bin memtest86+.elf memtest86+_multiboot.bin System.map-5.15.0-46-generic System.map-5.16.0-12parrot1-amd64 System.map-5.18.0-1parrot1-amd64 vmlinuz-5.15.0-46-generic vmlinuz-5.16.0-12parrot1-amd64 vmlinuz-5.18.0-1parrot1-amd64 The solution I'm wanting is to have grub boot options like - Parrot - Advance options for Parrot - Ubuntu - Advance options for Ubuntu - Windows Thanks in advance for the help.
Asked by Ganishk D (21 rep)
Sep 20, 2022, 06:07 PM
Last activity: Oct 13, 2023, 12:28 AM