My laptop came to a grinding halt. On reboot, I got grub, which failed to load linus. I managed to get an initramfs prompt once but no further that way. Using LinuxLive USB Creator and a ubuntu-12.04.2-desktop-i386.iso on a USB stick, I managed to boot, but the original partition doesn't seem to be there any more.
sudo fdisk -l lists /dev/sdc1, which is the USB drive, but nothing else though sudo fdisk -s /dev/sda returns 312571224. (I'd expect there to be a sda1 (Linux), sda2 (Extended), and sda5 (Linux swap)
I installed testdisk and sudo testdisk /list shows
Disk /dev/sda - 320 GB / 298 GiB - CHS 38913 255 63 Partition Start End Size in sectors
Partition: Read errorand running testdisk's search returns no partitions but also says read error for everything while doing analysis.
sudo dumpe2fs /dev/sda returns
dumpe2fs: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda
Couldn't find valid filesystem superblocksudo sfdisk -l /dev/sda says
Disk /dev/sda: 38913 cylinders, 255 heads, 63 sectors/track
read: Input/output error
sfdisk: read error on /dev/sda - cannot read sector 0 /dev/sda: unrecogonized partition table type
No partitions foundsudo gparted says
Input/output error during read on /dev/sda
** (gpartedbin:18653): WARNING **: Could not connect: Connection refusedand only the USB stick shows up in the GUI.
sudo mke2fs -n /dev/sda1 then sudo e2fsck -f -b 32768 /dev/sda1
e2fsck: Attempt to read block from filesystem resulted in short read while trying to open /dev/sda1
Could this be a zero-length partition?I presume there are bad sectors somehow ate the partition record in some way, but I don't know what else to try. Is there anything I can do to get the disk back? (It would be nice to get the data back too but everything important is already backed up elsewhere so, while it would be convenient, it's not actually necessary.)
21 Answer
Your drive appears to be dead or dieing. Check the SMART status in the disk utility for more details. You might try dd if=/dev/zero count=1 of=/dev/sda to write zeros to the MBR and see if that prompts the drive to recover that sector. If that fails, then the drive is toast and it's time to restore from backup.