Diskpart encountered the error: a non-existent device was specified

Diskpart encontrou erro

Diskpart is an advanced and powerful disk management tool that can help fix critical drive errors and formatting problems.

Errors like this can have a logical or a physical cause, and repeated repair attempts can make things worse. If the files matter, see how hard drive data recovery works, starting with a free diagnosis.

However, Diskpart sometimes runs into an error: for example, a non-existent device was specified, or the drive is write-protected, encrypted or severely corrupted.

Access to the disk may also be denied, or there may be an I/O (input/output) device error or a data error (cyclic redundancy check).

The device may also not be ready, or the system may be unable to find the specified file.

In these cases, the utility does not work and returns an error when you run Diskpart commands.

In this article, we’ll look at what can cause these errors and how to fix them.

 

Symptoms that Diskpart has encountered an error

When Diskpart encounters an error, it returns a message describing the problem, for example “DiskPart has encountered an error: A device which does not exist was specified”.

Other signs that Diskpart has encountered an error are messages such as the following:

The parameter is incorrect

“The parameter is incorrect” is a common error caused by logical or physical damage to the storage drive, which makes the drive inaccessible.

The error can also appear when you try to copy data to or from the drive.

Access was denied

When you try to use Diskpart to format or wipe a USB flash drive or SD card, the operation may fail.

When Diskpart returns the error “Access is denied”, it means the drive is locked, write-protected or that you do not have permission to access it.

In this case, Diskpart’s clean or format command cannot be completed.

The request could not be performed because of an I/O device error

An I/O device error (short for input/output device error) occurs when Windows cannot perform an input/output operation (such as reading or copying data) on a drive or disk.

The disk I/O error appears when there is physical damage (such as bad sectors or a faulty read/write head), logical bad sectors or a corrupted partition table.

When you run into an I/O device error while using Diskpart to partition a disk, the process may hang, or you may be unable to access, format or partition the drive.

Data error (cyclic redundancy check)

This error can have several causes. The most common are bad sectors on the disk, corrupted files or a damaged file system, faulty cables or connections, and interrupted write operations.

The CRC (cyclic redundancy check) error is a serious problem: it usually means the drive cannot read some of its data correctly. Act quickly to avoid crashes and data loss, and if the files are important, stop using the drive and copy or recover them before trying any repair.

There are different kinds of CRC errors, such as:

  • Data error message (CRC) in Outlook
  • Drive is not accessible: data error (cyclic redundancy check)
  • Cyclic redundancy check error on an optical disc (CD, DVD, etc.)

The device is not ready

The error “The device is not ready” can occur when you try to access data on a hard drive, USB flash drive, DVD drive, SD card, etc.

This error can have several causes, including:

  • The external drive is not properly connected, or the connector or USB port is damaged
  • The device itself is damaged
  • A compatibility problem between the computer and the external device
  • A file system error: in Disk Management, a device with a file system error is shown as RAW.

The system could not find the specified file

“The system cannot find the file specified” is a fairly common Diskpart error for Windows users, especially on Windows 10.

It is sometimes accompanied by the error code 0x80070002, but the code can vary depending on the version of the operating system.

It can occur when you install a disk driver, create a system image, access files or perform other operations on the system. The main causes include:

  • Virus or malware attack
  • A loose connection
  • Corrupted registry keys
  • Disk errors on the source volume
  • Important system files missing or damaged
  • The system partition is offline
  • The system partition is not active
  • Files required by a specific program are missing or corrupted.

What to do when Diskpart encounters an error?

There are a few things you can try when Diskpart encounters an error such as “a non-existent device was specified”.

These include restarting the computer, checking the hardware, granting full control in the disk permissions and updating the disk driver.

You can also check the condition of the disk and, if necessary, replace the drive.

Let’s look at each of these solutions in more detail:

Restart your computer

If you’ve recently created a partition or formatted the drive, the first and most important thing to do is restart the system.

Many users don’t restart after making changes to the disk and keep getting the same message: DiskPart has encountered an error, a non-existent device was specified.

However, a restart is needed for the changes to take effect. So, after any change to the drive, such as creating a new partition, restart the computer.

Check the disk hardware

If you have already restarted the computer and Diskpart still shows the error “a non-existent device was specified”, check the disk hardware.

Start by trying a different cable, USB port and power supply, one at a time, to see whether the problem goes away.

If the error occurs on a USB flash drive, an external hard drive or a CD/DVD, clean the dust off the connector (or the disc surface) and try again.

Grant full permissions on the disk

If your user account doesn’t have sufficient permissions to access the drive, Diskpart may return the error “a non-existent device was specified”.

In this case, change the drive’s permissions in the “Properties” window to solve the problem.

To do this, follow the instructions below:

  1. First, open File Explorer;
  2. Right-click your drive and choose “Properties” from the menu;
  3. In the “Properties” window, switch to the “Security” tab;
  4. Click “Edit” to change the permissions;
  5. Select your user account and, under “Permissions”, make sure the “Full control” box is checked in the “Allow” column;
  6. Then click “Apply” and “OK”.

Update the disk driver

If the device driver is outdated or incompatible with the disk, it can affect input/output and cause an I/O error.

In that case, update or reinstall the disk driver to fix the problem.

To update the disk driver:

  • Right-click “This PC” and select “Manage”. In the left-hand pane, open “Device Manager”;
  • Double-click “Disk drives” to expand it. Right-click the disk and choose “Update driver”;
  • In the window that opens, choose “Search automatically for drivers” and wait while Windows finds and installs the latest driver.

To reinstall the disk driver:

  • If updating the driver doesn’t work, try reinstalling it to solve the non-existent device problem;
  • Right-click the disk and click “Uninstall device”. Confirm and restart your PC; Windows will try to reinstall the driver automatically;
  • Alternatively, go to the manufacturer’s website, then download and install the latest driver for your device.

Check the condition of the disk with CHKDSK

The CHKDSK command repairs file system errors and marks bad sectors that cause Diskpart I/O errors on your hard drive partition, external drive or other storage devices. Keep in mind that it writes to the disk: if the drive has physical damage or holds important data without a backup, recover the data first, because CHKDSK can make the situation worse.

To run it:

  • Press the Windows key and type cmd;
  • Right-click on “Command Prompt” and choose “Run as administrator”;
  • Type the following command: chkdsk E: /f /r /x (where “E” is the drive letter of the partition you want to repair);
  • Press “Enter”.

Replace the disk drive

If none of these solutions fixes the Diskpart error, it may be time to recover the files stored on the drive and replace it with a new one.

To do this, you can:

  1. Use recovery software: this requires technical knowledge and familiarity with the process, and there is no certainty that the data will actually be recovered;
  2. Use a company that specializes in data recovery: this is the safest option and gives your data the best chance of being recovered.

Conclusion

Diskpart is a command-line utility built into Windows that helps fix critical drive errors and formatting problems.

However, when you run it, you may come across messages saying that Diskpart has encountered an error.

For example: a non-existent device was specified, the parameter is incorrect, or access is denied.

Diskpart can also fail when there is an I/O (input/output) device error or a CRC error, when the device is not ready or when the system cannot find the specified file.

When Diskpart returns any of these errors, there are several ways to try to resolve them.

These include restarting the computer, checking the disk hardware, granting full control in the disk permissions and updating the disk driver.

You can also check the condition of the disk with CHKDSK or, if nothing works, replace the drive. In that case you will need to recover the data, either on your own with software (not recommended) or with a professional data recovery service (the safer option, which we offer here at Bot).

When you entrust your drive to us, our highly trained specialists handle your case efficiently and quickly.

Trust the specialists, with more than two decades of experience, more than 200,000 cases and a 96% success rate: start your recovery with us.

About the author
Paulo BragaEspecialista em recuperação de dados · Laboratório Bot · Desenvolvimento e inovação

Paulo Braga is a data recovery specialist. He works where most cases are decided: hard drive mechanics, SSD electronics and firmware, using tools such as the PC-3000. At Bot, he splits his time between the lab, building solutions and innovation. On the blog, he writes about what he sees on the bench. Outside work, he is drawn to the meaning of things and enjoys time with family, friends and a good beer.

All articles by Paulo Braga →

Need to recover your files?

The diagnosis identifies the fault and whether recovery is technically viable. You receive a quote before any work begins.

Start diagnosis
Share