Booting XP(E) to USB without any Bios support


D

Dietmar

Hi all,

I am just sitting on my Gericom Notebook Blockbuster 2440 XL, where normal
USB boot via its Bios does not work.
Now I am writing what I do, to succeed there with USB boot. Even if your
Bios supports booting from USB, this new method from s4e to fake the MBR
Signature will work there. It can also be used for firewire devices (or
any device with a MBR) and USB sticks. It works also, if your compi has
nothing heard in his long live about USB in his Bios, or has no USB
connection at all.
It should also work on a Mac.


Windows XP boots from USB

Author: Dietmar Stölting, 16. March 2008
(e-mail address removed)
Germany

Thanks to s4e, who told us his idea.

Tutorial (Version 7)

1.) Connect an USB harddisk to your working XP or install first a fresh XP
on your normal harddisk.
This XP has to stay on the first partition of the first harddisk.
If you have no USB at all, or all USB is disabled in Bios or only USB1.1,
insert an USBtoPCI slotcard.
The USB hardisk has to be connected to your XP, because the drivers for
the USBtoPCI slotcard and for the USB harddisk must be installed there.
Only one, and that must be the first partition, is allowed on the USB
harddisk.
Disable the pagefile.
Copy this XP to that USB harddisk. I use Partition Magic 8.
It can be Fat, Fat32, NTFS, doesnt matter.
Until now, dont change the filesystem.
I use here XP SP1 but it works also with XPSP2.

2.) Make the XP on the USB harddisk USB bootfriendly, use Tutorial 4 or 6,
or the very easy methode from
http://www.usboot.org/tiki-index.php, which allows also a pagefile on the
USB disk.

3.) Get the attached files mkimg.zip, vdk32-050406.zip, dsfok.zip,
gsar121.zip, mksparse.zip, mbrbatch002.zip, DumpHex-1.0.1.zip,
grub4dos-0.4.3-2008-03-14.zip, SetupImgBurn_2.4.0.0.exe, mkisofs.exe from
pebuilder3110a .
Unzip them all to the root folder C:\ of your working XP. All those files
are needed to build the Boot CD.

4.) Generating a virtual harddisk with a size of 50 MB:
Type at the commandline of your working XP C:\mkimg , name it otto, chose
50M size, 128/63 geometry, 07 for NTFS, and then /fsz for building a 50 MB
virtual harddisk, format it with j. Format it with XP to Fat32 or to NTFS.
IF XP dont like to do that, format it with Partition Magic 8, and once
more with XP to the wished filesystem.

5.) Copy now from your external USB bootfriendly harddisk the following
files to the 50MB virtual harddisk:

BOOT.INI with a content of

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="USB Windows"
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="all is ok until now"

NTDETECT.COM (best (?) is modified one)
NTLDR

WINDOWS\AppPatch\drvmain.sdb

WINDOWS\FONTS\vga850.fon
WINDOWS\FONTS\vgaoem.fon

WINDOWS\INF\biosinfo.inf

WINDOWS\system32\bootvid.dll
WINDOWS\system32\c_1250.nls (in germany instead c_1252.nls)
WINDOWS\system32\c_850.nls
WINDOWS\system32\hal.dll
WINDOWS\system32\kdcom.dll
WINDOWS\system32\l_intl.nls
WINDOWS\system32\ntkrnlpa.exe (only, if you use 2 or more processors)
WINDOWS\system32\ntoskrnl.exe
WINDOWS\system32\config\system
WINDOWS\system32\drivers\

6.) Make a Bit to Bit copy of your virtual 50 MB harddisk, with MBR and
partitionstable. I use therefor Winhex.
Name it XP.IMG (Case sensitive)

7.) Open in Winhex XP.IMG and the USB harddisk. Have a look at both of
their first 512 Byte (MBR).
Save those 512 bytes (MBR) each on your working XP as XPIMGMBR.dat and
USBHDMBR.dat.

Now comes the most critical procedure to fake the SIGNATURE and give both
MBR the same checksum.

Compare the first 512 Bytes of both MBR:
The only differences that are allowed at the moment, stay in 1B8, 1B9,
1BA, 1BB , this is the place of the SIGNATURE and 1C0, 1C1...to 1CF, the
size of each Harddisk.

Write the SIGNATURE of the external harddisk to the SIGNATURE of the
XP.IMG.
This means, to write the values in 1B8, 1B9, 1BA, 1BB of the harddisk to
the same place into MBR of XP.IMG.

Then write 1C0...1CF of the external harddisk to 1A0...1AF of the XP.IMG.


Then write 1C0...1CF of XP.IMG to 1A0...1AF to the external harddisk.

Compare once more the MBRs of XP.IMG and the USB harddisk.
There must now be correspondending differences in 1A0...1AF and
1C0...1CF.


8.) Open the commandline of the working XP and type there at C:\

mkdir iso_root
copy grldr iso_root
copy menu.lst iso_root
copy XP.IMG iso_root

9.) Go to C:\iso_root. There are now XP.IMG, menu.lst, and grldr.
Open menu.lst with the editor and delete all its content.

Put into menu.lst:

title Image chainloading USB
map --read-only /XP.IMG (hd0)
map --hook
root (hd0,0)
chainloader +1

10.) Go to commandline and type at C:\

mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso iso_root

This gives you in C:\ the file grldr.iso.

11.) Burn grldr.iso with SetupImgBurn to a CD.

12.) Shut your compi down and restart with that CD and the connected USB
harddisk to USB XP.

Dietmar

PS: Here is a pic of my USB booted Gericom Notebook Blockbuster 2440 XL ,
I chose Fat32, the normal Ide harddisk is disconnected in Bios. This
picture is with a USB to PCI slotcard, but normal USB works also.
So, believe me, Tutorial 7 works, thank you very much s4e.

PS: Please tell me, if you succeed or which part is unclear in the
Tutorial 7.
For experts: Only the XP.IMG has to be USBBOOT friendly, not the XP on the
USB harddisk.
 
Ad

Advertisements

S

Sean Liming \(MVP\)

With the USB boot 2.0 solution in XPe FP2007, XPe can boot from USB.

I don't understand, "If you have no USB at all, or all USB is disabled in
Bios or only USB1.1, insert an USBtoPCI slotcard." Basically, adding the
extra PCI card adds USB 2.0 boot support - correct? How does the BIOS get
changed to point to the USB flash disk?

This seems a like a long way to go to get XPe to boot from a USB flash disk.

--
Regards,

Sean Liming
www.sjjmicro.com / www.seanliming.com
Book Author - XP Embedded Advanced, XP Embedded Supplemental Toolkit
Dietmar said:
Hi all,

I am just sitting on my Gericom Notebook Blockbuster 2440 XL, where normal
USB boot via its Bios does not work.
Now I am writing what I do, to succeed there with USB boot. Even if your
Bios supports booting from USB, this new method from s4e to fake the MBR
Signature will work there. It can also be used for firewire devices (or
any device with a MBR) and USB sticks. It works also, if your compi has
nothing heard in his long live about USB in his Bios, or has no USB
connection at all.
It should also work on a Mac.


Windows XP boots from USB

Author: Dietmar Stölting, 16. March 2008
(e-mail address removed)
Germany

Thanks to s4e, who told us his idea.

Tutorial (Version 7)

1.) Connect an USB harddisk to your working XP or install first a fresh XP
on your normal harddisk.
This XP has to stay on the first partition of the first harddisk.
If you have no USB at all, or all USB is disabled in Bios or only USB1.1,
insert an USBtoPCI slotcard.
The USB hardisk has to be connected to your XP, because the drivers for
the USBtoPCI slotcard and for the USB harddisk must be installed there.
Only one, and that must be the first partition, is allowed on the USB
harddisk.
Disable the pagefile.
Copy this XP to that USB harddisk. I use Partition Magic 8.
It can be Fat, Fat32, NTFS, doesnt matter.
Until now, dont change the filesystem.
I use here XP SP1 but it works also with XPSP2.

2.) Make the XP on the USB harddisk USB bootfriendly, use Tutorial 4 or 6,
or the very easy methode from
http://www.usboot.org/tiki-index.php, which allows also a pagefile on the
USB disk.

3.) Get the attached files mkimg.zip, vdk32-050406.zip, dsfok.zip,
gsar121.zip, mksparse.zip, mbrbatch002.zip, DumpHex-1.0.1.zip,
grub4dos-0.4.3-2008-03-14.zip, SetupImgBurn_2.4.0.0.exe, mkisofs.exe from
pebuilder3110a .
Unzip them all to the root folder C:\ of your working XP. All those files
are needed to build the Boot CD.

4.) Generating a virtual harddisk with a size of 50 MB:
Type at the commandline of your working XP C:\mkimg , name it otto, chose
50M size, 128/63 geometry, 07 for NTFS, and then /fsz for building a 50 MB
virtual harddisk, format it with j. Format it with XP to Fat32 or to NTFS.
IF XP dont like to do that, format it with Partition Magic 8, and once
more with XP to the wished filesystem.

5.) Copy now from your external USB bootfriendly harddisk the following
files to the 50MB virtual harddisk:

BOOT.INI with a content of

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="USB Windows"
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="all is ok until now"

NTDETECT.COM (best (?) is modified one)
NTLDR

WINDOWS\AppPatch\drvmain.sdb

WINDOWS\FONTS\vga850.fon
WINDOWS\FONTS\vgaoem.fon

WINDOWS\INF\biosinfo.inf

WINDOWS\system32\bootvid.dll
WINDOWS\system32\c_1250.nls (in germany instead c_1252.nls)
WINDOWS\system32\c_850.nls
WINDOWS\system32\hal.dll
WINDOWS\system32\kdcom.dll
WINDOWS\system32\l_intl.nls
WINDOWS\system32\ntkrnlpa.exe (only, if you use 2 or more processors)
WINDOWS\system32\ntoskrnl.exe
WINDOWS\system32\config\system
WINDOWS\system32\drivers\

6.) Make a Bit to Bit copy of your virtual 50 MB harddisk, with MBR and
partitionstable. I use therefor Winhex.
Name it XP.IMG (Case sensitive)

7.) Open in Winhex XP.IMG and the USB harddisk. Have a look at both of
their first 512 Byte (MBR).
Save those 512 bytes (MBR) each on your working XP as XPIMGMBR.dat and
USBHDMBR.dat.

Now comes the most critical procedure to fake the SIGNATURE and give both
MBR the same checksum.

Compare the first 512 Bytes of both MBR:
The only differences that are allowed at the moment, stay in 1B8, 1B9,
1BA, 1BB , this is the place of the SIGNATURE and 1C0, 1C1...to 1CF, the
size of each Harddisk.

Write the SIGNATURE of the external harddisk to the SIGNATURE of the
XP.IMG.
This means, to write the values in 1B8, 1B9, 1BA, 1BB of the harddisk to
the same place into MBR of XP.IMG.

Then write 1C0...1CF of the external harddisk to 1A0...1AF of the XP.IMG.


Then write 1C0...1CF of XP.IMG to 1A0...1AF to the external harddisk.

Compare once more the MBRs of XP.IMG and the USB harddisk.
There must now be correspondending differences in 1A0...1AF and
1C0...1CF.


8.) Open the commandline of the working XP and type there at C:\

mkdir iso_root
copy grldr iso_root
copy menu.lst iso_root
copy XP.IMG iso_root

9.) Go to C:\iso_root. There are now XP.IMG, menu.lst, and grldr.
Open menu.lst with the editor and delete all its content.

Put into menu.lst:

title Image chainloading USB
map --read-only /XP.IMG (hd0)
map --hook
root (hd0,0)
chainloader +1

10.) Go to commandline and type at C:\

mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso iso_root

This gives you in C:\ the file grldr.iso.

11.) Burn grldr.iso with SetupImgBurn to a CD.

12.) Shut your compi down and restart with that CD and the connected USB
harddisk to USB XP.

Dietmar

PS: Here is a pic of my USB booted Gericom Notebook Blockbuster 2440 XL ,
I chose Fat32, the normal Ide harddisk is disconnected in Bios. This
picture is with a USB to PCI slotcard, but normal USB works also.
So, believe me, Tutorial 7 works, thank you very much s4e.

PS: Please tell me, if you succeed or which part is unclear in the
Tutorial 7.
For experts: Only the XP.IMG has to be USBBOOT friendly, not the XP on the
USB harddisk.
 
Ad

Advertisements

D

Dietmar

Hi Sean,
at the moment it looks quite complicate. But this can be automated.
And it also works for boot from firewire or any other device with an MBR.
This is the first time, that XP USB boot was enabled with no BIOS USB
support at all.
And this is much faster than booting through the Bios, because it always
uses the Microsoft USB 2.0 stack, and no USB 1.1 is to be seen, as most Bios
do,

nice to hear from you
Dietmar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top