In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
Today, the editor will share with you the relevant knowledge about how to configure LILO in Linux. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look at it.
Linux commonly used commands lilo commands are used to install the core load, boot management program. Lilo is a Linux system core loader with the function of managing boot. Execute the lilo directive alone, which reads the / etc/lilo.conf configuration file and installs lilo based on its contents.
Load the boot manager into the lilo installation core
Add that Linux lilo has become a standard part of all Linux distributions. As an older / oldest Linux boot loader, its growing Linux community support enables it to evolve over time and always act as a modern boot loader available. There are some new features, such as an enhanced user interface and the use of new BIOS features that can break through the original 1024-cylinder limit.
Although LILO is still evolving, the basic concepts of how LILO works remain the same.
Syntax lilo (option) option-b: specify the peripheral code where lilo is installed;-c: use compact mapping mode;-C: specify lilo configuration file;-d: set boot delay time;-D: specify the operating system that starts by default after boot, or system core identification tag;-f: specify disk geometry configuration file -I: specify the boot sector file to be used, default is the boot.b file in the / boot directory;-I: show where the system core is stored;-l: generate the linear sector address;-m: specify the mapping file;-P: decide to fix or ignore the partition table error;-Q: list the mapped system core files;-r: set the directory to be logged into the root directory when the system boots -R: set the instruction to be executed first the next time the system starts;-s: specify the backup file;-S: force the backup file to be specified;-t: do not execute the instruction, but list only the actions that will actually be executed;-u: delete lilo;-U: the effect of this option is similar to specifying the "- u" parameter, when the timestamp is not checked;-v: displays the instruction execution process -V: displays version information. The instance uses LILO as the boot loader
What needs to be done to use LILO as the boot loader depends on whether you want to do a fresh installation or change the already installed Linux to use LILO. If you are doing a fresh installation, jump directly to the section configuring LILO. If you already have a Linux distribution installed, you can usually choose to install and configure LILO (and boot the machine to a new Linux installation).
To migrate an existing Linux to LILO, you must first get the latest version of LILO (see Resources). Before doing anything else, it is recommended that you make sure that you have a Linux boot disk at hand-if you occasionally make a mistake, it can be a great help to revert to the original Linux configuration! Once LILO is installed on your system, it's easy to get it to take over MBR. Enter as root user:
/ sbin/lilo-v-v this will erase everything currently in the MBR using the current LILO default value. However, read about configuring LILO to ensure that it boots as expected. Also note that if you want to run Windows and Linux on the same machine, you should install Windows OS before installing Linux OS, so that the boot loader selected in the Linux installation is not overwritten by the Windows boot loader. Unlike the Linux boot loader, most Window boot loaders do not support booting Linux. If you have installed Linux first, you only need to create a Linux boot disk yourself so that after installing Windows, you can go back to the Linux installation and rewrite MBR.
Configure LILO
The configuration of LILO is done through a configuration file located at / etc/lilo.conf. Listing 1 shows an example configuration that uses my home machine and supports dual booting of Linux and Windows machines. Knowing the basic configuration of my workstation, you can imagine how these configurations relate to the actual machine:
Windows XP is installed on the primary HDD (physical disk 1) (it was originally the only one on the machine). In Linux terminology, this HDD is / dev/hda (hd0,0 in grub terminology).
The Red Hat Linux;root partition is installed from HDD (physical disk 2) on the third partition of the hard drive, / dev/hdb3 (hd1,3 in GRUB terminology).
Lilo.conf sample file:
Boot=/dev/hda map=/boot/map install=/boot/boot.b prompt timeout=100 compact default=Linux image=/boot/vmlinuz-2.4.18-14 label=Linux root=/dev/hdb3 read-only password=linux other=/dev/hda label=WindowsXP profile options description:
The boot= line tells LILO where to install the boot loader. In the above example, it will be installed on the MBR of the first hard drive. You can also choose to install LILO to / dev/hdb3 (the Linux partition in the example), which requires installing another boot loader to / dev/hda and pointing it to the LILO boot loader; then you just need to have LILO as the secondary boot loader. Typically, the boot loader should be located at / dev/hda. You can also point this parameter to a floppy drive (most commonly / dev/fd0) to make a LILO floppy boot disk.
Map= points to the mapping file used internally by LILO during boot. When you install LILO with the / sbin/lilo command, it automatically generates this file containing the descriptor table (among other things). It is recommended not to change this file!
Install= is one of the files that LILO uses internally during the boot process. It contains both the main and secondary parts of the boot loader. A fragment of the boot.b file is written to MBR (the main part of the boot loader), which points to that mapping, and then to the secondary boot loader. Again, don't change it!
Prompt= tells LILO to use the user interface (in this case, two options are given-- Linux and WindowsXP). In addition to using the prompt/user interface, you can specify specific parameters for the Linux kernel and so on, where appropriate. If you do not specify this option in the configuration file, LILO will boot to the default OS without any user interaction or waiting. Note, however, that if you press SHIFT during boot, you can still get a hint, which is useful when you don't want to expose the boot loader to the average user.
Timeout= is the wait time (in 1/10 seconds) before the boot prompt automatically boots the default OS (in this case, Linux). If prompt is not specified in lilo.conf, this parameter is ignored.
The compact option greatly speeds up the boot process by combining successive requests to read the disk into a single request. However, this can be a mixed blessing, because I have seen a lot of posts on the forum about this option. This option is especially useful when you want to boot from a floppy disk.
The default= option tells LILO which image to boot from by default, such as after waiting for a timeout. This is associated with the label of an image in the lilo.conf file. If this option is not specified in the configuration file, it will boot the first image specified in the file.
For each version of Linux that users are allowed to boot to, you should specify image= and the following three options. The image option specifies the kernel version you want to boot to.
Label= identifies the different OS that you want to boot from the user interface at run time. In addition, this tag is used to specify the default OS for the boot. (note: avoid spaces in the tag name; otherwise, unexpected errors will occur when booting that file. )
Root= tells LILO OS where the file system is actually located. In our example, / dev/hdb3, the third partition on the second hard disk.
Read-only tells LILO to initially boot to the file system as read-only. Once the OS is fully booted, it is mounted as a read-write.
Password= allows you to set a password for the specific OS you are booting to. Unfortunately, this password is saved as readable text in the lilo.conf file, so everyone can read it. If necessary, you can also set a password for each operating system you want to boot from (in our example, only one password is set for Linux boot).
The action of other= is similar to a combination of image and root options, but is used for operating systems other than Linux. In our example, it tells LILO where to find Windows OS (the first partition on the first hard disk). This is usually the case if you install Windows before you install Linux.
Label= is the same as all other label options.
Many other parameters can be used in the lilo.conf file, but the parameters in listing 1 are sufficient to make the machine available. For further information on these and other parameters of lilo.conf, please refer to the manual page (man lilo.conf). Since lilo.conf is not read at boot time, you need to "update" MBR when there are changes to this file. If you reboot without completing this step, changes to lilo.conf will not be reflected in startup. Similar to writing LILO to MBR previously, you need to run:
The / sbin/lilo-v murv-v Murv tag will give you a very detailed output. When running LILO as we do, there are many parameters that can be specified. Refer to the man page for further information (man lilo).
Initial boot process
When LILO initially boots, it prints out each letter in order-- L-I-L-O. If all the letters are displayed, then the first phase of the boot is successful. The absence of anything indicates a problem:
L: the first phase of the boot loader has been loaded. If LILO stops here, there is a problem booting the second phase of the boot loader. This is usually accompanied by an error code. A common problem at this stage is a media problem, or incorrect disk parameters are specified in the lilo.conf file.
LI: the second stage boot loader has been loaded. LILO stops here to indicate that the second stage boot loader cannot be executed. Again, this may be due to a problem similar to displaying only L: it is loading, or it cannot be loaded because the boot.b file is corrupted, moved, or deleted.
LIL: the second phase of the boot loader is being executed. At this point, the media problem may occur again, or the mapping file (as specified in the lilo.conf file) may have a problem finding the descriptor table.
The LIL?: is loaded to the same stage as above. This usually means that the second stage boot loader used the wrong address, the most common reason being that the location of boot.b is different from that specified in the lilo.conf file.
The LIL-: is loaded to the same stage as above. There is a problem loading the descriptor table, the most common cause is a descriptor table error.
LILO:LILO was successfully loaded without any errors.
Additional configuration at boot time
After the LILO is successfully loaded, you will see the LILO prompt. Using the previous example lilo.conf file, you will have two choices, which may not be intuitive to a novice to LILO. First, you can let LILO time out (after 10 seconds), which will boot / dev/hdb3, the Linux partition. Alternatively, you can press the TAB key, which lists the operating system options to boot. In our example lilo.conf, the options we will get are "Linux" and "Windows". Whichever one you enter, you will boot to the OS. If you specify the load Linux option, you will be prompted for a password, in this case linux. If you enter an incorrect password, a LILO prompt is returned.
Unfortunately, LILO does not support interactive configuration during boot, so options can only be specified in lilo.conf or when running / sbin/lilo.
One final piece of advice about trying LILO for the first time: I found it safer to boot a floppy disk than to use a hard disk for LILO configuration. To do this, you must replace boot=/dev/hda with boot=/dev/fd0 in the lilo.conf file. That way, if you mess up any configuration in the lilo.conf file, you can remove the boot disk and boot to Linux as before. When everything is fine using a floppy disk to boot, you can change the lilo.conf back to boot=/dev/hda, and then run / sbin/lilo one last time to upload the changes.
These are all the contents of the article "how to configure LILO in Linux". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.