Difference between revisions of "EXTLINUX"

From Syslinux Wiki
Jump to: navigation, search
m (Wiki formatting. Minor rewording.)
m (Wiki formatting.)
 
Line 12: Line 12:
  
  
1. The [[install]]er runs on a *'''mounted'''* filesystem.
+
1. The [[install]]er runs on a *'''mounted'''* filesystem.  
 
Run the extlinux installer on the directory in which you want EXTLINUX installed:
 
Run the extlinux installer on the directory in which you want EXTLINUX installed:
  
 
  extlinux --install /boot  
 
  extlinux --install /boot  
  
Specify <tt>--install (-i)</tt> to install for the first time, or <tt>--update (-U)</tt> to upgrade a previous installation.
+
Specify <tt>--install (-i)</tt> to install for the first time,  
 +
or <tt>--update (-U)</tt> to upgrade a previous installation.
  
NOTE: This does not have to be the root directory of a filesystem.
+
NOTE: This does not have to be the root directory of a filesystem.  
 
If "<tt>/boot</tt>" is a mount point of a supported filesystem, then you can do:
 
If "<tt>/boot</tt>" is a mount point of a supported filesystem, then you can do:
  
Line 25: Line 26:
 
  extlinux --install /boot/extlinux
 
  extlinux --install /boot/extlinux
  
... to create a subdirectory and install EXTLINUX in it.  
+
... to create a subdirectory and install EXTLINUX in it.
  
  
Line 31: Line 32:
 
to be found in the same directory as EXTLINUX is installed in.
 
to be found in the same directory as EXTLINUX is installed in.
  
Since v.4.02, <tt>syslinux.cfg</tt> and {{nowrap|<tt>[/boot/]syslinux/</tt>}} are generic terms and also valid for EXTLINUX.
+
Since v.4.02, <tt>syslinux.cfg</tt> and {{nowrap|<tt>[/boot]/syslinux/</tt>}}  
<tt>extlinux.conf</tt> and {{nowrap|<tt>[/boot/]extlinux/</tt>}} take precedence for EXTLINUX if they are present.
+
are generic terms and also valid for EXTLINUX.  
 +
<tt>extlinux.conf</tt> and {{nowrap|<tt>[/boot]/extlinux/</tt>}} take precedence  
 +
for EXTLINUX if they are present.
  
 +
<!-- See [[Configuration location and name]] -->
  
3. Pathnames can be absolute or relative;  
+
3. Pathnames can be either absolute or relative;  
if absolute (with a leading slash),  
+
* if absolute (with a leading slash), <!--
they are relative to the root of the filesystem on which EXTLINUX is installed (<tt>/boot</tt> in the example above);  
+
--> they are relative to the root of the filesystem <!--
if relative,  
+
--> on which EXTLINUX is installed (<tt>/boot</tt> in the example above);  
they are relative to the Current Working Directory -  
+
* if relative, <!--
initially the EXTLINUX directory (where <tt>extlinux.conf</tt> - or the alternative <tt>syslinux.cfg</tt> - is located).
+
--> they are relative to the Current Working Directory - <!--
<!-- See [[Configuration_location_and_name]] -->
+
--> initially the EXTLINUX directory <!--
 +
--> (where <tt>extlinux.conf</tt> - or <!--
 +
--> the alternative <tt>syslinux.cfg</tt> - is located).
  
 
EXTLINUX supports subdirectories, but the total path length is limited to 255 characters.
 
EXTLINUX supports subdirectories, but the total path length is limited to 255 characters.
Line 48: Line 54:
 
4. EXTLINUX supports symbolic links.  
 
4. EXTLINUX supports symbolic links.  
 
However, extremely long symbolic links might hit the pathname limit.  
 
However, extremely long symbolic links might hit the pathname limit.  
Also, please note that absolute symbolic links are interpreted from the root {{nowrap|*<u>of the filesystem</u>*}},  
+
Also, please note that absolute symbolic links are interpreted from the root  
which might be different from how the running system would interpret it (e.g. in the case of a separate <tt>/boot</tt> partition.)  
+
{{nowrap|*<u>of the filesystem</u>*}},  
 +
which might be different from how the running system would interpret it  
 +
(e.g. in the case of a separate <tt>/boot</tt> partition).
 
Therefore, use relative symbolic links if at all possible.
 
Therefore, use relative symbolic links if at all possible.
  
  
 
5. EXTLINUX has "boot-once" support.  
 
5. EXTLINUX has "boot-once" support.  
The boot-once information is stored in an on-disk datastructure,  
+
The boot-once information is stored in an {{nowrap|on-disk}} datastructure,  
 
part of ldlinux.sys,  
 
part of ldlinux.sys,  
called the "''Auxillary Data Vector''".  
+
called the "''Auxillary Data Vector''".
The Auxilliary Data Vector is also available to c32 modules that want to store small amounts of information.
+
The Auxilliary Data Vector is also available to c32  
 +
modules that want to store small amounts of information.
  
 
To set the boot-once information:
 
To set the boot-once information:
Line 63: Line 72:
 
  extlinux --once 'command' /boot/extlinux
 
  extlinux --once 'command' /boot/extlinux
  
where "''command''" is any command you could enter at the Syslinux command line, preferably a label.  
+
where "''command''" is any command you could enter at the Syslinux command line,  
 +
preferably a label.  
 
The boot-once information will be executed on the next boot and then erased.
 
The boot-once information will be executed on the next boot and then erased.
  
Line 70: Line 80:
 
  extlinux --clear-once /boot/extlinux
 
  extlinux --clear-once /boot/extlinux
  
If EXTLINUX is used on a RAID-1, this is recommended, since under certain circumstances a RAID-1 rebuild can "resurrect" the boot-once information otherwise.
+
If EXTLINUX is used on a RAID-1, this is recommended, since under certain  
 +
circumstances a RAID-1 rebuild can "resurrect" the boot-once information otherwise.
  
 
To clear the entire Auxillary Data Vector:
 
To clear the entire Auxillary Data Vector:
Line 78: Line 89:
 
This will erase all data stored in the ADV, including boot-once.
 
This will erase all data stored in the ADV, including boot-once.
  
The <tt>--once</tt>, <tt>--clear-once</tt>, and <tt>--reset-adv</tt> commands can be combined with {{nowrap|<tt>--install</tt>}} or {{nowrap|<tt>--update</tt>}}, if desired.  
+
The <tt>--once</tt>, <tt>--clear-once</tt>, and <tt>--reset-adv</tt> commands can be  
 +
combined with {{nowrap|<tt>--install</tt>}} or {{nowrap|<tt>--update</tt>}}, if desired.  
 
The ADV is preserved across updates, unless {{nowrap|<tt>--reset-adv</tt>}} is specified.
 
The ADV is preserved across updates, unless {{nowrap|<tt>--reset-adv</tt>}} is specified.
  
Line 84: Line 96:
 
Note that EXTLINUX installs in the filesystem partition like a well-behaved bootloader :).  
 
Note that EXTLINUX installs in the filesystem partition like a well-behaved bootloader :).  
 
Thus, it needs a master boot record in the partition table;  
 
Thus, it needs a master boot record in the partition table;  
the [[Mbr|mbr.bin]] shipped with SYSLINUX should work well.
+
the {{nowrap|[[mbr]].bin}} file shipped with SYSLINUX should work well.
 
To install it:
 
To install it:
  
Line 101: Line 113:
 
* Install the MBR on *<u>each disk</u>*, and mark the RAID-1 partition as "active".
 
* Install the MBR on *<u>each disk</u>*, and mark the RAID-1 partition as "active".
  
* Run {{nowrap|"<code>extlinux --raid --install /boot</code>"}} to install EXTLINUX.
+
* Run {{nowrap|"<code>extlinux --raid --install /boot</code>"}} to install EXTLINUX.  
:  This will install it on all the drives in the RAID-1 set, which means you can boot any combination of drives in any order.
+
:  This will install it on all the drives in the RAID-1 set, <!--
 +
--> which means you can boot any combination of drives in any order.
  
  
  
It is not required to re-run the extlinux installer after installing new kernels.
+
It is not required to re-run the extlinux installer after installing new kernels.  
If you are using ext3 journalling, however, it might be desirable to do so, since running the extlinux installer will flush the log.
+
However, if you are using ext3 journalling, it might be desirable to do so,  
Otherwise a dirty shutdown could cause some of the new kernel image to still be in the log.
+
since running the extlinux installer will flush the log.  
This is a general problem for boot loaders on journalling filesystems; it is not specific to EXTLINUX.
+
Otherwise, a dirty shutdown could cause some of the new kernel image to still be in the log.  
 +
This is a general problem for boot loaders on journalling filesystems;  
 +
it is not specific to EXTLINUX.  
 
The "sync" command does not flush the log on the ext3 filesystem.
 
The "sync" command does not flush the log on the ext3 filesystem.
  
  
The Syslinux Project boot loaders support chain loading other operating systems via a separate module, [[Comboot/chain.c32|chain.c32]].
+
The Syslinux Project boot loaders support chain loading other  
To use it, specify a LABEL in the configuration file with KERNEL chain.c32 and APPEND [hd|fd]<number> [<partition>].
+
operating systems via a separate module, [[Comboot/chain.c32|chain.c32]].  
 +
To use it, specify a LABEL in the configuration file with  
 +
<code>KERNEL chain.c32</code> and <code>APPEND [hd|fd]<number> [<partition>]</code>.
  
  
 
For example:
 
For example:
 +
{|
 +
|
 
<pre>
 
<pre>
 
  # Windows CE/ME/NT, a very dense operating system.
 
  # Windows CE/ME/NT, a very dense operating system.
Line 126: Line 145:
 
   APPEND hd0 2
 
   APPEND hd0 2
 
</pre>
 
</pre>
 +
|}
  
 
See also [[Comboot/menu.c32]].
 
See also [[Comboot/menu.c32]].

Latest revision as of 13:35, 8 October 2019

EXTLINUX is a Syslinux variant which boots from a Linux filesystem.

EXTLINUX supports:
[3.00+] ext2/3,
[4.00+] FAT12/16/32, ext2/3/4, Btrfs,
[4.06+] FAT12/16/32, NTFS, ext2/3/4, Btrfs,
[5.01+] FAT12/16/32, NTFS, ext2/3/4, Btrfs, XFS,
[6.03+] FAT12/16/32, NTFS, ext2/3/4, Btrfs, XFS, UFS/FFS,


It works the same way as SYSLINUX, with a few slight modifications.


1. The installer runs on a *mounted* filesystem. Run the extlinux installer on the directory in which you want EXTLINUX installed:

extlinux --install /boot 

Specify --install (-i) to install for the first time, or --update (-U) to upgrade a previous installation.

NOTE: This does not have to be the root directory of a filesystem. If "/boot" is a mount point of a supported filesystem, then you can do:

mkdir -p /boot/extlinux
extlinux --install /boot/extlinux

... to create a subdirectory and install EXTLINUX in it.


2. The configuration file is called "extlinux.conf", and is expected to be found in the same directory as EXTLINUX is installed in.

Since v.4.02, syslinux.cfg and [/boot]/syslinux/ are generic terms and also valid for EXTLINUX. extlinux.conf and [/boot]/extlinux/ take precedence for EXTLINUX if they are present.


3. Pathnames can be either absolute or relative;

  • if absolute (with a leading slash), they are relative to the root of the filesystem on which EXTLINUX is installed (/boot in the example above);
  • if relative, they are relative to the Current Working Directory - initially the EXTLINUX directory (where extlinux.conf - or the alternative syslinux.cfg - is located).

EXTLINUX supports subdirectories, but the total path length is limited to 255 characters.


4. EXTLINUX supports symbolic links. However, extremely long symbolic links might hit the pathname limit. Also, please note that absolute symbolic links are interpreted from the root *of the filesystem*, which might be different from how the running system would interpret it (e.g. in the case of a separate /boot partition). Therefore, use relative symbolic links if at all possible.


5. EXTLINUX has "boot-once" support. The boot-once information is stored in an on-disk datastructure, part of ldlinux.sys, called the "Auxillary Data Vector". The Auxilliary Data Vector is also available to c32 modules that want to store small amounts of information.

To set the boot-once information:

extlinux --once 'command' /boot/extlinux

where "command" is any command you could enter at the Syslinux command line, preferably a label. The boot-once information will be executed on the next boot and then erased.

To clear the boot-once information:

extlinux --clear-once /boot/extlinux

If EXTLINUX is used on a RAID-1, this is recommended, since under certain circumstances a RAID-1 rebuild can "resurrect" the boot-once information otherwise.

To clear the entire Auxillary Data Vector:

extlinux --reset-adv /boot/extlinux

This will erase all data stored in the ADV, including boot-once.

The --once, --clear-once, and --reset-adv commands can be combined with --install or --update, if desired. The ADV is preserved across updates, unless --reset-adv is specified.


Note that EXTLINUX installs in the filesystem partition like a well-behaved bootloader :). Thus, it needs a master boot record in the partition table; the mbr.bin file shipped with SYSLINUX should work well. To install it:

cat mbr.bin > /dev/XXX

... where /dev/XXX is the appropriate master device, e.g. /dev/hda, and make sure the correct partition is set as "active".


If you have multiple disks in a software RAID configuration, the preferred way to boot is:

  • Create a separate RAID-1 partition for /boot.
Note that the Linux RAID-1 driver can span as many disks as you wish.
  • Install the MBR on *each disk*, and mark the RAID-1 partition as "active".
  • Run "extlinux --raid --install /boot" to install EXTLINUX.
This will install it on all the drives in the RAID-1 set, which means you can boot any combination of drives in any order.


It is not required to re-run the extlinux installer after installing new kernels. However, if you are using ext3 journalling, it might be desirable to do so, since running the extlinux installer will flush the log. Otherwise, a dirty shutdown could cause some of the new kernel image to still be in the log. This is a general problem for boot loaders on journalling filesystems; it is not specific to EXTLINUX. The "sync" command does not flush the log on the ext3 filesystem.


The Syslinux Project boot loaders support chain loading other operating systems via a separate module, chain.c32. To use it, specify a LABEL in the configuration file with KERNEL chain.c32 and APPEND [hd|fd]<number> [<partition>].


For example:

 # Windows CE/ME/NT, a very dense operating system.
 # Second partition (2) on the first hard disk (hd0);
 # Linux would *typically* call this /dev/hda2 or /dev/sda2.
 LABEL cement
  KERNEL chain.c32
  APPEND hd0 2

See also Comboot/menu.c32.