Isolinux HowTo for Newbies

7
Isolinux HowTo for newbies - Part 1 UPDATED 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: 1,228,800 bytes - For a 1200K floppy image 1,474,560 bytes - For a 1440K floppy image 2,949,120 bytes - For a 2880K floppy image Any other size is assumed to be a hard disk image. See isolinux.cfg for more details on using memdisk. 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:

Transcript of Isolinux HowTo for Newbies

Page 1: Isolinux HowTo for Newbies

Isolinux HowTo for newbies - Part 1 UPDATED 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 userred text - user defined names

Isolinux files:isolinux.bin - boot loader for no-emulation bootmemdisk - this file is used to load floppy and HDD imagesisolinux.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.binThis 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.

MemdiskThis 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:

1,228,800 bytes - For a 1200K floppy image1,474,560 bytes - For a 1440K floppy image2,949,120 bytes - For a 2880K floppy image

Any other size is assumed to be a hard disk image.See isolinux.cfg for more details on using memdisk.

isolinux.cfgThis 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:

#  - comment, use this at the begining of line to insert comments

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)

Page 2: Isolinux HowTo for Newbies

LABEL {label name} - This is a section that explains boot options for {label name}.example 1:LABEL myDOS    kernel memdisk    append initrd=DOS.IMGThis 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.binThis 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 0x80This 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 BIOSexample 5 :LABEL somethig    kernel memdisk    append myFolder/myDisk.imgThis 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

Page 3: Isolinux HowTo for Newbies

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).

ONTIMEOUT {label name or kernel options} - same as DEFAULT. If ONTIMEOUT option is set, then DEFAULT is used just if user hits ENTER without options at boot prompt.

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.

SAY message - print the message on the screen

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:

# default to boot from hard drivedefault 0# let the user know the basic optionsdisplay WELCOME.TXTprompt 1# various options are available for booting

# hdlabel 0localboot 0x80

# floppylabel alocalboot 0x00

# cancel and try next boot devicelabel qlocalboot -1

# MY BOOTlabel mydoskernel memdiskappend initrd=BOBBY71p.IMG

Page 4: Isolinux HowTo for Newbies

# MY BOOT2label mydos2kernel memdiskappend initrd=BOBBY71s.IMG

# part imagelabel 11kernel partimg/vmlinuzappend initrd=partimg/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw root=/dev/ram # movix vesalabel VEkernel kernel/vmlinuzappend initrd=initrd.gz load_ramdisk=1 prompt_ramdisk=0 ramdisk_size=62000 rw root=/dev/ram0 LABEL=vesa video=vesa:off

timeout 200F1 DOS.TXTF2 MOVIX2.txtF3 UTIL.TXTF4 LINUX.TXTF5 MX2HELP.TXTF6 TRBLST.TXTF7 MPHELP.TXTF8 PARTIMG.TXTF9 WELCOME.TXTF0 WELCOME.TXT 

Isolinux HowTo for newbies - Part2 ISOLINUX DISPLAY FILE FORMAT

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

Page 5: Isolinux HowTo for Newbies

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.

<0D> = <Ctrl-L> = ASCII 12   - Clear Screen command. Don't need parameters. Advice: insert it at the begining of every display message.

<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 grey9 = bright bluea = bright greenb = bright cyanc = bright redd = bright purplee = yellowf = whitePicking 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

Page 6: Isolinux HowTo for Newbies

this this at the begining of other messages to turn off graphic mode so you can use text attributes in ordinary way.

OTHER

ATTENTION: DON'T USE TABS IN DISPLAY MESSAGES. Isolinux don't interpret Tab like text editors, use spaces instead.

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.