'Boot Loader'에 해당되는 글 2건

  1. 2009.07.06 GRUB for DOS boot code to MBR
  2. 2009.06.06 SYSLINUX - bootloaders for FAT filesystems
2009. 7. 6. 15:41

GRUB for DOS boot code to MBR

728x90

Installation

There are many ways to install GRUB for DOS. Some of them require modifying MBR or partition boot sector, while others require changing system startup configuration files.

Install GRUB for DOS boot code to MBR

You can use bootlace.com or grubinst.exe to install GRUB for DOS boot code to MBR:

bootlace.com can be used in DOS, Windows 95/98/Me and Linux. Examples:

Install GRUB for DOS boot code to the MBR of first hard drive under DOS, Windows 95/98/Me:

   bootlace 0x80

Install GRUB for DOS boot code to the MBR of IDE channel 0, primary drive under Linux:

   bootlace /dev/hda

Install GRUB for DOS boot code to the MBR of hard drive image file aa.dsk:

   bootlace aa.dsk

grubinst.exe can be used in Linux, FreeBSD and Windows NT family OSs (Windows NT/2000/XP/2003/Vista). Examples:

Install GRUB for DOS boot code to the MBR of first hard drive under Windows NT family OSs:

   grubinst (hd0)

Install GRUB for DOS boot code to the MBR of IDE channel 0, primary drive under Linux/FreeBSD:

   grubinst "(hd0)"

You can also use device names:

   grubinst /dev/hda  (Linux)
   grubinst /dev/ad0  (FreeBSD)

Install GRUB for DOS boot code to the MBR of hard drive image file aa.dsk:

   grubinst aa.dsk

There are many options you can use with bootlace and grubinst, use the -h option to display help message.

After installing the boot code, you need to copy grldr and menu.lst to the root directory of any FAT16/FAT32/NTFS/EXT2 partition.

Install GRUB for DOS boot code to partition boot sector

You can use grubinst to install GRUB for DOS boot code to partition boot sector. Examples:

Install GRUB for DOS boot code to the first primary partition of the first hard drive:

   grubinst (hd0,0)

or

   grubinst --install-partition=0 (hd0)

or

   grubinst -p=0 (hd0)

Install GRUB for DOS boot code to the first primary partition of the hard drive image file aa.dsk:

   grubinst --install-partition=0 aa.dsk

or

   grubinst -p=0 aa.dsk

Just as in GRUB, extended partition starts with (hd0,4).

After installing the boot code, you need to copy grldr and menu.lst to the partition which you install the boot code on.

Starting GRUB for DOS from DOS

You can use load GRUB for DOS in config.sys using one of the following lines:

   DEVICE=GRUB.EXE
   INSTALL=GRUB.EXE
   SHELL=GRUB.EXE

grub.exe can also be launched from DOS prompt or batch file such as AUTOEXEC.BAT.

Starting GRUB for DOS from Linux

First, you need to apply the kexec patch to the Linux kernel.

Then, you can use the following commands to launch GRUB for DOS from linux:

   kexec -l grub.exe
   kexec -e

Booting GRUB for DOS via the Windows NT/2000/XP/2003 boot manager

Add the following line at the end of boot.ini (this file is hidden):

   C:\grldr="Start GRUB4DOS"

Then copy grldr to C:\, and create the GRUB4DOS configuration file at C:\menu.lst.

Next time you start windows, there is a new option "Start GRUB4DOS" which can be used to start GRUB for DOS.

Booting GRUB for DOS via the Windows Vista boot manager

Use bcdedit to configure the startup menu:

   bcdedit /create /d "Start GRUB4DOS" /application bootsector
   bcdedit /set {id} device boot
   bcdedit /set {id} path \grldr.mbr
   bcdedit /displayorder {id} /addlast

Then copy grldr.mbr to C:\, grldr and menu.lst to the root directory of any FAT16/FAT32/NTFS/EXT2 partition.

Note: previous version of grldr.mbr can also be used in boot.ini of Windows NT/2000/XP/2003. But it doesn't work anymore with the latest version.

Loading GRUB for DOS using other boot loader

grub.exe can be loaded as a linux kernel.

Load GRUB for DOS using GRUB or another copy of GRUB for DOS, add the following section to menu.lst:

   title Load GRUB4DOS
   kernel /grub.exe

Load GRUB for DOS using syslinux, add the following section to syslinux.cfg:

   label GRUB4DOS
           KERNEL grub.exe

Booting DOS/Windows 9X/Windows NT startup files

In GRUB for DOS, you can load the DOS/Windows 9X/Windows NT startup files directly.

