Halfwalker

How to boot/install from USB key ?

486 posts in this topic

GOOD! :)

A quick small correction:

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:
title Phase 2 WinXP GUI Mode Setup

rootnoverify (hd1)

chainloader +1

savedefault 0

boot

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

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

jaclaz

0

Share this post


Link to post
Share on other sites
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...

Edited by porear
0

Share this post


Link to post
Share on other sites
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! :)

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/board/index.php?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:

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 :

C:\GRLDR="Grub 4 DOS"

or

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

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

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!!! :)

Edited by porear
0

Share this post


Link to post
Share on other sites
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/forums//index.php?showtopic=18031

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

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

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.

Edited by porear
0

Share this post


Link to post
Share on other sites

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:

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/board/index.php?showtopic=81788&hl=

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

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:

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:

0

Share this post


Link to post
Share on other sites

That's VERY strange.

Try directy chainloading a setupldr.bin, something like:

Title directly load SETUPLDR.BIN

find --set-root /setupldr.bin

chainloader /setupldr.bin

jaclaz

0

Share this post


Link to post
Share on other sites

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?:

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.

Edited by porear
0

Share this post


Link to post
Share on other sites
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:

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:

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):

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

0

Share this post


Link to post
Share on other sites

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.

It appears that the deletion takes place at step 7
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:

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.

Edited by porear
0

Share this post


Link to post
Share on other sites

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!

0

Share this post


Link to post
Share on other sites
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.ozemail.com.au/~nulifetv/freezip/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

Edited by jaclaz
0

Share this post


Link to post
Share on other sites

You are correct, its acting just like a move.

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.
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.com/showcase/win2k_cmdline_setup.asp

/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
/cmd:command_line

Instructs Setup to carry out a specific command before the final phase of Setup.

0

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Recently Browsing   0 members

    No registered users viewing this page.