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

Jump to content


  • 25 Pages +
  • « First
  • 8
  • 9
  • 10
  • 11
  • 12
  • 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

#181 User is offline   snowden 

  • Newbie
  • Group: Members
  • Posts: 29
  • Joined: 04-December 06

Posted 26 May 2007 - 03:32 PM

View Postjaclaz, on May 26 2007, 08:51 PM, said:

Yep, never said it was faster! ;) :whistle:

All the idea of trying to find other methods was behind the fact that that method wasn't perfect.

The link you posted does not work, a "tentative" list of possible methods is here:
http://www.msfn.org/board/Installing_Unatt...8.html&st=6

Are you referring to method #3?

The answer to this is 'yes'. But (as I think I already mentioned) they appear to lead back onto grub4dos and other methods.

View Postjaclaz, on May 26 2007, 08:51 PM, said:

I am quite sure that it would be possible to write from scratch a somewhat smarter "loader" or "setup" program running under DOS for 2K/XP, or somehow modify the original files as you suggested, but I am afraid it is far above my capabilities to contribute anything useful on that.

I would have thought that whoever came up with the idea of using grub to load the setupldr.bin would (and should!) probably have the technical know-how to hex the ntldr/make a bootsector for usbkeys, that allows to boot setup from a usb with just the i386 folder present (similar to a cdrom)! But as you say, they probably would have done it by now considering it is a whole lot easier a method (although probably not easier to code unless you know about MBRs and so on). For example, just take a look at this MBR help guide 'secrets revealed'; doesn't mean anything to me but might tip somebody in the right direction who knows!

http://www.geocities.com/thestarman3/asm/m...R_in_detail.htm

:sneaky:


#182 User is offline   snowden 

  • Newbie
  • Group: Members
  • Posts: 29
  • Joined: 04-December 06

Posted 26 May 2007 - 03:50 PM

View Postilko_t, on May 26 2007, 10:18 PM, said:

@snowden- the problem when using ntldr and ntdetect.com to boot from stick or setupldr.bin renamed /ntdetect.com is that USB stick is second hard drive as seen and enumerated by them, but setupldr.bin expects files to be on first hard drive. Using GRUB overrides this issue. Unless modified/other/new boot files mentioned are used I don't see a way to fix this issue.

@ilko_t - I see. But if you are running setup booting from a cdrom, how does the setupldr.bin enumerate this? How does it know the cdrom is the 'first hard drive'?
I just have to say this again in case, and to ask: is the setupldr.bin looking for setup files on the first harddrive when running setup via winnt.exe, or via the method of setup that seems to boot straight to the text phase like when starting from cdrom? Because the latter is what I want to happen when booting setup from a usb stick... :wacko:

#183 User is offline   ilko_t 

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

Posted 26 May 2007 - 04:06 PM

View Postsnowden, on May 26 2007, 10:50 PM, said:

... But if you are running setup booting from a cdrom, how does the setupldr.bin enumerate this? ...
As CDROM I think, which is different than USB stick, seen as hard drive/removable storage. If you "fool" SETUP USB stick to appear as CDROM- GRUB gives some options via mapping, but have no idea will it be possible as of now- the issue will be solved.

Another way is if Grub4Dos or other bootloader fully supports ISO boot, then we can simply copy the ISO file and call it. Again no idea how to do it, it may be possible.

View Postsnowden, on May 26 2007, 10:50 PM, said:

I just have to say this again in case, and to ask: is the setupldr.bin looking for setup files on the first harddrive when running setup via winnt.exe, or via the method of setup that seems to boot straight to the text phase like when starting from cdrom? Because the latter is what I want to happen when booting setup from a usb stick... :wacko:
Sorry, I didn't get this, winnt.exe is just preparing the disk for the next stage- TEXT mode, has nothing to do with setupldr.bin in that stage and the order disks are found.

This post has been edited by ilko_t: 26 May 2007 - 04:17 PM


#184 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 26 May 2007 - 10:18 PM

View Postilko_t, on May 27 2007, 05:18 AM, said:

@snowden- the problem when using ntldr and ntdetect.com to boot from stick or setupldr.bin renamed /ntdetect.com is that USB stick is second hard drive as seen and enumerated by them, but setupldr.bin expects files to be on first hard drive. Using GRUB overrides this issue. Unless modified/other/new boot files mentioned are used I don't see a way to fix this issue.

