Understanding and Configuring the LILO Linux Bootloader

choubertsprojects

The Best WordPress plugins!

1. WP Reset

2. WP 301 Redirects

3. WP Force SSL

LILO is a bootloader which has been around since the 1980’s and serves as an alternative to GRUB. Although LILO does not have some of the features that GRUB offers, it still remains a viable option for most Linux systems.

The “what is grub in linux” is a very important question that needs to be answered. Grub is the default bootloader for Linux systems. The LILO Linux Bootloader, on the other hand, is an alternative bootloader for Linux systems.

Understanding and Configuring the LILO Linux Bootloader

Despite the fact that LILO is now regarded a legacy bootloader and Grub2 seems to be taking its place, the LILO Linux bootloader will continue to exist for a long time. Even though LILO hasn’t been updated since late 2015 and is considered outdated in comparison to contemporary bootloaders, it’s still in use.

This article is for you whether you’re a Linux administrator or simply a power user who wants to understand how to setup LILO on Linux.

The LILO Linux Boot Process: An Overview

Linux must go through a boot procedure to get to a condition where you may interact with it and the apps installed on it. As illustrated below, the boot process consists of many phases, each of which is completed in the order listed.

A common Linux startup procedure A common Linux startup procedure

1. The Power On Self Test (POST) – During this stage, all connected hardware is tested briefly. Once all checks pass, the boot process searches for a particular section on the boot disk.

MBR vs. GPT: Which Partition Style Should You Use?

2. The POST procedure looks for the bootloader, which is a part of the boot disk that determines how to start the operating system. If the system is set up with an MBR, most bootloaders include only enough instructions to call later stages.

3. The bootloader (LILO or maybe GRUB) then provides instructions for finding the proper kernel to load in Linux. In a dual-booting situation, you may choose which kernel Linux boots from the bootloader directly or through a menu. The process then delivers control to the INIT system, which is usually Systemd, when the kernel loads.

4. The INIT System, often known as SystemD, is a procedure that guarantees that all of a run level’s scripts and dependencies are launched in the right sequence; the system may operate in one of many modes (run levels).

What is the LILO Linux Bootloader and How Does It Work?

To properly debug or manage the LILO Linux bootloader on older systems, you must first grasp its high-level functionality. This tutorial will utilize Slackware, which comes with LILO preinstalled, to show LILO.

The Evolution of LILO The Evolution of LILO

LILO is also available on Arch Linux and several Debian versions, however it is not the default bootloader.

Related: The Only Linux Shell Scripting Tutorial You’ll Ever Need

When a Linux PC completes the POST stage using LILO as the bootloader, a splash screen similar to the one below may appear.

The timer, OS Selection list, and text prompt below are all important aspects that may be seen on every LILO bootloader screen. However, owing to the bootloader’s customizability, your LILO splash screen may change greatly.

Slackware LILO splash screen Slackware LILO splash screen

If there isn’t a splash screen set up, you may be greeted with a plain text prompt. To choose which operating system to load, use the Tab key.

Text Prompt LILO Text Prompt LILO

If the kernel is enabled to start automatically, many Linux computers will boot right into the operating system without a menu or prompt. If this is the case, open a terminal and perform the following command to verify LILO is installed. If you don’t get a “lilo not found” notice or if the command doesn’t return a blank answer, LILO is installed on your system.

LILO Configuration

Let’s go a little more hands-on with LILO by learning how to access the LILO configuration and make some basic changes that you would require in the real world.

Prerequisites

Only a few pre-defined criteria apply to the demonstrations in this area. Before you expect the following demonstrations to operate on your system, make sure you have:

  • LILO requires a Linux system (physical or virtual) to execute. Slackware 14.2 is used in this lesson.
  • A user account having sudo privileges.
  • This lesson utilizes the most recent version of LILO, v24.2.

