LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-07-2010, 05:13 AM   #1
harris4got
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Rep: Reputation: 0
Recurring Grub rescue mode after update-grub


Hello All,

I have an Ubuntu 10.4 installation (dualboot with windows XP) with grub2.

After I resized some of my partitions using a gparted live cd, the system goes directly to grub rescue mode every time I boot.

Then I follow the instructions which are given in grub2 wiki site to boot.

The grub boot directory is now located in sda6 (hd0,6) in my system as found out using 'ls' command.

But in the grub rescue mode when I enter the 'set' command (one of the very few commands available), to display current prefix and root, it gives "(hd0,7)/boot/grub" as 'prefix' and "hd0,7" as 'root'.

After entering the following commands, I'm able to boot

Code:
set prefix=(hd0,6)/boot/grub
set root=(hd0,6)
insmod linux
insmod normal
linux /vmlinuz root=/dev/sda6 ro
initrd /initrd.img 
boot
Boot is successful and I can log in to my system and GUI and all

Then I update grub using update-grub command. Then I check the grub.cfg file to make sure the entries are right.

And the /boot/grub/grub.cfg has hd0,6 in every entry like

Code:
...insmod ext2
set root='(hd0,6)'
search --no-floppy ..
hd0,7 doesn't appear anywhere.

Then again at the next boot, again there is only a grub rescue prompt and prefix & root has (hd0,7).

There are other users at my home not familiar with ubuntu. windows is their OS of choice. So I don't want to remove windows installation.

I'm grateful to anyone who can shed some light on this or may know whats wrong here.

Last edited by harris4got; 12-07-2010 at 05:24 AM. Reason: More info
 
Old 12-07-2010, 09:27 PM   #2
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,097

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Are you able to boot windows?
Since you can get in with your method, once in do:
sudo os-prober
that will find windows if you can't boot it.
then do
sudo update-grub

Last edited by EDDY1; 12-07-2010 at 09:30 PM.
 
1 members found this post helpful.
Old 12-07-2010, 11:14 PM   #3
harris4got
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you for the reply

Thank you for the reply

I tried os-prober

root@jai-desktop:~# os-prober
/dev/sda1:Microsoft Windows XP Professional:Windows:chain

Then I updated grub

root@jai-desktop:~# update-grub
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-26-generic
Found initrd image: /boot/initrd.img-2.6.32-26-generic
Found linux image: /boot/vmlinuz-2.6.32-21-generic
Found initrd image: /boot/initrd.img-2.6.32-21-generic
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda1
done

But still it boots to grub rescue mode
 
Old 12-07-2010, 11:59 PM   #4
harris4got
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Solved!!

Problem solved..

All that was required was reinstalling grub

I did 'install-grub'

and everythings fine now

I would again like to thank Eddy1 for replying.
 
Old 12-08-2010, 12:12 AM   #5
EDDY1
Guru
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 5,097

Rep: Reputation: 451Reputation: 451Reputation: 451Reputation: 451Reputation: 451
Congrats and thank you, even though it was you who figured it out.
 
Old 04-23-2012, 02:27 AM   #6
spin12armd
LQ Newbie
 
Registered: Apr 2012
Posts: 5

Rep: Reputation: Disabled
same grub rescue problem, help me to solve it

same grub rescue problem, help me to solve it
 
Old 04-23-2012, 09:30 AM   #7
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,542

Rep: Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709Reputation: 709
spin12armd

Start a new thread. This one is marked Solved and not many will be looking at it. Post some details, what operating system(s), new installation? working previously? partition and drive information?
 
  


Reply

Tags
grub2


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
GRUB goes to rescue mode new instalation Person_1873 Linux - Software 5 12-26-2007 04:31 AM
Boot Error + GRUB + Rescue Mode najeebsyed2 Linux - Software 9 11-01-2007 09:08 AM
how to install grub using fc 4 installation cd .the cd has rescue mode amolgupta Linux - Software 2 03-15-2006 02:14 AM
reinstalling grub in rescue mode ELconkestador Linux - Newbie 5 02-13-2005 03:43 AM
reinstalling grub on rescue mode mabus92920 Linux - Newbie 3 01-15-2005 05:04 AM


All times are GMT -5. The time now is 08:04 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration