Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

How to boot/install from USB key ?


  • This topic is locked This topic is locked
485 replies to this topic

#276
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
@biohead- I believe your answers are here:

http://blogs.msdn.co.../12/464304.aspx
http://www.msfn.org/...showtopic=31936

Are you using 2 CDs, or a modified one?
I have just installed MCE without a hitch from Dell CD (one only). Used

winnt32 /makelocalsource:all /noreboot

If you have other specific folders on your CD make sure you copy them to the appropriate place on the USB stick.
If you have custom winnt.sif on the CD use /unattend:winnt.sif switch too, do not forget to delete redundant entries, i.e. the whole [unattended] section.

If you have answered the questions me and jaclaz asked you before, you could have saved me a couple of hours ;)


@jaclaz- using binifix3.cmd gives me errors, drive letter is set to W, which is not present, script aborts. When you get some spare time could you have a look and also implement the other 2 changes from the post above?

ilko

edit: ahh silly me, shall I change W with C, or this can be done other way, with variables?

Edited by ilko_t, 02 August 2007 - 07:28 PM.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB



How to remove advertisement from MSFN

#277
wimb

wimb

    Senior Member

  • Developer
  • 678 posts

@all- what do you think will be easier for novices- make a custom bootsector using jaclaz's script and use only ntldr/boot.ini or the way it was- using Grub4DOS for the TXT part?

Launching TXT-mode Setup direct from boot.ini Menu is faster and more logical, and in my opinion the better choice.
Once making the custom bootsector is automated, it is not to difficult for a novice.

Perhaps the most difficult step in the whole procedure is the making of the LocalSource with the winnt32.exe command. There a novice might need some more support of what is actually occurring and what answers he has to give. Especially it is important to mention that the Setup procedure is taking only a few minutes ( instead of 59) and that one returns to the existing installation. Resetting boot.ini as mentioned already is of course very important.

Edited by wimb, 03 August 2007 - 12:41 AM.


#278
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag
ilko_t

Welcome back! :)

Jaclaz, have you updated the script?

No, I was waiting for you to get back, I'll do it in the next few days.

About drive letter, it can ALREADY be given as a parameter, as in
binifix3.cmd C:
though there is no real (at the moment) parameter checking routine, the hardcoded "W" is just for testing, BOOT.INI should always be on the C: drive, at the time the batch is run. :unsure:

jaclaz

#279
Trasp

Trasp
  • Member
  • 1 posts
Sorry, i'm in a hurry, haven't read the whole topic but this is how i did it.

Format the drive with HP USB Disk Format Tool using WIN98SE bootdisk (FAT16)

Include these files: attrib.exe
config.sys
edit.exe
fdisk.exe
format.com
himem.sys
smartdrv.exe
xcopy32.mod (Dunno if this one is needed really, but i've always added it anyway)
xcopy.exe


Copy the folder prepared by nLite to the drive (I named my folder WIN)

Boot the USB-Drive (DOS)

Run: C:\SMARTDRV
Run : C:\FDISK
Create a primary partition large enough to hold the system and install. (5GB should be enough)

Reboot to USB (DOS)

Run: C:\SMARTDRV
Run: C:\FORMAT D:

Run: C:\WIN\I386\WINNT.EXE /s:C:\WIN\I386 /u:C:\WIN\I386\WINNT.SIF
(Run setup with the options /s:SourceFolder [/t:TempDrive] /u:Unattended)

MAKE SURE TO USE FAT32 FILESYSTEM
(If you want to, you can convert to ntfs later, just google it)

Reboot to USB (DOS)

Run attrib -h -s -r D:\BOOT.INI
(Removes the attributes hidden, system and read-only)

Run: C:\EDIT D:\BOOT.INI
(Edit to fit your computer, you will probably need to replace rdisk(1) with rdisk(0))

Run: attrib +h +s +r D:\BOOT.INI
(Adds the attributes hidden, system and read-only)

Remove the stick, reboot and finish the install.

PS. I don't know why but i never got the themes to be copied correctly
.



#280
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag

Sorry, i'm in a hurry, haven't read the whole topic but this is how i did it.

Yep, you did not :whistle: , that method is using DOS + WINNT.EXE, this thread is related to direct install.

A slightly different DOS + WINNT.EXE howto is here:
http://www.911cd.net...o...c=16713&hl=

jaclaz

#281
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag
Please find attached binifix4.cmd

I made a few changes, now it should do everything needed:
1) If you invoke it without parameters it will ECHO usage instructions and ask for a drive letter
2) It will take current "default" entry and add it to the end of the newly made boot.ini editing the description from, say:

Windows XP Professional

to

[OLD Default] Windows XP Professional


Let me know if it works for you the expected way.

Also, once it is confirmed to be working, we could delete the "YES" confirmation, add something like a "/noold" parameter to avoid the [OLD Default] entry, and suppress "informative" messages.

jaclaz

Attached Files



#282
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
I've been playing with winnt32 parameters to make the install easier. Here are some results:

1. Stick formated in FAT16, Hitachi driver used
2. Copy from XP SP2 ntldr, ntdetect.com, setupldr.bin and the custom boot.ini to the stick BEFORE anything else.
3. From I386 folder run

winnt32 /noreboot /makelocalsource:all /syspart:U /tempdrive:U /unattend:winnt.sif

/makelocalsource:all instructs Winnt32 to copy all additional folders as described in DOSNET.SIF. Could be useful to edit it in order to include/exclude files/folders to automate the process.

/unattend:winnt.sif - useful when you have custom winnt.sif, if the needed answers are included Winnt32 carries out the process without a single prompt.
If used the whole [unattended] section must be deleted afterwards, otherwise TEXT Setup will attempt to install on USB stick and recovery console won't be given as option.

/syspart:U /tempdrive:U prepares the drive given for next stage and copies all necessary files and folders. NTLDR gets replaced by SETUPLDR.BIN, renamed to NTLDR.
The custom BOOT.INI gets backed up as BOOT.BAK and a new one, including entries from the old is written:

BOOT.INI before Winnt32 is launched
[Boot Loader]
Timeout=30
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Setup" /FASTDETECT

BOOT.INI after Winnt32:
[Boot Loader]
Timeout=5
Default=C:\$WIN_NT$.~BT\BOOTSECT.DAT
[Operating Systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Setup" /FASTDETECT
C:\$WIN_NT$.~BT\BOOTSECT.DAT="Microsoft Windows XP Professional Setup"

BOOTSECT.DAT is not created in C:\$WIN_NT$.~BT\, nor the folder is, nor in U:\$WIN_NT$.~BT\, TXT Mode will be launched by the renamed SETUPLDR.BIN anyway. Why it creates this entry is still unknown for me, may be for the GUI part, but when BOOTSECT.DAT will be created...? Perhaps during TEXT mode? Hard to test that as stick will be write-protected.

Winnt32 also changes the bootsector on USB stick, however stick is still bootable. Copies of bootsectors before Winnt32 and after are attached, for stick formated in XP with FAT16 and FAT32.

Jaclaz, please, will you have a look what was changed, and if you have an explanation why. I'll be testing the new BINIFIX tomorrow, thanks for it.

NTLDR (the renamed setupldr.bin one) must be rewritten with normal NTLDR in order to use boot.ini.

txtsetup.sif is put on root by Winnt32, no need to manually copy it.

4.Used Jaclaz's makeBS.cmd to add a new entry in boot.ini and get a patched for SETUPLDR.BIN boot sector. No issues at all.
Please don't forget to put a new copy of NTLDR on root, replacing the renamed setupldr.bin. Also setupldr.bin MUST be copied on stick right after format, or it may not be visible for the boot sector.

In this way I believe would be much easier to perform preparation, even at some point by a script, as not too much is to be changed/added.

Sorry if I made it too detailed, trying to be as much informative as possible.

ilko

Attached Files


Edited by ilko_t, 04 August 2007 - 10:20 AM.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#283
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag
@ilko_t
Checked the bootsectors, NO problems, everything is cool, results attached in a .xls file. :)

However you lied :w00t: to me ;)

You did not use the SAME procedure with FAT16 and FAT32, as the bootsectors in FAT16 have a different Volume Serial, whilst the ones in FAT32 have the same one.

There must have been a FORMAT between "snapshotting" :unsure:
FAT16_BootSector_Before.dat
and
FAT16_BootSector_After.dat

(I won't believe that the same operation happened with FAT32 ones and the semi-random routine that calculates Volume Serial gave two times the same number :ph34r: )

jaclaz

Attached Files



#284
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
You got me :D

There could have been a format between snapshotting, however I am pritty sure the copies I have were made before and after Winnt32, which changes something in bootsectors. I am interested why and what actually was changed, as this affects sometime stick's bootability.
I still cannot recreate the results every time. There must be something wrong I am doing between steps. Once I get everything working fine, next time stick won't boot at all, using the very same procedure. It could be the way I select boot files to copied, or have to fill the stick with FF, no idea yet. Will carry on tomorrow figuring out what's happening.
Why winnt32 changes bootsector? And what exactly it changes, please as for novice in this field? Please ignore serials :)

Edited by ilko_t, 04 August 2007 - 11:58 AM.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#285
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag

Why winnt32 changes bootsector?
And what exactly it changes, please as for novice in this field?

The only reason I can see is that if some kind of error is found, instead of the default message:

NTLDR is missing

this one is shown:

Remove disks or other media


Maybe it is derived by our "unconventional" method :unsure:, maybe setup "senses" that the USB stick is a Removable device and changes the bootsector to one "appropriate" :w00t: for this kind of devices.

All other changes, as detailed in the .xls files are consequence of the different length of this message.

However, the "After" bootsectors appear to be valid so I would not worry too much about it. :)

jaclaz

#286
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
@jaclaz

About binifix4.cmd- used it from winnt.sif

[GuiRunOnce]
"%systemdrive%\windows\system32\undoren.cmd"
"%systemdrive%\windows\system32\binifix4.cmd C:"

I see the proper massages, answer YES to replace original boot.ini with boot.txt and get "the system cannot find the file specified. Could not find c:\windows\system32\boot.txt.", boot.txt is in root and looks ok, with all needed entries.

About boot sectors- still having issues after winnt32 is run and files put on stick.
Using Hitachi driver and format stick from XP no matter FAT16 or 32, copy ntldr, boot.ini and ntdetect.com - boots ok to boot.ini

Run winnt32 with parameters to put files directly on stick- cannot boot stick at all, no matter FAT16 or 32, nor if boot files copied before or after winnt32.
Interestingly, yesterday I managed somehow to make it working this way using FAT32, and the same routine, no flipping idea what it wants. Could try reverting bootsectors, but am tired of this.

Format stick with PEtoUSB- no matter seen as fixed or removable, use the very same procedure to prepare stick, both boot files copied before or after winnt32 and all work great.
MBR seems the same, geometry reported by PTEDIT32 is the same in all cases, bootsector changes the same way as when formated by XP and Hitachi driver used, but this time I get NO hangs at boot :wacko:
Anyway, will not keep trying format from XP, PEtoUSB does the job for me.

Another question- any idea what could be the variable path for the USB stick during GUI part?
I'd like not to copy boot_ren.cmd, undoren.cmd and binifix.cmd to system32 and edit txtsetup.sif, but rather put then on stick and call them directly from the relevant entries in winnt.sif.
Could be done easily if the same letter is assigned to USB stick, but to make it universal variable path would be nice.

@silacomalley- thanks for tip, I' ve been using Hitachi microdrive driver for a long time, never got permanent results about stick bootability, PEtoUSB and HP format tool always worked fine for me.


ilko

Edited by ilko_t, 05 August 2007 - 01:51 PM.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#287
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag

I see the proper massages, answer YES to replace original boot.ini with boot.txt and get "the system cannot find the file specified. Could not find c:\windows\system32\boot.txt.", boot.txt is in root and looks ok, with all needed entries.

I'll look at it, maybe some "paths" are incorrect.

EDIT:
My bad, just temporarily change in the batch this:
:WriteBootIni 
CALL :attribs %source%
Copy boot.txt %source%
del boot.txt
ATTRIB !switches! %source%>nul
GOTO :EOF
to this:
:WriteBootIni 
CALL :attribs %source%
Copy %BOOTTXT% %source%
del %BOOTTXT%
ATTRIB !switches! %source%>nul
GOTO :EOF
I'll re-check the batch and add a kind of error check for this in next release. :blushing:

About boot sectors- still having issues after winnt32 is run and files put on stick.
Using Hitachi driver and format stick from XP no matter FAT16 or 32, copy ntldr, boot.ini and ntdetect.com - boots ok to boot.ini

Run winnt32 with parameters to put files directly on stick- cannot boot stick at all, no matter FAT16 or 32, nor if boot files copied before or after winnt32.
Interestingly, yesterday I managed somehow to make it working this way using FAT32, and the same routine, no flipping idea what it wants. Could try reverting bootsectors, but am tired of this.


