May 24, 2008

[Tutorial] How to Run Windows XP SP 2 from Flashdisk

Abstract
This tutorial just share how to run operating system Windows XP SP 2 direct from flash disk,
including how to operating office application, multimedia, internet browser, and reparation system error.

Microsoft said if booting from USB drive can't do that.
Flashdisk it is same function like media storage, ex: saving some document, .mp3, or .3gp

"USB-based mass storage devices cannot be the primary hard disk storage solution on a regular system..."
Code:
http://www.microsoft.com/whdc/device/storage/usbfaq.mspx
"Windows cannot boot from an USB drive. If your computer supports booting from such device,
you can load a boot loader to the USB device which starts Windows XP from the HDD."
Code:
http://groups.google.de/group/microsoft.public.windowsxp.basics/browse_thread/thread/5a5882d3391081b3/
But thats fact it is not true. So this tutorial i will wrote that ;p

----------------------------------------------------
Step 1: Are your computer can booting from USB?
----------------------------------------------------
How to know if your computer can booting from USB, ATTENTION from this ways:
1. Open from Setup BIOS => "Advanced BIOS Settings", usually has some choice "boot sequence menu" or another choice with same like that. Every one BIOS in motherboard has some different menu. You can reading from guide book from your motherboard from first time you buy it.
2. If your BIOS still not support, please update BIOS. Usually, from new motherboard usually support this feature "boot from USB".

-----------------------------------------------------
Step 2: Try connceting and booting that USB
-----------------------------------------------------
Do this test, are your computer can booting from USB:
1. Format flashdisk from Windows, with NTFS/FAT32 format
You can using tool HPFormatTool which is can format flashdisk fromi Start Menu.
3. Shutdown computer.
4. Relating USB drive without HUB. Put in flash disk direct from CPU, without using firewall cable or anoter cable.
5. Disconnect hardisk (Disconnect IDE/SATA and power from motherboard)
6. Now turn on your computer
7. Setup BIOS and try booting from USB Drive. If BIOS doesn't success found drive with AutoDetect, it is no problem. The important once is BIOS can booting from USB Drive.
8. Shutdown computer, connect againt hardisk like first time, and disconnect flashdisk from CPU
9. Restart computer

------------------------------------------------
Step 3: Dumping CD Windows XP SP 2 to be .ISO
------------------------------------------------
Open UltraISO > Create .ISO from CD Windows XP SP 2 > Save > giving name "WinUSBDrive.ISO"

---------------------
Step 4: Extract File
---------------------
1. Open file "WinUSBDrive.ISO" after you creating that file, using UltraISO
2. open folder \i386
3. Extract that files to %desktop% (To make you easy to find it)

TXTSETUP.SIF
DOSNET.INF
USB.IN_
USBPORT.IN_
USBSTOR.IN_

----------------------------------
Step 5 : Unpacking Files *.IN_
----------------------------------
1. Using CAB SDK (Cabinet SourceDevelopmentKit) from command-line (cmd.exe) to exstract content files .IN_ which is every file only has one file .INF
2. Copy file CAB SDK to desktop
3. Start > Run > write: cmd.exe /k cd desktop > OK/Enter
Command prompt will show you this:

C:\Documents and Settings\%username%\Desktop\>_

4. Write:

cabarc x USB.IN_
cabarc x USBPORT.IN_
cabarc x USBSTOR.IN_

you will get this file:

usb.inf
usbport.inf
usbstor.inf

5. Delete files *.IN_ in %desktop% but don't delete file TXTSETUP.SIF
6. Don't closing Command Prompt
---------------------
Step 6: Editing File
---------------------

For editing files code/text with Notepad:

1. Open File Notepad.
2. Drag-drop file which is will be edit to Notepad.
3. After finish, closed Notepad. If has confirmation to saving file, choose YES

Next, it is important ways to do, for Windows XP SP 2 can installing in flashdisk

-----------------------------------------------
6-A)--- TXTSETUP.SIF
-----------------------------------------------

This file must LOAD from first time instalation from CD Installer Windows XP SP 2.
Usually USB devices only regards "input device" during instalation.
I usually change it and add some supporting saving media driver in first time instalation.

Do it editing in file TXTSETUP.SIF Like this:

Attention from some places which is must add and another place must deleting.
Place which is giving sign ";insert this line" meaning, must giving additional which is before in original file is didn't has.
Place which is giving sign ";delete this line" meaning, that place must deleting
Place which is giving sign ";add/change like this line" meaning, must changed like this

[BootBusExtenders.Load]
pci = pci.sys
acpi = acpi.sys
isapnp = isapnp.sys
acpiec = acpiec.sys
ohci1394 = ohci1394.sys
usbehci = usbehci.sys ;insert this line
usbohci = usbohci.sys ;insert this line
usbuhci = usbuhci.sys ;insert this line
usbhub = usbhub.sys ;insert this line
usbstor = usbstor.sys ;insert this line

[InputDevicesSupport.Load]
usbehci = usbehci.sys ;delete this line

usbohci = usbohci.sys ;delete this line
usbuhci = usbuhci.sys ;delete this line
usbhub = usbhub.sys ;delete this line
usbccgp = usbccgp.sys
hidusb = hidusb.sys
serial = serial.sys
serenum = serenum.sys
usbstor = usbstor.sys ;delete this line

[BootBusExtenders]
pci = "PCI-Bustreiber",files.pci,pci
acpi = "ACPI Plug & Play-Bustreiber",files.acpi,acpi
isapnp = "ISA Plug & Play-Bustreiber",files.isapnp,isapnp
acpiec = "Integrierter ACPI-Controllertreiber",files.none,acpiec
ohci1394 = "IEEE-1394-Bus-OHCI-konformer Anschlusstreiber",files.ohci1394,ohci1394
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci ;insert this line
usbohci = "Open Hostcontroller",files.usbohci,usbohci ;insert this line
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci ;insert this line
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub ;insert this line
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor ;insert this line

[InputDevicesSupport]
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci ;delete this line
usbohci = "Open Hostcontroller",files.usbohci,usbohci ;delete this line
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci ;delete this line
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub ;delete this line
hidusb = "HID-Parser",files.hidusb,hidusb
serial = "Treiber f?r seriellen Anschluss",files.none,serial
serenum = "Enumerator f?r seriellen Anschluss",files.none,serenum
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor ;delete this line
usbccgp = "USB Generic Parent Driver",files.usbccgp,usbccgp

Some key Registry Must giving additional and (again and again Microsoft giving opportunity to creating piracy with permitted every people) to modification this command in file TXTSETUP.SIF

[HiveInfs.Fresh]
AddReg = hivedef.inf,AddReg
AddReg = hivesys.inf,AddReg
AddReg = hivesft.inf,AddReg
AddReg = hivecls.inf,AddReg
AddReg = hiveusd.inf,AddReg
AddReg = dmreg.inf,DM.AddReg
AddReg = usbboot.inf,usbservices ;insert this line

[SourceDisksFiles]
usbboot.inf = 1,,,,,,_x,3,,3 ;insert this line
bootvid.dll = 1,,,,,,3_,2,0,0,,1,2
kdcom.dll = 1,,,,,,3_,2,0,0,,1,2

Save and Close file "TXTSETUP.SIF"

-------------------------------------------------
6-B)--- DOSNET.INF
-------------------------------------------------

Open file DOSNET.INF and than do some editing like this:

[Files]
d1,usbboot.inf ;insert this line
d1,_default.pif
d1,12520437.cpx
d1,12520850.cpx

... and so on, let go on

Save and Close file "DOSNET.INF"

---------------------------------------------------
6-C)--- usb.inf
---------------------------------------------------

Do some changing in this section [StandardHub.AddService] and [CommonClassParent.AddService]

[StandardHub.AddService]
DisplayName = %StandardHub.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START ;StartType diganti menjadi StartType = 0
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender ;add/change like this line

[CommonClassParent.AddService]
DisplayName = %GenericParent.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START ;StartType diganti menjadi StartType = 0
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbccgp.sys
LoadOrderGroup = Boot Bus Extender ;add/change like this line

Save and Close file "usb.inf"

-------------------------------------------------
6-E)--- usbstor.inf
-------------------------------------------------

Do some editing in this section [USBSTOR.AddService]

[USBSTOR.AddService]
DisplayName = %USBSTOR.SvcDesc%
ServiceType = 1
StartType = 0 ;add/change like this line
Tag = 3 ;add/change like this line
ErrorControl = 1
ServiceBinary = %12%\USBSTOR.SYS
LoadOrderGroup = Boot Bus Extender ;add/change like this line

Save and Close file "usbstor.inf"

----------------------------------------------------------------
6-F)--- Create file USBBOOT.INF
----------------------------------------------------------------

Create file with name "USBBOOT.INF" at %desktop%

[usbservices]

HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR"," DisplayName",0x00000000,"USB Mass Storage Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR"," ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR"," Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR"," ImagePath",0x00020000,"system32\DRIVERS\USBSTOR.SY S"
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR"," Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\USBSTOR"," Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbehci"," DisplayName",0x00000000,"USB 2.0 Enhanced Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci"," ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci"," Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci"," ImagePath",0x00020000,"system32\DRIVERS\usbehci.sy s"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci"," Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci"," Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","D isplayName",0x00000000,"USB2 Enabled Hub"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","E rrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","G roup",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","I magePath",0x00020000,"system32\DRIVERS\usbhub.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","S tart",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","T ype",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci"," DisplayName",0x00000000,"Microsoft USB Universal Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci"," ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci"," Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci"," ImagePath",0x00020000,"system32\DRIVERS\usbuhci.sy s"
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci"," Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbuhci"," Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbohci"," DisplayName",0x00000000,"Microsoft USB Open Host Controller Miniport Driver"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci"," ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci"," Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci"," ImagePath",0x00020000,"system32\DRIVERS\usbohci.sy s"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci"," Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci"," Type",0x00010001,1

Save and Close file "USBBOOT.INF"

-----------------------------------------------------
Step 7: Packing File which is get editing to Format IN_
-----------------------------------------------------
Open Command Prompt again
C:\Documents and Settings\%username%\Desktop\>_

Write:

cabarc n USB.IN_ usb.inf
cabarc n USBPORT.IN_ usbport.inf
cabarc n USBSTOR.IN_ usbstor.inf

Files IN_ will be one packet based on files INF which is your editing before.

------------------------------------------------------------------
Step 8: Injeksion Files IN_ from Desktop to "WinUSBDrive.ISO"
------------------------------------------------------------------

Open UltraISO and make sure (still) opening file "WinUSBDrive.ISO"

open folder \i386 from "WinUSBDrive.ISO"

deleting this files:

DOSNET.INF
TXTSETUP.SIF
USB.IN_
USBPORT.IN_
USBSTOR.IN_

Save file "WinUSBDrive.ISO"

Drag-drop files which is you edited in %desktop% to "WinUSBDrive.ISO" from folder \i386

USBBOOT.INF
DOSNET.INF
TXTSETUP.SIF
USB.IN_
USBPORT.IN_
USBSTOR.IN_

Save file "WinUSBDrive.ISO"

---------------------------------------
Step 9: Burning "WinUSBDrive.ISO" to CD
---------------------------------------
Only burning using Nero or burnatonce with slow speed.

----------------------------------------
Step 10: Install Windows XP SP 2 from CD
----------------------------------------
1. Shut down computer.
2. Disconnect hardisk internal or external
3. regulate BIOS for to be USB Drive for "first boot device"
4. Plug in USB drive without HUB (without cable, direct from flashdisk to CPU)
5. Restart
Windows usually will be showing message error:
1. "Driver not certified" <-- choose YES.
This is usually because files in CD instalation get changing
2. "PageFile not found"
6. Install.

----------------------------
Step 11: Try This Everywhere
----------------------------
After finish, shutdown your computer. plug in again USB drive. try in your home or office. He....

Postscript:
-----------
Now you can used that Flashdisk to be operating system Windows XP SP 2.
Eventhough not all motherboard can support "booting from USB Drive", but this flashdisk can run in Pentium 4.
Of course you are understand why flashdisk can make run Windows XP SP 2 and it is very helpful.
You can solving "system errors" which is usually can get it, like:
1. Password login can't open
2. Virus entered in %SystemDrive% and must cleaned
3. Want copying file from hardisk but system error
4. or want deleting file and make Windows in hardisk and can't booting, or want injection virus, or want put it some file without knowing the owner. he.... LOL
5. Want surfing in Internet without can get virus or trojan. because, if we get it, we can format hardisk and "refill" flashdisk with wrote "WinUSBDrive.ISO" to flashdisk (usually in 10 menit).

No comments: