Patrick J. LoPresti
2004-Mar-25 20:22 UTC
[syslinux] Supporting WinImage compressed images
I am using PXELINUX, ISOLINUX, and memdisk in my project (http://unattended.sourceforge.net/). When memdisk gained support for compressed images, I started using it because it is cool. I used gzip to compress floppy.img to create floppy.imz, and all was good. But now my users are complaining that they cannot use WinImage (a Windows floppy image editing tool) to edit my floppy.imz files. I have learned that WinImage does understand compressed floppies, and it does use a ".imz" suffix for them, but they are not the same as the files produced by gzip. They are instead a ZIP archive containing a single "floppy.ima" (or "floppy.img") file. In other words, WinImage does not want the .imz file to be a straight compressed stream; it wants it to be an actual ZIP archive with one member. I have found that "gunzip" will handle either of these formats and generate the original 1.44M data stream. But memdisk (2.09-pre13) does not recognize it as a compressed file and chokes. I realize that compatibility with WinImage is probably a very low priority. But is there a chance you add it anyway? Or to put it another way... If I come up with patches to add support for these archives, might you accept them? Thank you! - Pat
Patrick, have you seen the "how to pass paramters from Syslinux to DOS images" thread? this mailinglist mentioned it first, and I paid attention :) http://www.911cd.net/forums/index.php?showtopic=5706 HPA, any chance for MDISKCHK to put the "CMDline=" line as first output? should not be so difficult for me but first have to figure out OpenWatCOM packages and setup. putting that line as first output would avoid putting the FIND program on bootdisk and thus save precious diskspace. (MDISKCHK | FIND "CMDLINE" > TEMP.BAT) MDISKCHK > temp.bat call temp.bat (which will contain CMDLINE "rest-of-output" and when invoked execute cmdline command, here represented by cmdline.bat cmdline.bat: @echo off rem put last commandline parameters passed to memdisk into variable. set param=%6 goto %param% rem rest of batchfile freedos emm386 also seems almost usable by now. Bernd Blaauw
Regarding arguments to DOS images: Check out people.cs.uchicago.edu/~gmurali/gui/downloads.html You may find getargs.c useful. - Murali On Thu, 25 Mar 2004, Blaauw,Bernd B. wrote:> Patrick, > have you seen the "how to pass paramters from Syslinux to DOS images" thread? > this mailinglist mentioned it first, and I paid attention :) > > http://www.911cd.net/forums/index.php?showtopic=5706 > > HPA, > any chance for MDISKCHK to put the "CMDline=" line as first output? > should not be so difficult for me but first have to figure out OpenWatCOM packages and setup. > > putting that line as first output would avoid putting the FIND program on bootdisk and thus save precious diskspace. (MDISKCHK | FIND "CMDLINE" > TEMP.BAT) > > MDISKCHK > temp.bat > call temp.bat > (which will contain CMDLINE "rest-of-output" and when invoked execute cmdline command, here represented by cmdline.bat > > cmdline.bat: > @echo off > rem put last commandline parameters passed to memdisk into variable. > set param=%6 > goto %param% > rem rest of batchfile > > freedos emm386 also seems almost usable by now. > > Bernd Blaauw > > _______________________________________________ > SYSLINUX mailing list > Submissions to SYSLINUX at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux > Please do not send private replies to mailing list traffic. > > >################################################################ # Ry 254, Ryerson Hall, # Ph : +1 773 702-1031 (Off) # # 1100 E 58th Street # +1 773 575-4836 (Cell) # # Chicago, IL - 60637, # URL : http://www.g-murali.com # # USA. # email: gmkrishn at cs.uchicago.edu # ################################################################
don't know if it's appreciated by the mailinglist owner to discuss this at the mailinglist. MDISKCHK has output: x1=y1, x2=y2 and so on. so what about a command GETARGS x1 which, if x1 has non-empty value, does SET x1=y1 in dos? (getargs.* exports the environment. maybe setenv() command?) @echo off rem get number of 512 byte units by querying for "len" getargs.com len if "%len%"=="" echo Memdisk not loaded because "len" not set. if "%len%"=="2880" echo 1.44MB image was loaded. getargs chs if "%chs%"=="80/2/18" echo 1.44MB image confirmed! thanks for repointing me to your code. Bernd
I dont think GETARGS can change the environment of its parent. Linux does not allow that. I think DOS does not allow that either. So for now you will have to say echo off getargs.com > CONFIG.BAT CALL CONFIG.BAT ... The other advantage of this is that all your scripts can CALL CONFIG.BAT to find all the boot time parameters. For example, my network script looks at one variable to decide whether (or how) to start network. Mount script looks at another variable to decide what (or whether) share to mount... - Murali> @echo off > rem get number of 512 byte units by querying for "len" > getargs.com len > if "%len%"=="" echo Memdisk not loaded because "len" not set. > if "%len%"=="2880" echo 1.44MB image was loaded. > getargs chs > if "%chs%"=="80/2/18" echo 1.44MB image confirmed! > > > thanks for repointing me to your code. > > Bernd > > _______________________________________________ > SYSLINUX mailing list > Submissions to SYSLINUX at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux > Please do not send private replies to mailing list traffic. > > >################################################################ # Ry 254, Ryerson Hall, # Ph : +1 773 702-1031 (Off) # # 1100 E 58th Street # +1 773 575-4836 (Cell) # # Chicago, IL - 60637, # URL : http://www.g-murali.com # # USA. # email: gmkrishn at cs.uchicago.edu # ################################################################