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

#251
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 963 posts
@jaclaz

I like rdisk(z-1) idea.
This should work in most cases. Tests have to follow.
Strange BIOS, like wanderer's BIOS, may get different results.

I changed one line at binifix.cmd.
rem IF "%%A"=="Default" SET DefaultEntry=%%B
IF /I "%%A"=="default" SET DefaultEntry=%%B
Signature compare Post #34
http://www.msfn.org/...p...st&p=585105
Dosn't signature() contain rdisk(0) already?
Do we habe to change a signature() line?

Nice, your code is already fail safe

ERROR
DefaultEntry is multi(0)disk(0)rdisk(0)partition(1)\WINNT

The rdisk value is ALREADY 0
You don't want me to set it as -1, don't you?

Yes BOOT.INI should always be on C:\BOOT.INI, but it isn't always in real life.
Please read Post #220, boot.ini is seeked at %SystemDrive%. If this fails, drive letters are seeked in decending order.
This support more cases. Of course this may fail at strange machines.
Given a default MS MBR: How to detect the drive letter of primary active partition?

Can you backup a existing boot.ini as e.g. boot.bak?
%date% from Post #220 was a bad idea. This may fail at different languages.


How to remove advertisement from MSFN

#252
wimb

wimb

    Senior Member

  • Developer
  • 677 posts
The line to SET Timeout requires also to be changed by adding /I
IF /I "%%A"=="Timeout" SET Timeout=%%B

But then binifix.cmd does its job OK :)

Due to delims== the EntryDesc misses the last part =optin /fastdetect

Edited by wimb, 12 July 2007 - 05:47 AM.


#253
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,073 posts
  • OS:none specified
  • Country: Country Flag
@cdob
@wimb

Good work in bug finding guys! :)

I'll try and fix the reported misbehaviour of the batch.

@cdob

Yes, I just added the signature(aabbccdd) syntax as a "proof of concept" that the "logic" in the batch can be adapted to ANY situation, you are right, we can get rid of it in "final" release.

About drive letter, I give as assumed that boot.ini is on the root of the drive, I wasn't sure that, at the time when the batch needs to be run, %systemdrive% represents correctly the latter (and I am still NOT convinced of it, I know I am a bit tough ;)) but as I usually, and from immemorable time, install Windows NT/2K/XP in extended partitions, %systemdrive% does NOT represent the BOOT drive.
I had gathered from the thread that the "definitive" boot.ini is ALWAYS on C:\, boot drive, i.e. First Primary Active Partition of First Hard Disk, no matter where windows is installed, I would like to have a confirm of that, otherwise I think we need to use the batch passing to it a parameter.

Given a default MS MBR: How to detect the drive letter of primary active partition?

No problem if I can access the DosDevices key of the Registry, what I am not sure about is if at the time the batch is meant to run the Registry is accessible (I suppose not) and if the proper entry has already been written to the key.
But, as said, if NO other "strange" setting has been applied, First Primary Active Partition of First Hard Disk, should always be C:\, maybe I can add the drive letter as an optional parameter for the batch (if not supplied willl default to C: ) :unsure:

No prob in adding a BOOT.INI -> BOOT.BAK feature, nice (and safe) idea. :)

@wimb
Can you post an example of line where the "=" sign is used on the left of the "main" "=" sign for description?
Also, are there any cases where more than one "=" sign is used (besides the "main" one)?

I guess I can modify the "tokens=1,2" "to tokens 1,*" or "tokens 1,2,3", but I need one (or more) example(s) to test the behaviour.

jaclaz

#254
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,710 posts
  • OS:none specified
  • Country: Country Flag
Good job :thumbup.

No problem if I can access the DosDevices key of the Registry, what I am not sure about is if at the time the batch is meant to run the Registry is accessible (I suppose not) and if the proper entry has already been written to the key...

Script could be run at first logon via [GUIRunOnce] along with undoren.cmd, when folders on stick are renamed back to ~LS and ~BT, so it should be OK.

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


#255
wimb

wimb

    Senior Member

  • Developer
  • 677 posts
I modified the script so that the EntryDesc includes the last part =optin /fastdetect

FOR /F "tokens=1,2,3 delims==" %%A in ('TYPE %source%') DO (
IF /I "%%A"=="Default" SET DefaultEntry=%%B
IF "%%A"=="!DefaultEntry!" SET EntryDesc=%%B=%%C
IF /I "%%A"=="Timeout" SET Timeout=%%B
)

This works for simple boot.ini but the script needs more adjustment for boot.ini of BOOTFILES folder
or other complex boot.ini

Edited by wimb, 12 July 2007 - 09:01 AM.


#256
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,073 posts
  • OS:none specified
  • Country: Country Flag
@wimb
This should work as well, takes into account multiple (if any) "=" but the main one, and is a bit more simple ;):
FOR /F "tokens=1,* delims==" %%A in ('TYPE %source%') DO (
IF /I "%%A"=="default" SET DefaultEntry=%%B
IF "%%A"=="!DefaultEntry!" SET EntryDesc=%%B
IF /I "%%A"=="timeout" SET Timeout=%%B
)

This works for simple boot.ini but the script needs more adjustment for boot.ini of BOOTFILES folder or other complex boot.ini


Please do post some examples of these boot.ini's so that I can adapt the code.

@ilko_t
Ok, I'll see what I can do with the Registry thingy.

jaclaz

#257
wimb

wimb

    Senior Member

  • Developer
  • 677 posts
