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

Jump to content


  • 25 Pages +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • 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

#241 User is offline   jaclaz 

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

Posted 09 July 2007 - 01:35 PM

ilko_t said:

Saved a copy of USB stick bootsector with HDHacker, hexedited it and changed NTLDR to STLDR, saved it on stick as bootsect.dat, rename setupldr.bin to stldr, add in boot.ini

Well, you missed my post here:
http://www.msfn.org/board/index.php?showto...1384&st=218

And the batch I wrote:
http://www.boot-land...?showtopic=2362
it does EXACTLY that.

Allowed are ANY 8+3 names, so you can leave SETUPLDR.BIN as is without renaming it. ;)

(You may notice the amount of feedback I received :whistle:, I guess that changing loader in bootsectors is an activity that very few people do)

About the arcpath, I am still thinking about it, the problem may lay with some "unorthodox" Partition tables, see these:
http://www.goodells....ot/editbini.htm
http://www.goodells....ot/notes.htm#10

Easiest would probably "assume" that one would use USB install just for installing XP on FIRST PRIMARY partition of FIRST harddisk, as it happens, say, in 99% of cases and operate a manual adjustement for the remaining 1% (like myself) that install to Logical Volumes inside Extended Partition or that install to a non first hard disk.

In this case the batch could ask user if he installed it to first active partition of first disk, and if answered yes write on BOOT.INI a line referencing multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

or otherwise write several lines like:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS
multi(0)disk(0)rdisk(0)partition(3)\WINDOWS
multi(0)disk(0)rdisk(0)partition(4)\WINDOWS
multi(0)disk(0)rdisk(0)partition(5)\WINDOWS
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
multi(0)disk(0)rdisk(1)partition(2)\WINDOWS
multi(0)disk(0)rdisk(1)partition(3)\WINDOWS
multi(0)disk(0)rdisk(1)partition(4)\WINDOWS
multi(0)disk(0)rdisk(1)partition(5)\WINDOWS

Another idea would be to parse the existing boot.ini lines with:
multi(0)disk(0)rdisk(z)partition(w)\windir
get the rdisk(z) value and just subtract 1 from it, leaving al the rest as is.

What do you think of this last idea, it came to me just as I was writing this post, could it work? :unsure:

If yes, I think I can jolt it down in batch quite easily.....


jaclaz


#242 User is offline   ilko_t 

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

Posted 09 July 2007 - 02:24 PM

View Postjaclaz, on Jul 9 2007, 08:35 PM, said:

Well, you missed my post here:
http://www.msfn.org/board/index.php?showto...1384&st=218

And the batch I wrote:
http://www.boot-land...?showtopic=2362
it does EXACTLY that.

Allowed are ANY 8+3 names, so you can leave SETUPLDR.BIN as is without renaming it. ;)


(You may notice the amount of feedback I received :whistle:, I guess that changing loader in bootsectors is an activity that very few people do)

Shame on me :blushing:, my memory is so short, I even downloaded that script when you posted the link here, but completely forgot about it. Yesterday I was reading wimb's ideas and though "why not try this on Xp from USB?" and it worked. Apologies for the ignorance.

View Postjaclaz, on Jul 9 2007, 08:35 PM, said:

About the arcpath...

Another idea would be to parse the existing boot.ini lines with:
multi(0)disk(0)rdisk(z)partition(w)\windir
get the rdisk(z) value and just subtract 1 from it, leaving al the rest as is.

What do you think of this last idea, it came to me just as I was writing this post, could it work? :unsure:

If yes, I think I can jolt it down in batch quite easily.....


jaclaz

I think that should do the trick, we need to change only rdisk, the rest is always OK, however I am not sure what the situation will be on mixed SATA/ATA disks environment.
Mind you when preparing the script to think about a situation when another XP exist, and a second copy is being installed. In this case SETUP will preserve the old lines, will change the default line and add a new one under [operating systems], am I right? In this case will you be able to keep the old line(s) and amend just the 2 new lines?
I haven't had spare time to experiment with CHKBTINI, will do it as soon as I can, it may be just enough to fix boot.ini when run before the end of GUI part.

#243 User is offline   wimb 

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

Posted 10 July 2007 - 01:19 AM

View Postjaclaz, on Jul 9 2007, 09:35 PM, said:

Well, you missed my post here:
http://www.msfn.org/board/index.php?showto...1384&st=218

And the batch I wrote:
http://www.boot-land...?showtopic=2362
it does EXACTLY that.

Allowed are ANY 8+3 names, so you can leave SETUPLDR.BIN as is without renaming it. ;)

(You may notice the amount of feedback I received :whistle:, I guess that changing loader in bootsectors is an activity that very few people do)

Already sometime ago I tried your script, but was not able to use it.

#244 User is offline   wimb 

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

Posted 10 July 2007 - 06:20 AM

View Postilko_t, on Jul 9 2007, 06:03 PM, said:

The idea came from this post of yours and wimb's posts in 911cd.net about loading io.sys via boot.ini.
Saved a copy of USB stick bootsector with HDHacker, hexedited it and changed NTLDR to STLDR, saved it on stick as bootsect.dat, rename setupldr.bin to stldr, add in boot.ini

Quote

c:\bootsect.dat="TXT Setup"

TXT mode worked just fine, GRUB is no longer needed

Good to hear that TXT-mode Setup can be added to boot.ini Menu and that GRUB4DOS is no longer needed.
I have tested it and everything is OK :)

Launching TXT-mode Setup Windows XP via boot.ini has been added
as one of the boot options in my post #5 in 911cd.net
http://www.911cd.net...showtopic=20036

The MultiBoot USB-stick is becoming more and more versatile
with all the new boot options via boot.ini Menu :thumbup

Regards, wimb

This post has been edited by wimb: 10 July 2007 - 06:28 AM


#245 User is offline   jaclaz 

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

Posted 10 July 2007 - 07:36 AM

wimb said:

Already sometime ago I tried your script, but was not able to use it.


Well, this does not help much in correcting it (if needed ;)), does it? :unsure:

Can you reply to the original topic on boot-land (as to not clutter this one) and tell me more about the problems you had?

I tested it on two separate machines, and it worked, but since both PC's are my own, they have very similar setups so they do not represent a good test.


@ilko_t

I'll try and see what I can come out with.
About the "already" present lines, it should not be a problem since, if I a not mistaken the "new" entry will be by default the "default" one (pardon me the pun ;) ).
What I mean is, if on First hard disk there is already a "complex"BOOT.INI like this:

Quote

[Boot Loader]
Timeout=5
Default=multi(0)disk(0)rdisk(0)partition(5)\WINNT
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(5)\WINNT="Microsoft Windows 2000 Professional IT" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP" /fastdetect
C:\Bootsect.w98="Windows 98 Command Line" /win95
C:\BOOT\FDOS1440.bin="Test boot"


The result when modified by the new install, let's say on first hard disk, partition 3, will be:

Quote

[Boot Loader]
Timeout=5
Default=multi(0)disk(0)rdisk(z)partition(3)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(5)\WINNT="Microsoft Windows 2000 Professional IT" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP" /fastdetect
C:\Bootsect.w98="Windows 98 Command Line" /win95
C:\BOOT\FDOS1440.bin="Test boot"
multi(0)disk(0)rdisk(z)partition(3)\WINDOWS="Microsoft Windows XP Professional" /fastdetect


And what the batch has to do is to look at the arcpath specified in "Default=" and change just that entry and the corresponding menu one below with same arcpath as follows:

Quote

[Boot Loader]
Timeout=5
Default=multi(0)disk(0)rdisk(z-1)partition(3)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(5)\WINNT="Microsoft Windows 2000 Professional IT" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP" /fastdetect
C:\Bootsect.w98="Windows 98 Command Line" /win95
C:\BOOT\FDOS1440.bin="Test boot"
multi(0)disk(0)rdisk(z-1)partition(3)\WINDOWS="Microsoft Windows XP Professional" /fastdetect


Am I correct?
What happens with SATA drives?

jaclaz

#246 User is offline   wimb 

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

Posted 10 July 2007 - 01:28 PM

View Postjaclaz, on Jul 10 2007, 03:36 PM, said:

wimb said:

Already sometime ago I tried your script, but was not able to use it.


Well, this does not help much in correcting it (if needed ;)), does it? :unsure:

Can you reply to the original topic on boot-land (as to not clutter this one) and tell me more about the problems you had?

I tested it on two separate machines, and it worked, but since both PC's are my own, they have very similar setups so they do not represent a good test.


I have used your script and was able now to use it successfully !

In Boot-land Forum http://www.boot-land...?showtopic=2362
is described the solution of the problem I had on first use of the script.

#247 User is offline   ilko_t 

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

Posted 10 July 2007 - 02:52 PM

View Postjaclaz, on Jul 10 2007, 02:36 PM, said:

....And what the batch has to do is to look at the arcpath specified in "Default=" and change just that entry and the corresponding menu one below with same arcpath as follows:

Quote