DOS, Windows 95/98/Me:

   title Load io.sys
   root (hd0,0)
   chainloader (hd0,0)/io.sys

Windows NT/2000/XP/2003:

   title Load ntldr
   root (hd0,0)
   chainloader (hd0,0)/ntldr

Windows Vista:

   title Load bootmgr
   root (hd0,0)
   chainloader (hd0,0)/bootmgr


Disk emulation

In GRUB for DOS, disk emulation is implemented using the "map" command.

Direct mapping

Here is an example of mapping a image file as virtual floppy, and boot from it:

   title Boot from floppy image
   map (hd0,0)/aa.img (fd0)
   map --hook
   chainloader (fd0)+1
   rootnoverify (fd0)

map --hook is used to make the mapping created by first map command take effect immediately.

Here is an example of booting from the virtual hard disk:

   title Boot from hard disk image
   map (hd0,0)/aa.dsk (hd0)
   map (hd0) (hd1)
   map --hook
   chainloader (hd0,0)+1
   rootnoverify (hd0,0)

Map the image file as virtual hard disk, but boot from the original disk:

   title Create virtual hard disk
   map (hd0,0)/aa.dsk (hd1)
   map --hook
   chainloader (hd0,0)+1
   rootnoverify (hd0,0)

CDROM emulation is not implemented.

In direct mapping, the image file must be contiguous.

The virtual disk is implemented using INT 13. Therefore, it can be accessed in system that still uses INT 13, such as all kinds of DOS and Windows 9X (compatible mode disk access), and it can't be accessed in system that usesprotected mode drivers, such as Linux, FreeBSD and Windows NT family OSs.

Indirect mapping

Indirect mapping is very similar to direct mapping, here is an example:

   title Boot from floppy image
   map --mem (hd0,0)/aa.img (fd0)
   map --hook
   chainloader (fd0)+1
   rootnoverify (fd0)

The --mem option indicates indirect mapping.

In indirect mapping, the image file is copy to memory before the mapping is applies, therefore, the image file need not to be contiguous, however, you must have enough memory to hole the image file.

Auto MBR creation

To create virtual hard disk, you need an image file that resemble a real hard disk, which consist of MBR and partition data. If the image file only contains partition data, you need to patch it with MBR to create disk image. GRUB for DOS has taken this into consideration. When mapping disk image file, it will test the presence of MBR, if not found, it will create MBR automatically using the partition data. For example:

   title Boot from hard disk image
   map --mem (hd0,0)/aa.dsk (hd0)
   map (hd0) (hd1)
   map --hook
   chainloader (hd0,0)+1
   rootnoverify (hd0,0)

aa.dsk can be either disk image or partition image, in the later case, GRUB for DOS will create the MBR in the air.

memdisk

The indirect mapping of GRUB for DOS is similar to the function of external tool memdisk from syslinux. In fact, the following two menu entries do roughly the same thing:

   title Boot from virtual disk using internal map command
   map --mem (hd0,0)/aa.dsk (hd0)
   map (hd0) (hd1)
   map --hook
   chainloader (hd0,0)+1
   rootnoverify (hd0,0)
   title Boot from virtual disk using external memdisk
   kernel (hd0,0)/memdisk
   initrd (hd0,0)/aa.dsk

However, memdisk does not support direct mapping or auto MBR creation.


CDROM related subjects

Using ATAPI CDROM in GRUB for DOS

Use the following command to initialize ATAPI CDROM:

   cdrom --init

Then, use the following command to start using ATATPI CDROM:

   map --hook

After map --hook, the CDROM device can be accessed using (cd0), (cd1), etc.

(Note, if you need to use more than one map --hook, perhaps because you are also mapping disk images to memory, then the second and subsequent hook commands need to be map --rehook)

To boot from the first CDROM, use the following commands:

   chainloader (cd0)
   boot

To stop using CDROM:

   map --unhook
   cdrom --stop

The first command removes the (cdN) device mapping, while the second one stops the CDROM driver.

Note: If you boot GRUB for DOS from CDROM, the booting device will be (cd). This device is always accessible. However, if you want to access file from other CDROMs, you still need to initialize them using the above commands.

Examples:

To boot from the first CDROM:

   title Boot From First CDROM
   cdrom --init
   map --hook
   chainloader (cd0)
   boot

Create a bootable CDROM

In GRUB for DOS, you can use grldr to create bootable CDROM:

   mkisofs -R -b grldr -no-emul-boot -boot-load-seg 0x1000 -o bootable.iso iso_root
   mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso iso_root

grldr and menu.lst should be placed at the root directory of CDROM image.

The above two commands can both create a bootable CDROM, but they are not totally the same.

