error: attempt to read or write outside of disk 'hd0'

27,888

The best (and fastest) thing to do in this situation, is to do the following:

  • Turn off the PC
  • Remove the hard drive from the PC
  • Get a second blank hard drive (or second PC)
  • Insert the blank hard drive and install an operating system on the new hard drive (or boot into the second PC)
  • Using a SATA to USB cable (you can find one on ebay cheap), plug the old hard drive into the new PC.
  • Copy all the files to a separate folder on the new hard drive
  • Using Gparted Live burned to a CD (THE PROGRAM IS FREE), wipe the hard drive and rebuild the NTFS filesystem (try google if you need help doing this).
  • Insert the now blank original hard drive into the original laptop.
  • Reinstall your OS
  • Using an external hard drive (or by directly connecting the other hard drive using the same SATA to USB cable), copy all the data back to the first hard drive (into a SEPARATE folder - do NOT overwrite!)
  • Now, reinstall all your programs, and use the data you just copied to restore all your settings and saved games.

Trust me, this may be painstaking but unless you are really lucky, it will be WAY FASTER and WAY CHEAPER than trying to recover the data. Trust me, I've fixed it but it takes like more than 24 hours straight sometimes, and that's after you have a good data recovery software. Since that time, the above steps are what I do if I ever run into a similar issue. It's way faster than taking a chance that you may spend forever just to maybe fix the broken file system with recovery software.

Good luck! Sorry about your luck, I hope this helps.

As long as the entire hard drive is not corrupted, by doing my method above you won't need any data recovery programs or spend countless hours trying to get it working again.

Share:
27,888

Related videos on Youtube

avorum
Author by

avorum

Updated on September 18, 2022

Comments

  • avorum
    avorum over 1 year

    Recently I tried to exit out of a game client (Diablo 3) and my computer completely froze up. I tried to use Ctrl+Alt+Delete to force it to close after about 3 minutes and got no response. After another 5 minutes my computer restarted itself. When it booted back up instead of getting GRUB after my BIOS I got and error saying that my computer couldn't identify the boot device, that I should plug it back in and press a button. I restarted again and got a different error which has since persisted.

    error: attempt to read or write outside of disk 'hd0'. grub rescue> _

    I tried referencing https://askubuntu.com/questions/397485/what-to-do-when-i-get-an-attempt-to-read-or-write-outside-of-disk-hd0-error to figure out how to fix my problem since I have no knowledge of how to use grub rescue. Here's what I got:

    grub rescue> ls
    (hd0) (hd0,msdos2) (hd0,msdos1) (fd0)
    grub rescue> ls (hd0)
    error: unknown filesystem
    grub rescue> ls (hd0,msdos2)
    error: unknown filesystem
    grub rescue> ls (hd0,msdos1)
    error: unknown filesystem
    grub rescue> ls (fd0)
    error: failure reading sector 0x2 from 'fd0'.
    grub rescue> 
    

    Any ideas of how to troubleshoot this would be greatly appreciated.

    My system has a partition for Ubuntu 13.04 and Windows 7. Please ask if any of hardware would be relevant (although I'm not sure how to check it without my OS)

    • Ramhound
      Ramhound about 10 years
      You have experienced a hardware level failure with the HDD. There isn't much you can do at this point. The sectors that have failed contained the information required to boot your operating systems.
    • avorum
      avorum about 10 years
      That's unfortunate. I can get to GRUB now after a reboot but the individual partitions then fail to boot properly. If my HDD is really trashed is there a way to retrieve the contents of my HDD without booting into an OS so I move them onto a new HDD?
    • Ramhound
      Ramhound about 10 years
      Data recovery MIGHT be possible. You would have to try once you have another HDD.
  • avorum
    avorum about 10 years
    Thanks. I hope the entire HDD isn't corrupted, it's only a few months old and luckily I still have my previous HDD to do this transfer. Thanks for the responses, hopefully this post helps someone else too.
  • superuser
    superuser about 10 years
    You're welcome! Also note that one time I bought a hard drive new from Best Buy and the next day it failed losing a TB of data. Since then I always keep a backup. So, sometimes even a new hard drive can go bad quickly. Hopefully that isn't the case here though.
  • avorum
    avorum about 10 years
    could you provide more information regarding "rebuildiing ntfs"? I'm not terribly savvy when it comes to filesystems and not sure what to do or what to search to get this done.