The second part of the script needs also some adjustment
FOR /F "tokens=1,2,3 delims==" %%A in ('TYPE %source%') DO (
IF /I "%%A"=="Default" SET DefaultEntry=%%B
IF "%%A"=="!DefaultEntry!" SET EntryDesc=%%B=%%C
IF /I "%%A"=="Timeout" SET Timeout=%%B
)
......
......
FOR /F "skip=4 tokens=1,2,3 delims==" %%A in ('TYPE %source%') DO (
IF NOT "%%A"=="!DefaultEntry!" (
ECHO %%A=%%B=%%C>>boot.txt
.......
........

A problem occurs when trailing spaces are present in the !DefaultEntry! string.
This occurs for the boot.ini in folder BOOTFILES
The traling spaces must first be removed.

Edited by wimb, 12 July 2007 - 12:06 PM.


#258
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,073 posts
  • OS:none specified
  • Country: Country Flag
@wimb
Hey, I don't want to seem unfriendly, I am not, and at times I am also an extraordinarily friendly guy :), but when one asks (I guess politely) for something, like:

@wimb
Can you post an example of line where the "=" sign is used on the left of the "main" "=" sign for description?
Also, are there any cases where more than one "=" sign is used (besides the "main" one)?


and:

This works for simple boot.ini but the script needs more adjustment for boot.ini of BOOTFILES folder or other complex boot.ini

Please do post some examples of these boot.ini's so that I can adapt the code.


One expects two kinds of replies:
#1: Yes, here are the examples required.
#2: No, I will never post what you required.
(and all possible variations of the above)

Quite frankly telling me HOW I should correct a batch file I wrote, because it does not work with some entries of which I have not (and asked for twice) any example is a bit trying for my otherwise good manners.

However, should I have failed in explaining this before, can you please post some examples of boot.ini files that do not work with the tentative batch I posted?

jaclaz

#259
wimb

wimb

    Senior Member

  • Developer
  • 677 posts
@jaclaz

@wimb
Can you post an example of line where the "=" sign is used on the left of the "main" "=" sign for description?
Also, are there any cases where more than one "=" sign is used (besides the "main" one)?

As fas as I know there is no boot.ini example with a line where the "=" sign is used on the left of the "main" "=" sign for description.

The standard boot.ini of Microsoft is a case where more than one "=" sign is used (besides the "main" one)
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect

In my posts #255 and #257 I indicated that the script does not work for the well known boot.ini of folder BOOTFILES
that we all use in the procedure for Install of Windows XP from a bootable USB-stick, as reproduced here:

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
CODE
[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

It is not easy to find, why the script does not work for this paticular boot.ini
But when you select the boot.ini you can see there is a trailing space in the line with the entry default.
It is this trailing space which causes the problem,
because it becomes part of the seach string !DefaultEntry! used to determine EntryDesc according to:

IF "%%A"=="!DefaultEntry!" SET EntryDesc=%%B
Due to the trailing space, the search gives no valid result for EntryDesc

When I was writing this result in my post #257, your post #256 was not yet on my screen visible,
but came up after submitting the post. So this explains why I missed your request at that time.
But anyway I indicated in my posts #255 and #257 that the script does not work for the well known
boot.ini of folder BOOTFILES.

Edited by wimb, 13 July 2007 - 12:54 AM.


#260
cdob

cdob

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 963 posts
@jaclaz
Assumption was: If %systemdrive%\boot.ini exist, this indicate "definitive" boot.ini.
If %systemdrive%\boot.ini dosn't exist, but C:\boot.ini exist, use C:\boot.ini.
Assumption was not: %systemdrive% contain boot.ini.

A logical partition dosn't cotain a d:\boot.ini by default.
Of course there can exist a c:\boot.ini and a d:\boot.ini.
Assumption will fail at this case.

And there can be several primary partitions.
Each primary partition can hold a different boot.ini.
Assumption may fail too.

Assumption c:\boot.ini is fine in most cases.

Contrary the "definitive" boot.ini is not always on C:\.
Remember the RAM loaded install solution: Primary Active Partition of First Hard Disk got D:
What about several internal hard disk including internal card readers?
I recall another windows installation was not at c: Sorry I don't remember details anymore.

Given a grub4dos MBR, "definitive" boot.ini can be at diferent drive letters.
Contrary most likely after Windows installtion, there is a default MS MBR.

No problem if I can access the DosDevices key of the Registry, what I am not sure about is if at the time the batch is meant to run the Registry is accessible (I suppose not) and if the proper entry has already been written to the key.

Textmode setup write a false rdisk(), first reboot fails.
Batch should run at end of textmode setup.

@ilko_t and wimb
Dosn't this replace bootfiles\boot.ini?
Call jaclaz's batch at [SetupParams] UserExecute = "%systemdrive%\windows\system32\boot_ren.cmd" ?


@jaclaz
Just wondering: Rename %SysteDrive% early at installation?
Currently I don't know if this is useful, but maybe I need this one day.
At end of textmode setup:
What happens if DosDevices key in Registry is chaned from c: to d:, or from d: to c: ?
E.g. is there full path to Userinit.exe already?
Compare http://support.micro....com/kb/249321/

#261
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,073 posts
  • OS:none specified
  • Country: Country Flag
@all
Please find attached a 2nd tentative version of the batch file.
Unlike the first version, this will ONLY work with a BOOT.INI on root of a drive (or in a path without spaces in it)

Solved three problems:
1) one or more "=" signs on the right of the "main" one
2) one or more leading or trailing spaces in entry or entry description
3) empty lines

Added backup feature for original BOOT.INI, saving a maximum of three versions.

@cdob
I'll look at your suggestions, I have not yet a complete and definite idea on how to find the right drive.

There is a key in Registry:
HKEY_LOCAL_MACHINE\SYSTEM\Setup\SystemPartition
where this values are set:
"SetupType"=dword:00000000
"SystemSetupInProgress"=dword:00000000
"CmdLine"="setup -newsetup"
"SystemPrefix"=hex:c2,0b,00,00,00,40,3f,20
"SystemPartition"="\\Device\\HarddiskVolume1"
"OsLoaderPath"="\\"

Though illogical as it may seem, the "SystemPartition" actually appears to represent the "Boot" partition, as opposed to %SystemRoot%.

"\\Device\\HarddiskVolume1" is a "symbolic" link for which I have not found (at least yet ;) ) a way through pure batch and through "normal" XP included command line tools.

One could however use the vlm.exe utility (part of the DSFOK toolkit) to "couple" this link to actual drive letter.

Otherwise we are back to "square 1" with DMDIAG.EXE.

I would greatly prefer to only use "standard" tools, so any idea is welcome, maybe this is possible through a .wbs script?

jaclaz

P.S.: Please someone have a look at this batch:
http://www.robvander.../bootdrive.html
(I have not handy a XP machine right now)
Does this return "System" or "Boot" drive?

Attached Files


Edited by jaclaz, 13 July 2007 - 10:09 AM.


#262
wimb

wimb

    Senior Member

  • Developer
  • 677 posts

@ilko_t and wimb
Dosn't this replace bootfiles\boot.ini?
Call jaclaz's batch at [SetupParams] UserExecute = "%systemdrive%\windows\system32\boot_ren.cmd" ?

The version of binifix2.cmd will not yet be able to replace the use of bootfiles\boot.ini
because then the signature problem with 20 sec bootdelay described in my post #141 will return:

Replacing signature(87538753)disk(0)rdisk(0)partition(1)\WINDOWS by
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS in the boot.ini file and removing the second entry,
solved the problem and now the computer is booting as fast as normally

Also the availability of the Repair Install option of Windows XP Setup from a bootable USB-stick
still requires such a multi-entry boot.ini
But in most cases one does not need this Repair Install option and one can change boot.ini if needed.

Actually I had no problem with the value of rdisk.
The GUI-Phase of Setup always made the correct value of rdisk(0) in boot.ini
For me the problem was that the default entry was set to signature(87538753)... entry, which gives bootdelay.
So I am a bit confused about the purpose of the present binifix.cmd

[SetupParams] runs at T-9 and that seems a suitable moment to use binifix.cmd, but I am not sure.
I remember that ilko_t observed that boot.ini is changing many times during setup.
Testing of the final version of binifix.cmd will be necessary to determine if this moment is right,
or that we use [GuiRunOnce] at First Logon.

@jaclaz
After changing drive W: into C: the binifix2.cmd was tested on two boot.ini files
All boot.ini files were modified correctly and the problem of trailing spaces is solved.
It is nice that a backup of boot.ini is made now as well.
After some modification for unattended use,
it will be interesting to use the final version of binifix.cmd in a real Install of Windows XP from bootable USB-stick.

Edited by wimb, 14 July 2007 - 01:15 AM.


#263
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,073 posts
  • OS:none specified
  • Country: Country Flag
@wimb

Could not the batch file provide a way to automatically get rid of the signature(aabbccdd) line of your post #141?

If I get it right, that line gets the correct rdisk(z), and as so it would just be a matter of replacing signature(aabbccdd) in the lines with multi(0).

As "normally" there are no entries with signature(aabbccdd) syntax in boot.ini, if one is found it should always be the one created by the install.

Just to be on the safe side one could just correct the default entry and duplicate the [Operating Systems] one, leaving one entry with the multi(0) and one with the signature(aabbccdd) syntax that could be manually selected in case the "direct" one, for any reason, won't boot.

jaclaz

#264
wimb

wimb

    Senior Member

  • Developer
  • 677 posts

@wimb

Could not the batch file provide a way to automatically get rid of the signature(aabbccdd) line of your post #141?

If I get it right, that line gets the correct rdisk(z), and as so it would just be a matter of replacing signature(aabbccdd) in the lines with multi(0).

As "normally" there are no entries with signature(aabbccdd) syntax in boot.ini, if one is found it should always be the one created by the install.

