Moving Windows partition (EFI, GPT)











up vote
0
down vote

favorite












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?










share|improve this question
























  • This question cannot be answered unless you tell us if you do or do not have that EFI data. Please edit your question and provide us the vital information necessary to answer this question.
    – Ramhound
    Nov 15 at 1:02












  • Assume that I do, as I tend to archive as much as I can. I don't actually know, myself, as the disk is not physically available to me at the moment.
    – Mona the Monad
    Nov 15 at 1:03












  • You can use DISM to apply an.WIM image to the partition, modify your current bootloader, to boot into the Windows bootloader (which will boot into your Windows installation). This prevents the Windows installer from modifying your current bootloader. A relatively simple process if you have the required data.
    – Ramhound
    Nov 15 at 1:04












  • @Ramhound DISM seems to be a Windows utility, and I do not use Windows. Is there something I can do from Linux, perhaps with tools like efibootmgr and dd and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
    – Mona the Monad
    Nov 15 at 1:08

















up vote
0
down vote

favorite












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?










share|improve this question
























  • This question cannot be answered unless you tell us if you do or do not have that EFI data. Please edit your question and provide us the vital information necessary to answer this question.
    – Ramhound
    Nov 15 at 1:02












  • Assume that I do, as I tend to archive as much as I can. I don't actually know, myself, as the disk is not physically available to me at the moment.
    – Mona the Monad
    Nov 15 at 1:03












  • You can use DISM to apply an.WIM image to the partition, modify your current bootloader, to boot into the Windows bootloader (which will boot into your Windows installation). This prevents the Windows installer from modifying your current bootloader. A relatively simple process if you have the required data.
    – Ramhound
    Nov 15 at 1:04












  • @Ramhound DISM seems to be a Windows utility, and I do not use Windows. Is there something I can do from Linux, perhaps with tools like efibootmgr and dd and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
    – Mona the Monad
    Nov 15 at 1:08















up vote
0
down vote

favorite









up vote
0
down vote

favorite











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?










share|improve this question















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?







partitioning uefi bootloader gpt efi






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 15 at 1:04

























asked Nov 15 at 0:58









Mona the Monad

12319




12319












  • This question cannot be answered unless you tell us if you do or do not have that EFI data. Please edit your question and provide us the vital information necessary to answer this question.
    – Ramhound
    Nov 15 at 1:02












  • Assume that I do, as I tend to archive as much as I can. I don't actually know, myself, as the disk is not physically available to me at the moment.
    – Mona the Monad
    Nov 15 at 1:03












  • You can use DISM to apply an.WIM image to the partition, modify your current bootloader, to boot into the Windows bootloader (which will boot into your Windows installation). This prevents the Windows installer from modifying your current bootloader. A relatively simple process if you have the required data.
    – Ramhound
    Nov 15 at 1:04












  • @Ramhound DISM seems to be a Windows utility, and I do not use Windows. Is there something I can do from Linux, perhaps with tools like efibootmgr and dd and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
    – Mona the Monad
    Nov 15 at 1:08




















  • This question cannot be answered unless you tell us if you do or do not have that EFI data. Please edit your question and provide us the vital information necessary to answer this question.
    – Ramhound
    Nov 15 at 1:02












  • Assume that I do, as I tend to archive as much as I can. I don't actually know, myself, as the disk is not physically available to me at the moment.
    – Mona the Monad
    Nov 15 at 1:03












  • You can use DISM to apply an.WIM image to the partition, modify your current bootloader, to boot into the Windows bootloader (which will boot into your Windows installation). This prevents the Windows installer from modifying your current bootloader. A relatively simple process if you have the required data.
    – Ramhound
    Nov 15 at 1:04












  • @Ramhound DISM seems to be a Windows utility, and I do not use Windows. Is there something I can do from Linux, perhaps with tools like efibootmgr and dd and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
    – Mona the Monad
    Nov 15 at 1:08


















