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

Jump to content


  • 25 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • 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

#161 User is offline   ilko_t 

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

Posted 16 May 2007 - 05:45 PM

Hi wimb, I am glad it worked fine :) Sorry about the messy post of mine :blushing:

I beleive this topic, as well as Grub4Dos README.TXT will give you the ideas how to launch Ghost.

About the slow boot- it's because your motherboard supports USB1.1 boot only, once control is passed to a USB2 driver it operates at it's full speed. Bart PE loads much more before USB2 driver is loaded (may be driver could made to load earlier?) than XP Setup.
My laptop Dell Inspiron 6000 supports USB2 boot and believe me XP setup loads in a flash, no more than 10-12 secs. I can't read the names of the drivers being loaded, whereas on the Gygabyte DS3P and Abit AN7 motherboards it's much much slower. Bart PE loads at horrible speed too on them.
Once USB driver takes control it's fast again.
I have written recently to Gigabyte support about that, in the first few responses they had no idea what I was talking about, once we made it clear no more responses :(... for now. I also phoned tech. support in UK and the guy got the idea, but only adviced me to unplug all other USB devices and not to use front ports, no difference at all. Next to call is support in Taiwan :)
Update of BIOSes didn't do any change, for now.

I have just started a new topic in 911cd.net about that, you may keep an eye what is going on :
http://www.911cd.net...showtopic=19731

Hopefully we will collect some useful database.

Regards,
ilko


#162 User is offline   wimb 

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

Posted 17 May 2007 - 05:48 AM

View Postilko_t, on May 17 2007, 01:45 AM, said:

About the slow boot- it's because your motherboard supports USB1.1 boot only, once control is passed to a USB2 driver it operates at it's full speed. Bart PE loads much more before USB2 driver is loaded (may be driver could made to load earlier?) than XP Setup.

Maybe Bart Lagerweij can make the USB2 driver being earlier effective in booting BartPE.
I have just registered in the CD forum, and will ask him there if this is possible.
I will also present there the relevant data of my motherboard and BIOS.

The motherboard of my Medion MD6100 laptop is equipped with:
BIOS Version PTLTD - 6040000
PhoenixBIOS 4.0 Release 6.0
Ver 1.00PARTTBL
BIOS Date 01/26/03

It supports apparently from the slow (30 minutes) booting of BartPE only USB 1.1 boot.
I have used a Apacer HT203 - 1 GB USB-stick which is very fast and
allows to install Windows XP from bootable USB-stick in only 30 minutes.
So I think in the GUI mode of the setup that USB2.0 is already effective.
In Windows XP the laptop supports USB 2.0

My MultiBoot USB-stick is ready and supports now also DOS with Ghost, and booting with BartPE.

Everything works fine except for the slow booting of BartPE. :)

#163 User is offline   wimb 

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

Posted 18 May 2007 - 01:40 AM

View Postilko_t, on May 17 2007, 01:45 AM, said:

I have just started a new topic in 911cd.net about that, you may keep an eye what is going on :
http://www.911cd.net...showtopic=19731

It seems your post at the CD Forum has been removed ...
So I cannot supply there the relevant data of my motherboard for the USB 1.1 boot issue.

#164 User is offline   wimb 

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

Posted 18 May 2007 - 06:08 AM

When the new type of boot.ini with the 6 entries is present on the harddisk,
then after booting from the USB-stick, an option to Repair an existing Windows installation ( the 1 1 )
becomes available ( it is the second time when an option R is presented ).

I never use such a repair option, but when you select this option R to repair an existing installation,
the Windows repair takes place as expected, but with an unwanted effect on the USB-stick !

The result is that $WIN_NT$.~BT and $WIN_NT$.~LS folders are deleted and txtsetup.sif in the root directory
of the USB-stick is deleted as well !
Moreover, cmdlines.txt is apparently not executed,
so that the boot.ini ends up with the starting default entry: harddisk 1, partition 1.
After removing the USB-stick and Restart, Windows is not able to start from this default harddisk 1, partition 1 option.
But one can select to start from the harddisk 0, partition 1 so that Windows will start.

