MSFN Forum: How to boot/install from USB key ? - MSFN Forum

Jump to content


  • 25 Pages +
  • « First
  • 14
  • 15
  • 16
  • 17
  • 18
  • Last »
  • You cannot start a new topic
  • This topic is locked

How to boot/install from USB key ? - the historical thread - how it all began

#294 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 07 August 2007 - 07:09 PM

I tried to make an easy way to prepare everything, please find attached an archive, containing all needed files, please excuse my skills in batch scripts, there is probably a lot to be improved in this simple script:

Quick how to:
1. Extract files to a folder of your choice
2. Run PEtoUSB and format stick
3. Run PREPARE.CMD, and follow prompts, pauses are added for troubleshooting
4. When notepad opens WINNT.SIF, delete the whole [unattended] section and add/amend whatever you


That's it, please test it, any feedback is appreciated.
---------------------

Could someone have a look at PREPARE.CMD and add a section to delete the whole [unattended] section in WINNT.SIF, I had no idea how to do it. Feel free to add any improvements i.e. error checking or whatever is needed to polish it, that was beyond my capabilities :)
Some of the batches could be merged at later stage.
For testing prepare.cmd ImDisk comes so helpful :thumbup

Regards,
ilko

Attached File(s)




#295 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 09 August 2007 - 04:42 AM

@ilko_t
I like adding lines to TXTSETUP.SIF at a batch files.
This goes to a end user solution.

Free time: unfortunately I havn't tried hole solution yet.


I dislike possible changed boot sector still.

ilko_t said:

it's just a few things which doent's make any sense to me, please reread the posts above about bootsect.dat and how winnt32 with /syspart changes bootsector, rendering the stick non bootable. If stick is formated by PEtoUSB this doesn't happen.

Winnt32.exe goes back to NT4 times, there was no USB at all. Except some third party drivers.
Used at a not supported environment may get unexpected results.

Don't rely on a unsupported feature. You never know results.

By design Winnt32.exe /syspart makes a internal hard disk bootable.
MBR and boot sector are updated, if it is necessary.
Necessary according to Winnt32.exe rules. This rules may fail at USB.
A boot sector maybe valid by change according to Winnt32.exe rules.

The question:
Use a solution requiring a Winnt32.exe friendly boot sector?
Does all BIOS boot from a PEtoUSB boot sector?
Isn't PEtoUSB limited to FAT16?

My opinion:
A end user friendly solution dosn't require a winnt32.exe friendly boot sector.

You mentioned ImDisk already.
There are other Virtual Disk Drivers too.

What about?
create a virtual disk
winnt32.exe writes to this virtual disk
copy files to USB next

Granted, this may take longer.
But final USB stick may work at more machines.

#296 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 09 August 2007 - 05:28 AM

Totally agree with you.
What I tried in the previous post is to make the steps as few as possible. The way could be always extended to meet specific needs- use HP format tool or whatever makes the stick bootable, usage of virtual disks to avoid winnt32 change of bootsector and messing with the local BOOT.INI etc.
Just need more tests to get the most simple, reliable and universal way, your remarks are always on spot. I believe Jaclaz's analysis of the attached boot sectors will give more light on what is happening and what could be done.

Here is my short "to do" list:

1. Find a virtual disk program, simple to use and not residing in RAM, but rather in a file. Manage this program by prepare.cmd to automate the process.
2. A script, deleting the whole [unattended] section in WINNT.SIF
3. Tests with USB hard disks, I don't have any bootable enclosures to play with. Issues I foresee:
-Text Setup will see it as fixed, list as first, before SATA/IDE disks, rewrite bootsector, possibly render it nonbootable(worst case)
-boot files will be placed on USB disk, instead of the local hard disk, need additional checks in binifix.cmd, for proper entries in the local boot.ini and ntdetect.com/ntldr.
-drive letters may get messed

4. Merge some of the scripts for simplicity