Just to be on the safe side one could just correct the default entry and duplicate the [Operating Systems] one, leaving one entry with the multi(0) and one with the signature(aabbccdd) syntax that could be manually selected in case the "direct" one, for any reason, won't boot.

jaclaz

The present binifix2.cmd does not change the signature entry, it only changes rdisk(1) in rdisk(0)

You are perfectly right that rdisk(0) need not to be changed for me and that it will be just a matter of replacing signature(aabbccdd) in the lines with multi(0) .
It would be very nice if the binifix2.cmd can be a way to change that.

For the [Operating Systems] I got two lines which became equal after I changed signature(87538753) in multi(0),
so I removed the "double" one. That seems to me always save for a new install,
but for a Repair Install your save solution can be interesting.

But it might be that in the configuration of ilko_t with SATA drives it is different,
but I think he will comment on that.

Edited by wimb, 14 July 2007 - 02:27 AM.


#265
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,073 posts
  • OS:none specified
  • Country: Country Flag
@wimb

Please try the attached binifix3.cmd

Changes:
1) Replaces (if Default entry)
signature(aabbccdd)disk(0)rdisk(z)partition(w)\windir
with:
multi(0)disk(0)rdisk(z)partition(w)\windir
Both in default entry and in [Operating Systems]
2) Writes original entry in [Operating Systems]:
signature(aabbccdd)disk(0)rdisk(z)partition(w)\windir="Some description" /some parameters
modified as follows:
signature(aabbccdd)disk(0)rdisk(z)partition(w)\windir=(signature) "Some description" /some parameters

This should cover all cases :unsure:, I guess that the user that uses this "experimental" way will be able to delete the (signature) entry from boot.ini manually once the new "default" one has proved to be working.

jaclaz

P.S.: Just found a smaller problem in binifix3.cmd
Removing the attachment, will re-add it later, as soon as I fix it.

OK, now it should work. :)

Attached Files


Edited by jaclaz, 14 July 2007 - 04:38 AM.


#266
wimb

wimb

    Senior Member

  • Developer
  • 677 posts
I am sorry to say, but I have made a mistake.

Today I made a Fresh Install from USB-stick without the xcopy command for bootfiles folder with boot.ini

The boot.ini that was produced by the Install procedure is given:

[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="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
As you can see there is no longer a signature entry and I have now also to correct the rdisk(1) to rdisk(0)

I was not aware of this change caused by the renewals that the Install Procedure has undergone.
I never saw this before because I was always using the procedure with the xcopy of bootfiles folder included.

So the signature and bootdelay problem no longer exists and we can return to the code of binifix2.cmd
And that means indeed that your code can replace the use of the xcopy of bootfiles\boot.ini
as cdob already suggested.

The effects of different Booting procedures are complicated and sometimes not to be foreseen.
I must apologise for the confusion that I have made.

Edited by wimb, 14 July 2007 - 05:33 AM.


#267
jaclaz

jaclaz

    The Finder

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

I must apologise for the confusion that I have made.


No need whatsoever to apologize, your contributions have been and are of the max importance. :)

However, since the binifix3.cmd has the same functionalities of binifix2.cmd, one could stay with it, just in case some other user, with different/strange BIOS or something else, should come out with a signature(aabbccdd) entry in boot.ini.

jaclaz

#268
wimb

wimb

    Senior Member

  • Developer
  • 677 posts

However, since the binifix3.cmd has the same functionalities of binifix2.cmd, one could stay with it, just in case some other user, with different/strange BIOS or something else, should come out with a signature(aabbccdd) entry in boot.ini.

binifix3.cmd was tested on the 4 different boot.ini files and everything is OK !

Thanks

wimb

Edited by wimb, 14 July 2007 - 07:20 AM.


#269
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,710 posts
  • OS:none specified
  • Country: Country Flag
Hi guys,
let me remind you this post of mine, which kinda summarizes the options about boot.ini:

@jaclaz - what we need is a way to get the proper ARC path is it would be seen if no USB stick's BOOT.INI is used to call the GUI mode, find in what directory windows was placed in and amend or create a new BOOT.INI.

The issues I can see:
- bootcfg.exe doesn't change entries when working in this mode, it works as if run in normal XP environment. So no options to add boot entries.
- If GUI setup is called by ntldr/ boot.ini on the stick, hard disk is seen by GUI SETUP and supposedly by any suitable tool for getting ARC path as HD1, instead of HD0.
- If Grub mapping is used (hd0->hd1 and hd1->hd0) boot.ini will be created by Setup with the proper ARC path, but with a signature, which we liked to avoid. May be a script can replace the signature part with "multi", resulting in proper boot.ini? Can you do it by script?

signature(de33eaf8)disk(0)rdisk(0)partition(1)\WINDOWS ---> multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

Menu.lst in this case would be like:

map --read-only (hd0) (hd1)
map --hook
root (hd1,0)
chainloader (hd1,0)/ntldrstp
restricting us to one hard disk only, if one plans to install it on another, mapping should be modified, which is a bit restricting. Thats why I preferred not to use mapping at all.
In summary: with mapping- signature part must be removed and Menu.lst amended if use more than 1 HD.
With no mapping- "universal" boot.ini must be used on both USB stick and the one we copy to hard disk.

Next few days I will be working on cdob's ideas.

BTW you mean bootcfg.exe, not bootfix.bin, right?


I'd like to avoid GRUB mapping, now we can also directly invoke setup by modified bootsector, meaning no GRUB at all.

If the batch file, which subtracts rdisk value is used wimb is right, this installation won't be seen as available for repair. To include this situation as well may we add an option to the batch script, something like:

would you like to include an entry for repair from USB?
If yes- leave the original entry with rdisk(z) and may be rename it to something like "only for USB repair, do not use to boot", change the default line to rdisk(z-1), and add the line with rdisk(z-1) under [operating systems]. If no- do not leave the old entry, just use the script we already got.
My idea about the choice is to leave boot.ini as simple as possible if one prefers, what do you think?

Folder bootfiles is no longer needed.

I can't recall and can't recreate the problem when on some installations the bootfiles didn't go to hard disk's first active partition, may be at that setup USB stick was seen as such during that stage of setup, and it placed or tried to place them on stick's root. To be on the safe side then I decided to copy them to hard disk anyway, this may not be necessary. It might have been when mixed SATA/IDE disks were used, now we know how to avoid the issue. For now I think we don't need to copy bootfiles again, also the script we are going to use assumes boot.ini is present on hard disk, which means ntdetect.com and ntldr will be there too.
The SATA disks should be no issue if no IDE drive/controller is present or it's disabled.

I am away for 2 weeks and as soon as I come back to my PC will make final tests and write an updated guide, I believe what we have gives us now pretty much "universal" way to install and repair XP from USB stick.

BTW have anyone tried this guide for USB hard disk? If I am right the USB disk should be seen as fixed, therefore listed first when TXT SETUP searches for disks, if that's the situation then we might need to go back to bootfiles folder or back to the option to create brand new boot.ini and copy ntdetect.com and ntldr, also a backup and later restore of boot.ini on USB disk might be needed.

Regards,
ilko

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


#270
jaclaz

jaclaz

    The Finder

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

If the batch file, which subtracts rdisk value is used wimb is right, this installation won't be seen as available for repair. To include this situation as well may we add an option to the batch script, something like:

would you like to include an entry for repair from USB?
If yes- leave the original entry with rdisk(z) and may be rename it to something like "only for USB repair, do not use to boot", change the default line to rdisk(z-1), and add the line with rdisk(z-1) under [operating systems]. If no- do not leave the old entry, just use the script we already got.
My idea about the choice is to leave boot.ini as simple as possible if one prefers, what do you think?