It seems that the Write protection of the USB-stick with hiveOEM.inf is not used in this case.
Maybe there is a solution to overcome this problem: Adding hiveOEM.inf in txtsetup.sif for the Repair case ?
When in boot.ini only a single entry with booting from harddisk 0 partition 1 is present,
then the Repair option is not presented, so that the unwanted deletion of the Windows setup files on the
USB-stick wil not take place.

This post has been edited by wimb: 18 May 2007 - 08:49 AM


#165 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 May 2007 - 09:17 AM

View Postwimb, on May 18 2007, 08:40 AM, said:

It seems your post at the CD Forum has been removed ...
I can see it, it's the first post in USB booting subforum:
http://www.911cd.net...hp?showforum=37

I am still in touch with Gigabyte, surprisingly they are investigating this further :) Copy of their last reply:

Quote

We also try to use Bart PE to create a USB boot drive. Test on Gigabyte GA-965P-DS3P and Asus P5B-VM motherboard, both motherboards are need take 5 minutes to boot.
Before we start to test, we already set first boot is USB flash memory, and press start button. When system boot in to Microsoft main menu press stopwatch to stop.
Gigabyte motherboard GA-965P-DS3P is taking 6mins and 17 sec, ASUS P5B is taking 6mins and 12 sec.
According to our experience the USB port under DOS mode is run USB 1.1, that’s why the time takes so long.
Regards,
GBT TECH
Well, DOS and Bart PE... at least they are trying, hopefully some progress could be achieved.


View Postwimb, on May 18 2007, 01:08 PM, said:

When the new type of boot.ini with the 6 entries is present on the harddisk,
then after booting from the USB-stick, an option to Repair an existing Windows installation ( the 1 1 )
becomes available ( it is the second time when an option R is presented ).

I never use such a repair option, but when you select this option R to repair an existing installation,
the Windows repair takes place as expected, but with an unwanted effect on the USB-stick !

The result is that $WIN_NT$.~BT and $WIN_NT$.~LS folders are deleted and txtsetup.sif in the root directory
of the USB-stick is deleted as well !
...
That's interesting result, but I believe normal, actually we have never tried so far to use the repair option when SETUP uses different approach. The way now USB write-protect is implemented by MIGRATE.INF and oemHIVES.inf applies only for new installations only. Further investigation will be needed how to fix it, thanks for bringing this up :)

This post has been edited by ilko_t: 18 May 2007 - 09:38 AM


#166 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 May 2007 - 11:47 AM

Hi, this was easy I think :)

Add the following line in TXTSETUP.SIF :

Quote

[HiveInfs.Upgrade]
AddReg = hiveOEM.inf,AddReg
No files were deleted in my tests.

About BOOT.INI- CMDLINES is not executed, I noticed BOOT.INI gets changed 3 times:

1. TEXT Setup adds default entry pointing to the partition it installs on as it sees it, in our case it's rdisk(1), instead of (0) and timeout 1
2. At beginning of GUI Setup same entries, but after PRESETUP.CMD is launched if present, so PRESETUP.CMD won't work for us
3. Before end of GUI Setup, but before CMDLINES is executed if doing clean install. At this stage it (may be only) changes timeout to 30

So if we execute BOOT_REN.CMD at the first logon screen by adding the following lines we should be fine. No need to use CMDLINES anymore, but even if it's used boot files will be rewritten twice if performing an repair. This line is executed in repair mode too.

TXTSETUP.SIF

Quote

[SourceDisksFiles]
hiveOEM.inf = 100,,,,,,_x,,3,3
undoUSBWP.reg = 100,,,,,,_x,2,0,0
BOOT_REN.CMD = 100,,,,,,_x,2,0,0

and

WINNT.SIF

Quote

[GUIRunOnce]
"%systemdrive%\windows\system32\BOOT_REN.CMD"


May be it's about time to rewrite the guide once we confirm the results :rolleyes:

edit: If one uses BTS mass storage DP method 2 and repair install then include the following line in \$WIN_NT$.~LS\I386\PRESETUP.CMD

Quote

DEL /F %systemroot%\system32\setupold.exe
or GUI Setup stops at start, complaining about fake setup being executed.

This post has been edited by ilko_t: 18 May 2007 - 11:53 AM


#167 User is offline   wimb 

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

Posted 19 May 2007 - 04:30 AM

View Postilko_t, on May 18 2007, 07:47 PM, said:

TXTSETUP.SIF

