Reinstalling Grub in Ubuntu

Recently I faced trouble with installing fedora with my ubuntu already installed. The grub that comes with fedora can not detect the existence of ubuntu, so I thought I virtually lost my ubuntu installation( at least, I couldn't boot from ubuntu any more )! Thanks to Zaher, da linux-guru( or goru, as i say it :p ) who solved it painlessly...:D This also works when you reinstall windows and pull your hair off trying for just another glimpse of the good-old linux you had...

  1. Boot from any other version of linux if installed( eg. fedora ) or from a live CD ( eg. ubuntu 7.10 )
  2. Open the terminal, and enter the command grub( u must be superuser, eg. in ubuntu, write sudo grub )
  3. enter find /boot/grub/stage1
  4. Here you would see a list of the drives which are potential bootables. Say you want to boot from hda0,1 ( hd0 the first harddisk, 1 stands for the partition count relative to c: )
  5. enter root ( hda0, 1 )
  6. enter setup ( hda0 )
  7. DONE! :)

Posted bysamir at 1:34 AM  

0 comments:

Post a Comment