Human Readable   

 

     
   
     

Multibooting Tips

© Copyright Darrell Anderson.

One of the keys to configuring a multi-boot system is understanding how an operating system (OS) boots. The computer BIOS (Basic Input Output System) is designed to seek and to pass the booting operation to a disk master boot record (MBR). The disk MBR contains only a small chunk of data (512 bytes) that points to the first sector of the partition containing the OS the user wants to load. The first sector of that partition contains pointers to the OS boot loader program.

Some modest challenges arise when users decide they want to boot additional OSs from the same hard disk. There are some caveats to consider when configuring a multi-boot box:

  • The older DOS/Windows 3.11 OS will boot properly only at partition hda1.
  • All Windows OSs use their own boot loader.
  • Windows OSs always modify the disk MBR.
  • Windows 98 needs to be installed in the first 8 GB space of the hard drive. However, this can be bypassed with the help of a disk editor (Windows 95/98/ME and the 8-GB Boundary).
  • Without third party drivers, native FAT-32 and FAT-16 OSs cannot read or write to NTFS OSs.
  • The original NT4 OS cannot read or write to FAT-32 partitions, but this defect is easily remedied with a free third party FAT-32 driver.
  • Microsoft OSs use a weird precedence order to determine the drive letters and can be a challenge to make multiple Windows OS play together correctly.
  • GNU/Linux OSs are not particular about where they are located on the hard drive.

With these factoids, the preferred installation order for these OSs:

  1. DOS/Windows 3.x
  2. FAT-32 based OSs
  3. NTFS based OSs (NT4, W2K, XP)
  4. GNU/Linux based OSs
  5. The independent boot loader.

This preferred order does not mean required. Like many things with computers, evaluate each box as necessary. However, Windows OSs always modify the MBR and that is why one should consider installing these OSs in this order.

Each Windows OS must be installed separately. This is so the installation process will properly modify the partition boot sector to load the boot loader program. To avoid repeated frustration, every Windows OS must be allowed to modify the disk MBR to point to that first partition sector. Only after all the OSs are installed should users then configure the independent boot loader to modify disk MBR.

Many people need never consider these tidbits because they do not use a multi-boot system, or if they do, they seldom modify the original default installation location of Windows, which is the hda1 partition. Therefore, when these users install GNU/Linux OSs, they encounter no difficulties getting the OSs to boot properly. However, some people want to install Windows 95/98 and a Windows NT based OS as well as a GNU/Linux OS. Things then get interesting because one of the Windows OSs will not be located in the expected default partition of hda1.

Although some people use the native Windows boot loader to boot additional OSs (along with a program called loadlin) , a more appropriate solution is to use an independent boot loader utility. The Windows boot loader is not designed to function independently of non-Windows OSs and is preprogrammed with some undesirable default configurations. For users wanting to boot Windows and GNU/Linux distros, the popular boot loader programs are LILO and GRUB. GRUB is particularly flexible for people who want to explore and experiment with multi-booting systems.

Despite using these independent boot loaders, users cannot ignore or eliminate the Windows boot loaders. Much like the manner in which the BIOS passes booting operations to the MBR, which points to the OS boot loaders, users instead must configure their independent boot loaders to pass the booting operations to the Windows boot loader.

In the case of Windows 95/98, the boot loader is io.sys. For Windows NT/W2K/XP, the boot loader program is ntldr. The programs are located in the root directory of the Windows system (C:) partition. Additional files or programs are used to coordinate the boot process. For Windows 95/98, those files are config.sys and msdos.sys. For Windows NT/W2K/XP, those files are boot.ini. and ntdetect.com. Those files all are located in the root directory.

Additionally, if users do not install NT/W2K/XP at hda1, they must modify the Windows boot.ini file to boot correctly.

To provide a comparison, I am posting the basic partition scheme I have used on my multi-boot box for the past several years:

hda1: MS-DOS 6.22 /WFWG 3.11 (FAT-16)
hda2: NT4 C: (primary) system files (NTFS-4)
hda3: NT4 C: (alternate) minimal system files (NTFS-4)
hda4: extended primary partition
hda5: WIN98 C: minimal system files (FAT-32)
hda6: NT4 D: applications and program files (NTFS-4)
hda7: NT4 E: data files (NTFS-4)
hda8: NT4 K: temp files (NTFS-4)
hda9: NT4 L: temporary backup files (NTFS-4)
hda10: shared FAT-32 data files partition (FAT-32)
hda11: Knoppix 3.4 (ext3)
hda12: Linux swap
hda13-hda26: various ext3 partitions supporting Mandrake 9.2 and Slackware 10.x

For NT/W2K/XP users, understanding the boot.ini file is important. For comparison’s sake, I am posting my boot.ini file from my primary NT4 boot partition. Please notice that my primary NT4 C: partition is not located at hda1 but hda2.

[boot loader]
timeout=2
default=multi(0)disk(0)rdisk(0)partition(2)\WINNT

[operating systems]
multi(0)disk(0)rdisk(0)partition(2)\WINNT=“Windows NT 4.0 (Primary)” /sos
multi(0)disk(0)rdisk(0)partition(2)\WINNT=“VGA/Safe-Windows NT 4.0 (Primary)” /basevideo /sos

For many people who never modify the default installation location for Windows, they will notice that my boot.ini file is different from the one on their box. Notice that in the [operating systems] section, that the partition is modified to number 2.

I also have an alternate (second) NT4 C: partition that I use as a back door into my primary NT C: partition. As an additional comparison, the boot.ini file for that partition looks like this:

[boot loader]
timeout=2
default=multi(0)disk(0)rdisk(0)partition(3)\WINNT

[operating systems]
multi(0)disk(0)rdisk(0)partition(3)\WINNT=“Windows NT 4.0 (Alternate)” /sos
multi(0)disk(0)rdisk(0)partition(3)\WINNT=“VGA/Safe-Windows NT 4.0 (Alternate)” /basevideo /sos

Notice again that the partition number is different. Another caveat arises here. In the boot.ini file, partition numbering begins with numeral one, but disk numbering begins with numeral zero. Please don’t ask me about the roots of this inconsistency. However, understanding this distinction is important if users want to install NT/W2K/XP to a second hard drive (hdb) rather than the first hard drive (hda).

Consider one last caveat. Notice in my setup that my MS-DOS partition resides at hda1 and my Windows 98 partition resides at hda5. Because of the weird way in which drive letters are assigned in Windows OSs, during a normal boot operation to Windows 98, C: will be assigned to the MS-DOS partition, D: assigned to the Windows 98 partition, and E: assigned to the shared FAT-32 partition. Of course, I want C: assigned to the Windows 98 partition. The solution is to use the GRUB hide parameter. When I boot the Windows 98 partition, the hide parameter means the Windows 98 OS does not “see” the MS-DOS partition and then Windows 98 correctly assigns C: to itself. Of course, because the master partition table is modified and the hiding feature is persistent between boots, that means that I must use the unhide parameter when booting any other OS if I want that MS-DOS partition viewable. This is an important consideration when users want multiple Windows OSs to play nicely together. Here is a sample from my GRUB menu.lst file to illustrate the point:

timeout 3
color light-gray/blue black/light-gray
default 0


title NT4-Primary
unhide (hd0,0)
root (hd0,1)
chainloader +1


title NT4-Alternate
unhide (hd0,0)
root (hd0,2)
chainloader +1


title Slackware 10.1 - 2.4.28-11 - KDE 3.3.2
unhide (hd0,0)
kernel (hd0,12)/vmlinuz-ide-2.4.28-11 root=/dev/hda23 ro hdc=ide-scsi vga=3 ide2=noprobe quiet


title Slackware 10.1 - 2.4.28-11 - Init 3
unhide (hd0,0)
kernel (hd0,12)/vmlinuz-ide-2.4.28-11 root=/dev/hda23 ro init 3 hdc=ide-scsi vga=3 ide2=noprobe quiet


title Win98-FAT32
hide (hd0,0)
root (hd0,4)
chainloader +1


title DOS 6.22 / Windows 3.11
unhide (hd0,0)
root (hd0,0)
chainloader +1


title Floppy
unhide (hd0,0)
root (fd0)
chainloader +1


More information about GRUB is available here or online.

Finis.

Table of Contents