Linux Bootup Configuration

From Webmin Documentation
Jump to: navigation, search
The module Linux Bootup Configuration is currently unmaintained.

Either the feature is obsolete, or the feature is updated such way that webmin no longer interfaces correctly.

The Linux Bootup Configuration manages the old-style Linux bootup, usually referred to as LILO. On 'newer' Linuxes LILO is usually superseded by GRUB Boot Loader.

LILO's configuration is stored in the file /etc/lilo.conf. However, the boot loader itself does not actually read this file - instead, it reads from a separate map file that is built from lilo.conf whenever the lilo command is run. This map file contains the actual on-disk block locations of the kernel files, which allows LILO to load a kernel without having to understand the format of the filesystem that it is mounted on. Any time lilo.conf is changed or a kernel is re-compiled or install, the lilo command must be re-run to update the map file so that the boot loader knows where to look on disk.

One major limitation of LILO is that on systems with older BIOSs, it can only boot kernels that lie within the first 8 GB of a hard disk. With drives over 100 GB in size becoming common, this can be a serious problem unless the disk is partitioned properly. Typically, the /boot directory in which kernels are stored is mounted from a separate partition which is located at the start of the disk, and the root directory is mounted from a partition that takes up the rest.

GRUB usually uses the configuration file /boot/grub/menu.lst, but unlike LILO it does understand the format of ext2, ext3 and vfat filesystems and so can read the menu.lst and kernel files without the need for a block map. For this reason and because GRUB can load a kernel stored anywhere on the hard disk, it is usually considered to be a superior boot loader, and has been overtaking LILO on most Linux distributions.

The Linux Bootup Configuration module

This module allows you to configure LILO, the most common Linux boot loader. It can be found under the Hardware category, and when you enter it the main page displays a table of icons as shown in the screenshot below. Each icon represents a boot-time menu option, which can be either a Linux kernel or another operating system.

If Webmin detects that you do not have LILO installed, the main page will display an error message to that effect. If this is the case, your distribution probably set up GRUB as its boot loader - see the section on The GRUB Boot Loader module instead.


The Linux Bootup Configuration module

Some Linux systems have both GRUB and LILO installed, even though only one can actually be used as a boot loader at any one time. If your system uses GRUB, you should probably not use this module even though it will work correctly. Any time the Apply Configuration button on the main page is clicked, LILO will be installed on the disk or partition configured on the global options, possibly over-writing GRUB.

Booting a new kernel with LILO

If you have just compiled a new kernel and want to be able to use it, you will need to add a new LILO boot kernel entry. To do this, the steps to follow are:

  1. After compiling the kernel, copy its compressed kernel image file (usually found under the source directory at arch/i386/bzImage) to the /boot directory. Normally it should be renamed to vmlinuz-_xx.yy.zz_, where xx.yy.zz is the kernel version number.
  2. On the main page of the Linux Bootup Configuration module, click on the Create a new boot kernel link to go to the kernel creation form.
  3. Enter a unique name for your new kernel into the Name field, such as linux-xx.yy.zz. Whatever you enter will appear in the LILO menu at boot time.
  4. In the Kernel to boot field, enter the full path to the kernel file that you copied to the /boot directory.
  5. To pass extra options to the kernel, set the Kernel options field to Add options and enter them into the text field to its right. Most of the time, no additional options are needed though.
  6. Set the Boot device field to Device, and choose the partition that contains your system's root filesystem from the menu next to it.
  7. If the root directory on your system is mounted from a device that is not compiled into the kernel (such as a SCSI disk or hardware RAID controller), you will need to create an initial RAM disk containing the kernel modules needed to access the root filesystem. The simplest way of checking to see if this is necessary is to look at other existing boot kernel configurations. To create an initial RAM disk file under the /boot directory for kernel version xx.yy.zz, you will need to run a command like : mkinitrd /boot/initrd-_xx.yy.zz_ xx.yy.zz Then set the Initial ramdisk file option to the path to the newly created file.
  8. Click the Create button to create the new LILO book kernel and return to the module's main page. An icon for the kernel should now be visible.
  9. Click Apply Configuration at the bottom of the page to have LILO re-installed on your hard disk with the new kernel in its map file. A page showing the output of the lilo command and any errors encountered will be displayed, so that you can see if the installation was successful or not.
  10. To use the new kernel, you will need to re-boot. Depending on the LILO configuration, it will either display a menu of options at boot time, or prompt you to enter an option name. Either way, select your new kernel to have it loaded and started. Be sure to watch the debugging output and error messages that the kernel displays while booting, so that if anything goes wrong you can diagnose the problem. If there is a problem, you may need to re-boot and select the old kernel option, then use Webmin to fix the LILO configuration.

An existing boot kernels can be edited by clicking its their icon on the main page, which will take you to an editing form. Any of the fields can be edited and the changes saved by clicking the Save button, or the kernel can be removed by clicking Delete instead. Always be careful editing any kernel configurations that you did not create yourself, as a mistake may make the system unbootable.

Booting another operating system with LILO

If your system has multiple operating systems installed on different partitions or hard disks, you can use LILO to select which one to load at boot time. To add a new operating system that you can select at boot time, the steps to follow are:

  1. On the main page of the Linux Boot Loader module, click on the Create a new boot partition link to bring up the partition creation form.
  2. Enter a unique name for your new boot option into the Name field, such as windows98. Whatever you enter will appear in the LILO menu at boot time.
  3. Select the partition that the operating system you want to boot is on from the Partition to boot menu. The selected partition must have an appropriate boot loader or boot sector installed. Windows for example does by default, but other operating systems like FreeBSD may need a boot loader to be installed separately.
  4. Set the Pass partition table to OS field to Yes, and select the drive on which the operating system's partition is located.
  5. Click the Create button, and if you have not made any errors on the form you will be returned to the module's main page.
  6. Click Apply Configuration at the bottom of the page to have LILO re-installed on your hard disk with the new boot option in its map file. A page showing the output of the lilo command and any errors encountered will be displayed, so that you can see if the installation was successful or not.
  7. You should now be able to re-boot and select the new OS from the LILO menu.

Once you have created a new operating system boot option, you can edit or delete it at any time by clicking on its icon on the module's main page. If you make any changes, remember to click [Apply Configuration] so that they can be used at boot time.

Editing global LILO options

LILO has several configurable options that apply to all bootable kernels and operating systems. To edit them, the steps to follow are:

  1. Click on Global Options on the module's main page, to go to the global options configuration form.
  2. To change the drive or partition that LILO is installed on, select it from the Write boot loader to menu. Generally you will not need to change this if LILO is already being correctly run at boot time.
  3. Normally LILO will give the user a chance to select a kernel or operating system to load at boot time. To disable this, set the Display LILO prompt? option to No. To give the user the opportunity to select an OS, set it to Yes.
  4. To change the kernel or OS that is loaded automatically at boot time if no other selection is made, adjust the *Default kernel/partition* field.
  5. To adjust the amount of time that LILO will wait for user input before loading the default kernel, enter a new time into the Time to wait at LILO prompt field.
  6. To prevent un-trusted users from booting the system, enter a password into the Default boot password field. Unless a boot option has the Password needed for field set to *Booting kernels with extra options*, it will not be loadable unless the password is entered.
  7. On systems with modern BIOSs, LILO can be configured to load a kernel located anywhere on the hard disk. To enable this, set the Allow booting from beyond 1024 cylinders? field to Yes.
  8. Click the Save button to save your changes to the global options and return to the module's main page.
  9. So that LILO will use the new options at the next boot time, click on Apply Configuration. If the disk or partition on which LILO is to be installed was changed, it will be written to the new location now.