How can I dual-boot the same (UEFI) Windows install from the metal as well as from qemu-kvm? ...
Why do we bend a book to keep it straight?
How to convince students of the implication truth values?
What font is "z" in "z-score"?
Do I really need to have a message in a novel to appeal to readers?
Is there such thing as an Availability Group failover trigger?
How would a mousetrap for use in space work?
Most bit efficient text communication method?
What is the meaning of the simile “quick as silk”?
Compare a given version number in the form major.minor.build.patch and see if one is less than the other
How do I find out the mythology and history of my Fortress?
When the Haste spell ends on a creature, do attackers have advantage against that creature?
What's the meaning of "fortified infraction restraint"?
Using et al. for a last / senior author rather than for a first author
Why are both D and D# fitting into my E minor key?
Would "destroying" Wurmcoil Engine prevent its tokens from being created?
Trademark violation for app?
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
If a contract sometimes uses the wrong name, is it still valid?
What are the out-of-universe reasons for the references to Toby Maguire-era Spider-Man in ITSV
また usage in a dictionary
How to find all the available tools in mac terminal?
Extracting terms with certain heads in a function
Denied boarding although I have proper visa and documentation. To whom should I make a complaint?
Amount of permutations on an NxNxN Rubik's Cube
How can I dual-boot the same (UEFI) Windows install from the metal as well as from qemu-kvm?
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to use BCDEdit to dual boot Windows installations?Using QEMU to install DOS on the second partition of a real HDD - Can it be done?stuck after first reboot with UEFI clean install of Windows 10Linux Mint 18, Windows 10, UEFI, dual boot, where to install GRUB?How to change locale of boot menu of Windows 10How can I enlarge the EFI partition on a dual boot-system with Windows and Linux?Removing and recreating EFI partitionHow does the Windows Boot Manager locate the BCD?How to boot a physical Linux partition with Qemu for Windows 10 X64 bit?Recover UEFI boot of Windows 10 after failed Linux install
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
The initial setup involves a machine that can dual-boot Fedora and Windows 10. GRUB can find both OSs and there is an entry in GRUB to chainload the Windows Boot Manager that has the Windows OS available.
I am trying to ditch dual-boot for qemu-kvm with VGA Passthrough, and my final goal is to achieve near-native performance with Windows for graphics-intensive purposes, while being able to firewall/monitor/NAT the Windows install from Fedora (via iptables on the bridged ethernet interface).
Both OSs are currently installed in the same hard drive, this is my blkid
without IDs:
/dev/sda1: LABEL="ESP" TYPE="vfat" PARTLABEL="EFI System Partition"
/dev/sda2: LABEL="LEGACYWIN" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda3: TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda4: TYPE="LVM2_member" PARTLABEL="Linux LVM"
/dev/sda5: LABEL="W10" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda6: TYPE="ext4"
/dev/sda7: TYPE="swap"
/dev/mapper/fedora-root: TYPE="ext4"
/dev/mapper/fedora-home: TYPE="ext4"
LEGACYWIN
is an old Windows install that is sitting waiting to be removed, never mind it.
I could have mounted a loop interface with the appropriate offsets for each partition and override the ESP partition with a shadow copy to avoid corrupting it from having it open on Fedora, but instead I just unmounted /boot/efi from Fedora and I'm mounting the whole drive as the following:
<domain>
<devices>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/sda'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
</devices>
</domain>
I'm using unit 1 instead of unit 0 because in the real hardware the disk sits too in the 2nd SATA port of the motherboard. On the metal there are two DVD drives attached, and in qemu too (I'm among the last people in the world with dual DVD drives still in working condition).
On the real hardware everything works as expected.
On qemu, the GRUB loader boots, and if I select Windows (I have disabled savedefault
so that GRUB does not need to write stuff to disk either) the Windows Boot Manager fires and a BSOD appears saying:
After multiple tries, the operating system on your PC failed to start, so it needs to be repaired.
Error code: 0xc0000001
Still, if I restart the machine, I can cold-boot Windows successfully.
I reboot the qemu domain and boot it from a Windows 10 ISO and click Repair.
If I click on DaRT, I see all options available, which means that the install disk could find my Windows install.
If I go back, and go to cmd.exe, after trying all possible combinations of bootrec
and bcdedit
within the VM, I still find I can boot from the metal, but not from qemu, interestingly enough.
I tried destroying completely the EFI/Microsoft folder and recreating it with bootrec.exe and also the following things:
> diskpart # to open diskpart
diskpart> sel vol 5 # The ESP volume
diskpart> assign letter s # To see the ESP in cmd
diskpart> exit
> dir s: # The EFI folder is there alongside everything
> bcdedit /store S:EFIMicrosoftBootBCD /v
-
Windows Boot Manager
--------------------
Identifier {x-x-x-x-x}
device partition=S:
path EFIMicrosoftBootbootmgfw.efi
description Windows Boot Manager
locale en-us
inherit {a-a-a-a-a}
default {y-y-y-y-y}
resumeobject {y-y-y-y-y}
displayorder {y-y-y-y-y}
toolsdisplayorder {z-z-z-z-z}
timeout 30
Windows Boot Loader
-------------------
Identifier {y-y-y-y-y}
device partition=E:
path windowssystem32winload.efi
description Windows 10
locale en-us
inherit {b-b-b-b-b}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=E:
systemroot windows
resumeobject {y-y-y-y-y}
nx OptIn
bootmenupolicy Standard
How can I better debug what is happening, or is there a better way to get this done?
I made it work at some point, but after switching to virtio drives, even switching back to sata drives won't do the trick anymore to boot Windows inside qemu (although Windows still boots fine when on the metal). So, it's probably not hardware-related.
The whole domain xml is available in a gist.
windows-10 qemu linux-kvm bcd libvirt
add a comment |
The initial setup involves a machine that can dual-boot Fedora and Windows 10. GRUB can find both OSs and there is an entry in GRUB to chainload the Windows Boot Manager that has the Windows OS available.
I am trying to ditch dual-boot for qemu-kvm with VGA Passthrough, and my final goal is to achieve near-native performance with Windows for graphics-intensive purposes, while being able to firewall/monitor/NAT the Windows install from Fedora (via iptables on the bridged ethernet interface).
Both OSs are currently installed in the same hard drive, this is my blkid
without IDs:
/dev/sda1: LABEL="ESP" TYPE="vfat" PARTLABEL="EFI System Partition"
/dev/sda2: LABEL="LEGACYWIN" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda3: TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda4: TYPE="LVM2_member" PARTLABEL="Linux LVM"
/dev/sda5: LABEL="W10" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda6: TYPE="ext4"
/dev/sda7: TYPE="swap"
/dev/mapper/fedora-root: TYPE="ext4"
/dev/mapper/fedora-home: TYPE="ext4"
LEGACYWIN
is an old Windows install that is sitting waiting to be removed, never mind it.
I could have mounted a loop interface with the appropriate offsets for each partition and override the ESP partition with a shadow copy to avoid corrupting it from having it open on Fedora, but instead I just unmounted /boot/efi from Fedora and I'm mounting the whole drive as the following:
<domain>
<devices>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/sda'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
</devices>
</domain>
I'm using unit 1 instead of unit 0 because in the real hardware the disk sits too in the 2nd SATA port of the motherboard. On the metal there are two DVD drives attached, and in qemu too (I'm among the last people in the world with dual DVD drives still in working condition).
On the real hardware everything works as expected.
On qemu, the GRUB loader boots, and if I select Windows (I have disabled savedefault
so that GRUB does not need to write stuff to disk either) the Windows Boot Manager fires and a BSOD appears saying:
After multiple tries, the operating system on your PC failed to start, so it needs to be repaired.
Error code: 0xc0000001
Still, if I restart the machine, I can cold-boot Windows successfully.
I reboot the qemu domain and boot it from a Windows 10 ISO and click Repair.
If I click on DaRT, I see all options available, which means that the install disk could find my Windows install.
If I go back, and go to cmd.exe, after trying all possible combinations of bootrec
and bcdedit
within the VM, I still find I can boot from the metal, but not from qemu, interestingly enough.
I tried destroying completely the EFI/Microsoft folder and recreating it with bootrec.exe and also the following things:
> diskpart # to open diskpart
diskpart> sel vol 5 # The ESP volume
diskpart> assign letter s # To see the ESP in cmd
diskpart> exit
> dir s: # The EFI folder is there alongside everything
> bcdedit /store S:EFIMicrosoftBootBCD /v
-
Windows Boot Manager
--------------------
Identifier {x-x-x-x-x}
device partition=S:
path EFIMicrosoftBootbootmgfw.efi
description Windows Boot Manager
locale en-us
inherit {a-a-a-a-a}
default {y-y-y-y-y}
resumeobject {y-y-y-y-y}
displayorder {y-y-y-y-y}
toolsdisplayorder {z-z-z-z-z}
timeout 30
Windows Boot Loader
-------------------
Identifier {y-y-y-y-y}
device partition=E:
path windowssystem32winload.efi
description Windows 10
locale en-us
inherit {b-b-b-b-b}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=E:
systemroot windows
resumeobject {y-y-y-y-y}
nx OptIn
bootmenupolicy Standard
How can I better debug what is happening, or is there a better way to get this done?
I made it work at some point, but after switching to virtio drives, even switching back to sata drives won't do the trick anymore to boot Windows inside qemu (although Windows still boots fine when on the metal). So, it's probably not hardware-related.
The whole domain xml is available in a gist.
windows-10 qemu linux-kvm bcd libvirt
add a comment |
The initial setup involves a machine that can dual-boot Fedora and Windows 10. GRUB can find both OSs and there is an entry in GRUB to chainload the Windows Boot Manager that has the Windows OS available.
I am trying to ditch dual-boot for qemu-kvm with VGA Passthrough, and my final goal is to achieve near-native performance with Windows for graphics-intensive purposes, while being able to firewall/monitor/NAT the Windows install from Fedora (via iptables on the bridged ethernet interface).
Both OSs are currently installed in the same hard drive, this is my blkid
without IDs:
/dev/sda1: LABEL="ESP" TYPE="vfat" PARTLABEL="EFI System Partition"
/dev/sda2: LABEL="LEGACYWIN" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda3: TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda4: TYPE="LVM2_member" PARTLABEL="Linux LVM"
/dev/sda5: LABEL="W10" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda6: TYPE="ext4"
/dev/sda7: TYPE="swap"
/dev/mapper/fedora-root: TYPE="ext4"
/dev/mapper/fedora-home: TYPE="ext4"
LEGACYWIN
is an old Windows install that is sitting waiting to be removed, never mind it.
I could have mounted a loop interface with the appropriate offsets for each partition and override the ESP partition with a shadow copy to avoid corrupting it from having it open on Fedora, but instead I just unmounted /boot/efi from Fedora and I'm mounting the whole drive as the following:
<domain>
<devices>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/sda'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
</devices>
</domain>
I'm using unit 1 instead of unit 0 because in the real hardware the disk sits too in the 2nd SATA port of the motherboard. On the metal there are two DVD drives attached, and in qemu too (I'm among the last people in the world with dual DVD drives still in working condition).
On the real hardware everything works as expected.
On qemu, the GRUB loader boots, and if I select Windows (I have disabled savedefault
so that GRUB does not need to write stuff to disk either) the Windows Boot Manager fires and a BSOD appears saying:
After multiple tries, the operating system on your PC failed to start, so it needs to be repaired.
Error code: 0xc0000001
Still, if I restart the machine, I can cold-boot Windows successfully.
I reboot the qemu domain and boot it from a Windows 10 ISO and click Repair.
If I click on DaRT, I see all options available, which means that the install disk could find my Windows install.
If I go back, and go to cmd.exe, after trying all possible combinations of bootrec
and bcdedit
within the VM, I still find I can boot from the metal, but not from qemu, interestingly enough.
I tried destroying completely the EFI/Microsoft folder and recreating it with bootrec.exe and also the following things:
> diskpart # to open diskpart
diskpart> sel vol 5 # The ESP volume
diskpart> assign letter s # To see the ESP in cmd
diskpart> exit
> dir s: # The EFI folder is there alongside everything
> bcdedit /store S:EFIMicrosoftBootBCD /v
-
Windows Boot Manager
--------------------
Identifier {x-x-x-x-x}
device partition=S:
path EFIMicrosoftBootbootmgfw.efi
description Windows Boot Manager
locale en-us
inherit {a-a-a-a-a}
default {y-y-y-y-y}
resumeobject {y-y-y-y-y}
displayorder {y-y-y-y-y}
toolsdisplayorder {z-z-z-z-z}
timeout 30
Windows Boot Loader
-------------------
Identifier {y-y-y-y-y}
device partition=E:
path windowssystem32winload.efi
description Windows 10
locale en-us
inherit {b-b-b-b-b}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=E:
systemroot windows
resumeobject {y-y-y-y-y}
nx OptIn
bootmenupolicy Standard
How can I better debug what is happening, or is there a better way to get this done?
I made it work at some point, but after switching to virtio drives, even switching back to sata drives won't do the trick anymore to boot Windows inside qemu (although Windows still boots fine when on the metal). So, it's probably not hardware-related.
The whole domain xml is available in a gist.
windows-10 qemu linux-kvm bcd libvirt
The initial setup involves a machine that can dual-boot Fedora and Windows 10. GRUB can find both OSs and there is an entry in GRUB to chainload the Windows Boot Manager that has the Windows OS available.
I am trying to ditch dual-boot for qemu-kvm with VGA Passthrough, and my final goal is to achieve near-native performance with Windows for graphics-intensive purposes, while being able to firewall/monitor/NAT the Windows install from Fedora (via iptables on the bridged ethernet interface).
Both OSs are currently installed in the same hard drive, this is my blkid
without IDs:
/dev/sda1: LABEL="ESP" TYPE="vfat" PARTLABEL="EFI System Partition"
/dev/sda2: LABEL="LEGACYWIN" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda3: TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda4: TYPE="LVM2_member" PARTLABEL="Linux LVM"
/dev/sda5: LABEL="W10" TYPE="ntfs" PARTLABEL="Microsoft basic data"
/dev/sda6: TYPE="ext4"
/dev/sda7: TYPE="swap"
/dev/mapper/fedora-root: TYPE="ext4"
/dev/mapper/fedora-home: TYPE="ext4"
LEGACYWIN
is an old Windows install that is sitting waiting to be removed, never mind it.
I could have mounted a loop interface with the appropriate offsets for each partition and override the ESP partition with a shadow copy to avoid corrupting it from having it open on Fedora, but instead I just unmounted /boot/efi from Fedora and I'm mounting the whole drive as the following:
<domain>
<devices>
<disk type='block' device='disk'>
<driver name='qemu' type='raw' cache='none'/>
<source dev='/dev/sda'/>
<target dev='sda' bus='sata'/>
<address type='drive' controller='0' bus='0' target='0' unit='1'/>
</disk>
</devices>
</domain>
I'm using unit 1 instead of unit 0 because in the real hardware the disk sits too in the 2nd SATA port of the motherboard. On the metal there are two DVD drives attached, and in qemu too (I'm among the last people in the world with dual DVD drives still in working condition).
On the real hardware everything works as expected.
On qemu, the GRUB loader boots, and if I select Windows (I have disabled savedefault
so that GRUB does not need to write stuff to disk either) the Windows Boot Manager fires and a BSOD appears saying:
After multiple tries, the operating system on your PC failed to start, so it needs to be repaired.
Error code: 0xc0000001
Still, if I restart the machine, I can cold-boot Windows successfully.
I reboot the qemu domain and boot it from a Windows 10 ISO and click Repair.
If I click on DaRT, I see all options available, which means that the install disk could find my Windows install.
If I go back, and go to cmd.exe, after trying all possible combinations of bootrec
and bcdedit
within the VM, I still find I can boot from the metal, but not from qemu, interestingly enough.
I tried destroying completely the EFI/Microsoft folder and recreating it with bootrec.exe and also the following things:
> diskpart # to open diskpart
diskpart> sel vol 5 # The ESP volume
diskpart> assign letter s # To see the ESP in cmd
diskpart> exit
> dir s: # The EFI folder is there alongside everything
> bcdedit /store S:EFIMicrosoftBootBCD /v
-
Windows Boot Manager
--------------------
Identifier {x-x-x-x-x}
device partition=S:
path EFIMicrosoftBootbootmgfw.efi
description Windows Boot Manager
locale en-us
inherit {a-a-a-a-a}
default {y-y-y-y-y}
resumeobject {y-y-y-y-y}
displayorder {y-y-y-y-y}
toolsdisplayorder {z-z-z-z-z}
timeout 30
Windows Boot Loader
-------------------
Identifier {y-y-y-y-y}
device partition=E:
path windowssystem32winload.efi
description Windows 10
locale en-us
inherit {b-b-b-b-b}
isolatedcontext Yes
allowedinmemorysettings 0x15000075
osdevice partition=E:
systemroot windows
resumeobject {y-y-y-y-y}
nx OptIn
bootmenupolicy Standard
How can I better debug what is happening, or is there a better way to get this done?
I made it work at some point, but after switching to virtio drives, even switching back to sata drives won't do the trick anymore to boot Windows inside qemu (although Windows still boots fine when on the metal). So, it's probably not hardware-related.
The whole domain xml is available in a gist.
windows-10 qemu linux-kvm bcd libvirt
windows-10 qemu linux-kvm bcd libvirt
asked 14 hours ago
ssicessice
691516
691516
add a comment |
add a comment |
0
active
oldest
votes
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',
autoActivateHeartbeat: false,
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
});
}
});
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%2f1426551%2fhow-can-i-dual-boot-the-same-uefi-windows-install-from-the-metal-as-well-as-fr%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2f1426551%2fhow-can-i-dual-boot-the-same-uefi-windows-install-from-the-metal-as-well-as-fr%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