FS#57825 - [ovmf] 2MB firmware size causes existing VM not to boot

Attached to Project: Arch Linux
Opened by Jolan Luff (jolan) - Tuesday, 13 March 2018, 15:05 GMT
Last edited by Anatol Pomozov (anatolik) - Sunday, 08 March 2020, 02:33 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thomas Bächler (brain0)
Anatol Pomozov (anatolik)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

Hi,

I have a Windows 10 guest that no longer boots after upgrading from ovmf-1:r23112.018432f0ce-1 to ovmf-1:r23518.6d2d2e6e5b-1.

Additional info:

libvirt 4.0.0-1
linux 4.15.8-1
qemu 2.11.1-2
virt-manager 1.5.1-1

Steps to reproduce:

I simply upgraded ovmf and then tried to start up my Windows 10 64-bit VM. The TianoCore splash screen is never reached and the load reported by virt-manager stays constant rather than the normal peaks and valleys of a loading VM. I was unable to trigger a clean shutdown as well.

Upgrading ovmf to a newer revision didn't help.
Reverting to ovmf-1:r23112.018432f0ce-1 worked.
Staying on revision 6d2d2e6e5b and reverting the 2MB change also worked.

Is some sort of migration step needed? I haven't been able to find a reference for '2MB firmware size required by QEMU'.
This task depends upon

Closed by  Anatol Pomozov (anatolik)
Sunday, 08 March 2020, 02:33 GMT
Reason for closing:  Fixed
Comment by Anatol Pomozov (anatolik) - Tuesday, 13 March 2018, 17:51 GMT
The OVMF file size requirement comes from this QEMU snippet

if (bios_size <= 0 ||
(bios_size % 65536) != 0) {
goto bios_error;
}

https://github.com/qemu/qemu/blob/master/hw/i386/pc_sysfw.c#L193

The expected file size is multiple of 64KiB.



The flag you mentioned also presents in other distros e.g. Fedora
https://src.fedoraproject.org/rpms/edk2/blob/master/f/edk2.spec#_227


Out of curiosity if you try to copy Fedora's OVMF files, do you still experience problems with Windows booting? http://rpmfind.net/linux/rpm2html/search.php?query=edk2-ovmf
Comment by Jolan Luff (jolan) - Tuesday, 13 March 2018, 19:27 GMT
I extracted and tried both edk2-ovmf-20170209git296153c5-5.fc27.noarch.rpm and edk2-ovmf-20171011git92d07e4-5.fc29.noarch.rpm and couldn't get my existing Windows instance to boot with those either.

I tried ovmf-1:r23518.6d2d2e6e5b-1-any.pkg.tar.xz with a newly created Windows 10 VM and was able to boot the install media. I then re-tried my existing Windows 10 instance and it still doesn't boot.

I believe I've located the problem. There's some UEFI->NVRAM mapping. In /var/lib/libvirt/qemu/nvram, I see two files:

131072 Mar 13 14:03 win10-2_VARS.fd
540672 Mar 13 13:21 win10_VARS.fd

I renamed win10_VARS.fd to win10_VARS.fd.old and was able to boot my existing VM with 23518.6d2d2e6e5b-1. I guess it was just a mismatch between the two that was causing an error somewhere.

EDIT: Should also mention that I didn't notice any ill effects upon doing so.
Comment by Baris Demirdelen (barburger) - Sunday, 18 March 2018, 12:22 GMT
I can confirm I can not boot any of my ovmf guests using ovmf-1:r23518.6d2d2e6e5b-1 (Not even TianoCore splash screen comes), whereas with downgrading to ovmf-1:r23112.018432f0ce-1, i am able boot everything again.

I don't see any mismatched vars as Jolan found, and deleting everything in /var/lib/libvirt/qemu/nvram didn't help either.
Comment by jason (jason_hui) - Tuesday, 20 March 2018, 00:13 GMT
After upgrade to ovmf-1:r23518.6d2d2e6e5b-1, I can not boot up my windows 10 guest.
I can boot again by downgrading to ovmf-1:r23112.018432f0ce-1 or using the method from jolan with ovmf-1:r23518.6d2d2e6e5b-1.
Comment by Tomas (magni) - Friday, 20 April 2018, 17:36 GMT
I also had to downgrade to ovmf-1:r23112.018432f0ce-1 to be able to boot windows10.
Comment by Andrew Millington (Sephster) - Wednesday, 04 July 2018, 22:23 GMT
Similar is happening to me with a Win 10 guest. Like Jolan, if I stay on this build but revert the 2MB change, everything works fine.
Comment by Krister Bäckman (ixevix) - Wednesday, 26 September 2018, 12:55 GMT
I have this exact problem and have had it for a while. With ovmf after ovmf-1:r23112.018432f0ce-1 I cannot get my Windows 10 guest to boot. Have to try Jolan's fix when I get to my computer.
Comment by Krister Bäckman (ixevix) - Wednesday, 26 September 2018, 18:38 GMT
Yeah seemed to fix it.

Loading...