uterti-com

Just another WordPress site

Dual boot Windows and Linux: single and multiple hard drives

Dual boot Windows and Linux: single and multiple hard drives

The Internet is full of technical articles, many of which are too complicated for the average computer user who just wants to solve a simple problem. If you pay close attention, the Internet is also a place where “gurus” spend a lot of time crying out for help on forums and discussion boards. So don’t feel bad, no one has all the answers.

So you want to dual boot Windows and Linux on the same computer; it’s really quite easy. I only have enough space here to tell you the most common way to do this on a single hard drive or using multiple hard drives. Obviously, there are many ways to get the job done, but there are some critical things to know. Let’s start with some critical information.

Windows and Linux: the same hard drive
The Windows operating system MUST occupy the Master Boot Record (MBR). Linux, on the other hand, doesn’t have to. In this scenario, you must first install Windows. After Windows has been successfully installed, you can install Linux. This is important! The Linux “bootloader” is called GRUB. When installing Linux, MAKE SURE YOU DO NOT INSTALL THE LINUX BOOTLOADER INTO THE MBR.

Configuring the Windows Boot Loader: A Two-Step Process
It’s also possible to use GRUB to dual-boot Windows and Linux on the same drive, but this is a bit more complex: the Windows bootloader will do the job. In the following commands, you will create a copy of the Linux boot sector and then save it to a file in the top-level directory under Windows (C:).

Step 1Linux
From the shell on your Linux installation (boot from your installation disks):
Run the following shell command, replacing /dev/hda3 with the location of your Linux boot partition.

shell# dd if=/dev/hda3 of=/bootsect.lnx bs=512 account=1

Copy the new file, bootsect.lnx, to a floppy disk and restart Windows.

Step 2: windows
Copy bootsect.lnx to C: in Windows. Then run the following command at the DOS prompt.

C:> attribute -H -R -S boot.ini

Edit boot.ini so that the first two lines are:

[boot loader]
wait time = 30

After the last line, add:

c:bootsect.lnx=”Start Linux”

That’s it, you’re done! Reboot your machine and you will see a menu that will allow you to select Windows or Linux. Congratulations.

Windows and Linux: two hard drives
This is also quite easy. In this case, it will boot from the Linux drive. We will add Windows to the Linux bootloader (ie GRUB). GRUB is my favorite boot loader.

Edit the /boot/grub/grub.conf file. One of the first lines should contain:

wait time = 30

After the last line add:

title Start Windows
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1.0)
Activate
chain loader +1

Reboot your machine to the Linux drive and you will see a menu allowing you to select between Linux or Windows. Good work!

This article is obviously short and does not include any explanation of how these commands work. There are variations to what I’ve shown here depending on your hardware setup, but I think these are the most common and should do the job just fine. I’d be happy to recommend additional resources if this doesn’t work for you.

Copyright 2005 Majella.us

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *