I have added instructions to memdisk.doc for how to disable MEMDISK. However, it's unlikely that this will work if you're running under DOS, since DOS will be very unhappy about drives changing underneath it. Anyway, until the next (pre)release comes out, here are the instructions: --- memdisk.doc 27 Apr 2004 06:49:36 -0000 1.10 +++ memdisk.doc 6 Jul 2004 01:29:03 -0000 @@ -122,5 +122,46 @@ [ES:DI+20] 16:16 Old INT 15h pointer [ES:DI+24] word Amount of DOS memory before MEMDISK loaded +In addition, the following fields are available at [ES:0]: + + [ES:0] word Offset of INT 13h routine (segment == ES) + [ES:2] word Offset of INT 15h routine (segment == ES) + The program mdiskchk.c in the sample directory is an example on how this API can be used. + +The following code can be used to "disable" MEMDISK. Note that it +does not free the handler in DOS memory, and that running this from +DOS will probably crash your machine (DOS doesn't like drives +suddenly disappearing from underneath): + + mov eax, 454D0800h + mov ecx, 444D0000h + mov edx, 53490000h + drive # + mov ebx, 3F4B0000h + int 13h + + shr eax, 16 + cmp ax, 4D21h + jne not_memdisk + shr ecx, 16 + cmp cx, 4D45h + jne not_memdisk + shr edx, 16 + cmp dx, 4944h + jne not_memdisk + shr ebx, 16 + cmp bx, 4B53h + jne not_memdisk + + di + mov bx,[es:0] ; INT 13h handler offset + mov eax,[es:di+16] ; Old INT 13h handler + mov byte [es:bx], 0EAh ; FAR JMP + mov [es:bx+1], eax + + mov bx,[es:2] ; INT 15h handler offset + mov eax,[es:di+20] ; Old INT 15h handler + mov byte [es:bx], 0EAh ; FAR JMP + mov [es:bx+1], eax + ei
> I have added instructions to memdisk.doc for how to disable MEMDISK. > However, it's unlikely that this will work if you're running under DOS, > since DOS will be very unhappy about drives changing underneath it.My goal is to boot DOS/FreeDOS via memdisk, do a few things and disable the virtual floppy created by memdisk and continue to boot the local hard disk or an etherboot .com file. So is there a way to delete the virtual floppy and load a .com file afterwards (probably not because there is no longer a ramdisk to store it) or a way to combine the program that deletes the virtual floppy with the etherboot .com file? Here is a related question: How do I delete the ramdisk and continue to boot the local hard disk/ floppy/ cdrom? Alex
>>> OK, here is a hideously ugly and completely untested way of doing >>> it. Prefix the .com program with this code, i.e. do something like: >> > > Please use this source instead. I had missed something obvious.My first impression: It works! (etherboot is still usable) Thank you hpa! I will do further tests and report the results. Here is what happened (I used a 3com 905 tx-m NIC with PXE): - pxelinux bootet memdisk - memdisk loaded an image of a Windows98SE boot disk with the required .com files (and without himem.sys/emm386; no autoexec.bat, no config.sys, no drivers) - I combined your program with the etherboot .com 5.3.8 UNDI driver and started it. - Etherboot loads my .nbi image of Thinstation Linux and it works I have not checked whether the virtual floppy is really gone or not but I will do it tomorrow (It is 2am here and I need some sleep). Alex
does this imply there will be a utility that allows you to return to ISOLINUX? syslinux -> menu -> option -> memdisk -> disk image -> DOS -> do_stuff -> exitmdsk -> isolinux I guess HPA's program/patch instead causes a "load loader in RAM, destroy memdisk, execute payload". (in your case: etherboot) so for PreOS this means: boothd.com -> "destroy memdisk + localboot 0x80", just like 3Com's pboot.exe ?? nice trick :) Bernd @echo off rem if boot.ini does exist, then destroy MEMDISK and boot harddisk. rem checking existence could be done using a c32 module, rem but running Ghost does require DOS and thus MEMDISK. if exist c:\boot.ini boothd.com ghost /options \\server\\share\\image.gho reboot.com ---------------------------------------------------------------- Op deze e-mail zijn de volgende voorwaarden van toepassing: http://www.fontys.nl/disclaimer The above disclaimer applies to this e-mail message. ----------------------------------------------------------------