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

Jump to content


  • 25 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • 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

#41 User is offline   cerdar 

  • Newbie
  • Group: Members
  • Posts: 19
  • Joined: 14-November 06

Posted 14 November 2006 - 08:45 PM

Yes,i had meet the same program


#42 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 14 November 2006 - 10:44 PM

Wow. I don't believe it, but I THINK its working!!! This was without migrate.inf.

After text mode finished, at the reboot, I went into my BIOS and changed the sequence so the hard drive would be the first boot device, and left the USB stick in. It booted to the hard drive, began GUI setup, found the stick, and did not even prompt me for the \I386 files - it saw them.

For now, this seems like the remaining work:

1. The problem still remains that some of the files are deleted from the stick as they are copied during text mode setup.

2. Make another GRUB entry so that at boot you could choose between "Part 1 Text Mode Setup" and "Part 2 GUI Setup" in GRUB to point to the USB stick and the hard drive respectively. (I know its simple but I'm green on GRUB and haven't gotten it to work yet).

Bonus: It would be nice to have some type of toggling script on the stick for GRUB4DOS that would boot the stick the first time and the hard drive the next.

This post has been edited by porear: 14 November 2006 - 10:53 PM


#43 User is online   jaclaz 

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

Posted 15 November 2006 - 03:04 AM

Quote

2. Make another GRUB entry so that at boot you could choose between "Part 1 Text Mode Setup" and "Part 2 GUI Setup" in GRUB to point to the USB stick and the hard drive respectively. (I know its simple but I'm green on GRUB and haven't gotten it to work yet).

Bonus: It would be nice to have some type of toggling script on the stick for GRUB4DOS that would boot the stick the first time and the hard drive the next.


This should be possible using the "default" file and the savedefault directive in a "cross-linked" manner, I'll have a look in the matter.

jaclaz

#44 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 15 November 2006 - 08:56 AM

Edit: savedefault was broken in GRUB but is now working after updating to a later version (0.4.2 pre11 dated 10-2006). The following accomplishes the desired toggle. I am not very familiar with GRUB, if there is a more correct way to boot XP from the hard drive on the GUI entry (or the USB boot), someone please jump in.

color black/cyan yellow/cyan
timeout 10

default /default

title Phase 1 WinXP Text Mode Setup
map --read-only (hd0) (hd1)
rootnoverify (hd1)
chainloader (hd1)+1
savedefault 1
boot

title Phase 2 WinXP GUI Mode Setup
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)
chainloader +1
savedefault 0
boot


Item of note: to make things easier, I installed GRUB4DOS using WinGRUB. However, to get the latest version, I downloaded a later version of GRUB4DOS and copied the newer GRLDR file onto the stick.

To make savedefault work, it is necessary to copy the file DEFAULT from the GRUB4DOS installation files to the root of the stick.

The last issue still eludes me. Attached is a file listing of those files that are deleted from the stick during the text mode setup phase. The newer GRUB honors the --read-only switch. So, Windows setup now says it cannot copy those files - I guess it considers the copy a fail if it cannot delete the source file. The answer to this one will probably be on the Windows side of things.

Attached File(s)


This post has been edited by porear: 15 November 2006 - 07:29 PM


#45 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 15 November 2006 - 10:45 PM

The key to the file deletion problem should be TXTSETUP.SIF. I'm looking for a definitive description of the TXTSETUP.SIF syntax.

This post has been edited by porear: 15 November 2006 - 11:08 PM


#46 User is online   jaclaz 

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

Posted 16 November 2006 - 03:17 AM

GOOD! :)

A quick small correction:

Quote

title Phase 2 WinXP GUI Mode Setup
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)
chainloader +1
savedefault 0
boot
is exactly the same as:

Quote

title Phase 2 WinXP GUI Mode Setup
rootnoverify (hd1)
chainloader +1
savedefault 0
boot


Quote

The key to the file deletion problem should be TXTSETUP.SIF.


Yes, there must be somewhere a directive "keeep all files".... :huh:

jaclaz

#47 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 16 November 2006 - 07:47 AM

Quote

map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)

is exactly the same as:

rootnoverify (hd1)

I really thought so too - but when I tried the second entry, it boots into text setup on the stick :unsure: When instead trying rootnoverify (hd0) with no mapping, I reboot back into GRUB.

I've been playing the with numbers between all the commas in the TXTSETUP.SIF entries in the [SourceDisksFiles} section. Changing the tenth digit to a 3 stops the file from being deleted, but it also stops it from being copied. :wacko:

One... more... detail...

This post has been edited by porear: 16 November 2006 - 10:46 AM


#48 User is online   jaclaz 

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

Posted 16 November 2006 - 10:52 AM

porear said:

