Move fedora installation to another partition

How to move fedora 35 installed on a 250gb hard disk with all partitions including EFI, boot, root(btrfs) to another 500gb SSD ?

Backup your data before attempting any of this!

Two options:

#1 Migrate in place

The easy part is the btrfs volumes. You can add the disk to your current btrfs volume and then remove the old disk and all the data will be migrated to the new drive in the process.

The boot and efi partitions might be trickier, but you’ll want to create the partitions on the new drive as the exact same size first (before doing the btrfs stuff above) and dd each partition over. This was UUIDs should be preserved.

#2 All at once

This is best done offline, using another computer to copy the drive. It’s possible to do this online, but you will likely trigger a fsck with some potential corruption if writes are happening during cloning. Use dd or some other tool to simply copy the old drive to the new and then expand btrfs after the fact. This is the easiest, but dd doesn’t have much error checking. If you have another spare bigger drive, one thing I’ve done successfully is dd from the old drive to an img file (optionally testing this with qemu) and then using dd to copy from that verified img file to the new drive. This isn’t strictly necessary, but could be helpful if you have a failure when copying directly from one drive to another.

1 Like