Thursday, April 25, 2013

During OS deployment, format the C drive only

When OS deployment is done on systems, sometimes it's needed to wipe just the C drive and keep existing data on the D drive. When using a default task sequence in SCCM/ConfigMgr or MDT all data is wiped. This because exiting partitions will be deleted and created again. In this blogpost I explain what to do in this situation.

Just create a default task sequence for OS deployment first. Just edit it after creation and remove any “Format and Partition Disk” step. You can't use this step without wiping the disk at all. In the "Apply Operating System Image" step, make the following modifications before deployment: Set the destination to a specific Disk 0 and Partition 1 (for example), so it's fixed after that.


That way only the partition configured will be used. Other partitions or disks will be saved this way! During the "Apply Operating System Image" step, the configured Disk and Partition will be formatted first before installation. Job completed!

18 comments:

  1. Thanks Henk. I use your recommendation and it works great!

    ReplyDelete
  2. Thanks Henk. It helped us a lot.

    ReplyDelete
  3. Henk, great article but do you have any suggestions on how to deal with D partitions that are bitlocked?

    M.vr.gr. Jac

    ReplyDelete
    Replies
    1. I guess using the same method as above?

      Delete
  4. After this c and d are switched :-(
    The data on D is still there but D becomes C and C become D.
    So is there antoher way to do this?

    ReplyDelete
    Replies
    1. Yes, you can also use a variable (OSDisk) during disk format, and use that one on the Apply OS step.

      Delete
  5. After this C and D are swiched. The data on de orginal D still presence, but D become C and C becomes D. So is there another way to format only C and leave C realy C?

    ReplyDelete
    Replies
    1. Yes, you can also use a variable (OSDisk) during disk format, and use that one on the Apply OS step.

      Delete
  6. C becomes d and D becomes C. This is not good

    ReplyDelete
  7. I deleted “Format and Partition Disk” and changed the settings in "Apply Operating System Image" but while running TS it gets failed & gives error code 0x80070070.

    I believe it is not getting partition to install the OS. what could be the issue.

    ReplyDelete
    Replies
    1. Just make sure to put the OS image on the right partition. Press F8 and check diskpart.

      Delete
  8. Hi,
    I tried with this post to format only cdrive and keeping other drive as it is.But when I run task sequence getting 0x80070057 error code and Process completed with exit code 214942487.
    I have disabled format and partition step in the task sequence editor and selected in apply os tab select location option i have selected logical drive letter stored in as variable (Given variable name which i have given to Os tab).
    After selecting task sequence immediately thowing error.Can you help me on this.

    ReplyDelete
    Replies
    1. Probably the "Given variable name" isn't recognized. Use the "Specific disk and partition" instead.

      Delete
  9. hi,

    can you please help in mdt, i have to set it was need to format only c: drive not D: drive the data in drive it should be like that only how can i set it.


    Thanks,
    Lokesh .v

    ReplyDelete
  10. Hi,

    can you help me how to set MDT it was need to format C: drive only and the data in D: drive should be like that only,
    when i am trying to format it was deleting all the partition and creating new partition.

    Thanks,
    Lokesh vankam

    ReplyDelete