LILO configuration Raiders

xiaoxiao2021-03-06  83

LILO configuration Raiders 2000 Blue Forest http://www.lslnet.com at 20:57 on September 21 Author: Zhou Di LILO (Linux Loader) is a Linux comes with an excellent boot manager with which you can easily Guide multiple operating systems on a machine. Compared to other commonly used guidance loading programs, LILO boot mode is more artistic, in-depth understanding, will help us to easily handle multi-operating systems, network boot, large hard drives, and large memory. Usually we talk about LILO, it will involve two aspects - LILO boot procedures and LILO installation commands / sbin / lilo. In order not to confuse these two concepts, this article will use LILO to represent the LILO boot program, while LILO represents / sbin / lilo. Generally, LILO uses a text file /etc/lilo.conf as its configuration file. LILO reads lilo.conf, writing a specific LILO to the system boot area according to the parameters. At any time, /etc/lilo.conf must be modified, and the LILO command must be re-run to ensure that LILO is running normally. Lilo.conf uses a lot of configuration parameters, and it is quite complicated. The following is a preliminary discussion as a preliminary discussion with Redhat Linux. The Redhat's Lilo package version is 0.20, and other Linux distributions may have, but it will not be too big. The configuration parameters in the lilo.conf file are divided into two parts, part of the global parameters, and the other part is the boot image parameter. Like other configuration files in the Linux system, a line of words after the "#" is comment. 1. LILO's global parameter global parameters are valid, which can appear anywhere in file lilo.conf. The following is a specific parameter item: 1.Backup = backup-file The original boot area backs up to Backup-file before loading LILO, not redhat default /boot/boot.nnnn. You can also back up to a device, such as: / dev / null. Note: This parameter will be ignored if there is an original file originally. We can restore the original guiding sector through this backup: DD if = / boot / boot.nnnnn OF = / dev / hda bs = 446 count = 1 Restore the original MBR. (Note: Although Boot.nnnn has 512 bytes, only the first 446 bytes can be restored to MBR.) 2.Boot = boot-device Specifies a device for installing LILO. Usually LILO can be installed in the following places: MBR: The main guiding area of ​​the first hard disk, corresponding to / dev / hda, / dev / sda, etc. Root: Super block in the Linux root partition, corresponding to / DEV / HDA1, / DEV / HDA2, / DEV / HDA5, / DEV / SDA1, / DEV / SDA5, etc. FLOPPY: LILO is installed on a floppy disk, corresponding to / dev / fd0. When not specified, LILO is installed on the root partition in the super block. 3.Compact This parameter is used to optimize LILO to generate a smaller "MAP" file. This parameter is highly recommended if LILO is installed on the floppy disk. 4. DEFAULT = Name Specifies the default boot operating system. Such as default = dos indicates that the system is a system of DOS as the default boot operating system. If this parameter is not specified, the first operating system in lilo.conf will be used as the default operating system.

5.Delay = tsecs When there is no "prompt" parameter, LILO will immediately boot the default operating system, "DELAY" parameter is inserted between this delay, and the unit is 1/10 seconds. 6.Disk = device-name defines the parameters for some non-standard hard drives. The interior also includes several optional sub-parameters. BIOS = : Device number. The hexadecimal number 0x80 represents the first hard disk; 0x81 represents the second hard disk, and so on. Sectors = : The number of hard disk sectors. Heads = : The number of hard drive magnetic heads. Cylinders = : Hard disk column number. Restricted by the system BIOS, the column number must be within 1024. Partition = : A partition on a particular hard disk is physically positioned, there is a sub-parameter start. Start = : The start sector of each partition. For example: disk = / dev / sda bios = 0x80 # Specify SCSI hard disk for the first hard disk SECTORS = 32 heads = 64 cylinders = 632 # Hard disk parameter is 632/64/32 partition = / dev / sda1 start = 2048 # first partition Start sector 2048 Partition = / dev / sda2 start = 204800 # second partition start sector 204800 partition = / dev / sda3 start = 500000 partition = / dev / sda4 start = 900000 When there are two hard drives on the machine When a piece is a SCSI hard disk, the other is the IDE hard drive, LILO is likely to automatically identify their main, from the order, and can be made as follows: disk = / dev / sda bios = 0x80 disk = / dev / hda BIOS = 0x81 #scsi hard disk is the main hard disk, the IDE hard disk is prepared for the hard disk from the hard disk, which is unrecognized for Linux. General Linux can correctly identify and use most hard drives, unless the worst case, otherwise, do not set it. 7.Force-Backup = backup-file Similar to the "Backup" parameter, it will overwrite the original same name file. 8. Ignore-Table Inform Lilo Ignore the invalid hard disk partition table. 9.install = boot-sector LILO actually contains several parts, and these parts are stored in the /boot/boot.b file. If the "install" parameter is ignored, LILO considers install = / boot / boot.b. 10.Linear generates a LINEAR sector address for replacing the hard disk sector / head / cylinder address (hard disk geometry). The LINEAR address is generated at runtime and does not depend on the hard disk geometry. Some SCSI hard drives and some IDE hard drives used in LBA methods may need to use this parameter. Note that the "linear" parameter cannot be used when LILO is installed onto the floppy disk. 11.Lock appears LILO prompts, press now to start the computer with the last boot image.

That is, when we add this parameter in lilo.conf, then run the LILO to install LILO, restart your computer, then Lilo prompts us to choose which operating system boot, this choice will be recorded by lilo, That is, "Lock", when starting the computer next time, LILO will ignore parameters such as "delay", "prompt" and keyboard input and directly jump to its "lock" operating system. 12.Map = map-file Specifies the MAP file. Without this time, the default usage / boot / map, each executing the lilo command will generate a new MAP file. 13.Message = message-file This command is used to specify a file containing comment information, which will be displayed before the system prints "LILO". If you want to get more information at LILO, you can edit a file, and you can use this command. If the character (Ctrl L) containing an ASCII code is 0xFF is included in the file. Note that the size of the file cannot exceed 65535 bytes. After each file changes, you must re-run the LILO command to rebuild the MAP file to ensure that it is displayed normally. 14.Optional When the boot image used to start, this parameter is ignored by LILO. This is useful for testing a Linux core that does not have long-term existing. 15. Password = password is LILO setting password protection, each restarting the computer prompts the user to enter the password. After setting the password, it is recommended to change the file attribute of lilo.conf to 600 to avoid the non-root user to see the password. 16.Prompt gives "BOOT:" prompts, forced LILO waiting for the user's keyboard input, press Enter to guide the default operating system immediately, and press the Tab key to print an alternative operating system. When "Prompt" is set and "timeout" is not set, the system will always be waiting state without booting any operating system. When this parameter is not set, LILO does not give "Boot:" prompt and direct the default operating system, unless the user presses any of the SHIFT, CTRL, Alt three key. In most cases, if there are multiple operating systems on your hard disk, it is recommended to use the parameters, which leaves the user a selection room. 17.Restricted and "Password" are used to make "password" only when there is a command line when the LILO prompt is entered. 18. Serial = Parameters uses serial port control. This will initialize the specified serial port and will enable the boot manager to accept input from the serial port. Sending an interrupt signal from the serial port equivalent to pressing the Shift key from the console keyboard, which will also be captured by LILO. If the access from the serial port is not guaranteed is as safe as the console, one modem is connected to the serial port, it is recommended to add password protection for each boot image. The parameters are syntax: [, [ []]] : The serial number indicated by the number, 0 represents COM1, and the remaining classes are pushed. All four serial ports can be used. : Serial port rate, support 110, 150, 300, 600, 1200, 2400, 4800, and 9600 BPS, the default is 2400 bps. : Sets the serial pass check. In general, LILO ignores parity. n means no verification, E represents the even check, o represents the odd check. : The number of characters, only 7 or 8, the default is 8. You can only take 7 when there is a parity check. If "Serial" is set, the system will automatically increase the value of the "DELAY" item even if "Delay" is set.

