UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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
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?
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.
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.
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.
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
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.
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....
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
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.