Ubuntu OS is missing

Hi friends,

I was using windows XP and UBUNTU 10.04 lucid linux Operating systems on my computer. I had my Ubuntu installed on (f directory and C,D,E directories were used by Windows XP. Usually i used to get option for selecting the OS while starting the computer(Here in my case XP or Ubuntu). Since my XP got corrupted, i formatted my C: drive and again installed windows XP in the same directory where it was previously installed. Having done that, windows XP is working fine. But to my great shock, i'm not getting the option for selecting the OS at boot time and windows XP starts automatically. Can somebody please help me fix this? Thanks in advance


Best regards,
Hussain
 
Windows XP has kindly nuked the bootloader for you. There are several ways of recovering from this, I favour Super Grub/Grub2 Disk, though someone else may have another, more noob friendly, option for you? SGD should be simpler than mounting the root partition, and chrooting in, from a live session however.

If you do go down the Super Grub Disk route, it's best to just get it to boot in to the newest kernel first, don't have SGD actually install grub. Once you're in you can then reinstall grub to the mbr:

e.g. as root do

Code:
grub-install /dev/sdX

Or if you still have an old PATA/IDE disk

Code:
grub-install /dev/hdX

Where 'X' is the id of your disk.

That should work, if not then maybe

Code:
os-prober
update-grub

For Ubuntu, prefix all commands that require root privileges with "sudo" or enable the root account.
 
Thanks caravel for your suggestion. I have got few doubts how to proceed with it as my Ubuntu 10.04 is not displaying at boot time and WINDOWS Xp starts automatically.
So how can i use the linux commands which you have mentioned above? Also I have downloaded SuperGrub2 zip file, but i'm not sure how to proceed with this too. Please clarify

Best regards
Hussain
 
Opening the .zip file would be a start?

It should contain an .iso image, burn this to disc and use the disk to boot up.

Read the documentation here http://www.supergrubdisk.org/wiki/GrubNotInstalled

Don't worry about following the guide to install grub, once you have booted into your system, install grub as I have already detailed above.

Reboot (remove the disc from the drive) and the grub 2 menu should be back.
 
Back