Copying the whole contents of XP CDROM and patching setupldr.bin will save you no more than 2-3 minutes, the time to create $WIN_NT$.~BT and $WIN_NT$.~LS by WINNT32.EXE, but may lead to other issues or incompatibility. I prefer not to use patched files when possible. Surely any other ideas are welcome, as long as this would save time and give better results.

Another idea, which will save you all the steps above is to create an image of a hard disk prepared with $WIN_NT$.~BT and $WIN_NT$.~LS (check winnt32 switches and /system in particular ) folders and place the image from USB using your favorite imaging program, either from PE or from DOS/LINUX. When working with large files USB sticks are usually much faster.
Using Bart PE and running winnt32.exe has always been an option and gives greater flexibility.



the problem when using ntldr and ntdetect.com to boot from stick or setupldr.bin renamed /ntdetect.com is that USB stick is second hard drive as seen and enumerated by them, but setupldr.bin expects files to be on first hard drive. --> this is the main point

#185 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 26 May 2007 - 11:27 PM

View Postilko_t, on May 27 2007, 04:38 AM, said:

Here is the edited guide for Windows XP SP2, on 2k/2k3 should work too.


4. Backup your local BOOT.INI and in the XP setup folder \I386 run
winnt32 /makelocalsource /noreboot
after it's finished restore BOOT.INI you backed up.


I should run this command within the existing window xp or from dos command booting from windwo xp setup cd or booting from the usb stick ? thanks for your kind reply

#186 User is online   wimb 

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

Posted 27 May 2007 - 12:42 AM

View Postilko_t, on May 26 2007, 10:38 PM, said:

Here is the edited guide for Windows XP SP2, on 2k/2k3 should work too.

Thank you ilko_t for combining all the experience into one good guide for installing Windows XP from
a bootable USB-stick. I think this is very usefull guide for everybody.
Link to the guide: http://www.msfn.org/board/boot_install_USB...html&st=199

I am very happy that we can now install Windows XP from a bootable USB-stick
and that all problems concerning this subject are solved !

This post has been edited by wimb: 03 June 2007 - 11:19 AM


#187 User is offline   ilko_t 

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

Posted 27 May 2007 - 03:41 AM

View Postbuseeliu, on May 27 2007, 06:27 AM, said:

I should run this command within the existing window xp or from dos command booting from windwo xp setup cd or booting from the usb stick ? thanks for your kind reply
All the steps are being done within working XP. You need to run that from command prompt of your local XP setup folder. An easy way to do that is by adding this registry info:

CMDHERE.REG
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Command Prompt Here]
@="Command &Prompt Here"

[HKEY_CLASSES_ROOT\Directory\shell\Command Prompt Here\command]
@="cmd.exe /k cd %1 "
When you import it you may right-click on the desired forder (I386) and from the context menu select OPEN COMMAND WINDOW HERE.


@wimb- I just hope I did not make typos or missed a thing, as I usually do :rolleyes:

#188 User is offline   jaclaz 

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

Posted 27 May 2007 - 07:26 AM

@snowden
the problem is not actually in the bootsector, as said it is very easy to rename setupldr.bin to NTLDR and load it with a "normal" bootsector. The way (direct with renaming, grub4dos or other bootmanager, custom written bootsector) is irrelevant.

Problem is the way the actual install process "detects" having NOT being booted from CD-ROM.

If you want to experiment a bit, Gray on 911CD forum explained how to hexedit setupldr.bin so that it will use files on \I386 even on hard disk (or stick):
http://www.911cd.net/forums//index.php?sho...3784&st=249

Possibly using this approach (and optionally using the Dietmar's modified NTDETECT.COM) could lead to some result.

Another possible thing one could test (again FAR above my capabilities) would be to use some kind of "upper filters" or something similar to a modified dummydisk.sys driver:
http://www.911cd.net/forums//index.php?sho...181&st=1954
to trick, at least the GUI part of setup to believe files are on a CD-ROM.

Finally there is this (rather apodiptical, if I may) post by Disabled Trucker, that got NO followings:
http://www.msfn.org/board/boot_install_USB...html&st=104

About the use of a PE environment as said my best bet is on a VERY minimal build, the Winbuilder project has gone as low as 15 Mbytes for a really minimal booting environment with CMD.EXE as shell, since all we need to do is to properly run WINNT32.EXE my guess that a not much bigger build would be needed.
I tried to start something out of it, here:
http://www.boot-land...p?showtopic=644
but as often happens, everyone agrees, and noone actually does anything to contribute. ;)
However the Winbuilder projects have recently entered a more stable level, and a lot of refining work has been made, so I am still ( maybe optimistically) convinced that someone will soon take the challenge and hopefully deliver some results.

jaclaz

This post has been edited by jaclaz: 27 May 2007 - 07:28 AM


#189 User is online   cdob 

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

Posted 27 May 2007 - 02:45 PM

Main idea:
satisfy setupldr.bin, ntdetect.com and get rdisk(0):
Map a boot image to a floppy drive.
Swap USB and internal drive.
A hdx is NOT doubled used, this may be a secure approach.
map /boot.img (fd0)
map (hd1) (hd0)
map (hd0) (hd1)


$WIN_NT$.~BT and $WIN_NT$.~LS are splitted:
\$WIN_NT$.~BT part goes to boot image
\$WIN_NT$.~LS goes to USB drive

I used a floppy image from reanimatolog http://bootcd.narod.ru/images_e.htm
fd011520.zip Floppy image 11.52mb (8x1.44mb)

ImDisk Virtual Disk Driver mount this file. http://www.ltr-data.se/index_en.html
Run ImDiks applet from the Control Panel, mount image. Let's use letter G:

Format virtual drive. This creates a ntldr bootsector.

1) XP installation floppies
KB310994 offers XP installation floppy images. http://support.micro....com/kb/310994/
Open the six floppy image files at ImDiks and copy files to drive G:

Rename G:\setupldr.bin to ntldr.

hiveOEM.inf goes to G:\txtsetup.sif.

G:\winnt.sif said:

[data]
msdosinitiated="1"


menu.lst said:

title boot.ima
map --mem /boot.ima (fd0)
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
root (fd0)
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1
boot


Setup does boot.
But next a famous BSOD 0x7b Inaccesable boot device does appear.

Can anybody solve this?


New game:

2) Two virtual drives
2003 SP1 setupldr.bin does RAM load a image.
Use 2003 SP1 setupldr.bin and ramdisk.sy_, that's not 2003 SP2 files.

Mount virtual floppy again. Delete all files and add files

Quote

ntldr
NTDETECT.COM
winnt.sif
RAMLOAD.IMG
Ntldr is the renamed 2003 SP1 setupldr.bin.

G:\winnt.sif said:

[SetupData]
BootDevice = "ramdisk(0)"
BootPath = "\I386\"

;;;OsLoadOptions = "/noguiboot /fastdetect /rdexportascd /rdpath=BOOT.ISO"
OsLoadOptions = "/noguiboot /fastdetect /rdpath=RAMLOAD.IMG /rdimageoffset=0"

[data]
msdosinitiated="1"


G:\RAMLOAD.IMG:
Use ImDisk, create a new virtual image, 10 mb.
Let's use letter H: Format virtual drive.

Copy \$WIN_NT$.~BT\ files to H:\I386\
Copy txtsetup.sif to H:\I386\txtsetup.sif. hiveOEM.inf goes to H:\I386\txtsetup.sif.

XP installation does work. Files goes to a AHCI SATA harddisk.
Boot.ini get rdisk(0). This is NOT rdisk(1).

One drawback:
grub4dos virtual floppy get's drive letter c: Therefore internal harddisk get's d:
Sad, I expected a different behaviour because of floppy mapping.

Does a more experienced grub4dos user have a solution?


Fixing c: at H:\I386\migrate.inf does work too.
However this is not a general soution.
Partition and format at USB XP installation creates a new DiskID.
Fixed c: is not valid anymore.


Random idea:
XP Embedded creates virtual hard disks, including MBR and MountedDevices.
Extract hard disk image: dd if=raminst.sdi of=raminst.img skip=8
More testing time needed.


@snowden
Yes, a working \I386 solution would be nice.
If you provide a working solution, I'll use this happily.

Setupldr.bin support two modes: CD and floppy/harddisk mode.
Selecting mode is unknown. I suspect ntdetect.com hardware findings or different file systems.
IF a BIOS would boot from ISO9660 at USB...
At CD mode folder \I386 is used.
At floppy/harddisk mode folder \$WIN_NT$.~BT, \cmdcons or \minint is used.

But there are more files involved. Setupdd.sys at textmode setup.
Gui mode setup is the next difficulty.


Winnt32 with options syspart and tempdrive copy \$WIN_NT$.~BT and \$WIN_NT$.~LS files to hard disk.
In addition partitin is marked as active.

This can be run from a running PE.

