LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Grub installation in ubuntu11.04 (https://www.linuxquestions.org/questions/linux-newbie-8/grub-installation-in-ubuntu11-04-a-922954/)

mandyapenguin 01-09-2012 08:44 PM

Grub installation in ubuntu11.04
 
3 Attachment(s)
Hi..All,
In RedHat based O/S I can easily recover grub menu after windows re installation by just running "grub-install /dev/sda". But in ubuntu I could never successfully recover the grub menu. So for practical purpose I installed XP and ubuntu 11.04 as dual boot on Oracle Virtual Box. I re installed the windows XP and now I want to install grub. I booted through Ubuntu11.04 Rescue CD. Here is the partitions details, please find the attachments also.
/dev/sda6 is mounted on /mnt/1 -->/boot partition
/dev/sda7 is mounted on /mnt/2 -->/ partition
/dev/sda8 not mounted --->/home partition
Here I have some confusions as in which I have to install grub when /boot is having separate partition. But I installed it on / partiton using
Code:

grub-install --root-directory=/mnt/2 /dev/sda
and found grub installed with no errors
Then I am trying to update the grub using
Code:

sudo update-grub
But I am getting the error as below
Code:

/usr/sbin/grub-probe: error: cannot stat `aufs'.
If I reboot the machine I am getting the prompt as
Code:

grub>
and unable to boot either windows or ubuntu
So please help me to recover the grub and in which I have to install grub / or /boot? when /boot is having separate partition

Larry Webb 01-09-2012 09:22 PM

Windows will need to chainload from grub,

If grub is in a separate partition you will need to mount that partition then run the command you have above but for the
(grub-install --root-directory=/mnt/sda? /dev/sda) the '?' being the partition that is your boot partition.

It is easier to do this with a live cd.

Now find a /boot/grub/grub.cfg in the / partition of your ubuntu installation and copy and paste it to your boot partition. If you did hot install grub you will have to make a grub.cfg.file.

I do not know if you have this tutorial on grub2 but check out Section 12 grub2

mandyapenguin 01-10-2012 09:59 AM

Thanks for the reply Larry Webb,
This link helped me to recover the grub menu. Thanks for your kind help.


All times are GMT -5. The time now is 06:55 PM.