[syslinux] [PATCH] gfxboot.c: gfx_media_type settingimplementedfor isolinux

Sebastian Herbszt herbszt at gmx.de
Sun May 30 13:45:59 PDT 2010


Sebastian Herbszt wrote:
> Anton V. Boyarshinov wrote:
>> On Sat, 29 May 2010 21:06:51 +0200 Sebastian Herbszt wrote:
>> 
>>> > Here is a small patch, implementing gfx_media_type calculation when 
>>> > isolinux is used.
>>> 
>>> What about SYSLINUX and EXTLINUX?
>> I think that in most cases SYSLINUX and EXTLINUX booted from HD
>> (default zero) or, sometimes, from floppy. But i don't know well how to
>> detect floppy. And i think that a part is better then nothing.
> 
> I will try the following:
> 
> if (drive_number < 0x80 ) then floppy else disk;
> if (filesystem == SYSLINUX_FS_ISOLINUX) then check cd_mode;
> 
> Not sure what to do with PXELINUX because gfxboot doesn't have a media type
> for it. Currently we set boot_drive to 0 so maybe set the media type to floppy too.
> 
>> And really it was a fix for real life problem with automatic selection
>> of installation source while boot from HYBRID ISO.
>> 
>> Anton

Please try the following patch on top of my gfxboot32 branch.

Sebastian

diff --git a/com32/gfxboot/gfxboot.c b/com32/gfxboot/gfxboot.c
index b3ee676..93d069d 100644
--- a/com32/gfxboot/gfxboot.c
+++ b/com32/gfxboot/gfxboot.c
@@ -199,6 +199,12 @@ int main(int argc, char **argv)
     gfx_config.boot_drive = 0;
   }

+  gfx_config.media_type = gfx_config.boot_drive < 0x80 ? 1 : 0;
+
+  if(sdi->c.filesystem == SYSLINUX_FS_ISOLINUX) {
+    gfx_config.media_type = sdi->iso.cd_mode ? 0 : 2;
+  }
+
   gfx_config.bootloader = 1;
   gfx_config.sysconfig_size = sizeof gfx_config;
   gfx_config.bootloader_seg = 0;       // apparently not needed




More information about the Syslinux mailing list