Ubuntu – Clone Linux Partition Only from Dual Boot 16.04 disk to make new Bootable Linux disk


I have a system where the main SSD has Ubuntu 16.0.4 and Windows 10 in a dual boot configuration. I want to copy just the Linux operating system to a new SSD that will not be dual booted. On the new disk, I just want the Ubuntu content from the old disk, nothing else, and I want it the disk to be bootable. Note, the new SSD has more than enough space to hold the entire original Ubuntu image from the old disk, but not enough space contain both operating systems. I only mention that if one of the solutions you might propose involves doing a complete clone of both operating systems instead of just the Ubuntu partition.

What's the easiest way to accomplish this, and is there step-by-step instructions on how to do it?

Best Answer


You can clone the partition with Clonezilla or dd. I would recommend Clonezilla.

Copying with rsync

An alternative (to cloning) is to create a partition with the ext4 file system: copy the content of the earlier root partition to this partition with rsync, when booted from another drive.

sudo rsync -Hav old-root-partition-mountpoint/ new-root-partition-mountpoint

Additional tasks

But cloning/copying the partition is not enough. You must also

  • create a swap partition or swap file that matches the corresponding line in /etc/fstab

  • install a bootloader (which will be different depending on the boot mode, UEFI or BIOS (alias CSM or legacy) mode.

If you have some experience of these things or are prepared for some trial and error, good luck :-)

Fresh installation

Otherwise I think, it will be easier to make a fresh installation and later on copy you personal files (documents, pictures, multimedia files) from the old system to the new system.

If you wish, you can create a separate home partition with the ext4 file system: copy the content of the earlier /home directory to this partition, and during the installation select 'Something else' at the partitioning window and let the installer use this partition for /home alongside the root partition (/) and swap partition.

This will preserve the personal files and tweaks (those, that are stored in the home directory (or directories)).

Related Question