Results 1 to 8 of 8
Hi,
Please help. I have a PC with three partitions: C, D, E. The C: and D: partition are NTFS and C: has Windows XP on it. D: holds my ...
- 11-28-2010 #1Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Grub is corrupted
Hi,
Please help. I have a PC with three partitions: C, D, E. The C: and D: partition are NTFS and C: has Windows XP on it. D: holds my data files and folders in the Windows environment. E: has CentOS version 5.x. The machine is dual bootable. When booting up Grub gave me the options to boot to CentOS (by default) or to boot into Win XP (by selecting it).
Recently I used Partition Magic to resize the D: partition. I shrank the D: partition. The freed space space was then used to create a new NTFS partition.
After the partitioning was completed, I rebooted the machine. But now Grub is having a problem. It does not display the list of of bootable OS options any more. Instead there is just a black screen with the prompt:
grub>
What am I supposed to do here?
I am afraid that after I ran Partition Magic somehow Grub is messed up. How do I recover the previous boot options? Or at the minimum, how do I make the the machine to boot into Windows XP? Thanks for your help.
- 11-28-2010 #2Linux User
- Join Date
- Dec 2007
- Location
- Idaho USA
- Posts
- 351
at the grub prompt: (I am assumeing CentOS is useing grub legacy)
to boot XP type in:
rootnoverify (hd0,0)
chainloader +1
boot
When you used PM and made a new partition it moved linux partition from the third one (hd0,2) to the 4th one (hd0,3). Do you have a live linux cd ?
- 11-28-2010 #3Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Grub is corrupted
Thank you very much for the pointer; I was able to boot into Windows XP.
I only had the CentOS CDs (somewhere). Is that the same as a live Linux CD? If not, is there another way that I can boot into Linux and fix Grub? BTW, what's the name and location of that Grub configuration file? It has been several months since I logged into CentOS so my memory is fuzzy.
When I mentioned partitions C:, D: and E: above that was for the purpose of clarity and simplicity of the problem description.
Now, after I logged into Windows XP today I see these partitions:
C: Windows XP
D: Recovery partition for Windows
E: DVD-RW Drive
F: The new partition I just created last night with Partition Magic. I was planning to install Windows 2008 Trial Edition onto this partition
G: MMC/SD Windows XP cannot read this partition, perhaps it's CentOS?
H: CompactFlashI (perhaps some flash memory card reader? I bought this machine used so I am not sure about all the parts)
I: SmartMedia/xD (perhaps some flash memory card reader? I bought this machine used so I am not sure about all the parts)
J: The old partition that was shrunk last night to free up disk space for the F: partition
K: Windows displays this as 0 byte. Perhaps this is an unused disk partition? Or could it be CentOS?
L: MS/MS Pro (Don't know where this is on the PC)
BTW, if I cannot fix CentOS to get it running, is there some way that I can delete Grub and Linux completely from the machine and let the machine boot straight up into Windows XP?
Thanks for your help.
- 11-28-2010 #4Linux User
- Join Date
- Dec 2007
- Location
- Idaho USA
- Posts
- 351
I do not know if the CentOS CD is a live or just an install cd. If you remember when you booted the CentOS cd did you have a desktop or only choise was to install ?
At this point I can only make guesses, not the best method to use.
Have not used PM for some time but it likely can write a generic MBR code and make the XP partition 'Active'. That will boot directly into XP and then you can delete the linux partition but only after above sentance is done.BTW, if I cannot fix CentOS to get it running, is there some way that I can delete Grub and Linux completely from the machine and let the machine boot straight up into Windows XP?
can not make a guess what that might beK: Windows displays this as 0 byte
Once booted into XP get to 'disk management' and make a screen shot and post at ImageShack® - Online Photo and Video Hosting or similar site and then post a link here. That will provide a better idea how the hdd is partitioned. Partition Magic (PM) can also give a very good parition lay out for use, better then XP.
boot/grub/menu.lstwhat's the name and location of that Grub configuration file
From the grub prompt:
root (hd0, press the TAB key and all prtitions will be displayed, look for type "83", you could copy to paper and post here.
There is a program for XP that will let you read linux's ext3 file system, but do not know what file system CentOS uses.
I am assueming when you made the new partiton the CentOS partition # was changed , now not only menu.lst is wrong but might so be etc/fstab. If only the menu.lst, then you can use grub's auto complete function and boot into CentOS, its been a while for my use.
- 11-29-2010 #5Linux User
- Join Date
- Dec 2007
- Location
- Idaho USA
- Posts
- 351
Use the method below to try booting into your linux. All commands is from the grub prompt.
root (hd0, tab- look for a partition # with type 83 and fill in the "?" with #
cat (hd0,?)/boot/grub/menu.lst --
{I'm not sure if CentOS uses menu.lst or config.???. If you receive file not found, replace menu.lst with config and press tab to get file name}
Once your menu is displayed type in at promt what is written . Below is mine as an example.
root (hd0,?)
kernel /boot/vmlinuz root=/dev/hda1 nomce quiet splash
initrd /boot/initrd.img
now type in' boot'.
You will need to change the bold text above with the new correct #'s
The root=/dev/hda? could be root=/dev/sda?.
- 11-30-2010 #6Just Joined!
- Join Date
- Nov 2010
- Posts
- 7
Grub is corrupted
Thank you for the pointer.
I typed:
root(hd0,0)
root(hd0,1)
root(hd0,2)
root(hd0,3)
root(hd0,4)
All gave the same error:
Error 27: Unrecognized command
root(hd0,<tab>
did not yield any output, only a blank line.
I am still looking for the old CentOS CD. I think it was just an installation CD.
Someone mentioned to me about Super Grub disk. Can this fix the grub problem? Or do I need Super Grub2 disk?
- 11-30-2010 #7
I would guess Supergrub and Supergrub2.
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 11-30-2010 #8Linux User
- Join Date
- Dec 2007
- Location
- Idaho USA
- Posts
- 351
If you typed 'root(hd0,0)' , that would be wrong. There must be a space after root. Need the data provided by 'root (hd0, <tab> '. Supergrub or (2) should provide booting into a desk top (I think) where you could edit menu.lst and check/edit /ect/fstab, correcting the change of partition #'s.
Last edited by Lostfarmer; 11-30-2010 at 01:55 PM. Reason: made a typo


Reply With Quote