I would like to be sure that what I would like to do is correct. I have a laptop with 1TB SDD and as OSes Windows 11 and Fedora 41. Windows 11 has around 250GB while Fedora 41 has the rest. Fedora 41 is fully encrypted with LUKS
I would like to shrink the space occupied by Fedora by, let’s say, 50GB, and install Debian (or Ubuntu or Mint) there.
lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
zram0 252:0 0 8G 0 disk [SWAP]
nvme0n1 259:0 0 953,9G 0 disk
├─nvme0n1p1 259:1 0 100M 0 part /boot/efi
├─nvme0n1p2 259:2 0 16M 0 part
├─nvme0n1p3 259:3 0 239,4G 0 part
├─nvme0n1p4 259:4 0 738M 0 part
├─nvme0n1p5 259:5 0 1G 0 part /boot
├─nvme0n1p6 259:6 0 712,2G 0 part
│ └─luks-a895c3dd-3dc4-49ec-96af-bf0eea29b19c
│ 253:0 0 712,1G 0 crypt /home
│ /
└─nvme0n1p7 259:7 0 509M 0 part
How should I do that? My plan is:
Boot the LIVE USB, open Gparted and edit the partitions by shrinking one (which?) and creating free space.
Reboot to see if everything is working. Go back in LIVE USB and install Debian in the free space. I think I must select manual and then create partitions by myself?
Done?
In this scenario, what my GRUB2 will do? Will Debian overwrite it with its own GRUB2? And then shall I update GRUB2 from Fedora only and not from Debian or viceversa?
Thanks for anyone who is willing to clarify things out for me.
The partition that appears to contain fedora is nvme0n1p6. That would be the partition to shrink. I think that gparted can manage shrinking it and making the adjustments to encryption as well as the file system but it will require that the luks partition be unlocked before trying to do so.
Installing debian will tend to take control of grub, and may not show windows or fedora as boot options. AFAIK debian uses grub while fedora uses grub2 so there should be nothing overwritten, merely added.
After installation, to be certain that there are no conflicts with grub you should always only update grub from one linux OS. I would use fedora for that purpose.
You could allow debian to use the same efi partition since it would create its own sub-directory there. After installation you probably will need to boot fedora from the live image and update grub within the chroot environment with the grub2-mkconfig -o /boot/grub2/grub.cfg command so that fedora grub once again has control
For a few years, anaconda REQUIRED permission to format both ‘/’ and ‘/boot/efi/’ partitions when installing Fedora which makes sharing a ‘boot/efi’ partition particularly RISKY. A safe way to configure a SSD for Windows and Linux multi-boot follows:
Boot a Fedora Live USB, then dnf install -y gparted
Use gparted to create a GPT partition
Use gparted to first create and format a single whole disk sized ext4 partition
Mount then fstrim that partition before deleting it.
The steps above will cause the underlying NMVe firmware to view itself as empty.
If you don’t follow these steps disk amplification will occur each time the underlying hardware makes space to replace existing data with new.
Install Windows and verify correct operation
Use gparted to create a separate 90 Mb ‘boot/efi’ partition in the remaining space for each distro than you plan to install. It will be helpful at install time if you have labeled each ‘boot/efi’ partition because anaconda will permit you to use any empty partition that is large enough.
Install a distro and verify correct operation before installing the next.
In all my years using fedora (since Fedora Core 1) I have never seen a time when formatting of /boot/efi/ was ever required. Doing so would prevent dual booting in many cases and this AFAIK was never “required”.
The rest of your comments are also misleading since the OP already has both windows and fedora dual booting on a single drive. The ONLY thing required to install debian for triple booting is to allocate enough free space to perform the install. He does not need to remove anything, but only shrink the fedora btrfs (encrypted) partition sufficiently to allow free space to install debian.
Thanks all for the inputs. So since Debian also uses GRUB2 would be there any conflicts?
In this scenario would rEFInd boot manager be a good option to handle all this so I don’t rely on GRUB2? Or this rEFInd is purely a graphical change?
And another consideration: Am I correct thinking that the best solution would be create EFI partitions for every OS I install, so that with BIOS boot manager I choose which one to run and there is no potential conflicts with GRUB2 of Fedora, of Debian and the occasionally Windows update that breakes EFI?
Most dual-boot guides do not consider creating a separate EFI partition for each OS, btw.
I am not sure if I must clean-install everything to do that or I can manage to move the fedora (or windows) boot files into another newly created EFI partition. They will probably complain, though.
No idea if multiple EFI partitions will work (if it does do let us know!) but, at least in my experience, rEFInd is the best solution for this kind of setup. You will probably run into the classic situation of Fedora’s grub not recognising debian and vice versa - while there are other ways to solve this, I have never found a solution anywhere near as easy as refind.
No, it allows you to boot using the sort of bootloader built into the linux kernel, so that grub isn’t involved at all.
Grouping all efi partitions before other partition types makes it easier for me to get a visual picture of the disk layout but this is usually not required.
If your disk is in good shape, gparted will be able to move partitions around to suit your needs. However, just like the dd utility, it will NOT alert you when writing to a flakey destination.
The only way that I found out that my Samsung SATA SSD was flakey was after using dd to “successfully” backup an NMVe partition followed by using Scooter Software’s beyond compare utility to compare source and destination partitions. Each time I did these things, beyond compare indicated different errors. During the last decade of using beyond compare, I have never experienced false errors. One more data point; when I did the same things using a different SATA SSD no errors were indicated.
Not all grub2’s are created equal, and the Fedora grub2 has special features that the other grub2’s don’t have. Also, the shim’s are different as for example Fedoras shim doesn’t contain the signing key for debians kernel, and vice versa.
I used triple booted Windows 10, Mint and Fedora 40 for a year. Both Mint and Fedora 40 were encrypted. Windows 10 was detected by both Mint and Fedora 40 but these distros doesn’t detect each other idk whether its due to encryption or not. Got bad shim error in Mint as a bonus and there were no other issues.
Ok I will try during the next weeks. I boot a live usb with gparted and shrink a partition to make room for Debian. Then I install refind and check if it works. Then I install debian on the free space.
After debian installation Refind may not survive, hence I would need to boot either into fedora, debian or win11 to reinstall refind, correct?