In addition I wonder, what hapens if this is applied to a USB drive?
And windows is installed. Are files deleted at USB drive?

#190 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 27 May 2007 - 10:36 PM

Thks for your answer first.

i have tried your method but it fails. I think i have made any mistake. When i try to install xp, everything seems to be normal at first. However, the system can not boot to setting up window xp after completetly copying all the temp file to harddisk C drive. Just show an error message in the black screen that c:\windows\system32\hal.dll can not be found.

Furthermore, the speed of copying the temp files to Harddisk drive is very slow. The condition just like smartdrv has not been loaded prior to setting up window xp. Is it possible to make the speed of copying temp file faster?


Actually, i can't understand the step 7, can you further explain it? Many many thanks for your reply.

7. Create a folder BOOTFILES in USB stick root, and copy NTDETECT.COM, NTLDR and 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.



View Postilko_t, on May 27 2007, 05:41 PM, said:

View Postbuseeliu, on May 27 2007, 06:27 AM, said:

I should run this command within the existing window xp or from dos command booting from windwo xp setup cd or booting from the usb stick ? thanks for your kind reply
All the steps are being done within working XP. You need to run that from command prompt of your local XP setup folder. An easy way to do that is by adding this registry info:

CMDHERE.REG
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\Command Prompt Here]
@="Command &Prompt Here"

[HKEY_CLASSES_ROOT\Directory\shell\Command Prompt Here\command]
@="cmd.exe /k cd %1 "
When you import it you may right-click on the desired forder (I386) and from the context menu select OPEN COMMAND WINDOW HERE.


@wimb- I just hope I did not make typos or missed a thing, as I usually do :rolleyes:


#191 User is offline   jaclaz 

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

Posted 28 May 2007 - 05:24 AM

cdob said:

1) XP installation floppies
KB310994 offers XP installation floppy images. http://support.micro....com/kb/310994/
Open the six floppy image files at ImDiks and copy files to drive G:


Not much, but FYI:
http://www.boot-land...sole-t2254.html

cdob said:

....
Setup does boot.
But next a famous BSOD 0x7b Inaccesable boot device does appear.

Can anybody solve this?
.....

Hmmm, cannot say, you could try using direct mapping of the image (it must be contiguous) instead of --mem mapping, but most probably the BSOD happens when the Windows driver "kicks in" and finds No device or a non supported device.

cdob said:

One drawback:
grub4dos virtual floppy get's drive letter c: Therefore internal harddisk get's d:
Sad, I expected a different behaviour because of floppy mapping.

Does a more experienced grub4dos user have a solution?


Fixing c: at H:\I386\migrate.inf does work too.
However this is not a general soution.
Partition and format at USB XP installation creates a new DiskID.
Fixed c: is not valid anymore.


Supposing that I can be defined "a more experienced grub4dos user", I am willing to try and help, but I am failing to understand the situation in it's entirety, can you please re-describe this second approach?

What I got:
on the root on the stick there is:
grldr
menu.lst as follows:
title boot.ima
map --mem /boot.ima (fd0)
map (hd1) (hd0)
map (hd0) (hd1)
map --hook
root (fd0)
chainloader (fd0)+1
rootnoverify (fd0)
map --floppies=1
boot

a super-floppy image "boot.ima" containing:

Quote

ntldr
NTDETECT.COM
winnt.sif
RAMLOAD.IMG

(ntldr above is really SETUPLDR.BIN renamed as ntldr, right?)

the "RAMLOAD.IMG" contains:
a dirtectory \I386 containing all files from \$WIN_NT$.~BT\ + txtsetup.sif + hiveOEM.inf

A typo here?:

cdob said:

Copy txtsetup.sif to H:\I386\txtsetup.sif. hiveOEM.inf goes to H:\I386\txtsetup.sif.


And grub4dos boots in such a manner that SETUP assigns C:\ to the boot.ima file?

Is the above correct?

cdob said:

Random idea:
XP Embedded creates virtual hard disks, including MBR and MountedDevices.
Extract hard disk image: dd if=raminst.sdi of=raminst.img skip=8
More testing time needed.

