On Wed, 17 Mar 2021 10:08:56 +0100
Mateusz Viste <
[email protected]d> wrote:
Hello fellow programmers,
I am fiddling a little bit with building a bootable USB image with DOS
on it. So far I learned that there are 3 modes of USB booting:
* USB-HDD: the most common it seems, where the BIOS uses USB storage
to emulate a normal hard disk (DL=0x80 at boot time). The USB drive
must have a proper MBR for this to work, once booted under DOS the
drive appears as "C:". I was able to test this one on my laptop and
it works.
* USB-FDD: as far as I understand, this works by simply writing a
floppy image to the USB device, ie. no MBR, only the FAT12 fs is
present on the USB drive. Some obscure sources say that for this mode
to work, the USB drive should present itself with a name that hints
as a floppy vendor... I don't have any way of testing this so I can
only wonder.
* USB-ZIP: emulated ZIP-100 or ZIP-250 drive. Requires a specially
crafted MBR where only partition 4 is being used and its CHS geometry
must mimic an actual ZIP drive (64 heads, 32 sectors, 96 cylinders).
It would seem (?) that in this mode, the BIOS skips the MBR bootstrap
and loads the VBR right away. Once booted to DOS, the drive is
epxected to appear as "A:" (ie. DL=0).
Now my problem is much more practical: none of the PCs I have support
booting in either USB-ZIP nor USB-FDD modes, so I wonder how I could
test it.
Any idea how these modes (esp. USB-ZIP, as that's the one I am most interested in) could be tested in a virtualized environment? I have
read the QEMU manual but did not find anything that would hint at QEMU providing support for such USB booting. Did anyone here investigate
this subject in the past already? Any hints welcome!
There were some conversations on this on alt.os.development a few years
back.
Specifically, I never could get USB-FDD to work correctly for MS-DOS.
USB-HDD eventually worked, but not for the machine I wanted. This
implied that the BIOS emulation on one of the machines was flawed.
From a post of mine to a.o.d. in 2017, there was some more info on each
of the three modes:
"
USB-FDD is DL=0, no MBR, no partition, apparently needs a correct
device name, e.g., manufacturer's name of a physical floppy device
USB-ZIP is DL=0, one partition, boots VBR directly, skips boot code, 63
head/32 sectors preferred, translates disk calls from start of the
partition which hides data prior to the partition start, may need to
modify values in the VBR to boot correctly
USB-HDD is DL=80h, two partitions, or it may auto-select USB-ZIP with
only one partition for some BIOSes
"
Apparently, I found a clue indicating that there is a specification for
the modes out there somewhere.
--
Clinton: biter. Trump: grabber. Cuomo: groper. Biden: mauler.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)