{"id":3198,"date":"2014-06-20T09:48:12","date_gmt":"2014-06-20T01:48:12","guid":{"rendered":"http:\/\/rmohan.com\/?p=3198"},"modified":"2014-06-20T09:48:12","modified_gmt":"2014-06-20T01:48:12","slug":"diskpart-to-create-and-format-partitions","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=3198","title":{"rendered":"Diskpart to Create and Format Partitions"},"content":{"rendered":"<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-size: small;\">To use the command line to bring a disk online, create a partition, and format it, run the following commands:<\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">\u00a0<span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: 'Courier New';\">C:\\&gt; Diskpart<\/span><\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"color: black;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"font-size: small;\">DISKPART&gt; list disk<br \/>\nDISKPART&gt; select disk (id)<br \/>\nDISKPART&gt; online disk (if the disk is not online)<br \/>\nDISKPART&gt; attributes disk clear readonly<br \/>\nDISKPART&gt; clean<br \/>\n<\/span>DISKPART&gt; convert mbr (or gpt)<br \/>\n<\/span><\/span><\/span><\/span><\/span><span style=\"font-family: 'courier new', courier;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\">DISKPART&gt; create partition primary<br \/>\nDISKPART&gt; select part 1<br \/>\n<\/span><\/span><\/span><span style=\"font-family: 'courier new', courier;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\">DISKPART&gt; active (if\u00a0this is the\u00a0boot partition)<br \/>\n<\/span><\/span><\/span><span style=\"font-family: 'courier new', courier;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\">DISKPART&gt; format fs=ntfs label=(name) quick<br \/>\n<\/span><\/span><\/span><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\">DISKPART&gt; assign letter (letter)<br \/>\nDISKPART&gt; list volume<\/span><\/span><\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-family: 'Courier New'; font-size: small;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"font-size: small;\"><br \/>\n<span style=\"text-decoration: underline;\">The following are common errors displayed if you miss a step:<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: 'Courier New';\">DISKPART&gt; clean<br \/>\nDiskPart has encountered an error: The media is write protected.<br \/>\nSee the System Event Log for more information.<\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Resolution: run &#8220;attributes disk clear readonly&#8221; before trying to clean the volume and create the partition.<\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"color: black; font-family: 'Courier New';\"><span style=\"font-size: small;\">DISKPART&gt; convert mbr<\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: 'Courier New';\"><span style=\"font-size: small;\">Virtual Disk Service error:<br \/>\nThe specified disk is not convertible. CDROMs and DVDs<br \/>\nare examples of disks that are not convertable.<\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Resolution: clear all data off the disk before converting by running the clean command.<\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-size: small;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"color: black; font-family: 'Courier New';\">DISKPART&gt; create partition primary<br \/>\nVirtual Disk Service error:<br \/>\nThere is not enough usable space for this operation.<\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Resolution: run &#8220;clean&#8221; before trying to create the partition.<\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-size: small;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"color: black; font-family: 'Courier New';\">DISKPART&gt; format fs=ntfs quick<br \/>\nVirtual Disk Service error:<br \/>\nThe volume is not online.<\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Resolution: online the disk, create the partition, and convert to mbr before formatting.<\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\"><br \/>\n<\/span><\/span><span style=\"text-decoration: underline;\"><span style=\"font-family: 'Courier New'; font-size: small;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"font-size: small;\">The following are common errors displayed if there is a hardware problem:<\/span><\/span><\/span><\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: 'Courier New';\">DISKPART&gt; clean<br \/>\nDiskPart has encountered an error: The device is not ready.<br \/>\nSee the System Event Log for more information.<\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Resolution: If the event log entry states &#8220;The driver detected a controller error on \\Device&#8221;, the problem is likely your storage controller on your mainboard. Check your hard drive connections and reload your storage conroller driver. If the event log entry states &#8220;VDS fails to write boot code on a disk during clean operation. Error code: 80070015@02070008&#8221;, the hard drive itself has failed.<\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">\n<span style=\"font-family: 'Courier New'; font-size: small;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"font-size: small;\">The following are common errors you may see if there is a hardware problem:<\/span><\/span><\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"font-family: 'courier new', courier;\"><span style=\"font-size: small;\"><span style=\"color: black; font-family: 'Courier New';\">DISKPART&gt; clean<br \/>\nDiskPart has encountered an error: The media is write protected.<br \/>\nSee the System Event Log for more information.<\/span><\/span><\/span><\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\"><span style=\"color: black; font-family: Arial, sans-serif;\"><span style=\"font-size: small;\">Resolution: Running &#8220;attributes disk clear readonly&#8221;, as mentioned above, is the first step. Next, the disk is may be locked by an active process, in which case a reboot generally clears the error.<\/span><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; color: #000000; text-transform: none; text-indent: 0px; letter-spacing: normal; word-spacing: 0px; white-space: normal; background-color: #ffffff; -webkit-text-stroke-width: 0px;\">To use the command line to bring a disk online, create a partition, and format it, run the following commands:<\/p>\n<p style=\"font: 12px\/17px Arial, Helvetica, sans-serif; margin: 0px 0px 20px; [...] \n\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3198"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3198"}],"version-history":[{"count":2,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3198\/revisions"}],"predecessor-version":[{"id":3200,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/3198\/revisions\/3200"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3198"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3198"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3198"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}