If you're new here, you may want to subscribe to my RSS feed and if you have questions related to your ubuntu system post question to our forums. Thanks for visiting!
Method 1
Using Ubuntu 9.10 livecd
First you need to download Ubuntu from Ubuntu site
In this tutorial we are assuming the Ubuntu partition is sdc3,and /boot partition is sdc2
Note:- You need to replace sdc3,sdc2 with your partitions.You can check your partition table with fdisk -l
Now Boot up ubuntu from the livecd,open terminal from Applications menu -> Accessories -> Terminal and login as root using the following command
sudo -i
mount /dev/sdc3 /mnt
mount /dev/sdc2 /mnt/boot
grub-install
--root-directory=/mnt/ /dev/sdc
If you are not having “grub.cfg” file,use following contents to recreate
mount
--bind /proc /mnt/procmount
--bind /dev /mnt/devmount
--bind /sys /mnt/syschroot /mnt update-grub
umount /mnt/sys
umount /mnt/dev
umount /mnt/proc
exit
Method 2
Using GRUB for DOS
GRUB4DOS is an universal boot loader based on GNU GRUB. It can boot off DOS/LINUX, or via Windows boot manager/syslinux/lilo, or from MBR/CD. It also has builtin BIOS disk emulation, ATAPI CDROM driver, etc.
Download GRUB for DOS from here
For XP Users
copy the file grldr from grub4dos package to C:\.Edit boot.ini (hidden file) and add this line to the file:
c:\grldr=”grub4dos”
For Windows7/Vista Users
Copy the file grldr,grldr.mbr to C:\.Create boot.ini file in the root directory of C:,copy and paste following into this file.
[boot loader]
timeout=0
default=c:\grldr.mbr
[operating systems]
C:\grldr.mbr=”Grub4Dos”
Now,create menu.lst in root directory,with the following content
timeout 0
default 0
title grub2
find--set-root /boot/grub/core.img
kernel /boot/grub/core.img
boot
Now restart your computer,and select boot from Grub4Dos.Then select boot up Ubuntu in grub menu.
Once login,use this command to install grub into mbr
sudo grub-install /dev/sdc
Note :- Replace sdc with your partiton




i found it easiest to first save the mbr to a file on a memory stick, and then recover it after booting from a live cd.
google “save restore mbr +dd” - the instructions by Randy Cooper worked just sterling for me.
just remember not to destroy your disk… =)
I think this should also work for migrating from LILO to Grub if you installed Ubuntu from the Alternate CD.
Here is a simple way
http://linuxogrenmekistiyorum.com/2009/04/05/grubu-yeniden-kurmak/
Only five command
#
sudo grub
#
find /boot/grub/stage1
#
root (hd0,5)
#
setup (hd0)
#
quit
@Fikret:
Ääääääh, ja. Ich mag zwar n Berlin-Kreuzberg wohnen, aber ganz so einsichtlich war das für mich nicht.
Wird aber schon stimmen. Danke
Ehm, sorry. Too early with a coffee mug in my hands. Been reading in English and writing in German
Grab the translation here: http://bit.ly/30cNwi
@Fikret:
Ha ha. Your way is for grub1. This for grub2.
Hi, My Distro is Fedora 11 dual with Windows XP but I’m sure Ubuntu Grub is just the same. I could be mistaken but it seems to me you are all really going about this the hard way; me I’m just lazy, go here: http://www.supergrubdisk.org/ download the Supergrub boot disk of your choice (CD,USB Flash or Floppy) boot your system with it read what it says and press number 1 (usually) on the menu and that should fire up your usual session and when you close down and restart the Grub boot menu should be back to where it was before Windows trashed it
)