pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/55582: OVMF files limit qemu boot capabilities
>Number: 55582
>Category: pkg
>Synopsis: OVMF files limit qemu boot capabilities
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Aug 17 20:30:00 +0000 2020
>Originator: Bob Nestor
>Release: pkgsrc-current
>Organization:
>Environment:
NetBSD 9.99.70 NetBSD 9.99.70 (GENERIC) #0: Fri Aug 14 03:54:46 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Some CDs and hard disks that are bootable on bare metal are not bootable under qemu and hang during boot about 2/3 of the way thru the process. This can be seen in the progress bar of the boot sequence. The problem appears to be the version of OVMF in pkgsrc, which is built off of a stable2018 release. Using the OVMF files built from the stable202005 release allows qemu to (mostly) boot from the problem CDs and hard disks. Even with the newer OVMF files there appear to be some issues with CDs, but booting from disks works.
>How-To-Repeat:
Download a copy of the rEFInd CD from
http://sourceforge.net/projects/refind/files/0.12.0/refind-cd-0.12.0.zip
Create a small bootable disk using files on the CD
#!/bin/sh
cwd=`pwd`
vndconfig -c vnd0 refind-cd-0.12.0.iso
mount -t cd9660 /dev/vnd0a /media
rm -fr refind.dsk /tmp/refind
mkdir -p -m 0755 /tmp/refind/EFI/boot /tmp/refind/EFI/refind
cp /media/refind/refind_x64.efi /tmp/refind/EFI/boot/bootx64.efi
cp -r /media/refind/* /tmp/refind/EFI/refind/
echo 'fs0:\EFI\refind\refind_x64.efi' >/tmp/refind/startup.nsh
cd /tmp/refind/EFI/refind
cp refind.conf-sample refind.conf
rm -fr bootaa64.efi drivers_aa64 bootia32.efi drivers_ia32 refind_aa64.efi
rm -fr refind_ia32.efi tools_aa64 tools_ia32
cd ${cwd}
umount /media
vndconfig -u vnd0
makefs -M 1m -m 4m -B 1234 -t msdos -o F=16,c=1 refind.dsk /tmp/refind
Try booting the newly created disk using
#!/bin/sh
vars="/tmp/OVMF_${1}.fd"
accel="-vga cirrus"
if [ ! -f ${vars} ]; then
dd if=/dev/zero of=${vars} count=4 bs=1024
fi
#ovmf=edk2/usr/share/edk2-ovmf/x64/OVMF_CODE.fd
ovmf=/usr/pkg/share/ovmf/OVMFX64.fd
qemu-system-x86_64 -m 4096 -machine q35 ${accel} -boot menu=on \
-device qemu-xhci -device usb-tablet -device usb-mouse -smbios type=2 \
-drive if=pflash,format=raw,readonly,file=${ovmf} \
-drive if=pflash,format=raw,file=${vars} \
-device ich9-ahci,id=sata \
-device ide-hd,bus=sata.0,drive=disk \
-drive id=disk,if=none,media=disk,format=raw,file=${disk}
The boot stalls with the boot progress bar about 2/3 of the way complete. Replacing the OVMF file with one built from the stable202005 release allows the boot to complete.
>Fix:
Updating the build of ovmf in pkgsrc to use the latest stable202005 release is the obvious solution, although it doesn't fully address the
problem of booting CDs like the rEFInd one which may be a problem in ovmf or in qemu.
I've looked at updating the build of ovmf in pkgsrc, but it's way over my head.
Home |
Main Index |
Thread Index |
Old Index