Quote

[SourceDisksFiles]
hiveOEM.inf = 100,,,,,,_x,,3,3
undoUSBWP.reg = 100,,,,,,_x,2,0,0
BOOT_REN.CMD = 100,,,,,,_x,2,0,0

and

WINNT.SIF

Quote

[GUIRunOnce]
"%systemdrive%\windows\system32\BOOT_REN.CMD"


May be it's about time to rewrite the guide once we confirm the results :rolleyes:

edit: If one uses BTS mass storage DP method 2 and repair install then include the following line in \$WIN_NT$.~LS\I386\PRESETUP.CMD

Quote

DEL /F %systemroot%\system32\setupold.exe
or GUI Setup stops at start, complaining about fake setup being executed.


Hi ilko,

I can confirm that the Fresh and the Repair Windows XP Setup, when using the new TXTSETUP.SIF file,
both run fine without deleting anything from the bootable USB-stick. :yes:

I have not yet tested the BTS mass storage DP method 2, but will report about that in due time. ;)

Congratulations with the result ! :thumbup

Regards,

wimb

This post has been edited by wimb: 19 May 2007 - 04:33 AM


#168 User is offline   wimb 

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

Posted 19 May 2007 - 04:46 AM

View Postilko_t, on May 18 2007, 05:17 PM, said:

View Postwimb, on May 18 2007, 08:40 AM, said:

It seems your post at the CD Forum has been removed ...
I can see it, it's the first post in USB booting subforum:
http://www.911cd.net...hp?showforum=37

I am afraid your post is not present anymore. Some days ago I visited the CD Forum and was able to read your post there, but now the 911 CD part of the CD Forum is almost empty .... :(

Regards, wimb

#169 User is offline   ilko_t 

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

Posted 19 May 2007 - 05:31 AM

View Postwimb, on May 19 2007, 11:30 AM, said:

Hi ilko,

I can confirm that the Fresh and the Repair Windows XP Setup, when using the new TXTSETUP.SIF file,
both run fine without deleting anything from the bootable USB-stick. :yes:

I have not yet tested the BTS mass storage DP method 2, but will report about that in due time. ;)

Congratulations with the result ! :thumbup
Hi wimb, nice to read that, in a few days I am going to sum up all changes in a single post, I believe everything is sorted out, except the minor issue with the long delay at T-1.


View Postwimb, on May 19 2007, 11:46 AM, said:

I am afraid your post is not present anymore. Some days ago I visited the CD Forum and was able to read your post there, but now the 911 CD part of the CD Forum is almost empty .... :(

Regards, wimb
I think it's still there, check your browser settings, clear cache etc.
Posted Image

Regards,
ilko

#170 User is offline   wimb 

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

Posted 19 May 2007 - 07:10 AM

View Postilko_t, on May 19 2007, 01:31 PM, said:

Hi wimb, nice to read that, in a few days I am going to sum up all changes in a single post, I believe everything is sorted out, except the minor issue with the long delay at T-1.

What is the long delay at T-1 issue? I never noticed such a problem.

There is something strange with the CD Forum for me.
After my registration, the CD Forum part of CD Forum is read only for me,
and remains invisible with automatic log on.
Your link is in that case reported as a broken link.
When I logoff, then the CD Forum part is visible with your post, but I am not allowed to reply.

All the other parts of the CD Forum are behaving normally and remain visible after logon !

I cleared my browser history and cache. No change.

#171 User is offline   ilko_t 

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

Posted 19 May 2007 - 07:37 AM

At the end of GUI Setup attempts to delete temp. folders, but since they are write-protected it's kinda stuck at this point until time-out occurs and it stops trying. In my tests it takes about 2 to complete that point, if you unplug the stick for example at T-1 or even earlier it' takes like 1 or 2 seconds. That's why in one of the previous posts I tried to rename the 2 folders on USB stick using a simple script in CMDLINES, but only ~BT folder survived. Either SETUP deletes files earlier, before CMDLINES is executed, or when it's executed folder is in use or somehow protected by SETUP, causing rename not to complete. For these tests I left stick unprotected. For now I will not do any other attempts to avoid this, since delay is not severe.

About 911CD forum- I think you haven't received your activation email, if I remember right they are using manual validation, you are able to logon using your user name, but some parts are behaving strangely. I waited more than a week to receive that email and activate the account. In my first attempt few months back email didn't arrive at all, so I had to re-register.

#172 User is offline   snowden 

  • Newbie
  • Group: Members
  • Posts: 29
  • Joined: 04-December 06

Posted 19 May 2007 - 08:59 AM

It seems a bit ridiculous to have to do all these things just to get windows installation started from a usb stick. Is there no way of just copying the \i386 folder from a cdrom (or even an nlite distribution) to the usb stick, and format (or probably 'hex') the ntldr or something to boot the setupldr.bin into the text-phase of setup that normally initializes when you boot from a cd-rom (ie not having to run the winnt.exe)?

For me, using the winnt.exe to install from the usb stick is only a bit of a nuisance at the moment because I haven't found a way to stop it installing the ~BT folder onto the usb stick itself - even when i used the winnt.exe /t:<drive> command. The ~LS folder copies ok to the partition i designate. If the ~BT folder would only copy along with the ~LS folder (to the partition), everything would be fine! I know I could probably copy it across, but the winnt.exe program would already have tampered with the usb stick configuration anyway. It really would make life a lot easier, but as we all know, nothing is ever straightforward! :)

#173 User is offline   wimb 

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

Posted 20 May 2007 - 08:39 AM

View Postilko_t, on May 18 2007, 07:47 PM, said:

edit: If one uses BTS mass storage DP method 2 and repair install then include the following line in \$WIN_NT$.~LS\I386\PRESETUP.CMD

Quote

DEL /F %systemroot%\system32\setupold.exe
or GUI Setup stops at start, complaining about fake setup being executed.

Hi ilko,
I can confirm that Windows XP Setup from the bootable USB-stick including the BTS mass storage DP method 2,
is running fine, both in Fresh and in the Repair mode of Windows XP Setup . :)

