1 (edited by flaviobagnato 2019-12-17 10:17:39)

Topic: Why did my Copy and Paste Partitions not work

Hi all,

I am in the process of replacing my mechanical hard drives with SSD's.

One of my drives was downsizing a 1Tb to a 480Gb SSD.

I reduced the Windows partition so that it would fit onto the smaller SSD.

It was a UEFI setup of Windows 10 which had 6 partitions on the 1Tb drive.

I tried using Clonezilla but Clonezilla cannot duplicate the partitions with the same size if downsizing the hard drive so I encountered problems get it cloned onto the SSD.

So, I thought I would try with GParted using copy and paste the partitions in order one at a time. I started with an empty SSD and just copy and pasted the 1st partition, 2nd partition, etc. until all were pasted.

I plugged the SSD into the laptop that had the 1Tb in there and thought it would just work, but it didn't.

I got BSOD's when trying to boot up Windows.

I managed to use a combination of Acronis True Image, GParted and Clonezilla to successfully clone a working SSD but would have preferred a single solution and preferably open source.

So I am curious should this approach of just using the copy and paste functions of GParted have worked to "clone" the drive and successfully boot up Windows?

Was I meant to write the partition table after the copy and pasting was complete?

Would be interested in your reply as I have other mechanical hard drives to downsize and replace with SSDs.

Regards,

Flavio

2 (edited by mfleetwo 2019-12-18 17:42:05)

Re: Why did my Copy and Paste Partitions not work

I don't use Windows and don't know how UEFI and booting Windows works.  The fact that you managed to copy a disk drive and make it work means you probably know more than me.

The only limitation that I am aware of in duplicating a GPT partitioned and UEFI bootable Windows hard drive to another using GParted, by copying partitions individually would be that GParted will get the GPT partition type of the EFI System partition which contains a FAT32 file system wrong.  The EFI System partition should have a GUID partition type of C12A7328-F81F-11D2-BA4B-00A0C93EC93B.  However libparted doesn't expose the GUID partition type.  Instead GParted can only say it wants a partition containing a FAT32 file system but I expect libarted will set it to GUID partition type Microsoft basic data (EBD0A0A2-B9E5-4433-87C0-68B6B72699C7).

Update:
Libparted exposes GPT partition types as partition flags.  EFI System partition type can be set for a partition in GParted with Partition > Manage Flags > [tick] boot.

Update 2:
Also if there are any Microsoft reserved partitions which have been copied they will need setting with flag "msftres".

3

Re: Why did my Copy and Paste Partitions not work

Hello mfleetwo,

Thanks for your detailed reply.

LOL (me knowing more than you). From your answer you are way ahead of me on knowledge. I got it work after trying many ways and combinations. Trial and Error more than experience. I was just disappointed that I couldn't just use GParted copy and paste to setup my new drive. Would have been a very simple solution.

> Update:
> Libparted exposes GPT partition types as partition flags.  EFI System partition type can be set for a partition in GParted with > Partition > Manage Flags > [tick] boot.

I didn't change the flags on the EFI System partition so maybe that is what I did wrong?

> Update 2:
> Also if there are any Microsoft reserved partitions which have been copied they will need setting with flag "msftres".

Yes I found this and did set the flag to "msftres".

I will keep in mind to change the boot flag on the EFI System partition next time I need to do a similar exercise.

So in your opinion should I be able to solely use GParted to duplicate a UEFI/GPT disk so that Windows boots?

Regards,

Flavio

4

Re: Why did my Copy and Paste Partitions not work

flaviobagnato wrote:

So in your opinion should I be able to solely use GParted to duplicate a UEFI/GPT disk so that Windows boots?

Yes, I think GParted can duplicate a Windows UEFI/GPT boot disk, but as I mentioned above, I haven't tested this.

Steps:
1. Write GPT to new disk.
2. Copy partitions.
3. Set partition flags as these are not copied, especially boot and msftres.

If partitions are being resized during the copy, also see the tip for NTFS at the end of Resizing a Partition in the GParted Manual.

5 (edited by flaviobagnato 2019-12-23 04:46:34)

Re: Why did my Copy and Paste Partitions not work

Thanks again mfleetwo,

Will try it again when I next have the same situation.

Regards,

Flavio