The first one tells BIOS to load the whole grldr. However, some buggy BIOS might ignore it and load only a portion of the file, typically one sector (2048 bytes). This will cause the program to fail.

The second one tells BIOS to load only the first sector (2048 bytes), and the program loads the rest from CDROM. This method is safer, it should work for most BIOS.

Note: you can optionally use the -boot-info-table option, but the info table will be ignored by the program.

Load GRUB for DOS from BCDW

To load GRUB for DOS from BCDW, first copy grldr and menu.lst to the root directory of CDROM image, then add a new line to the [MenuItems] section of BCDW configuration file bcdw.ini:

   \grldr   ; Grub4Dos

Trackback 1 Comment 0
2009. 6. 6. 21:53

SYSLINUX - bootloaders for FAT filesystems

728x90

What is SYSLINUX?

SYSLINUX is a boot loader for the Linux operating system which operates off an MS-DOS/Windows FAT filesystem. It is intended to simplify first-time installation of Linux, and for creation of rescue- and other special-purpose boot disks.

SYSLINUX can be used, when properly set up, to completely eliminate the need for distribution of raw diskette images for boot floppies. A SYSLINUX floppy can be manipulated using standard MS-DOS (or any other OS that can access an MS-DOS filesystem) tools once it has been created.


Options

These are the options common to all versions of the SYSLINUX installer:

	-s	Safe, slow, stupid: uses simpler code that boots better. 
		  This version may work on some very buggy BIOSes on which SYSLINUX would otherwise fail. 
		  If you find a machine on which the -s option is required to make it boot reliably, 
		  please send as much info about your machine as you can, and include the failure mode.
	-f	Force installing.
	-r	Raid mode:
		  If boot fails, tell the BIOS to boot the next device in the boot sequence
		  (usually the next hard disk), instead of stopping with an error message.
		  This is useful for RAID-1 booting.

These are only available in the Windows version:

	-m	MBR: install a bootable MBR sector to the beginning of the drive.
	-a	Active: marks the partition used active (=bootable)

This is can only be used in the linux version:

	-o      Specifies the byte offset of the filesystem image in the file.
		  It has to be used with a disk image file.

Creating a Bootable Disk

Installing SYSLINUX to the disk will alter the boot sector on the disk and copy a file named LDLINUX.SYS into its root directory.

On boot time, by default, the kernel will be loaded from the image named LINUX on the boot disk. This default can be changed, see the section on the SYSLINUX config file.

If the Shift or Alt keys are held down during boot, or the Caps or Scroll locks are set, SYSLINUX will display a LILO-style "boot:" prompt. The user can then type a kernel file name followed by any kernel parameters. The SYSLINUX loader does not need to know about the kernel file in advance; all that is required is that it is a file located in the root directory on the disk.

In order to create a bootable disk using SYSLINUX, prepare a normal MS-DOS formatted disk. Copy one or more Linux kernel files to it, then execute:


NT/2K/XP

Syntax:
syslinux.exe [-sfmar][-d directory] <drive>: [bootsecfile]
Floppy: (a: in this example)
syslinux.exe a:
HardDrive/FlashDrive/etc: (z: in this example)
syslinux.exe -m -a -d /boot/syslinux z:
* In the above example syslinux.cfg would be expected to be in z:\boot\syslinux
* NOTE: Under NT/2K you may get a dialog box about not getting exclusive access and with Abort/Retry/Ignore buttons; selecting "Ignore" makes the command complete correctly.

DOS

Syntax:
syslinux.com [-sfmar][-d directory] <drive>: [bootsecfile]
Example:
syslinux.com a:

Linux

Syntax:
syslinux [-sfr][-d directory][-o offset] <DeviceOrImage>
Example:
syslinux /dev/fd0

The -o option (if specified) is used with a disk image file and specifies the byte offset of the filesystem image in the file.


How do I Configure SYSLINUX?

All the configurable defaults in SYSLINUX can be changed by putting a file called syslinux.cfg.

SYSLINUX searches for the SYSLINUX.CFG file in the following order:

/boot/syslinux/syslinux.cfg
/syslinux/syslinux.cfg
/syslinux.cfg

All filenames inside the config file are assumed to be relative to the same directory than the directory in which SYSLINUX.CFG resides, unless preceded with a slash or backslash.

This syslinux.cfg file is a text file in either UNIX or DOS format, containing one or more of the keywords listed below. Case is insensitive for keywords; upper case is used here to indicate that a word should be typed verbatim.

Here is a simple example syslinux.cfg file, with one entry to boot a Linux kernel:

 DEFAULT linux
 LABEL linux
 SAY Now booting the kernel from SYSLINUX...
 KERNEL vmlinuz.img
 APPEND ro root=/dev/sda1 initrd=initrd.img

