Help - Search - Members - Calendar
Full Version: How to boot/install from USB key ?
MSFN Forums > Member Contributed Projects > Install XP from USB
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

   
Google Internet Forums Unattended CD/DVD Guide
Halfwalker
Hey -

I've done some digging around, and I can only find one comment on booting to install XP Pro from a USB key. That's on the http://www.experts-exchange.com forum, which is a PAY for information one ... As Stallman says, information should be free smile.gif

Given that CDs only hold around 700meg, maybe 800, and that 2G USB keys are now common, I would like to set up an XP Pro installation on a USB key. Pop in the key rather than a CD, set to boot from USB-HDD, and install away, with more room for apps etc.

Note - this is not actually running XP from the key - I've seen lots of examples of that. This is basically emulating a normal CD install, just sourcing it from a USB key rather than CD.

Any ideas ?

D.
cluberti
You'd need a BIOS that is capable of using the USB key as a boot device - I know this is common in newer machines, but not quite sure how widespread this is yet.

However, if your BIOS supports USB booting, it is possible:
http://www.aaltonen.us/archive/2004/03/01/...b-key-addendum/
Halfwalker
Yup - I've seen that page. Actually booting from the USB key is not the problem. It's setting up the files, boot image etc, on the key that's the hiccup.

The CD normally boots via the Microsoft Corporation.img bootimage. That's a tiny program that then loads up setup.exe, which in turn is only 1.3k in size. I'm guessing that Microsoft Corporation.img also does the "press any key to boot from CD" msg ...

It's a pity that syslinux doesn't support cluster sizes greater than 16K, which limits it to 1G filesystems. That would be ideal to have a generic installation USB key, able to install XP Pro, Linux etc, all right from one device.

D.
cluberti
You might consider putting WinPE (or bartPE) on the USB key to kick off the installations - that might be a better road to take than installing directly from the USB key. From the PE you could format the hard disk(s), copy the files to the disk, and start the installation using your unattended file.
Claymore1746
Here are some instructions you may find helpful:

WeetHet USB Boot setup
jaclaz
QUOTE (Halfwalker)
Note - this is not actually running XP from the key - I've seen lots of examples of that.


Oh, yeah, can I ask you where? woot.gif

As far as I know, the ONLY project that ever succeeded in booting XP from a USB key/drive is Dietmar Stoelting's one, published first time at the end of October 2005, still VERY experimental:
http://home.graffiti.net/jaclaz:graffiti.n...SB/USBfaqs.html
http://www.911cd.net/forums//index.php?showtopic=14181

However as I see it, the easiest way to achieve what you want is to install some kind of DOS/Win9x OS on the stick then run the 16 bit install program WINNT.EXE.
There are some known problems using it if you use nlite with it and there could be some problems about drive lettering also, but it shoul be possible to find some workarounds for these latter ones.

Using a BartPE install on the USB pendrive and using the 32 bit install program WINNT32.EXE has no known problems, but you will need enough space for the BartPE install and it's booting will be slow.


jaclaz
Halfwalker
So how exactly is the CD starting the install ? It doesn't need any 32bit OR 16bit environment ... The Microsoft Corporation.img loader comes up and starts up setup.exe. There must be an emulation for the MasterBootRecord of the USB drive that can hold and properly load up in the same way ...

If syslinux could handle larger than 16k clusters, it would work fine. Use memdisk, and point the initrd at Microsoft Corporation.img. memdisk requires diskette images, so it may not work that way, so perhaps isolinux - that takes no-emulation boot records.

Heh, I take back the lots - I did see Dietmar's page, and a few others as I recall. All via google and a couple of hours of digging around. But definitely more than one. I skimmed them looking for examples of installing via USB drive, but no luck.

D.
Bezalel
Setup.exe is a 32 bit program and is not used when booting from a CD. Microsoft Corporation.img loads setupldr.bin. Setupldr.bin does the text mode setup based on txtsetup.sif and winnt.sif.
jaclaz
QUOTE (Bezalel @ Nov 28 2005, 10:17 AM) *
Setup.exe is a 32 bit program and is not used when booting from a CD. Microsoft Corporation.img loads setupldr.bin. Setupldr.bin does the text mode setup based on txtsetup.sif and winnt.sif.


....and as you can rename setupldr.bin to NTLDR as when building a WinPE/BartPE:
http://www.nu2.nu/pebuilder/
http://www.prime-expert.com/flashboot/down...s/UserGuide.pdf

....or rename NTLDR to setupldr.bin as seen here:
http://daniweb.com/techtalkforums/showthread.php?t=4644

...you should have a good start.

Also, have a look at this, seemingly completely unrelated but useful if you want to make a multi-install hard-disk (as the multi-install DVD depicted):
http://www.magiciso.com/tutorials/miso-cre...multi-os-cd.htm

Just for the record, the answers on the "pay for site" you mentioned can be viewed, at least at the moment, here:
http://216.239.59.104/search?q=cache:2c_1H..._21475584.htmla

It seems like you got same or better answers here for free....newwink.gif

jaclaz
pmshah
If the USB device in question supports booting from it, it would have come with a utility to make it bootable including selecting emulation ( usb : floppy, hdd, cdrom, zip, ls-120 or what ever else your bios might support), the boot image & all the files you want on it. If you do this & manage to boot from it all you have to do is to select the option of copying the installation files to the HDD & you are all set.
net_user
check out ...
http://www.911cd.net/forums//index.php?sho...6&mode=threaded


i have bartpe on a usb stick....so any pc that supports usb booting...i can just pop in my usb stick and load my bartpe without a cd. works pretty good also when i need to update the image, i don't waste any more cd's.
jaclaz
Just to keep things together, a small howto to boot from BartPE (CD) to install XP has been posted here:
http://www.msfn.org/board/HOWTO-Unattended-CD-with-BartPE-t68252.html
adapting it to USB drive/key (a BIG one, newwink.gif ) should not be a problem.

jaclaz
davinci83
Isn't there a way to transfer the boot sector from the cd onto a usb flashdisk, without getting into BartPE?

I'm looking for a way in essence to install xp from a usb stick with the absolute same look and feel as if it were being done from cd.
jaclaz
QUOTE (davinci83)
Isn't there a way to transfer the boot sector from the cd onto a usb flashdisk, without getting into BartPE?

I'm looking for a way in essence to install xp from a usb stick with the absolute same look and feel as if it were being done from cd.


Look here:
http://www.msfn.org/board/make-a-nlited-windows-xp-bootable-on-a-u-t81537.html
http://www.msfn.org/board/Installing-Unattended-from-a-USB-Thumb-D-t81788.html

jaclaz
LLXX
QUOTE (Halfwalker @ Nov 24 2005, 12:39 PM) *
I've done some digging around, and I can only find one comment on booting to install XP Pro from a USB key. That's on the http://www.experts-exchange.com forum, which is a PAY for information one ... As Stallman says, information should be free smile.gif
Just scroll down... laugh.gif I always wonder if that site was purposely setup to see how many lusers would actually pay for the equivalent of scrolling down... biggrin.gif
porear
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
2. Copy CD contents to a working directory C:\WINSET on my HD
3. Follow Flyakite's instructions at http://flyakite.msfn.org/ to copy installation files to C: by running C:\WINSET\I386\WINNT32.EXE /NOREBOOT
4. Copy installation boot directory C:\$WIN_NT$.~BT created in step 3 to C:\WINSET
5. Delete winnt.sif, migrate.inf, and bootsect.dat from C:\WINSET\$WIN_NT$.~BT
6. Use CodeBeetle's PeToUSB from http://gocoding.com/page.php?al=petousb to format and load my USB stick by pointing it to C:\WINSET

Results:

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.

Any ideas? Be gentle on the rookie... welcome.gif
jaclaz
QUOTE
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.
Cannot really say, but that error should come out if the "root" files on CD are not found:
WIN51
WIN51IP
WIN51IP.SP1
WIN51IP.SP2


See these threads here:
http://www.911cd.net/forums//index.php?showtopic=16381
http://www.911cd.net/forums//index.php?sho...c=17425&hl=

Putting those files in the root of the stick should make no harm.

QUOTE
Got a message that TXTSETUP.SIF was missing or corrupted,

