Article Title: Use syslinux to guide the linux system. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
SYSLINUX mainly contains four programs: syslinux, pxelinux, isolinux, and extlinux.
Except pxelinux, it is only used to start the operating system from the network. It is used to create boot programs for operating systems on different types of file systems.
Syslinux is used on MS-DOS/Windows FAT file system;
Pexlinux is used to start the operating system from the network;
Isolinux is used on ISO 9660/El Torito CD-ROM file system;
Extlinux is used on the Linux ext2/ext3 file system;
First look at the use of syslinux:
Here, we use a flash drive in the FAT32 format as an example. After insertion, if automatic mounting is available, uninstall the USB flash drive first.
Then execute
# Syslinux/dev/sdb
The above command will change the boot partition on the USB flash drive and copy a file LDLINUX. SYS to its root directory.
Then, save syslinux. cfg that contains the following content to the root partition of the USB flash drive. Root =/dev/sda4 is the first partition on the target machine. Copy the kernel vmlinux to the root partition of the USB flash drive.
DEFAULT 2.6.31sda4
TIMEOUT 50
LABEL 2.6.31sda4
SAY Now booting the kernel from SYSLINUX...
LINUX vmlinux
APPEND rw root =/dev/sda4
Then, set the target machine to start from the USB flash drive and insert it into the USB flash drive. The syslinux boot system is successful.
The extlinux operating object is the directory of the mounted device whose file system type is ext2/ext3.
Partition the USB flash drive and format it.
# Mkfs. ext3/dev/sdb1
# Mkfs. ext3/dev/sdb2
Operation in the first partition,
# Cd/media/disk
# Extlinux.
# Cp ~ /Syslinux. cfg extlinux. conf
# Cp kernel.
Because the boot file generated by exlinux is only a common file stored in the USB flash drive, you need to change the MBR to point to it.
Therefore, use the mbr included in the syslinux package to overwrite the original mbr of the USB flash disk. You need to use fdisk to set the boot flag of the partition to on.
# Cat/usr/lib/syslinux/mbr. bin>/dev/sdb
# Fdisk/dev/sdb1
T
A
1
Because the preparation files used by extlinux and syslinux are named differently and have the same content, you can simply copy them.