Qemu/Bochs测试Duet软盘镜像卡滞“Welcome to Efi World!”求助
I’ve run into similar issues with Duet-based EFI images in emulators before—real hardware works fine, but simulators get stuck early because of memory layout mismatches. Here’s how to tweak Qemu and Bochs to get your image running:
Qemu Configuration Tweaks
Duet often struggles with the default large memory allocations or modern chipset emulation in Qemu. Try these steps:
Limit Memory Size: Start with a smaller memory footprint, as Duet was originally designed for systems with less RAM. Use the
-mflag to set 256MB or 512MB:# For 32-bit x86 qemu-system-i386 -fda your_duet_image.img -m 256M # For 64-bit x86 qemu-system-x86_64 -fda your_duet_image.img -m 256MUse Legacy Chipset Emulation: Newer chipset emulation (like Q35) can have memory mapping that Duet doesn’t handle well. Switch to the older i440fx chipset:
qemu-system-i386 -fda your_duet_image.img -M pc-i440fx-legacy -m 256MEnable Verbose Logging for Debugging: If the above doesn’t work, add debug flags to see what’s failing:
qemu-system-i386 -fda your_duet_image.img -m 256M -d guest_errors,unimp -D qemu_debug.logCheck
qemu_debug.logfor memory access errors or unimplemented instructions that might be blocking boot.
Bochs Configuration Tweaks
Bochs requires editing its configuration file (usually bochsrc.txt) to adjust memory settings:
Reduce Allocated Memory: Find the
megsline and set it to 256:megs: 256Simplify Hardware Emulation: Disable PCI emulation if you don’t need it, as it can interfere with Duet’s memory detection:
pci: enabled=0Use Legacy BIOS Images: Ensure Bochs uses a compatible BIOS version. Update the
romimageandvgaromimagelines to point to legacy BIOS files (adjust paths to match your Bochs installation):romimage: file=/usr/share/bochs/BIOS-bochs-latest vgaromimage: file=/usr/share/bochs/VGABIOS-lgpl-latestEnable Boot Logging: Add a log line to capture boot errors:
log: bochs_boot.logLook for memory-related errors in
bochs_boot.logafter attempting to start Bochs.
Additional Tips
- Verify you’re using the latest stable version of Duet—older versions have more compatibility issues with emulators.
- If you’re using a custom Duet build, double-check that the memory detection logic is configured to handle emulator environments (some builds are optimized for real hardware).
内容的提问来源于stack exchange,提问作者david moheban

