Here are the steps.
1. Reboot. At the Fedora startup menu enter single user mode to reduce the risk of disk activity interfering with our work.
2. We will now need to properly configure grub to use the Fedora menu for Fedora boots using the Fedora grub boot loader and the Ubuntu menu for Ubuntu boots with the Ubuntu boot loader.
3. As seen before, Ubuntu was installed on the /dev/sda11 partition. We need to access those files. Mount /dev/sda11 on /mnt and run Ubuntuâ€™s version grub which should now be /mnt/usr/sbin/grub
# mount /dev/sda11 /mnt # /mnt/usr/sbin/grub
4. Grub numbers partitions and disks starting from 0. Linux numbers partitions starting from 1 and disks are defined alphabetically from a-z. So in this case Linux partition sda11 will be grub partition (hd0,10).
Use the device command to map the two together. Follow this with the root command to set up the Ubuntu grub boot loader to accept a transfer of authority from another preliminary loader, in this case it will be Fedora but we donâ€™t specify this yet. The setup command will configure grub correctly, and is done as a precaution as the Ubuntu installation process should have done this already.
grub> device (hd0) /dev/sda grub> root (hd0,10) grub> setup (hd0,10) Checking if "/boot/grub/stage1" exists... yes Checking if "/boot/grub/stage2" exists... yes Checking if "/boot/grub/e2fs_stage1_5" exists... yes Running "embed /boot/grub/e2fs_stage1_5 (hd0,10)"... failed (this is not fatal) Running "embed /boot/grub/e2fs_stage1_5 (hd0,10)"... failed (this is not fatal) Running "install /boot/grub/stage1 (hd0,10) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded Done. grub> quit
Note: DO NOT run the grub-install command to configure grub as you will be running the fedora version of the command against an incompatible Ubuntu partition. It will appear to work as seen in the following example but the rest of the setup will fail.
[root@smallfry-f]# grub-install /dev/sda11 Installation finished. No error reported. This is the contents of the device map /boot/grub/device.map. Check if this is correct or not. If any of the lines is incorrect, fix it and re-run the script `grub-install'. # this device map was generated by anaconda (hd0) /dev/sda [root@smallfry-f]#
Note: DO NOT run the grub-install command located on the Ubuntu partition or in a chroot jail will not work either giving messages like these
[root@smallfry-f ~]# mount /dev/sda11 /mnt/ubuntu/ [root@smallfry-f ~]# cd /mnt/ubuntu/ [root@smallfry-f ubuntu]# usr/sbin/grub-install /dev/sda11 /usr/sbin/grub: Not found. [root@smallfry-f ubuntu]# chroot /mnt/ubuntu root@smallfry-f:/# /usr/sbin/grub-install /dev/sda11 /dev/sda11: Not found or not a block device. root@smallfry-f:/# exit
Weâ€™re not finished yet. There a few more steps to go!
Configuring Fedora grub to dual boot with Ubuntu
Now itâ€™s time to configure the Fedora menu.lst file to point to the menu.lst of the Ubuntu installation.
Note: You can do the following steps while still in single user mode or you can reboot Fedora and do them in an ssh session as it will be easier to cut and paste some of the commands to follow. Remember Ubuntu will not boot yet or be displayed in the startup menu.
1. Edit /boot/grub/menu.lst and add the entries for Ubuntu with its own menu line option. The title command gives the Ubuntu entry the label â€œUbuntu Boot Menuâ€. The root command points to the /dev/sda11 partition or (hd0,10) as grub expects it to be called. Finally the chainloader command tells Fedoraâ€™s grub to hand over control to whatever grub boot loader is found in that partition. In this case that loader that will be found will belong to Ubuntu. Here is a sample of what it should look like.
# # File: /boot/grub/menu.lst # default=0 timeout=60 splashimage=(hd0,0)/grub/splash.xpm.gz #hiddenmenu title Fedora (22.214.171.124-117.fc10.i686) root (hd0,0) kernel /vmlinuz-126.96.36.199-117.fc10.i686 ro root=UUID=de68defd-1f82-4ad3-b39e-0776b15d6d92 rhgb quiet initrd /initrd-188.8.131.52-117.fc10.i686.img title Ubuntu Boot Menu root (hd0,10) chainloader +1
2. Reboot and you should now get a Fedora startup menu with an Ubuntu option. By using your arrow keys you can scroll down and select the Ubuntu option. This will then cause the Ubuntu startup menu to be displayed. You can boot Ubuntu by scrolling down to the menu item and hitting <enter>. From there you will be able to select the Ubuntu kernel of your choice. The default should be sufficient and will boot automatically after the Ubuntu menu.lst fileâ€™s timeout period expires.
Your dual booting configuration is complete. Boot your operating systems and configure them as you desire.