LILO (LInux LOader) Configuration: Moving LILO configuration files

Next Previous Contents

## 4. Moving LILO configuration files

Sometimes, one must play with LIlO configuration file. The good news is that (1) they are movable and (2) you can tell Linuxconf about it. Just go to the "List all configuration files" menu, scroll to the `/etc/lilo.conf` line and select the `edit` button. Enter the new path of the LILO configuration file. Be aware that LILO expects to find its configuration file in /etc/lilo.conf. When moving the file, it has to go to a subdirectory holding an `etc` subdirectory in which you will place the file `lilo.conf`, for example, /mnt/tmp/etc/lilo.conf.

## 4.1 Why move LILO anyway?

There are different reasons why one would want to do this. Here are some.

- Your hard drive has more that 1024 cylinders and the root partition goes beyond the 1024th cylinder. LILO uses the BIOS to load the kernel files (among other things). If the kernel file lies above the 1024 cylinder limit, LILO won't be able to boot properly. LILO will tell you this right away at install time.
- Your root partition is located on the third or fourth hard drive and your BIOS (again) is too old and does not know about this second IDE channel. In this case, LILO will warn you at install time that some BIOS can't access the drive. At boot time you will get a bunch of errors.

On the other hand, some distributions properly install all the files needed for booting in a /boot directory, which is kept in a separate partition if your root directory is not entirely below the 1024 cylinder mark. In that case, you are not likely to need to move LILO at all.

## 4.2 How to move? Where?

On a machine dedicated to Linux, where you have a large drive with more than 1024 cylinders, many people will create a smaller partition for the basic OS and a larger for the data, insuring that all LILO file fits under the 1024 cylinder limit.

This is often annoying as it makes management more complex. You end up with two partition partly filled.

Another solution is to create a very small partition (few megs) at the beginning of the disk and reserve that for LILO configuration and kernel files. This way you can create a single large root partition which is easier to manage.

(one can argue that creating a single large partition is a bad idea as it puts all the eggs in the same basket. Given the design of the `EXT2` file system which distributes management information all over the partition, with replication, I doubt this applies anymore).

So you have a partition which fits the bill. It is all accessible from the BIOS. Here are the steps to follow. Suppose this partition is mounted under the `lilo` directory and you want to put all the configuration files in the root of this partition.

- mkdir /lilo/etc
- cp /etc/lilo.conf /lilo/etc/lilo.conf
- mkdir /lilo/boot
- cp /boot/* /lilo/boot
- cd /
- tar cf - dev | (cd /lilo && tar xvf -)
- cp /vmlinuz /lilo

You can activate this moved configuration like this

> `

>             /sbin/lilo -r /lilo

> `

And you can do this with Linuxconf by telling it the `/etc/lilo.conf` is now `/lilo/etc/lilo.conf`. From now on, using Linuxconf, this should be completely invisible to you or whoever manages your machine.

Next Previous Contents