-   Linux - Newbie (
-   -   Adding Ubuntu back to GRUB (

Sirnot1 06-25-2011 11:31 PM

Adding Ubuntu back to GRUB
Hi Guys,

I recently switched from Ubuntu 11.04 to Mandriva 2010.2 and I have encountered a somewhat-serious issue. When I recently rebooted my computer to boot into Ubuntu (to export Chrome bookmarks, etc), I found that the GRUB was entirely overwritten by the Mandriva install, making me unable to boot into Ubuntu. How do I add my Ubuntu partition to GRUB, so I am to boot into it also?

Any help appreciated,

linuxxer 06-25-2011 11:54 PM

Hi Sirnot1,

First boot from Mandriva Linux, then mount Ubuntu's /boot partition.
Open Ubuntu's /boot/grub/menu.lst (if it is older version of GRUB).
Copy Ubuntu's boot configuration, paste it into Mandriva's /boot/grub/menu.lst file.
Then restart the machine.

I think, this issue will resolve.

Sirnot1 06-26-2011 01:32 AM

I checked Ubuntu's grub folder and it doesn't contain a menu.lst file. It must be a newer version of GRUB. What should I do now?

colorpurple21859 06-26-2011 08:14 AM

what partition is ubuntu located on? a entry similar to this should work
kernel /vmlinuz root=/dev/sda1
initrd /initrd.img

this is assuming ubuntu is on the first partition of the first harddrive. the (hd0,0) and root=/dev/sda1 will change if the ubuntu is on a different partition and/or partition.

tredegar 06-26-2011 08:23 AM

Ubuntu uses grub2 so there is no /boot/grub/menu.lst

Here is how to reinstall grub2

yancek 06-26-2011 12:39 PM

I am booting Ubuntu 10.10 with Grub2 from PCLinuxOS (Mandriva based) with the following entry, Ubuntu on sda5:


title Ubuntu-10.10
root (hd0,4)
kernel /boot/grub/core.img
It works with or without the savedefault and boot lines on my system. Others have said they need to remove those lines to boot. You would need to ascertain whether the core.img file is in the Ubuntu /boot/grub directory.

colorpurple21859 06-26-2011 02:12 PM

yancek way works, my method gives you a console repair screen.

Sirnot1 06-26-2011 03:51 PM

How do I open menu.lst in Mandriva, so I can edit it?

yancek 06-26-2011 04:00 PM

You need to either log in to the GUI as root or open a terminal as root because only root user can edit menu.lst file.

Sirnot1 06-26-2011 04:15 PM

When I try to log in as root it says "Root logins are not allowed". What settings do I need to change?

yancek 06-26-2011 08:20 PM


When I try to log in as root it says "Root logins are not allowed". What settings do I need to change
Are you trying to log in to the Graphical User Interface? You should just open a terminal and log in as root. I don't have Mandriva installed but you should have a menu icon in the Taskbar or somewhere. Just look for terminal or konsole and click it to open it. The type: su - (hit the enter key) type your root password when prompted, hit the enter key again. You will then need to open a text editor, I don't know which Mandriva uses. You could try: kwrite /boot/grub/menu.lst to see if it opens. Personally, to edit files as root I always use vi text editor. (Just tried kwrite on my system, it opened as a normal user but not as root??)

EDIT: I used su instead of su -, so if you want to try kwrite, enter su - in a terminal, enter root passwd, type: kwrite /boot/grub/menu.lst. That should work also.

Try: vi /boot/grub/menu.lst
If this opens your menu.lst file, hit the "i" key (lower case Letter I for insert) then use the arrow keys on your keyboard to navigate to where you want to put the entry for Ubuntu. You will most likely need to change the root entry as you did not indicate which partition your Ubuntu was on. When you have inserted your entry, hit the ESC key on your keyboard and to save and exit type: :wq and hit enter. That is a colo and lower case letters wq. There are other ways, this is just the one I'm familiar with.

Sirnot1 06-26-2011 08:53 PM

Thanks guys, I was able to edit menu.lst and boot Ubunutu!

All times are GMT -5. The time now is 10:45 AM.