[翻譯] 從USB裝置上安裝及啟動Windows XP

wongin

穿丁字褲的橘子
已加入
4/17/05
訊息
787
互動分數
0
點數
0
年齡
42
網站
造訪網站
昨天看到 "意外的驚喜!winxp安裝在usb hdd!!"這篇文
http://forum.coolaler.com/showthread.php?t=135573

一時心血來潮就把原文翻譯了一下(翻譯得不好不要打我喔,錯誤的地方懇請各位糾正);em03;

原文
http://www.ngine.de/index.jsp?pageid=4176

翻譯

簡介 - 從USB裝置上安裝及啟動Windows XP

關於

微軟曾聲明Windows無法在USB裝置上啟動運行。

參閱下文

問:若設定USB儲存裝置為主要(及唯一)的,那USB儲存裝置能否作儲存媒介呢?
答:不能,在一般的系統是無法以USB儲存裝置作為主要(及唯一)的硬碟裝置

節錄自微軟新閒組

Windows是無法由USB裝置上啟動。如果你的電腦支援USB裝置啟動,你便能通過boot loader由USB裝置上啟動Windows XP。

Anyway, the web is full of those. I was wondering about the same thing, as i did not want to put a Windows partition on my Linux.based work laptop, and thought it was a good idea to run Windows XP off a USB Hard drive that i just plug in when i need it, and boot from it. To put a long story short, this is exactly what i do now, thanks to the fantastic research of the people credited below. However, it took me significant time to figure out all the painful little problems, and i was not fully happy with the current official guide by Dietmar (no pun, he was the first to make ANYthing public). I wanted an easy guide that allows creating a modified version of the Windows XP CD, for painless and transparent installation to as many systems as you want.

此網站均討論Windows的問題。因為我本身使用Linux,不想把一部分作Windows之用,故想到通過USB硬硬來運行Windows XP,當我需要使用時才連接。(以下略;em28; )

This page is the result of my work. Have fun!

Credits

...must go to the people that made this guide possible in the first place. In recent months, a few blokes going by the handles of mkiaer, Dietmar and sisal and a few others from the 911.net forums came up with many good pieces of research on how to enable any NT-based Windows to boot from a USB-drive. Little of this guide would exist without them - in fact the only reason why i write this up is that my particular solution seems to be lower effort than any of the steps i saw before. Many of the steps here are the result of their research.

Version History:

* v1.0 - 3rd Mar 2006
rewritten, tested and working against two different drives with my laptop.
* v0.9 - 29th Feb 2006
initial version, untested

What works?

Basically, everything as far as i can see. After completing this tutorial, your Windows XP install should directly boot off your USB-drive, and be fully upgradable, DirectX games will run, all apps i tested work like normal, speed is the same as with a real HDD (you need USB2 though) - so it is in fact a fine solution as far as i can see.

Disclaimer

This is a hobby project of mine. I will not assume ANY responsibility for the correctness of this guide, nor can I be made liable for any errors, hardware or software problems / loss that are caused by following this guide. Basically, if things screw up, its your own fault. Do not follow the guide if you fear data loss.

Requirements

* An existing Windows install for carrying out the steps in this tutorial
* A USB2-compliant Hard disk drive (or a big USB2 stick, see remarks below)
* An original Windows XP CD (tested only against SP1 so far, but reported to work on other versions)
* A registered version of WinISO (or any other software that allows direct editing of ISO files)
* The Microsoft CAB SDK
* A CD-burning software that can handle ISO files. I like the free burnatonce
 
最後編輯:

wongin

穿丁字褲的橘子
已加入
4/17/05
訊息
787
互動分數
0
點數
0
年齡
42
網站
造訪網站
步驟:

摘要:

先把原版Windows XP光碟轉存成映像檔,再使用修改映像檔的軟件抽出數個檔案,並修改這些檔案,再把修改後的檔案放回映像檔。把修改過的映像檔燒錄成光碟,就可以把Windows安裝在USB裝置。

以下會告訴大家一些易犯的錯誤,希望可以幫助大家不會浪費時間。

1) 你的電腦是否支援USB啟動?
一般來說,只要主機板的BIOS有支援USB啟動的選項,就能支援USB啟動。如果沒有此選項,可嘗試更新BIOS。如果你不確定你的電腦是否支援USB啟動,亦不妨試試看;-)

2) 使用支援USB啟動的USB裝置
把USB裝置連接你的電腦(請不要通過Hub連接)。接著關閉你的電腦,拔除所有接拔在主機板的硬碟裝置,插入原版Windows XP光碟。開始安裝程序,執行到選擇安裝位置的步驟。如果通過分割選項的步驟,即表示你的裝置能成功運作。若否(),你會收到”Windows找不到硬體”。通常這不是大問題。你只需要正確的格式化你的裝置。去下載HP tool,用它來完整地格式化你的硬碟。NTFS格式亦能正常運作。完成後,Windows XP installer就能識別出裝置。(事實上我沒有嘗試FAT32格式)

3) 把原版Windows光碟轉存成ISO檔
非常簡單。執行WinISO,選擇Actions -> Make ISO from CDROM,儲存成映像光碟。

4) 抽出需要修改的檔案
轉存成映像檔後,重開WinISO。打開ISO檔 File -> Open

找出I386資料夾,並選擇以下檔案

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

選擇Actions -> Extract,把選擇的檔案暫存任一資料夾

5) 打開 .IN_ 的檔案
使用Cab SDK來頡取 .IN_。.IN_ 檔的內容是相同於 .inf 檔。若不會使用Cab SDK,參考此指令:"cabarc x USBSTOR.IN_"。結束程式並儲存檔案。

* usb.inf
* usbport.inf
* usbstor.inf

刪除 .IN_的檔案
 
最後編輯:

wongin

穿丁字褲的橘子
已加入
4/17/05
訊息
787
互動分數
0
點數
0
年齡
42
網站
造訪網站
6) 編輯檔案
這裡是重點。我會詳細解釋接下來的步驟。打開記事本。

6-A) TXTSETUP.SIF
這個檔案是用來載入Windows XP CD installer最開始的安裝步驟。我們可以通過修過這個檔案以達到在Windows安裝時能辨識到USB裝置-在執行安裝時作預設輸入裝置-我們就是要修改其對儲存裝置的支援(儲存裝置是用來預先載入安裝程式)

第一步,移動以下的項來,由[InputDevicesSupport.Load] (粗體項目) 移到[BootBusExtenders.Load],如下

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



[InputDevicesSupport.Load]
usbehci = usbehci.sys
usbohci = usbohci.sys
usbuhci = usbuhci.sys
usbhub = usbhub.sys

usbccgp = usbccgp.sys
hidusb = hidusb.sys
serial = serial.sys
serenum = serenum.sys
usbstor = usbstor.sys

跟先前的修改一樣,由[InputDevicesSupport] (粗體項目) 移動到[BootBusExtenders]

[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
usbohci = "Open Hostcontroller",files.usbohci,usbohci
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub
usbstor = "USB-Speicherklassentreiber",files.usbstor,usbstor



[InputDevicesSupport]
usbehci = "Erweiterter Hostcontroller",files.usbehci,usbehci
usbohci = "Open Hostcontroller",files.usbohci,usbohci
usbuhci = "Universeller Hostcontroller",files.usbuhci,usbuhci
usbhub = "Standard-USB-Hubtreiber",files.usbhub,usbhub

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
usbccgp = "USB Generic Parent Driver",files.usbccgp,usbccgp

第二步,我們需要寫入幾個指令入登錄檔。非常簡單,只需輸入AddReg = usbboot.inf,usbservices於[HiveInfs.Fresh] 及usbboot.inf = 1,,,,,,_x,3,,3於[SourceDisksFiles]:
[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

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

最後,儲存及關閉TXTSETUP.SIF。

再打開DOSNET.INF,在第二個[Files]區插入d1,usbboot.inf (若使用非原版Windows XP光碟可能沒有第二個[Files]區)
[Files]
d1,usbboot.inf
d1,_default.pif
d1,12520437.cpx
d1,12520850.cpx
....
6-C) usb.inf
修改在[StandardHub.AddService]和[CommonClassParent.AddService]區粗體的地方

[StandardHub.AddService]
DisplayName = %StandardHub.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

[CommonClassParent.AddService]
DisplayName = %GenericParent.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbccgp.sys
LoadOrderGroup = Boot Bus Extender

6-D) usbport.inf
修改在[EHCI.AddService], [OHCI.AddService] , [UHCI.AddService]和[ROOTHUB.AddService]區粗體的地方

[EHCI.AddService]
DisplayName = %EHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbehci.sys
LoadOrderGroup = Boot Bus Extender

[OHCI.AddService]
DisplayName = %OHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbohci.sys
LoadOrderGroup = Boot Bus Extender

[UHCI.AddService]
DisplayName = %UHCIMP.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbuhci.sys
LoadOrderGroup = Boot Bus Extender

[ROOTHUB.AddService]
DisplayName = %ROOTHUB.SvcDesc%
ServiceType = 1 ; SERVICE_KERNEL_DRIVER
StartType = 0 ; SERVICE_DEMAND_START
ErrorControl = 1 ; SERVICE_ERROR_NORMAL
ServiceBinary = %12%\usbhub.sys
LoadOrderGroup = Boot Bus Extender

6-E) usbstor.inf
修改或新增在[USBSTOR.AddService]區粗體的地方

[USBSTOR.AddService]
DisplayName = %USBSTOR.SvcDesc%
ServiceType = 1
StartType = 0
Tag = 3

ErrorControl = 1
ServiceBinary = %12%\USBSTOR.SYS
LoadOrderGroup = Boot Bus Extender

6-F) 在資料夾內新增一叫USBBOOT.INF的檔案,並複制以下內容:

[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.SYS"
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.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbehci","Type",0x00010001,1

HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","DisplayName",0x00000000,"USB2 Enabled Hub"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ErrorControl",0x00010001,1
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Group",0x00000000,"System Reserved"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","ImagePath",0x00020000,"system32\DRIVERS\usbhub.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbhub","Type",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.sys"
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.sys"
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Start",0x00010001,0
HKLM,"SYSTEM\CurrentControlSet\Services\usbohci","Type",0x00010001,1

7) 把.inf檔的副檔名改回 .IN_
即使你沒有刪除本身的 .IN_檔亦無妨,只需覆蓋他們便可。打開DOS shell,執行以下指示:

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

以上3個 . IN_檔就會出現。

恭喜!所有修改完成。

8) 插入已修改的檔案回ISO檔
使用WinISO打開Windows映像檔。從映像檔中刪除I386資料夾內以下的檔案並儲存:
• DOSNET.INF
• TXTSETUP.SIF
• USB.IN_
• USBPORT.IN_
• USBSTOR.IN_

確認修改過的檔案已放入Windows映像檔內,重啟Windows映像檔。在I386資料夾內新增以下已修改的檔案
• USBBOOT.INF
• DOSNET.INF
• TXTSETUP.SIF
• USB.IN_
• USBPORT.IN_
• USBSTOR.IN_

儲存Windows映像檔。

9) 把修改後的Windows映像檔燒錄成光碟
使用任何燒錄程式。我個人使用免費又簡易操作的Burnatonce

10) 安裝Windows XP
關閉電腦。拔除所有硬碟裝置(令安裝程式無法找尋到硬碟裝置以免擾亂Master Boot記錄)。沒有安裝硬碟會使有些電腦出現啟動問題,檢查BIOS,並移除使用HDD作第一啟動並設定USB儲存裝置作第一啟動裝置,光驅為第二啟動裝置。

連接USB儲存裝置,勿通過Hubs連接

此時Windows應該能順利安裝。

在安裝時將會出現:
.安裝中,會出現提示,會出現USB裝置"not certified"(未認證)-這是正常。只需按"yes"便可。
.完成安裝後,在系統第一次啟動時會出現pagefile不存在的警告。只需忽略便可,Windows會繼續運作。有些人找尋解決的辦法,但大家可以忽略之。

經過Windows完整的啟動及運作後,可以關閉電腦及連接之前拔除的裝置。

以下為測試成功的硬體裝置-若各下亦能成功完成,懇請把你的資訊告訴我email me,而我亦會把你的裝置加到以下的清單列:

• Dell Latitude D810, Freecom FHD-3 80GB USB2 HDD, NTFS formatted using HP tool
• Dell Latitude D810, Western Digital 2206A 80GB USB2 HDD, NTFS formatted using HP tool

若有任何疑問,請瀏覽forum一起討論。

have a lot of fun!

Emanuel Schleussinger
http://www.ngine.de
Mar 2006
 

wongin

穿丁字褲的橘子
已加入
4/17/05
訊息
787
互動分數
0
點數
0
年齡
42
網站
造訪網站
本來想把步驟放在一篇內
但因超過了20分鐘修改的時限
所以才把步驟分成2篇
希望這篇文能對大家有幫助
 

ttyy711111

進階會員
已加入
11/21/05
訊息
204
互動分數
0
點數
16
年齡
42
@@...
之前有試著在usb硬碟安裝xp
但是總是不成功= =a
原來是少了那麼多的程序...
 

black-sky

進階會員
已加入
4/8/05
訊息
222
互動分數
0
點數
16
這邊真的精華啦 小弟也來試看看啦~
謝謝您的分享啦~
 

zhionly1130

一般般會員
已加入
8/28/05
訊息
189
互動分數
0
點數
0
年齡
39
好像很方便說....
小弟先收下囉......
以後有機會再來試試看......
感謝大大的分享喔......
 

Toppc

榮譽會員
已加入
12/19/04
訊息
11,405
互動分數
231
點數
63
讚~~好文幫推.可惜沒有GP..不然就給你一個 ^^

(幫你投票為五顆星 ^^ )
 
最後編輯:

oo777oo

初級會員
已加入
9/25/06
訊息
14
互動分數
0
點數
0
步驟:

5) 打開 .IN_ 的檔案
使用Cab SDK來頡取 .IN_。.IN_ 檔的內容是相同於 .inf 檔。若不會使用Cab SDK,參考此指令:"cabarc x USBSTOR.IN_"。結束程式並儲存檔案。

* usb.inf
* usbport.inf
* usbstor.inf

刪除 .IN_的檔案

參考此指令:"cabarc x USBSTOR.IN_"。結束程式並儲存檔案
這行是什麼意思?執行cabarc檔嗎?可是一開啟它執行完就強制關閉了
指令要從哪邊打?
 

wongin

穿丁字褲的橘子
已加入
4/17/05
訊息
787
互動分數
0
點數
0
年齡
42
網站
造訪網站
參考此指令:"cabarc x USBSTOR.IN_"。結束程式並儲存檔案
這行是什麼意思?執行cabarc檔嗎?可是一開啟它執行完就強制關閉了
指令要從哪邊打?

img.php


1. 先下載cabsdk.exe並解壓
2. 裡面有bin資料夾, 把以上提及的檔案(.IN_)放在該資料夾內
3. 在命令提示字元輸入cabarc x USBSTOR.IN_
4. USBSTOR.IN_ ==> usbstor.inf
 
最後編輯:
▌延伸閱讀