No need to use XP embedded tools, using VDK.EXE instead of IMDISK it is possible to create and format a full hard disk image (as opposed to single partition image) howto is here (as Trick #3):
http://www.911cd.net/forums//index.php?sho...19056&st=49

If you give me the exact size (in bytes or in 512 sectors) I can prepare a correct MBR and write a few lines of batch to create and format such an image or, alternatively, create such an empty image and send it to you zipped.

jaclaz

This post has been edited by jaclaz: 28 May 2007 - 05:26 AM


#192 User is offline   ilko_t 

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

Posted 28 May 2007 - 05:56 AM

@buseeliu

Quote

i have tried your method but it fails. I think i have made any mistake. When i try to install xp, everything seems to be normal at first. However, the system can not boot to setting up window xp after completetly copying all the temp file to harddisk C drive. Just show an error message in the black screen that c:\windows\system32\hal.dll can not be found.
I believe your BOOT.INI file points to the wrong partition on the hard disk. Are installing on first hard disk, first partition? If not you need to amend the BOOT.INI on the USB stick.
If that's not the case then did you leave USB stick plugged in?
Please give as much as possible information for your setup, how many partitions, how many hard drives you have, where do you install it on etc.

Quote

Actually, i can't understand the step 7, can you further explain it? Many many thanks for your reply.

7. Create a folder BOOTFILES in USB stick root, and copy NTDETECT.COM, NTLDR and 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.
I really don't get what you don't understand in this step :wacko:


Quote

Furthermore, the speed of copying the temp files to Harddisk drive is very slow. The condition just like smartdrv has not been loaded prior to setting up window xp. Is it possible to make the speed of copying temp file faster?
Using winnt.exe or the procedure described? Please try to be as much informative as possible, don't make the other party guessing what you are trying to say. ;)

#193 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 28 May 2007 - 06:46 AM

ilko_t

Quote

I believe your BOOT.INI file points to the wrong partition on the hard disk. Are installing on first hard disk, first partition? If not you need to amend the BOOT.INI on the USB stick.
If that's not the case then did you leave USB stick plugged in?
Please give as much as possible information for your setup, how many partitions, how many hard drives you have, where do you install it on etc..


i just have one IDE 40G Hdd with one partition. I just want to intall the window in Drive C and i haven't unplugged my USB stick



Quote

7. Create a folder BOOTFILES in USB stick root, and copy NTDETECT.COM, NTLDR and 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.


copy NTDETECT.COM, NTLDR & CUSTOMISED BOOT.INI during the first logon,
when should i copy these files & from where i should copy them from?

Quote

Furthermore, the speed of copying the temp files to Harddisk drive is very slow. The condition just like smartdrv has not been loaded prior to setting up window xp. Is it possible to make the speed of copying temp file faster? Using winnt.exe or the procedure described? Please try to be as much informative as possible, don't make the other party guessing what you are trying to say. ;)


After you have pass through the welcome to installing window screen, they will ask you to select "Install" , "repair" , " Exit", Once you select 'install", then the setup procedure will try to detect your existing Hard drive. Select the drive and format it as ntfs or fat. Then the temporary setup file will begin to copy to the harddisk . This procedure is very slow. Just like smartdrv not yet loaded. The temporary setup file just copy one by one and you can clearly see every filename that is being copied at the bottom of the right hand side . If you are using normal window setup cd to install xp, you can't see every filename since the process of copying file is very fast.

I had encountered this situation before. When i am using command prompt(booted by Win98 floppy disk) to install window xp by running winnt without smartdrv loaded.


Hope the above information is detail enough and you can understand my problem. Thank you so much.

This post has been edited by buseeliu: 28 May 2007 - 10:11 AM


#194 User is offline   ilko_t 

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

Posted 28 May 2007 - 07:50 AM

@buseeliu

Quote

copy NTDETECT.COM, NTLDR & CUSTOMISED BOOT.INI during the first logon,
when should i copy these files & from where i should copy them from?
NTDETECT.COM and NTLDR are the same files as on root of your USB stick, you can copy them from your XP install source i.e. \I386 or \$WIN_NT$.~BT on your USB stick. BOOT.INI code is described right under 7., you need to CREATE it, you don't copy it from anywhere. As I already wrote- prepare the stick in advance and at once, from working XP/2k whatever system you have. Once it's prepared no further steps are needed.

As for the HAL missing error please post here your BOOT.INI file found on root of your USB stick.

As for the slow speed- are you sure your motherboard supports USB2.0? Once drivers in TEXT mode setup are loaded and you are presented the screen to choose REPAIR/INSTALL if motherboard supports USB2.0 you should have it.

P.S. please be careful when quoting, it's hard to understand which part was written by you and which is quoted.

#195 User is offline   jaclaz 

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

Posted 28 May 2007 - 09:55 AM

ilko_t said:

P.S. please be careful when quoting, it's hard to understand which part was written by you and which is quoted.


Yep, also if you write (without the underscores):
[_quote_]
This is a quoted sentence.
[_/quote_]
you get:

Quote

This is a quoted sentence.


but if you write (again without the underscores)
[_quote=jaclaz_]
This is a quoted sentence, and the author is shown between parenthesis.
[_/quote_]

you get:

jaclaz said:

This is a quoted sentence, and the author is shown between parenthesis.


jaclaz

#196 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 28 May 2007 - 10:22 AM

@ilko_t

Quote

NTDETECT.COM and NTLDR are the same files as on root of your USB stick, you can copy them from your XP install source i.e. \I386 or \$WIN_NT$.~BT on your USB stick. BOOT.INI code is described right under 7., you need to CREATE it, you don't copy it from anywhere. As I already wrote- prepare the stick in advance and at once, from working XP/2k whatever system you have. Once it's prepared no further steps are needed.

As for the HAL missing error please post here your BOOT.INI file found on root of your USB stick.


Yes, i think i has made the mistake on this boot.ini file. I will try it again at tomorrow.


Quote

As for the slow speed- are you sure your motherboard supports USB2.0? Once drivers in TEXT mode setup are loaded and you are presented the screen to choose REPAIR/INSTALL if motherboard supports USB2.0 you should have it.


My motherboard is Gigabyte M55plus-S3G/AM2 and it supports USB2.0. On the other hand, my flash drive is kingston DTI 2G (Datatraveler) and it also supports usb 2.0. I really don't understand where is my mistake. I think it is a very serious problem for the slow copying speed. I really want to find out the reason.

Quote

P.S. please be careful when quoting, it's hard to understand which part was written by you and which is quoted.


Sorry for my pooring quoting. I have amended it and thks for your nice helping.

#197 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 28 May 2007 - 10:25 AM

View Postjaclaz, on May 28 2007, 11:55 PM, said:

ilko_t said:

P.S. please be careful when quoting, it's hard to understand which part was written by you and which is quoted.


Yep, also if you write (without the underscores):
[_quote_]
This is a quoted sentence.
[_/quote_]
you get:

Quote

This is a quoted sentence.


but if you write (again without the underscores)
[_quote=jaclaz_]
This is a quoted sentence, and the author is shown between parenthesis.
[_/quote_]

you get:

jaclaz said:

This is a quoted sentence, and the author is shown between parenthesis.


jaclaz



Thks for your teaching. :rolleyes:

#198 User is online   cdob 

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

Posted 29 May 2007 - 01:36 AM

@jaclaz

Thanks for floppy image / recocery console link.

I tried direct mapping of the image and failed.
And integration some Dietmar's ideas, like load USB drivers earlier, failed too.
Sad, I like this idea more. This dosn't require 2003 files.

Second approach:

jaclaz said:

(ntldr above is really SETUPLDR.BIN renamed as ntldr, right?)
Yes, ntldr is a renamed 2003 SP1 setupldr.bin.
And I forgot to mention to copy 2003 ramdisk.sy_ to image.

By the way: did you opened KB310994 floppy image? Bootsector loads setupldr.bin.

"hiveOEM.inf goes to H:\I386\txtsetup.sif" in more words:
Edit file H:\I386\txtsetup.sif, add hiveOEM.inf entries.
Copy file hiveOEM.inf to <USB drive>\$WIN_NT$.~LS\I386\hiveOEM.inf. File location hasn't changed to previous messages.

The "RAMLOAD.IMG" contains:
a dirtectory \I386 containing all files from \$WIN_NT$.~BT\ + txtsetup.sif
And migrate.inf, if necessary for drive letter fixing.
Writeprotect at migrate.inf is not necessary. Break, maybe my memory fails: did I include writeprotect in migrate.inf?. I don't recall my latests tests anymore.

jaclaz said:

And grub4dos boots in such a manner that SETUP assigns C:\ to the boot.ima file?

Is the above correct?
Good question, let's say this is my impression.
SETUP dosn't list C: to a partition. C: is not assigned to a real partition.
Most likely 2003 SP1 RAM loaded partition get letter X: internally.
So I assume C: goes to grub4dos virtual partition.

jaclaz said:

No need to use XP embedded tools, using VDK.EXE instead of IMDISK it is possible to create and format a full hard disk image
XP Embedded virtual hard disk appear in Disk Management and registry. Windows thread them as a real hard disk.
For testing purposes I like to use this informations.
If this leeds to a solution, VDK may come in handy. But currently I avoid additional confusion.

#199 User is offline   buseeliu 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 26-May 07

Posted 29 May 2007 - 05:07 AM

@ilko_t

Quote

NTDETECT.COM and NTLDR are the same files as on root of your USB stick, you can copy them from your XP install source i.e. \I386 or \$WIN_NT$.~BT on your USB stick. BOOT.INI code is described right under 7., you need to CREATE it, you don't copy it from anywhere. As I already wrote- prepare the stick in advance and at once, from working XP/2k whatever system you have. Once it's prepared no further steps are needed.

As for the HAL missing error please post here your BOOT.INI file found on root of your USB stick.
Yes, i think i has made the mistake on this boot.ini file. I will try it again at tomorrow.


I had amended the BOOT.INI and i was able to install WINDOW XP From the flash drive successfully. Your method is very good. However, the procedure of deleting temporary file at the last 1 mintue is extremely slow. I need to spend around one hour to finish this process.
Do i make any mistake again? Thks for your help.

#200 User is offline   ilko_t 

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

Posted 29 May 2007 - 12:31 PM

The long wait at T-1 is finally fixed, also no need to write-protect the stick during GUI mode, as we are going to rename temporary the 2 folders and txtsetip.sif and rename them back during first logon. Here is the revised guide, tested on XP Pro SP2, both clean and repair install.

With RED color are marked new or changed entries, strikethrouh font is for entries or files no longer needed compared to the old guide. If you are starting from a scratch just skip those entries or files:

1. Format stick using PEtoUSB or any other utility of your choice, which makes it bootable with 2k/XP boot sector
2. Copy NTDETECT.COM, NTLDR to root and create BOOT.INI

BOOT.INI
[Boot Loader]
Timeout=15
Default=multi(0)disk(0)rdisk(1)partition(1)\WINDOWS
[Operating Systems]
c:\grldr="Start GRUB"
multi(0)disk(0)rdisk(1)partition(1)\WINDOWS="GUI Setup" /FASTDETECT
If you are going to install on another partition/disk amend entries to reflect that.

Make sure you can boot from stick and reach the menu.

3. Get the latest GRUB4DOS and copy GRLDR to the USB root. If you have any issues use the last stable version. Create in USB stick root

MENU.LST
color black/cyan yellow/cyan
timeout 15

default 0

title Phase 1 WinXP Text Mode Setup 
chainloader (hd0,0)/setupldr.bin


4. Backup your local BOOT.INI and in the XP setup folder \I386 run
winnt32 /makelocalsource /noreboot
after it's finished restore BOOT.INI you backed up.

5. Copy two new folders onto the USB stick root - $WIN_NT$.~BT and $WIN_NT$.~LS

6. In \$WIN_NT$.~BT modify

WINNT.SIF

Quote

[data]
msdosinitiated="1"
floppyless="1"
AutoPartition="0"
UseSignatures="no"
InstallDir="\WINDOWS"
winntupgrade="no"
win9xupgrade="no"

[GuiRunOnce]
"regedit /s %systemdrive%\windows\system32\undoUSBWP.reg"
"%systemdrive%\windows\system32\undoren.cmd"

[SetupParams]
UserExecute = "%systemdrive%\windows\system32\boot_ren.cmd"


and

MIGRATE.INF
[Version]
Signature = "$Windows NT$"

[Addreg]
HKLM,"SYSTEM\MountedDevices",,0x00000010
HKLM,"SYSTEM\ControlSet001\Control\StorageDevicePolicies","WriteProtect",%REG_DWORD%,1

[Strings]
;Handy macro substitutions (non-localizable)
REG_SZ			  = 0x00000000
REG_BINARY		  = 0x00000001
REG_DWORD		   = 0x00010001
REG_MULTI_SZ		= 0x00010000
REG_SZ_APPEND	   = 0x00010008
REG_EXPAND_SZ	   = 0x00020000
If you wish to preserve your USB storage drive letter use CDOB's script to create MIGRATE.INF, don't forget to add the above entries :

MkMigratgeInf.cmd
@echo off
REM MkMigratgeInf.cmd v0.01
REM created by cdob

setlocal EnableExtensions

set Drive=%~d1
if %Drive%.==. set Drive=%~d0

set FileName=%~2
if %FileName%.==. set FileName=MIGRATE.INF.TXT

set MigrateDrive=U:
if not %~d3.==. set MigrateDrive=%~d3

set Value=
FOR /F "skip=2 tokens=1-2*" %%a IN ('reg query HKLM\System\MountedDevices /v \DosDevices\%Drive%') DO set Value=%%c

if %Value%.==. (echo drive settings %Drive% not found & goto :EOF)

set MigrateStr=%Value:~0,2%
set count=2
:begin_parse
  call :exec set MidStr=%%Value:~%count%,2%%
  if %MidStr%.==. goto :exit_parse
  set MigrateStr=%MigrateStr%,%MidStr%
  set /a count+=2
  goto begin_parse
:exit_parse

(echo [Version]
echo Signature = "$Windows NT$"
echo.
echo [Addreg]
echo HKLM,"SYSTEM\MountedDevices","\DosDevices\%MigrateDrive%",0x00030001,\
echo %MigrateStr%)>%FileName%

goto :EOF

:exec
  %*
goto :EOF


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

[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


8. Create:

undoUSBWP.reg
 no longer needed !


hiveOEM.inf
no longer needed !


BOOT_REN.CMD
@echo off

SET TAGFILE=\bootfiles
FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:

xcopy %USBDRIVE%\bootfiles\*.* %SYSTEMDRIVE%\  /y /h /r /k

ren %USBDRIVE%\txtsetup.sif txtsetup.bak
ren %USBDRIVE%\$WIN_NT$.~BT WIN_NT.BT
ren %USBDRIVE%\$WIN_NT$.~LS WIN_NT.LS

exit



UndoRen.CMD

@echo off

SET TAGFILE=\BOOTFILES
FOR %%h IN (C D E F G H I J K L M N O P Q R S T U V W X Y) DO IF EXIST "%%h:%TAGFILE%" SET USBDRIVE=%%h:

ren %USBDRIVE%\txtsetup.bak txtsetup.sif
ren %USBDRIVE%\WIN_NT.BT $WIN_NT$.~BT 
ren %USBDRIVE%\WIN_NT.LS $WIN_NT$.~LS 


exit

and place them in $WIN_NT$.~LS\i386

9. Copy TXTSETUP.SIF and SETUPLDR.BIN from \$WIN_NT$.~BT to root of USB stick and add the following lines to

TXTSETUP.SIF

Quote

[SourceDisksFiles].....
.....
hiveOEM.inf = 100,,,,,,_x,,3,3
undoUSBWP.reg = 100,,,,,,_x,2,0,0

BOOTFLS.CMD = 100,,,,,,_x,2,0,0
boot_ren.cmd = 100,,,,,,_x,2,0,0
undoren.cmd = 100,,,,,,_x,2,0,0

....
....
[HiveInfs.Fresh]
AddReg = hiveOEM.inf,AddReg

[HiveInfs.Upgrade]
AddReg = hiveOEM.inf,AddReg

--------
Install XP and leave stick plugged in until after the first logon screen.

Notes:
1. If you use an answer file when launching WINNT32.EXE make sure you delete the whole [Unattend] section in WINNT.SIF, otherwise you won't be able to use System Restore and SETUP will not prompt on which partition to install.
2. If you use BTS mass storage DP method 2 and repair install then include the following line in \$WIN_NT$.~LS\I386\PRESETUP.CMD
DEL /F %systemroot%\system32\setupold.exe
or GUI Setup stops at start, complaining about fake setup being executed.
3. If during TEXT MODE your usb stick is listed first when SETUP searches for disks , above SATA/SCSI disks, disable in BIOS IDE channels including the ones with CDROM/DVD attached or disconnect them, this should fix the order. Do not continue install if stick is listed first, this will corrupt files and MBR on it.
------------------------------------



The problem described in post #156 turned out to be that the script launched by CMDLINES.TXT was being executed from within $WIN_NT$.~LS, giving "access denied" error, so I have tried to launch same script via WINNT.SIF [SetupParams] section which worked flawlessly. Wait at T-1 is about 1-2 seconds now, this also saved a few files and entries to be written :)


edit1 (15.Jun.07): Undo_Ren.cmd corrected to UndoRen.cmd

This post has been edited by ilko_t: 15 June 2007 - 02:57 PM


Share this topic:


  • 25 Pages +
  • « First
  • 8
  • 9
  • 10
  • 11
  • 12
  • Last »
  • You cannot start a new topic
  • This topic is locked

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



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