In-depth understanding LILO

zhaozj2021-02-17  78

Deepen Lilonull Null

Back to〗 Forward〗

Linux guidance can be used in a variety of ways, and its loader LILO (Linux Loader) is a flexible bootloader that is more artistic, and the in-depth understanding of the LILO ( Helps us to handle multiple difficulties such as multiple systems, network boots, large hard drives and large memory. First, LILO's boot mechanism is well known that the initial start of the computer is controlled by the BIOS. After initialization of some hardware (eg: memory, keyboard, etc.), it will try to load the hard disk's main boot record (MBR) or floppy guide fan Area. The MBR can operate in two ways, which is positioned to the active partition and load the corresponding guiding sector, and then complete the loading of the basic components of the operating system within the partition; second, it is loaded directly from a designated partition. Information, and through which boot loaders such as LILO, OS / 2 Boot Loader and Partition Magic can be configured in this way. The boot sector of the floppy is equivalent to the boot sector of the hard disk activity partition, which is usually used to load the operating system on the floppy disk. From this, it can be seen that as long as the LILO is installed on the MBR, the active partition, or the boot floppy disk, it can take over the control of the computer, and then the subsequent boot process is completed by LILO. It is built in LILO to include a list of tabs, where it can be positioned to Linux kernel files, which can be linearly linear of LBA according to the cylindrical / head / sector (CHS) mode. Block mode, therefore, even if some SCSI control program LILO can operate well. When LILO is positioned, after the pre-boot process, the prompt: LILO BOOT: At this point, the system allows the selection to boot different operating systems or different kernel configurations, press the Tab key to display the option list, then enter optional Or directly enter from the default configuration, if you select boot Linux, you can also transfer parameters to the system kernel. Compared to other system boot loaders, LILO has greater flexibility, and its boot method is also more colorful. ● When LILO is installed on the MBR, active partition, or boot floppy disk of the hard disk, it is a substitute for the original bootstrap, which can boot any hard disk for Linux and other operating systems on either partition; ● In addition to the guiding sector, it does not Any hidden file, nor does it need to use a specific partition, which can be used in any partition, or even stored in a subdirectory of the DOS partition with Linux; ● It can boot several different kernel configurations Even a few different kernels; ● It can guide multiple Linux versions on the same machine; ● It boots Linux from the network. The flexibility of LILO makes its configuration is quite complicated. When there are multiple systems coexisting, it is recommended to install other operating systems first, and then load Linux so that LILO is relatively simple. Second, several important LILO boot parameters LILO's boot parameters have a lot, only for some important parameters. 1. "Boot =" This parameter indicates a device name (such as / dev / had) containing the boot sector. If this item is ignored, the leading sector is read from the current root partition.

2. "root =" This parameter tells the kernel which device is used as the root file system when the set value is used as the root file system, and the device name available for the root file system is: (1) / dev / hdan ~ / dev / hddn: ST-506 compatible with hard disk, N partitions (2) / dev / sdan ~ / dev / sden: SCSI compatible hard disk, N partitions (3) / DEV / XDan ~ / dev / xdbn: XT compatible hard disk, N partitions (4) / dev / fdn: floppy disk, A: (n = 0) or B: (n = 1) (5) / DEV / NFS: Signs of the root file system by the network 3. "NFSROOT =" If you need to provide the root file system through NFS to boot the disk-free workstation, this parameter specifies the ride, directory, and NFS where the network root file system is located. The format is: nfsroot = (:) (, nfs_options>) 4. "NFSADDRS =" Sets the various network interface addresses required for network communication, if there is no such parameter, the core will try to use the reverse Address Analysis Agreement (RARP) or Start Agreement (Bootp) identifies: nfsaddrs = : : : : : : 5. "Image =" Specifies the Linux kernel file. 6. "DELAY =" setting the waiting time before booting the first image. 7. "Disk =" This parameter defines a non-standard parameter for a particular hard disk. 8. "Append =" transmits an optional parameter line for the kernel, and the typical application is to specify parameters for hard disk automatically identify by the system, such as: append = "hd = 64, 32, 202" 9. "label =" This parameter specifies a name for each image for booting. 10. "Read-Only" settings in a read-only mode to root file system for File System Consistency Check (FSCK). 11. "Install =" Install a specified file as a new boot sector, default to /boot/boot.b. 12. "Loader =" Description The chain loader used, defaults to /boot/chain.b, if not started from the first hard disk or floppy disk, then this option must be explained. 13. "Table =" describes the device name containing the partition table. If this parameter is ignored, the bootloader will not pass the partition information to the bootable operating system. When the partition table pointed to this parameter is modified, the / sbin / lilo must be re-run. 14. The program executed when the kernel initialization is initialized, and the process is usually in init, getty, rc, and sh, version 1.3.43 to execute / sbin / init description command line, if there is a problem during the boot process If INIT = / bin / sh can be set directly to the shell. 15. "Ramdisk_start =" Since the kernel cannot be placed in a compressed memory file system image, in order to put the kernel image and the compressed memory image is placed in a floppy disk, add "ramdisk_start = ", so the kernel can start execution .

16. "MEM =" The purpose of this parameter is the number of memory used for Linux: such as MEM = 96MB, the purpose of the purpose is that the MEM = NOPENTIUM tells the kernel not to use the 4MB pagination table. 17. "VGA =" Sets the display mode, such as 80 × 50, 132 × 44, etc. Third, LILO typical configuration method usually, Linux's installer itself can complete the LILO installation configuration, which better solves the multi-system boot problem. If the system cannot automate this configuration, you can modify the configuration file manually. /etc/lilo.conf to achieve guidance under different conditions. 1. There is only one suggestion when the system can automatically complete the configuration: install lilo to the root of the Linux partition, not MBR. Suppose there is DOS / Windows in the current HDA1 installed Linux, and /etc/lilo.conf is approximately as follows: boot = / dev / hda2 # Specify boot position compact delay = 50 # delay 5 second root = current # 根 当 当 i = = / boot / vmlinuz # Specifies Linux kernel file label = linux # with Linux for Representative Name Other = / dev / hda1 # Other operating systems The partition table = / dev / hda # specifies the partition table Hard disk label = DOS # with DOS representative name 2. When the system cannot automatically complete the configuration, the system cannot automatically complete the configuration. It is not more than two: (1) BIOS can't see the root partition of Linux directly; (2) BIOS You can only read the first 504MB of the standard IDE hard drive. At this time, you must follow a basic principle: establish a smaller Linux partition that BIOS can access, which contains the necessary contents such as kernel files, mapping files, and link loaders, and roots can be another independent partition. As for other details on the configuration, we will explain the following examples. Example 1: The main hard disk is an IDE interface, the second hard disk is the SCSI interface, and the root file is on SCSI. Countermeasure: A smaller Linux partition (/ DEV / HDA2) is divided on the IDE hard disk, which contains basic files, histed to / u2, the main content of its configuration file /etc/lilo.conf is: boot = / dev / hda # lilo MBR install = / u2 / etc / limited from Boot.b installed in the main IDE, MAP = / u2 / etc / lilo / map # installer establishes this mapping file, tell Boot the location of the program internal nuclear block compact timeout = 50 image = / u2 / vmlinuz # kernel file should be copied in advance to / u2 Label = Linux root = / dev / sda1 # Tell the kernel root system on the SCSI hard disk Read-Only Other = / dev / hda1 loader = / u2 / etc / lilo / chain.b # Indicates Loader Label = DOS Example 2: A standard IDE big hard disk needs to be installed Linux and DOS / Windows. For big hard disk problems, many people only know less than 1024 cylinders, and I don't know why standard IDE hard disks can only recognize 504MB.

转载请注明原文地址:https://www.9cbs.com/read-31573.html

New Post(0)