?
Solved

Automated Repartition for Hard Disk in Unattended installation

Posted on 2007-12-05
43
Medium Priority
?
2,399 Views
Last Modified: 2010-04-21
Hello All,

I made an unattended CD for my Windows XP setup. Everything I have is fine and the unattended installation works perfectly except for one thing, REPARTION OF THE HARD DISK. I have tried everything to automate the repartition but nothing seems to be working.

Basically, what I am trying to do is to delete all current Hard Disk portions and create two new portions; the C Drive should take 30 GB and the result of the Hard Disk should go the D Drive and format both portions with NTFS file system and then to launch the Windows Setup.

Please help,
Thanks,
0
Comment
Question by:EDSDSS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 21
  • 17
  • 5
43 Comments
 
LVL 32

Expert Comment

by:and235100
ID: 20410518
0
 

Author Comment

by:EDSDSS
ID: 20410582
and235100,
I tired to use diskpart, but I could not because it does not work in DOS.
Could you please explain me if it is possible how to use diskpart to delete the portions and then to create 30GB to C drive and the result to D Drive and format new portions with NTFS?
Thanks for your reply,
0
 
LVL 32

Expert Comment

by:and235100
ID: 20410583
Something like:

@echo off
diskpart clean all
diskpart create partition primary size=30720
diskpart active
diskpart create partition extended
diskpart create partition logical

Then you can proceed to format and run setup from there...

0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 32

Expert Comment

by:and235100
ID: 20410593
Diskpart is an XP/2000/2003 tool
But it does work in DOS as well: http://www.computerhope.com/diskpart.htm
0
 

Author Comment

by:EDSDSS
ID: 20410711
I got the following message when I try to run it from DOS bootable desk.
This program cannot be run in DOS mode.
I am able to run it form windows DOS only.
0
 
LVL 32

Expert Comment

by:and235100
ID: 20411328
No - you are correct.
Without the additional support - you would only be able to access fdisk...
0
 
LVL 2

Expert Comment

by:h11
ID: 20414914
add this to the top of your winnt.sif file found in the i386 directorty
note this will format hd automatically and all data that was present will be gone
[Data]
Autopartition = 1
MsDosInitiated = 0
UnattendedInstall = Yes
0
 

Author Comment

by:EDSDSS
ID: 20417523
Guys, thanks for your replies

I want to delete all current Hard Disk portions and create two new portions; the C Drive should take 30 GB and the result of the Hard Disk should go the D Drive and format both portions with NTFS file system and then to launch the Windows Setup.

If anyone have idea how to do that please help.
0
 
LVL 32

Expert Comment

