It appears that the easiest way to get a DOS disk image is to use VirtualBox, QEMU or Bochs. We get the CDROM ISO file from freedos.org. We'll use QEMU. First, create a 200MB DOS disk,
qemu-img create dos.img 200MThen run the emulator to boot from the ISO image,
qemu-system-i386 -m 16 -k en-us -rtc base=localtime -hda dos.img -cdrom FD12CD.iso -boot order=dWe proceed with installation. We did a full installation, which took about 89MB. Additionally packages can be installed by running fdimples. Included on the CD are games, including a version DOOM clone, BOOM, which runs fine on QEMU.
We can mount the disk image in Linux,
sudo mount -o loop,offset=32256 dos.img /mnt/dos/The offset is necessary, because the DOS partition starts at sector 63. We can write the disk image to the SD card
dd if=/dev/loop0 of=/dev/sdb1We install the DOS MBR by adding it as the second disk,
qemu-system-i386 -hda dos.img -hdb /dev/sdband run `fdsik /mbr 2`.
After that, we can directly boot the SD card,
qemu-system-i386 -hda /dev/sdbOn an older PC with Intel Core2 Duo, it boots directly with a USB uSD reader. Or we can use GRUB chain-loading,
set root=(hd1,msdos1)We added this as another menuentry to the grub.cfg file.
chainloader +1
boot
However, if we try chain-loading on Atomic Pi, we get the error message "invalid EFI file path". The Atomic Pi BIOS cannot load the legacy MBR; and it may not provide the BIOS that DOS is depended on. It does not seem to have the Compatibility Support Module to provide the legacy BIOS support.
Is it possible to have a BIOS compatibility layer?
No comments:
Post a Comment