Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: attempt to read or write outside of disk "hd0" [SOLVED]
#7
(08-27-2018, 06:32 PM)cleverwise Wrote:
(08-27-2018, 06:10 PM)creative42 Wrote:
(08-25-2018, 08:29 PM)cleverwise Wrote: This could be the sign of a hard drive issue.  However grub is basically saying it can't load the OS.

You may be able to correct this with a grub-update, however how comfortable are you troubleshooting advanced grub issues?

Many thanks Cleverwise. I don't mind trying entering some commands to try and fix grub, but I am clueless as to where to start. There is no data on the HDD that I need so if I mess up, it's not a problem if I have to reinstall Ubuntu.

The thing I find most strange is that if I press the reset button (on the actual PC case) after a few goes the PC does boot into the Ubuntu login screen. Would that seem to point more to a hardware or software problem?

BACKUP any data that is important!

I would first check your hard drive for errors.  Then rebuild grub.

1) Check SMART data.  You can use many programs.  I'll use the disks program as an example.

A) Open Disks.
B) Select your drive on the left (the boot drive).  Then on the right (if you have controls setup for right) look for the special symbol (which can vary depending on OS theme).  It is probably dots, lines, or eye.  Click on that and go to "Smart Data & Self Test".
C) Look for any failed tests.

PS.  If you want you can do this from the terminal too using tools like smartctl

shell> smartctl -H /dev/sda

This will report PASSED or FAILED

2) Now run a sector scan.

A) Open a terminal.
B) Running the following command replacing sda1 with your boot drive although it probably is.
Code:
shell> cd ~ && sudo  badblocks -v /dev/sda1 > badsectors.txt
C) The test could take hours depending on your drive and computer.  However it will test read all sectors and report any bad ones.

Rebuilding grub:

If you can get to your normal OS then the easiest thing would be rebuild grub from that point.  Otherwise you have to load off a live environment (USB, DVD), mount your drives, and chroot to your installed environment.

1) Load your OS rebooting a few times, since you say this works.

2) Open a terminal (any terminal app)

3) At the shell:

Code:
shell> sudo update-grub

4) If you got no errors then reboot and it should work.

I will try these instructions soon Cleverwise (have got a few other things to deal with first) but in the meantime thank you so much for taking the time to help me Smile . I will post on this thread again when I have run the tests and tried to rebuild Grub.
Reply


Messages In This Thread
RE: Error: attempt to read or write outside of disk "hd0" - by creative42 - 08-28-2018, 07:22 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)