LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 08-30-2009, 02:00 PM   #1
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
Lightbulb Grub Prompt


Hi,


In order to explain my problem let me give you the details of my system as follows:

HD: 80 GB
First OS: Widnows XP
Partitions for Windows XP: C, D, E, F, (Free)

Installed Second OS: RHEL 5
Partitions/File Systems of Linux: Use the Free space and installed RHEL and specified / and /home partitions.

Some 3 GB space was still left free which I found through My Computer - > Manage - > Disk Manage:

Code:
C
D
E
F
Healthy Unknown Parition
Healthy Unknown Parition
Free Space
So, I deleted the Free Space and created a new logical volume in Windows. Before that, both Windows and Linux were running fine as part of dual booting system. When I restarted the system.... errrrrrr
Code:
Grub>
prompt was there. Well, having seen it I wondered but was not worried because I am doing RHCE and my trainer taught me what to do when Grub> prompt comes. However, she said that it would come if grub.conf file was deleted. But I had not deleted any file, so, I went ahead did the troubleshooting part and was able to load linux and get the desktop. I checked the file grub.conf was intact and it must not have cuased the problem. I restarted the system and the same thing:
Code:
Grub>
was there.

I was not able to load Windows XP and so I was a little confused this time. I called some other trainer and she asked me to do the following:
Code:
Grub> rootnoverify (hd0,0) <enter>
Grub> chainloader +1 <enter>
Grub> boot <enter>

and voila! Widnows XP was loading!


So, I deleted the Linux partitions and restarted the system. But Grub> prompt was not willing to go away.


So, can you show me a way to remove the grub info in order for Windows XP to boot normally as if there were no Linux installed on the system? I have to do those steps over and again to boot from Windows:

Code:
Grub> rootnoverify (hd0,0) <enter>
Grub> chainloader +1 <enter>
Grub> boot <enter>


One more thing, when I have deleted the Linux partitions why Grub> is still alive? I think it is present in MBR. So, how to troubleshoot it?
 
Old 08-30-2009, 02:11 PM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
Yes, it is still in the MBR. You can fix it by following this link.
 
Old 08-30-2009, 05:31 PM   #3
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Thanks for the link! Got a good deal of info there! But I am not ready to do any R & D on my system so I will do that on a PC in the lab session. Why I don't want to do that on my PC is I read that it can damage the partition table and the partitions can possibly be become unusable or data can get swaped!

So, my question is: Is it safe to run
Code:
fixmbr
command from Recovery Console so that the MRB gets repaired / rewritten as it was before installing RHEL?

Thanks!
 
Old 08-31-2009, 01:08 AM   #4
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
That's the standard method to restore the MBR to pre-linux state. I've done it a few times with no ill effects.

Is it safe to run? It's as safe as all the other advice on this board. Bottom line, as always, it's your machine and your decision.
 
Old 08-31-2009, 01:47 PM   #5
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Well, so I didn't like my system to be in such a piteous state. I installed Recovery Console from the CD of Windows XP SP2, restarted the system and got the
Code:
Grub>
prompt as before. I typed the follwing commands (as before):
Code:
Grub> rootnoverify (hd0,0) <enter>
Grub> chainloader +1 <enter>
Grub> boot <enter>
and selected Recovery Console. I tried the following on the Recovery Console:

In the first attempt:

Code:
C:\WINDOWS> fixmbr C:
rebooted the system and got the same ugly Grub> prompt.


In the second attempt:

Code:
C:\WINDOWS> fixboot C:
rebooted the system and got the same ugly Grub> prompt.


So, finally I installed RHE Linux 5 again and I got rid of the piteous state of my system.

But the question is: How could I really get rid of the Grub> prompt? One more thing, what should be the proper or ideal steps of removing Linux from your system when you have Windows already installed and don't want to reinstall it?
 
Old 08-31-2009, 03:10 PM   #6
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
Quote:
Originally Posted by Hi_This_is_Dev View Post
I tried the following on the Recovery Console:

In the first attempt:

Code:
C:\WINDOWS> fixmbr C:
It should be "fixmbr" without anything else. The "C:" points to a partition and is almost certainly why it didn't work. The MBR is not part of any partition, it's the first sector of the disk.
 
Old 08-31-2009, 05:38 PM   #7
Larry Webb
LQ Veteran
 
Registered: Jul 2006
Location: Crystal Beach, Texas
Distribution: Suse for mail +
Posts: 5,100
Blog Entries: 7

Rep: Reputation: 229Reputation: 229Reputation: 229
Here are directions from the source

http://support.microsoft.com/kb/314058
 
Old 08-31-2009, 06:16 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,925

Rep: Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747
BTW there are no partitions associated with unallocated or free space nor can it be deleted. If you really deleted a partition as you stated in your first post you probably deleted your / partition. The reason you were only seeing the grub prompt was as stated due to the fact that the grub menu.lst file was deleted which Redhat typically locates in the /etc directory. fixmbr will remove grub and restore the MS bootloader to the MBR. To remove linux just run fixmbr and delete your linux partitions. You can create new or resize your existing windows partitions as desired.
 
Old 09-01-2009, 06:48 AM   #9
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Thumbs up Get rid of Grub prompt!

Yes, this will do:

Go in Recovery Console and type the following command:
Code:
C:\WINDOWS> fixmbr <enter>
C:\WINDOWS> boot <enter>

Thanks to you all!

Last edited by Hi_This_is_Dev; 09-07-2009 at 02:00 PM.
 
Old 09-01-2009, 06:52 AM   #10
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Original Poster
Rep: Reputation: 18
Code:
The reason you were only seeing the grub prompt was as stated due to the fact that the grub menu.lst file was deleted which Redhat typically locates in the /etc directory.


Well, there is no menu.lst file in my /etc folder. Please, note that only RHEL 5 is installed on my other PC where I looked for that file. Is it created only when we have more than one OS?
 
Old 09-01-2009, 07:07 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,925

Rep: Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747Reputation: 747
I might of been somewhat dyslectic.. /etc/grub.conf which is a symlink to /boot/grub/grub.conf
 
  


Reply

Tags
grub


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
grub drops to grub prompt on boot, but can use commands to find menu... fix? greenmuzz Linux - Software 7 06-07-2009 03:07 AM
correct grub.conf, reboot and cannot get grub prompt... sportivo888 Linux - Newbie 1 12-10-2007 11:47 PM
How do I use GRUB to boot linux at grub prompt? Mustbox Linux - General 2 02-15-2005 01:01 PM
Why grub prompt after installing Grub inder Debian woody 3.0r2? velan Debian 1 04-20-2004 04:55 AM
How do I use GRUB to boot linux at grub prompt? Trillseker Linux - General 5 06-19-2003 06:23 PM


All times are GMT -5. The time now is 08:08 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