Images (e.g. with Clonezilla) of Windows and Linux on a UEFI computer
Solution 1:
The EFI System Partition (ESP) holds your boot loaders for both Windows and Linux. Thus, backing it up is critically important. Although you can restore both boot loaders using emergency tools, it's likely to be easier to restore them from a backup. Note also that some critical boot information (namely, which boot loader to start) is stored in NVRAM. In theory, restoring that information is easy -- if you know how. Under Linux, you'd use the efibootmgr
utility. I recommend storing its current configuration in a file:
$ sudo efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0004
Boot0000* rEFInd (direct) HD(2,c00,114000,6e49fcaf-d054-47c9-ba69-a668c5ee8192)File(\EFI\refind\refind_x64.efi)
Boot0004* UEFI: Built-in EFI Shell Vendor(5023b95c-db26-429b-a648-bd47664c8012,)..BO
This example doesn't redirect to a file, simply so I can describe its contents. This system boots just one OS (Linux) via rEFInd -- the Boot0000
entry. The Boot0004
entry boots the "built-in EFI shell" (but that's really the firmware setup utility, in the case of my computer). A dual-boot system is likely to have at least one more entry. The key point here is to record the filename(s) of the boot loader(s) -- \EFI\refind\refind_x64.efi
in this example. You can then restore those entries with efibootmgr
's -c
option if and when that becomes necessary. Note also that the NVRAM entry refers to the partition by its GUID number (6e49fcaf-d054-47c9-ba69-a668c5ee8192 in this case) and perhaps other hardware identification. Thus, if you repartition or replace the disk, you may need to re-create these entries even if you restore the files and efibootmgr
shows the old entries intact. Most computers have entries, like the "built-in EFI shell" example here, that are managed by the firmware and that you shouldn't normally try to re-create or modify.
I assume that by "MRP" you mean the Microsoft Reserved partition. This partition doesn't normally contain anything; it's used as "scratch space" by Windows partitioning tools -- or at least, it's reserved for that purpose. (I don't know if the tools actually ever use it for anything.) As such, it should be safe to not back it up, but you should make a note of its size and be sure to create a new partition in its place. If you want to be extra-careful, you could do a low-level backup with dd
or the like. I don't know if Clonezilla will back up this type of partition.