Accessing MEMDISK arguments from DOS

From Syslinux Wiki
Revision as of 13:26, 7 July 2010 by Hhullen (talk | contribs) (Category added)

Jump to: navigation, search

Many times it is very useful to be able to access the command line arguments given to MEMDISK from within the DOS image. This would allow one to combine several DOS images into one, by executing different scripts depending on the arguments. SYSLINUX provides this information via an API. Add from to your DOS image and use it as follows inside any of your .BAT files. > settings.BAT

If the call to MEMDISK was

memdisk initrd=my_dos.img ACTION=install NETSHARE=sharename

then after the call to settings.BAT the environment variables INITRD, ACTION and NETSHARE will be set to my_dos.img, install and sharename respectively.