Jump to content

How to boot/install from USB key ?


Halfwalker

Recommended 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
Link to comment
Share on other sites

  • 2 weeks later...

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.

Link to comment
Share on other sites

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.com/viewtopic.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______PMAP
USBSTOR\DiskPNY_____USB_2.0_FD______
USBSTOR\DiskPNY_____
USBSTOR\PNY_____USB_2.0_FD______P
PNY_____USB_2.0_FD______P
USBSTOR\GenDisk
GenDisk

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

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/board/index.php?showto...1384&st=230

http://www.msfn.org/board/index.php?showto...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/board/index.php?showtopic=81788&st=5

http://www.msfn.org/board/index.php?showtopic=81788&st=6

jaclaz

Link to comment
Share on other sites

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

Link to comment
Share on other sites

@biohead- I believe your answers are here:

http://blogs.msdn.com/astebner/archive/200.../12/464304.aspx

http://www.msfn.org/board/index.php?showtopic=31936

Are you using 2 CDs, or a modified one?

I have just installed MCE without a hitch from Dell CD (one only). Used

winnt32 /makelocalsource:all /noreboot

If you have other specific folders on your CD make sure you copy them to the appropriate place on the USB stick.

If you have custom winnt.sif on the CD use /unattend:winnt.sif switch too, do not forget to delete redundant entries, i.e. the whole [unattended] section.

If you have answered the questions me and jaclaz asked you before, you could have saved me a couple of hours ;)

@jaclaz- using binifix3.cmd gives me errors, drive letter is set to W, which is not present, script aborts. When you get some spare time could you have a look and also implement the other 2 changes from the post above?

ilko

edit: ahh silly me, shall I change W with C, or this can be done other way, with variables?

Edited by ilko_t
Link to comment
Share on other sites

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

Launching TXT-mode Setup direct from boot.ini Menu is faster and more logical, and in my opinion the better choice.

Once making the custom bootsector is automated, it is not to difficult for a novice.

Perhaps the most difficult step in the whole procedure is the making of the LocalSource with the winnt32.exe command. There a novice might need some more support of what is actually occurring and what answers he has to give. Especially it is important to mention that the Setup procedure is taking only a few minutes ( instead of 59) and that one returns to the existing installation. Resetting boot.ini as mentioned already is of course very important.

Edited by wimb
Link to comment
Share on other sites

ilko_t

Welcome back! :)

Jaclaz, have you updated the script?

No, I was waiting for you to get back, I'll do it in the next few days.

About drive letter, it can ALREADY be given as a parameter, as in

binifix3.cmd C:

though there is no real (at the moment) parameter checking routine, the hardcoded "W" is just for testing, BOOT.INI should always be on the C: drive, at the time the batch is run. :unsure:

jaclaz

Link to comment
Share on other sites

Sorry, i'm in a hurry, haven't read the whole topic but this is how i did it.

Format the drive with HP USB Disk Format Tool using WIN98SE bootdisk (FAT16)

Include these files: attrib.exe

config.sys

edit.exe

fdisk.exe

format.com

himem.sys

smartdrv.exe

xcopy32.mod (Dunno if this one is needed really, but i've always added it anyway)

xcopy.exe

Copy the folder prepared by nLite to the drive (I named my folder WIN)

Boot the USB-Drive (DOS)

Run: C:\SMARTDRV

Run : C:\FDISK

Create a primary partition large enough to hold the system and install. (5GB should be enough)

Reboot to USB (DOS)

Run: C:\SMARTDRV

Run: C:\FORMAT D:

Run: C:\WIN\I386\WINNT.EXE /s:C:\WIN\I386 /u:C:\WIN\I386\WINNT.SIF

(Run setup with the options /s:SourceFolder [/t:TempDrive] /u:Unattended)

MAKE SURE TO USE FAT32 FILESYSTEM

(If you want to, you can convert to ntfs later, just google it)

Reboot to USB (DOS)

Run attrib -h -s -r D:\BOOT.INI

(Removes the attributes hidden, system and read-only)

Run: C:\EDIT D:\BOOT.INI

(Edit to fit your computer, you will probably need to replace rdisk(1) with rdisk(0))

Run: attrib +h +s +r D:\BOOT.INI

(Adds the attributes hidden, system and read-only)

Remove the stick, reboot and finish the install.

PS. I don't know why but i never got the themes to be copied correctly

.

Link to comment
Share on other sites

Please find attached binifix4.cmd

I made a few changes, now it should do everything needed:

1) If you invoke it without parameters it will ECHO usage instructions and ask for a drive letter

2) It will take current "default" entry and add it to the end of the newly made boot.ini editing the description from, say:

Windows XP Professional

to

[OLD Default] Windows XP Professional

Let me know if it works for you the expected way.

Also, once it is confirmed to be working, we could delete the "YES" confirmation, add something like a "/noold" parameter to avoid the [OLD Default] entry, and suppress "informative" messages.

jaclaz

binifix4.zip

Link to comment
Share on other sites

I've been playing with winnt32 parameters to make the install easier. Here are some results:

1. Stick formated in FAT16, Hitachi driver used

2. Copy from XP SP2 ntldr, ntdetect.com, setupldr.bin and the custom boot.ini to the stick BEFORE anything else.

3. From I386 folder run

winnt32 /noreboot /makelocalsource:all /syspart:U /tempdrive:U /unattend:winnt.sif

/makelocalsource:all instructs Winnt32 to copy all additional folders as described in DOSNET.SIF. Could be useful to edit it in order to include/exclude files/folders to automate the process.

/unattend:winnt.sif - useful when you have custom winnt.sif, if the needed answers are included Winnt32 carries out the process without a single prompt.

If used the whole [unattended] section must be deleted afterwards, otherwise TEXT Setup will attempt to install on USB stick and recovery console won't be given as option.

/syspart:U /tempdrive:U prepares the drive given for next stage and copies all necessary files and folders. NTLDR gets replaced by SETUPLDR.BIN, renamed to NTLDR.

The custom BOOT.INI gets backed up as BOOT.BAK and a new one, including entries from the old is written:

BOOT.INI before Winnt32 is launched

[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="GUI Setup" /FASTDETECT

BOOT.INI after Winnt32:

[Boot Loader]
Timeout=5
Default=C:\$WIN_NT$.~BT\BOOTSECT.DAT
[Operating Systems]
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Setup" /FASTDETECT
C:\$WIN_NT$.~BT\BOOTSECT.DAT="Microsoft Windows XP Professional Setup"

BOOTSECT.DAT is not created in C:\$WIN_NT$.~BT\, nor the folder is, nor in U:\$WIN_NT$.~BT\, TXT Mode will be launched by the renamed SETUPLDR.BIN anyway. Why it creates this entry is still unknown for me, may be for the GUI part, but when BOOTSECT.DAT will be created...? Perhaps during TEXT mode? Hard to test that as stick will be write-protected.

Winnt32 also changes the bootsector on USB stick, however stick is still bootable. Copies of bootsectors before Winnt32 and after are attached, for stick formated in XP with FAT16 and FAT32.

Jaclaz, please, will you have a look what was changed, and if you have an explanation why. I'll be testing the new BINIFIX tomorrow, thanks for it.

NTLDR (the renamed setupldr.bin one) must be rewritten with normal NTLDR in order to use boot.ini.

txtsetup.sif is put on root by Winnt32, no need to manually copy it.

4.Used Jaclaz's makeBS.cmd to add a new entry in boot.ini and get a patched for SETUPLDR.BIN boot sector. No issues at all.

Please don't forget to put a new copy of NTLDR on root, replacing the renamed setupldr.bin. Also setupldr.bin MUST be copied on stick right after format, or it may not be visible for the boot sector.

In this way I believe would be much easier to perform preparation, even at some point by a script, as not too much is to be changed/added.

Sorry if I made it too detailed, trying to be as much informative as possible.

ilko

FAT16_FIXED_XP.zip

FAT32_FIXED_XP.zip

Edited by ilko_t
Link to comment
Share on other sites

@ilko_t

Checked the bootsectors, NO problems, everything is cool, results attached in a .xls file. :)

However you lied :w00t: to me ;)

You did not use the SAME procedure with FAT16 and FAT32, as the bootsectors in FAT16 have a different Volume Serial, whilst the ones in FAT32 have the same one.

There must have been a FORMAT between "snapshotting" :unsure:

FAT16_BootSector_Before.dat

and

FAT16_BootSector_After.dat

(I won't believe that the same operation happened with FAT32 ones and the semi-random routine that calculates Volume Serial gave two times the same number :ph34r: )

jaclaz

compare_bs.zip

Link to comment
Share on other sites

You got me :D

There could have been a format between snapshotting, however I am pritty sure the copies I have were made before and after Winnt32, which changes something in bootsectors. I am interested why and what actually was changed, as this affects sometime stick's bootability.

I still cannot recreate the results every time. There must be something wrong I am doing between steps. Once I get everything working fine, next time stick won't boot at all, using the very same procedure. It could be the way I select boot files to copied, or have to fill the stick with FF, no idea yet. Will carry on tomorrow figuring out what's happening.

Why winnt32 changes bootsector? And what exactly it changes, please as for novice in this field? Please ignore serials :)

Edited by ilko_t
Link to comment
Share on other sites

Why winnt32 changes bootsector?

And what exactly it changes, please as for novice in this field?

The only reason I can see is that if some kind of error is found, instead of the default message:

NTLDR is missing

this one is shown:

Remove disks or other media

Maybe it is derived by our "unconventional" method :unsure:, maybe setup "senses" that the USB stick is a Removable device and changes the bootsector to one "appropriate" :w00t: for this kind of devices.

All other changes, as detailed in the .xls files are consequence of the different length of this message.

However, the "After" bootsectors appear to be valid so I would not worry too much about it. :)

jaclaz

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