< Day Day Up > |
12.17.1 ProblemYou want to use LILO and need to know how to configure it to boot a Linux system. 12.17.2 SolutionUse liloconfig to generate a basic lilo.conf, then edit lilo.conf to add comments, titles, and any additional options you want. Make sure you have the latest version of LILO, and as always, have a current backup of your data and bootable rescue disks at hand: # /sbin/lilo -V LILO version 22.4.1 After installing/upgrading, run liloconfig: # liloconfig It asks many questions, and gives many instructions. In this example, the root filesystem is on /dev/hda3. Say yes to these four questions: Install a partition boot record to boot Linux from /dev/hda3? Use LBA32 for addressing big disks using new BIOS features? Install a master boot record on /dev/hda? Make /dev/hda3 the active partition? Run lilo to write the changes to the MBR: # /sbin/lilo -v Reboot to test it. When the system comes back up, you'll probably want to edit /etc/lilo.conf, because liloconfig does a rather barebones job on the boot stanzas. Here is a sample lilo.conf, first generated by liloconfig, then edited: # Specifies the boot device boot=/dev/hda3 # Location of the map file. This is a binary # file generated by lilo, don't touch it map=/boot/map # Video resolution for the boot screen vga=normal # the LILO boot screen message = /boot/boot_message.txt # Show the LILO prompt for ten seconds # before booting the default prompt timeout=100 # Access large disks beyond cylinder 1024 lba32 # Boot menu # # default boot entry default="Libranet-hd3" # Stable 2.4 kernel image=/boot/vmlinuz-2.4.21 label="Libranet-hd3" root=/dev/hda3 read-only # Test 2.6 kernel image=/boot/bzImage-2.6.3 label="2.6-test-hd3" root=/dev/hda3 read-only There is a limit of 16 different images that can be configured in lilo.conf. 12.17.3 DiscussionThis is what the original liloconfig-generated boot stanzas looked like: # These images were automagically added. You may need to edit something. image=/boot/vmlinuz label="DEB 0" read-only image=/boot/vmlinuz-2.4.21 label="DEB 1" read-only image=/boot/bzImage-2.6.3 label="DEB 2" read-only liloconfig is good for setting up your first lilo.conf; after that, it is easier and better to edit it manually. Let's take a look at the four liloconfig questions you answered yes to:
Any time you make changes to /etc/lilo.conf, you must re-run LILO to write the changes to the MBR: # /sbin/lilo -v The -v flag turns on verbosity, with levels ranging from 1 to 5: # /sbin/lilo -v5 Another useful flag is -t, for test. Use this with -v to see what will happen before actually writing the changes to disk: # /sbin/lilo -t -v2 12.17.4 See Also
|
< Day Day Up > |