No, it should not be needed to hexedit SETUPLDR.BIN, but is it possible that the version you are using has a CHECKSUM ? :
http://www.msfn.org/board/Solution-for-multibooting-Win-XP-2k3-64-t58410.html

jaclaz
porear
Update edit - still not fully working yet, see post below.

thumbup.gif I GOT IT!!! thumbup.gif
I am successfully running a Windows XP SP2 installation off of my USB stick.

I don't really know what I am doing, so this is a brute force method, but it works for me. Please help me to make it more elegant.

For this procedure you need:

Your USB drive
Your Windows installation source and
CodeBeetle's PeToUSB from http://codebeetle.com/page.php?al=petousb

For the steps below I am assuming you are working from a PC with windows loaded on C:

1. Make a copy of your C:\boot.ini to boot.bak

2. Navigate to your windows installation source and run a noreboot setup. For me from my CD it was

Start->Run and type E:\I386\winnt32.exe /noreboot
When prompted, choose Installation Type "New Installation"
At Setup Options - Advanced Options Check the box for "Copy Setup Files" to directory \WINDOWS
At Get Updated Setup files choose No

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

4. Build with PeToUSB as follows

Insert your USB stick
Start PeToUSB
In PeToUSB, choose your USB stick drive,
Make sure Enable Disk Format is checked, and
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.

6. Copy the directories C:\$WIN_NT$.~BT and C:\$WIN_NT$.~LS onto your USB stick

7. Create a directory \minint on your USB stick

8. Copy C:\$WIN_NT$.~BT\TXTSETUP.INF to the new \minint directory on your USB stick

Steps 7 and 8 are another place where a proper NTLDR file that does not point to \minint would help create a more correct method.

9. Delete the following files from the \$WIN_NT$.~BT directory on your USB stick (thanks again to FlyAKite):

BOOTSECT.DAT
migrate.inf
winnt.sif


10. On your PC hard drive, rename C:\$WIN_NT$.~BT to C:\$WIN_NT$.~BT.OLD and C:\$WIN_NT$.~LS to C:\$WIN_NT$.~LS.OLD

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!

Pat biggrin.gif
porear
Of course, for all I know, this may get you to the exact same place as making a DOS bootable stick, copying the setup disk to it, and running winnt.exe... tongue.gif
porear
So, so sorry guys. Still a step away. I just tried a full run through and got all the way to where setup would start copying files to the hard disk, and got the message

"Setup cannot access the CD containing the Windows XP installation files".

This is right after you pick a partition to install to.

My successful run must have been before I renamed the two directories on the hard disk. Something in the setup is still pointing there. So close... any help?

Again, I apologize profusely on jumping the gun calling total success. sad.gif

Also sorry jaclaz, I didn't address your post.

QUOTE
Cannot really say, but that error should come out if the "root" files on CD are not found:
WIN51
WIN51IP
WIN51IP.SP1
WIN51IP.SP2


Yes, I had these files on the root earlier during my first try, but it didn't seem to be looking there.
jaclaz
QUOTE (porear)
Start->Run and type E:\I386\winnt32.exe /noreboot


You should try using the syntax posted here:

http://www.msfn.org/board/Installing-XP-on-vaio-w-o-cd-or-floppy-t77526.html

using the /makelocalsource should be the "missing" step.

jaclaz
porear
QUOTE (jaclaz @ Nov 10 2006, 05:08 AM) *
using the /makelocalsource should be the "missing" step.

jaclaz


Wow that looks very promising. I'm off from work today, I'll give it a shot. Thanks very much for the tip.

Also have read some things that lead me to believe that copying SETUPLR.BIN to NTLDR may provide the appropriate NTLDR needed without doing the whole PEToUSB copy.

Will post results... fingers crossed.
porear
Well, its working, but I don't think its correct. I'll post what I did and then my concern. I was using a Windows install CD in my drive E:.

1. Run a setup by E:\I386\winnt32.exe /noreboot /makelocalsource
2. Format USB drive with PeToUSB (but did not copy any build files - format only)
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.
jaclaz
You might be interested in these:
http://support.microsoft.com/kb/234048/en-us
http://technet2.microsoft.com/WindowsServe...3.mspx?mfr=true

It seems like a directive
QUOTE
"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.

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

Which drive letter was given to the USB stick?

