Advertisment

Many OSs. One PC

author-image
PCQ Bureau
New Update

If you are the adventerous kinds you’d surely like to have at least two OSs running on your machine. Or maybe your kind of work demands that you have more than one on your machine. Multi-booting is your answer.

Advertisment

Before delving into the actual procedure, let’s look at how an OS works. When a computer is booted up, the BIOS does a POST and then looks for something called a bootstrap loader (or simply a boot loader), located in the boot sector of a hard drive. The information about where the OS is located is stored in the boot sector. There is an MBR (Master Boot Record) for the hard disk and a boot sector for individual partitions. The boot loader in turn loads the OS into memory. Each OS has its own boot loader for this purpose. A boot loader can be customized to pass on the control of the system to a particular OS image on the hard disk. This is what we will exploit in multi-booting

OSs.

We will look at a simple and common scenario, that of dual booting Linux and Windows 2000. The Linux boot loader is called LILO and the Windows’ one is called NT Boot loader. We shall look at using both to load up either OS. But first you must decide how much hard-disk space you will allocate to each OS and use fdisk to partition your drive accordingly. The best idea would be to have three partitions, one each for the OSs and your data. Do not format any of the partitions just now, and keep a Windows 2000 bootable CD handy.

Using LILO



Install Windows 2000 on the first partition, such that the installation is allowed to format just its own partition. Check your installation by rebooting into it. Start the Linux installation now on the second partition. Note down the partition entry location where Linux shows Windows is installed (say, /hda1). When it comes to installing LILO, let it install on the default choice (MBR). This will overwrite the NT Boot Loader. Now, when you reboot your machine, you’ll see LILO invoked with only one option, that of booting into Linux. But don’t worry! Your Windows still exists. Let’s bring it up now. Within Linux, edit your /etc/lilo.conf file using any editor (you’d better get familiar with basic functions and commands within Linux!). Add the following to the end of lilo.conf file:

Advertisment

other = /dev/hdaY # your Windows 2000 partition



table = /dev/hda 


label = Windows 2000

Reboot and LILO will give you the option of booting into either OS.

Using NT Boot Loader



Install Windows 2000 as in the previous case. Start the Linux installation and install it with a /root to the second partition. You will have to be familiar with hard-disk partition nomenclature in Linux to identify the second raw partition and not accidentally overwrite your Windows install (the first partition on your first hard drive is hda1, second is hda2, and so on). When the Linux installation comes to installing LILO, choose it to be installed to the first sector of your boot partition and not the MBR. Also choose to make the boot floppy disk to boot into Linux.

Advertisment

Boot into Linux using the floppy and copy the boot image from the boot sector using the following command.

dd if=/dev/hdax of=/bootsec.lnx bs=512 count=1

Here /dev/hdax is the location of /boot and bootsec.lnx is the boot image. Reboot into Windows and copy this image file from the floppy into your root directory C:\. Edit your Windows 2000 ‘boot.ini’ file and add the following line to it:

Advertisment

C:\bootsec.lnx=”Linux”

Reboot your system. The NT Boot Loader will now give you the option of booting into your Linux install, too, in addition to Windows 2000.

You can follow a similar procedure with Windows 9x and XP. In fact, LILO is a powerful boot loader and can even be used to load into other alternate OSs

like QNX.

Advertisment