This caught my eye in your SMART output:
184 End-to-End_Error 0x0032 001 001 099 Old_age Always FAILING_NOW 239
There are also a bunch of specific errors logged (49 of them, to be precise). I'm not an expert on SMART result interpretation, but from what I do know, I'd be wary of that drive. It's entirely possible that the end-to-end errors are causing the symptoms you're seeing. If so, replacing the disk should fix the problem.
This sort of symptom can also occur because of motherboard-based software RAID (aka "fake RAID") that's activated in the firmware but not being used by the OS, or that's being used in one OS but not another one. In this scenario, the firmware's RAID tools write data to the end of the disk, expecting that the OS will use the disk in the same way and present the disk as slightly smaller than it is to everything else (including tools like gdisk
). If this is the cause of the problem, you'll have to either track down the RAID settings in your motherboard's firmware and disable them; or activate the relevant RAID support in both Ubuntu and Windows. The latter course of action may require shrinking your final partition, too. Note that these RAID options can be enabled even on a single-disk computer, even though they do no good whatsoever in that configuration.