From LQWiki
Dual booting means that there are two or more operating systems installed on the same computer and that the user is given the choice by the bootloader at boot time to choose the OS to use. Usually the choice for the other OS besides Linux is a version of Windows.
- If you are a newbie (migrating to Linux) and starting with a brand new hard drive insuring MS Windows products are installed first, then the GNU/Linux distribution will be easier as the GNU boot loader will recognize the other OS and set up your boot loader automatically. *
In these instructions we will assume that Windows is installed on hard disk hda and that Linux is installed on a separate hard disk, hdb. It is also possible to install different OSs on the same hard disk, but on different partitions. We will also use Lilo as the bootloader, as does Slackware-the original GNU/Linux distro. Today many GNU/Linux distros use GRUB as the default bootloader, instead of LILO
Contents |
With Windows NT / 2000 / XP / Vista
The bootloader of Windows NT (ntloader) expects to be the one in charge. Windows 2000 and XP use the same bootloader, so they behave in the same way. The normal way of dual booting NT with Linux is to add Linux as an option in the NT boot menu. In this way the NT bootloader will allow it to load the Linux bootloader. Vista works a bit differently but is basically the same MS philosophy.
The first thing you must check is that LILO is configured so that it will write the Linux boot sector to the beginning of the Linux partition, hdb1. If the Linux boot sector is written on the Windows NT partition, ntloader will not load and thus you cannot dualboot. You will also have extra trouble recovering the overwritten NT MBR. In /etc/lilo.conf check that the boot entry is
boot=/dev/hdb1
Next run lilo to install the boot sector. Reboot to Linux. You need a boot floppy, because ntloader has not been configured to boot Linux. Under Linux, use the dd command to copy the Linux boot sector to a file.
$ dd if=/dev/hdb1 of=/bootsect.lnx bs=512 count=1
Copy the bootsect.lnx file to the root of the Windows boot partition. Either mount the NT volume under Linux or use a floppy disk. Then boot to Windows NT.
There should be an invisible file called boot.ini on the root of C:. First modify the attributes of the boot.ini -file from the command line, so that write-protection is removed:
C:> attrib -s -r c:\boot.ini
Then add the following syntax to the end of the boot.ini file
C:\bootsect.lnx="Linux"
Third, restore the original attributes of the boot.ini file:
C:> attrib +s +r c:\boot.ini
You should be finished now. Reboot to check that everyting works ok. Every time you modify the lilo.conf -file, you have to run lilo and copy the bootsect.lnx file to the Windows partition.
With Windows 95 / 98 / Me
Windows 95 and 98 may be booted from Lilo. You should install Lilo in the MBR of hda and add Windows as a boot option in the Lilo menu.
With MacOS
The bootloader for Mac OSX is yaboot. It has support for dual booting.
Tricks if things don't work
You don't need the installer if you have a Live CD which can boot you into a desktop/kernel command prompt.
The standard method to get to into a distress Linux is by "change root" whereby you "jump" from the Live CD Linux into another Linux installed in a hard disk.
After you boot to a Live CD, click terminal, do a su and supply the root password if demanded, make a tempoary dirctory in /mnt, mount it, chroot and enjoy the access to the distressed Linux. Assuming your Linux / is in hda2. You type
mkdir /mnt/hda2 mount /dev/hda2 /mnt/hda2 chroot /mnt/hda2
At this point onward you are inside the Linux installed in hda2 and can do whatever you like with it. With a bit of luck you can even access to the desktop by just typing
startx
Here's how I found out by trial and error. Assuming you have Windows and a Linux distro installed on the the same drive or two drives as I have. Check this link for getting boot loader back onto the first sector. http://geocities.com/epark/linux/grub-w2k-HOWTO.html When you have that set up,
- Boot Windows
- Obtain bootpart.exe (http://www.winimage.com/bootpart.htm) You need a zip utility for this.
- Extract to C:\
- Open a command prompt, type bootpart
- Note the number that corresponds to Linux (usally 1 or 2)
- At the command promt, type:
bootpart 2 bootsect.lnx YourDistro (mine's Fedora)
(Replace the "2" with the appropriate partition number noted in step 5 - Reboot, your finished. Boot options will display at the next boot.
No changes are made to the Windows MBR.
Link http://www.mepis.org/docs/en/index.php/Boot_Mepis_from_Windows_MBR
Another thing I found out about Vista. I had WindowsXP obn the first sector of my first hard drive and Fedora on a second drive. After installing Vista, on re-boot there was XP and Fedora, Vista found them and now I can boot into Fedora or XP from Vista, neat eh?
See also
- Bootloaders, of which most common for Linux are LILO and GRUB.
- Booting
- Booting From USB
- MBR, Master Boot Record
- lilo.conf
- Software Suspend, to suspend Linux while you boot your other OS.
- partitioning guidelines
- Sharing your desktop files between GNOME and Windows XP
External links
- HOWTO-Booting with Yaboot on PowerPC (penguinppc.org)
- http://www.hk8.org/old_web/linux/lnut/ch04_04.htm
- HOWTO Dual-boot Linux from Windows NT/2000/XP, the clever way (www.highlandsun.com)
- Illustrated Dual Boot Site : Large site all about dual booting, Ubuntu centric examples but most applies to other Linux distributions. GRUB section has good explanation of dual booting multiple Linux distributions.

This page is available under a