Jump to content

unattend diskpart


Recommended Posts


No it is not impossible, I do it all the time. Use diskpart.exe, create a text file, eg: diskpart.txt, that looks something like this:

select disk 0

create partition primary size=6144

select partition 2

assign letter d

select disk 0

create partition primary

select partition 3

assign letter e

This will create a 6 GB D:\ drive and assign the rest of the free space on the disk to an E:\ drive.

Run diskpart.exe from wherever you want with this syntax, diskpart.exe /s <path>\diskpart.txt

Good luck.

Link to comment
Share on other sites

@tguy

Nice input, but can i not be able to use diskpart.txt to partition target partitions before Windows XP Setup puts its hand on the HDD? What you wrote in diskpart.txt and what you suggest for running diskpart.exe means that we can only use it after XP does install of itself. If i use a partition other than the system partition for installing Programs then its always better to partition the disk before installation of OS. Can it not be achieved?

Link to comment
Share on other sites

If you really want to do it before windows sees the drive, your best bet is a bootable floppy image on the cd with dos and Ranish Partition Manager (or some other tool of your choice) on a multiboot cd.. Or a seperate cd.

Tell you the truth, wjhy do you want to set up all the partitions besides the bootable one before setup? Windows will isntall to the partition you choose and then change the letters of the drives (if this is what you are trying to do) after you first boot in to windows.

Link to comment
Share on other sites

The only way i have seen this be done is with a dos tool prior to the unattended install, we are doing this at work for the reason of changing the path for "documents and settings" to go on drive D:

This way only have OS and Programs on the C: drive.. This is perfect for ghosting and backup's, as for recovery we only ghost partition for C: drive and backup's are only done for D: in case where needed (e.g.: profile backup)

rgds

JV.

Link to comment
Share on other sites

ok i thought this was not possible.

pls more explaination

Like Astalavista said.. Yes it can be done.. With a little more work.. To stat with you need a cd boot loader instead of jsut the "Windows Setup" cd boot loader..

Check out cdshell

Plus, make a disk image (with winimage if you want) of a bootable dos floppy with your choice of dos based partitioning software like Ranish Partition Manager..

Next, using info from above site, make a cdshell script for the boot loader and build the cd as also described in the above site (yes, I know, a lot of reading, but worth it).

So, after this cd is constructed you can boot the floppy image off of the cd in emulation mode and run the dos based program to setup partitions and then reboot. Next, from the same cd, start windows setup this time with all your partitions already setup and pick the one in setup you normally would.

Link to comment
Share on other sites

One way to achive this is using a WinPE like Bart's PE (which is free!!) and integrating the unattended folder into the whole thing. It does take some extra work and that's why I decided for the one I built for a frined to just send along a copy of ERD Commander 2005. That boots first into WinXP-like environment and and has a good disk manager there. Then you can reboot and put in the unattended and away you go!

If you build a CD/DVD with a boot manager, then you could put them both onto the same disk, as mentioned. If you are working with a single target machine, then ok, but it seems a lot of work and it would only be good on that machine. You'd have to write a new script for a different machine with a different number of partitions, etc.

Link to comment
Share on other sites

@Astalavista

Not a whole lot of work.. If you only want the two options in the boot loader it is not much more then remaking a 2000/XP/2003 bootable setup cd. Infact, after I setup the files as needed, I used cdimage.exe to make the ISO image. I cant legally help with the floppy image by making one for you and sending it you, buy maybe... Maybe, I could try my had cdshell again.. I actually liked its dredecessor (BootScriptor) much more and have yet to switch (even though I have been toying with cdshell and trying it out). Maybe, if all you want is the 2 options I could copy paste a cdshell script here if I get time in the next couple weeks, or someone with a little more experience with it could doctor a short one up for you.

One way to achive this is using a WinPE like Bart's PE (which is free!!) and integrating the unattended folder into the whole thing. It does take some extra work and that's why I decided  for the one I built for a frined to just send along a copy of ERD Commander 2005. That boots first into WinXP-like environment and and has a good disk manager there. Then you can reboot and put in the unattended and away you go!

If you build a CD/DVD with a boot manager, then you could put them both onto the same disk, as mentioned. If you are working with a single target machine, then ok, but it seems a lot of work and it would only be good on that machine. You'd have to write a new script for a different machine with a different number of partitions, etc.

but ERD Commander 2005 is a commercial product. Even BartPE is anice option, but a DOS 1.44 floppy image with a partition program on a cd boots a whole lot quicker.

Link to comment
Share on other sites

bilemke

Correct me, if I'm wrong. What you're talking here is multiboot in

a. Windows Setup

b. Partitioning tool

First you boot into the partitioning tool, do whatever partitioning/formatting you need, then reboot and boot into Windows Setup.

There's nothing new here, unless you completely automate the process and partition the drive with some predefined paramaters (i.e. 20 gb primary partition + an extended partition for the rest of the space).

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