You can use Linux's dd utility or a similar utility to create a Linux boot sector file, then manually add the boot sector file to boot.ini. However, a simpler method is to use Gilles Vollant Software's BootPart 2.20, a utility that creates the boot sector file and automatically adds the entry to boot.ini. For more information about the BootPart utility, see the sidebar "BootPart Enhances NT's Boot Loader" and "Multibooting Resources."
You must create a new copy of bootsect.lnx every time you modify the boot sector of your Linux partition (e.g., when you install a new kernel with LILO). If you're implementing a multiboot NT and Linux system, I recommend that you read the Linux-related articles listed in "Multibooting Resources."
Third-Party Boot Managers to the Rescue
Although you can use NT's boot loader to create multiboot scenarios that involve several OSs and partitions, the boot loader isn't the most capable tool for managing multiboot environments. For maximum flexibility when you install and manage multiple OSs, consider using a third-party boot-management utility. These utilities not only allow for greater flexibility, but most of them also provide some or all of the following additional capabilities (for a list of third-party utilities, see "Multibooting Resources"):
- Use a customized MBR that is responsible for loading the enhanced boot manager that your dual-booting system runs in lieu of NTLDR at system boot. (Most third-party utilities let you restore the original MBR.)
- Automatically detect existing OS installations on multiple drives and partitions and build a menu with the option to boot each OS.
- Boot versions of MS-DOS and Win9x from primary partitions that are on a second drive.
- Select between Win98 and Win95 (or Windows 3.1) on the same system or the same partition.
- Maintain dual-boot NT and Win95 OSR2 or NT and Win98 systems with a FAT32- or NTFS-formatted primary partition of the first hard disk.
- Quickly and easily add new OS installations to the startup or boot menu, including multiple versions of NT, Win98, Win95, Linux, DOS, and BeOS.
- Hide selected partitions (e.g., additional primary partitions) from individual OS installations.
The ability to hide selected partitions lets you conceal primary partitions that inhabit the same drive as a primary partition that contains the OS you're booting. The presence of multiple primary partitions on one drive is especially problematic for MS-DOS and Win9x and can result in data loss and a failure to boot. In addition, hiding partitions lets you control how the system assigns drive letters and lets you maintain consistent drive-letter assignments in different OSs.
NT and Win9x Resource Sharing
You can set up an NT and Win9x multiboot configuration to share certain resources, such as application installation directories and files. The two OSs can't share the Registry entries an application creates within NT and Win9x because each OS has a private Registry that is inaccessible to the other OS. However, the OSs can share the directory in which the application resides. To ensure that an application creates the proper Registry entries and local support files for each OS, install the application twiceonce under each OS. The benefit of a shared directory is that you have only one instance of the application, so you conserve the disk space that an application installed in separate folders or partitions wastes.
To share a partition, the partition must be FAT16-formatted, because FAT16 is the only file system that NT and Win9x support for writing. Although this scenario usually works fine, a particular application might react negatively to such an installation, which can result in a nonoperative installation or a loss of application data. Thus, always back up an application and the OS partition, including the Registry, before you attempt this procedure. Also, Registry-based user options that you change under one OS won't be reflected in the other OS, so you need to manually synchronize changes under each OS.
Uninstalling applications creates a potential downside to this practice. You can uninstall an application and its Registry entries only once, so one OS will be confused because the application is no longer available. This inability to delete an application's Registry entries can result in a clogged Registry, ghosted Add/Remove Program entries, and functionality problems in the dual-booting OS. Although sharing application-installation folders seems to improve disk efficiency, you should maintain a separate installation of an application for each OS. The easiest way to keep your application installations separate is to devote Program Files on two drivesone for each OS. Although this practice uses more disk space, it creates a clean and stable system configuration.
A less-obvious resource that NT and Win9x can share is the paging file. You might know that NT and Win9x use a paging or swap file as virtual memory; however, you might not be aware that you can configure Win9x to use NT's paging file. This procedure requires that the paging file be on a FAT16 volume that is accessible to both OSs. The following steps walk you through how to configure NT and Win9x to share a paging file:
- Under NT, configure a paging file in the Virtual Memory section of the Performance tab in the Control Panel's System applet (NT lets you set paging files across multiple drives, so make sure that at least one portion of the file is on a FAT16 volume). Set the initial and maximum size of the paging file to the same amount, and write down the chosen size, converting it to kilobytes (1MB = 1024KB).
- Boot into Win9x, and edit the system.ini file in the Win9x installation directory by adding the following lines to the [386Enh] section:
PagingFile=<x>:\pagefile.sys
PagingDrive=<x>:
MinPagingFileSize=<n>
MaxPagingFileSize=<n>
in which x is the drive letter of the partition that contains the shared paging file, and n is the size of the paging file in kilobytes.
- Reboot the system into Win9x, and find and delete any instance of the win386.swp file (i.e., Win9x's old paging file) to free the disk space this file is using.
If you change the size of a shared paging file under NT, you should immediately re-edit Win9x's system.ini file and make the appropriate adjustments.
Mastering Multibooting Madness
In this article, I discussed the major challenges you face when configuring NT systems to accommodate multiple OSs. I geared this article toward x86-based systems because they load their bootstrap code directly from the hard disk, so they are the only systems capable of running both NT and DOS, Windows 3.x, or Win9x. These guidelines don't apply to RISC-based NT systems (e.g., systems that use Alpha processors) because they use ARC or RISC firmware to specify OS boot options, rather than the boot.ini file that x86-based systems use. Configuring a multibooting system is a risky operation, so always back up your entire system before you install an additional OS or employ a disk-partitioning or boot-management utility.
Corrections to this Article:
- "Mastering Multibooting Madness" contains incorrect URLs for J. David Bryan's two Internet FAQs. The correct URLs are http://www.bcpl.net/~dbryan/ntfs-dual-boot.html and http://www.bcpl.net/~dbryan/directboot.html.