9

I screwed with some bin files in MAC OSX, and can't log in. Anyways, I want a bootable ubuntu usb so I can recover my files/look at the disks. I KNOW HOW TO MAKE A USB BOOTABLE IN MAC. However, I do not know how to make one in Ubuntu. I have a computer with ubuntu, but need to make a bootable usb FOR A MAC. Any help is greatly appreciated.

epe
  • 91
  • 1
  • 1
  • 2

4 Answers4

4

You will of course need a OS X Installer Image. To get this you can follow the instructions here

After you have got your installer media, you can use ubunut's built-in utility Startup Disk Creator to make a bootable USB. SO, open dash and search for Startup Disk Creator and open it. Follow the on-screen instructions or refer to this document from ubuntu.

Ron
  • 20,638
1

I recently had to make a High Sierra 10.13.6 bootable USB drive, and the process turned out a bit more involved that just dd-ing the dmg2img-generated ISO to a thumb drive. So, leaving it here in case somebody else will need to.

This sequence is based on this answer. Unlike El Capitan, High Sierra only needs BaseSystem.dmg, which also has enough free space to boot - so, the process overall can be simplified a bit.

  1. Get an OS X .dmg file. This question on apple support has all the links, but they are only accessible from OS X (if you had access to a live OS X at this point - you probably would've just used createinstallmedia already, right?). So, you'll need to find an alternative source.

  2. Convert .dmg file to ISO (dmg2img -v -i <imagename>.dmg -o <isoname>.iso).

  3. Mount .iso image. You can do it from GUI (right click, "Open with disk image mounter") or something like mount -o loop <isoname>.iso <iso_mount_point>

  4. Find BaseSystem.dmg in the mounted image. Convert it to .iso as well (dmg2iso -i BaseSystem.dmg -o BaseSystem.iso)

  5. Copy it to a thumb drive: dd if=BaseSystem.iso of=/dev/sdX BS=1M. In my case (High Sierra 10.13.6), 4Gb stick was sufficient, even though createinstallmedia requires 8Gb. It probably misses some utilities.

  6. Mount the thumb drive (you might need to apt-get install hfsprogs to mount an HFS filesystem). From the first iso, obtained on step 3, copy BaseSystem.chunklist and BaseSystem.dmg on the thumb drive (actually, the latter might not be necessary - but it worked for me at this step and I stopped experimenting). sync, just in case.

This is it, you have a bootable OS X usb drive.

Marat
  • 233
1

Try installing unetbootin

sudo apt-get install unetbootin

and using your mac iso, install it to your usb

TuxForLife
  • 1,305
  • 2
  • 18
  • 30
1

Don't even think about using Ubuntu to fix OS X. Use the recovery partition which should be part of any modern installation of OS X, by booting and pressing CMD-R. You can then repair as needed - perhaps even install a fresh OS X on top of your existing installation which can fix most broken things.

See https://support.apple.com/en-us/HT201314 for details.

If everything goes completely wrong, restore from a Time Machine backup.