Create a Format Hard Drive Job

dfussell's picture

 

I am trying to create a Job that will format the hard drive before deploying a image as well as a job to just format the hard drive. I have tried with little success. For some reason it keeps prompting me to login to the express share. I can use Dos or WinPE as my PXE environment. Any help is much appreciated.
spazzzen's picture

Why format?

Why are you trying to format prior to imaging?  I tried to find a way to do this when I was trying to get a scripted OS install for xp 64, with no luck.  My suggestion if you must format it before imaging, is to just push a blank image.  If you are trying to remove an OEM partition, then on the distribute disk image job modify the task, and click advanced next to the automation selection, select the additional options tab and make sure "Delete the client's OEM partion" is selected. 

 

As for a blank image, if you can slave a drive on a different computer, just format it in windows and then image the drive.

dfussell's picture

Thanks!!   Why are you trying

Thanks!!

 

Why are you trying to format prior to imaging?  I tried to find a way to do this when I was trying to get a scripted OS install for xp 64, with no luck.  My suggestion if you must format it before imaging, is to just push a blank image.  If you are trying to remove an OEM partition, then on the distribute disk image job modify the task, and click advanced next to the automation selection, select the additional options tab and make sure "Delete the client's OEM partion" is selected. 

 

As for a blank image, if you can slave a drive on a different computer, just format it in windows and then image the drive.

shansen's picture

May I suggest our DOS images?

I think you might want to try to put the DOS image that we ship with DS down to the HD first.  That in effect turns your HD into a small footprint DOS machine.  Then when you put your real image down, it just thinks it is wiping out DOS and usually doesn't have any problem with that.

I believe the task is asking for you to log into the F: drive because you either did not include the credentials in your PXE setup, or you don't have permissions to run the job as the logged in user of the console.

Shansen

Swami's picture

Try with Live CD

If your primary intension is to format the HDD, they you may try Knoppix Live CD for Partitioning / Reformat the HDD.

Or you may use Win95/98 Boot disks - they can format in  FAT32 as well as NTFS.

Hope this helps you.

Swami

dfussell's picture

I think you might want to try

I think you might want to try to put the DOS image that we ship with DS down to the HD first.  That in effect turns your HD into a small footprint DOS machine.  Then when you put your real image down, it just thinks it is wiping out DOS and usually doesn't have any problem with that.

I believe the task is asking for you to log into the F: drive because you either did not include the credentials in your PXE setup, or you don't have permissions to run the job as the logged in user of the console.

Scott Hansen

I have SATA drives in all of my computers. So i wll need to do this in WINPE. I just ran into an issue with imaging and support thinks formatting the drive will help. I ahd to search down the disk that came with my dell 755 optiplex and and am now formatting it. I would like an easier way to do this.

Brandon's picture

insert topic here-this is as bad as altiris forums version field

From my experience there were two isses when doing the mappings.

1) With all the OEM crap, the F drive was already being used. One option for this is to map to Y: with your boot disks instead then change your jobs from referencing F: to %ALTIRIS_SHARE% . There is an AKB article on this if you search.

2) I had random authentication errors with PXE when I built the boot disks with a domain account. loginw.exe didn't seem to authenticate properly most of the time. Per another user's solution, I created a local admin on the DS server then used that account to do the authentication in PXE. This works everytime.

 Once you get the mapping to work you can decide if you want to lay down a blank ntfs.img over 100% of the drive or whether you just want to use a built-in utility of WinPE such as diskpart.exe .

Nelo's picture

RE: Create a Format Hard Drive Job

 

The following script will clean the current partitioning, then it will reacreate the partition, assign the drive letter c: and finally format the drive. So create a job with a Run Script task and make sure it runs in automation WinPE:

REM Create diskpart script file
echo sel disk 0 > .\temp\diskpart%ID%.txt
echo clean >> .\temp\diskpart%ID%.txt
echo create partition primary >> .\temp\diskpart%ID%.txt
echo sel par 1 >> .\temp\diskpart%ID%.txt
echo active >> .\temp\diskpart%ID%.txt
echo assign letter=C >> .\temp\diskpart%ID%.txt

REM Execute diskpart command
diskpart /s  .\temp\diskpart%ID%.txt

REM Format drive
echo y|format c: /fs:ntfs /q /x

 

 

viddect's picture

Use Wipe

Use wipe to kill anything on the drive. It is in the \\server\eXpress\TechSup\dos\wipe.exe ( it is in each pre boot OS )

You can use the same commands you do for rdeploy. It is built with the same code. You can use the same switches with it like -d1 or -p1 for disk or partition.

Linux Man
Viddect

dfussell's picture

OK

I will give Wipe a try

profman's picture

When all else fails...

 Run a .bat file that speicifies the partition to format in the command line. If you are using embedded automation, then yoiu will need to format whatever partition in windows -1. For example, Altiris is 0, OS is 1, etc...

Also, DOS and WinPE have their issues, so if you know any basic PERL, it is a very simple script to do this in Linux.

colliganml's picture

Anyone have a script to run Wipe.exe with the Linux automation

Anyone have a script to run Wipe.exe with the Linux automation?

bhawver's picture

Linux Wipe

This is the line I place in my wipe script:

./mnt/ds/techsup/linux/wipe -p00 -dod 

profman's picture

Variables?

What do the hooks mean? 

bhawver's picture

Variables...

Profman, I assume you are asking what the switches are for the wipe command.  If so, here is the syntax:

wipe: wipe [-dN] [-pXX...] [-s] [-dod]
-dN wipe disk N (1-based, default=1)
-pXX... hex pattern, 1 or more bytes (default=00)
-s stamp drive with MBR showing not bootable when done
-dod write a pattern, its inverse, then random bytes
-quick wipe only the first and last track of the specified disk

profman's picture

Thanks

Exactly! Thanks so much. I was curious since as Windex guy, I get a lot more Windows than Linux.....and this is so sad. 

trb48's picture

 Here is the job that I

 Here is the job that I created in Deployment console:

diskpart /s "F:\TechSup\Windows\wipe.txt"

F:\TechSup\Windows\Wipe.exe -d1 -dod


I make sure that it runs in my WinPE "Automation pre-boot environment"

As you can see, I added a file called "wipe.txt" to my eXpress share (Program Files\Altiris\eXpress\Deployment Server\TechSup\Windows\ folder to be exact)

Here is the contents of that folder:

select disk 0
select partition 1
delete partition
select partition 2
delete partition
EXIT

After you have everything in place you can run it on a computer. The first line deletes all of the partitions on the computer (I have two that is why I have two being deleted). The second line runs the wipe command. After everything is said and done the drive gets wiped according to department of defense standards. Sometimes I have an image job that runs right after the wipe (sometimes not, depends on what I am trying to accomplish).