How to boot/install from USB key ? - the historical thread - how it all began
#42
Posted 14 November 2006 - 10:44 PM
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
Posted 15 November 2006 - 03:04 AM
Quote
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
Posted 15 November 2006 - 08:56 AM
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)
-
delfiles.txt (37.75K)
Number of downloads: 20
This post has been edited by porear: 15 November 2006 - 07:29 PM
#45
Posted 15 November 2006 - 10:45 PM
This post has been edited by porear: 15 November 2006 - 11:08 PM
#46
Posted 16 November 2006 - 03:17 AM
A quick small correction:
Quote
map (hd1) (hd0)
map (hd0) (hd1)
rootnoverify (hd1)
chainloader +1
savedefault 0
boot
Quote
rootnoverify (hd1)
chainloader +1
savedefault 0
boot
Quote
Yes, there must be somewhere a directive "keeep all files"....
jaclaz
#47
Posted 16 November 2006 - 07:47 AM
Quote
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
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.
One... more... detail...
This post has been edited by porear: 16 November 2006 - 10:46 AM
#48
Posted 16 November 2006 - 10:52 AM
porear said:
hmmm, very strange, however, if it works with the double exchange, let it be!
porear said:
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:
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
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
Posted 16 November 2006 - 01:10 PM
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
Posted 16 November 2006 - 01:48 PM
porear said:
You must thank Spacesurfer, that found this way to cut some corners:
http://www.911cd.net...showtopic=18031
porear said:
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
Posted 17 November 2006 - 07:46 AM
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. ??
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
Posted 17 November 2006 - 11:02 AM
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
(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) ?
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
Posted 17 November 2006 - 11:29 AM
Thanks for this, I was looking for a way to do that:
Quote
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.
#54
Posted 17 November 2006 - 11:34 AM
Try directy chainloading a setupldr.bin, something like:
Quote
find --set-root /setupldr.bin
chainloader /setupldr.bin
jaclaz
#55
Posted 17 November 2006 - 01:12 PM
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
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
Posted 18 November 2006 - 04:16 AM
porear said:
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
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
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, 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....
jaclaz
#57
Posted 18 November 2006 - 07:05 AM
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
Quote
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
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
Posted 19 November 2006 - 07:26 AM
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
Posted 19 November 2006 - 08:20 AM
porear said:
Now I see,
I guess this is hardcoded....
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
Posted 19 November 2006 - 12:36 PM
Quote
Quote
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
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
Quote
Instructs Setup to carry out a specific command before the final phase of Setup.



Help
This topic is locked
Back to top









