Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Install Windows from ISO after booting to WinPE 3.0 from USB HDD


  • Please log in to reply
34 replies to this topic

#1
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag
Dear all
i have been reading alot in the last few days and i want to share my findings with you all.
this will be a small project and it will be updated frequently so please show support by testing it and give advices\corrections

Posted Image

Requirements:

1- Windows AIK from HERE
2- FileDisk 1.7 from HERE
3- PStart Application Lancher from HERE


Part 1: Preparing your Windows PE Enviroment

1. Install the Windows AIK using default options.
2. Create Winpe 3.0 environment using the Windows AIK by excuting this command :

D:\ Program Files\Windows AIK\Tools\PETools\copype.cmd x86 D:\winpe_x86
this will create the Windows PE output in the directory D:\winpe_x86.
3. mount the winoe image so that we can edit it
D:\ Program Files\Windows AIKTools\x86\imagex" /mountrw D:\winpe_x86\winpe.wim 1 %D:\winpe_x86\mount
4. now will will install FileDisk to our WinPE Enviroment, installing FileDisk involved to setps

a. Copy the Driver "filedisk.sys" to Windows\System32\drivers directory
b. add some registry values

this can be done by using the below commands
reg load HKLM\Winpe D:\winpe_x86\mount\Windows\System32\config\System
regedit /s D:\Winpe3.0\Tools\FileDisk\Filedisk.reg filedisk.reg is in attachments
reg unload HKLM\Winpe
5.now we will copy the STARTNET.CMD to Windows\Syatem32
and we will add the rest of our files and folder to D:winpe_x86\ISO folder
xcopy D:\Winpe3.0\Tools\Start D:\winpe_x86\ISO\Start\ /s /e
copy D:\Winpe3.0\Tools\Scripts\STARTNET.CMD D:\winpe_x86\mount\Windows\System32\
6. now we have to unmout the image and commit changes
D:\ Program Files\Windows AIKTools\Tools\x86\imagex /unmount /commit D:\winpe_x86\mount
7. now will copy the winpe.wim image to sources folder and name it boot.wim
copy D:\winpe_x86\winpe.wim D:\winpe_x86\ISO\sources\boot.wim
and now our Windows PE Enviroment is ready.



Part 2: Preparing PStart and our Windows Setup Command


The windows PE image we just did will boot from USB Flash or Hardisk in 30sec and load PStart.exe so we have to prepare our Setup.cmd file that will partition, format then start winnt32.exe.
installing XP from Windows PE will require some special registry entries and format style in our Windows PE Enviroment for more details check this thread http://www.msfn.org/...-pe-t88270.html
for that i already added all the needed files in D:\Winpe3.0\Tools\Start\Setup folder

the command i am using here to do the job is XP2003.cmd that will do the folowing
1. Set ISO files root
2. Set Unattned files root
3. will the needed registry entries needed to correctly partion your harddisk for Windows XP usage check this (http://support.microsoft.com/kb/931760)
4. will partition and format usr hardisk using diskpart.exe and diskpart.ini the holds the format script NOTE: the included diskpart.ini will format your drive C:
5. you need also to fix the boot sector after you format your hardisk to be compatibale with Windows XP
6. Finaly it will mount you Windows XP iso file and Start the Setup Proccess.

SET ISO_PATH=%~d0\Start\ISO
SET UNATTEND_PATH=%~d0\Start\Unattend
regedit /s fixbootxp2003.reg
diskpart /s diskpart.ini
bootsect /nt52 c:
filedisk /mount 0 %ISO_PATH%\%1 /cd V:
V:\i386\winnt32 /syspart:c: /tempdrive:c: /makelocalsource /unattend:%UNATTEND_PATH%\%2
7. Now you have to add a new entry to PStart to launch XP2003.cmd with 2 command parameters

1. ISO file name
2.Unattended file name

XP2003.cmd XPSP3.iso Unattended.txt



Part 3: Preparing Your USB Flash or HDD and BOOT IT !


1. format your usb drive from windows vista/7 open cmd windows and type

#first excute this command to check your drive number

list disk

#then use it as below mine was 2

diskpart
select disk 2
clean
create partition primary
select partition 1
active
format fs=ntfs
exit

2. copy all the files\folders in D:\winppe_x86\ISO to the root of your drive
3.copy your XP ISO file to you usb drive in U:\Start\ISO
4. boot your USB


you will find in the attachment all the files needed and Setup.cmd the will do all that job for you, to run it correcttly you need to do the folowing:
1. extract winpe3.0 some where in c: or d: drive
2. open Setup.cmd and edit the first 3 lines


SET WINPETOOLS_DIR=L:\Winpe3.0\Tools <-- path for the tools you downloaded here
SET WINPE_ENV=L:\winpe_x86 <-- path where Winpe Enviroment working directory
SET WAIK_DIR=C:\Program Files\Windows AIK <-- path to Windows AIK


@ECHO OFF
SET WINPETOOLS_DIR=L:\Winpe3.0\Tools
SET WINPE_ENV=L:\winpe_x86
SET WAIK_DIR=C:\Program Files\Windows AIK


ECHO. 
ECHO Creating Winpe 3.0 Enviroment ...
CALL "%WAIK_DIR%\Tools\PETools\copype.cmd" x86 %WINPE_ENV%
CLS

ECHO.
ECHO Mounting Winpe Image ...
"%WAIK_DIR%\Tools\x86\imagex" /mountrw %WINPE_ENV%\winpe.wim 1 %WINPE_ENV%\mount
CLS

ECHO.
ECHO Installing FileDisk Driver...
copy %WINPETOOLS_DIR%\FileDisk\filedisk.sys %WINPE_ENV%\mount\Windows\System32\Drivers
CLS

ECHO.
ECHO Installing FileDisk Registry Values...
reg load HKLM\Winpe %WINPE_ENV%\mount\Windows\System32\config\System
regedit /s %WINPETOOLS_DIR%\FileDisk\Filedisk.reg
reg unload HKLM\Winpe
CLS

ECHO.
ECHO Coping Other Tools..
xcopy %WINPETOOLS_DIR%\Start %WINPE_ENV%\ISO\Start\ /s /e
copy %WINPETOOLS_DIR%\Scripts\STARTNET.CMD %WINPE_ENV%\mount\Windows\System32\
CLS

ECHO.
ECHO Unmounting Winpe Image ...
"%WAIK_DIR%\Tools\x86\imagex" /unmount /commit %WINPE_ENV%\mount
CLS

ECHO.
ECHO Coping Winpe Image to ISO\Sources..
copy %WINPE_ENV%\winpe.wim %WINPE_ENV%\ISO\sources\boot.wim
CLS

::OSCDIMG -N -M -O -B%WINPE_ENV%\ETFSBOOT.COM %WINPE_ENV%\ISO %WINPE_ENV%\WINPE.ISO

@pause

you can uncomment the last line to build the project in iso format so you can test it in Virtual PC or Virtual Box

Download ver0.1 Windows Vista\7 Users should right click and run as administrator Setup.cmd file

THINGS I WANT TO ADD\UPDATE your Suggestions is more than welcome

1- Using a GUI Disk Managment Tool that is Free and easy to use (for XP/2003 instlations)
2- Replacing PStart with more advanced specific application (maybe i will code it my self)
3- adding on the fly unattented file generator
4- Give the Project a Name :)

THINGS I AM WORKING ON RIGHT NOW

1- Integration of Raid Drivers WITHOUT CHANGING THE ISO
2- GUI Tool for the Project
3- 64bit setup.exe will not run from 32bit Winpe i am looking for a solution

Edited by bishooman, 16 November 2009 - 07:09 PM.



How to remove advertisement from MSFN

#2
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,722 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
Thanks for sharing this, it definitely will help many :thumbup

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


#3
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,567 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag
Nice. :thumbup

Stickied. :)

jaclaz

#4
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Thanks for sharing this, it definitely will help many :thumbup


you are more than welcome, i learnd alot from your topicts keep up the good job

#5
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Nice. :thumbup

Stickied. :)

jaclaz


wow!! thanks alot for the stiky man, this will give me extra push to make this better and easier for all

#6
chrime2007

chrime2007
  • Member
  • 2 posts
  • Joined 14-November 09
Hi,
first thanks for your great work, Secondly I've got a Question:
I am an IT-Professional and want to use the system to install every individual PC. Problem is, that in your diskpart.ini is written, that every data on first partition of disk 0 will be deleted. Some PC have 2 physical disks, one for the Data and the other for the system. How can I specify on wich disk and wich partition windows xp will be installed?
You will probably notice that there are more than one question but you may can help me.
Thank you

#7
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,567 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

I am an IT-Professional


Well, if I were an IT professional :whistle: , I would look here:

V:\i386\winnt32 /syspart:c: /tempdrive:c: /makelocalsource /unattend:%UNATTEND_PATH%\%2

and here:

#first excute this command to check your drive number

list disk

#then use it as below mine was 2

diskpart
select disk 2
clean
create partition primary
select partition 1


active
format fs=ntfs
exit


jaclaz

#8
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

Hi,
first thanks for your great work, Secondly I've got a Question:
I am an IT-Professional and want to use the system to install every individual PC. Problem is, that in your diskpart.ini is written, that every data on first partition of disk 0 will be deleted. Some PC have 2 physical disks, one for the Data and the other for the system. How can I specify on wich disk and wich partition windows xp will be installed?
You will probably notice that there are more than one question but you may can help me.
Thank you


in XP2003.cmd file you can comment the line

diskpart /s diskpart.ini

then you can do your own custom partitioning and format using diskpart tool to read more about diskpart tool you can chack here

after that you can run xp2003.cmd to applay the rest of fix and then install

also you may need to change the drive letter in /syspart:c: /tempdrive:c:
as jaclaz mensioned if you are installing do a drive other than c:

please note that the clean command will delete all the partition on the selected drive s skip this step if you have more than one partition in one single phisical drive

Good Luck :thumbup

Edited by bishooman, 15 November 2009 - 05:21 AM.


#9
robekia

robekia

    Junior

  • Member
  • Pip
  • 54 posts
  • Joined 06-May 07
@Bishooman

Thank you for your good IDEA.
Unfortunately, failed to install windows XPSP3 to any drive other than C: (with or without updating the diskpart.ini). only success with C: drive.
here is my problem with D: drive

1- I updated diskpart as following but (active) command wouldn't work and when restart after WINNT32 PC is not booting and giving HALL error:
sel disk 0
sel par 2
active
format fs=ntfs quick
assign letter=d

2- Even i didn't use diskpart, the same result.
3- There might be some files missing that should be in root of D or C drive before booting.
4- Also, Fixboot.reg failed to be mapped to registry, i found the same key in another place in registry but not under (winpe)
[HKEY_LOCAL_MACHINE\Winpe\ControlSet001\Services\vds\Alignment]
and even updated that key manually, still failed after reboot.

please help.

Edited by robekia, 03 December 2009 - 09:55 PM.


#10
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag
Dear robekia

if you succeeded to instal to c: then 1,2,3,4 you are doing correctly.

now for installing to D: you have to change this line

V:\i386\winnt32 /syspart:D: /tempdrive:D: /makelocalsource /unattend:%UNATTEND_PATH%\%2


changes is in bold

you will find this in xp2003.cmd

please report if this worked for you

regards

Edited by bishooman, 04 December 2009 - 06:06 AM.


#11
agni

agni

    Newbie

  • Member
  • 18 posts
  • Joined 28-April 08
GUI disk management tool
http://www.911cd.net...showtopic=13516

Add 64 bit boot.wim as boot64.wim and add an entry to bcd
http://www.cluberti....oyment-usb-key/

Also check this
http://www.boot-land...?showtopic=7721
Sig removed for being oversized

#12
robekia

robekia

    Junior

  • Member
  • Pip
  • 54 posts
  • Joined 06-May 07

Dear robekia

if you succeeded to instal to c: then 1,2,3,4 you are doing correctly.

now for installing to D: you have to change this line

V:\i386\winnt32 /syspart:D: /tempdrive:D: /makelocalsource /unattend:%UNATTEND_PATH%\%2


changes is in bold

you will find this in xp2003.cmd

please report if this worked for you

regards


I already tried this before reporting, still failed, windows wouldn't even boot with HALL Error
As i mentioned already, there are some steps missing in this particular case.
If any member success in this case, please report here with procedure.

May be we need to copy some files to the ROOT of drive C even we are installing into any other drive...

#13
ilko_t

ilko_t

    MSFN Addict

  • Super Moderator
  • 1,722 posts
  • Joined 06-December 06
  • OS:none specified
  • Country: Country Flag
Which on is the active partition? Setup expects to find its boot files on the first partition, which is active, said for simplicity, details:
http://www.msfn.org/...ck-t129454.html
http://www.msfn.org/...pid-837621.html

What prevents you to start Setup from the first partition, but once on the partitioning screen to select the second one as destination?
You'd have to remove completely the unattended section in the answer file, or it will start installing right away in the partition where the temporary folders (~BT and ~LS) are, without getting you to the partition selection screen. Exception is if there is not enough space on that partition as per values in txtsetup.sif, in this case Setup will throw an error for not enough space and let you choose another partition, sending you back to the partitioning screen.

I recall a few other switches in winnt32.exe, which may allow source files to be elsewhere, not tested, use winnt32.exe /?.

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


#14
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag

I already tried this before reporting, still failed, windows wouldn't even boot with HALL Error
As i mentioned already, there are some steps missing in this particular case.
If any member success in this case, please report here with procedure.

May be we need to copy some files to the ROOT of drive C even we are installing into any other drive...


can you please check if your seconed partion is primaty partition ?

are you getting hal.dll error when you are going to GUI Setup or directly after you restart WINPE to get to TXT Setup??

Edited by bishooman, 06 December 2009 - 05:27 AM.


#15
robekia

robekia

    Junior

  • Member
  • Pip
  • 54 posts
  • Joined 06-May 07

are you getting hal.dll error when you are going to GUI Setup or directly after you restart WINPE to get to TXT Setup??


Directly after I finish with Winnt32.exe and restart WINPE to get to TXT Setup

Also, i tried to format C: and D: then using winnt32.exe from PE to setup XP onto D:
I got the error when computer restarts.
I Load PE again to check the partitions and i found the following:
1- ( C ) drive is totaly empty, no files found even hidden..
2- (D) drive has $WIN_NT$.~BT and $WIN_NT$.~LS along with some files on the root.



BTW, in PStart, what the command line for installing VISTA will be and how you'll organize the files on USB?

Edited by robekia, 06 December 2009 - 07:50 AM.


#16
vadorsmile

vadorsmile
  • Member
  • 2 posts
  • Joined 23-January 10
Hi

I do everithing you said but the drive don't want boot. theire is no additional file for a good boot?

Thank's for your reply.

#17
Jadestar

Jadestar

    Member

  • Member
  • PipPip
  • 106 posts
  • Joined 07-November 07
OK so this guide seems great but it also seems to be missing some steps..or I am just not seeing it.

This one has got me stumped

D:\Winpe3.0\Tools\Scripts\STARTNET.CMD D:\winpe_x86\mount\Windows\System32\

First of all, i dont have a winpe3.0 dir at all, i have the c:\winpe_x86 and the C;\program files\windows aik\ etc etc that was created when i installed aik and then mounted the image.

I also dont have startnet.cmd....so I'm kinda confused as to what I'm supposed to do. Can anyone shed some light on what I missed?

*BLAh nevermind...found the files at the end of the post, with instructions on where they were in the post itself..sorry bout that.

Edited by Jadestar, 25 January 2010 - 01:13 PM.


#18
Jadestar

Jadestar

    Member

  • Member
  • PipPip
  • 106 posts
  • Joined 07-November 07
OK so this is pretty cool.

One thing I was wondering about is having diskpart PROMPT for which disk or partition to format prior to installing xp. The reason I am wondering this is because I want to be able to use this on multiple PC's.

So on one pc, I may just want to format the entire disk, create 1 large partition and install xp..which this does.

On another pc, there may be 2 partitions, lets say main C and Data D. In this situation I MAY want to only format C and install xp and leave D intact. my understanding is that D would also get formatted using default options...but I dont want to have to change diskpart everytime.

Any thoughts?

#19
jaclaz

jaclaz

    The Finder

  • Developer
  • 14,567 posts
  • Joined 23-July 04
  • OS:none specified
  • Country: Country Flag

