Tuesday, October 9, 2012

isolinux.cfg for a live CD

isolinux is a bootloader included in the syslinux package and is used to boot a CD or DVD. isolinux is one of several popular bootloaders used to create a bootable CD for open-source operating systems, including Linux and FreeDOS. Another bootloader is GRUB, which I rarely use except for booting Windows 7 with BIOS emulation.



To create a bootable CD with isolinux, just copy the file isolinux.bin to a folder that will hold CD contents for ISO mastering. On Debian or Ubuntu, the file is located at the /usr/lib/syslinux folder.



ISOFS contents

A file named isolinux.cfg needs to be created in order to provide a menu or boot entries. A sample isolinux.cfg is shown below. It makes use of vesamenu.c32 which helps display a nice graphical menu with a background picture. Vesamenu.c32 is also located in /usr/lib/syslinux and needs to be copied too.





# isolinux.cfg
# Configuration for ISOLINUX

# Wait for 60 seconds before booting up the default entry.
TIMEOUT 600
F1 help.txt #ff702640

UI vesamenu.c32
MENU RESOLUTION 640 480
MENU BACKGROUND back642.jpg
MENU COLOR border 30;44 #40dfdfdf #00000000 std
MENU COLOR title 1;36;43 #e0fdff49 #804206ef none
MENU COLOR sel 7;37;40 #e0000000 #40ffffff all
MENU COLOR hotsel 1;7;37;40 #e0af0000 #40ffffff all
MENU COLOR disabled 1;30;44 #ffe4de6f #00000000 std
MENU COLOR scrollbar 30;44 #40000000 #e0af0000 std
MENU TITLE Boot Menu
MENU CLEAR

MENU ROWS 14
MENU TABMSGROW 20
MENU CMDLINEROW 20
MENU TIMEOUTROW 22
MENU HELPMSGROW 24
MENU VSHIFT 1

# The default is to boot the first hard drive.
DEFAULT hd0
ONERROR hd1

MENU BEGIN livecd_menu

MENU TITLE Linux Live CD Menu

LABEL livecd_heading
MENU LABEL Boot Linux live CD
MENU DISABLE

LABEL livecd_640x480
MENU LABEL 640x480 screen
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND root=/dev/sr0 edd=off vmode=640x480

LABEL livecd_800x600
MENU LABEL 800x600 screen
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND root=/dev/sr0 edd=off vmode=800x600

LABEL livecd_1024x768
MENU LABEL 1024x768 screen
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND root=/dev/sr0 edd=off vmode=1024x768

MENU SEPARATOR

LABEL livecd_console_heading
MENU LABEL Boot Linux live CD into text console
MENU DISABLE

LABEL livecd_console
MENU LABEL text-mode console
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND root=/dev/sr0 nox

LABEL livecd_console_old
MENU LABEL text-mode console for an old computer
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND root=/dev/sr0 acpi=off irqpoll nox

MENU SEPARATOR

LABEL exit0
MENU LABEL Return to the main menu.
MENU EXIT

MENU END

MENU BEGIN cdram_menu

MENU TITLE Linux on RAMdisk Menu

LABEL cdram_heading
MENU LABEL Boot Linux on RAMdisk
MENU DISABLE

LABEL cdram_640x480
MENU LABEL 640x480 screen
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND boot=cdrom root=/dev/ram ramdisk_size=573440 edd=off vmode=640x480

LABEL cdram_800x600
MENU LABEL 800x600 screen
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND boot=cdrom root=/dev/ram ramdisk_size=573440 edd=off vmode=800x600

LABEL cdram_1024x768
MENU LABEL 1024x768 screen
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND boot=cdrom root=/dev/ram ramdisk_size=573440 edd=off vmode=1024x768

MENU SEPARATOR

LABEL cdram_console_heading
MENU LABEL Boot Linux RAMdisk into text console
MENU DISABLE

LABEL cdram_console
MENU LABEL text-mode console
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND boot=cdrom root=/dev/ram ramdisk_size=573440 nox

LABEL cdram_console_old
MENU LABEL text-mode console for an old computer
MENU INDENT 1
KERNEL 360.lnx
INITRD initram.lzm
APPEND boot=cdrom root=/dev/ram ramdisk_size=573440 acpi=off irqpoll nox

MENU SEPARATOR

LABEL exit1
MENU LABEL Return to the main menu.
MENU EXIT

MENU END

LABEL hd0
MENU LABEL First Hard Drive
LOCALBOOT 0x80

LABEL hd1
MENU LABEL Second Hard Drive
KERNEL chain.c32
APPEND hd1 swap

MENU BEGIN hd0_menu

MENU TITLE Partition in First Hard Drive

LABEL hd0_part1
MENU LABEL 1st partition
KERNEL chain.c32
APPEND hd0 1

LABEL hd0_part2
MENU LABEL 2nd partition
KERNEL chain.c32
APPEND hd0 2

LABEL hd0_part3
MENU LABEL 3rd partition
KERNEL chain.c32
APPEND hd0 3

LABEL hd0_part4
MENU LABEL 4th partition
KERNEL chain.c32
APPEND hd0 4

LABEL hd0_part5
MENU LABEL 5th partition
KERNEL chain.c32
APPEND hd0 5

LABEL hd0_part6
MENU LABEL 6th partition
KERNEL chain.c32
APPEND hd0 6

LABEL hd0_part7
MENU LABEL 7th partition
KERNEL chain.c32
APPEND hd0 7

LABEL hd0_part8
MENU LABEL 8th partition
KERNEL chain.c32
APPEND hd0 8

LABEL hd0_part9
MENU LABEL 9th partition
KERNEL chain.c32
APPEND hd0 9

LABEL hd0_part10
MENU LABEL 10th partition
KERNEL chain.c32
APPEND hd0 10

MENU SEPARATOR

LABEL exit3
MENU LABEL Return to the main menu
MENU EXIT

MENU END

LABEL fd0
MENU LABEL Floppy Drive
LOCALBOOT 0x00

LABEL next
MENU LABEL Next in boot sequence
LOCALBOOT -1

LABEL memtest
MENU LABEL Test your computer memory
LINUX memtest.bin
TEXT HELP
Run Memtest86 to test your computer memory
ENDTEXT

LABEL help
MENU LABEL Help
MENU HELP help.txt #ff702640


isolinux boot menu

The example above is one that I use for my live CD, so some settings are specific to my situation. Thus, KERNEL and APPEND settings may have to be adapted for other users. However, all the keywords shown above is standard and acceptable.


No comments:

Post a Comment

About This Blog

KBlog logo This blog seeks to provide a collection of interesting pictures found on the Web. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

Powered By Blogger