LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-20-2014, 03:05 AM   #1
viv_linux
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
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,547

Rep: Reputation: 212Reputation: 212Reputation: 212
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
 
  


Reply


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

All times are GMT -5. The time now is 01:11 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration