[syslinux] [PATCH] ifmemdsk.c32: Allow boot options based on presence of MEMDISK

Bernd Blaauw bblaauw at home.nl
Sun Aug 7 16:01:18 PDT 2011


Op 6-8-2011 11:43, Shao Miller schreef:
> Below, attached, and available at the 'ifmemdsk' branch at:
>
> http://git.zytor.com/?p=users/sha0/syslinux.git;a=commitdiff;h=a975c12919bbd48739fede4ebfe099d98b87192e
>
>
> Review welcome!

I've received a binary and did some short initial tests.
It appears the detection is based on memdisk itself , rather than which 
bootloader loaded it or which appended arguments were given. Good enough 
for me :)

Based on my needs (boot diskette image if Memdisk already loaded, 
otherwise show menu) I'll likely need 2 different config files, as shown 
below in some semi-syntax. Single config file impossible?

(Not showing a menu when MEMDISK detected works fine for ISOLINUX, for 
PXE-Linux it's probably an entirely different story as no menu was shown 
before.)


syslinux.cfg:
com32 ifmemdsk.c32 --mbfts [label 1] -- [label2]
label 1
kernel memdisk bootdisk.img
label 2
config bigmenu.cfg


and bigmenu.cfg being my current MENU.C32-using syslinux.cfg

Is there a way to specify alternate options if file doesn't exist or 
doesn't fit in memory? I guess options 3 and 4 are fallback for both the 
'memdisk detected' and the 'no memdisk found' scenario.


com32 ifmemdsk.c32 --mbfts label 1 -- label 2 -- label 3 --label 4
label 1
# small bootdisk image, will load always
kernel memdisk bootdisk.img

label 2
# Memdisk not found, so MEMDISK-load ISO(provided it exists and fits)
kernel memdisk iso bootcd.iso

label 3
# hm the ISO didn't exist, fallback..to same as 1
# provided memdisk doesn't hang
kernel memdisk bootdisk.img

label 4
# hm the ISO didn't fit in memory, fallback..to same as 1
# provided memdisk doesn't hang
kernel memdisk bootdisk.img




More information about the Syslinux mailing list