How to Dual Boot Linux and Windows with LiLo
Well, if you’re here, it’s because you’re not sure how to get your new Linux box to cohabitate with Windows. Actually, it’s pretty simple, so read on and I’ll take you through the basics.
The first thing that you need to understand is how Linux looks at disk partitions. I assume that since you’ve gotten this far, you have a bit of an idea how partitions work so let’s run with it.
/dev/hda is the first hard disk (Primary IDE Master). The first partition on this disk is /dev/hda1 the second is /dev/hda2 and so on.
/dev/hdb is the second hard disk (Primary IDE Slave). This disk is partitioned the same as hda was, /dev/hdb1 /dev/hdb2 etc…
Your secondary master and slave are /dev/hdc and /dev/hdd, respectively. This is just for your information, as you probably won’t be booting from these devices. /dev/hdc will normally be your CDROM drive.
So lets assume (I like to do that) that we have a system with one hard disk, and Linux is installed on the first partition ( /dev/hda1 ) and Windows is installed on the second partition ( /dev/hda2 ). This is a rather simplistic way of doing it, you may have more than one linux partition, but we’re going to keep it simple.
Here is a sample /etc/lilo.conf that goes along with the assumption that we made in the previous line:
# Linux Partition
# Windows Partition
Once you have edited lilo.conf to suit you, you need to run ‘/sbin/lilo’ and it looks like this:
[root@panic krnl]# /sbin/lilo
Added linux *
The asterisk indicates that the Linux label is the default boot image and that after the timeout expires, your machine will automatically boot into Linux.
That’s about it! I hope you have found this helpful. If you have any other questions, I can be found on Undernet in #linux or #linuxhelp (not anymore, but there are people there who can help!).