Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have dual boot system with Ubuntu 11.10 (installed first) and Fedora 16. I have actually two problems.

  1. how to avoid manually running update-grub after a Fedora kernel update?
  2. after running update-grub, the kernel parameters passed by fedora are missing the grub conf file in ubuntu.

Please let me know if there is a solution.


share|improve this question

closed as too localized by James, Marco Ceppi Feb 3 '12 at 1:26

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Sorry, could you please clarify: Is the Ubuntu or the Fedora bootloader installed? Where is your bootloader installed? – severin Nov 20 '11 at 19:19
ubuntu bootloader is installed to mbr(i guess). Fedora to /dev/sda2 where it is installed. there is no separate /boot partition. – nariknahom Nov 21 '11 at 17:18
does this describe your problem ? – severin Nov 21 '11 at 17:32
no. I am looking for what @ppetraki mentioned "Ubuntu's grub simply has a pointer to Fedora's grub". Unfortunately what he suggested doesn't seem to work. – nariknahom Nov 21 '11 at 19:07
Well, we need more information from you to begin with, and ensure that you executed the directions correctly. This isn't an easy thing to setup and will require some debugging. Could you please go back and adjust the problem description to include things like the partition layout and mount points for both operating systems? How about a photograph of the grub failure or a post of the updated /boot/grub/grub.cfg that's pointing to the Fedora partition/grub? – ppetraki Nov 21 '11 at 19:15

On the topic of adding the Fedora entry to the generated Ubuntu menu list, 40_custom should look something like this.

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

# Boot Fedora's grub from partition
menuentry 'Fedora OS'
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos2)'
    kernel /boot/grub/core.img

Then run update-grub, if that doesn't end up working for you change the line that says kernel and change it to linux.

share|improve this answer
my job is keeping me busy. i will definitely try it this weekend. – nariknahom Nov 22 '11 at 18:13

It sounds like your dual-boot config is "sub-optimal", that you may be sharing /boot between Fedora and Ubuntu and are using one grub (Ubuntu's) to maintain two lists of installed kernels. They will never be in sync.

If you want your dual boot to be more manageable, I would recommend re-installing grub on Fedora to install to a "partition" (e.g. separate /boot partitions) and not the MBR, then from Ubuntu who is the primary bootloader (in MBR) will "just boot Fedora" and it's kernel config/grub will take care of itself.

If you're trying to use a Fedora kernel on Ubuntu, which is no different than installing a custom kernel from scratch, is highly discouraged.

Now I haven't done this in a while so you might have some tinkering to do. To accomplish grub move, from Fedora you have to run 'grub-install /dev/sdX' where X is the partition that contains /boot for the Fedora kernel. If this is co-resident with the Ubuntu /boot then you'll have to move it and create a new one.

Then from Ubuntu, edit /etc/grub.d/40_custom and add something like this.

# Boot Fedora's grub from partition
title Fedora OS
root (hd0,2)
kernel /boot/grub/core.img

That (hd0,2) assumes your Fedora /boot is on sda2, adjust that according to your installation.

Run update-grub and it should "just work". Now that Ubuntu's grub simply has a pointer to Fedora's grub, whenever Fedora upgrades the kernel, it can do so without being thwarted by the Ubuntu, which maintains the grub menu list. Each OS will maintain it's own grub and they'll live happily ever after. You should never have to run update-grub again from Ubuntu to reflect kernel updates in Fedora.

share|improve this answer
ubuntu's grub2 is installed and loads both ubuntu and his 2nd os, Fedora. This means, that after a Fedora kernel upgrade nariknahom has to boot into Ubuntu and run update-grub, otherwise grub2 boots Fedora's old kernel. He certainly doesn't try to use a Fedora kernel for ubuntu. – severin Nov 20 '11 at 17:55
Assuming that's true, seeing that we don't have his actual config. Would that not be addressed if Fedora used a separate boot partition and grub was installed there? Why is this any different that jumping to the Windows bootloader? The OS prober knows it's there and adds an entry. If the OS prober gets that wrong, then that's a bug. – ppetraki Nov 20 '11 at 18:02
Well, you're right we don't have his actual config. But you didn't ask for a clarification of his actual setup, but jumped to some conclusions, like he would be trying to use the Fedora kernel for Ubuntu. However, most importantly, you shouldn't end an answer with You're on your own. . – severin Nov 20 '11 at 18:21
You take my comment out of context, phrase only applies to the last sentence, and not the entire post. That was a choice I made in the triage to not ask for more information. It may have come off as a little blunt and for that I apologize. In any event, the prescriptions I've submitted will solve his problem, especially the lack of Fedora kernel args being maintained by our grub scripts. Which is far as I'm concerned is the root cause, don't maintain another distro's kernel entries with foreign tools, it's just more trouble than it's worth. – ppetraki Nov 20 '11 at 19:09
I tried the option of adding to 40_custom but it doesn't seem to work. I still get the ubuntu generated options and nothing pointing to fedora grub. i will try understand these options and try again. – nariknahom Nov 21 '11 at 19:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.