Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have the following scenario:

I had a dual boot option on my laptop with Windows Vista Home Premium and Red Hat Linux Enterprise Edition 5.0. In order to install Ubuntu on the partition having RHEL, I deleted that partition using windows disk management. Then I installed Ubuntu using Wubi on a drive other than the C drive which has Vista.

After the installation I restarted the box and now I can't log on to my Windows and all I get on start up is Grub prompt. I tried a few things at the grub prompt like - root (hd0,0) but all I get is filesystem type unknown, partition type 0x7

I also have Ubuntu on a USB using which I can see my Windows partitions.

Any help with this is much appreciated. I'm kind of a novice with grub, so haven't tried anything advanced.

cheers

share|improve this question

3 Answers 3

Try doing this, I've had this work on a dual boot with windows where grub messed up the master and slave partitions (Windows still thinks its on the master and gets messed up)

Add the following lines to /boot/grub/menu.lst

title Windows 
map (hd0) (hd1) 
map (hd1) (hd0) 
rootnoverify (hd1,0)
chainloader +1

then after that is in do this command:

update-grub

And reboot

Edit: http://www.linuxjournal.com/article/4622 This is a pretty good all inclusive guide to grub and has some directions for directly starting up a partition from the prompt

share|improve this answer
    
Sorry for being naive here but how to edit /boot/grub/menu.lst from the grub prompt? –  Andriyev Sep 29 '09 at 15:09
    
Ah think I missed part of that, so your ONLY getting to grub and no further. Are you able to use your Ubuntu on a stick to get at the grub config on the linux partition? –  Shial Sep 29 '09 at 15:21
    
Actually better yet, just enter in those commands I listed right there at the grub prompt. and instead of doing the update-grub and reboot just type in Boot –  Shial Sep 29 '09 at 15:25
    
Thanks for the replies so far. I tried the first command i.e. title Windows, which gives me 'Error 27: Unrecognized command'. –  Andriyev Sep 29 '09 at 15:35

Once upon a time I had also a similar problem: I could not boot Windows from Grub anymore. The tool that saved my life (it was my wife's computer :-) ) is gparted. There is now a better version gparted-magic. That time it had to do with cylinder boundaries on the drive. Did you resize the partition? If yes this could be the point also for you. With

fdisk -lu

on the command line after booting gparted, you can list the partitions and their placement. Post it here into your question someone else might then also better help you (this command does not change anything to your drive).

I would gather info first, post it here and try out a change once having more answers & ideas (before really damaging a partition). I mean having a look does not harm but do not change anything first. If the numbers out of this command are somehow odd, we could tell you more, if not, the problem is probably something else.

Someone told me that disabling the drive geometry recognition in the BIOS might also help but couldn't figure out how to do that in my BIOS.

share|improve this answer

I guess your MBR is not consistent with your partitions, if so you may need to restore MBR.

Boot into grub prompt, then try this:

find /boot/grub/stage1  
setup (hd0)

This will restore your MBR in a consistent way, then reboot, you should have Windows and Linux boot options in the grub menu. See this

If above trick does not work, then try what Shial suggests without the first title command, i.e.

map (hd0) (hd1)  
map (hd1) (hd0)  
rootnoverify (hd1,0)  
chainloader +1

This will not resolve the issue ultimately, though it will help you boot into Windows.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.