Chinaunix首页 | 论坛 | 博客
  • 博客访问: 7749
  • 博文数量: 2
  • 博客积分: 1410
  • 博客等级: 上尉
  • 技术积分: 35
  • 用 户 组: 普通用户
  • 注册时间: 2008-12-16 23:18
文章分类
文章存档

2008年(2)

我的朋友
最近访客

分类: WINDOWS

2008-12-24 23:15:30

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 (or any other software that allows direct editing of ISO files)
  • The Microsoft
  • A CD-burning software that can handle ISO files. I like the free

How To:

Summary:

We will dump the contents of your original Windows XP CD , extract a few files from the Image using ISO modification software, edit the files, and put the modified versions back on the ISO. The resulting ISO image is burnt back onto a CD media, and can then directly be used to install Windows on your USB drive.

I am also covering a few pitfalls that happened to me, in hope they will save you a bit of time.

 

1) Does your computer support booting from USB?

Usually, if its an option in your BIOS boot sequence menu, the answer to this is yes. If its not there, look for BIOS updates. If you are not sure, proceed and see what happens ;-)

2) Sorting out the "Bootability" of your USB-Drive

Connect your USB drive to your computer, directly, without a Hub. Then, shut down your computer, disconnect any other hard disk drives from it, and insert your original Windows XP CD into the drive. Start the installation, and proceed to the section where you are allowed to pick a hard drive. If it goes beyond the partition selection, your drive is already fine for booting Windows XP. If not (seems to be the cases with many of the Freecom USB HDDs for example), you will get an error like "Windows is unable to find your drive, partition, data etc bla". This is usually not a big problem. All you need to do is "properly" format the drive. Reboot into your normal Windows, and get , and use it to format your HDD completely. I chose NTFS format, worked fine everytime i tried. After this, my drives are recognized as valid installation devices by the Windows XP installer.
(In fact, i did not manage to create a USB primary partition with FAT32 that was recognized as being installable)

3) Dumping the original Windows CD into an ISO File

 

Pretty easy one. Simply open WinISO, and select Actions -> Make ISO from CDROM, and save your CD image.

 

4) Extracting the files we need to work on

 

After the CD dump is done, close and reopen WinISO. Then, open the ISO file you just created using File -> Open.
Now, click the I386 folder, and select the following files (Ctrl key to multi-select)

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

Select Actions -> Extract and put the resulting files into some folder to work on them.

5) Unpacking IN_ files

 

 

Use the Cab SDK (from the command line) for extracting the contents of the .IN_ files. Each of them contains exactly one .inf file. If you are unsure how to use the Cab SDK, here is an example command line: "cabarc x USBSTOR.IN_" . You should end up with three new files in the folder, called:

  • usb.inf
  • usbport.inf
  • usbstor.inf

You can now delete the .IN_ files.

6) Editing the files

This is the main job. i ll also try to explain a bit whats happening. Use a simple Texteditor like Notepad.

6-A) TXTSETUP.SIF
This file is loaded on the initial install step by the Windows XP CD installer. In this file, we will change the way Windows treats USB devices during system setup -- the default is to only treat them as input devices during installation -- we will change this to include mass storage driver support (which needs to be loaded into the installer much earlier in order to work).

First, move the following entries from [InputDevicesSupport.Load] to the [BootBusExtenders.Load] section , as shown here

 

[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

 

... now the same for [BootBusExtenders] and [InputDevicesSupport]

 

[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
阅读(1263) | 评论(0) | 转发(0) |
0

上一篇:Code Analysis

下一篇:没有了

给主人留下些什么吧!~~