My external HDD has two partitions; one for windows and one for ubuntu. I was in Windows 10 transferring files to back them up when I accidentally knocked the cable out. Now neither OS will mount the hard drive correctly.

If I plug it in while in windows, it shows up in "my computer" but without the volume's name (it just says "Local Disk" instead of its proper name "Windows backup"). If the hard drive is plugged in while I start disk manager/diskmgmt.msc, the service freezes with the loading sign and won't show any disks until I unplug the external. If I open the service first then plug in the external, the service does not recognize anything.

In Ubuntu, it says it can't mount and "an operation is pending" on the windows partition (which ubuntu can see). The ubuntu partition can mount and I see the folders that are supposed to be there, but everything loads extremely sluggishly; as in I opened a folder with a single small .txt in it and the folder appeared as though it was empty for a full minute. If I try to navigate via terminal it says access is denied, even with sudo.

I can't even format the disk becuase windows's diskmgmt and ubuntu's gparted both fail to respond. I doubt I'll be able to get any data, but how can I at least format it? What could be the problem?

  • You need to run fdiskon the external drive, from within Ubuntu, due to the dirty unmount.
    – JW0914
    Sep 23, 2018 at 6:49
  • When you say "run fdisk" what exactly do you mean? I ran fdisk -l and it showed my internal drive immediately, hung for a solid 4 minutes, then showed my external as /dev/sdb (sdb1 and sdb2 since there are two partitions). Then I tried sudo mount /dev/sdb2 /media/external and it just hangs forever (or at least I left it for 5 minutes, which should be more than long enough to assign a mount point... I had to control C out)
    – iammax
    Sep 24, 2018 at 19:19
  • My bad, I meant fsck and typed fdisk instead (twice). Ensure it's partitions are not mounted prior to running fsck
    – JW0914
    Sep 25, 2018 at 23:13
  • @JW0914 I tried plugging in the drive and unmounting it (the ubuntu partition still mounts). I unmounted the ubuntu partition by clicking the eject button in the ubuntu windows-style GUI. Then I ran fdisk to see the drives; as usual I have /dev/sdb1 for the windows part and /dev/sdb2 for the ubuntu part. I ran sudo fsck /dev/sdb2 and it ran for a little and said "clean". When I tried sudo fsck /dev/sdb1, the only output I get is "fsck from util-linux 2.27.1" and then it goes back to the command line, so I don't think it's doing anything. I also tried fsck -a, same result
    – iammax
    Sep 25, 2018 at 23:56
  • I think it may be more advisable to use some windows tool to fix /dev/sdb1 as fdisk reports it being of type "microsoft basic data" (I think that's NTFS?) After unplugging the drive, ubuntu popped up saying that it couldn't mount /dev/sdb1 and failed to read the NTFS bitmap. It recommends I run chkdsk /f on windows, which I tried to do, but I can't get windows to recognize either partition to run chkdsk on it.
    – iammax
    Sep 25, 2018 at 23:58

2 Answers 2


In the same scenario and using Ubuntu 18.04.6, I successfully repaired my external drive (without losing stored data) by doing:

Activities > Disks > Click on the external drive > additional partition options (gear icon) > repair filesystem


Its hard to say what happened. It could be hardware damage, or file system damage. Perhaps you damaged the USB port or controller on your computer. Try plugging it into a different USB ports, or into another computer. Are you able to remove the drive from the enclosure? If you can, try using another USB adapter. You can even try plugging the drive directly to an empty SATA port in your computer.

If its file system damage, then that is another whole can of worms. There are a variety of free and paid file system and file recovery tools you can Google for. It could be a quick fix, or it could take massive amounts of time to recover.

It sounds like you are content to wipe the drive. I would think you should be able to format the drive using a GParted Live, but since you cant from inside Linux, you might not...

At the very least, you can wipe the drive completely clean with a DBAN USB/Disc. DBAN's sole purpuse is to wipe a drive and it doesnt care about partitions or file systems, so it wont try to load them.

  • @JW0914 that wouldnt explain the Windows issues.
    – Keltari
    Sep 23, 2018 at 7:38
  • You can repeat the exact sequence of what occurred to show it's a dirty dismount issue. There's a whole host of reasons why Windows would not recognize the partition when this occurred under a Unix OS, from the partition type (is it an LVM setup), are the partitions logical or primary, etc. If wishing to understand why this would affect Windows' ability to recognize the partition after a dirty dismount on Ubuntu, please utilize your search engine of choice, as it can't be explained in a comment format.
    – JW0914
    Sep 23, 2018 at 15:23
  • Repost of initial comment due to incorrect command: The HDD has not failed, nor is there a hardware fault... all that needs to be done is for fsck to be ran due to the dirty unmount. What you're suggesting would be applicable to the former, but will do nothing to solve the issue of a dirty unmount
    – JW0914
    Sep 25, 2018 at 23:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .