0

The problem is the following: I installed Ubuntu to my Dell laptop, and I want to free the space occupied by Windows (which I don't use anymore). I plan to sell the machine in the future, so I'd rather save a copy of the original Windows partitions for the future. Ideally, I'd like to save a perfect clone of the Windows partitions in an external hard drive (compressed).

The question is, how can I do that? I already installed Ubuntu so the boot sector is not the original, neither the partition table, but I do not care about that very much, I can restore that from Windows manually at restore time. I was planning to use dd + some zipper to do the cloning.

This is my partition table:

$ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 26F79A47-EE3C-422B-A756-EB57ABFF3780

Device              Start        End   Sectors   Size Type
/dev/nvme0n1p1       2048    1026047   1024000   500M EFI System
/dev/nvme0n1p2    1026048    1288191    262144   128M Microsoft reserved
/dev/nvme0n1p3    1288192  193216511 191928320  91.5G Microsoft basic data
/dev/nvme0n1p4  972910592  973832191    921600   450M Windows recovery environment
/dev/nvme0n1p5  973832192  997834751  24002560  11.5G Windows recovery environment
/dev/nvme0n1p6  997836800 1000214527   2377728   1.1G Windows recovery environment
/dev/nvme0n1p7  193216512  264896511  71680000  34.2G Linux filesystem
/dev/nvme0n1p8  349466624  935403519 585936896 279.4G Linux filesystem
/dev/nvme0n1p9  935403520  972910591  37507072  17.9G Linux swap
/dev/nvme0n1p10 264896512  349466623  84570112  40.3G Linux filesystem

Partition table entries are not in disk order.

I'd save from sector 0 to nvme0n1p3 end, and then from nvme0n1p4 to nvme0n1p6 in another file, plus the output of fdisk. Do you think that would be enough? What would be the exact commands required to do it, and the ones for restoring (when restoring I'd boot Windows and use the recovery tools to do some kind of recovery to original state).

BTW, this could be turned into an app if it doesn't exist yet.

  • 2
    I would use clonezilla for such a task. – Bruni Jul 2 '18 at 4:41
0

Is it necessary that you get a copy of your exact state which you had on Windows? I wouldn't recommend this if you have used the system a lot. Instead, I would recommend you making a bootable drive via the creation tool from Microsoft, and then install it when you sell your machine. This is ofcorse only if you plan to override Ubuntu completely.

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.