Cloning a hard drive

Liam Proven lproven at gmail.com
Thu May 7 20:04:21 UTC 2020


On Thu, 7 May 2020 at 20:10, P. Echols <p.echo926 at gmail.com> wrote:
>
> I have a laptop which dueal boots Ubuntu 18.04 and Windows 10.  I want
> to replace the existing HD with a larger SSD.  Can I simply clone the
> drive using dd and replace?  I'm thinking use a USB connection to one
> of the drives, run ubuntu from a live usb so that neither drive is
> mounted.
> Would that work?

It should work, yes.

Bear in mind, `dd` copies every block, used or empty, so it will take
a long time, and afterwards you will still have to resize the
partitions to fill the new drive.

>  Or is there some better way to do it?

When I do this, I delete anything non-essential (run Windows Disk
Cleanup twice, once for user files, once for system files; run CHKDSK
/F on it to check integrity; disable hibernation); boot into Linux,
remove the Windows pagefile, swapfile, hibernation file if any, and
manually empty the temp directories, remove any old versions of
Windows etc.)

Then I connect up both, as you said, boot from a live medium, and use
Gparted to manually copy and resize the partitions, set them as
bootable, etc.

Then I remove the internal drive, swap in the new one, boot off a live
medium again and reinstall GRUB using the standard method. (Google for
howtos -- there are plenty.)

Works for  me, and while it's more labour-intensive, you can resize
the partitions on the destination as you go then batch the copy, and
Gparted only copies allocated blocks of any filesystem it can
recognise.

I've done this successfully several times now.
-- 
Liam Proven – Profile: https://about.me/liamproven
Email: lproven at cix.co.uk – gMail/gTalk/gHangouts: lproven at gmail.com
Twitter/Facebook/LinkedIn/Flickr: lproven – Skype: liamproven
UK: +44 7939-087884 – ČR (+ WhatsApp/Telegram/Signal): +420 702 829 053




More information about the ubuntu-users mailing list