Jump to content

Install from Second Hard Drive


Recommended Posts

I would like to install Windows from a second hard drive, not from CD. Has anyone done it? I have searched and found some info on network install, but not same. I have tried to run winnt.exe but get error that installer cannot find a valid partition to install on. Please let me know.

Link to comment
Share on other sites


It is possible. You need to run Winnt from the i386 directory. If you are on a raid setup or SATA you'll need to press the F6 key to load the appropriate driver.

If you have 2 Plain IDE drives, each formated with FAT32 then there should be no problem.

Run Winnt /? to see the switches.

Link to comment
Share on other sites

I ONLY do DOS-based installs from D: to C: and have developed stable scripts to do this.  Let me know if you want me to post more details.

YES PLEASE! This looks good. I will try it tonight as for formatting drive. How then to get install started after reboot ??

Link to comment
Share on other sites

Well, actually, that format script is a little dated. I use AEFDisk for everything now - I have high confidence in it and it formats large disks as FAT32 in DOS. But I still keep around FDISK for resetting the MBR after the primary partition is deleted, just cause it's more "official" when FDISK does it.

If I were you, and I had a C: NTFS hard disk with a WINDOWS folder on it (or anything for that matter), and a separate D: FAT32 drive (or partition), and I wanted to make a completely automated script that:

- Deleted the primary NTFS partition on the first hard disk

- Recreated it, and rebooted automatically, then

- Started the install script after reboot

I would create either a DOS floppy or a DOS boot CD (a CD with a DOS boot floppy in it) with the following script in autoexec.bat:

@echo off
IF NOT EXIST D:\nul (
    AEFDisk /DELACTIVE
    AEFDisk /FREESIZE
    AEFDisk /pri:%freesize%:0b
    AEFDisk /formatfat:1:Hard_Disk /reboot
)

(if you have any kind of "copy files to D: from CD" script, insert that here)

(path to WINXP)\i386\WINNT.EXE  /s:(path to WINXP)\i386 /u:(path to WINNT.SIF)\winnt.sif

So, if I copied my WINXP folder to d:\Install\WinXP, and I had the WINNT.SIF file in the same folder, the last command would read:

@d:\Install\WinXP\i386\winnt /s:d:\Install\WinXP\i386 /u:d:\Install\WinXP\winnt.sif

How does this work? This assumes that you already have a C: drive formatted as NTFS, and a D: drive formatted as FAT32 (which is, of course, accessible in DOS). If C: is NTFS, then DOS ignores it and your D: drive is assigned C:.

So, when the script starts, it checks for the existance of D:. If your C: drive is still NTFS, there won't BE a D: drive in DOS (that's been assigned C: for this session), so it executes a wipe / format routine and immediately reboots.

After the reboot, the first hard disk HAS a FAT32 partition that is assigned C:, and the second hard disk is now D:, so it ignores that little format script and goes straight into install.

Pretty slick, ay? You may have to make little adjustments here and there, but the code principles are sound. With luck, you can copy and paste this right onto a DOS floppy, load up the programs that are called onto that same floppy, and it should work. So I've done the work for you.

Good luck,

JP

Link to comment
Share on other sites

The best way is to boot with a WinPE or BartPE CD.

I'm installing Windows from my harddrive by booting to WinPE and start a .CMD file that i have stored on my D:\ drive (NTFS) with my installationfiles.

The CMD file formats my C:\ drive (NTFS) and starts the installation.

I haven't tryed to install from a SATA drive but I think it works if you load the SATA drivers when you boot WinPE and have the drivers integrated on your Windows Installation on your harddrive.

Here is my .CMD file:

@rem SetupMgrTag
@echo off
title Microsoft Windows XP, Professional Edition Setup

set AnswerFile=D:\WINDIST\WXPPRO_EN\unattend.txt
set SetupFiles=D:\WINDIST\WXPPRO_EN\I386

echo.
echo Windows Setup will now format your C:\ drive
echo and start the Windows XP installation program.
echo.
echo If you continue all data on your C:\ drive will be erased!
echo.

pause

echo.
echo Formating C:\ . . .
echo.

FORMAT C: /fs:ntfs /q /V:Windows /y
cacls C: /p Everyone:F

echo.
echo Done . . .
echo.

echo.
echo Starting the installation program for Microsoft Windows XP, Professional Edition . . .
echo.

%SetupFiles%\winnt32.exe /s:%SetupFiles% /unattend:%AnswerFile% /copysource:lang /tempdrive:C /syspart:C

echo Done . . .
echo.

echo.
echo Restarting Computer . . .

exit

Link to comment
Share on other sites

@JPamplin

I tried your new method. The formatting seems to work properly, but gets caught in an endless loop and reformats each reboot, the install never gets called. Any suggestions?

