Friday, August 31, 2007

Install XP Pro SP2 from USB stick for dual boot

As soon as I got my refund for the Windows Vista that came preinstalled on the laptop, I formatted the whole disk with Ubuntu 7.04's fdisk, as I wanted to perform a clean installation modifying the disk partitioning. Some time later, I dediced that I wanted to install Windows XP in order to participate in the LAN parties that were held at some friends houses. And here the problems arised. I took a Windows XP Professional SP2 installation CD, booted from it, and when the message "The XP setup program is inspecting your hardware configuration", it locks and does not continue.

I haven't yet been able to identify what is the cause of the lock, maybe it was because I wanted to install in the fourth SATA disk partition (/dev/sda4), or maybe it was a Phoenix BIOS issue, as the laptop comes with the Vista enabled BIOS 3309. Maybe there is any incompatibility with EFI. Don't know yet. Here I'm describing the method that worked for me, after a long time of trials and errors. It does not work as expected, but it works. It's based on the following article:

http://www.msfn.org/board/index.php?showtopic=61384&view=findpost&p=583477

Requisites:
Let's assume that Windows is installed on the PC on drive C:, the CD-ROM unit is drive D:, and the USB stick maps in the E: In my case, the Windows version used is XP Professional with integrated SP2 in Spanish.

Step by step:
  • Create a copy of your C:\boot.ini to C:\boot.bak
  • Perform a noreboot installation ...
Execute from the command line
D:\I386\winnt32.exe /noreboot
Select "New Installation (avanced)"
Accept the EULA and type the CD key
Check in the Setup options -> Advanced options that the directory is \WINDOWS and check the option "Copy setup files"
Answer NO if you get asked on upgrade the hard disk to NTFS.
Once finished, the setup program will finish withouth rebooting. Do not extract the CD yet.

Now there would be two newly created directories called C:\$WIN_NT$.~BT and C:\$WIN_NT$.~LS. If they are not visible, check that the folder options to show hidden and system files are enabled.
  • Delete C:\boot.ini and rename C:\boot.bak to C:\boot.ini
  • Create the bootable USB with PEtoUSB ...
Insert the USB stick, execute PEtoUSB, select the USB stick, mark "Enable disk format" and point "source path" to the CD installation source, in my case D:\, and check "Enable File Copy" and "Overwrite always". The bootable USB will be created.
  • When the program is done, erase everything except:
NTLDR
NTDETECT.COM
WIN51
WIN51IP
WIN51IP.SP2

The WIN51* files will depend on the Windows version that you're installing.
  • Copy the directories C:\$WIN_NT$.~BT and C:\$WIN_NT$.~LS into the USB stick root.
  • Create a directory called E:\minint in the stick
  • Copy C:\$WIN_NT$.~BT\txtsetup.sif into the E:\minint directory of the stick
  • Erase the following files from the USB E:\$WIN_NT$.~BT directory
BOOTSECT.DAT
migrate.inf
winnt.sif
  • Renane the directories C:\$WIN_NT$.~BT to C:\$WIN_NT$.~BT.OLD and C:\$WIN_NT$.~LS to C:\$WIN_NT$.~LS.OLD in order to keep them if anything goes wrong.
Now, boot with the USB ... accept everything and some time later it will ask for the installation CD. Put it in the CD drive and press ENTER. Install Windows in the usual way. At this point, in the partitioning, I had an error saying that Windows could not create the partition to install. What I did was to reboot with Ubuntu and create the WinLBA32 partition from fdisk. I restarted the setup procedure and formated the partition with NTFS quick format.

If the system is displaying errors on restart, check the C:\boot.ini file in the laptop by using the recovery console that is in the USB stick. Check that the entries are pointing to the right disk drive. In my case, it's as follows.
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect

Now, it's only needed to restore the MBR so that GRUB can launch instead of the XP boot manager. This can be easily done with Super Grub Disk, please check the post "Repair GRUB booting with a USB stick and XP".

If everything went fine, you can also delete the installation folders on the PC, C:\$WIN_NT$.~BT.OLD and C:\$WIN_NT$.~LS.OLD, as they are no longer needed.

It's not a bad idea to restart the laptop in Linux and create an image of the XP partition with some tool like Partimage (http://www.partimage.org), in order to restore it in an easier way.

4 comments:

Softeac said...
This comment has been removed by the author.
Softeac said...

Yes, your article was deleted blog, I leave only the title and your link. Thank you for your work. goodbye

Anonymous said...

Who knows where to download XRumer 5.0 Palladium?
Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

cheap computers said...

The hinges is firm and solid, not as good as the HP 6910p but good enough. Performance wise its just as good as the HP 6910p on most everyday tasks, and what we intended to use it.