Windows Partition Backup

This is description of how to backup raw partitions in preparation for switching a new machine to Linux. The main reason would be to preserve a brand new Windows licence key and driver installation to ease installation/restoration for switchimg the computer back at a later date.

Another method would be preferable (or at least more steps need to be taken) to set up dual boot or preserving/migrating data from a Windows installation currently in use (in which case rsync to a backup drive would be a better solution).


Windows Partition Backup

Preparation

Save a copy of your Windows activation key first: this should be stored in the UEFI/ACPI firmware MSDM table, but it is better to record ssomewhere safely. You may also have a hard copy in the documetation that came with (or a sticker right on) your new hardware.

Start up the computer and press Shift+F10 to open up a command prompt in the Windows installer and run (it may take a little while for the dialog to come up):

Partition Backup

  1. Boot into a Linux recovery/live CD (I use Debian live CD)
  2. On a high-DPI display, the console text may be very small:
  3. Connect your backup media:
  4. If you haven’t already recorded it, save your Windows activation key:
  5. If you (like I did) are using the standard Debian Live image, you’ll need to install some software:
  6. Back up your Windows partition table (a couple of different ways):
  7. Back up the Windows partition contents:
  8. Disconnect the backup drive:
  9. You probably want to keep the existing EFI partition — check with:
  10. sudo sgdisk -d 2 -d 3 -d 4 /dev/nvme0n1 — delete the rest (other three: 2, 3, and 4)
  11. While you are at it, you can create the new partitions (or just do it in the Debian installer):
  12. Continue on with your Debian installation.