Jump to content

How to boot/install from USB key ?


Halfwalker

Recommended Posts

@wimb

I found 2 minor glitches in the procedure:

1. Some addons for Nlite place their files in \I386 and/or in subfolders in I386. This is not reported in dosnet.sif and/or txtsetup.sif, thus winnt32.exe doesn't copy those files/folders, which causes errors during setup. We need a final check when copying files to the virtual drive, like copy all from I386 to I386, including subfolders, do not overwrite if file/folder exist.

This way we won't need the option for XP/Tablet, folders will be copied anyway.

Actually dealing with winnt32.exe on anything but an original source is such a pain...

2. I had a custom $OEM$ folder with NLite cmdlines, and this was overwritten by the batch, put some prompt or check if such folder exist.

This could be helpful- put in boxes with the default values like drive letters etc. [currently: none], then [currently K:] or something like that, what do you think?

The other thing was marker file for BTS mass storage, did you change that already? Can the drive letter be typed without : ? Would be easier.

If you have the time could you look at these, if not I will try during the weekend.

Regards,

ilko

Edited by ilko_t
Link to comment
Share on other sites


I have a conflict between UBCD4Win and Install XP from USB.

I have a multiboot USB key using grub4dos.

UBCD4win uses:

title Ultimate Rescue USB key for Windows

find --set-root /minint/setupldr.bin

chainloader /minint/setupldr.bin

The XP install uses:

title Phase 1 Install XP from USB key (text mode)

find --set-root /setupldr.bin

chainloader /setupldr.bin

Before XP install, I do not have in the root the file txtsetup.sif and UBCD4Win works well.

Now with this file, /minint/setupldr.bin invokes same thing as XP install, so I lose UBCD4Win.

How can I manage to have both functions ?

Link to comment
Share on other sites

@ilko_t

I was not aware of the two problems when using NLite,

because I was using RyanVM Integrator for integrating Updates in XP.

But I think that the changes that you proposed for the usb_prep2.cmd file can solve the problems with NLite

and I will try to make an updated version.

I noticed also that for some cardreaders (ICIDU) the valdid drive check for USB-stick in undoren.cmd results in an ERROR Alert, which can be overuled by clicking Continue for each cardreader drive.

This might be overcome by limiting the range of valid driveletters for USB-stick e.g. that the valid range is M-Z,

so that the probable range where cardreaders might occur is excluded.

@lilas

Your problem in combining UBCD4Win and XP Install in a MuliBoot USB-stick corresponds to what occurs for BartPE.

I found in this case a nice solution by using a small Hexedit of peldr as described here:

http://www.911cd.net/forums//index.php?showtopic=20089

For a MultiBoot USB-stick combining BartPE ( minint folder ) and the LocalSource of Windows XP Setup (see below),

I found the following solution to make BartPE boot from the minint folder, instead of launching Windows XP setup.

Hexedit peldr using TinyHexer. Change in peldr the first occurrence of txtsetup.sif in notsetup.sif

Now BartPE will boot from minint folder and will not use WinXP txtsetup.sif from root directory.

I think a corresponding solution will be possible for MultiBoot USB-stick with UBCD4Win

by a similar Hexedit of setupldr.bin in minint folder.

Regards,

wimb

Edited by wimb
Link to comment
Share on other sites

This might be overcome by limiting the range of valid driveletters for USB-stick e.g. that the valid range is M-Z,

so that the probable range where cardreaders might occur is excluded.

As I see it, 99.99% of users of this method will normally use on their PC's, at one time or another, a PE of some kind, and of those 99.99% will use a SP2 build, so we can make the drive letter X: as fixed, and that will cover in 99% of cases, then provide an easy way for the remaining 1% to change letter manually.

jaclaz

Link to comment
Share on other sites

I have today the opportunity to test the XP install procedure on real hardware. The USB key is prepared with usb_prep2.cmd.

Internal drive IDE empty, but already NTFS formatted.

Got 3 missing files that I solved incrementally by copying from source ISO (i386 directory). My ISO is French one, with SP2 integrated.

1)

\$WIN_NT$.~BT\vgaoem.fon could not be loaded. The error code is 14.

2)

\$WIN_NT$.~BT\c_437.nls could not be loaded. The error code is 14.

Setup cannot continue. Press any key to exit.

3)

cannot load kbdus.dll (missing).

So looks like although it is French installation, the 3 above files are still needed.

After putting those 3 files (vgaoem.fo_, c_437.nl_, kbdus.dll), so far so good, I got to the screen to select the hard drive (C:),

but then I hit a big problem:

4)

In file .sif used by setup corrupted or missing:

Value 0 at line of section [sourceDisksFiles] with the key "SP2.cab".

Setup cannot continue. Press F3 to quit.

I do have a file \$WIN_NT$.~LS\I386\sp2.cab

I do compare txtsetup.sif between root of USB key and in \$WIN_NT$.~BT\ and they differ only by new 3 lines present

only in \textsetup.sif (root):

[sourceDisksFiles]

binifix4.cmd = 100,,,,,,_x,2,0,0

undoren.cmd = 100,,,,,,_x,2,0,0

ren_fold.cmd = 100,,,,,,_x,2,0,0

Do you have any idea to solve this? Thank you.

Edit: it looks like that the error was due to missing some files win51, win51ip, win51ip.sp2. They were deleted by previous install (?).

With those files, the file copy by setup is OK.

Edited by lilas
Link to comment
Share on other sites

OK I just do an install XP from scratch, all it worked ! Except two points:

1)

the boot.ini on the installed (C:) disk still invokes rdisk(1) which is bad once I unplug the USB key.

I believe somewhere there is an automatic procedure to do this rdisk(z-1) ?

2) After successful install, the directories

$WIN_NT$.~BT

$WIN_NT$.~LS

are changed (renamed) on the key to

WIN_NT.BT

WIN_NT.LS

(no $ nor tilde). So the key cannot not be reused as is for another install, unless to rename the 2 above directories.

Apparently there is a problem somewhere ?

Edited by lilas
Link to comment
Share on other sites

OK I just do an install XP from scratch, all it worked ! Except two points:

1)

the boot.ini on the installed (C:) disk still invokes rdisk(1) which is bad once I unplug the USB key.

I believe somewhere there is an automatic procedure to do this rdisk(z-1) ?

2) After successful install, the directories

$WIN_NT$.~BT

$WIN_NT$.~LS

are changed (renamed) on the key to

WIN_NT.BT

WIN_NT.LS

(no $ nor tilde). So the key cannot not be reused as is for another install, unless to rename the 2 above directories.

Apparently there is a problem somewhere ?

Did you leave stick plugged in until after the first logon?

At first logon binifix.cmd and undoren.cmd should fix BOOT.INI to Z-1 and rename the 2 folders back, there is also txtsetup.sif renamed.

Link to comment
Share on other sites

@ilko_t

Maybe I missed something, but on USB key boot (boot.ini), I got either text mode or GUI mode setup.

First I select text mode, then install in text mode.

On first reboot, I select GUI setup and install in GUI mode;

On second reboot, if I do not unplug the key, I will have only the same two choices: text and GUI setup.

Or GUI setup is already done. So which choice I had to ? This is why I have to unplug the key then found

a mean to edit the c:\boot.ini on the HDD to manually fix the z-1 order.

Sorry but probably I missed some step apparently.

Another question: in

\$WIN_NT$.~LS\$OEM$\CMDLINES.TXT

I add another call to another .cmd file:

"useraccounts.cmd"

"install.cmd"

Each cmd above has its own exit as last line. Is this correct? Or only the last .cmd has to have "exit" line?

Edited by lilas
Link to comment
Share on other sites

@lilas

After GUI Setup leave stick plugged, on next reboot windows will be launched. The default entry in BOOT.INI on USB stick applies for both GUI Setup and normal launch.

So your first normal launch (after GUI mode) should be made from the stick again, then on the first logon files will be fixed- boot.ini to Z-1 and the 2 folders + txtsetup.sif renamed back to their original names.

Once you complete your first login you may remove stick.

You raise makes sense- the entry "GUI Setup" in boot.ini is a bit misleading. May be rename it to "GUI Setup and First logon" or something like this.

About cmdlines- without being an expert at all in cmd I think EXIT should not affect the other CMD files listed, I may be wrong, somebody with better experience should comment on that.

