使用ISOLinux制作Linux系统安装盘
ISOLINUX is a boot loader for Linux/i386 that operates off ISO 9660/El
Torito CD-ROMs in “no emulation” mode. This avoids the need to create
an “emulation disk image” with limited space (for “floppy emulation”)
or compatibility problems (for “hard disk emulation”.)
To create an image, create a directory called “isolinux” (or, if you
prefer, “boot/isolinux”) underneath the root directory of your ISO
image master file tree. Copy isolinux.bin, a config file called
“isolinux.cfg” (see syslinux.txt for details on the configuration
file), and all necessary files (kernels, initrd, display files, etc.)
into this directory, then use the following command to create your ISO
image (add additional options as appropriate, such as -J or -R):
mkisofs -o <isoimage> \
-b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
<root-of-iso-tree>
(If you named the directory boot/isolinux that should of course be
-b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat.)
ISOLINUX will search for the config file directory in the order
/boot/isolinux, /isolinux, /. The first directory that exists is
used, even if it contains no files. Therefore, please make sure that
these directories don’t exist if you don’t want ISOLINUX to use them.
isolinux.cfg配置示例
display boot.msg
default microcore
label microcore
kernel /boot/vmlinuz
initrd /boot/core.gz
append loglevel=3
label mc
kernel /boot/vmlinuz
append initrd=/boot/core.gz loglevel=3
implicit 0
prompt 1
timeout 300
F1 boot.msg
F2 f2
F3 f3
F4 f4
All options here applies to PXELINUX, ISOLINUX and EXTLINUX as well as
SYSLINUX unless otherwise noted. See the respective .txt files.
#comment
A comment line. The whitespace after the hash mark is mandatory.
INCLUDE filename
Inserts the contents of another file at this point in the
configuration file. Files can currently be nested up to 16
levels deep, but it is not guaranteed that more than 8 levels
will be supported in the future.
DEFAULT kernel options…
Sets the default command line. If SYSLINUX boots automatically,
it will act just as if the entries after DEFAULT had been typed
in at the “boot:” prompt.
If no configuration file is present, or no DEFAULT entry is
present in the config file, the default is "linux auto".
NOTE: Earlier versions of SYSLINUX used to automatically
append the string "auto" to whatever the user specified using
the DEFAULT command. As of version 1.54, this is no longer
true, as it caused problems when using a shell as a substitute
for "init." You may want to include this option manually.
APPEND options…
Add one or more options to the kernel command line. These are
added both for automatic and manual boots. The options are
added at the very beginning of the kernel command line,
usually permitting explicitly entered kernel options to override
them. This is the equivalent of the LILO “append” option.
IPAPPEND flag_val [PXELINUX only]
The IPAPPEND option is available only on PXELINUX. The
flag_val is an OR of the following options:
1: indicates that an option of the following format
should be generated and added to the kernel command line:
ip=<client-ip>:<boot-server-ip>:<gw-ip>:<netmask>
... based on the input from the DHCP/BOOTP or PXE boot server.
THE USE OF THIS OPTION IS NOT RECOMMENDED. If you have to use
it, it is probably an indication that your network configuration
is broken. Using just "ip=dhcp" on the kernel command line
is a preferrable option, or, better yet, run dhcpcd/dhclient,
from an initrd if necessary.
2: indicates that an option of the following format
should be generated and added to the kernel command line:
BOOTIF=<hardware-address-of-boot-interface>
... in dash-separated hexadecimal with leading hardware type
(same as for the configuration file; see pxelinux.txt.)
This allows an initrd program to determine from which
interface the system booted.
LABEL label
KERNEL image
APPEND options…
IPAPPEND flag_val [PXELINUX only]
Indicates that if “label” is entered as the kernel to boot,
SYSLINUX should instead boot “image”, and the specified APPEND
and IPAPPEND options should be used instead of the ones
specified in the global section of the file (before the first
LABEL command.) The default for “image” is the same as
“label”, and if no APPEND is given the default is to use the
global entry (if any).
Starting with version 2.20, LABEL statements are compressed
internally, therefore the maximum number of LABEL statements
depends on their complexity. Typical is around 600. SYSLINUX
will print an error message if the internal memory for labels
is overrun.
Note that LILO uses the syntax:
image = mykernel
label = mylabel
append = "myoptions"
... whereas SYSLINUX uses the syntax:
label mylabel
kernel mykernel
append myoptions
Note: The "kernel" doesn't have to be a Linux kernel; it can
be a boot sector or a COMBOOT file (see below.)
Since version 3.32 label names are no longer mangled into DOS
format (for SYSLINUX.)
LINUX image - Linux kernel image (default)
BOOT image - Bootstrap program (.bs, .bin)
BSS image - BSS image (.bss)
PXE image - PXE Network Bootstrap Program (.0)
FDIMAGE image - Floppy disk image (.img)
COMBOOT image - COMBOOT program (.com, .cbt)
COM32 image - COM32 program (.c32)
CONFIG image - New configuration file
Using one of these keywords instead of KERNEL forces the
filetype, regardless of the filename.
CONFIG means restart the boot loader using a different
configuration file.
APPEND -
Append nothing. APPEND with a single hyphen as argument in a
LABEL section can be used to override a global APPEND.
LOCALBOOT type [ISOLINUX, PXELINUX]
On PXELINUX, specifying “LOCALBOOT 0” instead of a “KERNEL”
option means invoking this particular label will cause a local
disk boot instead of booting a kernel.
The argument 0 means perform a normal boot. The argument 4
will perform a local boot with the Universal Network Driver
Interface (UNDI) driver still resident in memory. Finally,
the argument 5 will perform a local boot with the entire PXE
stack, including the UNDI driver, still resident in memory.
All other values are undefined. If you don't know what the
UNDI or PXE stacks are, don't worry -- you don't want them,
just specify 0.
On ISOLINUX, the "type" specifies the local drive number to
boot from; 0x00 is the primary floppy drive and 0x80 is the
primary hard drive. The special value -1 causes ISOLINUX to
report failure to the BIOS, which, on recent BIOSes, should
mean that the next boot device in the boot sequence should be
activated.
IMPLICIT flag_val
If flag_val is 0, do not load a kernel image unless it has been
explicitly named in a LABEL statement. The default is 1.
ALLOWOPTIONS flag_val
If flag_val is 0, the user is not allowed to specify any
arguments on the kernel command line. The only options
recognized are those specified in an APPEND statement. The
default is 1.
TIMEOUT timeout
Indicates how long to wait at the boot: prompt until booting
automatically, in units of 1/10 s. The timeout is cancelled as
soon as the user types anything on the keyboard, the assumption
being that the user will complete the command line already
begun. A timeout of zero will disable the timeout completely,
this is also the default.
TOTALTIMEOUT timeout
Indicates how long to wait until booting automatically, in
units of 1/10 s. This timeout is not cancelled by user
input, and can thus be used to deal with serial port glitches
or “the user walked away” type situations. A timeout of zero
will disable the timeout completely, this is also the default.
Both TIMEOUT and TOTALTIMEOUT can be used together, for
example:
# Wait 5 seconds unless the user types something, but
# always boot after 15 minutes.
TIMEOUT 50
TOTALTIMEOUT 9000
ONTIMEOUT kernel options…
Sets the command line invoked on a timeout. Normally this is
the same thing as invoked by “DEFAULT”. If this is specified,
then “DEFAULT” is used only if the user presses to
boot.
ONERROR kernel options…
If a kernel image is not found (either due to it not existing,
or because IMPLICIT is set), run the specified command. The
faulty command line is appended to the specified options, so
if the ONERROR directive reads as:
ONERROR xyzzy plugh
... and the command line as entered by the user is:
foo bar baz
... SYSLINUX will execute the following as if entered by the
user:
xyzzy plugh foo bar baz
SERIAL port [[baudrate] flowcontrol]
Enables a serial port to act as the console. “port” is a
number (0 = /dev/ttyS0 = COM1, etc.) or an I/O port address
(e.g. 0x3F8); if “baudrate” is omitted, the baud rate defaults
to 9600 bps. The serial parameters are hardcoded to be 8
bits, no parity, 1 stop bit.
"flowcontrol" is a combination of the following bits:
0x001 - Assert DTR
0x002 - Assert RTS
0x010 - Wait for CTS assertion
0x020 - Wait for DSR assertion
0x040 - Wait for RI assertion
0x080 - Wait for DCD assertion
0x100 - Ignore input unless CTS asserted
0x200 - Ignore input unless DSR asserted
0x400 - Ignore input unless RI asserted
0x800 - Ignore input unless DCD asserted
All other bits are reserved.
Typical values are:
0 - No flow control (default)
0x303 - Null modem cable detect
0x013 - RTS/CTS flow control
0x813 - RTS/CTS flow control, modem input
0x023 - DTR/DSR flow control
0x083 - DTR/DCD flow control
For the SERIAL directive to be guaranteed to work properly, it
should be the first directive in the configuration file.
NOTE: "port" values from 0 to 3 means the first four serial
ports detected by the BIOS. They may or may not correspond to
the legacy port values 0x3F8, 0x2F8, 0x3E8, 0x2E8.
CONSOLE flag_val
If flag_val is 0, disable output to the normal video console.
If flag_val is 1, enable output to the video console (this is
the default.)
Some BIOSes try to forward this to the serial console and
sometimes make a total mess thereof, so this option lets you
disable the video console on these systems.
FONT filename
Load a font in .psf format before displaying any output
(except the copyright line, which is output as ldlinux.sys
itself is loaded.) SYSLINUX only loads the font onto the
video card; if the .psf file contains a Unicode table it is
ignored. This only works on EGA and VGA cards; hopefully it
should do nothing on others.
KBDMAP keymap
Install a simple keyboard map. The keyboard remapper used is
very simplistic (it simply remaps the keycodes received from
the BIOS, which means that only the key combinations relevant
in the default layout – usually U.S. English – can be
mapped) but should at least help people with AZERTY keyboard
layout and the locations of = and , (two special characters
used heavily on the Linux kernel command line.)
The included program keytab-lilo.pl from the LILO distribution
can be used to create such keymaps. The file keytab-lilo.txt
contains the documentation for this program.
DISPLAY filename
Displays the indicated file on the screen at boot time (before
the boot: prompt, if displayed). Please see the section below
on DISPLAY files.
NOTE: If the file is missing, this option is simply ignored.
SAY message
Prints the message on the screen.
PROMPT flag_val
If flag_val is 0, display the boot: prompt only if the Shift or Alt
key is pressed, or Caps Lock or Scroll lock is set (this is the
default). If flag_val is 1, always display the boot: prompt.
NOESCAPE flag_val
If flag_val is set to 1, ignore the Shift/Alt/Caps Lock/Scroll
Lock escapes. Use this (together with PROMPT 0) to force the
default boot alternative.
F1 filename
F2 filename
…etc…
F9 filename
F10 filename
F11 filename
F11 filename
Displays the indicated file on the screen when a function key is
pressed at the boot: prompt. This can be used to implement
pre-boot online help (presumably for the kernel command line
options.) Please see the section below on DISPLAY files.
When using the serial console, press <Ctrl-F><digit> to get to
the help screens, e.g. <Ctrl-F><2> to get to the F2 screen.
For F10-F12, hit <Ctrl-F><A>, <Ctrl-F>B, <Ctrl-F>C. For
compatiblity with earlier versions, F10 can also be entered as
<Ctrl-F>0.
参考链接:
https://www.syslinux.org/old/iso.php
https://blog.csdn.net/weixin_32559133/article/details/116921383