Isolinux HowTo For Newbies
Isolinux HowTo For Newbies
GENERAL:
Isolinux is CD boot loader with a posibilities like: booting floppy images (using
MEMDISK), booting CD boot sectors, booting linux kernels and passing parameters to
kernels/initrd if needed.
Legend:
blue text - predefined names or command names and cannot be changed by user
red text - user defined names
Isolinux files:
isolinux.bin - boot loader for no-emulation boot
memdisk - this file is used to load floppy and HDD images
isolinux.cfg - configuration file
*.txt / *.msg - text files with some commands. This files are used for making boot
messages - splash screens
*.lss - Isolinux graphic splash screen
isolinux.bin
This file is loader himself. If you are making bootable CD that uses Isolinux for
booting, then point your CD-burning software to this file when it ask for boot sector.
Memdisk
This file is loader for floppy and HDD images. Memdisk is called by isolinux.bin
according to options specified in isolinux.cfg.
For a floppy image, the size of the image should be exactly one of the following:
isolinux.cfg
This is configuration file for isolinux. It is a plain text file and can be edited in any text
editor.
Options in isolinux.cfg DON'T have a particular order. Isolinux.cfg can be in DOS or
Linux text format.
Items/commands in isolinux.cfg:
DEFAULT {label name or kernel options} - specifies what will be booted after boot
timeout or if user just hits ENTER without specifiing boot options.
example:
DEFAULT myDOS - this will work just like you have typed myDOS at boot prompt,
that means - it will boot anything that is specified in label myDOS (see label item)
DEFAULT kernel bootsec.bin - this will boot bootsec.bin (for example WindowsXP
installation CD boot sector)
LABEL {label name} - This is a section that explains boot options for {label name}.
example 1:
LABEL myDOS
kernel memdisk
append initrd=DOS.IMG
This means: if user types myDOS at boot prompt then use memdisk (as kernel) to
load DOS.IMG (floppy image file).
example 2:
LABEL oldbootcd
kernel bootsec.bin
This means: if user types oldbootcd at boot prompt then load CD boot sector as
kernel (this can be used if you integrate more bootable CDs to your multiboot CD or
to load any other no-emulation boot sector). With this method you can load BCDW,
BScriptor or CDShell from Isolinux ( see Links section ).
example 3:
LABEL linux
kernel vmlinuz
append max_loop=255 initrd=initrd.gz init=linuxrc livecd_subdir=/ ...
This means: if user types linux at boot prompt then load linux kernel and pass
parameters from append section to linux kernel (used for live linux CDs).
example 4:
LABEL hdd
localboot 0x80
This means: if user types hdd at boot prompt then boot from first partition of first
HDD.
Valid parameters for localboot are:
0x80 - first partition of first HDD (C: in DOS)
0x81 - 2nd partition of first HDD (D: in DOS)
0x00 - first floppy drive (A: in DOS)
....etc
-1 - tell BIOS to boot from next device listed in BIOS
example 5 :
LABEL somethig
kernel memdisk
append myFolder/myDisk.img
This is example how you can use folders. In this example isolinux will search for
myDisk.img in subfolder of folder that contains isolinux.cfg (in most cases this is
/Isolinux folder). If isolinux.cfg is in folder /Isolinux, then myDisk.img should be in
/Isolinux/myFolder.
example 6:
LABEL something
kernel /vmlinuz
append max_loop=255 initrd=/initrd.gz init=linuxrc livecd_subdir=/ ...
This one will search for vmlinuz in a parent folder of folder that contains isolinux.cfg.
It will also search for initrd.gz in parent folder ( "/" before vmlinuz and before
initrd.gz). If isolinux.cfg folder is /Isolinux then files will be searched in root folder of
the CD.
example 7:
LABEL something
kernel /livelin/vmlinuz
append max_loop=255 initrd=/livelin/initrd.gz init=linuxrc livecd_subdir=/ ...
This one will search for vmlinuz and initrd.gz in following way: go to the parent folder
of folder containing isolinux.cfg (in most cases this if /Isolinux folder), now go to the
subfolder livelin and find files there. Kernel file and initrd file don't need to be in the
same folder.
TIMEOUT x - set timeout in 1/10 sec. If user don't type anything at boot prompt in
time set by TIMEOUT, then DEFAULT or ONTIMEOUT will be executed ( see
ONTIMEOUT for details).
DISPLAY filename - display text (splash screen) specified with filename before boot
prompt (at isolinux start). Splash screen is text file that can contain some commands.
Extension of splash screen files can be ANY (.txt .msg .xyz...) except of: .0 .bin
.bs .bss .c32 .cbt .com .img
F1 filename - display text (same kind of text files as for DISPLAY) if user press F1.
Same for F2 F3 ... F9 F0.
PROMPT x - If x 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 x is 1, always display the boot
prompt. My advice: - use PROMPT 1.
Notes:
-command names are case insensitive, but label names are case sensitive.
-isolinux.bin will search for isolinux.cfg file in following folders on CD: / (root of
CD), /boot, /isolinux
Example of isolinux.cfg:
# hd
label 0
localboot 0x80
# floppy
label a
localboot 0x00
# cancel and try next boot device
label q
localboot -1
# MY BOOT
label mydos
kernel memdisk
append initrd=BOBBY71p.IMG
# MY BOOT2
label mydos2
kernel memdisk
append initrd=BOBBY71s.IMG
# part image
label 11
kernel partimg/vmlinuz
append initrd=partimg/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw
root=/dev/ram
# movix vesa
label VE
kernel kernel/vmlinuz
append initrd=initrd.gz load_ramdisk=1 prompt_ramdisk=0
ramdisk_size=62000 rw root=/dev/ram0 LABEL=vesa video=vesa:off
timeout 200
F1 DOS.TXT
F2 MOVIX2.txt
F3 UTIL.TXT
F4 LINUX.TXT
F5 MX2HELP.TXT
F6 TRBLST.TXT
F7 MPHELP.TXT
F8 PARTIMG.TXT
F9 WELCOME.TXT
F0 WELCOME.TXT
There are many names for Isolinux display file, like : splash message, splash screen...
so don't get confused about this.
As we saw in Part1, there is a default display message often called Welcome
message, and messages linked to Function keys ( F1, F2....).
There is no structure differences between this messages. They are the same kind of
files.
Isolinux display messages can contain plain text and some commands that are used
for text color attributes (foreground and background), clear screen command, etc...
Isolinux can display messages in two different modes: graphic and text mode.
In text mode, Isolinux can display only text messages that contains just ASCII codes
(extended ASCII table with 255 characters) - look at www.asciitable.com for details
on this character set. Isolinux can also display messages with custom font, but this
won't be disscused in this document.
In graphic mode, Isolinux can display images in LSS16 format (used just by Isolinux
and other programs from this family). The image is displayed in 640x480 16-color
mode. Once in graphics mode, the text color attributes work slightly differently: the
background color is ignored, and the foreground colors are the 16 colors specified in
the image file. For that reason, ppmtolss16 Perl script included in Syslinux package
allows you to specify that certain colors should be assigned to specific color indicies.
Color indicies 0 and 7, in particular, should be chosen with care: 0 is the background
color, and 7 is the color used for the text printed by isolinux itself. To use ppmtolss16
Perl script in Windows you need to have Perl interpreter installed (for example Active
Perl). Other solution is to use PPMtoLSS from this site (compiled Perl script for
Windows with simple GUI).
TEXT MODE
There are no special instructions about writing text. I'll give you just few instructions
how to use commands in display messages. Commands are normal ASCII characters
and they can be inserted in many ways, but this isn't so easy with normal text editors
for Windows. For a long time I have used copy&paste from other peoples display
messages. I encourage you to download IsoLinux Mate (still Beta but usefull) for easy
inserting ASCII codes.
Commands:
explanation: <0D> = <Ctrl-L> = ASCII 12 means: command hex code is 0D, in
some text editors can be inserted with Ctrl+L, ASCII code for this command is 12.
<0F> = <Ctrl-O> = ASCII 15 - text color attributes. This command takes two
parameters: background and foreground text colors. Syntax: command background
foreground.
Values for color codes:
0 = black
1 = dark blue
2 = dark green
3 = dark cyan
4 = dark red
5 = dark purple
6 = brown
7 = light grey
8 = dark grey
9 = bright blue
a = bright green
b = bright cyan
c = bright red
d = bright purple
e = yellow
f = white
Picking a bright color (8-f) for the background results in the corresponding dark color
(0-7), with the foreground flashing (flashing is not implemented in ILM).
example in hex: 0f 31 66 will set dark blue background and white foreground.
ASCII code for "1" is 31 in hex, and ASCII code for "f" is 66 in hex.
GRAPHIC MODE
<18> = <Ctrl-X> = ASCII 24 - enter graphic mode and display graphic image.
Syntax: command filename newline. Code for newline is ASCII 10.
This command enters graphic mode and loads image in LSS format.
<19> = <Ctrl-Y> = ASCII 25 - back to text mode if you are in graphic mode. Use
this at the begining of message if message is in text mode and one of other messages
that you use is in graphic mode. If your Welcome message uses graphic mode, use
this this at the begining of other messages to turn off graphic mode so you can use
text attributes in ordinary way.
OTHER
In IsoLinux Mate (ILM) you can insert text attributes (color info commands) and Clear
Screen very easy. For other commands use Insert ASCII in ILM. Insert command
parameters as normal text after command.