• Linux
  • FreeBSD
  • Networking
  • Python
  • AWS
  • WebDev
  • About Us
Tech Tips and Tutorials
Menu
  • Linux
  • FreeBSD
  • Networking
  • Python
  • AWS
  • WebDev
  • About Us
Home  /  Uncategorized  /  How to erase a disk using diskpart utility

How to erase a disk using diskpart utility

Written by
Uncategorized Leave a Comment

Diskpart is a brilliant utility in Windows to delete and format a disk . If you are working with the images rewriting on ssds you might encounter lots of disk issues and you will see problems when you try to re flash the image . So delete the volume/partition and formatting the disk is the key here . Sometimes, you will see issues in deleting the volumes via the disk management utility in windows . Here comes the disk part utility , you can use it to delete the volume first and then format .

Open the commandline and type:

diskpart

This will open a new window

list disk

You should be very careful in choosing the correct disk as in above output DISK0 is my internal hardrive and DISK 1 is my usb external m2.ssd . If you choose DISK1 , it will wipe out your internal drive .

select disk 1

List disk again and make sure you see ‘*’ on the correct disk

Now the correct disk is choosesn and you can remove the full content by running ‘clean’ command.

clean

Now the disk is emptied fine and you need to format it from disk management .

computer management >> Disk Management

Now the system detected a brand new disk and will be asked to intialize the disk when you click on disk management .

In case, you are not getting the ‘initilaize disk’ from disk management , just click on the red icon on your Disk and that will give you the initialize option .

Once thats done , you will see the disk ready

Now right click on the disk and choose New simple volume and click next , choose all default settings and also perform a qucik format at the end .

Now your disk will be ready as brand new to use again :

Some of the useful dispart command list are :

ACTIVE - Mark the selected partition as active.
ADD - Add a mirror to a simple volume.
ASSIGN - Assign a drive letter or mount point to the selected volume.
ATTACH - Attaches a virtual disk file.*
AUTOMOUNT - Enable and disable automatic mounting of basic volumes.*
BREAK - Break a mirror set.
CLEAN - Clear the configuration information, or all information, off the disk.
DELETE - Delete an object.
DETAIL - Provide details about an object.
DETACH - Detaches a virtual disk file.*
EXIT - Exit DiskPart.
EXTEND - Extend a volume.
EXPAND - Expands the maximum size available on a virtual disk.*

WARNING: Run diskpart command at your own risk as choosing the wrong drive will wipe out the existing contents , we are not responsible for any damages .

Share On
Share on Facebook
Share on Twitter
Share on Google+
Share on Whatsapp

 Previous Article ZFS GPT table corrupted and recovery suggested
Next Article   How to install Python Pip on FreeBSD 12 .1

Related Posts

  • How to install and connect OpenVPN client in FreeBSD

  • How to upgrade the nvme SSD on a 2014/15 Macbook with Samsung 970 EVO 1TB

  • How to redirect subprocess.Popen output to a file using in Python

Leave a Reply

Cancel reply

  • Popular Posts
  • Recent Posts
  • Linux Shell Scripts for System Administrators
  • Cacti 1.1.38 ERROR Opening .rrd No Such file or directory
  • Apache configuration for Cacti
  • How to create RAM disk in Ubuntu 18.04
  • Linux Shell Scripts for System Administrators
  • SOCKS PROXY
  • How to install XAMPP and access phpMyAdmin in MAC OS
  • How to increase the root volume in a Linux ec2 instance

Linux

  • Linux Shell Scripts for System Administrators
  • SOCKS PROXY
  • How to grep IP addresses from log files in Linux
  • How to empty or delete a large file in Linux

Categories

  • AWS (5)
  • FreeBSD (12)
  • Linux (29)
  • Networking (3)
  • Python (5)
  • Uncategorized (4)
  • WebDev (1)
  • Connect on Facebook
  • Connect on YouTube
© Copyright 2020.TechieNix. All Rights Reserved.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled

Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.

Non-necessary

Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.