Jump to content

How to boot/install from USB key ?


Halfwalker

Recommended Posts


Hi all,

Sorry about the delay, lack of spare time lately.

Here is what has to be added to usbprep.cmd to add rdummy driver.

ECHO Adding lines to TXTSETUP.SIF ....
.............
REM added for USB hard drives, loads rdummy.sys during Text Setup, which makes usbstor to see USB drives as removable
fedit -f %tmpdrive%\txtsetup.sif -add -once -l "rdummy.sys = 1,,,,,,4_,4,1,,,1,4" -s SourceDisksFiles
fedit -f %tmpdrive%\txtsetup.sif -add -once -l "rdummy = rdummy.sys,4" -s SCSI.Load
fedit -f %tmpdrive%\txtsetup.sif -add -once -l "rdummy = \"USB hard disk as removable\"" -s SCSI
fedit -f %tmpdrive%\$WIN_NT$.~BT\winnt.sif -add -create -l "\"sc config rdummy start= disabled"" -s GuiRunOnce
copy rdummy.sy_ %tmpdrive%\$WIN_NT$.~LS\I386
copy rdummy.sy_ %tmpdrive%\$WIN_NT$.~BT

rdummy.sy_ and it's source code are in the attachment.

Installation tested with XP SP2 source, 80GB IDE HD, generic IDE-USB adapter. Drive formated FAT16x with 1.9GB partition using PEtoUSB. XP built-in format didn't make it bootable.

On first GUI logon rdummy service is disabled, on next reboot it'll be inactive. If one needs to reenable it simply change startup type in services to 0, or use "sc config rdummy start= boot".

WARNING!!! There is no warranty whatsoever for this driver and it's behavior, use it COMPLETELY at your own risk.

The only issue I've seen by now is BSOD 7B when F3 is pressed to quit from Setup, but there may be others. Not tested with 2K/2K3.

@wimb- would you add this as an option, the same way we choose source path etc. I didn't want to mess with the batch file.

A few minor suggestions for usbprep.cmd-

1. boot.ini options on stick could be easier to be like:

[Boot Loader]
Timeout=10
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Steps 2 and 3- GUI Mode Setup and first start " /FASTDETECT
C:\SETUPLDR.bs="Step1- TEXT Mode Setup (Don't unplug USB drive until after first GUI logon)"

2. For the usbprep.cmd options- I'd rather "dumb" copy all files and folders from source\I386 to ~LS\I386 skipping existing files, instead of having option 0. This doesn't add too much space, USB sticks are bigger and if one would like smaller source, he would do that in advance. It's also safer.

@all- Question- xcopy /d would copy non-existing files to target, I read that if files are NOT newer than 1 day they'd not be copied, is that right? What would happen if one makes a new XP source today, NLite it and use xcopy /D ?

/D:mm-dd-yyyy

Copy files that have changed since mm-dd-yyyy.

If no date is given, the default is to copy

files with a modification date before today.

(at least 1 day before)

http://www.ss64.com/nt/xcopy.html

3. Boot.ini on target drive- the second entry is "USB Repair Microsoft Windows XP Professional", may be is good idea to add "do NOT use to start", or something similar.

4. Option to delete tempimage.img could be nice after unmounting virtual drive.

What do you guys think?

@jaclaz- I wanted to boot from mapped by Grub4Dos floppy image, containing all boot files. Setup keeps looking for bioinfo.sif in ~BT folder. That means for me it does not recognize the mounted floppy as such, but rather as a hard drive.

Then I saw cdob posted some results trying to achieve the same goal, post #189. I am curious if boot files when he was getting BSOD 7B were in ~BT folder or in root. I couldn't go that far when files are in root. For now I'd rather not play again after reading his results.

@tonich-Thanks, nice to see you around.

Good going, ilko! :thumbup

Keep on the great work!

This above applies for all in here :)

regards,

ilko

rdummy.zip

Link to comment
Share on other sites

@wimb- would you add this as an option, the same way we choose source path etc. I didn't want to mess with the batch file.

@ilko_t

I will add to usb_prep.cmd the possibility to use rdummy.sys for Install of Windows XP from USB-IDE Harddisk,

in the way as given by you.

It will take some time, since I like also to test the usb_prep.cmd program with such USB-IDE Harddisk.

I have a 20 GB IDE Harddisk available for testing purposes,

but must first get a suitable USB-IDE HDD case for that.

A few minor suggestions for usbprep.cmd-

1. boot.ini options on stick could be easier to be like:

.....

2. For the usbprep.cmd options- I'd rather "dumb" copy all files and folders from source\I386 to ~LS\I386 skipping existing files, instead of having option 0. This doesn't add too much space, USB sticks are bigger and if one would like smaller source, he would do that in advance. It's also safer.

3. Boot.ini on target drive- the second entry is "USB Repair Microsoft Windows XP Professional", may be is good idea to add "do NOT use to start", or something similar.

4. Option to delete tempimage.img could be nice after unmounting virtual drive.

I can make some minor changes to boot.ini, but it is also important that the numbering of options will fit easily and logically in the boot.ini for the MultiBoot Menu as described in my Guide.

The idea to copy in any case all files and folders from source\I386 to ~LS\I386 is a very good idea.

It is simpler, does not take to much space and moreover the USB-stick XP-source is always more complete.

I will also change boot.ini such that "USB Repair......" option is clearly not meant to be used as Start option,

allthough this choice would not be harmfull.

I think that Delete and Renaming of tempimage.img is easier and better done with the Windows Explorer FileManager.

Quite often instead of Delete, one would like to Rename tempimage.img for future use.

And if not Renamed, than the choice to Delete tempimage.img is offered

on next running of the usb_prep.cmd Batch Program.

Greetings,

wimb

Edited by wimb
Link to comment
Share on other sites

The usb_prep.cmd Batch Program was changed so that it can be used also

for preparing the LocalSource for Install of Windows XP from USB-Harddisk using rdummy.sys

as developed by ilko_t see: http://www.msfn.org/board/index.php?showto...1384&st=421 :thumbup

FOR USB-Harddisk make 1900 MB FAT Partition at beginning of the USB-Harddisk.

Use FAT Format and Set Active OR use PeToUSB to Format such partition.

rdummy.sys makes Fixed USB-Harddisk seen in XP Setup as Removable Device.

XP FAT Format is OK but without Set Active of partition you will get DISK BOOT FAILURE.

USB-Harddisk will get during XP Setup DriveLetter D: and migrate.inf cannot change that.

After First Logon there is only 1 USB-Harddisk partition visible as Removable Drive.

After XP Setup and Reboot for second Logon than

all partitions of USB-Harddisk will become visible as Fixed Local Drives

and the highest partition number of USB-Harddisk will get DriveLetter D:

This reversal and use of DriveLetters might be unwanted and consequently

the use of USB-stick for XP Setup is Preferred, so that this DriveLetter Problem does not occur :)

***** WARNING ***** :ph34r:

HP USB Disk Storage Format Tool 2.0.6 Destroys Partition Table of USB-Harddisk and

cannot be used to Format one single partition of USB-Harddisk.

Using HP Tool makes Data partitions of USB-Harddisk inaccessible !! :angry:

So don't use HP USB Disk Storage Format Tool to Format USB-Harddisk.

The HP Tool is usefull to Format USB-sticks, especially to make a MS-DOS Bootable USB-stick.

Using PeToUSB.exe is SAFE for USB-Harddisk, it can only Format partitions with size less than 2 GB

without destroying the existing partition table, so that Data partitions are still accessible.

Use of usb_prep7.cmd and everything in the Help guides is COMPLETELY at your own risk.

ALL files of cmpnents and i386 folder of XPSOURCE are copied now to $WIN_NT$.~LS LocalSource folder.

XPSOURCE Space Saving Tips see: http://unattended.msfn.org/unattended.xp/view/web/57/

You can Safely Remove in advance the following XPSOURCE folders:

WIN9XMIG, WIN9XUPG and WINNTUPG - This will free up 37.6 MB

LANG - 99 MB and cmpnents - 22.6 MB ( Needed for Tablet PC only )

undoren.cmd and ren_fold.cmd and Customized presetup.cmd for BTS DriverPacks:

First Limited Drive Range for searching TAGFILE is used

to Prevent Windows No Drive Alert due to Cardreader.

For case of Repair Install from USB-Harddisk with Shifted DriveLetters, than Drive with TAGFILE is not found.

In that case Full DriveRange is used for finding TAGFILE.

On Windows XP Repair Setup we get than: No Drive Alert - Press 4x Continue for Cardreader Drives

I did not observe any problem (BSOD) using F3 to Quit from XP Setup,

direct after Delete and Create of Partitions.

Quit with F3 Enables Rebooting a Second time in TXT Mode of XP Setup,

which is necessary after Repartitioning to give DriveLetters their Correct Value.

The Attachment gives the usb_prep7.zip file. GOOD LUCK ! :)

The usb_prep7.cmd Batch Program was tested for Fresh and Repair Install both from USB-stick and

two different USB-Harddisks using a Laptop and a Desktop computer.

Only in the case of Repair Install of Windows XP from USB-Harddisk there are Windows NO Drive Alerts

to be expected due to Cardreaders, which require 4x mouseclick on Continue Button.

Regards,

wimb

usb_prep7.zip

Edited by wimb
Link to comment
Share on other sites

Microsft Deploy let's you install windows xp / vista / server 2008 from a flash drive.

-gosh

Is it in this case possible to use the flash drive repeatedly to make a hardware independent fresh install on different computers ? Or is it necessary to prepare the USB-stick each time for the next install ?

Can you give some more help on how to use this approach for Install of Windows XP from USB flash drive

and do you have a download link for the specific files that you use.

I would like to try the procedure that you propose.

Regards,

wimb

Edited by wimb
Link to comment
Share on other sites

download microsoft deploy from the microsoft download center. I installed it and used it to do an unattended install of xp sp2 from a 1 gig flash drive. MS Deploy let's you add your own apps and hotfixes and custom settings. I only did a basic install to test functionality.

-gosh

Link to comment
Share on other sites

Microsft Deploy let's you install windows xp / vista / server 2008 from a flash drive.

-gosh

Thanks for that, please enlighten us some more :)

As far as I saw it, MS prepares WinPE with the setup source you provide. This WinPE could be booted from USB media, CD or whatever. Or did I miss something?

Unfortunately my fresh installation of Microsoft Deployment keeps freezing when building WinPE ISO, so I couldn't dig much.

@wimb I think you are going to need this:

Microsoft Deployment:

http://download.microsoft.com/download/b/3...Toolkit_x86.msi

It may download the necessary components for you, or get WAIK from here (992.2 MB :w00t: ), extract image and place WAIK MSI and WinPE.zip in the temporary folder, which will be created when you start download via Microsoft Deployment in \program files....

http://www.microsoft.com/downloads/info.as...5-LRMAIK_EN.img

Quoting file names by memory, installation is in my home PC, if you have troubles I can post exact names and paths.

Edited by ilko_t
Link to comment
Share on other sites

@wimb I think you are going to need this:

Microsoft Deployment:

http://download.microsoft.com/download/b/3...Toolkit_x86.msi

get WAIK from here (992.2 MB),

http://www.microsoft.com/downloads/info.as...5-LRMAIK_EN.img

@ilko_t

Thanks for the download link for Microsoft Deployment Toolkit :)

The Results of my first experience with Microsoft Deployment is given below:

You might also need to install additionally:

Microsoft Management Console 3.0 for Windows XP (KB907265) and .NET 2.0

The WAIK .img file was mounted as .iso using DaemonTools, and then Installed using STARTCD.EXE

Then Microsoft Deployment Toolkit was installed.

After Launching the Deployment Workbench, I followed the Information Center > Getting Started Info

After Update Deployment Point, the folder Media\Content was copied to USB-stick.

The USB-stick was previously formatted with PeToUSB and was given a BOOTMGR type Bootsector using:

Open CMD Window and use bootsect.exe to change the bootsector for use with bootmgr

bootsect.exe /nt60 R:

where R: is your USB-stick drive.

In this way I could boot from USB-stick with Windows PE 2.0

