Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to fix GRUB on my PC, but I'm running into serious issues doing so. Any help would be greatly appreciated as I'm completely crippled right now. Here is the sequence of events for this PC:

  1. Installed Windows 7
  2. Split full disk into two partitions (one for win7 and one for multimedia)
  3. Long time passed
  4. Split one of the partitions into two again
  5. Installed Ubuntu 11.04 on new partition
  6. A little time passed
  7. Windows 7 acting up, reinstall
  8. Ubuntu GRUB gone
  9. Tried restoring GRUB by mounting and grub-install from live USB
  10. Tried switching to a live CD instead of USB (thinking it might be the drive)
  11. Now I don't see GRUB and I'm getting "input/output" errors

An example i/o error:

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 750.2 GB, 750156374016 bytes
255 heads, 63 sectors/track, 91201 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbe86aff6

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       48727   391393280    7  HPFS/NTFS
/dev/sda2           48727       77063   227612647+   7  HPFS/NTFS
/dev/sda3           77063       91202   113566721    5  Extended
/dev/sda5           77063       90622   108908544   83  Linux
/dev/sda6           90622       91202     4657152   82  Linux swap / Solaris

ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt /dev/sda
mkdir: cannot create directory `/mnt/boot': Input/output error
ubuntu@ubuntu:~$ cd /mnt
ubuntu@ubuntu:/mnt$ ls
ls: cannot access etc: Input/output error
share|improve this question
Have you tried to re-install ubuntu? – soandos Jul 28 '11 at 5:12

Right now it looks like you've got some problems with your linux partition. I suggest unmounting /dev/sda5 and running e2fsck on it (or the appropriate fsck for the partition, if it isn't ext2/ext3) to make sure it is okay.

I'd also recommend running smartctl to verify that the disk is healthy, and possibly some simple tests to verify the integrity of the drive (Input/output error is not normal and not good / healthy)

For grubby goodness, I recommend . It saved my bacon recently. It is basically a replacement for a missing, damaged, or defective grub installation. I suspect it can boot Windows as well as Ubuntu (don't know for sure about Windows, but if your Ubuntu partitions are intact, I'd be surprised if it couldn't boot them. Note: the UI is frightening, but it works.

Once you've booted your Ubuntu partition and the partitions are all healthy, your grub-install should work.

share|improve this answer

You must log in to answer this question.

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