[syslinux] MEMDISK without floppy drive
H. Peter Anvin
hpa at zytor.com
Wed Aug 27 11:24:19 PDT 2003
Robert Wruck wrote:
> I tried to use memdisk 2.06 to boot a floppy image on my notebook which
> doesn't have a floppy drive.
> The boot failed, because the bootstrap code tried to reset the floppy
> drive (int13, ah=00). Memdisk passes reset calls on to the original
> int13 handler, which returns failure, because there is no floppy drive
> to reset (#1).
BIOS bug; but probably a pretty common one.
> Also i noted that some boot records (notably some created by win9x) use
> the extended int13 calls (ah=4x) without checking for presence (ah=41).
> memdisk doesn't implement those (#2).
> Workaround for #1: only hand reset calls down to the original handler if
> it is meant for hard disks, too (high bit in dl set).
BROKEN. Sorry, that one is not acceptable. This one might be
appropriate for your particular system, but in the general case this
could cause some serious damage.
> i added the following lines to the Reset code:
> TRACER 'R'
> test dl,80h
> jnz .passon
> xor ax,ax
> [ original Reset code here ]
> Workaround for #2: I implemented the int13 ah=41,42,43,44,47 and 48
> functions (not well tested, though!).
> If someone is interested in those, i could post the patch.
Urrrk... this is pretty sensitive stuff. Implementing these should be
done correctly or not at all.
Win9x is trying to be "smart" and selects a boot sector based on what it
thinks the capabilities of your BIOS is at the time your created it. It
doesn't occur to it that you might not be booting on the same system; in
fact Micro$oft probably views this as a license violation and thinks
it's just a plus to screw you over.
I'm hesitant to implement EBIOS/EDD in memdisk, because it's complex and
(as you've discovered) hard to test. MEMDISK is also highly size-sensitive.
More information about the Syslinux