I am glad it worked for you, seems just a few minor fixes should be made.

Regards,

ilko

Link to comment
Share on other sites

@ilko_t

OK thank you for your explanations. So maybe for real newbie and clearer presentation, boot.ini could be like this:

C:\SETUPLDR.bs="Step 1: TEXT Mode Setup Windows XP"
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Step 2: GUI Mode Setup Windows XP" /FASTDETECT
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Step 3 (final): First logon Windows XP (unplug USB key after logon)" /FASTDETECT

The user will understand that there are 3 steps, each step is done after a reboot, step 3 is final step.

I don't know whether value could be hard-coded as is, but if yes, then maybe no more need for dynamic substition with z-1.

I redo a full install again and all works well. The missing 3 files I mentioned in previous post were most probably due only to a wrong USB key

(I have two USB keys to experiment with). So you can ignore this problem.

For the "exit" in cmd file, I was afraid that it could cause the following cmd file not to be executed. Maybe somebody could confirm/infirm this.

In the meanwhile, to be sure, I merge the content of useraccounts.cmd with my install.cmd, leaving only one "exit" at the end of file.

Thank you for all of you for creating a beautiful working procedure on this passionating subject of XP install from USB key.

See all of you soon,

Link to comment
Share on other sites

hi lilas,

The boot.ini entry for GUI and normal start is no different, hard drive is still seen as rdisk(1), USB stick is still rdisk(0). If GUI setup is not performed yet it will be, if it's completed a normal start will occur when using the second entry. So the boot.ini should look like this:

[Boot Loader]
Timeout=10
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
C:\SETUPLDR.bs="Step 1: TEXT Mode Setup Windows XP"
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="Steps 2 and 3: GUI Mode Setup and First logon" /FASTDETECT

We should also put a clear message somewhere not to unplug stick until the first logon has completed.

Regards,

ilko

Link to comment
Share on other sites

@ilko_t

OK I understand and agree with you. My separate Step 3 entry in boot.ini of the key is useless since the key as you said will still be rdisk(0).

Note that the logon is important to rename and change the ini entry to z-1. Since in my installation after GUI setup I do not see any logon, I

access directly to the desktop (maybe with a default user ?). So after checking that boot.ini and folders are not changed/renames, I do a manual

close session and then logon as administrator. And then I did verify that c:\boot.ini is well changed (z-1), and the two folders on the USB key

are renamed back correctly.

Question: is it really z-1 or hard coded to zero (since z=1?). What happens if I install to another partition then the first partition? also maybe on another disk

than the first disk, e.g. HDD2 (USB key, HDD1, HDD2) ? Could you confirm that these cases are covered ?

Also is there a project to install Vista from USB key, or is it already covered? As far as I understand, it seems that for Vista it is easier,

since normally you prepare/format the key under Vista (diskpart/bootsect), copy all the files from Vista CD to the key, that's all. Is it true?

Link to comment
Share on other sites

@lilas

The ideas of the z-1 came EXACTLY because some people might want to install XP on a non-first disk:

http://www.msfn.org/board/boot_install_USB...html&st=204

http://www.msfn.org/board/boot_install_USB...html&st=240

Latest version:

http://www.msfn.org/board/boot_install_USB...html&st=280

with this amendment:

http://www.msfn.org/board/boot_install_USB...html&st=286

Just open the .cmd in notepad, it should not be too difficult to follow it's way of working.

You might think of the way XP sets arcpaths as a FIFO stack, if you boot off a drive, it will get a z of 0, effectively "pushing" all other arcpaths for (n) drives to z(n)+1, what the batch does is simply to reverse this behaviour for the newly installed system.

Partition numbers w, being "relative" to hard disk number, are unaffected by this inserting the USB stick before normal boot drive.

VERY GOOD WORK :thumbup

in reporting, we need more feedback as accurate as yours.

jaclaz

Link to comment
Share on other sites

NEW RELEASE is Available as usb_prep3.zip file in Attachment.

All necessary changes regarding NLite, boot.ini and Cardreader have been taken into account.

The new release was tested twice with success on different computers.

GOOD LUCK !

Regards,

wimb

usb_prep3.zip

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...