Replacing My Ubuntu System SSD with Clonezilla — Without Reinstalling Ubuntu

My computer was running Ubuntu 24.04 LTS from a relatively small 120 GB SSD. Although it was connected to a file server where I stored larger files such as photos and videos, the system disk was nearly full. Ubuntu, applications, updates, and application data were taking up almost all the available space.

A quick check showed that the SSD was 97% full:

df -h /

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3       109G  100G  3,8G  97% /

With just 3.8 GB available, there was hardly any room left for updates. I also wanted to upgrade Ubuntu from 24.04 LTS to 26.04 LTS, but first I needed a larger system disk.

I didn’t want to reinstall Ubuntu, all my applications, or the settings I had accumulated over time. My idea was to make a complete, bootable copy of the old 120 GB SSD on a new 512 GB SSD, then exchange the two drives. The new SSD would first be connected externally through USB. Only after cloning would I open the computer and replace the old disk.

It worked. Here is the process I followed, including the mistakes and small problems along the way.

1. Equipment and precautions

ItemWhat I used
Old system disk120 GB SSD (Kingston SV300S37A120G)
Replacement disk512 GB SSD (BIWIN M100)
Operating systemUbuntu 24.04 LTS
Cloning toolClonezilla Live
Boot mediumOld 2 GB USB flash drive
Temporary connectionUSB-to-SATA enclosure

The computer was also connected to a file server, but that storage did not need to be cloned. I kept the old 120 GB SSD unchanged as a fallback.

Important: Have a separate backup of important files before cloning. Clonezilla overwrites the destination disk. Selecting the wrong source or destination could mean losing data.

2. Why a simple file copy was not enough

The old 120 GB SSD contained more than personal files: it contained Ubuntu itself and the boot components. My computer used UEFI with a GPT partition table. So I needed to copy the entire disk, including its partitions and EFI System Partition, rather than copying the contents of the home directory.

I checked the boot mode with:

if [ -d /sys/firmware/efi ]; then
    echo "UEFI boot"
else
    echo "Legacy BIOS boot"
fi

UEFI boot

I also inspected the current UEFI boot entry:

sudo efibootmgr -v

The relevant lines of the output were:

BootCurrent: 000D
Boot000D* ubuntu	HD(2,GPT,fa4bd6b8-7ce5-49fd-9820-4445ed33dbcb,0x1000,0x100800)/File(\EFI\UBUNTU\SHIMX64.EFI)0000424f

The partition identifier matched the EFI partition on my old 120 GB SSD. This mattered because the goal was to boot independently from the new disk after removing the old one.

3. Connect the new SSD through USB

I put the empty new 512 GB SSD in a USB-to-SATA enclosure and connected it to the computer while the old 120 GB SSD remained installed internally.

Open external 2.5-inch USB-to-SATA enclosure showing its SATA connector.
The enclosure I used to connect the new SSD externally for cloning.

I first identified the attached drives:

lsblk -d -o NAME,SIZE,MODEL,TRAN

In my Ubuntu session, the old 120 GB SSD appeared as /dev/sda, and the new 512 GB SSD appeared as /dev/sdc (connected via USB). I also checked their partitions:

lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTS

These were the relevant lines of that longer output (unrelated entries omitted):

sda    111,8G
├─sda1     1M
├─sda2   513M vfat
└─sda3 111,3G ext4     /

sdc    476,9G

The capacity difference is normal: a drive sold as 512 GB appears as approximately 476.9 GiB in Linux. Device letters can change after rebooting, so I would not rely on sda and sdc alone. The capacities and actual drive models must be checked again inside Clonezilla.

4. Prepare the Clonezilla USB stick

I downloaded the 64-bit Clonezilla Live ISO from the official Clonezilla website. Because the ISO was smaller than 600 MB, an old 2 GB USB stick was sufficient.

I used GNOME Disks to write the ISO to the USB stick:

gnome-disks