[Boot Loader]
Timeout=5
Default=multi(0)disk(0)rdisk(z-1)partition(3)\WINDOWS
[Operating Systems]
multi(0)disk(0)rdisk(0)partition(5)\WINNT="Microsoft Windows 2000 Professional IT" /fastdetect
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Microsoft Windows XP Home Edition" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Microsoft Windows XP" /fastdetect
C:\Bootsect.w98="Windows 98 Command Line" /win95
C:\BOOT\FDOS1440.bin="Test boot"
multi(0)disk(0)rdisk(z-1)partition(3)\WINDOWS="Microsoft Windows XP Professional" /fastdetect


Am I correct?
What happens with SATA drives?

jaclaz
Yep, that's it.
About SATA drives- if it is a mixed environment- SATA+ATA, USB stick would be listed fisrt when hard drives are detected by TXT Setup, if one plans to install on ATA when SATA is present, SATA disk must be disconnected or controller disabled, and vice versa, if installation is on SATA and IDE (no matter CD or HD) is present it must be disconnected/controler disabled. This might be BIOS dependant.
Therefore SATA/ATA shouldn't matter for script's functionality.

ilko

#248 User is offline   wrayal 

  • Junior
  • Pip
  • Group: Members
  • Posts: 54
  • Joined: 19-May 07

Posted 10 July 2007 - 05:20 PM

Hey guys,
I've been following all the stunning progress you guys have been making here - very impressive! I had one other suggestion though, that might work. If you read uberplay's OEM guide (http://uberplay.org/.../oemguide3.html), it demonstrates how it is possible to use sysprep + vistaPE to install any version of windows for which a sysprep exists. Notably, it does a vista-style partitioning system I believe, then simply installs your carefully setup system - you can even integrate all sorts of drivers, hotfixes and programs very easily, and with a faster install time than nlite gives. As vista can easily be installed from a USB disc, I imagine this can? Has anyone tried this?

Wrayal

#249 User is offline   jaclaz 

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

Posted 11 July 2007 - 11:35 AM

Ok, here is the tentative :rolleyes: batch to transform rdisk(z) into rdisk(z-1)

As is, it is a bit complicated by the fact that it is written for debugging, it works with a boot.ini in the same directory as the batch, and, knowing how people love working in directories with spaces in them (why? :unsure:) provides support for them.

Once it has been tested with positive results, it could be simplified as to work with %drive%\BOOT.INI.

@ilko_t
BOOT.INI should always be on C:\BOOT.INI, whatever the hard disk(s) setup is, am I correct?

jaclaz

Attached File(s)



#250 User is offline   wimb 

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

Posted 11 July 2007 - 11:06 PM

I have been testing binifix.cmd and got:

C:\>binifix.cmd
Drive is C:
Source is "C:\BOOT.INI"
Druk op een toets om door te gaan. . .
DefaultEntry is
EntryDesc is
Timeout is
4==scsi niet verwacht op dit moment.
C:\>

Is not working yet, approach is interesting, will try to find source of problem.

wimb

This post has been edited by wimb: 11 July 2007 - 11:07 PM


#251 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 12 July 2007 - 04:33 AM

@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/board/index.php?s=&...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

Quote

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.

#252 User is offline   wimb 

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

Posted 12 July 2007 - 05:29 AM

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

This post has been edited by wimb: 12 July 2007 - 05:47 AM


#253 User is offline   jaclaz 

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

Posted 12 July 2007 - 08:10 AM

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

cdob said:

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 User is offline   ilko_t 

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

Posted 12 July 2007 - 08:27 AM

Good job :thumbup.

View Postjaclaz, on Jul 12 2007, 03:10 PM, said:

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.

#255 User is offline   wimb 

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

Posted 12 July 2007 - 08:34 AM

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

This post has been edited by wimb: 12 July 2007 - 09:01 AM


#256 User is offline   jaclaz 

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

Posted 12 July 2007 - 11:48 AM

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


wimb said:

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 User is offline   wimb 

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

Posted 12 July 2007 - 12:05 PM

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.

This post has been edited by wimb: 12 July 2007 - 12:06 PM


#258 User is offline   jaclaz 

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

Posted 12 July 2007 - 01:38 PM

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

Quote

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

jaclaz said:

wimb said:

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 User is offline   wimb 

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

Posted 12 July 2007 - 11:08 PM

@jaclaz

View Postjaclaz, on Jul 12 2007, 04:10 PM, said:

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

This post has been edited by wimb: 13 July 2007 - 12:54 AM


#260 User is offline   cdob 

  • Friend of MSFN
  • PipPipPipPipPip
  • Group: Members
  • Posts: 877
  • Joined: 29-September 05

Posted 13 July 2007 - 04:56 AM

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

jaclaz said:

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/

Share this topic:


  • 25 Pages +
  • « First
  • 11
  • 12
  • 13
  • 14
  • 15
  • Last »
  • You cannot start a new topic
  • This topic is locked

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



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