Booting Ubuntu With The Chameleon Bootloader

May 16th, 2009

Apple / Mac

***Credit goes out to RCC2k7 over Ubuntu Forums. He wrote the instructions, I just made it easy to find.***

linux penguinUbuntu and Chameleon, wouldn’t it be great if they just got along? That way you could boot to Ubuntu directly from the Chameleon Bootloader without having to change the boot partition every time (or whatever you used to do). The issue itself is actually between Grub (not Ubuntu itself) and Chameleon fighting to see who has the bigger cojones.

Grub and Chameleon both install themselves onto the MBR (Master Boot Record). Since they both try to install to the same place, whichever is installed last is able to stay on. This means that if you install Ubuntu and then you install OS X, you will be able to get into Chameleon to choose which OS you would like to boot to. The problem with this is that because you just installed Chameleon to the MBR, Grub was replaced at the top of the list and you can no longer boot to it. If you install OS X and then Ubuntu afterwards, you can boot to most other OS’s with Grub, but not OS X.

To have both Grub and Chameleon satisfied, you just need a couple of commands in the Ubuntu’s Terminal and everything can be fixed and working smoothly. So today, I’ll tell you how to move Grub from the MBR directly to the Ubuntu partition so that it remains intact when Installing Chameleon, but also so that you can boot Ubuntu directly from Chameleon. To do so:

1. Boot into Ubuntu like you normally would.

2. Launch Terminal.

3. Type df and press RETURN or ENTER.

4. Note the first entry on the list – the one mounted as /. This is the one we want. In my case it was /dev/sda3.

5. Type sudo grub-install /dev/sda3 – replace /dev/sda3 with the correct entry for your system.

6. Enter your Password and press RETURN or ENTER.

7. Close the terminal window and restart your system.

8. Boot into OS X and reinstall Chameleon.

9. Leave a comment below about how everything went for you.

While you’re at it, you may want to access your Ubuntu files from within OS X.

If you found this guide useful then feel free to make a donation by clicking the link at the end of the Authors Mini-Biography. Any amount truly does help.

, , , , , , , , , , , , , ,

About the author of this post:

Thomas has written 41 posts on Daily Blogged.

Thomas took over Daily Blogged back in August '09. He strives to keep Daily Blogged updated with new content, and to provide support for any that may need it. You can contact Thomas via email.