No prob, I'll add the option to keep the "USB Repair" entry in the batch.

Just an abstract idea, mind you, but we could make a second batch to "clean" the BOOT.INI from the signature(aabbccdd) and "USB repair" option entries on second boot, i.e. once the user is certain that the procedure worked.

For now I think we don't need to copy bootfiles again, also the script we are going to use assumes boot.ini is present on hard disk, which means ntdetect.com and ntldr will be there too.

You are right, I'll add this check to the batch.

I am away for 2 weeks and as soon as I come back to my PC will make final tests and write an updated guide, I believe what we have gives us now pretty much "universal" way to install and repair XP from USB stick.


Have fun and relax. :)

BTW have anyone tried this guide for USB hard disk? If I am right the USB disk should be seen as fixed, therefore listed first when TXT SETUP searches for disks, if that's the situation then we might need to go back to bootfiles folder or back to the option to create brand new boot.ini and copy ntdetect.com and ntldr, also a backup and later restore of boot.ini on USB disk might be needed.

I am not sure I fully understand this last part, but I think that if anything changes between USB stick and USB Hard Disk, we can make a detection in the batch for the type of media and have a conditional execution of different instructions.

jaclaz

#271
wimb

wimb

    Senior Member

  • Developer
  • 677 posts
Hallo Ilko,

You described already very well how the occurrence of signature entry and the value of rdisk in boot.ini depend on the way of booting the USB-stick. Thank you for reminding me of your post #207.
I learned a lot again about Booting USB-sticks these days !

I wish you a pleasant vacation.

Edited by wimb, 15 July 2007 - 06:39 AM.


#272
Biohead

Biohead

    ^^ Yes, that IS a Robin Reliant shuttle!

  • Member
  • PipPipPip
  • 336 posts
Is there any chance of writing an updated (read: final) guide for this?

And still cannot get MCE components, nor IE, nor WMP, nor Windows messenger to install on a preactivated OEM XP MCE install.
Beware the evil donkey falling slowly from the sky. You can choose the way you live my friend, but not the way you die!

Moral: You can plan, but they will never be followed perfectly.

#273
silacomalley

silacomalley

    Newbie

  • Member
  • 16 posts
If anyone wants to eliminate the need to use third party software to format their USB drive, you can do this....

Visit http://www.xpefiles....wtopic.php?t=92 and download the hitachi drivers.

Effectively, after install, your stick will be seen and treated as a regular hard drive. This way you can format and partition the Stick with the Windows manager, creating primary and extended/logical partitions, creating an xp MBR.

After downloading extract the contents. Open cfadisk.inf and note the following section, we will need to edit this in a moment.....

[cfadisk_device]%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC801%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC815%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-11000__________________________SC2IC915%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-10512__________________________SC1IC801%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-10512__________________________SC1IC815%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DSCM-10512__________________________SC1IC915%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DMDM-10340__________________________MD2IC501%Microdrive_devdesc% = cfadisk_install,IDE\DiskIBM-DMDM-10340__________________________MD2IC601; debug on VMWare/special drive; %Microdrive_devdesc% = cfadisk_install,IDE\DiskVMware_Virtual_IDE_Hard_Drive___________00000001; %Microdrive_devdesc% = cfadisk_install,IDE\DiskIC25N040ATCS04-0________________________CA4OA71A

Find and add the ID specific to your usb stick. To find this insert your USB stick and use REGEDIT navigate to HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USBSTOR registry key

There will be an entry for the subkey HardwareID. Open this and there will be a string of values - for my PMY stick the values are:
USBSTOR\DiskPNY_____USB_2.0_FD______PMAPUSBSTOR\DiskPNY_____USB_2.0_FD______USBSTOR\DiskPNY_____USBSTOR\PNY_____USB_2.0_FD______PPNY_____USB_2.0_FD______PUSBSTOR\GenDiskGenDisk