I really thought so too - but when I tried the second entry it did not work. ?


hmmm, very strange, however, if it works with the double exchange, let it be! :)


porear said:

Changing the tenth digit to a 3 stops the file from being deleted, but it also stops it from being copied.


Well, according to this:

http://www.msfn.org/...showtopic=14852

the 3 would mean "do not copy", most probably it means "ignore".

It seems like I cannot find a "proper", i.e. complete TXTSETUP.SIF howto, I am trying to put tohether all bits of info I can find...., but at the moment nothing that can resolve the file deleting problem.

More info on gosh's pages:
http://gosh.msfn.org/txtsetup.htm

jaclaz

P.S.: about:

porear said:

Item of note: to make things easier, I installed GRUB4DOS using WinGRUB. However, to get the latest version, I downloaded a later version of GRUB4DOS and copied the newer GRLDR file onto the stick.


Though possible, as you made it, to install grldr.mbr to the MBR and copy GRLDR to the stick, it is not the "recommended" way, as the MBR code is (of course) different from "standard" NT/Win2K/XP2003 MBR code, it is possible (and there were reports abut this) that the motherboard BIOS won't boot from it.

The recommended way is to prepare the stick with the HP tool under Win2K/XP/2003 WITHOUT telling it to put DOS files in the key, or however format the key under the same OSses in a manner to have the bootsector of the primary partition that invokes NTLDR.
Then either:
1) copy to the stick NTLDR and a boot.ini with an entry :

Quote

C:\GRLDR="Grub 4 DOS"

or
2) copy to the stick grldr and RENAME it as NTLDR

This post has been edited by jaclaz: 16 November 2006 - 11:30 AM


#49 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 16 November 2006 - 01:10 PM

I edited the previous post to give more detail about what happened when I tried to remove the swap mapping. Without it, rootnoverify (hd0) boots GRUB on the stick, and rootnoverify (hd1) boots to the ntldr loader on the stick.

I have tried in vain as well to find any detailed TXTSETUP.SIF documentation.

Thanks for the tips about how I've installed my GRUB. I did not know this was an issue. My stick boots fine this way on my machine, but I would rather go with a reliable method that will cause the least problems.

I'll try what you suggest, it sounds very straightforward. For creating a stick that boots looking for ntldr, I think all we would need to do is format the stick with PeToUSB instead of the HP tool.

Thanks again!!! :)

This post has been edited by porear: 16 November 2006 - 01:11 PM


#50 User is online   jaclaz 

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

Posted 16 November 2006 - 01:48 PM

porear said:

I'll try what you suggest, it sounds very straightforward.


You must thank Spacesurfer, that found this way to cut some corners:
http://www.911cd.net...showtopic=18031


porear said:

Without it, rootnoverify (hd0) boots GRUB on the stick, and rootnoverify (hd1) boots to the ntldr loader on the stick.


I checked on some other posts/howto, you are right, the exchange takes place.
To make sure, you can try from a Grub4dos command line, repeating the same commands one by one, and use "root" instead of "rootnoverify", Grub4dos should put on screen a brief message describing the partition it "rooted" too.

jaclaz

This post has been edited by jaclaz: 16 November 2006 - 01:52 PM


#51 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 17 November 2006 - 07:46 AM

EDITED

I formatted the stick and got everything booting using the SETUPLDR.BIN renamed as NTLDR. I then replaced the NTLDR with the GRLDR renamed as NTLDR - and get only a flashing cursor in the top left corner of the screen.

