I have a new 1TB laptop drive that I want to clone an existing drive to. The issue is that I want to reorder and resize the existing partitions.
The existing partition table for the drive is
Device Boot Start End Blocks Id System
/dev/sda1 2048 24578047 12288000 7 HPFS/NTFS/exFAT 11GB (former recovery partition of a Windows drive)
/dev/sda2 * 24578048 216989695 96205824 7 HPFS/NTFS/exFAT 92GB Windows install partition
/dev/sda3 216989955 863465471 323237758+ 7 HPFS/NTFS/exFAT 308GB Windows/Linux universal storage
/dev/sda4 863467518 976771071 56651777 f W95 Ext'd (LBA)
/dev/sda5 863467520 976771071 56651776 83 Linux 55GB Ubuntu Partition
I want to change the ordering to
2 x 110 GB for both Windows and Linux
1 x 25 GB for web server and development
1 x 684 GB for Windows/Linux universal storage.
I can create these partitions and copy the corresponding partion over using
dd if=/dev/sdaX of=/dev/sdbX bs=4096 conv=notrunc,noerror
but that leaves the MBR untouched. If I copy over the existing MBR, it will be invalid since the order of partitions is very different on the new drive.
How can I resolve this issue?
Use gparted. Create an empty partition table on the new disk, and copy/paste the partitions over.