Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-20-2014, 03:05 AM   #1
LQ Newbie
Registered: Nov 2014
Posts: 1

Rep: Reputation: Disabled
error: attempt to read or write outside partition

Looks like I did some error while partitioning.
Went through most of the forum threads but still am not able to boot.

I am getting the following error

error: attempt to read or write outside partition
entering rescue mode
grub rescue>

I ran the following commands

grub rescue> ls
(hd0) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)

grub rescue> ls (hd0,1)/
./ ../ lost+found/ect/media/bin/boot/dev/home....var/vmlinuz initrd.img cdrom/

Can anyone tell me how to proceed? I am running Ubuntu on Virtual Box
Old 11-21-2014, 09:43 AM   #2
Senior Member
Registered: Oct 2003
Posts: 2,499

Rep: Reputation: 193Reputation: 193
Your root partition appears to be (hd0,1). You set the root partition from the command line with:

grub rescue> set root=(hd0,1)

You then have to set the kernel image, vmlinuz, and the initial ram disk, initrd.img. To find out how they are named run:

grub rescue> ls /boot

You'll get a lot of output as all installed vmlinuz files will be outputted as well as all installed initrd.img files and other files that live in /boot. Pick the latest version number of vmlinuz to use. In my kubuntu 14.04 box that would be vmlinuz-3.13.0-39-generic. Yours may be different. Next set this as the kernel image to use from the command line with:

grub rescue> /boot/<insert desired vmlinuz> root=/dev/sd**(device file for root partition)

The device file for your root partition appears to be /dev/sda1 so the above would become:

grub rescue> /boot/<insert desired vmlinuz> root=/dev/sda1

Next, you set the initrd. Be sure to use the same version number as your vmlinuz. In my case that would be initrd.img-3.13.0-39-generic. Yours will be different unless you happen to be using *buntu 14.04(32-bit). Set the initrd to use from the command line with:

grub rescue> initrd /boot/<desired initrd file>

Once the above are set, you tell grub to boot with:

grub rescue> boot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] error: attempt to read or write outside of disk 'hd0' -- entering rescue mode vienswuer Linux - Distributions 4 09-16-2014 11:00 PM
[SOLVED] Error attempt to read or write outside of disk 'hd0' (Ubutnu 14.04) DKnight009 Linux - Newbie 9 04-23-2014 10:03 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

All times are GMT -5. The time now is 02:55 PM.

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