Just to keep things as clear as possible, with reference to my post here:
http://www.msfn.org/board/forums.html#entry563654

Until now you were exploring the possibilities of method #4, if you
QUOTE
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?

If I am correct, some info in here might be of help:
http://www.911cd.net/forums//index.php?sho...c=17425&hl=

jaclaz
porear
Think we may be on to something but I'm in the middle of a long file copy so I will catch things up here while waiting.

QUOTE

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.

QUOTE
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.

QUOTE
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: )

QUOTE
Just to keep things as clear as possible, with reference to my post here:
http://www.msfn.org/board/forums.html#entry563654

Until now you were exploring the possibilities of method #4, if you

QUOTE
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:

Boot sector - NTLDR (copy of SETUPLDR.BIN) - TXTSETUP.SIF - WINNT.SIF and migrate.inf

I'll be back when there's more to tell after the file copy.
porear
Getting close. First, some info.

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,

QUOTE
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

1. Run a setup by E:\I386\winnt32.exe /noreboot /makelocalsource
2. Format USB drive with PeToUSB (but did not copy any build files - format only)
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 migrate.inf from \$WIN_NT$.~BT on the USB drive

Things work fine. The problem now is, that during install, as the extra files created in step 1 by the /makelocalsource switch are copied to the hard drive, they are deleted from the USB stick.

I am sure there is a switch to prevent this, but for now I've got to run out to dinner. It looks like the solution will lie in the TXTSETUP.SIF file.
jaclaz
To avoid the problem of steps 4 and 5 above, you can try using Grub4DOS to chainload SETUPLDR.BIN directly.

This would give you also more options when booting, say, access to a DOS or Linux boot, etc.

All you need to do is copying to the root of the stick grldr (from the grub4dos package), rename it to NTLDR and add a menu.lst with this entry:
QUOTE
# This loads SETUPLDR.BIN in /$WIN_NT$.~BT
# from the current root (the device you booted from)
chainloader /$WIN_NT$.~BT/SETUPLDR.BIN
Get grub4dos here:
http://grub4dos.jot.com/WikiHome

Search posts by me on 911cd forum with text "grub4dos" for some examples and tips.

QUOTE
Things work fine. The problem now is, that during install, as the extra files created in step 1 by the /makelocalsource switch are copied to the hard drive, they are deleted from the USB stick.

GOOD! smile.gif
I'll have a look too if I can find a way to avoid deletion of that....

jaclaz
porear
QUOTE
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! smile.gif
porear
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

multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Professional"

when removing the USB stick to reboot for Windows GUI setup, your HD becomes HD0, so the boot.ini entry needs to be

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional"

for it to work. Another minor detail. I would think this could either be fixed by

1. config setting during setup to explicitly state what the boot.ini entry should be, or
2. at the end of text setup run a simple batch or command file that edits boot.ini, or
3. use a USB drive boot manager to make sure the HD on which Windows will be installed is always seen as HD0 by the USB drive, which can then be assigned HD1 (or HDx)

I don't know which of these are possible or which would be simplest. I truly believe this issue and the USB setup file deletion at copy are the last two hurdles (but I could be wrong?) unsure.gif
jaclaz
QUOTE (porear)
When installing from the USB stick, it thinks the USB is HD0, and that the HD being installed to is HD1.

Yep, that is what made me ask before which letter was assigned to the HD, booting from the stick automatically makes it first drive.

QUOTE (porear)
2. at the end of text setup run a simple batch or command file that edits boot.ini,

If the drive lettering ( C: ) of the hard drive is correct, thus should be the easiest solution.

Please find here a small batch and some useful info to that effect:
http://www.msfn.org/board/When-Do-We-Get-Our-Hand-into-BOOTINI-t66101.html


QUOTE (porear)
3. use a USB drive boot manager to make sure the HD on which Windows will be installed is always seen as HD0 by the USB drive, which can then be assigned HD1 (or HDx)


You can try using Grub4DOS to map the stick as another HD or even FD, something along the lines of:
CODE
map --read-only (hd0,0)+1 (fd0)
chainloader (fd0)+1
rootnoverify (fd0)
boot

maybe mapping it as read-only will prevent deletion of the files.

jaclaz
porear
QUOTE
Yep, that is what made me ask before which letter was assigned to the HD, booting from the stick automatically makes it first drive.

You're right. I apologize, I'm trying to be as correct as possible in working this out but I keep making errors. sad.gif The best I can guess is that maybe I left migrate.inf in place and it somehow took care of the drive mapping, but not sure.

At least this seems to be a problem that won't be too hard to overcome. Thanks very much for the help and the tips, I'll give the batch file and the Grub4DOS ideas a look. I've been trying to read up on TXTSETUP.INF to see if somewhere in all the ,,,,s in the syntax of the [SourceDiskFiles] section there is a setting that would prevent file deletion after copying, but have not found such yet. The read-only mapping might be the thing to do. This stick doesn't have a hardware write lock switch on it.

Thanks again, I'm still on the job...
porear
Still stuck with the same two issues.

I'm using GRUB4DOS now (great tool!) but when I tried the boot entry you suggested, I still got a boot.ini that pointed to the wrong disk, and the files were still being deleted from the USB stick. I think the --read-only switch only applies to grub-install, but the loader didn't complain about it being there.

I have also tried various permutations of mapping

map (hd0) (hd1)
map (hd1) (hd0)

with no success.

Although GRUB will recognize this re-mapping for booting, won't the Windows setup still always assume that it is being run from HD0 regardless?

I have not yet experimented with the batch files for re-writing boot.ini. Thanks!
jaclaz
porear, sorry, I modified my previous post, the Grub4Dos entry I posted was wrong, can you try with the new one?

Also, cdob appears to have joined in the "game", I am crosslinking to the other thread:
http://www.msfn.org/board/Installing-Unattended-from-a-USB-Thumb-D-t81788.html

jaclaz
porear
Hello, cdob, welcome.

Well, I tried the revised boot entry, but got this:

QUOTE
Booting 'Boot WinXP Setup from USB'

map --read-only (hd0,0)+1 (fd0)
FAT16 BPB found with the starting 0xEB (jmp) confirmation.
probed C/H/S = 246/255/63, probed total sectors = 3963841
chainloader (fd0)+1

Error 26: Disk read error
I also tried mapping (hd0) to (fd0) without specifying the partition as in (hd0,0) but still got Error 26.

I tried

CODE
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1)
chainloader (hd1)+1

but that did a double swap (or maybe no swap at all? same result) and I ended up booting my hard drive instead of the USB.

However, when I tried (this is where it gets interesting)

CODE
title Boot WinXP Setup from USB
map --read-only (hd0) (hd1)
rootnoverify (hd1)
chainloader (hd1)+1
boot

it made it. I booted successfully from the USB setup, files were copied, the machine rebooted, and the GUI part of setup began. Unfortunately it stopped soon after, and a dialog box popped up looking for files

QUOTE
Files needed

The file 'asms' on Windows XP Professional Service pack 2 CD is needed.

Type the path where the file is located and then click OK.

Copy files from

and the list box was pre-populated with

QUOTE
GLOBALROOT\DEVICE\HARDDISK1\PARTITION1\$WIN_NT$.~LS\I386

the only other choice in the list box was A: So, I could not continue at this point.

Next interesting thing: The boot.ini contains

CODE
[boot loader]
timeout=1
default=signature(76c076b)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
signature(76c076b)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

Lastly, the files are still being deleted from the USB stick as they are copied.
porear
In case it helps here is the setuplog.txt that was created.
jaclaz
Hmmm, I think that you are getting really close smile.gif.

The fact that in boot.ini the "signature" syntax is used should mean that the drive is recognized as a "peculiar" one, but this, as I see it, is a good thing.

You can check the Disk (and stick) signature with MBRFIX or MBRWIZARD:
http://www.sysint.no/Nedlasting/MbrFix.htm
http://www.sysint.no/Nedlasting/MbrFix.zip
http://home.graffiti.net/jaclaz:graffiti.net/
http://home.graffiti.net/jaclaz:graffiti.n...X/mbrfix0.2.zip

The
CODE
title Boot WinXP Setup from USB
map --read-only (hd0) (hd1)
rootnoverify (hd1)
chainloader (hd1)+1
boot


should work as follows:

You map the stick (booted from, and thus first drive, or hd0) to second drive hd1, then you boot from it.

The question is how is "mapped" the internal hard disk drive and how is this seen by windows setup?

The reference to
QUOTE
d:\xpsprtm\base\ntsetup\syssetup\
should mean that (if I get it correctly the \xpsprtm directory is on the stick) the mapping is correct, i.e. the stick gets letter "d:".

On the other hand, the fact that the reference to
QUOTE
GLOBALROOT\DEVICE\HARDDISK1\PARTITION1\$WIN_NT$.~LS\I386

gives the missing file error, should mean that by this part of the setup the stick is NOT seen as second drive (HARDDISK1) but probably as first one (HARDDISK0)

One thing you could try is the following:
QUOTE
title Boot WinXP Setup from USB
map --read-only (hd0) (hd2)
map (hd1) (hd0)
rootnoverify (hd2)
chainloader (hd2)+1
boot
most probably you will have the same behaviour, but the box list could be "populated" by
QUOTE
GLOBALROOT\DEVICE\HARDDISK2\PARTITION1\$WIN_NT$.~LS\I386

instead.

Also, can you post (attaching it) the migrate.inf file you get when you prepare the stick with WINNT32.EXE?

I still have the "feeling" that the solution could be there.... huh.gif


jaclaz
porear
migrate.inf is attached.

Not sure but thought maybe winnt.sif or sysprep.inf could play a part...

Thanks!
porear
This does not seem to be a true hard disk drive letter mapping. I've not been able to find the \xpsprtm directory during setup, so I am assuming this is some "virtual" location that may be created on-the-fly. When searching the 'net, I only find instances of this sequence logged as mapped to d:\ ??

QUOTE
should mean that (if I get it correctly the \xpsprtm directory is on the stick) the mapping is correct, i.e. the stick gets letter "d:".
At this point the stick isn't even plugged in. The stick was pulled out of the machine when rebooting into the GUI setup, because otherwise we would be booting to the stick and starting text setup over again.

We could create another entry in GRUB to get around this and selectively boot to the hard drive, but then we would have to add specifics about the installation to the boot entry, such as which hard drive and directory the text setup installs to. This limits desired flexibility in the install to say that you must always install windows on x drive in y directory so that the GRUB entry will be correct.

Our problems stem from trying to jump start an install in the middle of the usual process. Once the GUI setup begins, it assumes that the text setup has created $WIN_NT$.~LS on the hard drive and that any files it needs will reside there.

Instead, our $WIN_NT$.~LS is on the stick, but the GUI part of setup running from C:\WINDOWS doesn't know it. I don't know if the GUI setup initially loads USB drivers such that it would see the stick anyway.

Does this enumeration scheme begin at 0 or 1?

QUOTE
GLOBALROOT\DEVICE\HARDDISK1\PARTITION1\$WIN_NT$.~LS\I386

because if it needs to be HARDDISK0 it might also need to be PARTITION0.

So I think the tasks at hand are:

Find a way for the GUI setup to see the stick
Point the GUI setup to the stick for the $WIN_NT$.~LS\I386 directory
Find a way to stop deletion of files from the the as they are copied in text mode setup

The other question would be whether the stick could be inserted and recognized after GUI setup start, or if we would have to boot around it in the BIOS sequence with GRUB on the stick.

Also as an FYI, found this about the signature syntax in boot.ini
http://support.microsoft.com/kb/q227704/

Thanks again for all the time and help! smile.gif
jaclaz
hmmm, more research to do....

About:
QUOTE
At this point the stick isn't even plugged in.
I am clearly missing something:
where is the $WIN_NT$.~LS directory, if not on the stick? unsure.gif


I assumed that the syntax of
QUOTE
GLOBALROOT\DEVICE\HARDDISK1\PARTITION1\$WIN_NT$.~LS\I386


would be similar to the BOOT.INI one, where first disk is 0, but first partition is 1, byt I may be wrong.

To better analyze the contents of your migrate.inf, can you do the following ?:
1) Download on the computer you used WINNT32.EXE the DSFOK here:
http://members.ozemail.com.au/~nulifetv/freezip/freeware/
2) unzip it, open a command prompt in the directory and run the VLM tool like VLM > VLM.TXT
3) from the same command prompt run mountvol >> VLM.TXT
4) post (attach) the VLM.TXT