Some of the steps takes me a lot of studying, batch scripting is something very new to me, bootsectors/MBR structure too, and I really feel uncomfortable to ask Jaclaz every second post please this, please that, because I can't do it on my own :blushing:

BTW over 50 000 hits to this thread and only 4-5 active posters :blink:
That was the other reason for the post above and prepare.cmd.

edit: 1) and 2) completed
edit2: 3) completed

This post has been edited by ilko_t: 29 August 2007 - 05:36 AM


#297 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 09 August 2007 - 07:32 AM

@ilko_t
I had a preliminary view at the posted bootsectors and MBR, and I am really puzzled, as I can see no difference that can justify the booting/not booting.

Maybe after all there is nothing connected to MBR/bootsector that causes this behaviour. :unsure:

I'll try building a couple of Virtual disks with those bootsectors and check them....

As cdob hinted, IMDISK, while being an exceptionally GOOD tool, is not suited to work with "full" HD images.

You'd better shift, at least for this kind of testing to Ken Kato's VDK:
http://chitchat.at.i...vmware/vdk.html
(optionally using my pseudo-GUI for it)
http://home.graffiti.net/jaclaz:graffiti.n...ts/VDM/vdm.html

You will need to use .pln file descriptors for geometry of drive, see my posts here:
http://forum.winimag...topic.php?p=938

ilko_t said:

Some of the steps takes me a lot of studying, batch scripting is something very new to me, bootsectors/MBR structure too, and I really feel uncomfortable to ask Jaclaz every second post please this, please that, because I can't do it on my own


Fell free to ask at any time :), whether I can help you or not in a timely fashion it depends on the amount of free time I can set aside for this :rolleyes: , however, the more you study and learn and the more you will see how there is nothing "magic" about anything computer related, everything can be, before or later, tracked to a cause, and (hopefully) a workaround or fix, even for the queerest of "behaviours" can be found, if only the same thing could be applied to "real" world.

jaclaz

#298 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 09 August 2007 - 12:09 PM

View Postjaclaz, on Aug 9 2007, 02:32 PM, said:

@ilko_t
I had a preliminary view at the posted bootsectors and MBR, and I am really puzzled, as I can see no difference that can justify the booting/not booting.
Could I help with anything else? Give me any ideas what I could do on my side.

View Postjaclaz, on Aug 9 2007, 02:32 PM, said:

Maybe after all there is nothing connected to MBR/bootsector that causes this behaviour. :unsure:
What else could matter for bootability? Could it be something beyond MBR/bootsector?


View Postjaclaz, on Aug 9 2007, 02:32 PM, said:

You'd better shift, at least for this kind of testing to Ken Kato's VDK...
Thanks for it, prepare.cmd is redone, now it creates a virtual disk, formats it, makes WINNT32 to place all files there, amends the needed files and copies all on USB stick. Tested it with 2 XP sources- worked fine. A lot is to be polished, step by step. An archive containing all needed files is attached.


View Postjaclaz, on Aug 9 2007, 02:32 PM, said:

Fell free to ask at any time :), whether I can help you or not in a timely fashion it depends on the amount of free time I can set aside for this :rolleyes: , however, the more you study and learn and the more you will see how there is nothing "magic" about anything computer related, everything can be, before or later, tracked to a cause, and (hopefully) a workaround or fix, even for the queerest of "behaviours" can be found, if only the same thing could be applied to "real" world.

jaclaz
Thanks, the information coming from you is usually like a waterfall, one can hardly drink that much at a time :w00t:



edit1: _prepare.cmd updated, now deletes the whole [unattended] section in winnt.sif

Attached File(s)


This post has been edited by ilko_t: 10 August 2007 - 09:33 AM


#299 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 10 August 2007 - 11:38 AM

It's my turn to take a few days off-line.

@ilko_t

ilko_t said:

Could I help with anything else? Give me any ideas what I could do on my side.

Unfortunately I have no definite ideas at the moment. :(
I have re-checked the MBR/bootsectors you posted, and though I had no time to completely test them in VM's, I have reinforced my "feeling" that something else might be involved in the non-booting problem.
The only "strange" thing I have found is the number of reserved sectors on FAT16 formatted bootsector, 08, which is "normal" for FAT32, but that is normallly 01 for FAT16, at least on DOS and NT/2K formatted partitions, I need to try what happens under XP to make sure.
I hope to have time to do so on my portable while on vacation.
So, since the only other two things needed for booting (to an error message) are NTLDR/SETUPLDR.BIN and NTDETECT.COM, maybe there are some changes to them? :unsure:
Any other missing/wrong file should generate a definite error message.
Please post the error message you got (if any) when NOT booting, it could help on pinning down where the problem might lie.

The ideas by cdob, as always ;), make sense, it is possible that some part of WINNT32.EXE does not "recognize" the usage of the Filter, accessing the drive directly or whatever.

Another thing you could try could be using instead of the Hitachi Filter, the dummydisk.sys driver from CodeProject:
http://www.911cd.net/forums//index.php?sho...181&st=1954

jaclaz

#300 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 11 August 2007 - 06:19 AM

Have a nice holiday jaclaz, enjoy it :hello:

#301 User is offline   iceangel89 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 453
  • Joined: 10-February 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 August 2007 - 06:35 AM

hi,

i am thinking of doing a boot from HDD, but yes i think some may think its a bit impossible that since i do not have much experience doing such things... but hope some1 can give me a guide here?

jaclaz, nice to see u helping me so much, but maybe its better to have "guides" instead of reading hundreds of posts... but still it helps, or try to tell me which post ;)

This post has been edited by iceangel89: 11 August 2007 - 06:37 AM


#302 User is offline   Legolash2o 

  • Windows 7 Toolkit Programmer
  • PipPipPipPipPipPip
  • Group: Members
  • Posts: 1,129
  • Joined: 09-February 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 August 2007 - 03:24 PM

thx been looking for this

#303 User is offline   iceangel89 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 453
  • Joined: 10-February 07
  • OS:Windows 7 x64
  • Country: Country Flag

Posted 11 August 2007 - 08:49 PM

can some1 tell me how to do this? or which post/page has the answer?

reading through so many posts and cant seem to get anything done

#304 User is offline   jaclaz 

  • The Finder
  • Group: Developers
  • Posts: 11,447
  • Joined: 23-July 04
  • OS:none specified
  • Country: Country Flag

Posted 13 August 2007 - 04:11 AM

iceangel89 said:

can some1 tell me how to do this? or which post/page has the answer?

reading through so many posts and cant seem to get anything done



Links to the most relevant posts (link already given, here):
http://www.boot-land.net/forums/index.php?...ic=2807&hl=
are in this post :
http://www.msfn.org/...opic=99453&st=3

Last one is here:
http://www.msfn.org/board/index.php?showto...1384&st=293


Eventually, and that means WHEN everything will be found to be working and it will be tested, ilko_t will publish a complete guide, but there is NO "road-map" established, it may happen in the next 15 days as well as in the next 15 months, this procedure is something experimental and everyone contributing to it do so in their spare time, so please, do not ask for a release date, just wait and check back once in a while or experiment with info already provided.
Check this:
http://www.msfn.org/board/index.php?showto...1384&st=273

By the way, it is rather amazing how at this moment the thread had 51,818 views and the number of people that have actually contributed or gave a useful feedback can be counted on fingers without taking one's shoes off.... :whistle:
To provide a solution that works on the most hardware we need some people that test the procedure on their hardware and report problems or success.

jaclaz

This post has been edited by jaclaz: 13 August 2007 - 04:13 AM


#305 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 18 August 2007 - 02:59 AM

The automatic making of a bootable USB-stick for Install of Windows XP using prepare2.zip was tested.
Collecting files in a Virtual Disk and file editing with Fedit.exe are very handy in this approach :)

Fresh and Repair Install of Windows XP from the bootable USB-stick was realised successfully,
after some modifications in the _prepare.cmd file as described below:

