Date: Sat, 08 Nov 1997 00:20:33 -0600 From: Tom Schenk <tschenk@dejanews.com> To: faq@freebsd.org Subject: Answer to FAQ question 8.8 Message-ID: <346404B0.7E96F3B5@dejanews.com>
next in thread | raw e-mail | index | archive | help
8.8 How do I boot FreeBSD and Linux from LILO? It is quite easy to boot FreeBSD from LILO. Here is an example lilo.conf file for my system that currently runs Windows 95, Linux, and FreeBSD. The root partitions for Linux and FreeBSD both reside on my IDE disk which is partitioned as follows: Partition Type OS Linux Device Name FreeBSD Device Name --------------------------------------------------------------------------- 1 VFAT Win 95 /dev/hda1 /dev/wd0s1 * 2 EXT2 Linux /dev/hda2 /dev/wd0s2 3. FFS FreeBSD /dev/hda3 /dev/wd0s3 4 EXT2 Linux /dev/hda4 /dev/wd0s4 Partition 2 (marked with the asterisk) is set active and LILO is installed there instead of the Master Boot Record. The lilo.conf file below presents me with a menu (contained in the lilo.msg file also below). I simply press the appropriate number and press return. If I do nothing, the first OS in the lilo.conf file is the default (in this case Linux 2.0.31). Anyhow, here is the lilo.conf file: -----------------------------Start of lilo.conf--------------------------- # LILO configuration file # generated by 'liloconfig' # # Start LILO global section boot = /dev/hda2 # install on Linux root partition map=/boot/map install=/boot/boot.b message = /etc/lilo.msg # Display this file before the boot prompt prompt # wait for a keypress or until the timeout timeout = 300 # listed here expires (300 = 30 seconds) verbose = 3 vga = normal # force sane state ramdisk = 0 # paranoia setting # End LILO global section # Linux bootable partition config begins image = /boot/vmlinuz-2.0.31 root = /dev/hda2 label = 2 read-only # mounted read-only for checking # Linux bootable partition config ends # DOS bootable partition config begins other = /dev/hda1 label = 1 table = /dev/hda # DOS bootable partition config ends # FreeBSD bootable partition config begins other = /dev/hda3 label = 3 table = /dev/hda # FreeBSD bootable partition config ends ---------------------------------End of lilo.conf------------------------ And Here is the lilo.msg file that is referenced in the global config section above that presents my little menu. The first character in the file is a Ctrl-L, which clears the screen. --------------------------------Start of lilo.msg------------------------ ^L LILO Operating System Boot Loader 1 - Windows 95 2 - Linux (2.0.31) 3 - FreeBSD (2.2.1) Defaults to Linux (2.0.31) in 30 seconds. ---------------------------------End of lilo.msg------------------------- The only other thing I had to do was to not install the boot loader during my FreeBSD installation. Once I had FreeBSD installed, I used fdisk to change the active partition from /dev/wd0s3 back to /dev/wd0s2. Tom Schenk -- *-----------------------+-----------------------------------+----------------* | Tom Schenk | Linux - For IQs Higher Than 95! | These opinions | | Systems Administrator +-----------------------------------+ are MINE!! Go | | tschenk@theoffice.net | FreeBSD - Live Free Or Die! | get your own! | *-----------------------+-----------------------------------+----------------*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?346404B0.7E96F3B5>