I saw in the setuplog.txt file that I have indeed also a long wait of 4 minutes at T-1,
when setup is trying to delete all the files of the $WIN_NT$.~LS and the $WIN_NT$.~BT folders.
But nothing is deleted and it takes only some minutes extra time. So it is no problem. :)

For the 911CD forum I received an activation email, so now I will be able to reply on your post regarding
motherboard and BIOS data for booting BartPE at USB 2.0 speed. :)

Regards,

wimb

This post has been edited by wimb: 20 May 2007 - 11:08 PM


#174 User is offline   thomas.night 

  • Group: Members
  • Posts: 2
  • Joined: 14-January 07

Posted 22 May 2007 - 07:35 AM

Could you tidy up this thread, please?
It would be very helpfull for future, but now 'normal user' will not understand anything.
Maybe it's time to make a guide (like Unattended CD/DVD) (?)

Best regards
thomas.night

PS: Sorry for my English, but I am form Poland :)

#175 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 26 May 2007 - 05:41 AM

View Postsnowden, on May 19 2007, 10:59 PM, said:

It seems a bit ridiculous to have to do all these things just to get windows installation started from a usb stick. Is there no way of just copying the \i386 folder from a cdrom (or even an nlite distribution) to the usb stick, and format (or probably 'hex') the ntldr or something to boot the setupldr.bin into the text-phase of setup that normally initializes when you boot from a cd-rom (ie not having to run the winnt.exe)?

For me, using the winnt.exe to install from the usb stick is only a bit of a nuisance at the moment because I haven't found a way to stop it installing the ~BT folder onto the usb stick itself - even when i used the winnt.exe /t:<drive> command. The ~LS folder copies ok to the partition i designate. If the ~BT folder would only copy along with the ~LS folder (to the partition), everything would be fine! I know I could probably copy it across, but the winnt.exe program would already have tampered with the usb stick configuration anyway. It really would make life a lot easier, but as we all know, nothing is ever straightforward! :)



i have the same problem also. Still finding the solution currently.

This post has been edited by buseeliu: 26 May 2007 - 05:42 AM


#176 User is online   jaclaz 

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

Posted 26 May 2007 - 08:19 AM

I have been a few days away and I find that a lot of things have progressed.

Congrats to both ilko_t and wimb! :)


@ilko_t
I had a quick look at your MBR files, as soon as I have time i'll take a closer look and post my findings.

View Postwimb, on May 19 2007, 12:46 PM, said:

View Postilko_t, on May 18 2007, 05:17 PM, said:

View Postwimb, on May 18 2007, 08:40 AM, said:

It seems your post at the CD Forum has been removed ...
I can see it, it's the first post in USB booting subforum:
http://www.911cd.net...hp?showforum=37

I am afraid your post is not present anymore. Some days ago I visited the CD Forum and was able to read your post there, but now the 911 CD part of the CD Forum is almost empty .... :(

Regards, wimb


wimb, he thread you are referring to is this one:
http://www.911cd.net/forums//index.php?sho...c=19731&hl=
(exactly as ilko_t originally referred it to be)
As a general rule, always reference to a thread by it's ID rather that the page where you have seen it listed, posts may be moved around, particularly the 911CD forum has made a new subforum dedicated to USB booting, so posts are being moved from less relevant areas and put in the new one.

@snowden
As said before, there is the alternate method here using winnt.exe:
http://www.911cd.net...showtopic=16713
that of course does not create the "the ~BT folder onto the usb stick itself"
and that can easily be fully automated via batch file.
Moreover, as hinted here, it has the advantage of keeping install files on HD:
http://www.msfn.org/...der_t98414.html


@buseeliu
I don't get it :unsure:, you join the board and post here just to say:
"Look guys, your method is not good, too difficult, I have no alternate solution, so I cannot help, just wanted to let you know that I am looking for another way?" :blink:

jaclaz

#177 User is offline   snowden 

  • Newbie
  • Group: Members
  • Posts: 29
  • Joined: 04-December 06

Posted 26 May 2007 - 12:30 PM

Quote

@snowden
As said before, there is the alternate method here using winnt.exe:
http://www.911cd.net...showtopic=16713
that of course does not create the "the ~BT folder onto the usb stick itself"
and that can easily be fully automated via batch file.


jaclaz: not to be ungrateful, but i read this guide already. contrary to what impression you might have of me, i have read every single one of the links you have given me, even the ones that lead to other forums. But thank you, I do know now how to copy the files across to my hard drive first.
But this still doesn't solve the problem; because I am using a usb stick, I might be waiting about 15 minutes before all of the files have copied across to the HD - kind of defeating the whole purpose.

All the other links you have shown me don't seem to point to anything other than using BartPE or pe2usb, again thwarting any efforts to make windows setup any simpler. It seems to me everybody is pointing everyone else to a pile of links that all lead to the same BartPE or pe2usb methods, which in my opinion I would ditch any day for installing windows via the winnt.exe method (as long as I had the option of course)!
It would take me about as long to copy windows install files across from my usb to my HD, as it would to just run winnt.exe from the usb key itself and put up with the ~BT folder being created on it[self]. This doesn't even include the time it takes just to copy the install files onto the usb iteslf within windows (before booting from it). This is the primary reason why I would like windows to 'begin' from the usb key in the same manner a cdrom installation does; i.e. NO 'initial' temporary file-copying procedure.

In light of this, I read the post about changing the setupldr.bin to ntldr,
http://www.msfn.org/...showtopic=61384
but it seems to lead me bak off to the BartPE/pe2usb methods. Could you please point me to a specific link if you can, because I keep being led astray with all the links everywhere!

Thanks again for your help. :)

#178 User is online   jaclaz 

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

Posted 26 May 2007 - 01:51 PM

snowden said:

But this still doesn't solve the problem; because I am using a usb stick, I might be waiting about 15 minutes before all of the files have copied across to the HD - kind of defeating the whole purpose.

Yep, never said it was faster! ;) :whistle:

All the idea of trying to find other methods was behind the fact that that method wasn't perfect.

The link you posted does not work, a "tentative" list of possible methods is here:
http://www.msfn.org/board/Installing_Unatt...8.html&st=6

Are you referring to method #3?

Nothing has been done for a long time, but do have a look at it, the original thread is here:
http://www.911cd.net...showtopic=17425

I am quite sure that it would be possible to write from scratch a somewhat smarter "loader" or "setup" program running under DOS for 2K/XP, or somehow modify the original files as you suggested, but I am afraid it is far above my capabilities to contribute anything useful on that.

Most probably there are some other possibilities, for example finding a way (HXdos?) to run WINNT32.EXE instead of WINNT.EXE on a DOS based OS booted from the stick could resolve the problem of the ~BT folder using the /makelocalsource switch pointing to the HD....
...or finding a way to boot from the .ISO image of the CD saved on the stick....


Every idea, suggestion and contribution is welcome, even if it eventually it leads to a dead end, every attempt helps understanding something more about the way install works and hopefully will make new ideas/methods come to mind.

jaclaz

#179 User is offline   ilko_t 

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

Posted 26 May 2007 - 02:38 PM

Here is the edited guide for Windows XP SP2, on 2k/2k3 should work too.

1. Format stick using PEtoUSB or any other utility of your choice, which makes it bootable with 2k/XP boot sector
2. Copy NTDETECT.COM, NTLDR to root and create BOOT.INI

BOOT.INI
[Boot Loader]
Timeout=15
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
c:\grldr="Start GRUB"
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Setup" /FASTDETECT
If you are going to install on another partition/disk amend entries to reflect that.

Make sure you can boot from stick and reach the menu.

3. Get the latest GRUB4DOS and copy GRLDR to the USB root. If you have any issues use the last stable version. Create in USB stick root

MENU.LST
color black/cyan yellow/cyan
timeout 15

default 0

title Phase 1 WinXP Text Mode Setup 
chainloader (hd0,0)/setupldr.bin


4. Backup your local BOOT.INI and in the XP setup folder \I386 run
winnt32 /makelocalsource /noreboot
after it's finished restore BOOT.INI you backed up.

5. Copy two new folders onto the USB stick root - $WIN_NT$.~BT and $WIN_NT$.~LS

6. In \$WIN_NT$.~BT modify

WINNT.SIF
[data]
msdosinitiated="1"
floppyless="1"
AutoPartition="0"
UseSignatures="no"
InstallDir="\WINDOWS"
winntupgrade="no"
win9xupgrade="no"

[GuiRunOnce]
"regedit /s %systemdrive%\windows\system32\undoUSBWP.reg"
"%systemdrive%\windows\system32\BOOTFLS.CMD"


and

MIGRATE.INF
[Version]
Signature = "$Windows NT$"

[Addreg]
HKLM,"SYSTEM\MountedDevices",,0x00000010
HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1

[Strings]
;Handy macro substitutions (non-localizable)
REG_SZ			  = 0x00000000
REG_BINARY		  = 0x00000001
REG_DWORD		   = 0x00010001
REG_MULTI_SZ		= 0x00010000
REG_SZ_APPEND	   = 0x00010008
REG_EXPAND_SZ	   = 0x00020000
If you wish to preserve your USB storage drive letter use CDOB's script to create MIGRATE.INF, don't forget to add the above entries :

MkMigratgeInf.cmd
@echo off
REM MkMigratgeInf.cmd v0.01
REM created by cdob

setlocal EnableExtensions

set Drive=%~d1
if %Drive%.==. set Drive=%~d0

set FileName=%~2
if %FileName%.==. set FileName=MIGRATE.INF.TXT

set MigrateDrive=U:
if not %~d3.==. set MigrateDrive=%~d3

set Value=
FOR /F "skip=2 tokens=1-2*" %%a IN ('reg query HKLM\System\MountedDevices /v \DosDevices\%Drive%') DO set Value=%%c

if %Value%.==. (echo drive settings %Drive% not found & goto :EOF)

set MigrateStr=%Value:~0,2%
set count=2
:begin_parse
  call :exec set MidStr=%%Value:~%count%,2%%
  if %MidStr%.==. goto :exit_parse
  set MigrateStr=%MigrateStr%,%MidStr%
  set /a count+=2
  goto begin_parse
:exit_parse

(echo [Version]
echo Signature = "$Windows NT$"
echo.
echo [Addreg]
echo HKLM,"SYSTEM\MountedDevices","\DosDevices\%MigrateDrive%",0x00030001,\
echo %MigrateStr%)>%FileName%

goto :EOF

:exec
  %*
goto :EOF


7. Create a folder BOOTFILES in USB stick root, and copy NTDETECT.COM, NTLDR and create there your custom BOOT.INI, which will be copied on hard disk later, during the first logon. Set them system, hidden and read-only in advance.

BOOT.INI

