Sample Header Ad - 728x90

How to clone / move entire Fedora installation onto larger disk with minimal changes to the system?

1 vote
2 answers
5039 views
## Scenario I have an SSD in my computer (250GiB), with both /boot and ///home partitions on it. I'd like to move that into a new M.2 NVME drive which is much larger (1TiB). The distro I'm using is Fedora 37. my /etc/fstab looks like this:
#
# /etc/fstab
# Created by anaconda on Tue Jun 28 05:26:41 2022
#
# Accessible filesystems, by reference, are maintained under '/dev/disk/'.
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
UUID=5ed1bf26-ab2f-4e5a-ab5e-d2d56f5f3803 /                       btrfs   subvol=root,compress=zstd:1 0 0
UUID=a14f6d42-3a64-4f96-856c-51e0f4344481 /boot                   ext4    defaults        1 2
UUID=5ed1bf26-ab2f-4e5a-ab5e-d2d56f5f3803 /home                   btrfs   subvol=home,compress=zstd:1 0 0
lsblk looks like this:
NAME   KNAME PATH       TYPE MODEL                     STATE   RO RM HOTPLUG FSTYPE FSVER LABEL                 PTTYPE PARTTYPE PARTTYPENAME PARTLABEL PARTFLAGS   SIZE FSSIZE FSAVAIL
sda    sda   /dev/sda   disk Samsung SSD 850 EVO 250GB running  0  0       0                                    dos                                              232.9G        
├─sda1 sda1  /dev/sda1  part                                    0  0       0 ext4   1.0                         dos    0x83     Linux                  0x80          1G 973.4M  608.1M
└─sda2 sda2  /dev/sda2  part                                    0  0       0 btrfs        fedora_localhost-live dos    0x83     Linux                            231.9G 231.9G  108.3G
zram0  zram0 /dev/zram0 disk                                    0  0       0                                                                                       7.5G
**Note:** both / and /home/ are subvolumes of the same partition! They're not on individual partitions as such. ## Problem How would I go about doing this, with minimal interruption to my work time? I thought I'd boot up a live distro with gparted and then move partitions over, but since there are UUIDs scattered all over my current setup, I think I might run into problems, also I'm not sure this is the preferred method. As a *bonus*, I suppose, I'd like a swap partition on my hard drive, that is larger than my current amount of RAM (8GB). Currently, I only use ZRAM, but I'd like to have a swap partition that is larger (perhaps twice in size) than my current amount of RAM, so that I can safely put my computer into hibernation. Also, more swap would be quite good for my VMs, and I'm struggling running more than around two VMs, currently. This is roughly how I think I should go about this: 1. I thought I'd clone the current layout onto my 1TB drive, however I'm not sure which tool to use would be best, leaving a large chunk of the drive empty. 2. I'd then create a swap partition towards the end of the un-allocated space. 3. And then enlarge my /dev/sda2 partition, so that I can use the entirety of my drive, etc. Please advise the order of procedure (step 0 would be to create a backup, obviously), as well as the tools I should perhaps try out, etc.
Asked by polemon (11921 rep)
Feb 6, 2023, 03:46 PM
Last activity: Apr 28, 2025, 12:03 PM