3

I've been having problems with my HDD since I tried dual booting Ubuntu 14.04 with Windows 8.1. When I was installing from the Ubuntu installer I was receiving input/output error during write on /dev/sda.

I can't do anything in gdisk, it seems that both the main and the backup GPT header are corrupt. It seems that the backup header is unable to save whenever I do anything and try to write to the disk. At this point, I've already lost all my data. I don't have any of my windows partitions and I just want to start fresh and be able to reinstall either Windows or Linux. Any help is greatly appreciated

When I try using fdisk:

$ sudo fdisk /dev/sda 

I get The backup GPT table is corrupt, but the primary appears OK, so that will be used.

I tried to use

g   create a new empty GPT partition table

and

w   write table to disk and exit

I get failed to write disklabel: Input/output error

v   verify the partition table

I get

No errors detected.
Header version: 1.0
Using 0 out of 128 partitions.
A total of 1953525101 free sectors is available in 1 segment.

Using gdisk:

$ sudo gdisk /dev/sda

I receive

Warning! Error 5 reading partition table for CRC check!
Warning! One or more CRCs don't match. You should repair the disk!
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk verification and recovery are STRONGLY recommended.
****************************************************************************

when I enter v to verify my disk I get

Caution: The CRC for the backup partition table is invalid. This table may
be corrupt. This program will automatically create a new backup partition
table when you save your partitions.
Identified 1 problem!

I have tried loading back up and main gpt tables but no matter what I do, when I enter w to write table to disk and exit I receive this error:

Unable to save the backup partition table! Perhaps the 'e' option on the experts' menu will resolve this problem.
Warning! An error was reported when writing the partition table! This error
MIGHT be harmless, or the disk might be damaged! Checking it is advisable.
Organic Marble
  • 23,641
  • 15
  • 70
  • 122
  • More detailed errors about the "IO error" can be found after by running dmesg, but most likely, your drive is failing. – psusi Jun 07 '15 at 23:31

1 Answers1

1

It sounds like you're encountering I/O errors. Such problems are usually caused by failing hardware. If you're lucky, this might be something simple and cheap to fix like a loose or defective cable. It could also be a failing hard disk, though. I recommend you run a SMART test on your hard disk. If you need help interpreting the results, post back with details. (Edit your question to include a screen shot or paste text-mode output to a pastebin site and post the URL to your document here.)

I/O errors can also be caused by buggy drivers. This is pretty rare, though. If your problems occur only in one OS, that might be the explanation.

Yet another possibility is that the Host Protected Area (HPA) may be set. This can sometimes cause problems, especially if you mix older and newer Linux kernels, since some older kernels ignore the HPA, causing a mis-match in perceived disk size and where GPT backup data structures reside. I don't think this hypothesis explains your symptoms all that well, but it's worth mentioning. You can type sudo hdparm -N /dev/sda to see if HPA is enabled on /dev/sda.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105