I tried the boot.ini method and it works, but so far both of my original menu.lst entries end up booting right back into the stick and GRUB. ?? :( I'll have to work on this. Even working at the command line, I reboot into the stick.

rootnoverify (hd0)
chainloader +1
boot

and

rootnoverify (hd1)
chainlaoder +1
boot

do exactly the same thing.

In other news, wasted some time before I realized my USB stick was fried - formatting kept hanging up. I tried wiping the disk, including the boot sector, and starting fresh, but in the end it was a hardware issue. Had to get another stick.

This post has been edited by porear: 17 November 2006 - 10:19 AM


#52 User is online   jaclaz 

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

Posted 17 November 2006 - 11:02 AM

Sorry for your stick. :(

Maybe, depending on make/model, or to be more exact actual USB controller that it is on stick, it may be possible to use the manufacturer Production Tool to "low level" format it to factory condition.

Please post Vid&Pid of the device, maybe it's one of those for which a tool is available.

About the GRLDR renamed as NTLDR, it is possible that it is one of those cases that it doesn't work, but through "real" NTLDR/BOOT.INI it SHOULD work.

Try using the Find command in Grub4DOS with autocomletion, i.e. type:

Quote

find ( [tab]

(the above means type "find", an open parenthesis (, then press the TAB key.
It should list devices available....

Is it possible that it is one of those incompatibilities with motherboard BIOS (i.e that it reads CHS ok, but not LBA or viceversa) ? :blink:

jaclaz

P.S.: cdob just reported that the "other" method is working:
http://www.msfn.org/...topic=81788&hl=

This post has been edited by jaclaz: 17 November 2006 - 11:06 AM


#53 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 17 November 2006 - 11:29 AM

No worries about the stick, I've already trashed it. It was fun prying it apart and playing with the insides :)

Thanks for this, I was looking for a way to do that:

Quote

find ( [tab]


I have fd0, hd0, hd1, rd

Now that I no longer have GRUB in the MBR, for some reason everything points back to teh first sector of the USB stick, which goes through NTLDR to GRUB. :blink:

#54 User is online   jaclaz 

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

Posted 17 November 2006 - 11:34 AM

That's VERY strange.

Try directy chainloading a setupldr.bin, something like:

Quote

Title directly load SETUPLDR.BIN
find --set-root /setupldr.bin
chainloader /setupldr.bin


jaclaz

#55 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 17 November 2006 - 01:12 PM

That worked. The new menu.lst is

color black/cyan yellow/cyan
timeout 10

default /default

title Phase 1 WinXP Text Mode Setup from USB
rootnoverify (hd0,0)
chainloader (hd0,0)/setupldr.bin
savedefault 1
boot

title Phase 2 WinXP GUI Mode Setup from Hard Drive
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader (hd0,0)/ntldr
savedefault 0
boot

With regards to the renamed GRLDR, this note in the GRUB4DOS readme.txt might apply?:

Quote

Someone reports that Windows XP with newer SPs and Windows Vista have intentionally broken the compatiblity with many things(including GRLDR). So you will get into trouble with these systems.

I am still working the other file deletion issue, I've printed out TXTSETUP.SIF and the deleted files list. So far in doing a visual comparison, nothing jumps out.

This post has been edited by porear: 17 November 2006 - 09:48 PM


#56 User is online   jaclaz 

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

Posted 18 November 2006 - 04:16 AM

porear said:

With regards to the renamed GRLDR, this note in the GRUB4DOS readme.txt might apply?:

Well, as I read it, it seems to me that it was related to GRLDR installed on a NTFS partition, there should be no problems on a FAT one.

The "boot" directive at the end of the menu entries should not be needed.

I had a deeper look at the mstechnet article here:
http://technet2.microsoft.com/WindowsServe...f63a971033.mspx

It appears that the deletion takes place at step 7. below:

Quote

Upgrade: Final Stage (Also Known as GUI-Mode Stage)

1. Using Plug and Play technology, Setup loads appropriate device drivers for the attached devices.

2. Setup configures settings using the existing registry as a baseline.

3. Setup copies files to the hard disk for operating system components that have not yet been installed.

4. Setup installs Start menu items and makes changes to the registry.

5. Setup sets file and folder permissions to protect the new operating system, for example, for files in the root directory, the system root folder, and the registry.

6. Setup runs Windows File Protection to ensure that all upgraded files are valid.

7. Setup removes any temporary files used during the installation process.

8. Setup restarts the computer. A few final user settings are applied after this restart, much like the process that happens at the beginning of any restart. The upgrade is then complete


or at step 10 below:

Quote

Clean Installation: Final Stage (Also Known as GUI-Mode Stage)

1. Using Plug and Play technology, Setup loads appropriate device drivers for the attached devices.

2. Setup requests information about the following items:
• Regional and language options
• Your name and the name of the organization (the name of the organization can be left blank)
• Product key
The 25-character product key is printed on a sticker on the back of your Windows Server 2003 product CD case.
• The licensing mode
• Computer name and administrator password
• Date and time settings

3. Setup installs a basic set of network components to begin the process of establishing network connectivity.

4. Setup requests information about the following items:
• Networking settings
• Workgroup or computer domain

5. Setup configures the settings that were specified.

6. Setup copies files to the hard disk for operating system components that have not yet been installed.

7. Setup installs Start menu items and makes changes to the registry.

8. Setup sets file and folder permissions to protect the new operating system, for example, for files in the root directory, the systemroot folder, and the registry.

9. Setup runs Windows File Protection to ensure that all installed files are valid.

10. Setup removes any temporary files used during the installation process.

11. Setup restarts the computer. A few final user settings are applied after this restart, much like the process that happens at the beginning of any restart. The installation is then complete.


At that moment it seems like TXTSETUP.SIF is not used anymore, other files like (maybe):

Quote

Sprestrt.exe and Undo_Guimode.txt

Sprestrt.exe, which runs at the start of GUI mode, determines if GUI mode ran previously and failed. If so, Undo_Guimode.txt is used to bring files back to the state appropriate for the beginning of GUI mode.


Maybe something can be made in Unattended settings, though I doubt it.

I am not at all an expert in setup, maybe there is a way, just before files are deleted, to execute a command to rename the folder to something else, and then set at next boot of the GUI (first real boot of the installed system) with RunonceEx or some other Registry entry, a command to rename folder back.... :huh:

jaclaz

#57 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 18 November 2006 - 07:05 AM

Those are all good ideas, thanks so much for putting so much effort into researching this. Its definitely out of my experience level.

I've posted this particular question back at the top (Windows XP) level of the forum so maybe the added visibility will atttract the attention of a setup expert.

Quote

It appears that the deletion takes place at step 7

Quote

or at step 10

In our case for these specific files, it is happening before this stage. That entry is in the final GUI mode stage, whereas our files are deleted as they are copied while still in text mode in the very early stages. Its actually here, which is step 10 of the Initial Stage:

Quote

10. After carrying out the specified partition and file system changes, Setup checks that the partition you selected contains enough space to hold the installation, and then copies files to the partition. The files are most of those that will become the new operating system.

However, you are right, once we get there that we will be looking for a way to stop deletion of the entire $WIN_NT$.~BT and $WIN_NT$.~LS temporary directories during final install cleanup. I believe this is the step 10 you mention.

This post has been edited by porear: 18 November 2006 - 09:41 PM


#58 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 19 November 2006 - 07:26 AM

I wanted to submit a quick clarification that may cover some misunderstandings about the problem that is occurring.

When text mode setup is ran from the stick, all the usual steps are encountered (pick a partition, format the partition or leave alone, check for appropriate disk space, etc).

Then file copying begins. The files we are trying to save are each deleted one by one as they are copied, not as a batch at the end. If I let a few files get copied and interrupt the install, those files are already gone from the stick.

This is a separate and more immediate issue than the deletion of the temp install directroies at the end of GUI setup.

Hope this helps some... thanks!

#59 User is online   jaclaz 

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

Posted 19 November 2006 - 08:20 AM

porear said:

Then file copying begins. The files we are trying to save are each deleted one by one as they are copied, not as a batch at the end.


Now I see, :blushing:, just like the setup or whatever is running was using the MOVE command instead of the COPY one.

I guess this is hardcoded.... :angry:, maybe in Setupdd.sys :blink:

Another idea, why not letting the setup delete those files and later undelete them?
Since no new data is written to the stick, files should be fully recoverable, it would just be a matter of going through the FAT/directory entries and rename the files with a leading "å" to their original name, or easier still, make a "snapshot" of the few sectors involved BEFORE running the install, saved to a file, and later restore those sectors from within the installed XP, with a suitable "Direct disk access" app, like the DSFOK toolkit:
http://members.ozema...eezip/freeware/
http://members.ozemail.com.au/~nulifetv/fr...eware/dsfok.zip

The overhead of having dsfi.exe and an image of, say, first 200 sectors of the stick would be negligible, around 15 kbytes as well as the time involved in the restoring.... ;)



jaclaz

This post has been edited by jaclaz: 19 November 2006 - 08:50 AM


#60 User is offline   porear 

  • Newbie
  • Group: Members
  • Posts: 49
  • Joined: 10-August 04

Posted 19 November 2006 - 12:36 PM

You are correct, its acting just like a move.

Quote

I guess this is hardcoded, maybe in Setupdd.sys
I thought this might be the case and I had tried poking around in setupdd.sys with a hex editor but found nothing I could recognize to alter.

Quote

Another idea, why not letting the setup delete those files and later undelete them?

I think that is an EXCELLENT idea. I had the blinders on and thought the only way to recover would be to recopy all the files again, I didn't consider it might only need an undelete.

A candidate for initiating this might be the cmd switch when winnt32.exe is ran, apparently it somehow codes custom commands to be run later. I'll have to experiment unless someone is familiar with this switch, because the two references I have found about it do not seem to me to agree about when it happens:

from http://winsupersite....dline_setup.asp

Quote

/cmd:
Allows you to specify a set of commands that will execute when the GUI portion of Setup is complete. Typically, this parameter is used to execute a set of commands located in a file called cmdlines.txt. Ex: winnt32 /cmd:cmdlines.txt
and from http://www.quepublishing.com/articles/arti...qNum=6&rl=1

Quote

/cmd:command_line
Instructs Setup to carry out a specific command before the final phase of Setup.


Share this topic:


  • 25 Pages +
  • 1
  • 2
  • 3
  • 4
  • 5
  • Last »
  • You cannot start a new topic
  • This topic is locked

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



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