Deployment Solution

 View Only
Expand all | Collapse all

Create a Format Hard Drive Job

Migration User

Migration UserMar 23, 2009 11:54 AM

Migration User

Migration UserJul 14, 2009 06:38 PM

  • 1.  Create a Format Hard Drive Job

    Posted Mar 03, 2009 01:21 PM

     

    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.


  • 2.  RE: Create a Format Hard Drive Job

    Posted Mar 03, 2009 01:29 PM

    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.



  • 3.  RE: Create a Format Hard Drive Job

    Posted Mar 03, 2009 03:20 PM

    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.



  • 4.  RE: Create a Format Hard Drive Job

    Posted Mar 03, 2009 06:44 PM

    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.



  • 5.  RE: Create a Format Hard Drive Job

    Posted Mar 04, 2009 04:30 AM

    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.

    Swami



  • 6.  RE: Create a Format Hard Drive Job

    Posted Mar 10, 2009 11:54 AM

    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.



  • 7.  RE: Create a Format Hard Drive Job

    Posted Mar 10, 2009 12:30 PM

    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 .



  • 8.  RE: Create a Format Hard Drive Job

    Posted Mar 10, 2009 01:52 PM

     

    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

     

     



  • 9.  RE: Create a Format Hard Drive Job

    Posted Mar 11, 2009 12:29 PM

    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.



  • 10.  RE: Create a Format Hard Drive Job

    Posted Mar 23, 2009 11:54 AM
    I will give Wipe a try


  • 11.  RE: Create a Format Hard Drive Job

    Posted Mar 24, 2009 10:16 AM
     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.


  • 12.  RE: Create a Format Hard Drive Job

    Posted May 04, 2009 10:54 AM
    Anyone have a script to run Wipe.exe with the Linux automation?


  • 13.  RE: Create a Format Hard Drive Job

    Posted May 04, 2009 11:10 AM
    This is the line I place in my wipe script:

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


  • 14.  RE: Create a Format Hard Drive Job

    Posted Jul 14, 2009 06:38 PM
    What do the hooks mean? 


  • 15.  RE: Create a Format Hard Drive Job

    Posted Jul 15, 2009 08:36 AM
    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



  • 16.  RE: Create a Format Hard Drive Job

    Posted Jul 15, 2009 10:33 AM
     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).







  • 17.  RE: Create a Format Hard Drive Job

    Posted Jul 22, 2009 02:41 PM
    Exactly! Thanks so much. I was curious since as Windex guy, I get a lot more Windows than Linux.....and this is so sad.