Medium
Operating Systems
✓ Solution Verified by Community (0+ upvotes)
How to fix error error-bad-unit in Windows 11
ERROR_BAD_UNIT = 20
Fix based on community reports and expert analysis. Last verified: 2026-08-12
· How we verify fixes
| Error Code | error-bad-unit |
|---|---|
| Affected System | Windows 11 (Microsoft) |
| Difficulty | Medium |
| Estimated Time | 20 min |
| Requires Admin Rights | ⚠️ Yes |
Solution Steps
- 1 Press Windows key + X and select 'Device Manager'. Look under 'Disk drives' for any device with a yellow warning icon. If you see one, right-click it and select 'Uninstall device'. Then click 'Action' > 'Scan for hardware changes' to reinstall the driver. This refreshes the driver and can fix communication issues.
- 2 Press Windows key + X and select 'Disk Management'. Check if the drive appears in the list. If it shows as 'Offline', right-click it and select 'Online'. If it shows as 'Unallocated', you may need to initialize it (but this will erase data). This ensures the drive is recognized by Windows.
- 3 If the drive is external, try a different USB port or cable. Sometimes the issue is a loose connection. Also, try connecting it to another computer to see if the drive works. This helps determine if the problem is with the drive or your PC.
- 4 Update the storage controller driver. In Device Manager, expand 'Storage controllers'. Right-click the controller (e.g., 'Standard SATA AHCI Controller') and select 'Update driver'. Choose 'Search automatically for drivers'. This ensures the controller can communicate with drives.
- 5 Run a disk check. Open Command Prompt as administrator (Win+R, type 'cmd', press Ctrl+Shift+Enter). Type 'chkdsk X: /f' (replace X with the drive letter) and press Enter. If the drive is in use, you may need to schedule it for next restart. This checks for file system errors that could cause the drive to be unreadable.
- 6 If the drive still isn't recognized, check the BIOS. Restart your PC and press the key to enter BIOS (usually Del, F2, or F12). Look for the drive in the storage settings. If it's not detected, the drive may be physically damaged. Consider connecting it to another computer or using a data recovery service.
🔍 Didn't work? Enter your GPU and CPU for hardware-specific advice:
🔧 Still having issues?
Describe your exact problem to Error Buddy and get a personalized fix in seconds.
🛠️ Try Error Buddy — It's Free