Dual-booting all versions of Windows and Linux
Boot Sequence in a Windows Dual-Boot Explained
Last reviewed: May 2005
BIOS begins the Windows bootup sequence
A little understanding of the bootup sequence is a wonderful asset when creating a natural dual-boot, and even more so if a repair ever becomes necessary. This page deals mainly with those parts of the bootup that relate to a Windows-based dual-boot or multi-boot.
Standard Bootup Sequence
Every disk is divided into a large number of sectors (usually 512 bytes). A cluster contains a contiguous number of these sectors. A partition (there's always at least one) contains a number of these clusters. However, a small number of sectors remain 'outside' the partitions and these contain very important information for booting the PC and running the OS.
Dual-Boot Bootup Sequence
Microsoft designed XP/2K/NT (not Win9x) to be dual-booted or multi-booted with the same, or earlier versions of Windows or MS-DOS (version 5 or later). The most recent Windows installation overwrites the existing MBR. PBR, and boot files (if using same name) with its own versions, so Microsoft says the oldest version of Windows must be installed first. However, this restriction can be overcome and you can install an earlier version on a computer containing a later version, creating a dual-boot - see Dual-Boot Centre below.
(It starts outside all partitions and is not OS-specific)
• In (c) above: The system partition contains all boot files for every installed Windows.
Active Partition: You must have one! It can be verified or created by booting from a Win9x boot disk, typing Fdisk, and selecting option 2. It must be a Primary partition on the Primary Master (1st disk).
Rescue Boot Disk:
The system partition (Active partition) can be on a floppy boot disk (or bootable CD). This means a Rescue Boot Disk can replace the system partition and the boot files. It will boot, or multi-boot, your Windows even if there's a fault with the hard disk's MBR, the OS Boot Sector or its code, or any of the boot files (they are all on the floppy!). A Rescue Boot Disk is a 'must-have' for all dual-booters (create it when a dual-boot is working fine). The OS files from the boot partition can't be on a floppy (unless they're very small, like MS-DOS).
About the PBR and its OS Boot Sector Code
A PBR, on a partition's first sector, contains a Parameter Block (or Table) and some boot code.
About the Bootsect File and Boot.ini
C:\="(description)" in the [operating systems] section of Boot.ini
Basic XP Boot Sequence (not dual-booted)• XP Boot Sector Code > NTLDR (& Ntdetect) > NTLDR reads ARC pathway to XP in Boot.ini > NTLDR runs XP from that location.
There's only one legitimate OS here, so no Boot Loader Menu is shown and there's no delay.
The XP/2K/NT pathways shown in Boot.ini use the ARC naming convention. This allows compatibility with RISC computers.
Open C:\Boot.ini (it's a Hidden file) in Notepad. You'll see a line containing the XP partition & directory.
where rdisk(0) is the first hard disk (rdisk(1) would be a second disk), and
where partition(2) is second partition on that disk, and
where WINDOWS is the name of XP's installation directory.
(disks start counting from 0, partitions start counting from 1)
The 'normal' equivalent of this is D:\Windows where D: is the second partition on the first hard disk.
NTLDR uses this information to run XP's initialisation files in the XP directory at that location.
Basic Win9x Boot Sequence (not dual-booted)• Win9x Boot Sector Code > Io.sys > Io.sys reads pathway to Win9x in Msdos.sys > Io.sys runs Win9x from that location.
Open C:\Msdos.sys (it's a Hidden file) in Notepad. You'll see that WinDir and other lines point to the Win9x partition & directory. This information is used by Io.sys to run Win9x from that location.
XP + Win9x Boot Sequence (Dual-Booted)Remember that in the creation of an XP + Win9x dual-boot, the Win9x Boot Sector (OS PBR) is copied to C:\Bootsect.dos while a Win9x Boot Sector exists i.e. Win9x is the most recently installed OS, or the Sys C: command was just run from a Win9x Startup or Boot Disk. The sector is specific to each computer so it can not be copied from another computer.
The Win9x Boot Sector is then overwritten with an XP Boot Sector by installing XP, or by using the Fixboot command. Either will destroy the original Win9x Boot Sector but not its copy in Bootsect.dos.
All installed OSs use the XP/2K/NT Boot Sector, at least initially.
The XP boot sequence for this dual-boot
This will be the same as above (except you can select XP from the Boot Loader Menu options).
• XP Boot Sector Code > NTLDR (& Ntdetect) > NTLDR reads Boot.ini > NTLDR shows Menu (select XP) > NTLDR reads ARC pathway to XP in Boot.ini > NTLDR runs XP from that location.
The Win9x boot sequence for this dual-boot
• XP Boot Sector Code > NTLDR (& Ntdetect) > NTLDR reads Boot.ini > NTLDR shows Menu (select Win9x) > NTLDR loads C:\Bootsect.dos > Win9x Boot Sector Code > Io.sys > Io.sys reads pathway to Win9x in Msdos.sys > Io.sys runs Win9x from that location.
Let's split that into two sections, the XP part and the Win9x part.
• XP Boot Sector Code > NTLDR (& Ntdetect) > NTLDR reads Boot.ini > NTLDR shows Menu (select Win9x) > NTLDR loads C:\Bootsect.dos
• > Win9x Boot Sector Code > Io.sys > Io.sys reads pathway to Win9x in Msdos.sys > Io.sys runs Win9x from that location.
You can see that XP is in control until Bootsect.dos is loaded. Then the Win9x Boot Sector Code is given control and the boot continues as if Win9x were the only OS installed.
The selection of Win9x from the boot menu triggers NTLDR to look for a legitimate Bootsect.dos file on C:. If found, NTLDR loads the Win9x Boot Sector (from Bootsect.dos) into memory and uses that instead of the XP sector. If not found, NTLDR will use the remaining legitimate OS or will fault depending on circumstances.
Booting to Win9x in an XP + Win9x dual-boot is dependent on two main factors:
1. The [operating systems] section of Boot.ini must contain the line C:\="(description)"
2. A valid C:\Bootsect.dos must exist.
XP + XP/2K/NT Boot Sequence (Dual-Booted)
• XP Boot Sector Code > NTLDR (& Ntdetect) > NTLDR reads Boot.ini > NTLDR shows Menu (select an OS) > NTLDR reads ARC pathway to selected OS in Boot.ini > NTLDR runs the OS from that location.
Sys C: Command Rewrites the OS Boot Sector (PBR) for Win9x
The A:\SYS C: command should be run from a DOS prompt after booting from the Win9x boot disk created by the installed Win9x. Use this command only if you are sure it's required. Sys makes the computer bootable to a Win9x (provided the relative partition is also marked Active!).
Fixboot Command Rewrites the OS Boot Sector for XP/2K
The Fixboot command is run from the Recovery Console after booting from the CD, or perhaps the Recovery Console is installed and is a boot option in the Boot Loader Menu.
Please remember that you alone are responsible for the consequences of any changes you make to your computer hardware or software.
Copyright © LarryM 1998-2015 firstname.lastname@example.org