For my version of XP it was necessary to remove the :all option in the winnt32.exe command.
Otherwise in making the LocalSource I get Error messages for missing files: tabletpc.cab and mediactr.cab

The /h /k option is not valid in the copy command, but gives no problem.

MakeBS3.cmd .... was replaced by CALL MakeBS3.cmd ....
in order to see the messages and to return to the following statements in the _prepare.cmd ;)

It is interesting to integrate also CALL MkMigrateInf of cdob for giving the USB-stick drive letter U:
because without it the USB-stick gets the unwanted drive letter D:
and consequently the drive letters of other partitions on the harddisk are changing.

Fedit.exe was used in _prepare.cmd to make
the for the Repair option necessary change in the presetup.cmd of BTS DriverPacks.

The btinifix4.cmd was made ready for unattended install by removing the pause and the YES confirmation.

I think the automatic approach is very worthwhile and removes the previous risc of someone forgetting
to reset boot.ini after the winnt32.exe command, resulting after reboot in an unexpected install of Windows XP.

This post has been edited by wimb: 18 August 2007 - 03:12 AM


#306 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 18 August 2007 - 06:22 AM

Hi wimb :)

Here are some results in my tests:

View Postwimb, on Aug 18 2007, 09:59 AM, said:

For my version of XP it was necessary to remove the :all option in the winnt32.exe command.
Otherwise in making the LocalSource I get Error messages for missing files: tabletpc.cab and mediactr.cab
It's tricky, if :all is not used some folders are not copied, e.g. when preparing MCE and GUI setup will complain about missing files/folders. If it is used some files cannot be found by WINNT32 as it is looking at the wrong place for them, for example test with DELL XP Home SP2:
Here is part of TXTSETUP.SIF:

Quote

[SourceDisksFiles]
.......
startoc.dll = 100,,,,,,,32,0,0
startoc.inf = 100,,,,,,,20,0,0
startoc.cat = 100,,,,,,,,3,3
startoc.cab = 2,,,,,,_x,,3,3

Part of LAYOUT.INF:

Quote

[SourceDisksFiles]
.............
startoc.dll = 100,,22016,,,,,32,0,0
startoc.inf = 100,,109098,,,,,20,0,0
startoc.cat = 100,,167601,,,,,,3,3
startoc.cab = 2,,8672998,,,,_x,,3,3


And part of DOSNET.INF

Quote

[Files]
...........
d1,startoc.dll
d1,startoc.inf
d1,startoc.cat
d2,startoc.cab


startoc.cab is the only file, not found by WINNT32, and it's the only 1, which differs from others in it's source description. Why they did it like that I have no idea, however I'd rather make a note of the files not found and manually copy them after _prepare.cmd, than not copying whole folders (:all switch).
On generic XP SP2 situation is fine, no funny files or folders, but with different sources we can expect all kind of errors, because of the many ways OEMs integrate their stuff and WINNT32 fails to replicate the exact CD structure.

View Postwimb, on Aug 18 2007, 09:59 AM, said:

The /h /k option is not valid in the copy command, but gives no problem.
That was xcopy before, forgot to remove redundant switches :blushing:


View Postwimb, on Aug 18 2007, 09:59 AM, said:

MakeBS3.cmd .... was replaced by CALL MakeBS3.cmd ....
in order to see the messages and to return to the following statements in the _prepare.cmd ;)
Told you I am newb with scripts, didn't know how to avoid that :rolleyes: Thanks.

Quote

It is interesting to integrate also CALL MkMigrateInf of cdob for giving the USB-stick drive letter U:
because without it the USB-stick gets the unwanted drive letter D:
and consequently the drive letters of other partitions on the harddisk are changing.
Here is tricky too, please read the results with USB hard disk bellow. USB stick getting C: is a good indication that something is wrong and stick will be rendered non bootable during TXT Setup because is seen as first disk- abort setup. If it's preset to U: you will not get that. Better fix drive letters later.

Quote

Fedit.exe was used in _prepare.cmd to make
the for the Repair option necessary change in the presetup.cmd of BTS DriverPacks.

The btinifix4.cmd was made ready for unattended install by removing the pause and the YES confirmation.
Would you attach the edited files please.

I also added simple check if winnt.sif don't exist on source not to use /unattend switch:

IF EXIST %instpath%\i386\winnt.sif (
%instpath%\i386\winnt32.exe /noreboot /makelocalsource:all /syspart:%tempdrive% /tempdrive:%tempdrive% /unattend:%instpath%\i386\winnt.sif
) ELSE (
%instpath%\i386\winnt32.exe /noreboot /makelocalsource:all /syspart:%tempdrive% /tempdrive:%tempdrive% 
)
If you can make it better please add it as well in the files to be attached.
-------------------------------

Some results with USB hard disk- unfortunately I couldn't make it work without deleting source files. USB hard disk is seen as first disk and gets letter C:, dispite the fact it's listed as second in list and TXT Setup attempts to place boot files on it. If it's write- protected by migrate.inf SETUP complains about damaged hard drive D:

Quote

Setup has determined that Drive D: is corrupted and cannot be repaired
Same behavior was desribed in post #130 , when in mixed SATA/IDE environment USB stick is seen as first bootable device, this was fixed by disabling IDE controllers or removing attached devices from them, but here I had only 1 IDE hard disk and the USB one.

Remove the write- protection form migrate.inf- no more complains, but all boot files go on USB disk and the files being copied to destination are deleted from source.
Make USB disk U:- same story.
Tests made with 2 different USB-IDE adapters and IDE disk as destination- same results.

Because the files deleted during TXT Setup are from ~LS folder I tried to keep ~BS for the TXT part and force Setup to look for source files in other folder- I386 copied on USB disk. This articles give some clues:
http://support.microsoft.com/kb/150497
http://technet2.microsoft.com/windowsserve...3.mspx?mfr=true

I have tried to change TXTSETUP.SIF to
[SetupData]
SetupSourcePath = "\"
SetupSourceDevice = \device\harddisk0\partition1
MajorVersion = 5
MinorVersion = 1
Also \ to \i386, with and without quotes and spaces to no avail- "Setup cannot format the hard drive- CD is damaged" meaning cannot find files on source destination. TXTSETUP.SIF is in root and in I386.

WINNT.SIF:
[Data]
Autopartition=0
UnattendedInstall="Yes"
floppyless = "1"
msdosinitiated = "0"
OriSrc = "\device\harddisk0\partition1\i386"
EulaComplete="1"
winntupgrade="no"
win9xupgrade="no"
Win32Ver="a280105"
uniqueid="C:\WINDOWS\JAL"
OriSrc="\device\harddisk0\partition1"
OriTyp="3"
unattendswitch=yes
sourcepath = \device\harddisk0\partition1\i386
floppylessbootpath=\Device\HardDisk0\partition1
[SetupData]
OSLoadOptionsVar="/noexecute=alwaysoff"
SetupSourceDevice = "\device\harddisk0\partition1"
floppyless = "1" and msdosinitiated = "0" were tried in all combinations, some funny lines were added to experiment, actually in over 20-30 attempts to change/remove lines I had no luck. No idea if it's by design like that or am missing something. May be Setup detects that has not been started from RIS ignoring paths and keeps searching for files in ~LS folder.

Another dumb idea- copied the contents of CD on USB disk, leave boot files to invoke SETUPLDR.BIN and amend WINNT.SIF and TXTSETUP.SIF(copied on root and I386) for other source paths- no luck again- BIOSINFO.INF cannot be found in ~BT folder, so it's either hard coded when booted from hard disk to search there, or I am missing something.
I am taking a break from USB hard disks for now, at least until someone gives better ideas.
May be a way to make USB hard disk seen as removable? AFAIK this could be done by using driver patching on the fly the removable bit which seems too hard for the purpose, or I am wrong?