[boot loader] 
timeout=15
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS 
[operating systems] 
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="XP Professional 0 1" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="XP Professional 0 2" /noexecute=optin /fastdetect 
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS="XP Professional 0 3" /noexecute=optin /fastdetect 
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="XP Professional 1 1" /noexecute=optin /fastdetect 
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS="XP Professional 1 2" /noexecute=optin /fastdetect 
multi(0)disk(0)rdisk(1)partition(3)\WINDOWS="XP Professional 1 3" /noexecute=optin /fastdetect


8. Create:

undoUSBWP.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\StorageDevicePolicies]
"WriteProtect"="0"


hiveOEM.inf
[Version]
Signature = "$Windows NT$"
DriverVer=07/01/2001,5.1.2600.2180

[AddReg]
;WriteProtect USB
HKLM,"SYSTEM\CurrentControlSet\Control\StorageDevicePolicies","WriteProtect",0x10001,1

and

BOOTFLS.CMD
@echo off
SET TAGFILE=\BOOTFILES
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:
xcopy %USBDRIVE%\bootfiles\*.* %SYSTEMDRIVE%\  /y /h /r /k
exit

and place them in $WIN_NT$.~LS\i386

9. Copy TXTSETUP.SIF and SETUPLDR.BIN from \$WIN_NT$.~BT to root of USB stick and add the following lines to

TXTSETUP.SIF
[SourceDisksFiles].....
.....
hiveOEM.inf  = 100,,,,,,_x,,3,3
undoUSBWP.reg = 100,,,,,,_x,2,0,0
BOOTFLS.CMD = 100,,,,,,_x,2,0,0
....
....
[HiveInfs.Fresh]
AddReg = hiveOEM.inf,AddReg

[HiveInfs.Upgrade]
AddReg = hiveOEM.inf,AddReg

--------
Install XP and leave stick plugged in until after the first logon screen.

Notes:
1. If you use an answer file when launching WINNT32.EXE make sure you delete the whole [Unattend] section in WINNT.SIF, otherwise you won't be able to use System Restore and SETUP will not prompt on which partition to install.
2. If you use BTS mass storage DP method 2 and repair install then include the following line in \$WIN_NT$.~LS\I386\PRESETUP.CMD
DEL /F %systemroot%\system32\setupold.exe
or GUI Setup stops at start, complaining about fake setup being executed.
3. If during TEXT MODE your usb stick is listed first when SETUP searches for disks , above SATA/SCSI disks, disable in BIOS IDE channels including the ones with CDROM/DVD attached or disconnect them, this should fix the order. Do not continue install if stick is listed first, this will corrupt files and MBR on it.
------------------------------------

All credits for the most important part- how to write- protect the USB flash go to cdob :thumbup
Many thanks to jaclaz, wimb and porear :)

This post has been edited by ilko_t: 28 May 2007 - 05:48 PM


#180 User is offline   ilko_t 

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

Posted 26 May 2007 - 03:18 PM

@snowden- the problem when using ntldr and ntdetect.com to boot from stick or setupldr.bin renamed /ntdetect.com is that USB stick is second hard drive as seen and enumerated by them, but setupldr.bin expects files to be on first hard drive. Using GRUB overrides this issue. Unless modified/other/new boot files mentioned are used I don't see a way to fix this issue.

Copying the whole contents of XP CDROM and patching setupldr.bin will save you no more than 2-3 minutes, the time to create $WIN_NT$.~BT and $WIN_NT$.~LS by WINNT32.EXE, but may lead to other issues or incompatibility. I prefer not to use patched files when possible. Surely any other ideas are welcome, as long as this would save time and give better results.

Another idea, which will save you all the steps above is to create an image of a hard disk prepared with $WIN_NT$.~BT and $WIN_NT$.~LS (check winnt32 switches and /system in particular ) folders and place the image from USB using your favorite imaging program, either from PE or from DOS/LINUX. When working with large files USB sticks are usually much faster.
Using Bart PE and running winnt32.exe has always been an option and gives greater flexibility.

This post has been edited by ilko_t: 26 May 2007 - 03:19 PM


Share this topic:


  • 25 Pages +
  • « First
  • 7
  • 8
  • 9
  • 10
  • 11
  • Last »
  • You cannot start a new topic
  • This topic is locked

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



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