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 56 posts on DailyBlogged.

Thomas is a self-proclaimed guru (just ask him). He enjoys long walks on the beach, running Mac OS X on his Inspiron 1525, and tweeting about nonsensical life happenings. You can follow Thomas on twitter, email him, or search the interwebs for all his personal information. Neither should be too difficult.

108 Responses to “Booting Ubuntu With The Chameleon Bootloader”

  1. Lex Says:

    Great tutorial! Okay, so I tried it and have everything… well, almost everything working. I installed OS X with Chameleon 2 RC4 and used the free space to install Ubuntu Netbook Remix 10.04 (GRUB2!?) following the tutorial word by word. I typed [df] in a terminal, [sudo grub-install --force /dev/sda5] and ignored all the warnings. Afterward I booted with OS X USB into HD OS X, installed Chameleon 2 RC4 again and rebooted, removing the USB…

    Everytime I boot it goes automatically to GRUB menu and not to Chameleon. The only way for me to boot back into OS X is with the USB stick. If I boot with USB OS X I do see Linux as an option and I can boot through Chameleon via Grub to Ubuntu.

    Any suggestions would be very much appreciated.

    Reply

  2. Steen Says:

    Erm, okay, I know this is a bit off the guide, but I’m trying to do the same, but with Jolicloud (Which is based on the Linux kernel). Jolicloud doesn’t have a terminal (Of what I can see) so I’m trying to install GRUB from an Ubuntu Live CD. I already know that the root partition of Jolicloud is /dev/sda3, and I even tried mounting it first. But whenever I run “grub-install /dev/sda3″ it returns “Could not find device for /boot”
    Exploring the mounted device, showed me that there was a /boot directory. It’s just not on a different partition as I already had 3 other partitions. 2 for Windows, 1 for OS X. What should I do?

    Reply

  3. Rishi Says:

    Hi Thomas,
    After I move GRUB to the Ubuntu partition, how do I boot into OS X? GRUB overwrote Chameleon, right? So it’s no longer located on the MBR? Thanks for the guide and your help!
    -Rishi

    Reply

  4. D A Says:

    Thank you very much. I recently found an old 160gb PATA drive and decided to put ubuntu on it. After doing so Chameleon did not recognize it, yet I was able to boot into both systems by holding f12 at boot. I read your tutorial, followed all the instructions and it now works perfectly. Thanks!

    Reply

  5. HsingH Says:

    Hey guys…. every time I do this it breaks my bootloader and gives me (Error 17: Cannot Mount Partition) when I try to load Red Hat through Chameleon…. any ideas? I have three HD (one linux, one osx, and one windows7) and there is only one partition on the linux drive. It is possible for me to boot the HD from the bios and it works…. sometimes (always if I don’t install the grub again) can anyone help me out…. Thanks….

    Reply

  6. Jai Says:

    OK.. I have been all night up to solve the triple-boot OSX, WIN 7 and Kubuntu and FINALLY I GOT IT RIGHT.

    This method worked for me. Still you have to give credit to this forum author…

    I had win 7 installed and then OSX (iATKOS 7) and was working fine. I installed kubuntu and then lost chemeleon. Only Grub was loading that didn,t boot me into OSX. Now I was stuck with ugly grub boot that didn’t boot me into OSX.

    After reading several forms, this worked for me.
    - using iATKOS install DVD, I installed only chemeleon. (thanks to this forum)
    - next, got back chemeleon but I lost win 7 login. I was able to boot into kubuntu and OSX. Tried Win 7 install dvd to repair but didn’t work
    - luckly, I had ACRONIS BOOT CD (with Disk Director and true image)
    - used this cd and boot into Disk Director. Made win 7 partition active
    - Using win 7 install DVD, did repair and this time it worked.
    - Now I was only booting into win 7
    - booted back into ACRONIS DISK DIRECTOR boot cd and now made OSX partition active.

    Thats it..now all 3 OS works…Chemeleon looks awesome.

    Good Luck..

    Reply

    • Thomas Says:

      Jai- All you really had to do was follow the few, very simple steps in this guide after installing Kubuntu and you would have achieved the same results.

      Reply

  7. Mark Says:

    Thomas I have been using the terninal now to load my software & I tried the command you told me yestreday & it worked. Thanks so much for all you help . Thanks Mark

    Reply

  8. Mark Says:

    Thomas , I enetered the original command & got the same response do I eneter something different to force it? Sorry for writting so many responses I just love Ubuntu & want to keep it running . Thanks Mark

    Reply

  9. JohnK Says:

    Mark,

    I received exactly the same message. I went ahead with the command though and no apparent damage was done.

    Reply

  10. Mark Says:

    Thomas, I am getting closer the command worked but gave me a warning saying /usr/sbin/grub-setup:warn:Attempting to install GRUB to a partition instead of the MBR. This is a bad idea../usr/sbin/grub-setup:Warn:Embedding is not possible. GRUB can only be installed in the setup by using blocklists. However blocklists are UNRELIABLE and its use is discouraged.. /usr/sbin/grub-setup: errorr: if you really want blocklist use — force.

    Reply

  11. Mark Says:

    Hi Thomas, I emailed them again this morning hope you receive them . Thanks Mark

    Reply

    • Thomas Says:

      Yes, I did receive your emails this time. The correct command would be sudo grub-install /dev/sda1. I know that you tried this command last time and got a “command not found” error, but I think that was because you forgot to leave a space between “grub-install” and “/dev/.”

      Reply

  12. Mark Says:

    Hi Thomas, I sent screen shot of terminal & first shot Ubuntu 300 hd & other hard drives along with last three shots of Ubuntu hard drive . I tried in the terminal sudo grub-install/dev/sda1 & it said command not found tried dev/sda5 thought in that partion of Ubuntu hard drive might pichuop in Chameleon command not found is all I get in response . When I installed Ubuntu I clicked Guided use entire disk EXT 4 & adavanced Options checked install boot loader. Thanks for trying to help Mark

    Reply

    • Thomas Says:

      Where did you send the screenshots to? I haven’t received anything yet, though I’ll keep checking to see if any new emails arrive.

      Reply

  13. Mark Says:

    Hi Thomas, Yes I typed in the Ubuntu terminal df first & that brought up another screen showing detail’s then I typed sudo grub-install/dev/sda3 & it said no such command . should I type sudo grub-install/dev/sda1. When I go into the hardrive on Ubuntu showing all three drive I click on the Ubuntu drive & it show file can I change it there. Thanks Mark

    Reply

    • Thomas Says:

      Find the disk with Ubuntu installed on it and replace /dev/sda3/ with that info. I can’t really be more specific than that. If you’d like, send me a screenshot of what you get after typing df and I can tell you what to type.

      Reply

  14. Mark Says:

    Hi I have three hard drive one with OSX Snow Leopard & 2nd with Windows 7 & third one Ubuntu 10.04 . I have chameleon loaded on the OSx drive & can boot OSx & Windows does not show Ubuntu in Chameleon . I changed bios to load Ubuntu first & it load no grub showing when it loads. I went to the terminal & type what you wrote on the first step said no order found . When I open Ubuntu it show all three hard drives dev/sda1 ubuntu & dev/sda2 win & dev/sda3 OSx can I put Chameleon on the Ubuntu & acess all three drive that way. I am a beginner and just trying my best Please help when you have time . Thanks Mark

    Reply

    • Thomas Says:

      When you say you typed the first line into Terminal and got the error, I’m assuming you meant sudo grub-install /dev/sda3 and not df. Remember that you have to replace /dev/sda3 with the correct information for your own Ubuntu Drive. This should resolve your issue.

      Reply

  15. JohnK Says:

    Thomas,

    Thanks for the response. I followed your guide and now am able to boot OSX, Windows 7, and Ubuntu from Chameleon. I do still have one issue that you might be able to help me with. When I boot into OSX, just as the UI appears I get a dialog reading as follows: “Disk Insertion The disk you inserted was not readable by this computer”. It then gives me the choices of “Initialize”, “Ignore”, and “Eject”. I don’t see the dialog if I remove the Ubuntu drive so I’m sure that one is what OSX is complaining about.

    The end result is that I cannot mount the Ubuntu drive in OSX. I really don’t care about that problem, rather it is just the irritation of seeing that message every time I boot.

    Thanks for any help you may be able to provide.

    John

    Reply

  16. JohnK Says:

    Thomas,

    I’m sorry that my comment offended you. That was not my intent. The way I read your guide it appeared to me that you were addressing the problem in the context of Chameleon and Grub being in two different partitions on one drive. Thanks for your help.

    John

    Reply

  17. Alexander Brown Says:

    Thomas – I know this is a bit unrelated, but could you help me? I installed Vista AFTER OS X, and now I am dual booting with the Vista Boot Manager. However, I want to replace that with Chameleon. I’ve been thinking about simply reinstalling it, but will that render my OS X unbootable?

    Help would be appreciated.

    Reply

    • Thomas Says:

      Alexander Brown- My apologies for the delayed response. To use Chameleon over the Vista bootloader, simply follow the first set of red commands in this guide. Do note that though the commands list to create a new partition, you can simply skip that step and select your current HFS+ partition. So, to reiterate, the commands you would follow would be list disk, select disk, list partition, select partition, active. This will set your OS X partition as the active partition, thus making it the default bootloader. Also note that Chameleon may have to be reinstalled after following this.

      JohnK- That was the intent of the post, though I should have specifically listed that multi-drive booting was supported as well. My apologies for the confusion.

      Reply

  18. JohnK Says:

    Did you actually read my post? This thread is about multibooting on one drive. My question regards booting from three separate drives.

    Reply

    • Thomas Says:

      I did read your post, and I understood it completely. My question to you now is if you actually tried my guide. As long as you install GRUB to the partition, it will work for you. Next time actually try the guide before being a smart ass in the comments.

      Reply

  19. JohnK Says:

    I have a slightly different problem. I first installed OSX896 on a drive and got everything working. I then installed Windows 7 on a second drive. When I boot into Chameleon it sees both OSX86 and Windows 7. I can boot into either one with no problem. Last night I installed Ubuntu on a third drive. But when I boot into Chameleon it still sees only OSX86 and Windows 7 – not Ubuntu. I reinstalled Chameleon but still have the same problem. As a side not when I boot into OSX86 through Chameleon OSX immediately tells me there is an unrecognized drive and wants me to eject it or initialize it. Any ideas?
    Thanks.

    Reply

  20. Alexander Brown Says:

    Is this guide for installing Ubuntu BEFORE or AFTER OS X is installed?

    Reply

Trackbacks/Pingbacks

  1. Replaced Chameleon with Grub...Help. - Wed, 19th May 2010

    [...] no error message, it just restarts after a few seconds. I've tried to move Grub using this method: Booting Ubuntu With The Chameleon Bootloader|Daily Blogged But haven't gotten any love. At this point I'm thinking the best bet would be to overwrite GRUB [...]

Leave a Reply