It could be some kind of "glitch" in the FORMAT command.

I am sorry to say so, but to help in this I need you to do a lot of work :(, I need 2x2x2x3 series of bootsectors AND MBR's:
1) Bootsector FAT16 made by HP utility+MBR
2) Bootsector FAT16 made by PEto USB+MBR
3) Bootsector FAT 16 made by FORMAT with Hitachi filter+MBR (made with Disk Management?)
same as above FAT32
same as above FAT16 and FAT32 after the WINNT32 execution

Now, ALL the above but using BEFORE 1) 2) and 3) a hex editor or a direct disk access utility like dsfo/dsfi to write hex value F6 to first 100 sectors of the stick.

jaclaz

Edited by jaclaz, 06 August 2007 - 03:33 AM.


#288
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
Would samples only from XP format (right click on drive and format) and PEtoUSB be enough? I already have most of the files needed, just need to do it with F6 written prior to format.
PEtoUSB formats only AFAIK in FAT16 or FAT16x, would that be enough too? When stick is formatted by it boots every time, no matter when boot files are copied, or whether Hitachi driver is used or not (PEtoUSB senses the difference).

Meanwhile- any ideas about

Another question- any idea what could be the variable path for the USB stick during GUI part?
I'd like not to copy boot_ren.cmd, undoren.cmd and binifix.cmd to system32 and edit txtsetup.sif, but rather put then on stick and call them directly from the relevant entries in winnt.sif.
Could be done easily if the same letter is assigned to USB stick, but to make it universal variable path would be nice.


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#289
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag

Would samples only from XP format (right click on drive and format) and PEtoUSB be enough? I already have most of the files needed, just need to do it with F6 written prior to format.
PEtoUSB formats only AFAIK in FAT16 or FAT16x, would that be enough too? When stick is formatted by it boots every time, no matter when boot files are copied, or whether Hitachi driver is used or not (PEtoUSB senses the difference).


Well, maybe yes, the problem might derive from the fact that, as has been reported by Dietmar on the famous Full XP on USB thread on 911CD, some utilities (NOT the HP one ;) ) could try to interpret data already on MBR and/or bootsector.
This is has been reported for XP's FORMAT command (in other words a partition formatted with XP's tools from scratch on a blank 00's or F6's drive may be different from one created over a previously existing one, as XP's FORMAT comand may "inherit" some of the previous data).
This has been proved beyond any doubt for floppies:
http://www.denispetrov.com/format144/
but about hard disks/USB devices I have no definite proof.
So the problem might arise by a combination of the previous format with the new tool used.

Another question- any idea what could be the variable path for the USB stick during GUI part?
I'd like not to copy boot_ren.cmd, undoren.cmd and binifix.cmd to system32 and edit txtsetup.sif, but rather put then on stick and call them directly from the relevant entries in winnt.sif.
Could be done easily if the same letter is assigned to USB stick, but to make it universal variable path would be nice.

We can search for a file and set the variable to the drive where the file is found, using "binifix.cmd" or another "tagfile" just like the common "WIN51.IP" is used in Windows Setup, but still we need a minimal batchfile in %systemdrive% or in another path for which an environment variable is already established.
Try the following add this one liner (save it as CHECKVAR.CMD):
SET >CHECKVAR.TXT
put it in \System32 and add this in winnt.sif:

[GuiRunOnce]
"%systemdrive%\windows\system32\checkvar.cmd"
"%systemdrive%\windows\system32\undoren.cmd"
"%systemdrive%\windows\system32\binifix4.cmd C:"

You should get a CHECKVAR.TXT file with all Environment Variables already SET when [GuiRunOnce] is run.
We can even make a self-deleting batch, though it's a bit tricky, it can be done.

I'll think some more about this issue and see if I can come out with and idea. :unsure:

jaclaz

#290
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
@jaclaz

About boot sectors- please find attached what I gathered, Before and After stands for before winnt32 is run, right after format, after is after winnt32. In some folders I put a file telling how the stick boots with this bootsector. F6 folders are for stick when first 100 sectors filled with F6.

About binifix4.cmd- works fine, you may now remove YES confirmation. How would it behave if script is run for a second time? I mean for repair install, script would be already run once, and for a second time when repairing.


