How to deploy WinXP 64-bit on a UEFI with CSM in AHCI

Discuss Windows 2000, NT, XP and Windows Server 2000, 2003, SBS 2003.
Post Reply
Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

How to deploy WinXP 64-bit on a UEFI with CSM in AHCI

Post by Beta12 »

WinXP can not be installed in UEFI mode in the normal way but the system can be deployed, for example, using Sysprep. We need a second computer with WinXP x64 installed in Legacy BIOS mode - e.g. VMware Workstation 8 virtual machine. We will find out from deploy.chm instructions that several conditions have to be met in order to succeed:
  • the same Hardware Abstraction Layer (HAL)
  • the same disk controller driver
If the target computer has a different disk controller, e.g. AHCI, then we also need to implement its drivers.

This topic refers to the topic - Does Windows XP have EFI? in which I managed to run the system on the ThinkPad X220.

For X220 we also need to implement the AnaPa VBE Miniport graphic driver.

In order for the computer to start with EFI we need a FAT partition, so it is best to install the system on one partition as small as possible, e.g. 1.5GB

In VMware, create a Windows XP Professional x64 Edition machine with parameters:
  • Hardware Compatibility 5.x
  • Do not use a network connection
  • Memory 1GB
  • Processors 2
  • Hard Disk 2GB (IDE 0:0) (Store virtual disk as a single file)
  • CD/DVD (IDE 1:0)
  • delete Floppy
  • delete USB Controller
  • delete Sound Card
Install WinXP x64 SP2 creating a 1.5GB FAT partition (1536MB) using the installer's C option.

Copy to the system on the C partition:

Drivers
|-Chipset - AHCI drivers X220
|-Video - VBE Miniport VBE30 drivers

EFI - EFI files from Beta Server Longhorn

Sysprep - files from DEPLOY.CAB from WinXP x64 media and sysprep.inf:

Code: Select all

;SetupMgrTag
[Unattended]
    OemSkipEula=Yes
    OemPnPDriversPath=Drivers\Chipset;Drivers\Video
    ConfirmHardware=No
    DriverSigningPolicy=Ignore
    OEMPreinstall=Yes
    UpdateInstalledDrivers=Yes

[GuiUnattended]
    AdminPassword="insert own pass"
    EncryptedAdminPassword=NO
    OEMSkipRegional=1
    TimeZone=100
    OemSkipWelcome=1

[UserData]
    ProductKey=insert own key
    FullName="insert own name"
    OrgName="insert own name"
    ComputerName=efixp

[TapiLocation]
    CountryCode=48
    Dialing=Tone
    AreaCode=0
    LongDistanceAccess="0"

[RegionalSettings]
    LanguageGroup=2
    SystemLocale=00000415
    UserLocale=00000415
    InputLocale=0415:00000415

[Identification]
    JoinWorkgroup=GRUPA_ROBOCZA

[Networking]
    InstallDefaultComponents=Yes

[SysprepMassStorage]
    PCI\VEN_8086&DEV_1C03&CC_0106 = "C:\Drivers\Chipset\iaAHCI.inf", "C:\Drivers\Chipset"
Copy also Vbemp.sys driver to C:\WINDOWS\system32\drivers and winload.efi to C:\WINDOWS\system32

Now start Sysprep and Reseal the system with the default options - after a moment, the system should turn off.

Mount the VMDK WinXP drive in read/write mode using the Map Virtual Disks... option in VMware and delete file display.inf from WINDOWS\Inf and delete two services vga & VgaSave from registry in ControlSet001 key - use the Load Hive option in the registry editor by loading the WINDOWS\system32\config\system file.

Create a disk image, e.g. in Debian 6 32-bit, using the dd command - from the beginning of the disk to the end of the partition cylinder:

Image

Restore disk image on X220 machine using Debian 9 64-bit EFI mode:

Code: Select all

dd if=/mnt/mp/prep.img of=/dev/sda
Restart X220 to proceed deploy.

It works for me *hehe* . The deployment process is done without a screen because we removed the VGA driver - problematic in EFI. It takes about 1 minute and laptop restart itself.

Of course, instead of Debian, you can use other disk cloning\imaging tools.

Soon I will try to record a video of how it goes :)

redspl
Posts: 15
Joined: Wed Aug 17, 2016 12:22 am
Contact:

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by redspl »

Code: Select all

[Identification]
    JoinWorkgroup=GRUPA_ROBOCZA
Jesus christ on a bicycle, WHY?
BTW, using VMWare in this setup makes your job a bit harder than it would otherwise be. I'd use qemu-system-i386 or qemu-system-x86_64 w/ -enable-kvm option to make it faster. This way, by using /dev/sda as your main HD you could theoretically deploy the OS without the reboot, and without the need to touch drivers.

Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by Beta12 »

redspl wrote:BTW, using VMWare in this setup makes your job a bit harder than it would otherwise be. I'd use qemu-system-i386 or qemu-system-x86_64 w/ -enable-kvm option to make it faster. This way, by using /dev/sda as your main HD you could theoretically deploy the OS without the reboot, and without the need to touch drivers.
Read the topic carefully - it is about deploying the WinXP x64 system on the ThinkPad X220 laptop with UEFI + AHCI and not on the virtual machine.
In addition, I like VMware and I make disk images in Debian Live run by the network from PXE server (I use mount.cifs), so it does not matter what machine I use because I still have to upload a disk image to a real computer.

Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by Beta12 »

I introduced two improvements:
  • I have fixed the error in the vbemppnp.inf file and now I do not have to copy the vbemp.sys driver manually before installation - https://www.betaarchive.com/forum/viewt ... 61#p440361
  • The VGA controller can be turned off in a running system after make Reseal - just select the Quit option in Sysprep. Now delete display.inf and vga & VgaSave services from registry in CurrentControlSet key.

Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by Beta12 »

Promised video:

Sysprep in VMware:

oscareczek
User avatar
Posts: 700
Joined: Fri Apr 25, 2014 5:37 pm
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by oscareczek »

Beta12 wrote:
redspl wrote:BTW, using VMWare in this setup makes your job a bit harder than it would otherwise be. I'd use qemu-system-i386 or qemu-system-x86_64 w/ -enable-kvm option to make it faster. This way, by using /dev/sda as your main HD you could theoretically deploy the OS without the reboot, and without the need to touch drivers.
Read the topic carefully - it is about deploying the WinXP x64 system on the ThinkPad X220 laptop with UEFI + AHCI and not on the virtual machine.
In addition, I like VMware and I make disk images in Debian Live run by the network from PXE server (I use mount.cifs), so it does not matter what machine I use because I still have to upload a disk image to a real computer.
Read the answer carefully.
Reds said you should have used physical disc:
redspl wrote:qemu-system-x86_64 w/ -enable-kvm […] using /dev/sda as your main HD
and not mess with any disk cloning. And using PXE doesn't make the solution any better, it's meant to be used only when absolutely necessary.

Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by Beta12 »

oscareczek wrote:Reds said you should have used physical disc:
redspl wrote:qemu-system-x86_64 w/ -enable-kvm […] using /dev/sda as your main HD
and not mess with any disk cloning. And using PXE doesn't make the solution any better, it's meant to be used only when absolutely necessary.
I do not know Qemu well, and my way of PXE works. But it does not matter. The priority in this topic is the implementation of WinXP x64 on UEFI + AHCI on ThinkPad X220.

This should work on other computers with UEFI firmware which are the AHCI driver for WinXP x64.


linuxed
Posts: 2
Joined: Sat Jun 04, 2022 1:58 pm

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AH

Post by linuxed »

Beta12 wrote:
Fri Apr 19, 2019 6:18 pm
Promised video:

Sysprep in VMware:
Where we can get EFI-deploy-x220.iso with efi files? Thanks.

Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI (without CSM) in AHCI

Post by Beta12 »

It doesn't have to be ISO. The necessary files must somehow be copied to the hard disk. You can also map a VMDK using VMware in read/write mode - uncheck the option marked in red:
Image

linuxed
Posts: 2
Joined: Sat Jun 04, 2022 1:58 pm

Re: How to deploy WinXP 64-bit on a UEFI with CSM in AHCI

Post by linuxed »

"Copy to the system on the C partition:
EFI - EFI files from Beta Server Longhorn"
I thought the efi files had to be copied to a separate fat32 partition. Or can it also be copied to the C drive?
And does it work in GPT? Also, is it possible to deploy to a single partition rather than an entire disk? Thanks in advance.

Beta12
User avatar
Posts: 271
Joined: Sat Sep 21, 2013 11:19 am
Location: Poland

Re: How to deploy WinXP 64-bit on a UEFI with CSM in AHCI

Post by Beta12 »

@linuxed
BIOS UEFI does not have a NTFS driver, therefore it needs a FAT32 partition.
There must be bootx64.efi and BCD files on the FAT32 partition and only the winload.efi file on the NTFS partition.
Yes - it also works with GPT:
viewtopic.php?p=445349#p445349
The NTFS driver can be integrated into the BIOS and then the FAT32 partition is not needed.
viewtopic.php?p=433717#p433717

Here you have a new guide on how to deploy WinXP 64-bit under pure UEFI:
Sysprep WinXP SP2 64-bit on pure UEFI PC (no CSM)

Seven4ever1
Posts: 35
Joined: Tue Aug 29, 2023 12:32 pm

Re: How to deploy WinXP 64-bit on a UEFI with CSM in AHCI

Post by Seven4ever1 »

Hi Beta 12.
Thanks for your work, il helped me to install Xp64 on UEFI + GPT partition on real hardware.
It is installed in multiboot env, (W10 + W11 + W7 + XP). I haven't found how to make working Flashboot's efi loader + winload.efi from W10 an above, so I still uses Uefiseven wich is compatible with all (xp to W11).
My hardware: Intel gen 9 + UHD graphics 630, Mobo Gigabyte h310m sp2
Last edited by Seven4ever1 on Sat Sep 02, 2023 7:27 pm, edited 1 time in total.

Post Reply