71 Responses to “Booting Ubuntu With The Chameleon Bootloader”

  1. Thomas Says:

    Glad I could help, Brian!

  2. Brian Says:

    Dude you rock! I just spent the whole weekend trying to get my 2 old hard drives (OSX & Ubuntu) transfered onto one new drive. I’ve lost track of how many dual boot guides I’ve tried, and every single one of them had me trying to boot OSX from grub….and failing. Thanks for pointing out the right way to do it.

  3. Nut Says:

    For those still having issues, make sure the Ubuntu partition is a PRIMARY partition (you may need to run a GParted Live CD or something and partition it yourself. And when installing Ubuntu, set the mount point of the partition yourself to “/”) The swap can be an extended partition if necessary. For me, Chameleon worked perfectly and displayed the Ubuntu option after installing Ubuntu without even reinstalling Chameleon.

  4. Sree Says:

    Hi Thomas,
    I am trying to triple boot the system with XP, ubuntu and Mac osx leopard 10.5.7
    No matter which one I install last (linux or leopard) the bootloader of the respective one takes over. Im using chameleon v2.
    If I install Mac last, Chameleon does not show the Linux partition.
    if if install linux last, even though grub would show mac as a os option to load, it just goes blank when I select it.
    I dont mind either bootloader and the main one. as long as it lets me properly boot into any of the OS systems.
    Any help would be great.
    I havent tried it yet but I was wondering if i install mac without the chameleon boot and then install linux, will that avoid the conflict.
    Any help would be great!
    Thanks

    Sree
    PS: XP loads properly no matter which bootloader is being used.
    Edit:
    Hi
    Sry!! forgot to mention that as of now Mac was installed last so im getting the chameleon bootloader showing only windows and mac OS options.
    Sree

  5. Thomas Says:

    While your point is valid, Chameleon can also boot all three OS’s, has more features than GRUB, and is much more attractive.

  6. Tomas Says:

    Just use grub; it boots into Windows, OSx86, Ubuntu and whatever else. First install 0SX and create a partition map using Disk Utility. Give maybe a third to Leopard. Then install Windows. With Windows make another partition in your free space, but leave 10 gigs or something. Then run the LIVE Cd with Ubuntu and install to a partition covering almost the rest of the drive. Ubuntu installs grub AUTOMATICALLY and will find Leopard and Windows as if it’s completely normal that they would show up on your drive. You can then boot into all three.

  7. Ted Says:

    Thanks Thomas.

    re my post below:
    I was waiting until I had a solution before posting again, and The Almighty Google didn’t hand me the solution, so I had to try using my brain. My solution (in case anyone else needs it), was to change the root reference that grub sees, from (hd0,0) to (hd1,0). I added a new listing to menu.lst. Now I boot from Chameleon to grub to Ubuntu.

  8. Thomas Says:

    Error 17 is a Grub error and I unfortunately do not know enough about Grub/Ubuntu to offer a solution. A quick google search for “ubuntu error 17″ returned this site and the solution may work for you. Good luck and sorry I wasn’t able to help more.

  9. Ted Says:

    Thanks for the great guide, very clear and helpful. I have Mac on one drive and Ubuntu on the other, and Chameleon now sees both the Mac and the Linux drive and I can boot to either… almost. Selecting Linux gets me to grub just fine, but Ubuntu fails to load with Error 17 (cannot mount selected partition). I suspect there’s something wonky with my setup – does this seem like an easy fix? (“/” for me was “/dev/sda1″)

  10. tino Says:

    Thank you this is exactly what I was looking for.

  11. Thomas Says:

    Glad you were able to resolve the issue!

  12. Vincent Gerris Says:

    Thanks for your quick reply Thomas, i fixed as followed:
    – boot ubuntu live cd
    – sudo grub
    – look in Gparted for partiotions, confirmed boot = /dev/sda4
    – in grub type root and then TAB through : hd0 shows 0-4 partitions,
    so i need hd0,3
    – type in grub : root (hd0,3)
    – then : setup (hd0,3)
    then quit, exit , reboot.
    Then it showed up in Chameleon, and heck, it boots :)!.
    Thanks for your tuotorial, hope this helps any1 else!

  13. Thomas Says:

    Boot to the Ubuntu LiveCD and run Partition Editor (GParted). Then set your Ubuntu partition as active. Now run the command to install GRUB and it should work.

  14. Vincent Gerris Says:

    I installed OS X after ubuntu,so no way to boot it now for me.
    I started the Ubuntu live cd en typed the command to install grub but it gave me the following error:
    Could not find device for /boot: Not found or not a block device.
    My / partition is /dev/sda2 , my boot /dev/sda4 .
    So I have /boot on a seperate partition.
    Any ideas on how tofi this?

  15. Martin Says:

    OK, reinstalling Chameleon from iatkos dvd worked! I reinstalled U64 and this time directed the grub location to the logical part and it now shows and boots under Chameleon, great!

  16. Martin Says:

    Hi, I was going to use your guide to install grub to my Ubuntu x64 which is on an extended partition (logical) as the six part on a hard drive. I mistakenly installed grub initially onto another hard drive which is my main osx drive previously using Chameleon. Now I can’t start with Chameleon on the osx drive because grub is taking over first. I’ve tried reinstalling Chameleon on the osx drive, but that didn’t work. Should I reinstall Chameleon using an install dvd instead of a using another working hard drive running osx? Any tips? Thanks.

  17. Thomas Says:

    Glad I could help.

  18. roflcopta Says:

    got it!
    (after i wrecked the bootloader again…)
    booted from usb and found that i did a stupid quotation mistake… (just as you mentioned)
    sorry for being n00bish
    anyway, thanx for your patience
    cheers
    rofl

  19. David Obluda Says:

    This worked out perfectly for me after a few hiccups. I had already installed ubuntu then osx86 over it on a different drive and chameleon didn’t see my ubuntu. After doing this like magic Tux appeared and everything is well. Back to the hackintosh now. thanks much Thomas.

  20. Thomas Says:

    I honestly think you’re missing a step or doing something wrong as these are not only the official instructions straight from the people who made Chameleon, but no one has ever had the problem before. Also, it seems as if you skipped the first couple steps of the Ubuntu/Chameleon guide as it sounds like you never moved GRUB from the MBR to the Linux partition. This could very well be the reason why you see GRUB before seeing Chameleon.

  21. roflcopta Says:

    no, i am in the right directory ;-)
    (/Users/YOURUSERNAME/Desktop/Chameleon-2.0-RC2-r640-bin/i386)

    but just read somewhere that the message could be ignored: “It simply indicates that the Boot code isn’t available for writing Intel bootable partitions. Apple doesn’t use that code anyway. The EFI boot code is built into the firmware.”
    so i will give a another try with rdisk1

Leave a Reply