As for the variables- I am trying to avoid modifying TXTSETUP.SIF at all, and call boot_ren.cmd, binifix.cmd and undoren.cmd from winnt.sif directly on stick, without copying them on hard disc.
I was expecting to have a preset variable like %installdrive% or something similar, but cannot find any.

Simple way to set such for the USB drive is to use PRESETUP.CMD, which if seen by GUI Setup will be launched before anything else.
Here we have 2 options
1. Set the variable if possible- I am not in this field at all, tried to substitute SET with SETX for permanent results in simple script like this:
SET TAGFILE=\misc
FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:
Where folder MISC will be on stick, containing the files in question. Using SET works for this command prompt session only, using SETX should do it permanent, but seems the syntax is different and SETX with -m parameter works on
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

which I am not sure if it's ready at that point, before GUI setup continues.

2. My dumb and simplier way :D- use presetup.cmd to copy needed files in \system32 and call them easily from winnt.sif

ilko

Attached Files


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#291
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag
I'll check the bootsectors and let you know.

About re-running the batch, at first sight the only missing thing is a check for NOT duplicating the "Old Default" entry, it can be fixed allright, I'll do that and the other more general polishing as soon as I have time.

The PRESETUP.CMD appears to me an excellent idea, one could also try a POSTSETUP.CMD, as you already posted, it's not easily found info on WHEN postsetup.cmd is processed, but it seems like it is executed at the same point of GuiRunOnce:
http://blogs.msdn.com/pointofservice/
http://blogs.msdn.co...stallation.aspx
though it seems that it is called by setuplauncher.exe:
http://msdn2.microso...y/ms912403.aspx

Check this oldie too:
http://www.msfn.org/...showtopic=12566
(could we use devicesetpath.exe?)

Or maybe we could use Fedit.exe:
http://www.msfn.org/...topic=48200&hl=
to edit WINNT.SIF on the fly?

jaclaz

#292
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 981 posts

Why winnt32 changes bootsector? And what exactly it changes

That's syspart design: prepare install for another machine.

http://support.micro...kb/241803/en-us

In Windows 2000, the /syspart parameter for Winnt32.exe causes Windows 2000 Setup to copy all the necessary boot files and temporary Setup files to a drive and mark the partition as active. You can then install the drive in another computer, turn the computer on, and continue with Setup.

This goes for XP too.

Obviously winnt32.exe wasn't created for USB devices.
BIOS hard disk sort order maybe involved too.

Syspart work fine at internal drives.
C:\$WIN_NT$.~BT\BOOTSECT.DAT contain a boot sectors, string ntldr is edited.

#293
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
I have tried postsetup.cmd a while ago- could't get it launched, it may be launched only in Windows Embedded setup, or I didn't make it right. Will try again. It's supposed to run when GUI setup is completed, may be after T-1 "deleting temp. files"

Fedit.exe seems good idea, I'll study it further.

@cdob- I get what you are saying, 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.
It could be BIOS involved, that's an idea, or as you are saying winnt32 gets confused about the USB device.
It doesn't create abootsect.dat nywhere, but makes boot.ini on stick pointing to it, despite the fact TXT part will be launched by the renamed setupldr.bin anyway. Could be the part when winnt32 is not designed for USB drives and gets confused.
If it was creating bootsect.dat with a patched bootsector on the USB stick it would've been nice, one external tool (jaclaz's makeBS.cmd) less. Not a big deal though, I am just studying it's behavior and reporting results here.

Another thing- please excuse me as I sometimes use the topic as a draft, usually when I get too many results in my head and need to clear and sort it up, and at that point I write some unnecessary and not proved results and conclusions. Just noone else to talk with about this matter :D
Will try not to :blushing:

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#294
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
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 Files


Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#295
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 981 posts
@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.

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
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
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

Edited by ilko_t, 29 August 2007 - 05:36 AM.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#297
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag
@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...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

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
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag

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

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?


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.


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 Files


Edited by ilko_t, 10 August 2007 - 09:33 AM.

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB


#299
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,254 posts
  • OS:none specified
  • Country: Country Flag
It's my turn to take a few days off-line.

@ilko_t

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...o...181&st=1954

jaclaz

#300
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,718 posts
  • OS:none specified
  • Country: Country Flag
Have a nice holiday jaclaz, enjoy it :hello:

Install Windows from USB, boot Linux, multiboot and a lot more with WinSetupFromUSB





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN