Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Error: attempt to read or write outside of disk "hd0" [SOLVED]
#1
Hi everyone. I installed Ubuntu 18.04 on my old Windows Vista desktop PC a few weeks ago. I installed Ubuntu on the 1tb HDD that used to be my backup HDD. I have unplugged the Vista HDD. I used the erase disk and install Ubuntu option, I didn't try and set up partitions myself.

The PC started up fine for the first few times ( I only use it about once a fortnight as it is at my parents house). However, when I powered it up last week it went through BIOS ok but then displayed this...


Error: attempt to read or write outside of disk "hd0"
Entering rescue mode
grub rescue>

...on a black screen. I didn't know what to do, so pressed the physical "restart PC" button on the PC case. After a few attempts the PC then booted straight to the Ubuntu desktop.

I have googled this error, and found some forum posts from about 2015. The answers suggest that it could be a faulty HDD cable or that you have to create a "/" partition when you install Ubuntu (don't use the "erase disk and install ubuntu"). I've also read that it could be due to the size of the HDD but I would think that Ubuntu has progressed more than far enough to cope with a 1tb HDD).

My PC specs are:

Intel Core 2 Quad
Geforce GTX260
4gb DDR2 memory
1tb HDD
Asus P5nd Motherboard
(PC is 9 years old but hardly used in last 4 to 5 years).

Has anyone got any ideas? Many thanks.
Reply
#2
HDD = hard disk drive 

Why did you replace Vista?  Where you having any trouble with Vista before the Ubuntu install?

How old is the 1TiB backup HDD you are now using as the Ubuntu boot HDD?
Depending on the age the HDD may not be getting up to speed in time if it is beginning to malfunction.  Does the drive man a lot of noise spinning up or while it is being accessed?  Also, you should get a flashlight and examining the SATA cable to make sure they are securely attached to the HDD and the mother board.  For problem determination you could install Ubuntu again on a known working HDD. 

Did you go to the vendor web site to determine if any firmware or BIOS needs to be updated to run Ubuntu 18.04?  I would image your BIOS is way out of date on such an old machine.

Does your desktop have any additional HDDs installed besides the Ubuntu HDD?   Is your BIOS boot priority set for the Ubuntu HDD?
Reply
#3
(08-25-2018, 01:12 PM)deck_luck Wrote: HDD = hard disk drive 

Why did you replace Vista?  Where you having any trouble with Vista before the Ubuntu install?

How old is the 1TiB backup HDD you are now using as the Ubuntu boot HDD?
Depending on the age the HDD may not be getting up to speed in time if it is beginning to malfunction.  Does the drive man a lot of noise spinning up or while it is being accessed?  Also, you should get a flashlight and examining the SATA cable to make sure they are securely attached to the HDD and the mother board.  For problem determination you could install Ubuntu again on a known working HDD. 

Did you go to the vendor web site to determine if any firmware or BIOS needs to be updated to run Ubuntu 18.04?  I would image your BIOS is way out of date on such an old machine.

Does your desktop have any additional HDDs installed besides the Ubuntu HDD?   Is your BIOS boot priority set for the Ubuntu HDD?

I replaced Vista simply because Microsoft stopped issuing security updates for it, I had no issues otherwise.

The 1tb HDD I'm using is probalbly about 6 years old now. I hardly used it at the time though, although just like most things I assume they deteriorate with age even if not used. There are no unusual or excessive noises from it.

There are no othe HDDs installed. I have unplugged the SATA and power cables from the HDD that has Vista on it.

To be honest, although I feel that it is still a quite powerful PC even after 9 years, maybe it is just a tad too old for an OS like Ubuntu or even Windows 10. I checked the Asus website and my motherboard isn't listed as Windows 10 compatible, so I guess the same can be said for a 2018 release of Ubuntu. Thanks for your help anyway.
Reply
#4
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?
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#5
(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? While using Ubuntu I've also had a random problem where the screen goes completely white (or green etc) and the only way to get back is to restart the PC - could that be related to the boot issue?
Reply
#6
(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.
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#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
#8
Very sorry for this late update. I have followed the instructions to test my hard drive. It passed both tests. My main problem now seems to be the way Ubuntu will randomly go to a non-responsive one colour screen. I have tried changing to Wayland on the login screen but after about an hour of use, my PC screen just went black (I have now reverted back to the default setting which I assume is Xorg).

Should I try changing to the proprietary driver? Also, I have another graphics card I could install in place of my GTX260, an 8400GS - would that make any difference?
Reply
#9
Well that is odd behavior.

However, and unfortunately, I recommend running the vendor's video driver.  The open source drivers don't get the most performance from Nvidia cards.

If you have another card to try that is probably a good idea.
Jeremy (Mr. Server)

* Desktop: Ubuntu MATE
* Windows are for your walls, Apple is for your health, Linux is for your computer
Reply
#10
I have the same issue, but I believe it is an error in the way GRUB interacts with specfifc (obscure) BIOS,
as that error only sometimes randomly occurs on my main laptop (which uses CoreBoot + SeaBIOS-payload),
but all other computers (with more traditional BIOS) I tried that drive on worked perfectly fine.
And the SMART values of my drive are fine, no errors at all, the drive is not even two years old.
Reinstalling GRUB to the MBR did not help, neither did rebuilding the GRUB config (I even looked through that thing word for word),
but I have yet to try reformatting the drive (I am currently not in the mood to reinstall a custom LUKS setup, so that will have to wait).

I recommend asking the people who know best for help: The GRUB maintainers of your distribution or even the GRUB developers themselves.
My website - My git repos

"Things are only impossible until they’re not." - Captain Jean-Luc Picard
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)