Hello, I’m trying to perform two separate installs of Fedora on different disk partitions, however the previous time I attempted this, my original Fedora install was overwritten in grub and I couldn’t figure out how to restore it. What is the proper way to go about this?
Doing this is going to be technicaly hard and will take a few attempts to get right I suspect.
Why do you need to do this?
Can you install Fedora once and then for your second instance use a VM running under the first install? That would be far easier to setup.
I find it useful for troubleshooting/disaster-recovery to have Fedora on an external USB3 drive (but do have to disable secure boot). You can add boot entry using /etc/grub.d/40_custom
:
#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Boot from USB Drive" {
set root=UUID=<UUID>
linux /vmlinuz root=/<UUID> ro
initrd /initrd.img
}
This should also work for a second install on an internal partition, but as you found, the installer doesn’t support this. You could install to an external drive or even a USB key, then clone the “boot” and “root” partitions to your internal drive.
I think grub uses UUID’s, so you could change the names to minimize potential confusion.
The main issue I see is that grub automatically uses an existing efi partition on the drive it is installing to. That means the last fedora version installed will always overwrite the content of /boot/efi/EFI/fedora from the first installation and makes it very difficult to have two fedora installations on the same drive. One would have to (at the very least) do a custom installation and create a new /boot and /boot/efi partition for the second installation. Then it would also be necessary to manually select the installation to boot from the bios boot menu so it booted from the desired efi partition.
Would just adding a new BLSCFG entry into the /boot/loader/entries/
, that would point to the other installation work for you?
Duplicate the existing entry and edit the
options root=LABEL=your_custom_disk_partition_label ...
or UUID or watever your installation has.
And also edit the title
so you’ll recognize the new boot entry from the original you copied from
–
I’d also ask what do you need this for.
You may look e.g. into btrfs snapshots, if you want more copies of the same (or very simmilar) system.
Sorry for the late response. My current fedora installation is on an encrypted disk partition using veracrypt. I’m rather new and don’t have much technical knowledge, but I’ve seen various sources claim veracrypt’s disk encryption can reduce performance, so I’m wanting to perform a separate, unencrypted fedora installation for more intensive tasks. Either that, or possibly switch to different encryption software that is without any loss in performance.