Only a few Linux distributions have LILO installed or in standard repositories since it is no longer actively developed. Since GRUB has been the default for over a decade, installing LILO on popular systems like Fedora or Ubuntu may take some time. Purist systems, such as Arch and Slackware, on the other hand, make it simple to run LILO.

LILO’s setup, like that of many other Linux tools and utilities, is controlled by a configuration file located at /etc/lilo.conf by default. The way LILO acts during the boot process is directly affected by changes to this file.

The configuration file may be put anywhere, but you must use the lilo -C command to tell LILO to seek for it in a non-default location.

Let’s have a look at what’s in the LILO configuration file.

With your preferred text editor, open the /etc/lilo.conf file, and you should see something like this.

/etc/lilo.conf is the default LILO configuration file. /etc/lilo.conf is the default LILO configuration file.

There are a lot of comments in the default LILO configuration file, which might make it difficult to grasp the structure. The configuration file should now look like the one below after you’ve removed any comments.

The LILO configuration file has two primary parts, as you can see. A global section and a section for Linux partition settings are included in the configuration file.

/etc/lilo.conf sections /etc/lilo.conf sections

Settings for the Global Configuration

Configuration choices that alter LILO’s behavior may be found in the global section. Many distinct characteristics that govern LILO’s behavior may be found in the global area, including:

add — A string that will be appended to kernel parameters internally.

  • The boot drive is where the MBR is located.
  • The location of a bitmap picture that will appear on the splash screen. When utilizing a bitmap picture for the splash screen, use the lilo -E command or follow these steps to prepare the image. For those interested in visual pleasure, the bmp-colors, bmp-table, and bmp-timer options allow for exact positioning of the selection menu and timer, as well as their colors.
  • prompt – Instructs LILO to display the boot prompt (as seen in the Text Prompt LILO screenshot earlier). If this option is omitted, LILO boots the default kernel.
  • timeout – The amount of time that the startup prompt is presented before the default is chosen, in tenths of a second. The first item in the list is usually considered as the default.
  • password – A password that must be entered before an operating system may be started.

It’s worth noting that the boot password is kept in plain text. You should establish filesystem-level access restrictions if you set a boot password in the configuration file to prevent unauthorized users from disclosing the password.

  • backup — A backup location for the current bootloader before making any modifications.
  • If a backup file already exists, force-backup overwrites it.

Partition Parameters in Linux

The LILO configuration file also describes all of the installed, bootable Linux kernels, in addition to the parameters that govern LILO itself. The following parameters may be found in this section:

  • image – The location on the disk partition where the Linux kernel will be loaded. If your operating system isn’t Linux, you should choose the alternative option.
  • root — The location of the operating system’s root partition.
  • label – A label for an item in the OS selection menu that refers to the LILO prompt entry.
  • read-only – Requires that the root partition be mounted as read-only first.
  • optional – If the image cannot be discovered while LILO is constructing the OS list, it is omitted.
  • default – Sets the default boot image.

Changes to LILO Configuration are saved.

It’s time to tell LILO about your modifications once you’ve customized the LILO configuration file to your desire. When you apply modifications, they are written straight to the MBR. When the kernel version or any boot option is changed, Linux must write the changes to the MBR. If you don’t do so, your system can become inoperable.

Save the file in your text editor and execute the lilo command to apply the modifications to LILO.

When you run lilo by itself, it will seek for the configuration file in the default location of /etc/lilo.conf. If you’ve saved the LILO configuration file somewhere else, you’ll need to use the -C flag, such as lilo -C mylilo.conf.

Conclusion

This document should come in handy the next time you come across a vintage Linux system using LILO and require a reference. This post is worth bookmarking since it will save you a lot of time the next time you need to debug or install LILO!

The “elilo” is a Linux bootloader that is used by the LILO Linux bootloader. This tool allows users to configure and understand how they can use it. The user can also install or remove elilo from their system.

Related Tags

  • installing lilo in linux
  • boot process in linux
  • what is lilo in linux
  • lilo boot loader windows
  • lilo boot loader download

Table of Content