- Insert your Ubuntu LiveDVD / USB .
- after boot use
- when live system started
- open terminal by using
CTRL + ALT + T
- then type
- then type
That's it !
mostly you will get error when using
sudo grub-install on live environment so do steps bellow (on live env too):
P.S: make sure you have completely shutdown your Windows before do this
to do this from windows CMD or RUN type
shutdown /r /t 0 .
Open Terminal (CTRL + ALT + T).
mount the Ubuntu partition by
sudo mount /dev/sd# /mnt replace # with your Ubuntu partition as ex.
sudo mount /dev/sda2 /mnt
mount the boot partition
sudo mount /dev/sd# /mnt/boot replace # with boot partition, in most cases the boot partition is "sda1"
sudo grub-install --root-directory=/mnt /dev/sdX replace X with the order of disk you want to install grub on it , if you use a single hard drive it will be
It's done for now see
Update 2 (can also used for grub rescue)
after you installed grub successfully from
Update 1 and restart , you will get a grub command line screen do the following commands :
ls you will get the partitions in order similar to this :
ls (hd0,X) replace X with the number ,
you will get unknown file system , do it until you get
file system ext2 that's our target
after we get our target partition type
set root=(hd0,X) replace X with target partition number
(For x32 bit, works both for i386 and i686 systems) type
(for x64 bit systems do step 5 too if you get Not found do this ) type
(if step 6 not working only) type
ls /boot/grub to see the directories and files check every folder to find the
linux.mod file , then do the step 6 with modified path.
normal you will find your normal grub boot-loader boot into Ubuntu
from Ubuntu terminal type
sudo grub-install /dev/sdX replace X with the device , mostly it's
All done ! .