by:and235100
ID: 20417929
You would have to create one partition (as per h11's instructions) then utilise a batch file after windows was setup (so diskpart functionality is available) to create an extended partition, and then the D: drive.

Unfortunately - Diskpart is really the only viable way of doing what you want.
0
 
LVL 2

Expert Comment

by:h11
ID: 20418164
you could create a dos boot disk run fdisk from a bat file with this command
FDISK 1/PRI:30000000 - Command line to create a 30 gig DOS primary partition on hard disk and then put in your  xp auto cd and then add this to the top of your winnt.sif file found in the i386 directorty
[Data]
Autopartition = 1
MsDosInitiated = 0
UnattendedInstall = Yes

note this will format hd automatically and all data that was present will be gone.  This will only format the primary partition which you just created.  It should leave the rest alone that you can later format and use. by using the suggestion given to you by 235100.  you can create  a bat file have this command run in a run once under the winnt.sif
@echo off
create partition extend
assign e:

0
 

Author Comment

by:EDSDSS
ID: 20423613
Guys, thanks again for your help,

I need to create and format both portions before starting windows setup because I want to install my documents and settings on D drive.

Any ideas to do that?

[data removed by Jason1178, CA]
0
 
LVL 2

Expert Comment

by:h11
ID: 20425895
do you want to do this during the installation? Or are you willing to do it first with a boot disk and then use your auto cd to do the rest?

if so you could create a dos boot disk run fdisk from a bat file with this command
FDISK 1/PRI:30000000 - Command line to create a 30 gig DOS primary partition
0
 

Author Comment

by:EDSDSS
ID: 20426309
h11,

I want to do the partition before starting the installation, and I want to format both partitions with NTFS then start the setup.

Is that possible?
0
 
LVL 2

Expert Comment

by:h11
ID: 20426329
So you could use a dos boot disk to create your partitions then use your cd to do the rest correct?  If that will work for you I will find out the commands you need to do for this. let me know
0
 

Author Comment

by:EDSDSS
ID: 20436118
H11,

If it possible to use one dos bootable disk to create the two partitions and format them with NTFS it will be fine with me. I can use the disk to format and then the CD to do the installation.

Thanks in advance.
0
 
LVL 2

Expert Comment

by:h11
ID: 20436576
EDSDSS:

you can create the two partitions with dos but not convert them to NTFS.  When you instll the xp it will automatically convert the first partition to NTFS and the second one can be converted to NTFS in a command on your auto cd install.  I will give you all the commands on Monday when I get back in the office.
0
 
LVL 2

Expert Comment

by:h11
ID: 20441213
is your hard disk a sata hd or a IDE HD?  If it is a sata fdisk will not work correctly. I found this article this will help you on getting your Autocd complete.

http://www.msfn.org/board/HOWTO-Unattended-CD-BartPE-t68252.html

Download link for the BARTpe
http://www.nu2.nu/pebuilder/
0
 

Author Comment

by:EDSDSS
ID: 20442595
h11,

Can you please explain to me step by step how to use this tool "BartPE" to do the partition and then to run the window setup. Because I am not able to understand it form the article. I think it is a tool for emergency.

Please note that I have some SATA HDD.

Thanks,
0
 
LVL 2

Expert Comment

by:h11
ID: 20444236
I will create a ISO image and  upload it to a web site wher you can get it.  Give me a day or so to do this.
0
 

Author Comment

by:EDSDSS
ID: 20448198
h11,

I will use this image which you will upload to automated the partition and formatting? then I have to remove this CD and use my automated CD to do the installation?

Thanks in advance.
0
 

Author Comment

by:EDSDSS
ID: 20464660
h11,

Are you still going to upload to me the ISO image?
0
 

Author Comment

by:EDSDSS
ID: 20464854
I am increasing the point value to 350.
0
 
LVL 2

Expert Comment

by:h11
ID: 20465037
I have ran into some problems with Bartpe and have had no time to work on this.  I will look at it this weekend and let you know of the status on Monday.
0
 

Author Comment

by:EDSDSS
ID: 20466685
all right h11, take your time, awiting you on next monday. Thanks
0
 
LVL 2

Expert Comment

by:h11
ID: 20481528
contact me at timothy.volk@gmail.com I will let you know where the image is.
0
 

Author Comment

by:EDSDSS
ID: 20483364
I send my email to you, awiting your response. Thanks
0
 

Author Comment

by:EDSDSS
ID: 20483535
h11,

thanks for the file, I am downloading it right now. I will let you know by tomorrow.

Please note that i have increased the point value to 500.
0
 
LVL 2

Expert Comment

by:h11
ID: 20485570
Change this in you winnt.sif file

;SetupMgrTag
[Data]
AutoPartition=1
MsDosInitiated="0"
UnattendedInstall="Yes"
[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
TargetPath=\WINDOWS
DisableDynamicUpdates=Yes
FileSystem=NTFS remove
WaitForReboot="No"
KeepPageFile=0
ResetSourcePath=C:\
UpdateInstalledDrivers=Yes
Repartition=no
PartitionType=Primary
FileSystem=NTFS remove
QuickFormat=Yes
ExtendOEMPartition=1 remove
UnattendSwitch=Yes
0
 

Author Comment

by:EDSDSS
ID: 20485766
h11, my winnt.sif file become like this, i have just removed the 3 lines which u ask me to remove. please confiurm. Thanks

;SetupMgrTag
[Data]
AutoPartition=1
MsDosInitiated="0"
UnattendedInstall="Yes"

[Unattended]
UnattendMode=FullUnattended
OemSkipEula=Yes
OemPreinstall=Yes
NoWaitAfterTextMode=1
NoWaitAfterGUIMode=1
TargetPath=\WINDOWS
DisableDynamicUpdates=Yes
WaitForReboot="No"
KeepPageFile=0
ResetSourcePath=C:\
UpdateInstalledDrivers=Yes
Repartition=No
PartitionType=Primary
QuickFormat=Yes
UnattendSwitch=Yes
0
 
LVL 2

Expert Comment

by:h11
ID: 20486759
remove also

PartitionType=Primary
QuickFormat=Yes
let me know how it goes
0
 

Author Comment

by:EDSDSS
ID: 20497690
h11, i got the following error when i try to boot from it.
stop: c0000221 unknkown hard error
\systemroot\system32\ntdll.dll

any idea?
0
 
LVL 2

Expert Comment

by:h11
ID: 20498442
Explain to me what you have done up to now.
0
 

Author Comment

by:EDSDSS
ID: 20500978
h11,
I was not able to boot from your image due to the above error, so I tired to create my own image using BartPE and it works. I copy your files from your image to my. but I am only able to format the current partition. I can't delete the current partitions or create new.

I want this image to delete all current partitions and then create two partitions 30 GB to C drive and the result goes to the D drive and format both partitions with NTFS.

Is that possible h11?

Thanks for your great help.
0
 
LVL 2

Accepted Solution

by:
h11 earned 2000 total points
ID: 20501838
create two files one called Autorun1.cmd and the other called partion.txt  save these files inside your Bartpe project under the I368\system32 directory. then create your iso image.

autorun1.cmd

NET START DMADMIN

DISKPART /s partinfo.txt
FORMAT c: /fs:ntfs /Q /V:Local /Y
FORMAT D: /fs:ntfs /Q /V:Local /Y

pause

partion.txt

SELECT DISK 0
CLEAN
CREATE PARTITION PRIMARY size=30096
ASSIGN
ACTIVE
CREATE PARTITION EXTENDED
CREATE PARTITION LOGICAL
ASSIGN
EXIT


0
 
LVL 2

Expert Comment

by:h11
ID: 20502097
correction save the second file as partinfo.txt
0
 

Author Comment

by:EDSDSS
ID: 20502915
h11, i got the following dos messege when i start bartPE,

the logical disk manager administrative service service was started successfually.
x:\i386\system32>DISKPART /s partinfo.txt
Microsoft DiskPart version 5.1.3565
Copyright <c> 1999-2003 Microsoft Corporation.
On computer: MININT-JVC
Disk 0 is now the selected disk.
DiskPart was suceeded in cleaning the disk.
DiskPart was unable to create the specified partition.
x:\i386\system32>format C: /fs:ntfs /Q /V:local /Y
spefified drive does not exisit.
x:\i386\system32>format D: /fs:ntfs /Q /V:local /Y
spefified drive does not exisit.
x:\i386\system32>pause
Press any key to continue....

it just deleted the partitions and did not create any partitions or do the formatting.

Please advice.

0
 
LVL 2

Expert Comment

by:h11
ID: 20505202
what size is the hard disk?
0
 

Author Comment

by:EDSDSS
ID: 20508837
h11,
It was 160GB Sata,

I tired with 60GB IDE and it work fine. I will do more testes and I will let you know.

Thanks for your greate help.
0
 
LVL 2

Expert Comment

by:h11
ID: 20509094
I have done tihs on sata drives when i was testing it and had no problem.
0
 

Author Comment

by:EDSDSS
ID: 20525863
Dear H11,

Thanks for you great help. I have done my tests and it works fine.

Thanks
0
 

Author Closing Comment

by:EDSDSS
ID: 31412818
Thank you very much h11 for your help.
0
 

Author Comment

by:EDSDSS
ID: 20525876
I used BartPE to automate the repartitions part than for unattended XP setup I use my CD. I merge the two CD using EasyBoot.
0
 
LVL 2

Expert Comment

by:h11
ID: 20527485
EDSDSS

I am no longer using cds I am using a usb pen to do all of this it loads bartpe, partitions the drives and starts the windows xp setup.  I am no longer blocked by the limits on a cd..  
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question