MSFN Forum: Install Windows from ISO after booting to WinPE 3.0 from USB HDD - MSFN Forum

Jump to content



  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

Install Windows from ISO after booting to WinPE 3.0 from USB HDD Installation of Wndows XP, Vista, 7, Server 2003/2008 from same drive

#1 User is offline   bishooman 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 12-September 04

Posted 13 November 2009 - 06:38 PM

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/board/installing-winxp...-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

This post has been edited by bishooman: 16 November 2009 - 07:09 PM



#2 User is offline   ilko_t 

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

Posted 13 November 2009 - 07:49 PM

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

#3 User is offline   jaclaz 

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

Posted 14 November 2009 - 04:49 AM

Nice. :thumbup

Stickied. :)

jaclaz

#4 User is offline   bishooman 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 12-September 04

Posted 14 November 2009 - 05:26 AM

View Postilko_t, on Nov 13 2009, 08:49 PM, said:

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

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 12-September 04

Posted 14 November 2009 - 05:27 AM

View Postjaclaz, on Nov 14 2009, 05:49 AM, said:

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

  • Group: Members
  • Posts: 2
  • Joined: 14-November 09

Posted 14 November 2009 - 09:44 PM

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

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

Posted 15 November 2009 - 03:38 AM

View Postchrime2007, on Nov 15 2009, 04:44 AM, said:

I am an IT-Professional


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

Quote

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

and here:

Quote

#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 User is offline   bishooman 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 12-September 04

Posted 15 November 2009 - 05:17 AM

View Postchrime2007, on Nov 15 2009, 06:44 AM, said:

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

This post has been edited by bishooman: 15 November 2009 - 05:21 AM


#9 User is offline   robekia 

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

Posted 03 December 2009 - 09:39 PM

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

This post has been edited by robekia: 03 December 2009 - 09:55 PM


#10 User is offline   bishooman 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 12-September 04

Posted 04 December 2009 - 06:05 AM

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

Quote

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

This post has been edited by bishooman: 04 December 2009 - 06:06 AM


#11 User is offline   agni 

  • Newbie
  • Group: Members
  • Posts: 18
  • Joined: 28-April 08

Posted 05 December 2009 - 01:25 AM

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.com/blog/2009/08/12/ad...oyment-usb-key/

Also check this
http://www.boot-land...?showtopic=7721

#12 User is offline   robekia 

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

Posted 05 December 2009 - 04:34 PM

View Postbishooman, on Dec 4 2009, 03:05 PM, said:

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

Quote

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

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

Posted 05 December 2009 - 06:40 PM

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/board/usb-multiboot-se...ck-t129454.html
http://www.msfn.org/board/xp-source-2nd-pa...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 /?.

#14 User is offline   bishooman 

  • Newbie
  • Group: Members
  • Posts: 35
  • Joined: 12-September 04

Posted 06 December 2009 - 05:02 AM

Quote

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

This post has been edited by bishooman: 06 December 2009 - 05:27 AM


#15 User is offline   robekia 

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

Posted 06 December 2009 - 06:57 AM

View Postbishooman, on Dec 6 2009, 02:02 PM, said:

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?

This post has been edited by robekia: 06 December 2009 - 07:50 AM


#16 User is offline   vadorsmile 

  • Group: Members
  • Posts: 2
  • Joined: 23-January 10

Posted 23 January 2010 - 01:14 PM

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

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 07-November 07

Posted 25 January 2010 - 01:10 PM

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.

This post has been edited by Jadestar: 25 January 2010 - 01:13 PM


#18 User is offline   Jadestar 

  • Member
  • PipPip
  • Group: Members
  • Posts: 106
  • Joined: 07-November 07

Posted 25 January 2010 - 01:47 PM

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

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

Posted 25 January 2010 - 06:14 PM

View PostJadestar, on Jan 25 2010, 08:47 PM, said:

Any thoughts?


YES. :)
http://homepages.tesco.net/J.deBoynePollar...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 User is offline   vadorsmile 

  • Group: Members
  • Posts: 2
  • Joined: 23-January 10

Posted 26 January 2010 - 11:58 AM

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

Share this topic:


  • 2 Pages +
  • 1
  • 2
  • You cannot start a new topic
  • You cannot reply to this topic

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



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