19.Timeout = TSECS Set the time for the time to wait for the keyboard, and the unit is 0.1 seconds. If there is no input exceeding this time, it is timeout, the system will automatically boot the default operating system. If this parameter is not set, the default timeout length is infinite. Second, the boot image parameter boot image parameters act on each boot image area. If a boot image parameter (for example: password) is in contact with the definition of global parameters, the definition of the boot image parameter is defined, but is limited to the boot image area. The following is a specific parameter item: Image = pathname Sets a file or device that contains Linux core boot image. Other = pathname Sets files or devices that contain non-Linux operating systems such as DOS, SCO UNIX, Windows 95, and so on. Range = start-end If the "image" parameter is set to a device, the storage range of the Linux core boot image must be set. Image = / dev / fd0 = 1-512 # Linux core boot image Store the first to 512 sector Label = Name on the floppy disk to identify the current operating system, that is, the operating system name. The user can determine which operating system boot by entering "Identification" after the LILO prompt. Alias ​​= Name gives a alias for the current operating system. LOCK is similar to the same name global parameter. Optional is similar to the same name global parameter. Password = password Similar to the same name global parameter. Restricted is similar to the same name global parameter. The following two parameter items are used for non-Linux operating systems: loader = chain-loader If the non-Linux operating system on the second block is to be booted, this parameter is required to install the LILO to the floppy disk. When not specified, the default is /boot/chain.b. If the MS-DOS or Windows 95 on the second hard disk is launched, logader = / boot / any_d.b can be defined; for OS / 2, it is loader = / boot / OS2_D.b. As a special functional module, any_d.b is no longer, and it is no longer included in the LILO package after version 0.20, and its function is integrated into chain.b, and OS2_D.B has changed. Their functions can be replaced by the following statements. Example: Other = / dev / hdb1 loader = /boot/Any_d.b Replace with: Other = / dev / hdb1 map-drive = 0x80 to = 0x81 map-drive = 0x81 to = 0x80 for OS2_D.B: Other = / Dev / hdb1 loader = / /BOOT/OS2_D.B Replacement to: Other = / dev / hdb1 loader = / /BOOT/OS2_D.B Map-Drive = 0x80 to = 0x81 map-drive = 0x81 to = 0x80 map-driving = Notify CHAIN.B Loading the memory resident driver of the hard drive or the hard drive, use it to boot different operating systems on different hard disks, only one, the BIOS must be able to access the hard disk. "Map-Drive" followed by the variable "to = ".

In fact, "Map-Drive" has played "soft" exchange two floppy drives or hard drives, from the order, avoiding the trouble of hand-wiring. Example: Exchange flop drive Map-drive = 0 to = 1 Map-drive = 1 to = 0 Exchange Hard Drive (see Loader Parameter) Table = Device Specifies the master device that contains a non-Linux system partition. For example, if Windows 95 is on the first basic partition of the first IDE hard disk, that is, / dev / hda1, it must define Table = / DEV / HDA. Third, the core parameters If LILO boots the Linux system, we can pass some parameters to Linux core with the following command. In addition to "Literal", they can also be used in the global parameter area. Append = string appended Parameter string String to the Linux system. It is often used to configure hardware devices that Linux cannot correctly test. For example: append = "HD = 64, 32, 202" notifies the Linux core, the hard disk parameter is 64 cylinders, 32 heads, 202 sectors. Specific parameter string settings can be referred to / usr / doc / howto / bootprompt-howto file. Literal = String is similar to "append", but it will undo all other core parameters (such as setting the root device). Because "Literal" will undo some essential, important parameters, so they cannot be set in the global parameter area. Ramdisk = size specifies the size of the RAM disk. Size does not establish a RAM disk at a time. When this parameter is ignored, the RAM disk size is determined by the Linux core boot image. Read-Only Notification LILO loads the root file system in a read-only mode. Usually we need to load root file systems in read-only mode when checking root file systems. The Linux system will also load the root file system in a read-only mode, and then reload it into a read and write mode after each startup. The READ-WRITE notifies LILO to load the root file system in a read and write mode. Root = root-device Specifies the installed root file system hard disk partitioning device. VGA = MODE Specifies the VGA mode when booting the Linux system. With the following: Normal: Regular 80 × 25 Text Mode Extended (OR EXT): 80 × 50 Text Mode ASK: When the user is booted which VGA mode is used, the knock button will display an allocated VGA. Mode table. If you do not specify a VGA mode, the system uses the VGA mode value contained in the system core by default. 4. Lilo.conf configuration instance has these basic knowledge, we can easily configure LILO in your own intent. See an example of a lilo.conf file: boot = / dev / hda # Installilo installed in MBR.

