Win2000 and Linux Dual Boot
To properly install Windows 2000 and Linux on the same
machine, we will need to go through several steps carefully.
We will assume that the machine has two separate harddrives,
one for Windows and one for Linux.
General Idea
On the first HDD, we will install Windows 2000.
On the second HDD, we will install Linux.
We will use Windows boot loader (NT boot loader) to
provide options to boot either into Windows or Linux.
The NT boot loader will point to the boot partition on
the second HDD where Linux will reside.
Please take extra attention to the steps highlighted by
***IMPORTANT***
- Windows 2000 Installation
- Change the BIOS setting on the motherboard to boot from CDROM first
- Insert the Windows2000 CDROM and then restart the machine
- Follow the procedure on the screen to install Windows
***IMPORTANT*** make sure you install
Windows on the first harddrive. If you haven't partitioned your
harddrive, it will be C: drive
- Linux RedHat Installation
- After Windows completes its installation,
insert the Linux RedHat CDROM and restart the machine
- When Linux installation screen shows up, proceed until
you meet a section where you have to choose which harddrives to install
your Linux on.
***IMPORTANT*** at this point, it's crucial not
to make any mistakes here. Otherwise, you will have to start over.
Choose the second harddrive of your machine for installation. The first
harddrive will be denoted as HDA and the second harddrive will be
denoted as HDB, if you are using IDE channel for the drives.
- Almost at the end of the installation procedure, before your system
starts copying the files to the harddrive, it will ask for options
regarding the Boot Loader
***IMPORTANT*** make sure you first choose
LILO as your boot loader and also, choose BOOT PARTITION on Linux
harddrive instead of the MBR (Master Boot Record) when installing the
Boot Loader. If by any chance, you install LILO on the MBR (Master Boot
Record), you will erase the Windows NT Boot loader, and as a result,
you won't be able to boot into Windows.
- At this point, when you install LILO (LInux LOader) on a boot
partition of the second harddrive, your windows will not know where
Linux is. Later on, we will configure Windows NT Boot Loader to tell
the machine where Linux is located for it to boot it correctly.
***IMPORTANT*** At the end of installation, make
sure you create a boot floppy so that you can boot into Linux. Linux
installation will ask you whether you want the boot floppy made. Don't
skip this section.
- Creating Linux Boot Image
- First boot into Linux through the boot floppy you have created
- If you have installed X Windows package, "startx" into the X
environment. You will be using either KDE or GNOME as X Windows at this
point.
- Open up a terminal and type the following command:
The output will look something like this:
/dev/hdb2 1.9G 184M 1.6G 10% /
/dev/hdb1 23M 4.0M 17M 19% /boot
/dev/hdb8 16G 1.6G 13G 11% /home
none 251M 0 250M 0% /dev/shm
/dev/hdb6 1.9G 56k 1.8G 1% /tmp
/dev/hdb7 14G 1.8G 11G 13% /usr
/dev/hdb5 1.4G 30M 1.3G 3% /var
Note that the "/boot" directory is identified by /dev/hdb1 file. If your
machine has "/boot" directory in some other partition, say "/dev/hdb3",
then we will use that file instead of "/dev/hdb1".
Now, we will copy the contents of /dev/hda1 in a raw format using "dd" command.
- Run this command to copy the boot partition into the floppy.
Notice that "if" field takes the system file that's responsible for the
boot partition. We are copying the raw data of the contents of
"/dev/hdb1" and copying it to the floppy with the file name "linux.bin":
dd if=/dev/hdb1 of=/mnt/floppy/linux.bin
bs=1024 count=1
- Lastly, check whether the file named "linux.bin" is created into the floppy.
- Modifying NT Boot Loader (Windows 2000)
- Restart the machine and boot into Windows
- Take the "linux.bin" file from the floppy and copy it into
the root of your Windows drive, which I assume, will be C:.
- Now, we need to edit the file responsible for loading Windows,
namely, BOOT.INI. This file usually resides in the same root
directory where you just copied your Linux boot image.
- By default, this file should be hidden. Go to the "folder options"
under "TOOLS" menu, and there are options to show hidden files and
system files. Enable this option to find your BOOT.INI file.
- After you find the file, open it with "NOTEPAD" to edit it.
At the end of the file, add the following line:
C:\linux.bin="Linux RedHat"
- If everything is done correctly, you should be able to see two
choices during when you boot
- Final Check
- Restart your machine, and you should be able to see two choices
appear on your screen at boot time.
- If you can't see those choices, you might have made a mistake
somewhere.
In the future, we will put more information on how to Trouble Shoot Linux and
Windows2000 Dual boot.