Installing Chameleon Using Linux

Sunday, July 18, 2010

So you want to experiment with the Chameleon boot manager, but you don’t have a Mac or Windows environment handy? Here’s how you could prepare a Chameleon-bootable USB key (or any other kind of disk, for that matter). Be warned that the following procedure would overwrite the target disk’s MBR, effectively wiping all data on said disk. Make sure that you do not target the wrong disk. Naturally, what you do with this information is your responsibility ;)

  1. Install hfsprogs (available in the Ubuntu repositories, if you use Ubuntu).
  2. Get the Chameleon binary package from <> and untar it, then navigate to the i386 directory in your terminal.
  3. Type `sudo dd if=boot0 of=/dev/sdX`, where /dev/sdX is the target disk; this is the step that cleans up the disk and loads a fresh MBR containing the stage-0 boot code.
  4. Make a new HFS+ partition (type AF) using fdisk. Let me know if you need help with this.
  5. Format the partition by doing `sudo mkfs.hfsplus /dev/sdX1`.
  6. Type `sudo dd if=boot1h of=/dev/sdX1` to install the stage-1 boot code to the bootsector of the new HFS+ partition.
  7. Now, type `sudo mount /dev/sdX1 /mnt` to mount the partition, where /mnt is your mount point of choice.
  8. Type `sudo cp boot /mnt/` to copy the final piece of Chameleon over.
  9. Unmount the partition using `sudo umount /dev/sdX1`.

Now you should have a shiny new Chameleon boot disk. I hope this helps.


  1. unknown says:

    Actually, dd if=boot0 of=/dev/sdX will break your partition tables if you are using a GPT partition table.

    Add a bs=440 count=1 in there. If you dont, dont forget to fix the partition tables using gdisk.

    Also, its safer to use the gptmbr.bin included with syslinux. This is by far a better mbr bootloader, and it adheres to the GPT standard. To use it, dont install boot0 to /dev/sdX, but cat gptmbr.bin to /dev/sdX, then mark the partition containing boot1h as bootable (bit 3 of the partition attributes field)

    1. mcurran says:

      It’s complaining about boot0 being a directory, so if I go into boot0 and run the command from there with a *, it complains that * is not a directory… WTF…

  2. Jiang says:

    Thanks for that tidbit. I will try this next time I set up my netbook.

  3. Jowo says:


    Can you please let me know on how to proceed with step 4. And before I begin with the process is it ok if I have a FAT32 formatted USB drive.

  4. Simon says:

    Unfortunately, using this guide I destroyed my MBR, but fortunately I could restore my partition table by using gdisk.


    dd if=boot0 of=/dev/diskX copies the content of boot0 to the disks intial bytes.

    If boot0 is longer than 440 bytes (as it was in my case), you will destroy your partition table.

    Make sure to have a boot0 file that has the exact lenght of 440 bytes or use dd as follows:

    dd if=boot0 of=/dev/diskX ibs=440 obs=440 count=1

    This will ensure that only the first 440 bytes of your boot0 file are copied to the MBR bootloader’s section.

Pingbacks & Trackbacks

  1. Freeze at Charmeleon Bootloader - Pingback on 2012/11/26