Replacing a hard drive that has home folder and swap partition

As it happens, I wrote a guide for this scenario a while ago:

Printing the page is a bit cumbersome, so I’d recommend having it open on another computer while performing these operations. That is, unless you’re exceptionally good at keeping notes. :wink:

Also note the comments about the -k option which I left out of the guide itself. The guide shows how to clone directly to another disk – the type of disk (HDD/SSD) shouldn’t matter – all content will be faithfully duplicated.

A word of warning; when using HDD’s and a USB-to-SATA adapter (which I saw mentioned above) you can expect that the whole process might take a very long time (possibly a full day) to complete, during which time it must not be interrupted (otherwise you would need to start over).

Here’s a thread from @rob215x who used this guide with success, despite a few issues along the journey. It’s always good to see another’s perspective.


Yes. This is also described in the guide, however, when using the -k option as well you might not need to; I understand it expands partitions to fill remaining space, but I haven’t used that option.

It apparently works as described though.

The important thing to remember is that both disks can no longer be connected at the same time because they will now have the same UUID.

When the clone has finished, you can either:


A: Disconnect your original disk

  • Boot with the Manjaro Live Installer, change the respective UUID’s of the newly cloned disk, and update fstab:

From Migrate Installation to New Hardwareupdate fstab:

You can use sgdisk from GPT fdisk to achieve this, though the Arch Linux information doesn’t seem overly intuitive.

You may wish to seek specific advice on this. :eyes:


B: Disconnect your newly cloned disk

  • Boot with the Manjaro Live Installer, install gparted to the Live environment and erase the original disk.
  • Reconnect the newly cloned disk and enjoy.

I might choose B for convenience. Whatever you do, make sure to first check that your newly cloned disk is booting and functioning as expected.


I think that covers it. Others may add to this if I’ve missed anything. I hope this is helpful.

Regards.

1 Like