0

I had installed windows 7 recently and thereby lost my grub. but my Linux partition is still there... I had Ubuntu 14.04 installed previously. I want to reinstall the grub from a live CD.But I don't have the live CD of ubuntu 14.04, I only have the live CD of ubuntu 13.10... is it okay to install grub from it?

1

1 Answer 1

1

Yes, it is perfectly fine to install the GRUB from 13.10 for 14.04. In fact, any distro which is using GRUB2 should be fine for use. However, as long as the Ubuntu installtion is present, you can use the grub utilities from it to install GRUB. From a live CD/USB, do:

sudo mount /dev/sda1 /mnt 

sudo mount /dev/ /mnt/dev -o bind
for i in /dev /dev/pts /proc /sys; do
    sudo mount -B $i /mnt/$i;
done 

sudo chroot /mnt /bin/bash -l

# From here on you're in the Ubuntu chroot, logged in as root.
grub-install /dev/sda 
update-grub
exit # exit the chroot

Of course, use the correct the partitions/disks in place of /dev/sda and /dev/sda1. Use the lsblk command or the GParted application to find out, if you're not sure.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .