How to boot/install from USB key ?

486 posts in this topic

Greetings. I feel I'm verrrrrrrrrrry close on this one, but that may be naive confidence. I believe I've reduced it down to an issue of pointing the right part of the setup to the location of the setup files on my USB key. Forgive me if I'm actually way off.

I'm using WinXP slipstreamed with SP2 and most of the subsequent hotfixes with the command script found at http://smithii.com/node/12. My flash drive is a Lexar Firefly 2GB.

Steps taken:

1. Run the smithii command script and build the slipstreamed installation and burn to a CD

The stick boots, Windows Executive and the drivers load, and I make it all the way to the "Press Enter to install/press R to repair" screen. When I press Enter, I am prompted to "Insert Windows XP Professional Service Pack 2 CD". It doesn't see the setup files on the stick.

Troubleshooting:

I've tried modifying the TXTSETUP.INF file in both the \minint directory that PeToUSB creates (its the I386 files from the setup CD) as well as the one in \$WIN_NT$.~BT to point the SETUPSOURCEPATH to \minint. Same result, asks for the CD.

I've also tried hex editing the SETUPLDR.BIN file in both \minnit and \$WIN_NT$.~BT to replace i386 strings with minint. Asks for the CD.

Conversely I've tried editing the two SETUPLDR.BIN files to replace instances of minnit with I386, and renamed the minint directory to I386. Got a message that TXTSETUP.SIF was missing or corrupted, so obviously the boot sector created by PeToUSB wants that file (or chain via SETUPLDR.BIN) to be in the \minint directory.

The first time I tried all of this I forgot to delete the 3 files in step 5. Instead of asking for the SP2 CD, I got an error message that installation files were not found where setup thought they had been copied, so one of these files must point to where a continued installation would expect to find them after reboot.

Next Step(s)?:

How can I correct the problem of setup asking for the SP2 CD and not knowing that the setup files are on the USB stick in the \minint directory?

I am considering not deleting the 3 files in step 5, and instead copying the C:\$WIN_NT$.~LS directory created by the setup in step 3 to the USB stick. Perhaps it will then consider this a continued installation and find the setup files.

Thanks to FlyAKite and gosh at http://flyakite.msfn.org/ for this part. Once all of the installation files have been copied. the installation will simply stop without a reboot. You will now have two new hidden directories on your PC, C:\$WIN_NT$.~BT and C:\$WIN_NT$.~LS . If you can't see them, go to Tools->Folder Options->View in Windows Explorer and choose to show hidden and operating systems files.

3. Once the installation has finished, delete C:\boot.ini and rename C:\boot.bak to C:\boot.ini

Point Source Path to your installation source (for me it was my CD drive, E:\) then

Click Start, Yes, Yes to run PeToUSB.

5. When PeToUSB is finished, delete everything off of the USB stick EXCEPT

NTLDR

NTDETECT.COM

WIN51

WIN51IP

WIN51IP.SP2

Your WIN files may vary depending upon the service pack level of your install source.

Yes, even delete the \minint directory. All we really obtained from this build is NTLDR, this is where someone smarter than I could simplify the process and save some time if they could help obtain a proper NTLDR another way.

We're hanging on to these files for now in case there are any problems, but we need to change the names. Otherwise when running from your USB stick you may actually be copying the setup files off of your hard disk instead of the stick. I found this out when one time I pulled out my stick during installation - and it kept running!

11. Try it! It if works, delete the two directories in step 10 to clean up.

Hope this works for you, please give it a shot. Any suggestions and improvements are more than welcome, I could really use help with the NTLDR issue so that the time-consuming PE build would not be needed. I'll be glad to answer any questions I can, but like I said, this was a blind squirrel/acorn "hit and miss" for me!

3. Copy directories C:\$WIN_NT$.~BT and C:\$WIN_NT$.~LS to the USB drive (takes a while)

4. Copy the following from C:\$WIN_NT$.~BT to the USB root \

TXTSETUP.SIF

NTDETECT.COM

SETUPLDR.BIN

5. Rename SETUPLDR.BIN on the USB root to NTLDR

6. Delete WINNT.SIF from \$WIN_NT$.~BT on the US drive

This last step is not necessary but otherwise the product ID and other info you provide in step 1 will always be used.

Very simple. The problem: does not work if you delete \$WIN_NT$.~BT\migrate.inf, and instead prompts for the install CD, even if the WIN51.IP tag files are placed on the USB drive.

migrate.inf is created in step 1 and seems to contain an enumeration of the mounted devices that setup sees when it is ran. My concern is that this then ties the installation to a specific hardware configuration and will not work on other machines. It works fine for re-installing from USB upon the machine for which migrate.inf was created.

How can this dependency be removed such that migrate.inf is either not needed, or is generic for all situations (not likely)? Thanks for the help!

I think I'll try simply formatting, copying the CD to the stick and perform steps 4 and 5. This takes out creation of and need for the migrate file.

Excellent references. Currently all new info to me and over my head, but I plan to go back and look at these in more detail.

It seems like a directive "oempreinstall=yes" in the answer file will avoid the creation of migrate.inf, but actually, as I see it, a form of "migrate.inf" might be necessary to provide for "correct" drive lettering on the installed system.

You may be right about the migrate.inf. It seems that to boot the CD installation, you must either use the original NTLDR or SETUPLDR.BIN renamed to NTLDR, since the boot sector is looking for NTLDR.

The problem with the original NTLDR is that it wants an associated boot.ini that points to where the boot should continue. When booting to an NTFS file system, the ARC naming convention must be used, e.g. multi(0)disk(0)rdisk(0)partition(1). When booting to a DOS boot sector, the drive letter can be used, e.g. C:\BOOTSECT.DOS="Win98". I do not know how to reference a USB stick for either of these scenarios or if it is possible, since you won't know what drive letter the target machine will assign to the USB stick at boot time (I am sure this can be controlled somehow).

This leaves the SETUPLDR solution, which seems to assume that you have already performed stage 1 of a setup, and have created an info store (migrate.inf) that will tell the setup how to continue.

The oempreinstall switch seems to be for unattended operations, and goes in a file called unattend.txt which I don't have since I'm not doing an unattended install. However, in my case I do seem to be utilizing the winnt.sif file, which looks like it is analogous to unattend.txt for my situation. I do not know if oempreinstall is a valid switch for winnt.sif but I will certainly be investigating this angle.

Using the method above, were you able to install on C: drive?

Which drive letter was given to the USB stick?

Yes, I was able to install to C:, and the USB was assigned drive F: (my CD ROM is E:, and my HD0 is partitioned C: and D: )

Just to keep things as clear as possible, with reference to my post here:

I think I'll try simply formatting, copying the CD to the stick and perform steps 4 and 5. This takes out creation of and need for the migrate file.

you would "fall" in method #3, won't you?

I believe the method so far has been a bit of a combo of 3 and 4 since I was trying the FlyAKite usage of the stage 1 setup along with SETUPLDR.BIN. You're right though, if I could get this simple CD copy to work it would be much more in the #3 category. However, I've given it a shot, and ran right back into the problem that without migrate.inf, the installation will not continue and prompts for the setup CD, even if all the WIN51.IP tag files are in place on the USB.

Thanks for hanging with me on this one. It really does seem like what we are missing is only a simple switch somewhere. I believe the stick setup boot process is obtaining data per this flow:

Share this post

Link to post

Share on other sites

The format and info for winnt.sif is indeed the same as for unattend.txt.

Oempreinstall is not really valid for what we are trying to do. It is used during unattended install to setup other vendor and install-specific programs and drivers during install. These are placed in a setup $oem$ folder. From the deployment tools help file,

Syntax OemPreinstall = Yes | No

Yes

Setup copies the subfolders and files contained in the \platform\$oem$ folder.

No

Setup does not copy these files.

I followed the steps again from the previous post, only this time I removed migrate.inf, but not winnt.sif

Share this post

Link to post

Share on other sites

To avoid the problem of steps 4 and 5 above, you can try using Grub4DOS to chainload SETUPLDR.BIN directly.

Thanks I might give Grub4DOS a shot. I've used BootitNG for multibooting USB before and was expecting to try it. I was trying to establish a working standalone project before adding the other boot loader, but maybe I should go ahead and add that piece now.

Thanks!

0

Share this post

Link to post

Share on other sites

Ugh. I am trying my best to only vary one thing at a time but somehow another detail slipped through, and I'm not sure how I got past it before. When setup copies the files from the USB to the HD, it sets up the next boot from the HD for the GUI portion of setup to continue. This is done in boot.ini on the HD.

When installing from the USB stick, it thinks the USB is HD0, and that the HD being installed to is HD1. So, the new boot.ini entry is