My media PC / home server has a 1.8TB hard disk, partitioned as follows:

Device Boot Start End Sectors Size Id Type
/dev/sda1   *   2048        218361855   218359808   104.1G  83  Linux
/dev/sda2       3896788992  3907028991  10240000    4.9G    5   Extended
/dev/sda3       218361856   3896788991  3678427136  1.7T    83  Linux
/dev/sda5       3896791040  3907028991  10237952    4.9G    82  Linux swap / Sol
Partition table entries are not in disk order.

Mount points (including backup disk sdf, not shown above) are as follows:

# df -h
Filesystem  Size    Used    Avail   Use%    Mounted on
udev        3.4G    0       3.4G    0%      /dev
tmpfs       693M    19M     674M    3%      /run
/dev/sda1   103G    60G     38G     61%     /
tmpfs       3.4G    183M    3.3G    6%      /dev/shm
tmpfs       5.0M    4.0K    5.0M    1%      /run/lock
tmpfs       3.4G    0       3.4G    0%      /sys/fs/cgroup
/dev/sdf1   462G    358G    82G     82%     /mnt/backup
/dev/sda3   1.7T    935G    705G    58%     /home
tmpfs       693M    48K     693M    1%      /run/user/1000
tmpfs       693M    0       693M    0%      /run/user/0

I'd like to do two things:

  • Migrate the OS to a new 120GB SSD.
  • Recover the space in /dev/sda1 to use in the main /home partition (currently /dev/sda3).

Couple of questions:

  • Should I use gparted to set up the initial partitions and clonezilla to clone from old to new?
  • Should I also clone /dev/sda2 (Extended) and /dev/sda5 (Swap)?
  • Once cloned, will I be able to delete the original partitions which were cloned, and merge the empty space back into the main /dev/sda3 partition?
  • Remember that Ubuntu does not have a Product Key, one of the main reasons to migrate via cloning. One solution is to simply use the normal Ubuntu installer and do a clean-install on the new hard drive, then copy your /home data across. There is generally no need to clone swap (new releases of Ubuntu often lack a swap partition entirely). Yes, you can use gparted to destroy/merge old partitions...but use with care lest you wipe precious data instead. – user535733 Apr 9 '18 at 12:14
  • Thanks. This option has not been discounted (especially with the new LTS due shortly), although there is a "hassle factor" in starting again from scratch. – Fiddlestiques Apr 10 '18 at 14:17
  • In the end, cloning just caused a load of issues with duplicate UUIDs, bios and grub. Formatted and reinstalled, mounting the old OS in /mnt/oldOS in order to retrieve settings and reapply them to the new install. – Fiddlestiques Apr 18 '18 at 8:46

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.