LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices



Reply
 
Search this Thread
Old 11-24-2009, 09:13 AM   #1
murthyna
LQ Newbie
 
Registered: Dec 2008
Posts: 15

Rep: Reputation: 1
Fedora 12 didn't recognize existing Ubuntu 9.10


I have Ubuntu 9.10 and Windows 7 in my system.

I have just installed Fedora 12 into the free space without any problem, but for some reason as I was suspecting, it did not recognize the Ubuntu in its grub menu. I probably made a mistake in choosing the option to make it install boot loader into /dev/sda, when it did not recognize it. Now I can only boot Fedora and Other (Windows), but can't find Ubuntu. All its file systems seem intact as I can see them in Fedora, including its partitions as they were.

Now I guess I need to somehow rescue the grub2 of Ubuntu and point it to chain load Fedora or vice versa. I really don't know how to do this or have never done it before. To complicate this, grub2 looks weird to me, not just editing the grub.conf.

Can anyone who knows this please help me?
 
Old 11-24-2009, 11:13 AM   #2
toynbee
Member
 
Registered: Jan 2007
Location: Maryland
Distribution: Arch and Red Hat
Posts: 34

Rep: Reputation: 17
Hi there.

In my experience, if you want to update your grub settings (including adding new partitions/operating systems/whatever to it), you would edit the file /boot/grub/menu.lst

I have mine set to offer me either Windows or Fedora. It looks like this:
title Fedora (2.6.31.5-127.fc12.i686)
root (hd1,0)
kernel /vmlinuz-2.6.31.5-127.fc12.i686 ro root=/dev/mapper/VolGroup-lv_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.i686.img
title Other
rootnoverify (hd0,0)
chainloader +1

If you know which partition has Ubuntu on it as well as a few other things about the configuration, you can easily add it. This thread offers some more information:
http://www.linuxquestions.org/questi...configure+grub

Hope that answers all your questions.
 
Old 11-24-2009, 12:05 PM   #3
murthyna
LQ Newbie
 
Registered: Dec 2008
Posts: 15

Original Poster
Rep: Reputation: 1
Thank for this input. As I understand Ubuntu 9.10 uses grub2. /boot/grub/grub.cfg file replaces menu.lst and this file is not meant to be edited. The corresponding entries in my file, (which are not active because grub2 is replaced by Fedora 12's grub):

menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,5)
search --no-floppy --fs-uuid --set 6e4e63b8-cb51-44ab-a752-ca3f7078d9e4
linux /vmlinuz-2.6.31-14-generic root=UUID=18b6c641-a62f-4a0a-9740-c97160ab4f18 ro quiet splash
initrd /initrd.img-2.6.31-14-generic
}

Now going back to Fedora (which is booting with grub), /boot/grub/menu.lst has the following entries:

title Fedora (2.6.31.5-127.fc12.x86_64)
root (hd0,8)
kernel /vmlinuz-2.6.31.5-127.fc12.x86_64 ro root=/dev/mapper/vg_fedorahome-lv_root LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us rhgb quiet
initrd /initramfs-2.6.31.5-127.fc12.x86_64.img
title Other
rootnoverify (hd0,0)
chainloader +1


I can do two things I suppose.
1. Boot with Ubuntu Live CD, mount the relevant partitions, edit grub.cfg shown above to include Fedora entries shown in menu.lst. Update grub2. This looks complex. I am also not sure whether the format of Fedora grub is compatible with grub2. Please confirm this. This is probably preferred, because I would like to retain and run Ubuntu and also its updates will preserve grub2 structure. I am not still comfortable with all the steps.

2. Update the Fedora's grub with the following entries

title Ubuntu (2.6.31-14-generic)
root (hd0,5)
linux /vmlinuz-2.6.31-14-generic root=UUID=18b6c641-a62f-4a0a-9740-c97160ab4f18 ro quiet splash
initrd /initrd.img-2.6.31-14-generic

2nd one sounds rather straightforward at least to try quickly. But the question is, is the entry format shown above compatible with grub? Should I change 'linux' to 'kernel' above and are there any changes to be done?

Thanks again in advance.
 
1 members found this post helpful.
Old 11-24-2009, 02:25 PM   #4
toynbee
Member
 
Registered: Jan 2007
Location: Maryland
Distribution: Arch and Red Hat
Posts: 34

Rep: Reputation: 17
It looks like you should change 'linux' to 'kernel,' but that's just a wild guess. The worst case scenario is an unusable option in your grub menu with no effect on the others. Let us know how that works.
 
Old 11-25-2009, 01:15 PM   #5
murthyna
LQ Newbie
 
Registered: Dec 2008
Posts: 15

Original Poster
Rep: Reputation: 1
Well, apart from many other things, two things relevant here, are different between grub2 and grub (legacy).
1. kernel is replaced by linux and linux16 in grub2. So I have to use kernel for grub.
2. partition numbering has changed. In grub2 first partitioning starts from 1, in grub it starts from 0.

Changing these two, make Ubuntu 9.10 also boot from grub.

Let me try and see grub2 in more detail and revert. Thanks for the inputs.
 
Old 12-07-2009, 11:54 AM   #6
murthyna
LQ Newbie
 
Registered: Dec 2008
Posts: 15

Original Poster
Rep: Reputation: 1
I am still not able to move from grub to grub2 after this, for the fear of some incompatibilities and issues. But found a way to boot grub2 from grub with the following entries (comments in the parentheses):

root (hdx,0) (replace x with the partition no. with grub numbering)
kernel /grub/core.img (it is generated & exists as /boot/grub/core.img; loads grub2)

It can be tested from the grub command line as well, with a 'boot' command after the above.

This solves my other problem of updated kernels in Ubuntu, which are placed in grub2 menu automatically, but not into the grub menu.
 
Old 01-02-2010, 11:23 PM   #7
woodnymph
LQ Newbie
 
Registered: Jan 2010
Posts: 1

Rep: Reputation: 0
i wonder if you ever found a solution here. my situation is similar to yours .. 9.10 w/ grub2 existing and i want to install a grub1 distro as triboot .. maybe just leave well enough alone .. or did you find a way for grub2 to load all your OSs? thx
 
Old 01-06-2010, 10:08 PM   #8
-kg-
LQ Newbie
 
Registered: Jan 2010
Location: Godfrey, IL
Distribution: Ubuntu, Fedora, OpenSUSE, Knoppix, Puppy
Posts: 24

Rep: Reputation: 0
Quote:
Originally Posted by woodnymph View Post
i wonder if you ever found a solution here. my situation is similar to yours .. 9.10 w/ grub2 existing and i want to install a grub1 distro as triboot .. maybe just leave well enough alone .. or did you find a way for grub2 to load all your OSs? thx
There is a way to accomplish this, if you're up to manual partitioning, which is usually the way to accomplish what I'm going to tell you:

When you install the new distro, you need to assure that it's GRUB is installed in it's partition, and not in the MBR area of the first HD. Not knowing which distro you are anticipating installing, you will have to research this yourself.

After installing the distro with it's GRUB installed in the root installation partition, you would then boot back into Ubuntu, open a terminal, then type in:

Code:
sudo update-grub
This will update GRUB 2's menu and include the new installation in the menu at boot up.

Now, for the OP:

Quote:
Now I guess I need to somehow rescue the grub2 of Ubuntu and point it to chain load Fedora or vice versa. I really don't know how to do this or have never done it before. To complicate this, grub2 looks weird to me, not just editing the grub.conf.
That would probably be best, though with GRUB 2 you won't really need to chainload Fedora...just run the "sudo update-grub" that I mentioned above.

Read this post, which will instruct you on (re-)installing Ubuntu's GRUB into the MBR. Once this is done, reboot into ubuntu and run the above command, which will update GRUB 2's Menu to include your Fedora installation.

This works perfectly, BTW (or at least it has for me). One consideration is that every time you do a kernel upgrade (except in Ubuntu, which owns GRUB in the MBR), you will have to run "upgrade-grub" in order for the new kernel in your other installation(s) to be shown in the GRUB menu.

I currently have 4 different Linux distros installed on my laptop (Ubuntu, Fedora, OpenSUSE, and Sabayon) and "update-grub" works to show the newest kernel each and every time.
 
Old 02-19-2010, 08:27 PM   #9
fayska
LQ Newbie
 
Registered: Mar 2009
Posts: 6

Rep: Reputation: 0
hey got a huge problem acording to this

Imagine this tried to edit menu.lst on terminal on Xubuntu 9.10 and it didn't existedon the boot folder, beyond that i created a file tried to copy it to the folder and it didn't gave the permission to do it, although i used the su command to enter my admin PW but kept without permissions as well i don't understand this why???? can i use Xubuntu and Fedora 12 at the same time? if these OS's recognize windows why don't they recognize each other??? what about an instalation package or feature to find OS's on the pc? c'mon men i have a friend running windows and linux on a machintosh laptop, all three running from the disk....
 
Old 02-20-2010, 05:14 PM   #10
-kg-
LQ Newbie
 
Registered: Jan 2010
Location: Godfrey, IL
Distribution: Ubuntu, Fedora, OpenSUSE, Knoppix, Puppy
Posts: 24

Rep: Reputation: 0
Quote:
Originally Posted by fayska View Post
Imagine this tried to edit menu.lst on terminal on Xubuntu 9.10 and it didn't existedon the boot folder, beyond that i created a file tried to copy it to the folder and it didn't gave the permission to do it, although i used the su command to enter my admin PW but kept without permissions as well i don't understand this why???? can i use Xubuntu and Fedora 12 at the same time? if these OS's recognize windows why don't they recognize each other??? what about an instalation package or feature to find OS's on the pc? c'mon men i have a friend running windows and linux on a machintosh laptop, all three running from the disk....
The reason that menu.lst doesn't exist under Xubuntu 9.10 (Karmic) is that Karmic uses GRUB2. GRUB2 no longer uses an editable menu.lst file and instead uses grub.cfg, which is not directly editable.

Quote:
Originally Posted by fayska View Post
can i use Xubuntu and Fedora 12 at the same time? if these OS's recognize windows why don't they recognize each other???
Of course you can, and they will recognize eachother. How to fix your problem depends on which OS owns GRUB in the MBR. Which one did you most recently install? If you last installed Karmic, then all you have to do is boot into it, open your terminal, and type in:

Code:
sudo update-grub
After you have updated Ubuntu's GRUB, the next time you reboot Fedora will be listed in the menu.

If you last installed Fedora, then Fedora owns GRUB. You will need to boot into Fedora and edit it's menu.lst, since the last I heard Fedora 12 still uses Legacy GRUB (though patched so it will recognize /boot on a partition formatted as ext4).
 
  


Reply


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
upgrading Fedora 6 to fedora 10 under existing dual booting with XP pares0007 Linux - Newbie 1 06-20-2009 09:05 AM
Install ubuntu linux on existing fedora partition hoolahoous Linux - Software 2 03-17-2009 06:46 PM
XP doesn't recognize Ubuntu, Ubuntu installed first. MonkeyBusiness Linux - Newbie 9 06-21-2006 04:58 AM
trying to reinstall fedora 3 over an existing fedora 3 installation mitra Fedora - Installation 4 09-22-2005 09:58 AM


All times are GMT -5. The time now is 02:56 PM.

Main Menu
Advertisement
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