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.
Thanks for your answer.
I should have said that I used the default parameters for FDE installation so I did explicitely not put
/home on a separate partition. Here is the (translated) output of
print sda in
Number Start End Size File system Name Flags
1 1049kB 630MB 629MB fat32 EFI System Partition boot, esp
2 630MB 1704MB 1074MB ext4
3 1704MB 512GB 510GB
This doesn’t give much information bug
GNOME Disks shows that the encrypted partition contains one
btrfs file system.
btrfs subvolume list / gives:
ID 256 gen 6617 top level 5 path home
ID 257 gen 6617 top level 5 path root
So the “separation” I mentionned, is in fact btrfs subvolumes.
My hope is that the installer is smart enough to handle this case but according to the second parahraph of you answer it seems not. Do you have some experience on that ?
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
/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.