chain.c: initial move of documentation to doc/chain.txt
[profile/ivi/syslinux.git] / doc / chain.txt
1                             chain.c32 documentation
2
3 Although syslinux features simple native chainloading capability (through .bss
4 and .bs options - see doc/syslinux.txt), it also provides very roboust and
5 feature rich com32 module designed for such purpose - which should allow you to
6 boot virtually anything.
7
8 FIXME: initial move from chain.c below
9
10 /*
11  * chain.c
12  *
13  * Chainload a hard disk (currently rather braindead.)
14  *
15  * Usage: chain [options]
16  *        chain hd<disk#> [<partition>] [options]
17  *        chain fd<disk#> [options]
18  *        chain mbr:<id> [<partition>] [options]
19  *        chain guid:<guid> [<partition>] [options]
20  *        chain label:<label> [<partition>] [options]
21  *        chain boot [<partition>] [options]
22  *
23  * For example, "chain msdos=io.sys" will load DOS from the current Syslinux
24  * filesystem.  "chain hd0 1" will boot the first partition on the first hard
25  * disk.
26  *
27  * When none of the "hdX", "fdX", "mbr:", "guid:", "label:", "boot" or "fs"
28  * options are specified, the default behaviour is equivalent to "boot".
29  * "boot" means to use the current Syslinux drive, and you can also specify
30  * a partition.
31  *
32  * The mbr: syntax means search all the hard disks until one with a
33  * specific MBR serial number (bytes 440-443) is found.
34  *
35  * Partitions 1-4 are primary, 5+ logical, 0 = boot MBR (default.)
36  *
37  * "fs" will use the current Syslinux filesystem as the boot drive/partition.
38  * When booting from PXELINUX, you will most likely wish to specify a disk.
39  *
40  * Options:
41  *
42  * file=<loader>
43  *      loads the file <loader> **from the Syslinux filesystem**
44  *      instead of loading the boot sector.
45  *
46  * seg=<segment>
47  *      loads at and jumps to <seg>:0000 instead of 0000:7C00.
48  *
49  * isolinux=<loader>
50  *      chainload another version/build of the ISOLINUX bootloader and patch
51  *      the loader with appropriate parameters in memory.
52  *      This avoids the need for the -eltorito-alt-boot parameter of mkisofs,
53  *      when you want more than one ISOLINUX per CD/DVD.
54  *
55  * ntldr=<loader>
56  *      equivalent to seg=0x2000 file=<loader> sethidden,
57  *      used with WinNT's loaders
58  *
59  * cmldr=<loader>
60  *      used with Recovery Console of Windows NT/2K/XP.
61  *      same as ntldr=<loader> & "cmdcons\0" written to
62  *      the system name field in the bootsector
63  *
64  * freedos=<loader>
65  *      equivalent to seg=0x60 file=<loader> sethidden,
66  *      used with FreeDOS' kernel.sys.
67  *
68  * msdos=<loader>
69  * pcdos=<loader>
70  *      equivalent to seg=0x70 file=<loader> sethidden,
71  *      used with DOS' io.sys.
72  *
73  * grub=<loader>
74  *      same as seg=0x800 file=<loader> & jumping to seg 0x820,
75  *      used with GRUB Legacy stage2 files.
76  *
77  * grubcfg=<filename>
78  *      set an alternative config filename in stage2 of Grub Legacy,
79  *      only applicable in combination with "grub=<loader>".
80  *
81  * grldr=<loader>
82  *      pass the partition number to GRUB4DOS,
83  *      used with GRUB4DOS' grldr.
84  *
85  * swap
86  *      if the disk is not fd0/hd0, install a BIOS stub which swaps
87  *      the drive numbers.
88  *
89  * hide
90  *      change type of primary partitions with IDs 01, 04, 06, 07,
91  *      0b, 0c, or 0e to 1x, except for the selected partition, which
92  *      is converted the other way.
93  *
94  * sethidden
95  *      update the "hidden sectors" (partition offset) field in a
96  *      FAT/NTFS boot sector.
97  *
98  * keeppxe
99  *      keep the PXE and UNDI stacks in memory (PXELINUX only).
100  */