I have a machine running Fedora 36 (upgraded several times from previous releases). The installation uses FDE (/boot is not encrypted).
Now for some reasons, I would like to reinstall Fedora 36 from scratch without loosing the /home partition (and with FDE of course). Is it possible ?
If I’m correct, the FDE installation creates a LUKS-encrypted partition with a space for / and a space for /home (I’m not sure if they are real partitions or another separation mechanism) so there is some hope but I have never tried it. Any help ?
If /home is already a separate partition then it is simple to use the manual partitioning and simply tell the installer to mount that partition as /home without formatting.
If you are redoing the FDE then It seems you may need to either backup and restore /home or encrypt everything else but leave home untouched as is. Maybe using the same password to unlock it. How that would work with btrfs is uncertain for me.
I have never tried a reinstall with FDE. My /home is not even on the same drive as the OS.
Hello @orsayman ,
If you have an external USB drive to back up your /home to, and you have it formatted as BTRFS or can format it to that, it will be the easier way to go by using BTRFS send/receive. So for this to go easiest, make a snapshot of your /home subvolume as a read only snapshot. Something like the following …
btrfs subvolume snapshot -r /home /home-bak
That will give you a snapshot in read only format ready for sending.
If your external usb mounted HDD or SSD is mounted at /dev/sdb then the send/receive command will look like …
btrfs send /home-bak | btrfs receive /dev/sdb/
Afterwards, reinstall Fedora, it will do the default separate subvolumes for /, /var, and /home and you can then reverse the send/receive operation and you may have to relabel your home with resotrecon for selinux.
I have done the re-install route with keeping home intact. It requires some user intervention before rebooting to set the Gnome specific first run file to done. As well as the general user configuration in /etc/passwd to ensure your existing user is recognized at reboot.
Thanks for your detailled message. I choose the easy way to just copy the content of /home before re-installing (as suggested by @computersavvy ) but your message could help in other scenarios.
I think that anaconda could be improved to handle such situations i.e. allow to control what to do with already existing encrypted devices (like in classic installation where you can choose which partition is formatted). Do you know if the developpers work on that ?
In any case, this forum is very helpful, thanks everybody !