Jump to content

Installing Windows from HDD


Recommended Posts

I need to do some extensive testing connected with slipstreaming on a real hardware and I've become sick and tired of using a USB flash disk each time to install the system simply because it's just too slow and requires preparing the drive again and again each time when the source has been altered. The installation itself is fast but preparing the drive (=copying 6000 of system files on it) takes too much time. I know that there are ways to install using the ISO image but I wanted to try installing the system directly from HDD without using any other devices.It had been a long time since I used DOS to start Windows setup so I had to search for and read some information about it, try it, fix errors, try again, fix errors again, etc.

This is what I've managed to accomplish so far:

  1. I created a 4GB FAT32 partition on a separate HDD.
  2. Using HP USB Disk Storage Format Tool and MS-DOS files I prepared a DOS bootable Flash Drive with the following files:
    COMMAND.COM
    FORMAT.COM
    IO.SYS
    MSDOS.SYS


  3. I booted from it and used FORMAT.COM to format the 4GB FAT32 partition (D:) in order to make it bootable:
    format d: /q /s


  4. After booting back to Windows I copied the I386 folder to the 4GB partition. I also added SMARTDRV.EXE, HIMEM.SYS and CONFIG.SYS with the appropriate settings:
    device=HIMEM.SYS /testmem:off


  5. I created AUTOEXEC.BAT with the following lines:
    SMARTDRV.EXE
    C:\I386\WINNT.EXE /S:C:\I386 /U:C:\I386\WINNT.SIF


    The WINNT.SIF was of course prepared in advance.

  6. In the end the partition contained the following files and folders:
    I386
    SMARTDRV.EXE
    COMMAND.COM
    AUTOEXEC.BAT
    CONFIG.SYS
    HIMEM.SYS
    IO.SYS
    MSDOS.SYS


  7. I booted to the partition and the system setup was started automatically. Just in case I disabled / disconnected all other HDDs. When selecting the partition (I wanted to install the system on the same 4GB one) I could choose whether to convert it to NTFS or not.
  8. The setup continued normally. After everything finished I could remove the I386 folder as it was not required any more.

That's basically everything I did. In the beginning it didn't work so smoothly but after trial & error testing it seems to work fine. There are some things to be careful about like filenames which don't follow the 8.3 name format as the DOS based part of the installer won't be able to copy them. Overall the installation itself is pretty fast and you don't need to use any other devices after the HDD is made bootable (step 3).

What I'd like to ask is whether this method could be improved. I'd especially like to make a bootable DOS partition without having to use a USB flash disk (step 2 & 3). In other words, is there any simple way to use the DOS' format.com under Windows or maybe are there any alternative tools to use instead of it?

Edited by tomasz86
Link to comment
Share on other sites


What I'd like to ask is whether this method could be improved. I'd especially like to make a bootable DOS partition without having to use a USB flash disk (step 2 & 3). In other words, is there any simple way to use the DOS' format.com under Windows or maybe are there any alternative tools to use instead of it?

See if you can find anythng of use here:

http://www.911cd.net/forums//index.php?showtopic=16713

If you mean "directly" preparing the target disk from a booted Windows machine, sure what is the problem?

Just partition/format "normally", then run MBRFIX to change the bootsector of the active parittion to the one invoking the DOS IO.SYS:

http://www.sysint.no/nedlasting/mbrfix.htm

Remember that for DOS 6.22 and earlier you will need to have IO.SYS as the FIRST file in the filesystem (i.e. copy to the newly formatted volume IO.SYS, MS-DOS.SYS and COMMAND.COM in this order).

On the other hand, you could make a "ready to boot" install disk, using the appropriate WINNT32 switches, like /syspart:C: /tempdrive:C: /makelocalsource /noreboot.

http://technet.microsoft.com/en-us/library/cc940493.aspx

jaclaz

Link to comment
Share on other sites

Trying to use WINNT32.EXE was the first thing I did but it doesn't work here. I don't know the reason but trying to run it (with any switch) results in:

rqkNt.png

I've got a problem when trying to use mbrfix.exe. I tried to change the bootsector using:

mbrfix /drive 0 /partition 1 fixbootsector win98

and while everything seems to work OK initially, after reboot it's still the NT 5.x MBR. Moreover, after creating a primary partition using Device Manager and formatting it to FAT32 when trying to use:

mbrfix volumeinformation g:

I get this:

LnpJU.png

Strangely enough the command works for the other drives but fails on this one.

Edited by tomasz86
Link to comment
Share on other sites

You maust have either some missing file or anyway something setup incorrectly.

WINNT32 has worked on *any* machine, with*any* NT OS since the dawn of time.

About MBRFIX it looks more like you have something preventing direct disk access (or the like).

For the MBRFIX besides finding the actual issue, there are workarounds, one is to leave the normal bootsector invoking NTLDR "as is", add a line to BOOT:INI pointing to grub4dos and add grldr to the root, then use grldr to load the IO.SYS:

For WINNT32, try running it as follows /(we are talking of 2K, right?), this will install the Recovery COnsole:

Winnt32.exe /cmdcons

If it works, then try with:

Winnt32.exe /checkupgradeonly

Them try runnign it with the usual tools, procmon, regmon. filemon, etc., try tracing it with deppends.exe, etc.

Or, even more simply, since you are testing new 2k installs, make a new 2K install and try running wiint32 from this install.

jaclaz

Link to comment
Share on other sites

I've found out what was blocking the WINNT32.EXE. I had "HKLM\SYSTEM\CurrentControlSet\Control\ProductOptions" denied from access (in order to install Avast in a Server system :sneaky:) and WINNT32.EXE couldn't determine what version of Windows 2000 it was.

Now I should be able to just use it directly to set up a bootable HDD partition, right? I hope this will work:

winnt32 /tempdrive:G /unattend:WINNT.SIF /syspart:G /makelocalsource /noreboot

Edit: I'm still wondering what is the problem with mbrfix.exe. The other RAID partition connected to the same controller is accessible, only this one (G:) not.

By the way, just a kind of related question. After running the command mentioned above the following structure has been created on G:

$LDR$
$WIN_NT$.~BT
$WIN_NT$.~LS
BOOT.INI
ntdetect.com
ntldr
txtsetup.sif

Could this be copied to and used on another partition directly after formatting it under Windows NT with format.com? Do you still need to set up the MBR separately?

Edit Fixed the structure (added BOOT.INI).

Edited by tomasz86
Link to comment
Share on other sites

The MBR is "suggested" to be an NT5-type. NT FORMAT will correctly create the PBR for the partition. It needs to be "active". Copy said files/folders and away you go.

Prepping a HDD with correct MBR/PBR, setting Active, running WINNT32, then "cloning" is a fast method. This has been my experience.

edit: Ensure that the C-drive is the one "pointed to" in the Setup files. I also see no "BOOT.INI"...

Edited by submix8c
Link to comment
Share on other sites

Could this be copied to and used on another partition directly after formatting it under Windows NT with format.com? Do you still need to set up the MBR separately?

Yes.

My memory is obviously fading, but apart from the BOOT.INI submix8c pointed out, but it is possible that the actual loader used in this stage is not NTLDR (in the sense of the "real" NTLDR but a SETUPLDR.BIN renamed), I seem to remember that a \I386 is created.

If not, a good idea, expecially if you are going to image the disk and re-use it, it would be to copy anyway the whole \I386 to the disk.

jaclaz

Link to comment
Share on other sites

BOOT.INI is of course there (my mistake for running dir/b without the /a switch which resulted in omitting the hidden files).

It is a real NTLDR ;) but is copying the whole I386 folder required? I'm using the "/makelocalsource" switch which is supposed to:

Instructs Setup to copy all installation source files to your local hard disk. Use /makelocalsource when installing from a CD to provide installation files when the CD is not available later in the installation.

By the way, I've got a problem with the "/noreboot" switch. Even though I added it to the command, it still wanted to restart the machine after copying the files :blink:

Link to comment
Share on other sites

"Makelocalsource" only does it temporarily in (one of) the $-folders. I usually create a folder, put the I386 folder and the required ROOT files into it, then run the WINNT32 against it. Again, ensure that the drive specs are C-Drive. I create mine from a LiveXP, making it "X-drive" and the single installed (or others as "not installed" in BIOS) HDD+CreatedPartition (being C-drive at that point), and do the base-copying of Install via Network (or on the LiveXP).

Link to comment
Share on other sites

It is a real NTLDR ;) but is copying the whole I386 folder required?

Yes/no.

