Discussion on Several Problems of Linux Lilo
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 = (
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 =
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 / boot.b # 主 主 安装 安装 安装 安装 m m 安装 安装 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件 文件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. In fact, the BIOS's INT13 call is a CHS code of three bit yuan groups. 10 bits are column, 8 bits are magnetic head numbers, and 6 are sector numbers. The possible cylindrical number is 0 ~ 1023, the possible head number is 0 ~ 255, and the possible sector number on the track is 1 ~ 63, and the 24 bits can be addressed up to 8455716864 bit tuples (7.875GB). But unfortunately, the standard IDE interface allows 256 sectors / tracks, 65536 cylinders and 16 heads. Itself can access 237 = 137438953472 (128 GB), but there are only 63 sectors of the BIOS and 1024 cylindrical restrictions, only 528482304 (504 MB) can be derived. Countermeasure: 350MB (/ dev / hda1) is divided into DOS, 150MB (/ DEV / HDA2) in the top 500MB of the hard disk to Linux, and the parameters of the hard disk should be explained in the corresponding configuration file. Boot = / dev / hda ... ... disk = / dev / hda bios = 0x80 Sectors = 63 Heads = 16 cylinders = 2100 image = / vmlunuz append = "hd = 2100, 16, 23" root = / dev / HDA2 Label = Linux 4, LILO's uninstallation If you want to delete Linux from your hard drive, you can use your hard drive from your hard drive. However, LILO will remain there and will try to boot Linux each time the hard disk is started (or even all files are deleted). This situation only occurs when LILO is written to MBR. There are two ways to delete LILO. When LILO covers the boot sector, it retains a backup of a boot sector in /boot/boot.xxyy, where xxyy is a 16-en-applied device master / sub-number (Major / minor number), using command "LS -l / dev / device "to get the main / sub-number of the hard disk or partition. If these backup files already exist, then when you reinstall the LILO or reconstruct the kernel, it will not regenerate this file, which ensures that this backup file is the most original boot sector.