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). 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). i added the following lines to the Reset code: Reset: TRACER 'R' test dl,80h jnz .passon xor ax,ax ret .passon: [ 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. cheers, robert
Robert Wruck <robert at rw-it.net> writes:> 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).I and several of my users (http://unattended.sourceforge.net/) have observed this as well. I have been assuming it was a BIOS problem. My workaround has been to attach a floppy drive, USB or otherwise, to the laptop before booting it. I have been considering switching to hard drive emulation, which works.> 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).Excellent! If this patch really fixes the problem, it will save me a bunch of work. Thank you! - Pat
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: > > Reset: > TRACER 'R' > test dl,80h > jnz .passon > xor ax,ax > ret > > .passon: > [ 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. -hpa