Whatever is in folders with a tilde in the name won't be there anymore after the install is finished, so if you want to (say) later add an optional component you have not the source anymore.

If I recall correctly the /noreboot means that it won't automalically reboot but instead will ask you to reboot (of course if you answer "yes" it is pointless ;)).

jaclaz

Link to comment
Share on other sites

Thank you for all the information :)

Again, ensure that the drive specs are C-Drive. I create mine from a LiveXP, making it "X-drive" and the single installed (or others as "not installed" in BIOS) HDD+CreatedPartition (being C-drive at that point), and do the base-copying of Install via Network (or on the LiveXP).

That's why (originally) I wanted to have both the I386 folder and the system installed on the same partition when the setup was started from DOS because if the I386 had been on a different one than at the end the system drive would have had a different letter than "C" assigned (and I wanted it to be "C"). I hope there won't be any problems now when WINNT32.EXE is used to prepare the partition.

Whatever is in folders with a tilde in the name won't be there anymore after the install is finished, so if you want to (say) later add an optional component you have not the source anymore.

I don't really intend to use such a setup on a different computer (my question was asked just out of curiosity). I'm going to use this installation method on my desktop to test different things. It's the fastest installation method I've tried here. Of course when deploying the system on a different computer it might be useful to have a copy of the I386 folder there.

Now I'm experiencing a different problem related to the unattended file. I still need to do some tests to be 100% sure but even though I used

/unattend:WINNT.SIF

the setup seems to use the default UNATTEND.TXT :huh:

Link to comment
Share on other sites

Now I'm experiencing a different problem related to the unattended file. I still need to do some tests to be 100% sure but even though I used

/unattend:WINNT.SIF

the setup seems to use the default UNATTEND.TXT :huh:

Try with a "fully qualified" path and try adding a debug4 directive:

http://www.911cd.net/forums//index.php?showtopic=9435

jaclaz

Link to comment
Share on other sites

I've found the culprit. WINNT.SIF was actually copied correctly. The problem is very different here. Having the "[unattended]" section leads to an unattended text part of the Windows setup. What I mean is that

just adding [unattended] (it can be empty) to WINNT.SIF will lead to an automated text part of the installation :w00t:

The EULA will be skipped and the partition will be selected automatically. What's more, even settings like AutoPartition="0" under [Data] or Repartition="No" under [unattended] don't make any difference. The same thing applies to the DOS based installation. I don't know wherther it's Win2k specific or happens in XP/2003 as well.

Edit: I've removed the "DOS" part from the topic's title since it's no longer relevant as we've been discussing both WINNT.EXE and WINNT32.EXE based methods of installation.

Edited by tomasz86
Link to comment
Share on other sites

One more important thing to note about the "[unattended]" problem. Make sure that your original WINNT.SIF doesn't contain this part:

[Data]
UnattendedInstall="Yes"

because after using WINNT32.EXE it will be converted to

[unattended]
unused=unused

therefore resulting in an unattended text part of the installation.

By the way,

If I recall correctly the /noreboot means that it won't automalically reboot but instead will ask you to reboot (of course if you answer "yes" it is pointless ;))

I've just tested it. It's different :whistle: When the /noreboot switch is used this screen still appears:

7Vf4Z.png

but nothing happens after the counting has finished. It just disappears :)

Edit: One more very important information. When the setup is started using a CD or any other external device and you haven't integrated mass storage drivers for your controller then the setup will simply not detect any drives. In case the setup is started from the disk itself you MUST integrate the mass storage drivers because otherwise loading during the text setup drivers will result in a BSOD. Also if it's Win2k and a disk larger than 137 GB then you also MUST enable the 48-bit LBA to prevent the crash.

Edited by tomasz86
Link to comment
Share on other sites

One more important thing to note about the "[unattended]" problem. Make sure that your original WINNT.SIF doesn't contain this part:

[Data]
UnattendedInstall="Yes"

because after using WINNT32.EXE it will be converted to

[unattended]
unused=unused

therefore resulting in an unattended text part of the installation.

I was wrong here. It's not about converting the former entry into the latter one. The latter seems to be ALWAYS created regardless of the original WINNT.SIF file. This means that in order to be able to select a partition it's necessary to manually edit the WINNT.SIF file located in the $WIN_NT$.~BT folder and remove the "[unattended]" section.

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