LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-10-2016, 04:02 AM   #1
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Rep: Reputation: Disabled
"error: attempt to read or write outside of disk 'hd0'" on different drives


Hi!

So, here's the story.

I've got Acer Aspire S3 laptop, and disk on it started to give bad sector errors from time to time. It wasn't in a critical state, and stuff like that happened every 2-3 days, but I decided to replace the drive to avoid losing my data.

So, I bought a new hard drive, but after installing linux all I get is either

Code:
error: attempt to read or write outside of disk 'hd0'
Entering rescue mode...
grub rescue>
or simply

Code:
Read Error
Now, after trying about a dozen different solutions for the problem to no success, I assumed the new drive is faulty and got another one, and ensured it's identical to the one I had before. Linux Mint installed with no any troubles, as usual, however, yet again, I boot into the same error. Weirdly enough, sometimes (seems randomly) it goes to a boot menu, but instead of loading the OS, computer restarts after a couple of seconds of black screen.

After this, I realized it might not be connected with the drive at all. So, I inserted my old drive, but it gives me, yet again, exactly the same error! Surely, this one has grub in order, as I was able to load from it before replacement and never seen this error with it. So, error must reside outside of the drive?! At least this is my reasoning, I simply don't know what else to think...

So, I'm in complete confusion. Is it not hard drive which has a problem? Might it be some hardware problem with some other part of my laptop? Or did I mess something up while trying to fix the issue?

Any insight into this is greatly appreciated.


UPDATE

Why my problem looks different to other similar problems?
1. It persists for different hard drives, with different operating systems. I've got two new hard drives and one old, on which a working Linux Mint is installed. I didn't do any destructive tests on the latter, but it stopped working after I tried putting it back in. Unlike fresh installation of Mint on any of the other two drives, this one does load the system ~10% of the times...
2. The error itself is volatile, randomly throwing out two different errors or on occasion booting the grub menu or very rarely even the OS itself.

What I've tried:

1. I ran memtest for ~10 hours and it did 8 full passes with no errors found.
2. I ran full destructive read-write badblocks test on both of the new hard drives with no errors found.
3. Standard boot-repair run doesn't seem to do anything.
4. I tried to install different things on different drives, trying out Mandriva, Debian, Mint, Fedora and Windows 7 on two of the new hard drives, to pretty similar results. Some of these (Debian, Mint) display grub error almost every time, rarely going to boot menu, but never proceed further, throwing "attempt to read or write" at me after I choose any option. Others (Mandriva, Fedora) display all the range of responses, from any of the two above errors, to freezing on black screen after I choose what to load, and even loading the whole thing with no issue on rare attempts. Windows 7 always gave me disk read error.
5. I tried various recommendations for manual partitioning (i.e., creating /boot separately, putting it at the beginning of the drive), don't remember all of them, but it doesn't seem to be the issue as the old drive with default installation worked fine before.
6. I tried to fix grub as described here and to reinstall it.
7. Checked BIOS hard drive size limitation, it is not the issue. And I did select AHCI (although tried IDE as well) during the installation. BIOS does recognize the drives.

Last edited by sashkello; 02-15-2016 at 04:53 PM.
 
Old 02-10-2016, 05:27 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
yes, it looks like (not related to the hard drive, but) a hardware problem with some other part. You can also try to boot from usb (even without HDD) to check.
 
Old 02-10-2016, 05:32 AM   #3
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
yes, it looks like (not related to the hard drive, but) a hardware problem with some other part. You can also try to boot from usb (even without HDD) to check.
Yes, I booted and installed various flavours of linux from USB (to try and see if they show different behaviour: they don't). I also ran different hard drive checks, like badsector and boot repair, with no errors.
 
Old 02-10-2016, 09:55 AM   #4
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Have you tried letting memtest86+ run overnight to check for memory problems?
 
Old 02-10-2016, 02:51 PM   #5
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
"error: attempt to read or write outside of disk 'hd0'" on different drives

Yes, memtest didn't find any errors, neither did badsector full destructive test. In any case, since now I have three different drives, all exhibiting the same behaviour, it's safe to assume that the problem is somewhere else.

Last edited by sashkello; 02-10-2016 at 06:29 PM.
 
Old 02-11-2016, 05:04 AM   #6
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Update:

Have been able to boot from my old drive. Restarted, saw the error again, restarted another dozen times and booted again (writing from within my old Linux Mint installation now). That's some random stuff, have no idea what's going on...
 
Old 02-11-2016, 07:35 AM   #7
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
First hit in Google. There is more.
 
Old 02-11-2016, 08:00 AM   #8
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Emerson View Post
First hit in Google. There is more.
As I mentioned, I have tried this, and all other possible things about this error I was able to find on the internet. My problem is different from all those as it persists on different drives, for different Linux distros, which can't all have the same bug.
 
Old 02-11-2016, 08:28 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
should be specified "all the other possible things" you tried and also please describe how your problem is different. Otherwise we may give you another useless hint...
 
Old 02-15-2016, 05:32 AM   #10
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Sorry, guys, I should have listed all the things I tried in the first place. Updated the post. Tried some of 'em again to make sure...

Please let me know what other info would be helpful and what tests/scripts I should run to diagnose the issue.
 
Old 02-15-2016, 05:35 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
ok, so start over again, and post what have you done exactly and what's happened. If you have no other idea just start with the link posted in #7
 
Old 02-15-2016, 06:04 AM   #12
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
ok, so start over again, and post what have you done exactly and what's happened. If you have no other idea just start with the link posted in #7
I'm not sure how repeating same thing over again will help me with anything. Any of the solutions I listed didn't bring absolutely any change to the problem. And all the three things mentioned in #7 are listed in "things I tried".

Frankly speaking, I'm quite tired of trying things for the sake of it. It's a wild goose chase. There's a million things which can be wrong with a hard drive, or motherboard, or some other thing, and simply trying all of the fixes will take me forever, especially if the problem is not with the hard drive in the first place (at least this is how it looks to me now).

What diagnostic tools could I use to at least find out where the booting process fails and which part of my computer is failing. When I know that, at least it will somewhat limit the solutions. Right now I can just go through the whole internet and there will still be lots of things I haven't tried.
 
Old 02-15-2016, 10:59 PM   #13
sashkello
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
OK, SOLVED!

I figured hard drives can't be the problem, and the motherboard doesn't seem to have any obvious issues either, otherwise there'd be problems with working from USB boot, which works perfectly.

Then, the only place the problem might reside is somewhere in between these two. So, I cracked it open once again, removed the cable connecting the drive to the motherboard and noticed the tiniest of dust particles sitting on one of the contacts. It must have got there when I was replacing the drive for the very first time, and since I only disconnect the part of the cable which goes into the hard drive, it was sitting there unmoved all this time.

Phew! Such a stupid thing and so much trouble from it. Like my dad taught me: "If it doesn't work, disassemble it and assemble it back, that will solve it in 90% of situations"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A comp says: "attempt to read or write outside of disk 'hd0' " What shall be done? Sergei Serebriany Linux - Newbie 1 09-01-2014 08:36 PM
Error: attempt to read or write outside of disk 'hd0' Penpusher Ubuntu 16 10-28-2013 06:27 PM
error: attempt to read or write outside of disk `hd0' blackholes Linux - Newbie 2 07-10-2013 11:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 10:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration