HOWTO install Windows after Gentoo if setup hangs after displaying "Setup is inspecting your computer’s hardware configuration"

From Gentoo Linux Wiki

Jump to: navigation, search

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.

Warning: Do not exchange hardware of a running system unless you are absolutely sure it is hotbluggable. (i.e. USB)

[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.

Warning: If you don't follow instructions carefully you will lose your data!

[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.

Note: I assume your HDD is named /dev/hda. Substitiute the name of your disk.
Warning: /mnt/save refers to a directory which is not located on this disk and accessible after booting from a Linux LiveCD
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.

Warning: If you have to modifiy (deletion is OK) an extended partition continue at your own risk and update this HOWTO. Try "sfdisk --show-extended --dump /dev/hda > /mnt/save/ExtendedPartitionTable" to backup the whole Partition Table. Restore it later with "sfdisk --show-extended < /mnt/save/ExtendedPartitionTable". - untested, but should work

Write (w) the partition table.

Note: The data on the deleted partitions is not lost, it is merely inaccessible.

[edit] Install Windows

Now install windows.

Warning: Be sure not to alter the partition table during the setup.

[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.

Note: You have to edit the configuration of your bootloader if you really want to boot Windows.

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.

Personal tools