In GNOME Disks, I selected the 2 GB USB device, opened the drive menu, chose Restore Disk Image, and selected the Clonezilla ISO. Writing the image erased the contents of that USB stick, so I checked the target carefully.

When Ubuntu said the USB stick was busy

My first attempt was interrupted because Ubuntu couldn’t unmount the USB stick. I tried:

cd ~
udisksctl unmount -b /dev/sdd1

The response was:

Error unmounting /dev/sdd1: GDBus.Error:org.freedesktop.UDisks2.Error.DeviceBusy: Error unmounting /dev/sdd1: target is busy

To identify the process keeping it open, I ran:

sudo fuser -vm /dev/sdd1

The output showed:

                     USER        PID ACCESS COMMAND
/dev/sdd1:           rpr       171328 f.... nautilus

The file manager was still using the USB stick. I closed it with:

nautilus -q

After that, I could finish writing the image.

When Clonezilla initially failed to boot

The first boot attempt displayed isolinux.bin missing or corrupt, after which the computer tried another boot option. I returned to Ubuntu and wrote the ISO again, making sure to choose Restore Disk Image for the entire USB device, not an individual partition. On the next attempt, Clonezilla started. I cannot say with certainty what caused the initial boot error, but rewriting the stick and selecting the correct UEFI boot option resolved it.

5. Clone the complete old SSD

I restarted the computer, opened the boot menu with F12, and booted Clonezilla Live from the USB stick. After the language and keyboard screens, the important menu choices were:

Clonezilla menuMy selection
Operationdevice-device — copy directly from one disk to another
ModeBeginner
Methoddisk_to_local_disk
SourceOld 120 GB SSD
DestinationNew 512 GB SSD
Filesystem check-sfsck — skip filesystem check/repair on the source
Partition table-k0 — use the source partition table
Save Clonezilla logs to the USB stickNo
Action on completion-p poweroff

I initially landed in device-image, which is for saving or restoring image files. That was not what I needed: both disks were connected, so the correct choice was device-device.

The most important decision was the copying direction: from the old 120 GB SSD to the new 512 GB SSD. Clonezilla warned that the destination would be overwritten. Before confirming, I checked the disk sizes and models once more.

I chose -k0 to preserve the original partition layout. As a result, the Ubuntu partition on the new SSD would initially remain the size of the old disk; I planned to expand it afterward. The -sfsck setting avoided making filesystem repairs on my working source disk.

Once the copying process finished, Clonezilla shut the computer down.

6. Replace the old SSD and test the boot

With the computer powered off and unplugged, I disconnected the old 120 GB SSD and connected the new 512 GB SSD to the same internal SATA data and power cables. I left the old SSD untouched in case I needed to go back.

For the first test, the new SSD wasn’t even fastened into a drive bay. It was simply connected and hanging from its cables. That was only a temporary arrangement for checking the boot; the SSD should be secured properly afterward.

New 512 GB SSD hanging temporarily from SATA power and data cables inside an open computer.
The new 512 GB SSD connected internally for the first boot test, before securing it in a drive bay.

I switched the computer on. Ubuntu started normally, with the familiar desktop, applications, and settings. I then verified that the root filesystem was on the replacement disk:

findmnt -no SOURCE /

/dev/sda3

That partition name alone was not enough, so I also checked the physical drive and its connection:

lsblk -o NAME,SIZE,MODEL,TRAN,FSTYPE,MOUNTPOINTS

Relevant lines of the output (unrelated devices and the model column omitted):

sda    476,9G  sata
├─sda1     1M
├─sda2   513M        vfat
└─sda3 111,3G        ext4   /

The new 512 GB SSD was now connected through internal SATA, with Ubuntu running from its third partition. Crucially, the old 120 GB SSD was no longer connected. The computer therefore booted independently from the clone.

Why the clone was bootable

This is an important technical distinction. Clonezilla did not merely copy Ubuntu’s visible files. By cloning the whole disk, it also transferred the GPT partition structure, the EFI System Partition containing Ubuntu’s bootloader files, and the Ubuntu root filesystem. Together, these provided the information and files needed for UEFI to start Ubuntu from the replacement SSD. The successful boot with the old SSD disconnected was the practical confirmation.