We only need to use the first value in the HardwareID string - in this case, for mine, USBSTOR\DiskPNY_____USB_2.0_FD______PMAP. Copy this value into the [cfadisk_device] section in cfadisk.inf. So for eg, my [cfadisk_device] section contains the following code:
[cfadisk_device]%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP%Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP; debug on VMWare/special drive; %Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP; %Microdrive_devdesc% = cfadisk_install,USBSTOR\DiskPNY_____USB_2.0_FD______PMAP

Save cfadisk.inf. Open Device manager and check for your USB drive in "Disk Drives". Right click on the entry for your drive and select option to update driver.

* Don't use windows update
* Install from a list or specific location
* Don't search for driver, but use....I will choose the driver to install
* Have disk
* Browse to location of edited cfadisk.inf

Update and restart windows. Your USB stick should be treated as any regular hard drive!

Let me know if this does not work with any of the current projects, as I have not yet gone through this whole XP on a stick! and tried it all out. He..He... :whistle:

Edited by silacomalley, 26 July 2007 - 03:23 PM.


#274
jaclaz

jaclaz

    The Finder

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

Is there any chance of writing an updated (read: final) guide for this?

And still cannot get MCE components, nor IE, nor WMP, nor Windows messenger to install on a preactivated OEM XP MCE install.


......

I am away for 2 weeks and as soon as I come back to my PC will make final tests and write an updated guide, I believe what we have gives us now pretty much "universal" way to install and repair XP from USB stick.

......


:whistle:


And still cannot get MCE components, nor IE, nor WMP, nor Windows messenger to install on a preactivated OEM XP MCE install.


But actually the "updated" guide should not have anything new that could possibly be related to MCE and your problems.

Though both ilko_t and I tried to help you:
http://www.msfn.org/...o...1384&st=230
http://www.msfn.org/...o...1384&st=231

You appear to have not posted any feedback....I find quite improbable that MCE compatibility will appear in the procedure by sheer magic...;)

Maybe it would be better if you wait patiently for the release of the updated guide, then, once most probably it won't work for MCE :(, you start a new thread and we try together to find what the problem(s) might be and (hopefully) find a solution for them :).

Also, it is my opinion that the whole idea of technical boards like MSFN is or should be that of exchanging ideas and contribute, each according to the spare time and knowledge he has, so it is pretty pointless, not to say somehow rude, to put pressure on members that are working in their spare time and wish to share with the community their results.

In Italy we have a saying that would sound in English something like "one that throws the stone and hides his hands", does it remind you anything/anybody? :unsure: :
http://www.msfn.org/...opic=81788&st=5
http://www.msfn.org/...opic=81788&st=6

jaclaz

#275
ilko_t

ilko_t

    MSFN Addict

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

If the batch file, which subtracts rdisk value is used wimb is right, this installation won't be seen as available for repair. To include this situation as well may we add an option to the batch script, something like:

would you like to include an entry for repair from USB?
If yes- leave the original entry with rdisk(z) and may be rename it to something like "only for USB repair, do not use to boot", change the default line to rdisk(z-1), and add the line with rdisk(z-1) under [operating systems]. If no- do not leave the old entry, just use the script we already got.
My idea about the choice is to leave boot.ini as simple as possible if one prefers, what do you think?


No prob, I'll add the option to keep the "USB Repair" entry in the batch.

Just an abstract idea, mind you, but we could make a second batch to "clean" the BOOT.INI from the signature(aabbccdd) and "USB repair" option entries on second boot, i.e. once the user is certain that the procedure worked.

For now I think we don't need to copy bootfiles again, also the script we are going to use assumes boot.ini is present on hard disk, which means ntdetect.com and ntldr will be there too.

You are right, I'll add this check to the batch.


Hi guys :hello:

I am back to my PC and will have some time to test and update the guide.

Jaclaz, have you updated the script?

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

Regards,
ilko

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