From Syslinux Wiki
Jump to: navigation, search


whichsys.c32 is a COM32 module for Syslinux that determines which command to execute, based on the Syslinux bootloader variant from which it is run.

It is only available in Syslinux 4.02 or later.


Usage:    whichsys.c32 [-iso- command] [-pxe- command] [-sys- command]


Boot the first hard disk when booted from ISOLINUX, boot the second hard disk (internal hard disk when your USB drive is detected as hard disk 1 by the BIOS) and swap drive numbers when booted from SYSLINUX:

whichsys.c32 -iso- chain.c32 hd0 -sys- chain.c32 hd1 swap
COM32 whichsys.c32
APPEND -iso- chain.c32 hd0 -sys- chain.c32 hd1 swap
COM32 whichsys.c32
APPEND -iso- localboot.c32 -1 -sys- chain.c32 hd1 swap 

Load a specifc config file for each bootloader:

whichsys.c32 -iso- config iso.cfg -sys- config sys.cfg -pxe- config pxe.cfg
COM32 whichsys.c32
APPEND -sys- config.c32 sys.cfg -iso- config.c32 iso.cfg
COM32 whichsys.c32
APPEND -ext- COM32 config.c32 <path/to/>ext.cfg -iso- COM32 config.c32 <path/to/>iso.cfg

Load a specifc LABEL entry (from the same config file) for each bootloader:

COM32 whichsys.c32
APPEND -sys- label4sys -iso- label4iso

where "label4sys" and "label4iso" are additional LABEL entries in the same "cfg" file as the whichsys.c32 statement.