Suppose I have a computer that was once a purely Windows desktop, whose disk contained at least the usual EFI System Partition (the ESP) and the Windows partition itself. Suppose that one day I decided to get rid of it for a better OS (namely Linux), /bin/dd
'd the Windows partition to an external disk (i.e. a verbatim bit-by-bit, sector-by-sector copy, probably to some massive file that I probably called Windows.img
), scrubbed the original disk clean by /bin/dd
'ing the whole thing with zeroes, and somehow installed some Linuxes onto it.
But now let's say I want to smush Windows back into the disk as a second (not actually second, as I have multiple Linuxes on here) operating system. Now what? I may or may not have kept a backup of the original ESP with the original bootloader inside, but assume that I did. Is there any way I can arbitrarily make some room and create a partition somewhere, /bin/dd
the Windows partition to it, and somehow boot into it like old times? Does rEFInd help at all, here? Also, what if I, for some reason, forgot to backup the original ESP?
efibootmgr
anddd
and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.