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?
partitioning uefi bootloader gpt efi
add a comment |
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?
partitioning uefi bootloader gpt efi
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 likeefibootmgrandddand whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
– Mona the Monad
Nov 15 at 1:08
add a comment |
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?
partitioning uefi bootloader gpt efi
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
partitioning uefi bootloader gpt efi
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 likeefibootmgrandddand whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.
– Mona the Monad
Nov 15 at 1:08
add a comment |
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 likeefibootmgrandddand 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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
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
efibootmgrandddand whatnot? Unless you mean use a Windows installer (e.g. a CD) to "fix" the partition.– Mona the Monad
Nov 15 at 1:08