With RED color are marked new or changed entries, strikethrouh font is for entries or files no longer needed compared to the old guide. If you are starting from a scratch just skip those entries or files:
1. Format stick using PEtoUSB or any other utility of your choice, which makes it bootable with 2k/XP boot sector
2. Copy NTDETECT.COM, NTLDR to root and create BOOT.INI
BOOT.INI
[Boot Loader] Timeout=15 Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS [Operating Systems] c:\grldr="Start GRUB" multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Setup" /FASTDETECTIf you are going to install on another partition/disk amend entries to reflect that.
Make sure you can boot from stick and reach the menu.
3. Get the latest GRUB4DOS and copy GRLDR to the USB root. If you have any issues use the last stable version. Create in USB stick root
MENU.LST
color black/cyan yellow/cyan timeout 15 default 0 title Phase 1 WinXP Text Mode Setup chainloader (hd0,0)/setupldr.bin
4. Backup your local BOOT.INI and in the XP setup folder \I386 run
winnt32 /makelocalsource /norebootafter it's finished restore BOOT.INI you backed up.
5. Copy two new folders onto the USB stick root - $WIN_NT$.~BT and $WIN_NT$.~LS
6. In \$WIN_NT$.~BT modify
WINNT.SIF
Quote
msdosinitiated="1"
floppyless="1"
AutoPartition="0"
UseSignatures="no"
InstallDir="\WINDOWS"
winntupgrade="no"
win9xupgrade="no"
[GuiRunOnce]
"%systemdrive%\windows\system32\undoren.cmd"
[SetupParams]
UserExecute = "%systemdrive%\windows\system32\boot_ren.cmd"
and
MIGRATE.INF
[Version] Signature = "$Windows NT$" [Addreg] HKLM,"SYSTEM\MountedDevices",,0x00000010 HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1 [Strings] ;Handy macro substitutions (non-localizable) REG_SZ = 0x00000000 REG_BINARY = 0x00000001 REG_DWORD = 0x00010001 REG_MULTI_SZ = 0x00010000 REG_SZ_APPEND = 0x00010008 REG_EXPAND_SZ = 0x00020000If you wish to preserve your USB storage drive letter use CDOB's script to create MIGRATE.INF, don't forget to add the above entries :
MkMigratgeInf.cmd
@echo off
REM MkMigratgeInf.cmd v0.01
REM created by cdob
setlocal EnableExtensions
set Drive=%~d1
if %Drive%.==. set Drive=%~d0
set FileName=%~2
if %FileName%.==. set FileName=MIGRATE.INF.TXT
set MigrateDrive=U:
if not %~d3.==. set MigrateDrive=%~d3
set Value=
FOR /F "skip=2 tokens=1-2*" %%a IN ('reg query HKLM\System\MountedDevices /v \DosDevices\%Drive%') DO set Value=%%c
if %Value%.==. (echo drive settings %Drive% not found & goto :EOF)
set MigrateStr=%Value:~0,2%
set count=2
:begin_parse
call :exec set MidStr=%%Value:~%count%,2%%
if %MidStr%.==. goto :exit_parse
set MigrateStr=%MigrateStr%,%MidStr%
set /a count+=2
goto begin_parse
:exit_parse
(echo [Version]
echo Signature = "$Windows NT$"
echo.
echo [Addreg]
echo HKLM,"SYSTEM\MountedDevices","\DosDevices\%MigrateDrive%",0x00030001,\
echo %MigrateStr%)>%FileName%
goto :EOF
:exec
%*
goto :EOF
7. Create a folder BOOTFILES in USB stick root, and copy NTDETECT.COM, NTLDR and create there your custom BOOT.INI, which will be copied on hard disk later, during the first logon. Set them system, hidden and read-only in advance.
BOOT.INI
[boot loader] timeout=15 default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS [operating systems] multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP Professional 0 1" /noexecute=optin /fastdetect multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="XP Professional 0 2" /noexecute=optin /fastdetect multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="XP Professional 0 3" /noexecute=optin /fastdetect multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="XP Professional 1 1" /noexecute=optin /fastdetect multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="XP Professional 1 2" /noexecute=optin /fastdetect multi(0)disk(0)rdisk(1)partition(3)\WINDOWS="XP Professional 1 3" /noexecute=optin /fastdetect
8. Create:
no longer needed !
no longer needed !
BOOT_REN.CMD
@echo off SET TAGFILE=\bootfiles FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h: xcopy %USBDRIVE%\bootfiles\*.* %SYSTEMDRIVE%\ /y /h /r /k ren %USBDRIVE%\txtsetup.sif txtsetup.bak ren %USBDRIVE%\$WIN_NT$.~BT WIN_NT.BT ren %USBDRIVE%\$WIN_NT$.~LS WIN_NT.LS exit
UndoRen.CMD
@echo off SET TAGFILE=\BOOTFILES FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h: ren %USBDRIVE%\txtsetup.bak txtsetup.sif ren %USBDRIVE%\WIN_NT.BT $WIN_NT$.~BT ren %USBDRIVE%\WIN_NT.LS $WIN_NT$.~LS exit
and place them in $WIN_NT$.~LS\i386
9. Copy TXTSETUP.SIF and SETUPLDR.BIN from \$WIN_NT$.~BT to root of USB stick and add the following lines to
TXTSETUP.SIF
Quote
.....
undoUSBWP.reg = 100,,,,,,_x,2,0,0
boot_ren.cmd = 100,,,,,,_x,2,0,0
undoren.cmd = 100,,,,,,_x,2,0,0
....
....
[HiveInfs.Fresh]
[HiveInfs.Upgrade]
--------
Install XP and leave stick plugged in until after the first logon screen.
Notes:
1. If you use an answer file when launching WINNT32.EXE make sure you delete the whole [Unattend] section in WINNT.SIF, otherwise you won't be able to use System Restore and SETUP will not prompt on which partition to install.
2. If you use BTS mass storage DP method 2 and repair install then include the following line in \$WIN_NT$.~LS\I386\PRESETUP.CMD
DEL /F %systemroot%\system32\setupold.exeor GUI Setup stops at start, complaining about fake setup being executed.
3. If during TEXT MODE your usb stick is listed first when SETUP searches for disks , above SATA/SCSI disks, disable in BIOS IDE channels including the ones with CDROM/DVD attached or disconnect them, this should fix the order. Do not continue install if stick is listed first, this will corrupt files and MBR on it.
------------------------------------
The problem described in post #156 turned out to be that the script launched by CMDLINES.TXT was being executed from within $WIN_NT$.~LS, giving "access denied" error, so I have tried to launch same script via WINNT.SIF [SetupParams] section which worked flawlessly. Wait at T-1 is about 1-2 seconds now, this also saved a few files and entries to be written
edit1 (15.Jun.07): Undo_Ren.cmd corrected to UndoRen.cmd
This post has been edited by ilko_t: 15 June 2007 - 02:57 PM



Help
This topic is locked
Back to top