After Auto Partitioning and Format, the $ LocalSource folders are generated on Harddisk.

After Restart you have to boot from Harddisk, otherwise only PE is launched.

So instead of Rebooting Windows PE, I shutdown the computer and removed the stick.

Then start the computer without stick and Install of XP Runs as usual,

except for a STOP Alert for giving Administrator Password, which can easily be avoided.

At Windows Logon the stick was asked to be plugged in again to Finish Install.

Well it worked, but the result was UNWANTED and in a way unexpected.

The XP Install claimed the whole disk of my testcomputer for making a new partition.

This means the Partition Table was gone and my 2 Data partitons were inaccessible :angry:

Moreover the disc geometry was quite different from the usual one. :wacko:

The Drive C Bootsector is now sector 2048 (0x800) instead of normally 63 (0x3F) :ph34r:

In CHS terms sector 2048 corresponds to CHS 0 32 33, which is not a head boundary,

whereas sector 63 corresponds to CHS 0 1 1 and the MBR is at sector 0 = CHS 0 0 1

The result is that Partition Magic and Partition Info give a lot of Error Messages and are useless.

Luckily I had a backup of the original MBR with the correct Partition Table,

and the mirror MFT of the new partition was made well below the beginning of my original second partition.

Restoring the original MBR with TinyHexer and then booting with Ghost for System Restore was applied.

After again Rebooting I was able to access my 2 lost DATA partitions :)

This method of XP Install from USB-stick takes at least 10-20 minutes extra time

for booting with Windows PE and making the LocalSource folders on Harddisk.

It is worthwhile to mention that the USB-stick can be used repeatedly, there was no change.

Preparing the USB-stick is also taking much more time than with usb_prep7.cmd

Besides Windows PE (2x) takes a lot of extra space requiring about 300 MB.

So be very carefull and test USB-stick made with Microsoft Deployment

only on test computer without important DATA.

Regards,

wimb

Edited by wimb
Link to comment
Share on other sites

Anyone thinking of GUI ? :rolleyes:

Regards,

ilko

Hmm..., no, sorry. :(

However, I am very partial, not being at all a programmer, to the Wizard's Apprentice:

http://wizapp.sourceforge.net/

the exe is just 70 Kb in size and has all the needed features.

Since the original procedure has been written in batch (no .NET installation required ;) ) it would be very easy to "convert" it in a way that uses this little proggie's features, when compared to other viable solutions (like AutoIT).

wimb, are you reading this? ;)

Have a look at my VDK pseudo-GUI batch that uses it to have an idea of it's potentiality:

http://home.graffiti.net/jaclaz:graffiti.n...ts/VDM/vdm.html

jaclaz

Link to comment
Share on other sites

However, I am very partial, not being at all a programmer, to the Wizard's Apprentice:

http://wizapp.sourceforge.net/

the exe is just 70 Kb in size and has all the needed features.

Since the original procedure has been written in batch (no .NET installation required ;) ) it would be very easy to "convert" it in a way that uses this little proggie's features, when compared to other viable solutions (like AutoIT).

wimb, are you reading this? ;)

Have a look at my VDK pseudo-GUI batch that uses it to have an idea of it's potentiality:

http://home.graffiti.net/jaclaz:graffiti.n...ts/VDM/vdm.html

@jaclaz

Interesting, I will have a look at it.

Thanks a lot. :)

Cheers,

wimb

Edited by wimb
Link to comment
Share on other sites

In usb_prep7.cmd we make the Boot folder $WIN_NT$.~BT by launching winnt32.exe /noreboot ....

When making MultiBoot DVD's with the very handy program Windows XP PowerPacker of Siginet,

I realised that Siginet is using a more sophisticated way to collect the files for the Boot folder.

See also: http://www.siginetsoftware.com/forum/index.php

Siginet makes the Boot folder 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.

Since we copy the complete XP Source to the LocalSource folder $WIN_NT$.~LS

and we can make the Boot folder $WIN_NT$.~BT from the Info in the dosnet.inf file,

it would not be necessary to launch winnt32.exe anymore.

wimb

Edited by wimb
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...