Regards,
ilko

#307 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 18 August 2007 - 12:10 PM

Hi ilko :)

From your experiments with Install of windows XP from bootable USB-harddisk,
I understand that in this case the problems are rather complex and perhaps difficult to overcome.
For the moment it is indeed better to focus on using the bootable USB-stick for this purpose,
and we are lucky that everything is working so well for the USB-stick :thumbup

When the :all option is used in the winnt32.exe command,
I can simply manually overrule the missing of tabletpc.cab and mediactr.cab for my case of XP Professional.
We might also introduce the :all option as a user selectable option for use with different XP sources.

When the LocalSource was made with option :all, I had no problems during the install of Windows XP.

The use of MkMigrateInf.cmd might also be a user selectable option,
so that for simple cases the advantage of drive letter U: for the USB-stick is available.
But I agree with you that this must not be the default choice,
because you explained quite well the disadvantage of using always U: for the USB-stick.

As attachment you will find prepare3.zip with the slightly modified _prepare3.cmd and binifix4.cmd
The EXIST winnt.sif Check that you made, is also included in the _prepare3.cmd :)

Regards,

wimb

Attached File(s)



#308 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 21 August 2007 - 09:44 AM

Hi ilko :)

The batch program for making a bootable USB-stick for Install of Windows XP,
was further improved and renamed to usb_prep.cmd ( see attachment ).

Now User options with choice of Source and Target Drive are selectable at the beginning in a Start Menu.

MkMigrateInf2.cmd of cdob was slightly edited so that it is available as a Selectable option
using a CALL from the batch program.

Some more security checks on drives and files were also included.

The type of XP Source being either Home / Professional OR Media Center/Tablet PC Edition
is selectable and determines the :all option in the winnt32.exe command for making the LocalSource.

I found some handy sites with a lot of information for making batch programs:

http://www.ss64.com/index.html
http://www.robvander....com/index.html
http://www.microsoft.com/resources/documen...h.mspx?mfr=true
http://www.allenware.com/
http://www.computerhope.com/batch.htm

Regards,

wimb

Attached File(s)



#309 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 876
  • Joined: 29-September 05

Posted 21 August 2007 - 01:09 PM

@ilko_t and wimb
to prepare3, haven't tried usb_prep.cmd yet.
Congratulations, does work as builded.
Windows installation files are perpared in vitual disk and copied to USB drive.
Installation does work. Windows does boot. No files are delete at USB drive.

But allow me to play the bad guy (a sophisticated end user, the worst customer):
Next I installed windows at folder c:\windows51. First reboot failed.
Obviously boot.ini at USB stick dosn't match:
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Mode Setup" /FASTDETECT

This failed:
\$WIN_NT$.~LS\$OEM$\CMDLINES.TXT
[COMMANDS]
"binifix4.cmd C:"
Do I use false files? How to run binifix?.cmd at end of textmode setup?
First reboot should work at c:\windows51 too.

Another example:
c:\boot.ini
d:\windows
How to support this? Do we restrict to c:\windows only?

Three suggestions to _prepare.cmd:
Ask temporary image size in megabytes
I prefer OS internal solutions. Third party tools if internals fail. Use fsutil instead of fsz. Fsutil.exe is a default XP application.
format /Q: Quickformat

Quote

ECHO Please enter temporary image size in MB, according to your source size:
ECHO e.g.: 600
SET /P imgsize=

ECHO.
ECHO closing existing virtual drives if any...
vdk.exe remove

REM to be improved...
IF EXIST tempimage.img (del tempimage.img) ELSE echo tempimage.img was not found, creating a new one...
set /a imgsize*=1024*1024
fsutil.exe file createnew tempimage.img %imgsize%

...

ECHO temprary drive created, lets format it
ECHO.
format %tempdrive%: /FS:fat32 /v:TempDrive /Q
In addition there is a undocumented 'format /Y' as YES. A end user dosn't have to confirm format.
Contrary a end user might select a false drive by accident.
Don't use 'format /Y'. A end user has to confirm format always.


USB stick get C: too, if you use a brand new hard disk (no partitions).
If need be you don't have to use U:, another letters are possible too.
A third parameter goes to migrateinf.cmd

#310 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 22 August 2007 - 05:38 AM

Hi cdob,

View Postcdob, on Aug 21 2007, 08:09 PM, said:

Next I installed windows at folder c:\windows51. First reboot failed.
Obviously boot.ini at USB stick dosn't match:
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Mode Setup" /FASTDETECT
Can you think of simple way to adjust boot.ini on stick to match everyone's needs? May be if we include in usb_prep.cmd questions like "do you plan to install XP in folder other than default \WINDOWS?", "do you plan to install it on partition/disk other than first hard disk, first partition" and amend BOOT.INI on stick accordingly?
My opinion is this way of installing Xp from USB requires some user intervention, adjusting to one's specific needs. May be some info could be displayed about this issue in usb_prep.cmd. Another way is to revert back to Grub4Dos and invoke NTLDR on hard disk, in this case mapping should be used, which restricts us in the same way, because of the different drive/partition numeration. So we'd need to amend menu.lst, instead of BOOT.INI on stick. Can't think of any other way to avoid that.

View Postcdob, on Aug 21 2007, 08:09 PM, said:

This failed:
\$WIN_NT$.~LS\$OEM$\CMDLINES.TXT
[COMMANDS]
"binifix4.cmd C:"
Do I use false files? How to run binifix?.cmd at end of textmode setup?
Is binifix4.cmd in the same folder as cmdlines.txt? Did it start at all? Any backup files in C: of boot.ini?

Quote

First reboot should work at c:\windows51 too.
As long as BOOT.INI on USB stick points to that path.

Quote

Another example:
c:\boot.ini
d:\windows
How to support this? Do we restrict to c:\windows only?
I don't foresee issues with that, other than adjusting BOOT.INI on stick to partition(2) and changing WINDOWS to whatever it would be. BOOT.INI on hard disk is created by TXT Setup and only rdisk value adjusted by binifix.cmd to -1.

Quote

Three suggestions to _prepare.cmd:
Ask temporary image size in megabytes
I prefer OS internal solutions. Third party tools if internals fail. Use fsutil instead of fsz. Fsutil.exe is a default XP application.
format /Q: Quickformat

Quote

ECHO Please enter temporary image size in MB, according to your source size:
ECHO e.g.: 600
SET /P imgsize=

ECHO.
ECHO closing existing virtual drives if any...
vdk.exe remove

REM to be improved...
IF EXIST tempimage.img (del tempimage.img) ELSE echo tempimage.img was not found, creating a new one...
set /a imgsize*=1024*1024
fsutil.exe file createnew tempimage.img %imgsize%

...

ECHO temprary drive created, lets format it
ECHO.
format %tempdrive%: /FS:fat32 /v:TempDrive /Q
In addition there is a undocumented 'format /Y' as YES. A end user dosn't have to confirm format.
Contrary a end user might select a false drive by accident.
Don't use 'format /Y'. A end user has to confirm format always.
Nice to see that option in fsutil.exe :) Thanks :thumbup

Quote

USB stick get C: too, if you use a brand new hard disk (no partitions).
If need be you don't have to use U:, another letters are possible too.
My point was that seeing that stick gets C is clear indication to abort SETUP, if it's preset you won't see that, it's not about available drive letters. Your point about non partitioned hard disk is valid, on first though what about if we delete MountedDevices key during GUI SETUP, thus forcing XP to re-enumerate the letters at first logon? Need to study this option further, or just use migrate.inf as you say, and find another indication that something is wrong- abort setup.

Quote

A third parameter goes to migrateinf.cmd
Sorry, I didn't get that. You changed mkmigrate.inf to include an option what letter to be given? Would you attach it please if it is so.

@wimb- good job :thumbup

