Jump to content

How to boot/install from USB key ?


Halfwalker

Recommended Posts

http://www.bootdisk.com/ is a great site that may help. You may wish to check out their utilities section.

Can I ask you the meaning of your post in this thread?

What would bootdisk.com help for?

Which utility on that site would help, and it would help who?

A good idea, expecially for people at their second post, would be to actually read what the thread is about, before posting unrequested and generic info.

jaclaz

Link to comment
Share on other sites


I have made a tiny Batch Program named BT_folder.cmd (see Attachment) :)

which from a given XPSOURCE directory will create the Windows XP Setup Bootfolder $WIN_NT$.~BT

named as XPBT folder in a given destination directory.

The BT_folder.cmd program makes the Bootfolder by parsing the dosnet.inf file.

Every [FloppyFiles.*] section in dosnet.inf is referring to the files needed in the boot folder.

The d1 is referenced in the [Directories] section, which shows the path of where the file resides.

I will integrate BT_folder.cmd program in the usb_prep.cmd program

so that Windows XP Setup Bootfolder can be made without launching winnt32.exe /noreboot ....

A disadvantage and danger of using winnt32.exe is

that it Deletes LocalSource folder $WIN_NT$.~LS in ROOT of ANY Drive :ph34r:

which needs precautions by renaming such existing folders on USB-stick or USB-harddisk.

This is no longer a problem when we use the code of BT_folder, which is also faster.

Before presenting a new version of usb_prep.cmd with integrated BT_folder.cmd and

hopefully some GUI enhancements, I would like to know if BT_folder.cmd is working well

for all versions of Windows XP.

I have tested BT_folder.cmd for Windows XP Professional and it works OK,

but I have no Media Center Edition or Tablet PC and would like to hear about

test results for these or other versions. ;)

The program was designed to take all versions of Windows XP into account.

Synchronize dirs ... Command of Total Commander with the Compare command

and using for Show only Green and Blue Arrows selected, ;)

can be used for comparing XPBT Bootfolder with existing Windows XP Setup $WIN_NT$.~BT Bootfolder.

The differece will only be the migrate.inf and winnt.sif files

which are added afterwards with the usb_prep.cmd program as Custom files.

Regards,

wimb

Edit 27nov7: BT_folder.cmd2.cmd was slightly modified to make it more general.

Edit 29 feb 2008: Updated to BT_folder3.cmd

Removed in some cases possible DOSNET.INF Parsing Error

BT_folder3.cmd

Edited by wimb
Link to comment
Share on other sites

The Batch Program usb_prep8.cmd can be used

to make Bootable USB-stick or USB-Harddisk for Install of Windows XP.

Important Changes in usb_prep8.cmd Batch Program:

The code of BT_folder.cmd program for making Windows XP Setup Bootfolder $WIN_NT$.~BT

by Parsing DOSNET.INF was added to the usb_prep8.cmd program,

so that launching of winnt32.exe /noreboot .... can be avoided and is no longer needed. :)

A Custom winnt.sif file in the usb_prep folder is needed now,

which will be copied by the usb_prep8.cmd program to the $WIN_NT$.~BT Bootfolder.

For UNATTENDED Install make Changes in usb_prep folder:

Change Product Key in winnt.sif and winnt_dp.sif and Change $OEM$ folder to your needs.

Use for Preparing USB-Drive Only winnt.sif file without an [unattended] Section.

Don't change commands for using BTS DriverPacks.

winnt_dp.sif is used by usb_prep.cmd when using XPSOURCE with DriverPacks Integrated.

It is not needed anymore to Set the Drive Letter for the Virtual TempDrive,

since there is used now an Automatic Preset Value (mostly Drive T: is used).

VBScript was used for making GUI enhancements for the usb_prep8.cmd Batch Program.

When a .vbs script file is executed by cscript.exe from a Command Window,

then the wscript.echo of VBScript is send as output of cscript to that Command Window

instead of giving for the wscript.echo a GUI pop-up.

When a .vbs script is executed by doubleclick then a wscript.echo statement

is giving as you can try just only a GUI pop-up message with the echo of the return value

e.g. displaying the return value of a VBScipt Function.

The return value of the VBScript Function given as output of cscript to the Command Window,

can be evaluated by using the FOR /F command according to

FOR /F "tokens=*" %%A IN ('CSCRIPT.EXE //NoLogo u_script\FolderSel.vbs') DO SET src_ok=%%A

This mechanism enables the possibility to use GUI enhancements in a CMD Batch Program. :)

Rob van der Woude gives very valuable information on this subject.

SEE: http://www.robvanderwoude.com/usermessages.html

And a lot of handy Windows Script Host Examples, among which BrFolder.vbs implemented as FolderSel.vbs

http://www.robvanderwoude.com/wshexamples_b.html#B

MsgBox References:

http://www.w3schools.com/vbscript/func_msgbox.asp

http://msdn2.microsoft.com/en-us/library/sfw6660x.aspx

The Wizard's Apprentice as proposed by jaclaz,

can provide also GUI enhancements in a Batch Program,

but that would require an additional download, since adding the 82 kB of this program

would make the usb_prep.zip file larger than the 200 kB Upload limit of MSFN.

So I decided to use a similar but integrated solution using cscript.exe with VBScript files,

which has the advantage that it requires only a very small amount of extra code in the Batch Program.

The usb_prep8.cmd program is given in the Attachment as usb_prep8.zip file :)

Regards,

wimb

Edit 4dec7: Small changes in usb_prep8.zip Attachment: mainly MsgBox icons and Help_usb_prep.txt file

usb_prep8.zip

Edited by wimb
Link to comment
Share on other sites

  • 2 weeks later...

Hiya

Got problem when trying to install... I run TXT mode and it loads up all drivers... at some point at very end of "first" txt mode it says on the bottom bar "Preparing to run Windows...." NOW i have blue screen. No folders on drive C: was created, no folders on USB drive created aswell... I cant see screen when you press Enter and than f8.

Ive seen taht usb_prep8 takes ntldr and other files from C: is it possible that it might be fault o my C: files?

Other thing is that my usb is seen as fixed not removable. So when PEtoUSB loads i need to chage category to fixed.

Got 3 partitions c-ntfs d-fat e-ntfs f-cd g-usbfixed. Should all be same? Should i combine them all to one partition?

Im lost i tried few times. Is there way ti change my usb to removable instead fixed?

Many thanks

Kind regards

Locaj

Link to comment
Share on other sites

Hi Locaj,

If I understood you correctly I see 2 problems:

1. BSOD

2. Your stick seen as fixed

To resolve them:

1. What hardware you are booting on? Dell?

Try to overwrite on stick ntdetect.com with Dietmar's modified ntdetect.com. Details here:

http://www.911cd.net/forums//index.php?showtopic=14181

2. Did you try in usb_prep.cmd changing USB drive type to USB hard drive? Please try so, I think it was option 0.

Few other questions-

3. What is the windows version you are installing, is it customized?

4. Did you insert custom mass storage drivers?

5. What do you mean here-

Got 3 partitions c-ntfs d-fat e-ntfs f-cd g-usbfixed. Should all be same?
Is there way ti change my usb to removable instead fixed?
You should provide details about your stick model etc. Some manufacturers have utilities for that purpose, did you have a look at it's web site? jaclaz may help you more on this question.

@wimb- nice work :)

I haven't tested latest batch, no spare time at all, just a quick question which bothers me- are we sure there are not "not documented" actions from winnt32.exe? In case of such it would be tricky to replicate it's behavior. You say the problem with winnt32 is that it deletes any $win_nt$... folders, I think for regular user that shouldn't be a problem. How many have those folders on their hard drives? If they have it intentionally, probably deletion of such wouldn't bother them much, warning should be enough. Just my opinion.

Thanks again for your time and enthusiasm :)

Regards,

ilko

Edited by ilko_t
Link to comment
Share on other sites

@wimb- nice work :)

I haven't tested latest batch, no spare time at all, just a quick question which bothers me- are we sure there are not "not documented" actions from winnt32.exe? In case of such it would be tricky to replicate it's behavior. You say the problem with winnt32 is that it deletes any $win_nt$... folders, I think for regular user that shouldn't be a problem. How many have those folders on their hard drives? If they have it intentionally, probably deletion of such wouldn't bother them much, warning should be enough. Just my opinion.

Thanks again for your time and enthusiasm :)

Regards,

ilko

The code of BT_folder.cmd program for making Windows XP Setup Bootfolder $WIN_NT$.~BT

by Parsing DOSNET.INF , which was added to the usb_prep8.cmd program,

so that launching of winnt32.exe /noreboot .... can be avoided, makes the program much simpler and more direct.

It was tested several times and as far as I see there are no problems using it.

When a Bootable USB-harddisk with XP Install files is connected and at the same time an USB-stick is prepared,

then winnt32.exe would give unwanted effects, when it deletes $WIN_NT$.~LS folder of USB-harddisk.

So I see only advantages in not using winnt32.exe anymore in preparing the $WIN_NT$.... Folders.

Windows XP PowerPacker of Siginet is also using Parsing of DOSNET.INF instead of launching winnt32.exe

for making the $WIN_NT.~BT XP BootFolder. So in my opinion everything is save and even saver as before.

@Locaj

Your USB-stick is seen as Fixed instead of Removable, that might be the cause of your problem.

What is the size and the make of the stick ?

You can try to use Option 0) Change Type of USB-Drive, and use USB-Harddisk as Setting for a Fixed Device,

so that rdummy.sys makes USB Fixed Device being seen as Removable in Windows XP Setup.

Regards,

wimb

Link to comment
Share on other sites

Hiya

Thanks... I will try ntdetect.com. Will try to chage type to 0.

Im trying defoult english windows xp sp2 from oryginal cd =-].

I dont have any custom mass stroge drivers... WinXp automaticly detect and install it.

I meant i got 3 partitions... Disk C: which is NTFS. Next is D: and its Fat32 and E: NTFS. So maybe its problem that i have few different partitions.

My usb is complete noname. I cant even take the cover off to look at chips. Its glued and very hard to take off. Tried few times... only way is to crush the cover totaly ...

So rdummy.sys will make my usb seen as removable? So prep8 can do it right?

But it will be only short time coz after reinstall winXP will detect as fixed... something like that ?

Many Thanks

Locaj

Edited by Locaj
Link to comment
Share on other sites

My usb is complete noname. I cant even take the cover off to look at chips. Its glued and very hard to take off. Tried few times... only way is to crush the cover totaly ...

Well, the idea is to find the VID and PID of the device via SOFTWARE, without being cruel to the poor little thing....;)

See these:

http://www.911cd.net/forums//index.php?showtopic=15776

http://www.boot-land.net/forums/index.php?showtopic=1659

jaclaz

Link to comment
Share on other sites

usb_prep8.cmd doesn't support x64 because Virtual Disk Driver doesn't support it :(
That's a pity. I did not know, thanks for the Info.

By the way, it would not be so difficult to change the program such that the content for the USB-drive is written first to a harddisk folder or direct to the USB-drive, instead of using the Virtual tmpdrive.

Regards,

wimb

Link to comment
Share on other sites

So I tried this and I'm getting the following error message:

"The specified Setup script file (C:\XPSOURCE\i386\winnt.sif) is inaccessible or invalid. Contact your system administrator."

I have no idea why I'm getting this message. Then when I hit ok, I get Making of LocalSource folder $WIN_NT$.~LS Ready Press any key to continue... Copying custom files to temp drive.... The system cannot find the path specified. It then takes forever to CRTL+C out before getting :

Does T:\$WIN_NT$.~LS\I386 specify a file name or directory name on the target (F = file, D = directory)?

C:migrate.inf 1 file copied

same question as above

more files are copied and then I get an error message about not being able to read/edit the tstsetup.sif file.

I checked the names, locations, cases, & attributes on said files, what else am I missing?

Link to comment
Share on other sites

I checked the names, locations, cases, & attributes on said files, what else am I missing?

Maybe the SOURCE files are in some way nonstandard.

I mean whence they come from?

An OEM release (DELL,HP, etc.)?

Have they been modified in some way (slipstreaming, nlite, HFSLIP, etc.) ?

Most probably it's the first error (WINNT.SIF error) that triggers a chain of errors. :unsure:

jaclaz

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...