Checking the file server connection

I also checked /etc/fstab, where my Ubuntu installation had the configuration for mounting network shares from my file server. Even those mounts still worked without any problem. I didn’t need to change /etc/fstab or recreate the connections.

7. Expand Ubuntu to use the extra space

The clone was bootable, but most of the new SSD was still unused because I had kept the old partition layout. I checked the available space with:

sudo parted /dev/sda unit GiB print free

The relevant lines were:

Disk /dev/sda: 477GiB
Partition Table: gpt

Number  Start    End      Size     File system  Name                  Flags
 1      0,00GiB  0,00GiB  0,00GiB                                     bios_grub
 2      0,00GiB  0,50GiB  0,50GiB  fat32        EFI System Partition  boot, esp
 3      0,50GiB  112GiB   111GiB   ext4
        112GiB   477GiB   365GiB   Free Space

There were roughly 365 GiB of unallocated space immediately after partition 3. I only needed to extend that partition and then grow the ext4 filesystem. Since the free space was adjacent to the existing partition, I could do it without moving the partition’s beginning.

First attempt: the partition stayed the old size

I first tried:

sudo parted /dev/sda --script resizepart 3 100%

Parted warned:

Warning: Partition /dev/sda3 is being used. Are you sure you want to continue?

When I checked with lsblk, the partition was still 111.3 GiB. So I tried the interactive method:

sudo parted /dev/sda

At the (parted) prompt, I entered:

resizepart 3 100%

I confirmed the warning that the partition was in use, then exited with:

quit

This time, the partition was extended. The subsequent check was:

lsblk -o NAME,SIZE,FSTYPE,MOUNTPOINTS /dev/sda

NAME     SIZE FSTYPE MOUNTPOINTS
sda    476,9G
├─sda1     1M
├─sda2   513M vfat
└─sda3 476,4G ext4   /

Caution: Changing a partition table always involves risk. These commands apply only after identifying the correct disk, confirming that the free space is immediately after the partition, and having a backup. On another system, a reboot or an offline partitioning tool might be required.

Grow the ext4 filesystem

Making the partition bigger is only half of the operation. Ubuntu’s ext4 filesystem also needed to grow to fill it. I ran:

sudo resize2fs /dev/sda3

The actual response was:

resize2fs 1.47.0 (5-Feb-2023)
Filesystem at /dev/sda3 is mounted on /; on-line resizing required
old_desc_blocks = 14, new_desc_blocks = 60
The filesystem on /dev/sda3 is now 124895057 (4k) blocks long.

The filesystem expansion succeeded while Ubuntu was running. No second Clonezilla session was necessary.

8. Final check: 350 GB available

Finally, I ran the same command that had shown the original problem:

df -h /

Filesystem      Size  Used  Avail  Use% Mounted on
/dev/sda3       469G   97G   350G   22% /
BeforeAfter
Nominal SSD capacity120 GB512 GB
Ubuntu filesystem109 GiB469 GiB
Space used100 GiB97 GiB
Space available3.8 GiB350 GiB
Disk usage97%22%

The used-space figure was slightly lower because I had cleaned up some temporary files before making the clone. The important part was that my original Ubuntu installation was still there, but now had about 350 GB of available space.

Conclusion

This was exactly the upgrade I had hoped for: I connected the new SSD externally, cloned the entire bootable disk, replaced the old SSD, and started Ubuntu without reinstalling anything. Applications, personal files, and the network-mount configuration all carried over.

A few things were less straightforward than expected: preparing the old USB stick, choosing the correct Clonezilla mode, and expanding the partition afterward. But each problem was manageable, and none required rebuilding the Ubuntu installation.

I am keeping the old 120 GB SSD unchanged as a fallback. With the new 512 GB SSD in place, I can now address an outstanding kernel-driver problem and then move on to the planned Ubuntu 26.04 LTS upgrade. That will be a separate project.

Category: