Your access to this website and/or its content is subject to certain terms and conditions. If you do not wish to agree with the terms and conditions, then you should leave this website immediately.
| Home | Privacy | Legal | Contact | Store | Humour |
When IBM was putting together their Personal Computer (PC), they required an operating system (OS) to go with it. Gary Kildall, who wrote the then popular OS known CP/M (Control Program for Microprocessors) for early Intel Microprocessors, could not be interested to provide a new one for the IBM PC, which was based on the latest Intel processor. So, IBM gave the contract for the new OS to what was then a little-known company Microsoft. Microsoft bought QDOS (Quick and Dirty Operating System) written by one Tim Patterson based on a manual of CP/M (and yet Microsoft today threatens Linux vendors with IP theft! Hmmm…)
The first IBM PC was released with QDOS rechristened as DOS (Disk Operating System) from Microsoft. As IBM PC compatibles began to be manufactured by companies like Compaq, Microsoft was no longer dependent on IBM. Soon, it overtook IBM as the leading provider of software for PCs.
When a user started an IBM PC or PC-compatible running on MS-DOS, it usually settled on the command prompt. (If you want to see how this looked like, then type cmd or command in the Run dialog box of the Start menu of a Windows PC.) The command prompt was the OS of those PCs! To perform ordinary operations like copying a file or deleting one, the user had to type complicated commands (without any syntax errors, of course) on the command prompt. Users also had to remember a number of keyboard shortcuts. The keyboard shortcuts were actually keyboard commands, as they were quite indispensible and not really alternatives.
Over time, Microsoft released new versions of DOS but the biggest improvement came when they released Windows. This was a poor imitation of the Apple Macintosh's Graphical User Interface (GUI) but it still managed to become very popular. It had a mouse, which enabled a point-and-click interface come to life, and was more easy to use when compared to DOS. Windows versions from 1 to 3.1 were not real OSs. They worked as just another program that ran on DOS. Each one of them was in effect an "operating environment." So, in 1995, Microsoft released Windows 95, an OS that was fully GUI-based. Microsoft then went on to release newer Windows OSs, such as Windows 98, Windows Me, Windows 2000 and Windows XP.
As Microsoft was dominating the OS market, a sly newcomer called Linux (or GNU/Linux to be correct) came to sudden prominence. Finnish programmer Linus Torvalds created a Unix-like Kernel for x86 (Intel) computers, combined it with the software created by the GNU community and released it for free as Linux. It later came to be known as GNU/Linux. Until then, most UNIX implementations such as BSD Unix, SCO Unix, HP Ux, IBM Aix and Solaris OS, were limited to huge multi-user architecture systems such as mainframes. There were notable attempts such as BeOS to break into the Intel PC market but it was Linux that captured the imagination and interest of geeks and novices, and is giving serious competition to Microsoft Windows.
Today, there are several GNU/Linux-based operating systems, popularly referred as distributions or distros, available for both desktop and enterprise users.
- Debian (originally used to have only free non-proprietary software but now has software with dubious status such as Mono)
- Red Hat (commercial - for enterprises)
- Fedora (free desktop OS supported by Red Hat)
- CentOS (free re-branded copy of Red Hat - for enterprises)
- Mandriva Free (contains only free non-proprietary software)
- Mandrake One (contains free proprietary and non-proprietary software)
- Mandriva Power Pack (commercial - for the desktop)
- PCLinuxOS (free English-only Mandriva derivative)
- Novell (commercial, formerly Suse Linux)
- OpenSUSE (free desktop OS - supported by Novell)
- Ubuntu (free, Debian derivative, promoted by South African millionaire Mark Shuttleworth)
- KUbuntu (KDE version of the Gnome-oriented Ubunutu)
- GeekBox (a live CD. Boot a PC from the CD and it turns your PC into a temporary home theater PC (HTPC) without any installing any software. Remove the Live CD after it has loaded on to the system RAM and insert your CD/VCD, DVD to play. It also supports IR remote controls is you IR receiver on the PC.)
- Knoppix (a live CD used for demonstration).
- DSL (Damn Small Linux) (free, can be booted from a USB flash drive, runs off the system RAM, no need for installing on a hard disk, useful for troubleshooting, checking email, using OpenOffice documents, etc.)
Although many of these distros are available as commercial shrink-wrapped software, they can also be freely downloaded and installed any number of PCs. Their source code is also available for free for modification (on the agreement that the modified code will also be available free).
So, a lot of people feel they would like to install Linux and tinker with it. Few of them would however be ready to give up their existing Windows installations. Realising this, the distros come with smart bootloader programs which help multiple OSs to coexist on a single PC. However, many people are mortified when they see a Linux bootloader starting up instead of the familiar NTLDR. And, if they delete the linux partition, the PC becomes unbootable. Apart from that, Linux installation remains intimidating for the uninitiated. Terms such as partitions, ‡ bootloaders and MBR are enough to spook newbies to the point that many of them do not even complete the installation.
In this writeup, you will learn to safely and easily dual-boot or multi-boot multiple operating systems. Specifically, you will learn about booting Linux from the Windows (XP/2000) boot menu. You will also find explanations for a lot of difficult installation and Linux related terminology in real-world terms.
Most Windows users have the following idea about disk drives.
Sometimes, when there is an extra hard disk drive, then that drive becomes D: and the CD/DVD drive E:. What they do not always know is that the C: and D: are actually only a single disk drive and are technically known as partitions. This is why many people blink when a Linux installation asks them to choose a "partition" to install the OS.
A hard disc can have a maximum of only four partitions. In the early days of the IBM PCs, this number was thought to be more than sufficient. However, over time, the need for more partitions arose. So, the concept of primary partitions, extended partitions, and logical partitions was introduced. The old-style partitions were then known as primary partitions and one of these primary partitions could be what is known as an extended partition. The extended partition had a very important improvement over ordinary primary partitions. It could house any number of smaller partitions known as logical partitions. Thus, the four-partition-only limit was kept while the need for additional partitions was also met. Most people, when they get a new hard disk, create just one primary partition and one extended partition. Whenever a new partition is needed, a new logical partition is created inside the extended partition.
Somewhat unrelated to the number scheme above but relevant to booting OSs are active partitions and boot partitions. An active partition is a designated partition that has the files for loading the default OS or the bootloader (the program file that displays the boot menu and loads the required OS). Only one partition on a disk can be an active partition. A boot partition is the partition where the OS is installed. Windows 95/98/Me is adamant about having the first partition on the hard disk as the boot partition. Windows 2000 and Windows XP operating systems (OSs) can be installed on just any partition on the hard disc. The installation procedure actually allows the user to choose the partition on the disk. Similarly, Linux distributions can be installed on any partition.
When you install an OS on a partition, it will first format the partition. Formatting essentially creates a file system on the partition that the OS can use. Different OSs use different file systems. DOS/Windows 3.1 used the FAT-16 (File Allocation Table 16 bit) system. Windows 95/98/Me used FAT-32. Windows NT/2000/XP use the NTFS (New Technology File System). Linux distros use the ext2 and ext3 file systems. Apart from OS installation programs, there are third-party utilities like Ranish Partition Manager and Partition Magic, which will create, format, resize, and delete partitions on your hard disc.
Now that you know all about partitions, you can move on to the topic of boot loaders. Bootloader programs come into action right after the BIOS (a program hardwired in to the motherboard) performs the POST. Bootloader programs are necessary to load an OS into execution or to display a boot menu where the user can make a choice from the available operating systems installed on the PC. Loading an OS involves two important sectors* of the disk - master boot record (MBR) and the boot sector of the OS. The MBR contains a partition table and some executable code called master boot code (MBC). The partition table contains geometry information about the disk so that all the partitions on it can be identified. The MBC is written by OS installation procedures or a bootloader programs so that they will load the OS or the bootloader program respectively. The MBR is always on the first sector of a disk. The partition table on the MBR is written the first time a partition is created on a hard disk and is independent of the OS(s) installed on the computer. The boot sector is on the first sector of every partition on a disk. On an active partition, the boot sector contains code that will load the default OS or the bootloader program. On other partitions, the boot sector may or may not have executable code. On boot partitions, however, the boot sector has executable code necessary to load the operating system. When you partition a disc, the partitioning utility or the OS installation procedure will allow you designate one of the partitions as an active partition. Without an active partition, you will not be able to boot into an OS from the hard disc.
The sequence of loading an OS is as follows:
When you install Windows 2000/XP on a machine that already has Windows 95/98/Me, you have the option of upgrading (overwriting the Windows 9x/Me installation with Windows 2000/XP) or having a dual-boot or multi-boot setup. If you choose the latter, the new OS is installed on a different partition. The installation procedure installs a boot loader program in the boot sector of the active partition. It also modifies the MBC so that the latter can load the bootloader program that was installed on the Windows boot partition. The bootloader program displays a boot menu, which lists the available Windows OSs and lets the user to choose an OS from the menu.
The Windows 2000/XP installation procedure makes a copy of the original boot sector that was created by the Windows 9x/Me installation and places it in a hidden file named bootsect.dos. Next, it overwrites the boot sector with its own boot loader program NTLDR (NT Loader). So, every time you start the computer, NTLDR is loaded by the MBC. The NTLDR displays a boot menu that offers booting to Windows 9x/Me or Windows 2000/XP. If you choose the Windows 9x/Me option, then the old boot sector information from the bootsect.dos file is emulated by NTLDR and the computer boots into Windows 9x/Me.

During the installation procedure, a file called boot.ini is created, which contains the choices displayed in the NTLDR boot menu. A typical boot.ini file on a PC that has Windows Me on the active partition (C:) and Windows XP on the second partition (D:) looks like this:
[Boot Loader] Timeout=30 Default=C:\ [Operating Systems] C:\="Microsoft Windows Me" multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows XP" /fastdetect
In the Boot Loader section, the Timeout parameter represents the number of seconds the boot menu will be displayed. If no option is chosen, the operating system specified by the Default parameter is loaded. In the Operating Systems section, NT-based OS installations are identified by Advanced RISC Computing (ARC)-style pathnames.
| Advanced RISC Computing (ARC) Pathname Parameters | |||
| NUMBER | STARTS FROM | REFERS TO | DESCRIPTION |
|---|---|---|---|
| multi | 0 | Number of the disk controller identified by INT 13 (a CPU instruction used by BIOS) | Because most BIOSes can identify only one adapter with INT 13, this number is always 0. |
| disk | 0 | SCSI ID of the disk | This is valid only on SCSI controllers. For IDE discs, this number is always 0. |
| rdisk | 0 | Number of the disk on the controller | On IDE controllers, the maximum number of disks possible is 4. So, this number ranges from 0 to 3. |
| partition | 1 | Number of the boot partition on the disk | The boot partition is where the OS is stored. This is different from the active partition. In the above example, the active partition is C: but the boot partition for the Windows XP installation is the second partition or D:. |
You have learned how Windows OSs coexist. The real headache comes when you try to install a non-Windows OS like Linux. NTLDR recognises only Windows partitions (FAT, FAT-32 and NTFS) and is blind to Linux partitions. In other words, NTLDR cannot load Linux. Thankfully, Linux distros come with bootloader programs, such as GRUB (Grand Unified Bootloader) or LILO (Linux Loader), which recognise both Linux and Windows partitions. This means that they can load both Linux and Windows. When you install Linux, the installation procedure replaces the MBC (on the MBR) created for Windows NTLDR with an MBC that is set to load LILO or GRUB. (This means that, after the Linux installation, the user will see LILO or GRUB first instead of Windows or Windows NTLDR everytime the PC is started. This is a scary scenario for new Linux users. If they remove Linux somehow, they are uanble to boot into Windows.) When the Linux installation procedure installs LILO, it automatically creates an option for Windows in its boot menu. This allows the user choose to load Windows at the LILO/GRUB boot menu. When the user chooses the Windows option, LILO loads NTLDR and exits. NTLDR then displays its boot menu and allows the user to load a Windows OS.
Now, you should learn about the Linux installation procedure in more detail. The Linux installation procedure uses some special terms to identify hard disc partitions. The MBR is called /dev/hda. Your first partition is treated as /dev/hda1; the second one will be /dev/hda2, and it goes on like that. On a second hard disk on your PC, the partitions will be known as /dev/hdb1, /dev/hdb2,... On a third hard disk, we will have /dev/hdc1, /dev/hdc2... Every Linux installation requires two or three new partitions, which are identified as:

Here, I've got to make a small clarification. The Linux installation procedure will ask you for a location to install the bootloader (LILO or GRUB)? No mater which option you choose, the bootloader files are going to be stored on / or /boot. (None of the locations listed by the procedure is big enough to hold all the files of the bootloader program.)
UPDATE (2 July 2008): On a laptop, you do not have a floppy drive. Of late, Linux installers do not give informative options, such as the one above, limited though they are. Instead, its lists all possible locations where the bootloader can be installed.

In the above screenshot, the first location (/dev/sda) is the MBR of my hard disk. The second location (/dev/sdb) was the MBR of the temporary RAM drive where the Mandriva 2008 Live CD system was running. (Live CDs create a temporary drive in the system memory (RAM) and temporarily run from there.) The third location (/dev/sda10) is where I installed / (root). The fourth location (dev/sda11) is where I installed /boot (boot partition). So, I asked the bootloader to install on the fourth device.
You have learned how the default Linux installation handles multibooting. Basically, you have LILO loading NTLDR to boot into Windows. However, this involves overwriting the MBR i.e., the MBC (created for Windows NTLDR) being overwritten by an MBC (created for Linux LILO). If you are a Linux newbie, you might feel very apprehensive about this. What if you don't like Linux and want to get rid of it? LILO will be gone and there would be no way to boot into Windows! (Well, you could simply restart the PC with a DOS emergency disk and use the fdisk /mbr DOS command to restore the old Windows MBR.)
Now, if there was a way to get NTLDR into loading Linux, wouldn't you like that? Actually, a way exists. Interestingly, this idea was proposed by Microsoft. What you need to do is create a Linux boot sector file and place it in a Windows drive where NTLDR can access it. Next, you add a new entry in the boot.ini file so that NTLDR can use the bootsector file to transfer control to the Linux bootloader. (This is similar to the behind-the-scenes bootsect.dos-file technique that NTLDR uses to load Windows 95/98/Me.) This way, your Windows installations remains available all the time. Here are the steps:
dd if=/dev/hdc11 bs=512 count=1 of=/dev/hdc1/mlnxboot.dos
cd c:\
attrib -r -h -s boot.ini
C:\mlnxboot.dos="Mandrake Linux 10.1"Now, my boot.ini file looks like this.
[Boot Loader] Timeout=30 Default=C:\ [Operating Systems] C:\="Microsoft Windows Me" multi(0)disk(0)rdisk(0)partition(2)\WINNT="Microsoft Windows XP" C:\mlnxboot.dos="Mandrake Linux 10.1"
attrib +r +h +s boot.ini
With this setup, dumping Linux and going back to a monogamous relationship with Microsoft involves very little heartburn. Just delete the Linux partitions and remove the C:\mlnxboot.dos="Mandrake Linux 10.1" line from the boot.ini file.
Update - 15 June 2008: Recently, I bought an Acer Aspire 4520 laptop. I had been planning on installing Mandriva 2008 One on the laptop but a visitor pre-empted me with this message:
can u suggest me how to implement multiboot scheme on laptop where there is no floppy drive on to which i can install the bootloader.
Here is my reply to the visitor:
Yesterday, I installed Mandriva on my laptop. Without asking my permission, it went ahead and installed the bootloader program Grub on the MBR. After the installation, the laptop would boot first from from GRUB, rather than NTLDR. So, I booted the laptop with a Windows XP CD. It gave me an option of installing Windows XP or go into Recovery Console to repair an existing installation. I chose the latter. After entering my Administrator password, I used the command FIXMBR to restore NTLDR back on to the MBR. Next, I downloaded a freeware console program called Bootpart. I extracted the contents of the download file to a folder, I opened command prompt (Click Start menu, select Run option, type cmd (or command in Windows 2000) and press Enter key.) Using the CD command, I set the current folder to the folder where I had extracted the contents of the download file. Next, I gave the command bootpart. It listed all partitions, gave a number for each partition and listed the partition size for each. (It is easy to identify the Linux boot partition if you know where it appears in the order of partitions or if you know its approximate size.) Next, I typed the command bootpart my_inux_boot_partition_number mandriva.lnx, where I susbsituted my_linux_boot_partition_number with the number of my linux boot partition, as listed by the bootpart command I had given earlier. This created a bootsector file named mandriva.lnx. I copied this file to the same folder where my boot.ini file was kept. Next, I added a line for the bootsector file in the boot.ini file. I could then boot Mandriva linux directly from NTLDR.
So, what should you do? Let the Linux installer overwrite the MBR. Yes, let it. After the installation, when LILO or GRUB asks you, boot to Linux to create the bootsector file. Copy the file to the C: drive or your Windows drive. Restart and ask LILO to boot to Windows. Add the bootsector file to boot.ini file. Also, ensure that Windows is the default option if you need to work in Windows more than Linux. Restart again and go to Windows Recovery Console and restore NTLDR to MBR. This last paragraph summarizes the simplest and hassle-free way to dualboot between Windows and Linux.
---o0O0o---
This article was first published in November 2005 and last updated in July 2008.