mikeparks
05-01-2001, 09:39 PM
I had LILO booting from floppy on slackware 7.1. The kernel is 2.2.16, and I decided to upgrade to 2.4.4 Well, I didn't know how exactly to get LILO not to boot from floppy. So, I ended up messing up my boot disk, and I didn't know how else to get lilo to boot. Before when it prompts for boot, and if I press ctrl for a list of boot options, I only had mount. Well anyways, I reinstalled Slackware 7.1 all over again, and I still have LILO booting from disk. I really want to upgrade my kernel, and even if I don't, how can I get LILO to boot from /dev/hda1 instead of floppy?
Pull out the floppy. Boot the system. ;)
Ok, ok, it's a bit glib. But essentially you just want to boot up the system (I suppose from the floppy), and when youre up and running, create (or edit, depending if it's already there) a file called /etc/lilo.conf. The default slackware install should have created this file for you, but if not, it's no big deal.
Let's first verify that you actually have LILO installed on your system. So login or su into root and type:
linuxprompt# which lilo
....should give you /sbin/lilo.
If it's not, grab it from your slackware cd, under slakware/a8/lilo.tgz, do an 'installpkg' on it and you're set.
Now that we have LILO installed on our system, lets create that lilo.conf file. (as root):
## /etc/lilo.conf
## example only
## change for your system
## man lilo.conf
boot=/dev/hda # installs lilo on the MBR of your first HDD
prompt
timeout=100
vga=normal
image=/vmlinuz # point this to your kernel image. /vmlinuz should be fine for stock sw.
root=/dev/hda1 # or your '/' partition
label=linux
read-only
## eof
This is a rudimentary lilo.conf file, and will install LILO to the MBR of your first HDD, thus giving control over to LILO for the booting of your system. The 'stanza' for your 'linux' entry will load the /vmlinuz kernel image in 10 seconds (timeout=100). You can add other entries for different kernels you want to try out (good for testing a new kernel, you can keep the old one around in case the new one bombs) and of course for dual/triple/etc booting of FreeBSD, Windows, etc.
After the /etc/lilo.conf file has been created, run the lilo command (as root):
linuxprompt# /sbin/lilo -v
...you should see LILO install itself to your MBR and when you reboot you'll see a nice LILO prompt asking you how you'd like to boot the system. There are alot of other options, like adding a boot-menu, different vga modes, etc. Mix and match and see what works for you. Hope this helps. Enjoy!