Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My problem

This problem has been plaguing my boot for a while, it happens about half the times I start up my computer.

Grub will load successfully, and wait ten seconds for me to choose which OS to boot into. When I choose ubuntu, I am (4/5 times) confronted with this error:

error: attempt to read or write outside of disk `hd0`.
error: you need to load the kernel first.

Press any key to continue...

or this one:

error: attempt to read or write outside of disk `hd0`.

Press any key to continue...

When it displays the first error, pressing enter will make it go back to the main menu.

But when it is displaying the second error, without you need to load the kernel first, pressing any key will result in loading ubuntu, and a kernel panic.

kernel panic - not syncing

This doesn't happen every time though. If I try enough times, it will work.

Debugging information

$ fdisk -l
Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d0b78

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    83886079    41942016    7  HPFS/NTFS/exFAT
/dev/sda2        83886080   234440703    75277312    5  Extended
/dev/sda5        83888128   109053951    12582912   83  Linux
/dev/sda6       109056000   234440703    62692352   83  Linux

$ sudo fsck -f /dev/sda5
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda5: 207541/786432 files (0.3% non-contiguous), 1389304/3145727 blocks

$ sudo fsck -f /dev/sda6
fsck from util-linux 2.20.1
e2fsck 1.42 (29-Nov-2011)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
ubuntu-home: 194036/3923968 files (0.6% non-contiguous), 11943110/15673088 blocks

boot-info summary from boot-repair: http://paste.ubuntu.com/6886738/

Things I've tried

  • Running sudo update-grub
  • Running sudo grub-install /dev/sda
  • Using boot-repair (more than once). I used the options Purge grub before reinstalling it and Purge kernels then reinstall last kernel. I've also tried Reset extra space after MBR.

I also saw other questions asking around the same thing, but as far as I can tell they all were about getting the grub rescue prompt with this error, rather than after selecting ubuntu.

share|improve this question
    
Possible Duplicate? askubuntu.com/questions/397485/… –  Mitch Feb 4 at 19:03
1  
Sounds like your fs is corrupt. Boot the livecd, fire up gparted, and fsck your linux partitions. –  psusi Feb 4 at 19:28
    
@psusi Is there something gained by doing it from a livecd rather than /forcefsck? Just wondering –  DaboRoss Feb 4 at 23:47
    
@Mitch I'm not getting grub rescue though, and it does boot up correctly one out of five times? Do you think I should still try the grub-install? –  DaboRoss Feb 4 at 23:48
    
@DaboRoss, just that you don't have to go digging around for the log of the fsck. –  psusi Feb 5 at 1:08

3 Answers 3

up vote 6 down vote accepted
+100

It can be a BIOS problem. Your screenshot says:

Alienware M14xR1/M14xR1, BIOS A04

So I think this is the support page of your laptop. If you look under the BIOS sections you will see two available BIOS updates. (One of them (A08) is even marked as "Urgent", but I think it is only urgent for those who installed A07) You can also look at the A07 version of the BIOS under "previous versions", where it says:

Fixes & Enhancements: Modify SATA speed limit to SATA2

(So maybe there is some kind of SATA speed mismatch causing this problem for you, just guessing.)

So I would advise you to update you BIOS to the latest available (A08) and check the results.

share|improve this answer
    
I installed this update, and I think this has actually fixed it! I would have never thought to check the BIOS. I'm going to go another day to make sure it doesn't happen any more though! –  DaboRoss Feb 20 at 3:47
    
Ye, this did fix it! It's probably a very specific answer, but it did work! –  DaboRoss Feb 20 at 16:57

A computer does not operate random, so behavior which looks random is because either the input is different or the hardware is broken. Normally crashes appear random because the state of the computer is seldom the same with all programs running, but at the very early start random behavior is quite rare and are mostly due to hardware problems since there are not so many ways the input can differ with every boot.

The most common hardware problems which can remain undetected and unresolved are memory problems. Hard disk problems are normally being detected and the spots marked. Processor, cache and bus are constantly used by all programs so errors here would render a non-workable system or would only go wrong onces every hour or so, not repeatable at the same spot.

I would start by using a Ubuntu live cd to do a thorough memory test (couple of hours, different patterns) before spending too much time in software solutions. If a memory error pops up you can tell the kernel not to use that part of memory by passing badblock as boot parameter.

btw. The memory test is hidden now a days, see link

share|improve this answer
    
I'll try booting up and running memtest overnight. If I run it overnight, will the errors stay on the screen until morning? Also, how does passing a bad memory segment to the kernel help? I mean it looks like the error is in grub itself. I have had no errors at all in ubuntu itself once it boots up successfully. –  DaboRoss Feb 15 at 23:01
1  
It will give you a report after the scan. If only some bytes are corrupted you only notice when a program is using that part of the memory and the error is bad enough to crash the system. Changes of this are not so big that you will easily notice with GB's. However, during startup you will always use the same memory in the same manner. Passing the badblock to the kernel will try to avoid these locations. Else you have to alter hardware (exchange order and use badblock or put in new). But lets first see what the scan gives. –  Requist Feb 15 at 23:59
    
I haven't found the time to run a memtest yet, I'll do that soon though. I think updating the BIOS might have fixed my particular problem, but I'm going to do this anyways, and it will probably help future viewers as well. –  DaboRoss Feb 20 at 3:55

What you haven't told us is the hardware configuration. I noticed that your HD is 120GB therefore I suspect it's an SSD. The problem is your SSD. You need to upgrade the SSD firmware - which may require you to reinstall everything. If that doesn't work then your SSD is bad.

share|improve this answer
1  
I've used samsung's software to upgrade it from Windows, and the SMART check does say it's all OK. Also doubting it's a hardware disk problem because Windows does never have any errors booting, and once I am booted into Ubuntu, there aren't any errors reading/writing the disk. –  DaboRoss Feb 17 at 17:51
    
How did you partition this drive? Was Windows on it first and then you repartitioned it to add Ubuntu? I still suspect the problem is either with the SSD and/or with the boundary of the partition. –  Van Feb 18 at 19:07
    
I first partitioned with ubuntu, then before installing windows I moved all ubuntu partitions into an extended partition, and installed windows in the first partition. –  DaboRoss Feb 18 at 19:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.