LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-25-2011, 11:31 PM   #1
Sirnot1
LQ Newbie
 
Registered: Jun 2011
Location: New York City, New York
Distribution: Mandriva 2010.2, Puppy Linux, Ubuntu 11.04
Posts: 19

Rep: Reputation: Disabled
Exclamation 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,
 
Old 06-25-2011, 11:54 PM   #2
linuxxer
Member
 
Registered: Apr 2011
Location: I have my own planet
Distribution: SlackwareŽ
Posts: 72
Blog Entries: 1

Rep: Reputation: Disabled
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.
 
Old 06-26-2011, 01:32 AM   #3
Sirnot1
LQ Newbie
 
Registered: Jun 2011
Location: New York City, New York
Distribution: Mandriva 2010.2, Puppy Linux, Ubuntu 11.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
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?
 
Old 06-26-2011, 08:14 AM   #4
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,348

Rep: Reputation: 184Reputation: 184
what partition is ubuntu located on? a entry similar to this should work
root=(hd0,0)
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.

Last edited by colorpurple21859; 06-26-2011 at 08:15 AM.
 
Old 06-26-2011, 08:23 AM   #5
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,017

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Ubuntu uses grub2 so there is no /boot/grub/menu.lst

Here is how to reinstall grub2
 
Old 06-26-2011, 12:39 PM   #6
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,965

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

Quote:
title Ubuntu-10.10
root (hd0,4)
kernel /boot/grub/core.img
#savedefault
#boot
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.
 
1 members found this post helpful.
Old 06-26-2011, 02:12 PM   #7
colorpurple21859
Senior Member
 
Registered: Jan 2008
Location: florida
Distribution: slackware64-current, puppy, ubuntu
Posts: 1,348

Rep: Reputation: 184Reputation: 184
yancek way works, my method gives you a console repair screen.
 
Old 06-26-2011, 03:51 PM   #8
Sirnot1
LQ Newbie
 
Registered: Jun 2011
Location: New York City, New York
Distribution: Mandriva 2010.2, Puppy Linux, Ubuntu 11.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
How do I open menu.lst in Mandriva, so I can edit it?
 
Old 06-26-2011, 04:00 PM   #9
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,965

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
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.
 
Old 06-26-2011, 04:15 PM   #10
Sirnot1
LQ Newbie
 
Registered: Jun 2011
Location: New York City, New York
Distribution: Mandriva 2010.2, Puppy Linux, Ubuntu 11.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
When I try to log in as root it says "Root logins are not allowed". What settings do I need to change?
 
Old 06-26-2011, 08:20 PM   #11
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,965

Rep: Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785Reputation: 785
Quote:
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.

Last edited by yancek; 06-26-2011 at 08:29 PM. Reason: Add info
 
Old 06-26-2011, 08:53 PM   #12
Sirnot1
LQ Newbie
 
Registered: Jun 2011
Location: New York City, New York
Distribution: Mandriva 2010.2, Puppy Linux, Ubuntu 11.04
Posts: 19

Original Poster
Rep: Reputation: Disabled
Thanks guys, I was able to edit menu.lst and boot Ubunutu!
 
  


Reply

Tags
boot, grub, mandriva, problem, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding Slackware 13 to Grub Boot loader of Ubuntu 9.10 vinnie_vinodh Slackware 3 01-28-2010 09:38 AM
Adding Fedora11 and Ubuntu 9.04 back to menu.lst Jeff91 Linux - Newbie 5 08-24-2009 02:21 PM
Reinstalled Windows, have grub, need UBUNTU back! Ryupower Ubuntu 23 06-16-2008 05:47 PM
Problems adding Knoppix to Grub in Ubuntu Neo-Leper Linux - Distributions 4 07-25-2007 04:25 PM
How do you get back into Ubuntu if you don't put Grub on the MBR? Marrea Ubuntu 7 07-21-2005 06:27 AM


All times are GMT -5. The time now is 11:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration