mac - Making a bootable OSX USB from dmg on Linux

18
2014-04
  • Zen Savona

    I have 2 machines - a MacBook Pro and a desktop running Fedora, I have a USB drive and a OSX 10.8 dmg. The MacBook won't boot into OSX unfortunately, I'm trying to make a bootable mac usb to recover it.

    Any insight? I've tried dmg2img but no success putting that image onto the usb drive.

    Is there an easy way to do this?

  • Answers
  • nerdwaller

    Have you tried "Acetoneiso"?

    It'll convert the DMG to an ISO for you. After that, the easiest way I know of to make a bootable USB is using DD.

    dd if=/path/to/osx.iso of=/dev/sdb && sync

    Note: sdb is an example, and do not add a partition # after that. This method is a little hard on flash drives (I have killed one or two doing this relatively frequently, but once should be fine).

    If you are unfamiliar, DD is a bit by bit copy and sync just verifies that all files have been written to the usb.

  • ChrisF

    If you can find another Mac, try the Disk Utility App.

    You can "Restore" your 10.8 DMG to your USB drive. This will make your USB drive be bootable.

  • lindows2008

    Install dmg2img

    sudo apt-get install dmg2img
    

    Convert DMG image file to ISO file

    dmg2img -v -i /path/to/image_file.dmg -o /path/to/image_file.iso
    

    Copy ISO image to USB

    sudo dd if=/path/to/image_file.iso of=/dev/sdb && sync
    

    sdb is an example. In your case it might be different


  • Related Question

    How to boot a Linux live USB on a Mac?
  • slubman

    I have a USB stick with a Fedora 11 live environment on it. It's booting fine on 3 PCs where I've tried it.

    But I can't get it to boot on a Mac (Intel). When pressing the alt key (or command key, I don't remember which one) during startup I can only choose the "Macintosh HD" and the USB stick doesn't appear.


  • Related Answers
  • user14912

    In order to create an Intel Mac bootable USB stick, it needs to be setup for EFI/GPT. This should work as of Fedora 10, but it's not automatic; you need to create a USB stick specifically configured for this purpose.

    According to the Fedora 10 release notes, you can do this using the livecd-iso-to-disk tool like so:

    livecd-iso-to-disk --mactel /path/to/live.iso /my/partition
    

    replacing the path and partition as appropriate. However, this post suggests that the MBR may also need to be cleared (destroying all existing data on the USB disk):

    livecd-iso-to-disk --mactel --reset-mbr /path/to/live.iso /my/partition
    

    Other details on creating a USB stick are in the Fedora wiki, though curiously nothing about support for Intel Macs. I've had success with this method in the past, though it seems somewhat hit and miss. As far as I know, it's not possible to create a USB stick that will boot on both Intel Macs and non-EFI machines.

  • nagul

    I'm not sure you can do this directly; you might require something like rEFit to be able to boot into an Intel Mac with your live usb.

    Have a look at the Myths and Facts About Intel Macs page on their site.

  • Johan K. Jensen

    You may try to press "E" at startup.
    Or see if it is visible as a startup disk (System Preferences » Startup Disk) and boot from there (reboot).

  • nik

    Some notes on booting Intel Mac from external USB drives.

    [it is] possible to boot an Intel Mac from a USB flash drive. That is a bit more involved, and there are several methods. One is Das Boot, a free utility from Sub Rosa that allows you to convert original disks from DiskWarrior, Drive Genius, TechTool Pro and others to a flash drive. Let Google be your friend on this. Many people have put their favorite rescue utility on a bootable flash drive to save them from any problems in the field.

    Before you ask; no, USB does not support target disk mode -- a sore point for MacBook Air and unibody MacBook owners.

  • Achmed Durangi

    The Flash Drive has to have a GUID Partition Table. The Windows7 Tool diskpart finally implemented this or of course MacOSX itself.

    Also, the flash drive has to feature a HFS+ filesystem.