Can I install Ubuntu and Fedora on the same volume group of LVM. I wanted to do this as I could extend or compress a logical volume in a volume group and share the space with others.
I was going to have separate root and home logical volumes for both these operating system. And wanted to share boot partition, a logical volume for Data.
Any suggestions? Is it even possible to install like this if I could choose the logical volumes while installing?
Steps that I think I should follow. Please correct me if I am wrong somewhere:
- Insert Ubuntu USB Stick and Try Ubuntu
- In terminal create following partitions:
DEV="/dev/nvme0n1" # sgdisk --new=1:0:+768M $DEV # sgdisk --new=2:0:+768M $DEV # sgdisk --new=3:0:+2M $DEV # sgdisk --new=4:0:+128M $DEV # sgdisk --new=5:0:0 $DEV # sgdisk --typecode=1:8301 \ --typecode=2:8301 \ --typecode=3:ef02 \ --typecode=4:ef00 \ --typecode=5:8301 $DEV # sgdisk --change-name=1:BootUbuntu \ --change-name=2:BootFedora \ --change-name=3:GRUB \ --change-name=4:EFI-SP \ --change-name=5:rootfs $DEV
- Encrypt the rootfs Partition using LUKS
- LUKS open the encrypted partition
- In rootfs partition, create a volume group in the partition and following logical volumes
- Install Ubuntu using the Ubuntu GUI installer and choose the logical volumes UbuntuRoot, UbuntuHome, Swap and partitions: EFI, BootUbuntu. And Reboot.
- Insert Fedora USB Stick and try Fedora
- Open the LUKS encrypted partition rootfs
- Install Fedora using the Fedora GUI Installer (Anaconda) and choose the logical volumes FedoraRoot, FedoraHome, Swap and partitions: EFI, BootFedora. And Reboot.
- Boot normally and hope that grub would give us option to choose between Fedora or Ubuntu.
I tool the partitioning scheme from Full_Disk_Encryption_Howto_2019 - Community Help Wiki. I don't want to encrypt the boot partition and just the partition that contains Volume group with all logical volumes.
- In the above link, I don't know how to modify
sgdisk --hybrid 1:2:3 $DEVfor my use case. Can you please suggest how to modify this? And if I am doing the steps correctly?
- After selecting Operating system will I be able to enter the passphrase to unlock the rootfs?