LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Grub Prompt (https://www.linuxquestions.org/questions/linux-general-1/grub-prompt-751305/)

Hi_This_is_Dev 08-30-2009 02:00 PM

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?

mdg 08-30-2009 02:11 PM

Yes, it is still in the MBR. You can fix it by following this link.

Hi_This_is_Dev 08-30-2009 05:31 PM

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!

mdg 08-31-2009 01:08 AM

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.

Hi_This_is_Dev 08-31-2009 01:47 PM

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?

mdg 08-31-2009 03:10 PM

Quote:

Originally Posted by Hi_This_is_Dev (Post 3664307)
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.

Larry Webb 08-31-2009 05:38 PM

Here are directions from the source

http://support.microsoft.com/kb/314058

michaelk 08-31-2009 06:16 PM

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.

Hi_This_is_Dev 09-01-2009 06:48 AM

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!

Hi_This_is_Dev 09-01-2009 06:52 AM

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?

michaelk 09-01-2009 07:07 AM

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


All times are GMT -5. The time now is 06:35 PM.