Jump to content

Creating 2 or more partitions


Recommended Posts

Hi All

Is it possible to create 2 more partitions using Unattend? eg. For my users I like to create 10GB partion and the 2nd partition takes up the rest of the drive (whatever it might be).

URGENT!!!

Link to comment
Share on other sites


How To Use XP's DiskPart Commands

http://www.wintrouble.net/discus/messages/53/5083.html

The command-line DISKPART utility in Windows

http://searchwin2000.techtarget.com/tip/1,289483,sid1_gci953071,00.html?FromTaxonomy=%2Fpr%2F5e3

You'll need to register with the website (free) in order to access the second article.

Here is the MS website link to diskpart:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/diskpart.mspx

Hope its of use. :)

Link to comment
Share on other sites

Actually, the best way to do it is to have a batch file auto-format your HD, then reboot, then start the install process. Can you do this on a read-only CD? Yes!

This assumes your hard disk is either a) empty or :) only has one partition on it from a previous install. Here's the logic tree:

Test 1: Is drive empty?

This test uses AEFDisk's ALLSIZE (HD capacity) compared to FREESIZE (unallocated space) - if they are identical, the drive is empty.

If Yes - GOTO format subroutine, create a C: and D: drive, auto-reboot

If No - Check for Drive D: existence

Test 2: Does D: exist?

Again, this script assumes that your existing drives do not have a D: partition - only THIS script creates that, so if it's there, we know the HD is ready to install on.

If Yes - drive has been formatted using AEFDISK, so goto install script

If No - pre-existing C: drive exists, GOTO DeleteALL and remove all partitions, then goto formatCD and format C: and D: drives, and reboot.

So, here's the code:

@echo off

GOTO IsHDempty

:IsHDempty

@AEFDisk 1 /FREESIZE

@AEFDisk 1 /ALLSIZE

IF "%freesize%"=="%allsize%" GOTO formatCD

GOTO CheckForD

:CheckForD

IF EXISTS d:\nul GOTO install

GOTO deleteALL

:deleteALL

@AEFDisk 1 /DELALL

GOTO formatCD

:formatCD

(however you wish to define csize goes here, or you can hard code 10240 below in place of %csize% - I use INPUT.COM to type it in on the fly [do a search here for my previous article on it])

@AEFDisk 1 /PRI:%csize%:0B

@AEFDisk 1 /FREESIZE

@AEFDisk 1 /EXT:%freesize% /LOG:%freesize%:0B

@AEFDisk 1 /formatfat:1:Hard_Disk_C

@AEFDisk 1 /formatfat:5:Hard_Disk_D /reboot

:install

ECHO.

ECHO Creating Install Folder and copying from source ...

ECHO.

IF NOT EXISTS d:\XP\nul (MD d:\XP)

xcopy (path to winxp CD)\*.* d:\XP\*.* /e

ECHO.

ECHO Starting Windows Install ...

ECHO.

d:\XP\i386\winnt /s:d:\XP\i386 /u:d:\XP\i386\winnt.sif

This assumes you start out in DOS using a simple Win98 boot floppy image on your CD instead of WinPE or the Windows Boot Disk images. Works like a champ, plus is fast and simple.

One of the problems with copying subdirectories in DOS is you can't go beyond 8 levels deep in folders. The solution I found is to put your XP install folder into a RAR file, then extract all files from CD to the new D: drive using RAR32 for DOS. That's what I do and it's a proven solution.

JP

Link to comment
Share on other sites

who uses boot floppies?

not me that's for sure - id rather not make seperate partitions then have to use boot floppies -

a) i dont even have a floppy drive anymore

:) floppy disks are unreliable

c) makes it a pain to install with an added media type

Link to comment
Share on other sites

I deploy my Windows install through a network with a winbom.ini file

I have a customer that wants a 30 Gig partition on his drives and the rest just formatted.

In my winbom.ini file I have the following code

[DiskConfig]

Disk1 = Drive0.Config

[Drive0.Config]

WipeDisk = Yes

Size1 = 30000 <---you can change this to whatever size in Megs

FileSystem1 = NTFS

SetActive1 = Yes

PartitionType1 = Primary

Size2 = *

PartitionType2 = Extended

Size3 = *

PArtitionType3 = Logical

QuickFormat1 = Yes

QuickFormat3 = Yes

with the above example, you will get a primary partition of 30Gig and whateve ris left as a secondary partition both formatted to NTFS. Again, I have this in my winbom.ini file and not the unattened file that you are probably using?

Link to comment
Share on other sites

@db2k...

OK, perhaps you missed one of the last lines in the post...

This assumes you start out in DOS using a simple Win98 boot floppy image on your CD instead of WinPE or the Windows Boot Disk images.

I am referring to a CD-based solution, using a DOS floppy image. Sorry you didn't catch that one. :)

JP

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