There might be a relationship between the drive signature and the entries in migrate.inf aka entries in the Registry or however another way to "couple" migrate.inf drive letter assignments to the fixed hard disk.

I'll post what I can find or if some other idea comes out.

jaclaz
porear
QUOTE
I am clearly missing something:
where is the $WIN_NT$.~LS directory, if not on the stick?

Sorry if I wasn't clear. The $WIN_NT$.~LS directory is on the stick, but the stick is removed between text setup and reboot for GUI setup.

The sequence is

Boot USB stick into text mode setup on USB stick via GRUB4DOS
Run text mode setup from USB stick which copies some setup files to C:\WINDOWS on hard disk
Remove USB stick
Reboot, booting from C: into GUI mode setup from C:\WINDOWS
Replace USB stick
Failure when $WIN_NT$.~LS\I386 isn't found for more files needed by GUI setup.

May have missed the right combination, but was not able to then find the stick by changing the numbers in HARDDISKx\PARTITIONy

So either $WIN_NT$.~LS\I386 needs to be copied to the hard drive that Windows is being installed onto at the end of the text mode setup (inefficient and time consuming), or somehow the GUI mode setup needs to be able to acccess the USB stick, which I have yet to achieve. I am not certain if at initialization the GUI setup loads USB drivers or not.

My VLM.TXT is attached. Thanks!
cerdar
Yes,i had meet the same program
porear
Wow. I don't believe it, but I THINK its working!!! This was without migrate.inf.

After text mode finished, at the reboot, I went into my BIOS and changed the sequence so the hard drive would be the first boot device, and left the USB stick in. It booted to the hard drive, began GUI setup, found the stick, and did not even prompt me for the \I386 files - it saw them.

For now, this seems like the remaining work:

1. The problem still remains that some of the files are deleted from the stick as they are copied during text mode setup.

2. Make another GRUB entry so that at boot you could choose between "Part 1 Text Mode Setup" and "Part 2 GUI Setup" in GRUB to point to the USB stick and the hard drive respectively. (I know its simple but I'm green on GRUB and haven't gotten it to work yet).

Bonus: It would be nice to have some type of toggling script on the stick for GRUB4DOS that would boot the stick the first time and the hard drive the next.
jaclaz
QUOTE
2. Make another GRUB entry so that at boot you could choose between "Part 1 Text Mode Setup" and "Part 2 GUI Setup" in GRUB to point to the USB stick and the hard drive respectively. (I know its simple but I'm green on GRUB and haven't gotten it to work yet).

Bonus: It would be nice to have some type of toggling script on the stick for GRUB4DOS that would boot the stick the first time and the hard drive the next.


This should be possible using the "default" file and the savedefault directive in a "cross-linked" manner, I'll have a look in the matter.

jaclaz
porear
Edit: savedefault was broken in GRUB but is now working after updating to a later version (0.4.2 pre11 dated 10-2006). The following accomplishes the desired toggle. I am not very familiar with GRUB, if there is a more correct way to boot XP from the hard drive on the GUI entry (or the USB boot), someone please jump in.

CODE
color black/cyan yellow/cyan
timeout 10

default /default

title Phase 1 WinXP Text Mode Setup
map --read-only (hd0) (hd1)
rootnoverify (hd1)
chainloader (hd1)+1
savedefault 1
boot

title Phase 2 WinXP GUI Mode Setup
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)
chainloader +1
savedefault 0
boot


Item of note: to make things easier, I installed GRUB4DOS using WinGRUB. However, to get the latest version, I downloaded a later version of GRUB4DOS and copied the newer GRLDR file onto the stick.

To make savedefault work, it is necessary to copy the file DEFAULT from the GRUB4DOS installation files to the root of the stick.

The last issue still eludes me. Attached is a file listing of those files that are deleted from the stick during the text mode setup phase. The newer GRUB honors the --read-only switch. So, Windows setup now says it cannot copy those files - I guess it considers the copy a fail if it cannot delete the source file. The answer to this one will probably be on the Windows side of things.
porear
The key to the file deletion problem should be TXTSETUP.SIF. I'm looking for a definitive description of the TXTSETUP.SIF syntax.
jaclaz
GOOD! smile.gif