This question cannot be answered unless you tell us if you do or do not have that EFI data. Please edit your question and provide us the vital information necessary to answer this question.
– Ramhound
Nov 15 at 1:02






This question cannot be answered unless you tell us if you do or do not have that EFI data. Please edit your question and provide us the vital information necessary to answer this question.
– Ramhound
Nov 15 at 1:02














Assume that I do, as I tend to archive as much as I can. I don't actually know, myself, as the disk is not physically available to me at the moment.
– Mona the Monad
Nov 15 at 1:03






Assume that I do, as I tend to archive as much as I can. I don't actually know, myself, as the disk is not physically available to me at the moment.
– Mona the Monad
Nov 15 at 1:03














You can use DISM to apply an.WIM image to the partition, modify your current bootloader, to boot into the Windows bootloader (which will boot into your Windows installation). This prevents the Windows installer from modifying your current bootloader. A relatively simple process if you have the required data.
– Ramhound
Nov 15 at 1:04






You can use DISM to apply an.WIM image to the partition, modify your current bootloader, to boot into the Windows bootloader (which will boot into your Windows installation). This prevents the Windows installer from modifying your current bootloader. A relatively simple process if you have the required data.
– Ramhound
Nov 15 at 1:04














@Ramhound DISM seems to be a Windows utility, and I do not use Windows. Is there something I can do from Linux, perhaps with tools like efibootmgr and dd and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
– Mona the Monad
Nov 15 at 1:08






@Ramhound DISM seems to be a Windows utility, and I do not use Windows. Is there something I can do from Linux, perhaps with tools like efibootmgr and dd and whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
– Mona the Monad
Nov 15 at 1:08












1 Answer
1






active

oldest

votes

















up vote
1
down vote














Is there any way I can arbitrarily make some room and create a partition somewhere,




If you want to make some unallocated space on a disk entirely occupied by Linux, then you'd use Linux tools to shrink the Linux filesystem, and then the partition, resulting in unallocated space to the right of the shrunk partition.



The usual one-click method for this is GParted from a live CD.




/bin/dd the Windows partition to it, and somehow boot into it like old times?




Yes.




I only wanted to know if Windows would play nice with being moved around.




It varies. Windows doesn't care about absolute offsets, but there have been occassions of it being picky about its partition number (e.g. originally partition 2, now partition 4 on the exact same disk).




Does rEFInd help at all, here?




It's just an EFI boot menu that starts either vmlinuz.efi or MicrosoftBootmfgw.efi of your choice. It won't resize your partitions for you, and it won't have a special way of booting Windows that you wouldn't have otherwise.




Also, what if I, for some reason, forgot to backup the original ESP?




Boot from the matching Windows installation medium and use bcdboot to reinstall the Windows bootmanager into your current ESP.






share|improve this answer























  • Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
    – Mona the Monad
    Nov 15 at 22:01











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375514%2fmoving-windows-partition-efi-gpt%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote














Is there any way I can arbitrarily make some room and create a partition somewhere,




If you want to make some unallocated space on a disk entirely occupied by Linux, then you'd use Linux tools to shrink the Linux filesystem, and then the partition, resulting in unallocated space to the right of the shrunk partition.



The usual one-click method for this is GParted from a live CD.




/bin/dd the Windows partition to it, and somehow boot into it like old times?




Yes.




I only wanted to know if Windows would play nice with being moved around.




It varies. Windows doesn't care about absolute offsets, but there have been occassions of it being picky about its partition number (e.g. originally partition 2, now partition 4 on the exact same disk).




Does rEFInd help at all, here?




It's just an EFI boot menu that starts either vmlinuz.efi or MicrosoftBootmfgw.efi of your choice. It won't resize your partitions for you, and it won't have a special way of booting Windows that you wouldn't have otherwise.




Also, what if I, for some reason, forgot to backup the original ESP?




Boot from the matching Windows installation medium and use bcdboot to reinstall the Windows bootmanager into your current ESP.






share|improve this answer























  • Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
    – Mona the Monad
    Nov 15 at 22:01















up vote
1
down vote














Is there any way I can arbitrarily make some room and create a partition somewhere,




If you want to make some unallocated space on a disk entirely occupied by Linux, then you'd use Linux tools to shrink the Linux filesystem, and then the partition, resulting in unallocated space to the right of the shrunk partition.



The usual one-click method for this is GParted from a live CD.




/bin/dd the Windows partition to it, and somehow boot into it like old times?




Yes.




I only wanted to know if Windows would play nice with being moved around.




It varies. Windows doesn't care about absolute offsets, but there have been occassions of it being picky about its partition number (e.g. originally partition 2, now partition 4 on the exact same disk).




Does rEFInd help at all, here?




It's just an EFI boot menu that starts either vmlinuz.efi or MicrosoftBootmfgw.efi of your choice. It won't resize your partitions for you, and it won't have a special way of booting Windows that you wouldn't have otherwise.




Also, what if I, for some reason, forgot to backup the original ESP?




Boot from the matching Windows installation medium and use bcdboot to reinstall the Windows bootmanager into your current ESP.






share|improve this answer























  • Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
    – Mona the Monad
    Nov 15 at 22:01













up vote
1
down vote










up vote
1
down vote










Is there any way I can arbitrarily make some room and create a partition somewhere,




If you want to make some unallocated space on a disk entirely occupied by Linux, then you'd use Linux tools to shrink the Linux filesystem, and then the partition, resulting in unallocated space to the right of the shrunk partition.



The usual one-click method for this is GParted from a live CD.




/bin/dd the Windows partition to it, and somehow boot into it like old times?




Yes.




I only wanted to know if Windows would play nice with being moved around.




It varies. Windows doesn't care about absolute offsets, but there have been occassions of it being picky about its partition number (e.g. originally partition 2, now partition 4 on the exact same disk).




Does rEFInd help at all, here?




It's just an EFI boot menu that starts either vmlinuz.efi or MicrosoftBootmfgw.efi of your choice. It won't resize your partitions for you, and it won't have a special way of booting Windows that you wouldn't have otherwise.




Also, what if I, for some reason, forgot to backup the original ESP?




Boot from the matching Windows installation medium and use bcdboot to reinstall the Windows bootmanager into your current ESP.






share|improve this answer















Is there any way I can arbitrarily make some room and create a partition somewhere,




If you want to make some unallocated space on a disk entirely occupied by Linux, then you'd use Linux tools to shrink the Linux filesystem, and then the partition, resulting in unallocated space to the right of the shrunk partition.



The usual one-click method for this is GParted from a live CD.




/bin/dd the Windows partition to it, and somehow boot into it like old times?




Yes.




I only wanted to know if Windows would play nice with being moved around.




It varies. Windows doesn't care about absolute offsets, but there have been occassions of it being picky about its partition number (e.g. originally partition 2, now partition 4 on the exact same disk).




Does rEFInd help at all, here?




It's just an EFI boot menu that starts either vmlinuz.efi or MicrosoftBootmfgw.efi of your choice. It won't resize your partitions for you, and it won't have a special way of booting Windows that you wouldn't have otherwise.




Also, what if I, for some reason, forgot to backup the original ESP?




Boot from the matching Windows installation medium and use bcdboot to reinstall the Windows bootmanager into your current ESP.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 16 at 5:48

























answered Nov 15 at 5:09









grawity

227k35476539




227k35476539












  • Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
    – Mona the Monad
    Nov 15 at 22:01


















  • Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
    – Mona the Monad
    Nov 15 at 22:01
















Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
– Mona the Monad
Nov 15 at 22:01




Well, I'm certainly not unfamiliar with partition management. I only wanted to know if Windows would play nice with being moved around. Might be a while until I can actually try stuffing it back in.
– Mona the Monad
Nov 15 at 22:01


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1375514%2fmoving-windows-partition-efi-gpt%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Index of /

Tribalistas

Listed building