I already know how to do it on Mac OS X (plenty of instructions online).

But is it possible to do it on Ubuntu? If yes, how?

  • I think that your solution (Question and answer) already exist in this post. – Lucio Dec 5 '12 at 18:06
  • 2
    @Lucio Unfortunately, no. This post tells about .iso image files, but I have .dmg image file, which is different. – Jake Badlands Dec 5 '12 at 18:08
  • Oh, now I understand you. Your right, the Mac images are .dmg. I hope that my answer can be useful for you. If it does, just let me know. – Lucio Dec 6 '12 at 15:51

As you want to create a LiveUSB you need a .iso image to make it. The Mac image is a .dmg file, so you must to convert this file into .iso, and then install it.

Install DMG2IMG

DMG2IMG (1, 2) will convert the .dmg image into a .iso image. To install open a terminal and enter this command: sudo apt-get install dmg2img

Convert the Image

With dmg2img you will create an .img file and this file will have the same format as an .iso file, you just need to replace the extension.

In the terminal enter the following commands or paste the script with the necessary modifications:

# Replace "OriginalFile.dmg" with the filename including the extension
# of your file. The extension will be replaced where necessary unless
# you want to specify the filenames yourself.


# Replace with your file name and it will create the IMG file
dmg2img -i "${filename}" -o "${filename%.dmg}.img"

# Note that the extension of the first file is ".img"!
mv "${filename%.dmg}.img" "${filename%.dmg}.iso"

Make the LiveUSB with an ISO image

Now you already have the .iso image, with which you will make the LiveUSB. Several tools and answers exist to help you create bootable USB drives, some are specific to PC/MBR booting (Bootcamp) where Macs and newer PCs since Windows 8 require/support UEFI booting.

A related question: AskDifferent – Official way to obtain an OS X ISO file


why not just dd the .img file after conversion?

sudo dd if=/path/to/orig.img of=/dev/s**
  • 2
    Since you asked, dd is a good program if a bit hard to understand for some, however dd has one major drawback compared to GUI USB creator applications . Sometimes when you dd an .img file onto a USB drive you can't reformat it if you want to reuse the USB drive. The GUI live USB programs don't have this problem. – karel May 1 '15 at 15:37
  • @karel actually you could use a software like SDFormatter with FORMAT SIZE ADJUSTMENT = ON to restore the true capacity of USB drive (after dd'ing USB drive could appear as e.g. 50 MB instead of 4GB and standard built-in OS software sometimes can't restore it) – Jake Badlands Oct 13 '15 at 9:57
  • @JakeBadlands I downloaded SDFormatter to try it, but ClamAV reported a malware threat on the file that I downloaded, so I'm sticking to my tried and true method which uses programs from the Ubuntu Software Center: askubuntu.com/questions/496309/how-to-unboot-my-bootable-usb/… – karel Oct 13 '15 at 10:16
  • It should be possible to use parted to recreate the partition table on a dd'd USB stick. It makes sense to me that some GUI tools don't support recreating the partition table and thus are stuck with whatever size was put there when dding, but it would seem strange if it couldn't be done with parted, is this known not to work on any USB stick? – Jan Segre Oct 2 '17 at 4:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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