Difference between revisions of "Whichsys.c32"
From Syslinux Wiki
(Correction: "-ext-" is not an option, use "-sys-". Minor rewording. Wiki formatting.) |
m (Add Category "Examples". Minor wiki formatting.) |
||
Line 1: | Line 1: | ||
[[Category:Comboot]] | [[Category:Comboot]] | ||
+ | [[Category:Examples]] | ||
[[Category:Modules]] | [[Category:Modules]] | ||
− | '''whichsys.c32''' is a COM32 module for Syslinux that selects which command to execute, based on the Syslinux bootloader variant from which it is run. | + | '''whichsys.c32''' is a COM32 module for Syslinux that selects which command to execute, |
+ | based on the Syslinux bootloader variant from which it is run. | ||
It is available in Syslinux 4.02 or later. | It is available in Syslinux 4.02 or later. | ||
Line 73: | Line 75: | ||
APPEND -sys- label4sys -iso- label4iso | APPEND -sys- label4sys -iso- label4iso | ||
|} | |} | ||
− | where "label4sys" and "label4iso" are additional LABEL entries in the same "cfg" file as the whichsys.c32 statement. | + | : where "''label4sys''" and "''label4iso''" are additional LABEL entries <!-- |
+ | --> in the same "cfg" file as the whichsys.c32 statement. |
Latest revision as of 03:25, 24 May 2019
whichsys.c32 is a COM32 module for Syslinux that selects which command to execute,
based on the Syslinux bootloader variant from which it is run.
It is available in Syslinux 4.02 or later.
Usage
whichsys.c32 [-iso- command] [-pxe- command] [-sys- command] |
Examples
- Using additional COM32 modules:
When booted from | Execute this action |
---|---|
ISOLINUX | Boot the first hard disk |
SYSLINUX | Boot the second hard disk (that is, the internal hard disk when your USB drive is detected as hard disk 1 by the BIOS) and swap drive numbers |
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 |
COM32 whichsys.c32 APPEND -iso- LOCALBOOT -1 -sys- chain.c32 hd1 swap |
See also Config#LOCALBOOT and chain.c32.
- Load a specifc config file for each bootloader:
COM32 whichsys.c32 APPEND -iso- CONFIG iso.cfg -sys- CONFIG sys.cfg -pxe- CONFIG pxe.cfg |
whichsys.c32 -sys- config.c32 sys.cfg -iso- config.c32 iso.cfg |
COM32 whichsys.c32 APPEND -sys- COM32 config.c32 <path/to/>sys.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.