@Kenny McCormick

I have BartPE at home and will try tonight.

@All

Thanks to everyone for help. I love this site!

Link to comment
Share on other sites

@d:\Install\WinXP\i386\winnt /s:d:\Install\WinXP\i386 /u:d:\Install\WinXP\winnt.sif

This starts install. Blue text-mode setup inspects computer and loads files. Then says starting to copy files, but does not and just hangs. Normally get the yellow progress bar, but does not appear here.

The PE way suggested has a switch for copysource, but does not work with winnt.exe, only winnt32.exe? And winnt32.exe will not run in DOS mode. Is there any such switch for winnt.exe? I can't find anything.

Oh, I am installing from a second hard-drive, not another partition on the same drive. Not sure if it matters.

Link to comment
Share on other sites

Hmm. Don't have a PC in front of me that I can test with, but here's what I would do to perfect the format / install script: if you have an install folder that you KNOW will be there, change the IF NOT EXIST D:\nul to IF NOT EXIST D:\INSTALL\nul - that "nul" trick may only apply to folders, not root directories.

Also, make sure your D: drive is set up as a FAT32, otherwise, DOS won't see it, and the script won't work.

Also, make sure you have the WINNT.SIF in the right folder - otherwise, you could run into install hangs. As soon as you see the first blue screen, pop out your floppy or CD, it should go auto from there.

Good luck, keep us posted,

JP

PS: I'm not a BartPE fan for basic installs, just because DOS is so much faster to load (from a boot CD), easier to make and use with a bootable CD image.

Link to comment
Share on other sites

  • 3 years later...

Hi all,

I am new here. I want to do the same as TS. It's because my cddrive isn't working anymore.

I have a Toshiba Portege A200 and also the image of its recovery dvd.

Here is the screen shot of the content of the image.

11l1r0z.jpg

My question is, how to install xp from HD using that image?

Note. It seems that it is impossible to use current cddrive. Replacing it is too costly. So, please don't advise me to boot from cd.

Edited by jarotbudhi
Link to comment
Share on other sites

A Guide For Installing From A Second HDD Or Partition

What You Need

1) BootPart - www.winimage.com/bootpart

2) BartPE - www.nu2.nu/pebuilder

3) rar.exe and default.sfx (copy it from winrar folder) or other command line compression utility

4) Sleep.exe

5) Choice.exe

6) bootcfg.exe

7) Patients and lots of it

Create a folder on your systemdrive eg: C:\Work

Create a partition of between 3Gb and 10GB format it Fat32 Or NTFS it doesn't matter

Extract Bootpart26 to C:\Work

Open a command prompt and change to C:\Work

Type Bootpart and press enter

Locate the partition you created and take note on the partition number it is

Type Bootpart <number> C:\Work\BootPE.BIN press enter

Extract BartPE or install it depending on which you downloaded

Start PEBuilder and follow the instructions for creating a PE Disc you don't need to create an iso or disc, you only need the contents of BartPE folder.

Open BartPE folder and rename i386 folder to minint

Now copy the entire contents of BartPE folder to the partition you created, there you have it a bootable partition that is the basis for a local install

Now create the following folders in the root of the partition you created "backup" "setups" and "setupfiles"

Create a folder called Applications and a folder called home or pro depending which version you have inside setups

Copy your XPCD Source to home or pro and move your $OEM$ folder INTO i386 and not parallel to it, this is very important or your custom files will NOT GET COPIED ACROSS

Get your Winnt.sif file and rename it OEMSetup.txt and move it to setupfiles

Move all of your applications from $oem$\$1\Apps or wherever you have them to <partition>\setups\applications (no need to copy them across to systemdrive)

Open <partition>\minint\system32 and copy sleep.exe, choice.exe default.sfx and rar.exe into it

Create a command Script Called Autorun1.cmd,

AutoRun1.cmd (this is mine, edit as you wish

Path=C:\
Silent=2
Overwrite=1
Title=Restoring Backup Files

warning.txt









###############################################################################
###############################################################################
## ##
## WARNING!!! ALL DATA WILL BE DESTROYED ##
## TO CANCEL OPERATIONS PRESS CTRL + C ##
## ##
###############################################################################
###############################################################################







<Name>.lst (edit to your own needs)


C:\Users\Lee\My Documents
C:\Users\Lee\Desktop
C:\Users\Lee\Local Settings\Application Data\Microsoft\Media Player
C:\Users\Lee\Phone Browser
C:\Users\Lee\Favorites

Now copy C:\Work\BootPE.BIN & bootcfg.exe (you need to get hold of pro version to get this) to <partition>\setups\home/pro\i386\$OEM$\$$\system32

Now in your cmdline.cmd file enter this code

::Edit Boot.ini To Add Recovery Option
ATTRIB -S -H %SYSTEMDRIVE%\BOOT.INI
ECHO %SYSTEMROOT%\SYSTEM32\BOOTPE.BIN="RECOVERY SYSTEM" /FASTDETECT >> %SYSTEMDRIVE%\BOOT.INI
ATTRIB +S +H %SYSTEMDRIVE%\BOOT.INI
ATTRIB +S +H %SYSTEMROOT%\SYSTEM32\BOOTPE.BIN
BOOTCFG /TIMEOUT 1[/codebox]

my cmdline.cmd
[codebox]@ECHO OFF
TITLE Setting RunOnceEX Values and Other Boot Options

SET AUTOLOGON="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
SET KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
SET APPDIR=X:\setup\Applications

::Install DNF Now
Start /wait .\DNF11_20.exe

::Add User Accounts
NET USER name password /add /fullname:"full name" /comment:"Owner and Administrator"
NET LOCALGROUP "Administrators" name /add
NET ACCOUNTS /maxpwage:unlimited

::Run DiskPart
DISKPART /S .\DiskPart.txt

::Add Registry Entries For Auto Logon
REG ADD %AUTOLOGON% /V "DefaultUserName" /d "name" /f
REG ADD %AUTOLOGON% /V "DefaultPassword" /d "password" /f
REG ADD %AUTOLOGON% /V "AutoAdminLogon" /d "1" /f

::Edit Boot.ini To Add Recovery Option
ATTRIB -S -H %SYSTEMDRIVE%\BOOT.INI
ECHO %SYSTEMROOT%\SYSTEM32\BOOTPE.BIN="RECOVERY SYSTEM" /FASTDETECT >> %SYSTEMDRIVE%\BOOT.INI
ATTRIB +S +H %SYSTEMDRIVE%\BOOT.INI
ATTRIB +S +H %SYSTEMROOT%\SYSTEM32\BOOTPE.BIN
BOOTCFG /TIMEOUT 1


FOR %%I IN (%systemdrive%\settings\*.reg) DO REG IMPORT %systemdrive%\settings\%%I
%systemdrive%\settings\disablesr.vbs

::Import RunOnceEX Registry Entries

REG ADD %KEY% /V TITLE /D "Installing Additional Applications" /f
REG ADD %KEY% /V FLAGS /D "dword:0x00000110" /f

REG ADD %KEY%\000 /VE /D "ATI Control Centre" /f
REG ADD %KEY%\000 /V 1 /D "%APPDIR%\aticc.exe" /f

REG ADD %KEY%\001 /VE /D "AMD Powernow" /f
REG ADD %KEY%\001 /V 1 /D "%APPDIR%\Powernow.exe" /f

REG ADD %KEY%\002 /VE /D "Internet Explorer 7.0" /f
REG ADD %KEY%\002 /V 1 /D "%APPDIR%\wga.exe" /f
REG ADD %KEY%\002 /V 2 /D "%APPDIR%\IE7.exe" /f
REG ADD %KEY%\002 /V 3 /D "REGEDIT /S %APPDIR%\IE7.reg" /f
REG ADD %KEY%\002 /V 4 /D "%APPDIR%\Flash.msi /passive" /f
REG ADD %KEY%\002 /V 5 /D "%APPDIR%\ShockWave.exe" /f
REG ADD %KEY%\002 /V 6 /D "%APPDIR%\Java.exe" /f
REG ADD %KEY%\002 /V 7 /D "%APPDIR%\silverlight.exe" /f
REG ADD %KEY%\002 /V 8 /D "REGEDIT /S %APPDIR%\pskill.reg" /f

REG ADD %KEY%\003 /VE /D "Avermedia Digital TV Tuner" /f
REG ADD %KEY%\003 /V 1 /D "%APPDIR%\TVTuner.exe" /f

REG ADD %KEY%\004 /VE /D "Windows Live Suite" /f
REG ADD %KEY%\004 /V 0 /D "%APPDIR%\Live_Photo_Image_Tool.exe /passive" /f
REG ADD %KEY%\004 /V 1 /D "%APPDIR%\Live_Photo_Database_Engine.msi /passive" /f
REG ADD %KEY%\004 /V 2 /D "%APPDIR%\Live_SignIn.msi /passive" /f
REG ADD %KEY%\004 /V 3 /D "%APPDIR%\Live_Writer.msi /passive" /f
REG ADD %KEY%\004 /V 4 /D "%APPDIR%\Live_Photo.msi /passive" /f
REG ADD %KEY%\004 /V 6 /D "%APPDIR%\live_messenger9.msi /passive" /f
REG ADD %KEY%\004 /V 5 /D "%APPDIR%\Live_Mail.msi /passive" /f
REG ADD %KEY%\004 /V 7 /D "%APPDIR%\SafetyScanner.exe" /f
REG ADD %KEY%\004 /V 8 /D "PSKILL -t msnmsgr.exe" /f
REG ADD %KEY%\004 /V 9 /D "REGEDIT /S %APPDIR%\Messenger9.reg" /f

REG ADD %KEY%\005 /VE /D "Nokia PC Suite" /f
REG ADD %KEY%\005 /V 1 /D "%APPDIR%\Nokia0.msi /passive" /f
REG ADD %KEY%\005 /V 2 /D "%APPDIR%\Nokia1.msi /passive" /f
REG ADD %KEY%\005 /V 3 /D "%APPDIR%\Nokia2.msi /passive" /f
REG ADD %KEY%\005 /V 4 /D "%APPDIR%\Nokia3.msi /passive" /f
REG ADD %KEY%\005 /V 5 /D "%APPDIR%\Nokia4.msi /passive" /f
REG ADD %KEY%\005 /V 9 /D "%APPDIR%\Nokia5.msi /passive" /f
REG ADD %KEY%\005 /V 7 /D "PSKILL -t LaunchApplication.exe" /f
REG ADD %KEY%\005 /V 8 /D "PSKILL -t MultimediaFactory.exe" /f

REG ADD %KEY%\006 /VE /D "Nero 6 Suite" /f
REG ADD %KEY%\006 /V 1 /D "regedit /s %APPDIR%\neroreg.reg" /f
REG ADD %KEY%\006 /V 2 /D "%APPDIR%\NBR.exe" /f
REG ADD %KEY%\006 /V 3 /D "%APPDIR%\NVE.exe" /f

REG ADD %KEY%\007 /VE /D "Media Player 11 + Codecs" /f
REG ADD %KEY%\007 /V 1 /D "%APPDIR%\WMP11.msi" /f
REG ADD %KEY%\007 /V 2 /D "%APPDIR%\Codecs.exe /S" /f
REG ADD %KEY%\007 /V 3 /D "Regedit.exe /s %APPDIR%\mediaplayer.reg /S" /f

REG ADD %KEY%\009 /VE /D "Microsoft Office 2003" /f
REG ADD %KEY%\009 /V 1 /D "%APPDIR%\Office2003.exe" /f

REG ADD %KEY%\010 /VE /D "Adobe Acrobat Reader" /f
REG ADD %KEY%\010 /V 1 /D "%APPDIR%\Acrobat.exe" /f

REG ADD %KEY%\013 /VE /D "Scintilla Text Editor" /f
REG ADD %KEY%\013 /V 1 /D "%APPDIR%\Scite.exe /silent" /f

REG ADD %KEY%\014 /VE /D "DVD Ripping Applications" /f
REG ADD %KEY%\014 /V 1 /D "%APPDIR%\DVDShrink.exe /silent" /f
REG ADD %KEY%\014 /V 2 /D "%APPDIR%\DVD_Decrypter.exe /S" /f

REG ADD %KEY%\015 /VE /D "Acer Launch Manager" /f
REG ADD %KEY%\015 /V 1 /D "%APPDIR%\LaunchMGR.exe" /f

REG ADD %KEY%\016 /VE /D "Western Digital Firewire Driver" /f
REG ADD %KEY%\016 /V 1 /D "%APPDIR%\WD_HID.msi /passive" /f

REG ADD %KEY%\018 /VE /D "WinRAR" /f
REG ADD %KEY%\018 /V 1 /D "%APPDIR%\WinRAR.exe /s" /f

REG ADD %KEY%\019 /VE /D "Recovery Options" /f
REG ADD %KEY%\019 /V 1 /D "%APPDIR%\OEM.exe" /f

REG ADD %KEY%\020 /VE /D "Restoring Backed Up User Files" /f
REG ADD %KEY%\020 /V 1 /D "%SYSTEMDRIVE%\Users\<Name>.exe" /f
REG ADD %KEY%\020 /V 2 /D "%SYSTEMDRIVE%\Settings\cleanup.cmd" /f

REG ADD %KEY%\022 /VE /D "Installing DNF 3.0SP1 & 3.5" /f
REG ADD %KEY%\022 /V 1 /D "%APPDIR%\DNF35.exe /passive /noreboot" /f
exit

Diskpart.txt (edit to your needs)

Rem Swapping drive leters
select disk 0 <----- make this your recovery drive <or>
select partition 1 <----- make this your recovery partition
assign letter x:
select partition 3
assign letter d:
exit

Now i think thats it, been a while since i did it

Edited by devil270975
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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