A quick small correction:
QUOTE
title Phase 2 WinXP GUI Mode Setup
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)
chainloader +1
savedefault 0
boot
is exactly the same as:
QUOTE
title Phase 2 WinXP GUI Mode Setup
rootnoverify (hd1)
chainloader +1
savedefault 0
boot


QUOTE
The key to the file deletion problem should be TXTSETUP.SIF.


Yes, there must be somewhere a directive "keeep all files".... huh.gif

jaclaz
porear
QUOTE
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)

is exactly the same as:

rootnoverify (hd1)

I really thought so too - but when I tried the second entry, it boots into text setup on the stick unsure.gif When instead trying rootnoverify (hd0) with no mapping, I reboot back into GRUB.

I've been playing the with numbers between all the commas in the TXTSETUP.SIF entries in the [SourceDisksFiles} section. Changing the tenth digit to a 3 stops the file from being deleted, but it also stops it from being copied. wacko.gif

One... more... detail...
jaclaz
QUOTE (porear)
I really thought so too - but when I tried the second entry it did not work. ?


hmmm, very strange, however, if it works with the double exchange, let it be! smile.gif


QUOTE (porear)
Changing the tenth digit to a 3 stops the file from being deleted, but it also stops it from being copied.


Well, according to this:

http://www.msfn.org/board/Switches-in-TXTSETUPSIF-t14852.html

the 3 would mean "do not copy", most probably it means "ignore".

It seems like I cannot find a "proper", i.e. complete TXTSETUP.SIF howto, I am trying to put tohether all bits of info I can find...., but at the moment nothing that can resolve the file deleting problem.

More info on gosh's pages:
http://gosh.msfn.org/txtsetup.htm

jaclaz

P.S.: about:
QUOTE (porear)
Item of note: to make things easier, I installed GRUB4DOS using WinGRUB. However, to get the latest version, I downloaded a later version of GRUB4DOS and copied the newer GRLDR file onto the stick.


Though possible, as you made it, to install grldr.mbr to the MBR and copy GRLDR to the stick, it is not the "recommended" way, as the MBR code is (of course) different from "standard" NT/Win2K/XP2003 MBR code, it is possible (and there were reports abut this) that the motherboard BIOS won't boot from it.

The recommended way is to prepare the stick with the HP tool under Win2K/XP/2003 WITHOUT telling it to put DOS files in the key, or however format the key under the same OSses in a manner to have the bootsector of the primary partition that invokes NTLDR.
Then either:
1) copy to the stick NTLDR and a boot.ini with an entry :
QUOTE
C:\GRLDR="Grub 4 DOS"

or
2) copy to the stick grldr and RENAME it as NTLDR
porear
I edited the previous post to give more detail about what happened when I tried to remove the swap mapping. Without it, rootnoverify (hd0) boots GRUB on the stick, and rootnoverify (hd1) boots to the ntldr loader on the stick.

I have tried in vain as well to find any detailed TXTSETUP.SIF documentation.

Thanks for the tips about how I've installed my GRUB. I did not know this was an issue. My stick boots fine this way on my machine, but I would rather go with a reliable method that will cause the least problems.

I'll try what you suggest, it sounds very straightforward. For creating a stick that boots looking for ntldr, I think all we would need to do is format the stick with PeToUSB instead of the HP tool.

Thanks again!!! smile.gif
jaclaz
QUOTE (porear)
I'll try what you suggest, it sounds very straightforward.


You must thank Spacesurfer, that found this way to cut some corners:
http://www.911cd.net/forums//index.php?showtopic=18031


QUOTE (porear)
Without it, rootnoverify (hd0) boots GRUB on the stick, and rootnoverify (hd1) boots to the ntldr loader on the stick.


I checked on some other posts/howto, you are right, the exchange takes place.
To make sure, you can try from a Grub4dos command line, repeating the same commands one by one, and use "root" instead of "rootnoverify", Grub4dos should put on screen a brief message describing the partition it "rooted" too.

jaclaz
Google Internet Forums Unattended CD/DVD Guide
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.