LILO as the main boot manager message = / boot / message # Note to / boot / message compact # Generate a smaller "map" file map = / boot / map # Specify "map" file for / boot / map install = / Boot / boot.b password = zhoudi # Set the password vga = Normal # 80x25 text mode linear # Using "linear" address Prompt # prompt user keyboard input timeout = 50 # timeout time 5 second default = dos # default boot Label for DOS Operating system # setting Linux image = / boot / vmlinuz-2.0.34-1 # Setting Linux core boot image label = linux # identified as Linux root = / dev / hda1 # Set the root file system read-only #LILO Reading mode load root file system # Set MS-DOS or Windows 95 other = / dev / hda2 #dos partition as the first IDE hard disk second partition label = DOS # ID DOS TABLE = / dev / hda # The device is the first IDE hard disk # setting SCO UNIX Note: The SCO partition must be set to an active partition and install LILO on the MBR. Other = / dev / hda3 label = SCO TABLE = / dev / hda This example, LILO is the main boot manager to manage all operating systems on the machine. LILO can also be used as a secondary boot manager, which is only necessary to change the "boot" parameter to the root partition. For example: boot = / dev / hda1 When using LILO in this way, the Linux root partition must be set to active partition with DOS or Linux, and this way is only for hard disk primary partitions (not extended or logical partitions) effective. LILO can also initiate a second operating system. There are two Seagate hard disks on my machine, a hard disk is 8.4GB, and the other is 1.2GB, all in the main IDE port in LBA mode. 8.4GB jumper is the main disk, 1.2GB jumper is from the disk, Linux core easy to identify them and can be used normally, and the 1.2GB hard disk is installed on the ms-dos 6.22. The author sets lilo.conf: disk = / dev / hda bios = 0x80 # Due to the dual hard disk problem in the IDE hard disk, "no system disk or system is wrong!", You need to modify the program as follows.

Disk = / dev / hdb bios = 0x81 boot = / dev / hda map = / boot / map install = / boot / boot.b linear prompt timeout = 50 Default = dos image = / boot / vmlinuz-2.2.11-1 label = Linux root = / dev / hda1 read-only other = / dev / hdb1 label = DOS map-drive = 0x80 to = 0x81 map-drive = 0x81 to = 0x80 # 交 两 two hard drive main, from the order table = / dev / hdb After configuring the lilo.conf file, execute the lilo command under the root account, the new LILO is loaded into the system. The first example of the above execution is as follows: #LILO Added Linux Added DOS * Added SCO (Note: It is a default operating system) 5. LILO prompt information LILO will give some prompt information when running. Its meaning is helpful to our correct configuration lilo.conf or find hardware errors. When LILO is loaded with its own, the word "lilo" is displayed: A letter is displayed for each one-specific process. If LILO has failed in some place, there are several letters on the screen to indicate where the error occurred. Note that if the disk is instantaneous malfunction, some hexadecimal numbers may be inserted after the first letter "L" (disk error). Unless LILO stops there, there is no serious problem. No prompt: LILO is not installed or installing the partition of LILO is not activated. L : LILO's first part has been loaded and running, but it cannot be loaded into the second part of the boot program. Two-digit error code indicates the type of problem (see "Disk Error Code"), which is usually in the media access failure or hard disk parameter error. LI: LILO The first part is correct but the second part is executed. This is usually the hard disk parameter is incorrect or /boot/boot.b is not re-running the MAP installer after being moved. LIL: LILO The second part begins, but cannot read the descriptor table from the "MAP" file. This is usually caused by the incorrect media error or disk parameters. LIL ?: Lilo loaded in the wrong place. The reason is substantially the same as "Li". LIL-: Descriptor Table error. Typical reason is that hard disk geometry is subtle or /boot/boot.b is moved without running the MAP installer. LILO: LILO is correct. 1010101010: Partition situation has changed until reinstall LILO, in addition, overclocking may also come. 6. Disk error code 0x00: "Internal Error". The subroutine is generated by the LILO sector. It may be because of the broken file, the Map file is rebuilt. Another reason is perhaps when using the "linear" parameter to access the cylindrical plane exceeding 1024. 0x01: "illegal order". This means that Lilo has visited the hard drive that the BIOS is not supported. 0x02: "Did not find address tag". Usually a media problem, try a few times. 0x03: "Write protection error". The appearance is only when the write operation is written. 0x04: "Sector is not found". Typical reasons are hard disk parameters errors.

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

New Post(0)