Note that while LILO uses the syntax:

image = mykernel
  label = mylabel
  append = "myoptions"

... whereas SYSLINUX uses the syntax:

label mylabel
  kernel mykernel
  append myoptions

All options here applies to PXELINUX, ISOLINUX and EXTLINUX as well as SYSLINUX unless otherwise noted.

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.

LABEL command

Select a human-readable string to describe a kernel and other options. The default LABEL is called "linux", but you can change this with the "DEFAULT" keyword.

Labels are mangled as if they were filenames, and must be unique after mangling. For example, two labels "v2.1.30" and "v2.1.31" will not be distinguishable under SYSLINUX, since both mangle to the same DOS filename.

KERNEL file

Select the file that SYSLINUX will boot. The "kernel" doesn't have to be a Linux kernel; it can be a boot sector or a COMBOOT file.

Chain loading requires the boot sector of the foreign operating system to be stored in a file in the root directory of the filesystem. Because neither Linux kernels, boot sector images, nor COMBOOT files have reliable magic numbers, Syslinux will look at the file extension. The following extensions are recognized (case insensitive):

 none or other	Linux kernel image
 .0		PXE bootstrap program (NBP) [PXELINUX only]
 .bin		"CD boot sector" [ISOLINUX only]
 .bs		Boot sector [SYSLINUX only]
 .bss		Boot sector, DOS superblock will be patched in [SYSLINUX only]
 .c32		COM32 image (32-bit COMBOOT)
 .cbt		COMBOOT image (not runnable from DOS)
 .com		COMBOOT image (runnable from DOS)
 .img		Disk image [ISOLINUX only]

Using one of these keywords instead of KERNEL forces the filetype, regardless of the filename:

LINUX image

You can use this, instead of using KERNEL file to boot an linux kernel image.

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

CONFIG will restart the boot loader using a different configuration file.


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.

APPEND -

Append nothing. APPEND with a single hyphen as argument in a LABEL section can be used to override a global APPEND.

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

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). Up to 128 LABEL entries are permitted. (for ISOLINUX, 64 LABEL entries.) 

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.

INITRD initrd_file

Starting with version 3.71, an initrd can be specified in a separate statement (INITRD) instead of as part of the APPEND statement; this functionally appends "initrd=initrd_file" to the kernel command line.

It supports multiple filenames separated by commas. This is mostly useful for initramfs, which can be composed of multiple separate cpio or cpio.gz archives. Note: all files except the last one are zero-padded to a 4K page boundary. This should not affect initramfs.


DEFAULT command

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, except that the option "auto" is automatically added, indicating an automatic boot.

If no configuration file is present, or no DEFAULT entry is present in the config file, the default is kernel name "linux", with no options.

UI module options...

Selects a specific user interface module (typically menu.c32 or vesamenu.c32). The command-line interface treats this as a directive that overrides the DEFAULT and PROMPT directives.

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.

NOCOMPLETE flag_val

If flag_val is set to 1, the Tab key does not display labels at the boot: prompt.

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.

NOTE: The maximum possible timeout value is 35996; corresponding to just below one hour.

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 <Enter> 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 QWERTZ or AZERTY keyboard layouts 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.doc contains the documentation for this program.

Syslinux also ships a comboot module named kbdmap.c32 which allows to change the keyboard mappings on the fly, making it possible to add a keyboard-selection menu and/or keyboard-selection labels from within the syslinux config file.

SAY message

Prints the message on the screen.

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. 

F[1-12] filename

F1 filename
F2 filename
  ...etc...
F9 filename
F10 filename
F11 filename
F12 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:

<Ctrl-F><1>			to get the F1 screen
<Ctrl-F><2>			to get the F2 screen
   ...etc...
<Ctrl-F><9>			to get the F9 screen
<Ctrl-F><A> (or <Ctrl-F><0>)	to get the F10 screen
<Ctrl-F><B>			to get the F11 screen
<Ctrl-F><B>			to get the F11 screen
<Ctrl-F><C>			to get the F12 screen


