Installing Windows® After Something Else
Modern lore often leads the naive to believe that Windows should always be installed first on any system on which it must co-exist with some other operating system, for instance, Linux. The problem with that is that inevitably Windows will need to be reinstalled. The better approach is to install such that Windows changes nothing at all, or nothing that isn't dead easy simple to undo. Then it doesn't matter what gets installed when.
How? Here's the condensed procedure for an empty single SATA HD system on which a dedicated boot manager that requires its own partition will not be used:
- Partition completely first, preferably with a cross-platform and/or
OS-agnostic tool, to prevent booby traps from unruly installers getting in your way. Reserve for Linux
SDA3, and put a small (600 MiB or less)
SDA2for Windows to boot from. Set
SDA3"active" (DOS/OS2/Windows tools) or "bootable" (Linux tools).
- Install Linux, but, put the bootloader on
SDA3, not the
MBR. Starting with a HD with no installed OS, the installer may not give you this option. If it does not, after installation is complete, install the bootloader to
/bootyourself by running your choice of
lilo. Alternatively, use a distro-specific tool made for the purpose, such as YaST2 (e.g. openSUSE) or
dpkg-reconfigure grub-pc(Debian and its derivatives).
- Add a stanza to
lilo.conffor the Windows
SDA2. Do not include "makeactive", unless you want to always start boot from the NTLoader menu on the successive boot.
- Set the
- Install Windows.
- (optional) Add the Linux
SDA3boot partition to Windows XP's
boot.ini, or use Windows'
BCDEditto add it to Vista and newer Windows versions' boot menu. Reboot to see if the initial boot menu is Windows'. If it is not, use a
DOSor Windows utility like
FDISKto install generic
MBRcode in place of the non-generic code set there by the Linux installer.
- Use any of countless
DOSor Windows or open source tools to change the "active"/"bootable" partition back to Linux'
/boot(changing 2 bits in the
At this point you're ready to boot either OS from the Grub, Grub2 or Lilo menu,
with a fallback to booting either Windows or Linux using NTLoader or BCD if you
chose option 5.B. And, you're doing it with pure generic
which simply transfers boot control to the boot record of whichever primary
partition is set "active"/"bootable".
When you're done doing as above, your disk layout might be logically arranged as follows:
|ID |Dr|Type, description|hd|Format |Related |Size MiB| +---+--+-----------------+--+--------+--------+--------+ |01>|C:|Prim 06 FAT16 | 1|FAT16 |MSWIN4.1| 39.2| |02 | |Hide 11 FAT12 | 2| | | 7.8| |03*| |Prim 83 LinuxNatv| 3|EXT2 |GRUB | 101.9| |05 | |Log 82 SunS/SWAP| 5|SWAP |Linux | 768.7| |06 | |Log 83 LinuxNatv| 6|EXT3 |Linux | 4800.6| |07 |D:|Log 0c FAT32-Ext| 7|FAT32 |MSWIN4.1| 3506.3| |08 |E:|Log 0c FAT32-Ext| 8|FAT32 |MSWIN4.1| 4000.5| |09 | |Log 83 LinuxNatv| 9|EXT3 |Linux | 6243.9|
And your Grub bootloader configuration could look similar to:
default 1 timeout 50 color cyan/blue white/blue title Windows root (hd0,0) # makeactive chainloader +1 title Kubuntu Linux root (hd0,2) kernel /vmlinuz-2.6.15-23-386 root=/dev/hda6 ro vga=0x317 nosplash initrd /initrd.img-2.6.15-23-386 # savedefault boot title Kubuntu (recovery mode) root (hd0,2) kernel /vmlinuz-2.6.15-23-386 root=/dev/hda6 ro single initrd /initrd.img-2.6.15-23-386 boot
If you performed step 5.B., your Windows'
boot.ini would be something like:
[boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(6)\WINNT [operating systems] multi(0)disk(0)rdisk(0)partition(6)\WINNT="Microsoft Windows 2000" /fastdetect C:\grubboot="Grub Boot Menu"
Assuming your Windows C: drive in Linux is mounted on
/disks/C, and the disk
partitioning above, you would create
C:\grubboot above like so:
dd if=/dev/hda3 of=/disks/C/grubboot bs=512 count=1
Any OS installations beyond the first two are easily added to the
menu.lst menus. For additional
versions of Windows the installer will do
boot.ini automatically. Just remember
during additional Linux installations to place their boot loaders on their respective
and set the Windows primary "active"/"bootable" before every Windows (re)installation.
Caution: Contrary to common folklore, all supported Windows versions are perfectly happy to use a primary partition other than the first for C:. However, if you use the first primary for something other than C:, and install Grub on the first primary, then the WinXP installation program may not continue after displaying "Setup is inspecting your hardware configuration..."
- Installing Vista after Linux on APC Magazine
- Installing Linux after Vista on APC Magazine
- GNU Grub Legacy Manual
- GNU Grub 2 Manual
- SUSE on Grub
- Learn Linux 101: Install a boot manager, a developer.ibm.com tutorial
- Recover from a failed Linux boot, by Rod Smith
- Managing EFI Boot Loaders for Linux, by Rod Smith
- Hard Disk Upgrade Mini How-To, from The Linux Documentation Project
- Large Disk HOWTO, from The Linux Documentation Project
- Large Disk HOWTO, by Andries Brouwer
- HOWTO: Multi Disk System Tuning, from The Linux Documentation Project
- Multiboot with GRUB Mini-HOWTO, from The Linux Documentation Project
- Win95 + WinNT + Linux multiboot using LILO mini-HOWTO, from The Linux Documentation Project
- Managing Multiple Operating Systems HOWTO, from The Linux Documentation Project
- Linux Partition HOWTO, from The Linux Documentation Project
- Booting with LILO, from The Linux Documentation Project
- EasyBCD Vista compatible boot loader
- Can I repartition my hard disk?, on Microsoft.com
- Shrink a Basic Volume, on Microsoft.com
- Hard Disk Drives, from PC Guide/Storage Review
- Howto add OS/2 Systems to the ThinkPad T43 T43p Preload, on os4you.com
- Microsoft Knowledgebase Vista Multiboot
- Windowshelp Multiboot
- Vista's MBR Disk Signature
- Prefixes for Binary Multiples at Everything2
- Knoppix - Rescue via Linux, or simply run Linux from CD or DVD
- Linux Partitions: A Primer by Dee-Ann LeBlanc on Linux Planet
- Multibooters - Dual/Multi Booting With Vista
- Bart's Windows/DOS Boot CD - M$ rescue from CD
- Installing OS/2 with FAT32 around, by Darryl Sperber on OS/2 Voice
- LVM, FDISK and Partition Magic, by Eirik Overby on OS/2 Voice
- Ranish Partitioning Primer
- Gary Field's SCSI Info Central, home of the SCSI FAQ
- Notes on using logical volumes and the Logical Volume Manager (LVM), by Bob Eager
- Ultimate Boot CD - Many ways to rescue
- Hiren's Boot CD - Many ways to rescue
- bootinfoscript - display copious info about booting a Linux system
- Recovering Ubuntu After Installing Windows
|License||Executable runs on platform|
|DFSee||X||X||X||X||X||X||compiled to run on all popular platforms|
|FDisk||X||X||X||X||X||X||X||several apps go by same name (not cross-platform)|
|Gdisk||X||X||supports GPT partitioning as required for disks >2TiB|
|Partition Logic||X||no OS required|
|Ranish Partition Manager||X||X|