#311 User is offline   wimb 

  • Senior Member
  • Group: Developers
  • Posts: 633
  • Joined: 21-March 07

Posted 22 August 2007 - 09:23 AM

@cdob
Install of XP Windows from the bootable USB-stick
next to WINDOWS on the same or on a different partition of the harddisk,
was realised successfully by proper manually adjustment in advance of the BOOT.INI file of the USB-stick.

Ilko_t already indicated that for Install on the second partition,
adjusting BOOT.INI on stick to partition(2) is sufficient, and I can confirm that.

So these non-standard installs are still possible,
but require only small changes in the BOOT.INI on the stick in advance.

For a brand new harddisk it is always advisable to reboot the computer after creating partitions with TXT mode Setup.
So in this case one boots twice in the TXT-mode Setup, so that after the reboot drive letters get their correct value.

It is a very good idea to use fsutil.exe instead of fsz.exe and to use QuickFormat of the TempDrive.

When making the TempImage, the binifix4.cmd is written in winnt.sif as [GUIRunOnce] command,
and so it should be removed from your CMDLINES.TXT

@ilko_t
MigrateDrive is set in MkMigrateInf2.cmd fixed at U:
but can also be set to a different value by giving in the CALL a third parameter e.g. R:
But in the Setup procedure a fixed value of U: in MkMigrateInf2.cmd seems OK to me.

This post has been edited by wimb: 22 August 2007 - 09:29 AM


#312 User is offline   Hitman47 

  • Group: Members
  • Posts: 4
  • Joined: 21-August 07

Posted 22 August 2007 - 11:44 AM

I created a bootable WinXp sp2 USB pendrive using the 'usb_prep.zip' posted 3 posts above. The usb drive was created perfectly without any errors. Some of my parameters i selected are:

i started the usb_prep.cmd and did this:

1: type as [home/prof]
2:copied all folders/files from winxp cd to a forlder 'd:\winxp' and selected it as source
3:virtual temp drive as v:
4:target usbdrive as k:(as shown in my computer )

My pendrive is Transcend Jetflash JF V30 / 2GB (and formatted before this procedure)

all steps went properly, all files copied to usb without error , at the end i selected for SATA Hdd

Then after making this usb drive i restarted my PC and selected USB as first boot device. The usb drive is detected by BIOS. After the POST, the PC attempts to boot from USB but nothing happens, it waits there for 2-3mins with all the previous POST messages on display and then proceeds to boot from the HDD.

Why doesnt it boot from USB when everything i did is correct???

#313 User is offline   ilko_t 

  • MSFN Addict
  • Group: Super Moderator
  • Posts: 1,605
  • Joined: 06-December 06
  • OS:none specified
  • Country: Country Flag

Posted 22 August 2007 - 12:07 PM

View PostHitman47, on Aug 22 2007, 06:44 PM, said:

My pendrive is Transcend Jetflash JF V30 / 2GB (and formatted before this procedure...
That's the important part, how did you format it, from within XP using XP format? What file system?
Try formatting it using PEtoUSB or HP Format tool, links are in this thread or use GOOGLE. In the archive attached in post #294 PEtoUSB is included.
When you format it copy on USB stick ONLY ntdetect.com, NTLDR from your XP source, and create BOOT.INI in USB stick root:

BOOT.INI
[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="TEST" /FASTDETECT 
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="TEST 1" /FASTDETECT


Start the PC and if you see the menu, your stick is ready- format it again and use usb_prep.cmd
PEtoUSB has an option for LBA, use it first, if doesn't boot use without that option.
HP format too can format in FAT16 and FAT32- find which one works for you.

This post has been edited by ilko_t: 22 August 2007 - 12:08 PM


Share this topic:


  • 25 Pages +
  • « First
  • 14
  • 15
  • 16
  • 17
  • 18
  • Last »
  • You cannot start a new topic
  • This topic is locked

10 User(s) are reading this topic
0 members, 10 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2013 msfn.org
Privacy Policy