HOWTO install Windows after Gentoo if setup hangs after displaying "Setup is inspecting your computer’s hardware configuration"
From Gentoo Linux Wiki
Contents
|
[edit] The Problem
You have a running Gentoo system and want to install Windows (here: XP). You boot the install CD and after displaying "Setup is inspecting your computer’s hardware configuration" there is a blank screen for ages.
[edit] Possible causes and solutions
[edit] Your Windows setup CD is crap (here: defect)
Try the CD in another Computer. Perhaps one without any hard drives. If it works we assume the CD is OK. If not, get a new/other one.
[edit] There is really some problem with your hardware
Rip everything out of your box (NIC, Soundcard, USB-Peripherals, ...). If if works put one piece at a time back in and try again, thus finding the offending hardware.
[edit] There is no suitable partition on the primary drive to install Microsoft Windows XP
Microsoft Windows XP contains a bug, which means that the installation must be made to a primary (non-extended) partition on the primary IDE hard drive.
Due to additional limitations, it is recommended that the Microsoft Windows XP is installed on a [FAT32] partition within the first 32Mb of the hard drive.
A typical partitioning scheme is as follows:
Primary Partitions
Partition 1: 512Mb /boot (ext2) Partition 2: 12288Mb /winxp (fat32)
Secondary Partitions
Partition 5: 650Mb / (ext2) Partition 6: 12288Mb /usr (ext2) Partition 7: 12288Mb /local (ext2) (Symlinks point /home and /var to this conglomerate partition) Partition 8: 512Mb SWAP
[edit] Windows setup sees Gentoo and drops dead (Or some problem with the partition table)
Try the solution below if all else fails.
[edit] Backup your data
Backup your Data.
[edit] Backup your MBR
In the following I assume you are at HOWTO_Dual-boot_when_installing_Windows_after_Gentoo#Installing_Windows. That is, you have created a partition where your future Windows OS shall reside.
dd if=/dev/hda of=/mnt/save/MBR bs=512 count=1
This saves your MBR to the external media.
[edit] Hide Gentoo
Now we will delete all partition table entries which link to other partitions than the target partition, so that they are hidden from the windows installer.
fdisk /dev/hda
List (l) your partitions.
Device Id System /dev/hda1 83 Linux /dev/hda2 7 HPFS/NTFS /dev/hda3 5 Extended /dev/hda5 83 Linux /dev/hda6 83 Linux /dev/hda7 83 Linux
Delete (d, <n>) all partitions except the NTFS of FAT32 partition on which you want windows installed.
Write (w) the partition table.
[edit] Install Windows
Now install windows.
[edit] Restore MBR
Boot your LiveCD.
dd if=/mnt/save/MBR of=/dev/hda
This restores your original MBR. So you can skip the reinstallation of the bootloader.
If the partiton number changed (i.e. you restored a hidden partition with a number less than your Windows partitons'), you have to adjust the file boot.ini in your Windows root directory. If you fail to do so, you will get the illusive error message "missing %systemroot%/system32/hal.dll".
$ cat /mnt/windows/boot.ini [boot loader] timeout=30 default=multi(0)disk(0)rdisk(0)partition(2)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP" /noexecute=optin /fastdetect
Note that the partition is 1-based, while the other numbers start with zero.