Any thoughts?


YES. :)
http://homepages.tes...no-answers.html

Read post #8 above, and all the following ones, for good measure, and particularly #11.
Replace the call to diskpart with a call to your interactive batch or other disk management utility. ;)

jaclaz

#20
vadorsmile

vadorsmile
  • Member
  • 2 posts
  • Joined 23-January 10
Hi all reader of this great topic,

for me it's working find on USB hard drive 80 Go with this great soft : WinSetupFromUSB
i can install xp pro or home edition but...

in part 2 step 7 their is a command XP2003.cmd and this doesn't work for windows 7 or server 2k8
if somebody got any idea it was great and for wait i'm going on google to find some answer...

thank's a lot again for this topic.

Vad

#21
bishooman

bishooman

    Newbie

  • Member
  • 35 posts
  • Joined 12-September 04
  • OS:Windows 7 x64
  • Country: Country Flag
Hey Guys,

sorry for the delay, but actully i was in a vacation and when i take one i like to be away from all kind of technology and devices :)

anyway i will review your questions and see what i can do to make this easier.

it is a good thing to hear from all of you this feedback is very helpfull to me

thanks

#22
zeroFX

zeroFX

    random lateral thinker

  • Member
  • 39 posts
  • Joined 16-August 06
  • OS:Windows 7 x64
  • Country: Country Flag
As far as I understand this one, I need your file Winpe3.0ver0.1.rar. But the link is dead. You may also want to check for some spelling and/or command errors in your first post, like:

3. mount the winoe image so that we can edit it
D:\ Program Files\Windows AIKTools\x86\imagex" /mountrw D:\winpe_x86\winpe.wim 1 %D:\winpe_x86\mount

Thx :) . . . Oh, and btw: anyone got an idea why I cant log in w/ FF but w/ IE? Cookies?? -> just PM me

Edited by zeroFX, 15 March 2010 - 08:57 AM.


#23
GrowBigTrees

GrowBigTrees

    Newbie

  • Member
  • 22 posts
  • Joined 04-December 05
Hello Bishooman, I'm trying your project, but where can I download the attachments you refer to / Winpe3.0ver0.1.rar?

+ Filedisk.reg: should it come from filedisk-17 as downloaded, or is it customized and in those attachments?

+ do I need filedisk-17\sys\obj\chk\i386\filedisk.sys or filedisk-17\sys\obj\fre\i386\filedisk.sys?

Kind Regards,

#24
steve6375

steve6375

    Junior

  • Member
  • Pip
  • 59 posts
  • Joined 25-November 04
  • OS:Windows 7 x64
  • Country: Country Flag
Just a warning about PCs with more than one SATA hard disk. There is a problem with WinPE (and Vista/Win7). When *some* systems boot, HDD0 may be \\.\PhysicalDisk0 and HDD1 may be \\.\PhysicalDisk1 BUT on some systems they may be the other way round sometimes - i.e. HDD0 is \\.\PhysicalDisk1. This happens randomly and is unpredictable.
For instance Intel DQ45CB and Intel DQ57TM mainboards with two SATA hard disks do this.

MS have put a new command into Diskpart in the WinPE v3 version to work around this. SELECT DISK SYSTEM will select the 'first' hard disk which MS define as the 'system' disk. SELECT DISK NEXT will then select the 'next' disk up. So any script you use should use this and not SELECT DISK x.

This is OK if you have a system with an OS on one of the disks, but if you have two completely blank hard disks to start with, PhysicalDisk0 could be any one on any boot! This is a big issue for OEMs who automate OS installs onto systems with two non-identical drives, the OS can be installed randomly on the smaller drive or the larger drive!

The best way to get around this issue is to disable one drive in the BIOS Setup menu or unplug one SATA drive.

Visit www.rmprepusb.com for RMPrepUSB, the new Easy2Boot multiboot USB solution and 100+ tutorials on booting from USB drives.


#25
Ashenfall

Ashenfall
  • Member
  • 1 posts
  • Joined 01-April 10
  • OS:none specified
  • Country: Country Flag
Trying to download Winpe3.0ver0.1.rar, but looks like the site is gone :(




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users