LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   re-installing grub on system (https://www.linuxquestions.org/questions/linux-newbie-8/re-installing-grub-on-system-906991/)

larry7 10-07-2011 03:00 PM

re-installing grub on system
 
ok,

So i had my laptop set up with Ubuntu 10.10 and Win 7 with grub as the boot loader. Windows recently died and had to be re-installed (the disk would not even consider repairing it). This had lead to grub not being the boot loader. I know it is difficult to install grub after windows, but i want to protect my Linux partition which is still good. how can i install grub now on the system?

thanks for any help,

Larry

Larry Webb 10-07-2011 04:21 PM

Quote:

Originally Posted by larry7 (Post 4492663)
ok,

So i had my laptop set up with Ubuntu 10.10 and Win 7 with grub as the boot loader. Windows recently died and had to be re-installed (the disk would not even consider repairing it). This had lead to grub not being the boot loader. I know it is difficult to install grub after windows, but i want to protect my Linux partition which is still good. how can i install grub now on the system?

thanks for any help,

Larry

It is not that difficult to reinstall grub. I am giving you a tutorial that I use and you need to read the section 'Reinstalling grub2 live cd and use your ubuntu cd to repair.

Grub2

Ask if there is something you do not understand.

frieza 10-07-2011 04:29 PM

1) boot from livecd
2) open terminal (applications->accessories->terminal)
3) switch to root (sudo su -)
4) mkdir /mnt/recover
5) mount /dev/sda1 (or whatever your / partition is)
6) mount --bind /proc /mnt/recover/proc
7) mount --bind /sys /mnt/recover/sys
8) mount --bind /dev /mnt/recover/dev
9) chroot /mnt/recover
10) grub-install /dev/sda (or whatever drive your / partition is on, usually /dev/sda)
11) reboot


All times are GMT -5. The time now is 04:27 AM.