You need to create a bootable live disk to clone your disk. You can not copy a partition that is mounted. If you do not have internet access, use gparted. Otherwise, it might be better to use your operating systems live installer, such as Manjaro. We can download gparted and still have things like a web browser incase we get stuck. We will be using the Manjaro live disk for this guide.
- Download Manjaro.
- Insert USB disk.
- Open "Disks" application.
- Select your USB Disk in the left pane.
- Click the right options menu in the window title bar (Drive Options), and select "Restore Disk Image...)
- Select the disk image (.iso) file you previously downloaded.
Enter your bios and force boot into your live disk.
- Open the terminal.
sudo pacman -Syu dosfstools mtools gparted.
- Open the terminal.
sudo fdisk -l- Within the terminal output, find the disk you wish to clone and remember the disklabel type. This is most likely gpt.
- Open gparted.
- Select target disk.
- Device > Create Partition Table... > disklabel type
The target disk must be the same size or larger than the disk you wish to clone. If it is not, you need to resize your partitions.
- Open gparted.
- Select clone disk.
- Select your boot partition.
- Partition > copy.
- Take note of the unallocated space preceeding the partition, filesystem size, and flags.
- Select target disk.
- Partition > paste.
- Enter free space preceeding and new size.
- Partition > manage flags > select same flags as clone disk.
- Repeat for all other partitions.
- Select your root partition.
- Partition > resize.
- Use slider to expand it to the rest of the disk.
- Click the checkmark to start the process of cloning the disk.
The new disk is a clone of the previous disk. If you keep the old disk installed, this will cause issues as the UUID of each disk is the same.
- Open terminal
- Generate a random serial number for boot partition (fat32),
sudo mkdosfs -i /dev/[partition 1]. - Generate a random serial number for root partition (ext),
sudo tune2fs -U random /dev/[partition 2].
- Open gparted.
- Select target disk.
- Select your boot partition.
- Partition > Information > Take note of UUID.
- Select your root partition.
- Partition > Information > Take note of UUID.
- Open Disks.
- Select your target disk in the left pane.
- Select your root partition.
- Click the plus symbol to mount the disk.
- Take note of the location the partition is mounted at.
- Open Terminal.
sudo gedit /mnt/[your mounted partition]/etc/fstab- Replace the UUID's of your boot and root partition with the new values.
- Save file, ctrl + s.
- Open Terminal.
sudo gedit /mnt/[your mounted partition]/boot/grub/grub.cfg- Replace the UUID's of your boot and root partition with the new values. Use find and replace.
- Save file, ctrl + s.
- Open Terminal.
sudo update-grubref
You should now be able to reboot, enter bios, and change your boot disk to your new disk. Test the computer for a while before using Disks or gparted to wipe out the clone disk.
Since I need that, I updated the instructions using EFI and systemd boot
Cloning a Root Disk on Linux (Including systemd-boot and EFI Update)
Preface
You need to create a bootable live disk to clone your root disk. Copying a mounted partition is not possible. If you do not have internet access, use GParted Live. Otherwise, using a live installer like Manjaro is often more versatile. This guide uses a Manjaro live disk for cloning.
Step 1: Create a Bootable Live Disk
Step 2: Boot into the Live Disk
Step 3: Install Required Tools
Open the terminal and run:
Step 4: Prepare the Target Disk
gpt).Device>Create Partition Table..., choose the appropriate label (usuallygpt).Step 5: Clone Partitions
In GParted, select the source disk.
Right-click each partition:
Select Copy.
Take note of:
Switch to the target disk:
Repeat for all partitions.
Resize the root partition to fill the remaining space (right-click > Resize/Move).
Click the green checkmark to apply all changes.
Step 6: Update UUIDs to Avoid Conflicts
Boot Partition (FAT32)
Root Partition (EXT4)
Step 7: Confirm UUIDs
Step 8: Mount the Root Partition
/mnt/sdX2).Step 9: Update fstab
bootandrootwith the new values.Step 10: Update systemd-boot (if used)
root=UUID line with the new root UUID.Example:
loader.confif needed:Step 11: Update GRUB (if used)
Optional: Regenerate GRUB configuration
Step 12: Test the New Disk
Optional: Wipe Old Disk
Once the new system works flawlessly, you can use GParted or Disks to wipe the original disk if needed.