In the configuration file blank lines and comment lines beginning with a hash mark (#) are ignored.

Note that the configuration file is not completely decoded. Syntax different from the one described above may still work correctly in this version of SYSLINUX, but may break in a future one.


Can SYSLINUX Handle Large Kernels?

This version of SYSLINUX supports large kernels (bzImage format), eliminating the 500K size limit of the zImage kernel format. bzImage format kernels are detected automatically and handled transparently to the user.

This version of SYSLINUX also supports a boot-time-loaded ramdisk (initrd). An initrd is loaded from a DOS file if the option "initrd=filename" (where filename is the filename of the initrd image; the file must be located in the root directory on the boot floppy) is present on the processed command line (after APPEND's have been added, etc.). If several initrd options are present, the last one has precedence; this permits user-entered options to override a config file APPEND. Specifying "initrd=" without a filename inhibits initrd loading. The file specified by the initrd= option will typically be a gzipped filesystem image.

EXAMPLE (extlinux):

 append ro root=/dev/hda1 initrd=/boot/initrd.img

NOTE: One of the main advantages with SYSLINUX is that it makes it very easy to support users with new or unexpected configurations, especially in a distribution setting. If initrd is used to extensively modularize the distribution kernel, it is strongly recommended that a simple way of adding drivers to the boot floppy be provided. The suggested manner is to let the initrd system mount the boot floppy and look for additional drivers in a predetermined location.

To bzImage and recent zImage kernels, SYSLINUX 1.30 and higher will identify using the ID byte 0x31. PXELINUX identifies using the ID byte 0x32, ISOLINUX 0x33, and EXTLINUX 0x34. The ID range 0x35-0x3f is reserved for future versions of derivatives of SYSLINUX.


What is the DISPLAY File Format?

DISPLAY and function-key help files are text files in either DOS or UNIX format (with or without <CR>). In addition, the following special codes are interpreted:

Clear the screen, home the cursor:

<FF>  <FF> = <Ctrl-L> = ASCII 12

Note that the screen is filled with the current display color.

Set the display colors to the specified background and foreground colors:

<SI><bg><fg>  <SI> = <Ctrl-O> = ASCII 15

where <bg> and <fg> are hex digits, corresponding to the standard PC display attributes:

0 = black               8 = dark grey
1 = dark blue           9 = bright blue
2 = dark green          a = bright green
3 = dark cyan           b = bright cyan
4 = dark red            c = bright red
5 = dark purple         d = bright purple
6 = brown               e = yellow
7 = light grey          f = white

Picking a bright color (8-f) for the background results in the corresponding dark color (0-7), with the foreground flashing.

Colors are not visible over the serial console.

Example: color.txt file:

^O9eBlinking Yellow on Blue Background
# xxd color.txt
0000000: 0f39 6542 6c69 6e6b 696e 6720 5965 6c6c  .9eBlinking Yell
0000010: 6f77 206f 6e20 426c 7565 2042 6163 6b67  ow on Blue Backg
0000020: 726f 756e 640a                           round.

Display graphic from filename:

<CAN>filename<newline>  <CAN> = <Ctrl-X> = ASCII 24

If a VGA display is present, enter graphics mode and display the graphic included in the specified file. The file format is an ad hoc format called LSS16; the included Perl program "ppmtolss16" can be used to produce these images. This Perl program also includes the file format specification.

The image is displayed in 640x480 16-color mode. Once in graphics mode, the display attributes (set by <SI> code sequences) 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 allows you to specify that certain colors should be assigned to specific color indices.

Color indices 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 SYSLINUX itself.

Return to text mode:

<EM>  <EM> = <Ctrl-Y> = ASCII 25

If we are currently in graphics mode, return to text mode. Select to which modes to print a certain part of the message:

<DLE>..<ETB>  <Ctrl-P>..<Ctrl-W> = ASCII 16-23

These codes can be used to select which modes to print a certain part of the message file in. Each of these control characters select a specific set of modes (text screen, graphics screen, serial port) for which the output is actually displayed:

Character                       Text    Graph   Serial
------------------------------------------------------
<DLE> = <Ctrl-P> = ASCII 16     No      No      No
<DC1> = <Ctrl-Q> = ASCII 17     Yes     No      No
<DC2> = <Ctrl-R> = ASCII 18     No      Yes     No
<DC3> = <Ctrl-S> = ASCII 19     Yes     Yes     No
<DC4> = <Ctrl-T> = ASCII 20     No      No      Yes
<NAK> = <Ctrl-U> = ASCII 21     Yes     No      Yes
<SYN> = <Ctrl-V> = ASCII 22     No      Yes     Yes
<ETB> = <Ctrl-W> = ASCII 23     Yes     Yes     Yes

For example:

<DC1>Text mode<DC2>Graphics mode<DC4>Serial port<ETB>

will actually print out which mode the console is in!

End of file:

<SUB>  <SUB> = <Ctrl-Z> = ASCII 26

End of file (DOS convention).

Beep:

<BEL>  <BEL> = <Ctrl-G> = ASCII 7

Beep the speaker.


원문 : http://syslinux.zytor.com/


Trackback 8 Comment 0