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

## piedar

When attempting to boot, grub2 drops me to a rescue shell with the message

 *Quote:*   

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

 

The message also appears every time I try to access any directory lower than /.

```
grub rescue> ls

(hd0) (hd0,msdos1) (hd1)

grub rescue> set

prefix=(hd0,msdos1)/boot/grub2

root=hd0,msdos1

grub rescue> ls (hd0,msdos1)/

./ ../ lost+found/ data/ rtorrent/ dev/ bin/ home/ etc/ lib/ tmp/ sys/ mnt/ var/ sbin/ proc/ boot/ usr/ root/ opt/ run/

grub rescue> ls (hd0,msdos1)/boot

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

grub rescue> ls (hd0,msdos1)/etc

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

This happens even if I disconnect all other hard drives.  I do not have a separate boot partition.

The only google result for the error message is the file containing grub error messages.

----------

## BillWho

piedar,

That certainly looks nasty   :Sad: 

Is this a new gentoo installation or did you upgrade from the legacy grub on a working installation   :Question: 

----------

## piedar

This was a drive that had been moved to a new machine after the old one's motherboard died - I'd thought they'd be compatible, but they weren't (P4->Celeron).  Even after extracting a generic x86 stage3 over the old install, chrooting in, and rebuilding grub, the problem persisted.  My guess is that the BIOS was incompatible with the size of my / partition.  Long story short, I accidentally fubared the / partition trying to resize it to make room for /boot.  This led me to install Debian, which will serve as a stop-gap until I replace it with some Gentoo-worthy hardware.Last edited by piedar on Tue Jun 19, 2012 8:54 pm; edited 1 time in total

----------

## BillWho

piedar,

Thanks for that explanation - it certainly clarifies things   :Smile: 

Good luck   :Wink: 

----------

