Skip to content

Instantly share code, notes, and snippets.

@atweiden
Created March 20, 2016 06:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atweiden/5b5495148af2e86bf85f to your computer and use it in GitHub Desktop.
Save atweiden/5b5495148af2e86bf85f to your computer and use it in GitHub Desktop.
create mac-bootable LiveUSB from Linux ISO

Create LiveUSB from Linux ISO on Mac OS/X

Overview

  • transfer ISO from Linux to Mac OS/X over wifi LAN (optional)
  • create LiveUSB from ISO
  • boot from LiveUSB

Procedure

transfer ISO from Linux to OS/X (optional)

prepare osx

Edit /etc/ssh/sshd_config. Important settings:

UsePam yes
AllowUsers user

Turn off firewall in security settings.

Turn on remote login in sharing settings.

perform transfer

SSH instructions (ssh user@10.0.0.X) should be displayed on the Mac’s share settings screen. With this you can securely transfer files over wifi if both linux and osx are on the same network:

$ scp archlinux-2016.03.01-dual.iso user@10.0.0.X:/Users/user/Downloads

This may require selecting default Ciphers in /etc/ssh/ssh_config on Linux machine.

create liveusb

convert iso to dmg

With a 64-bit Linux ISO saved in ~/Downloads, open Terminal and cd Downloads. Convert ISO to DMG:

$ hdiutil convert \
    -format UDRW \
    -o archlinux-2016.03.01-dual.img \
    archlinux-2016.03.01-dual.iso

unmount usb drive

Find your flash drive in the output of diskutil list. Look for a device of its size and find the corresponding entry in the “Identifier” column. It will be something like disk1 or disk2. If you see identifiers such as disk1s1, look only at the part before the “s.”

$ diskutil list
$ diskutil unmountDisk /dev/diskN # e.g. /dev/disk2

write dmg to usb

“N” is the number you identified before:

$ sudo dd if=ubuntu.img.dmg of=/dev/rdiskN bs=1m

“N” is the number you identified previously:

$ diskutil eject /dev/diskN

You may see a message that reads “The disk you inserted was not readable by this computer.” If you do, click “Eject.” If you do this, there is no need to type a command.

boot liveusb

Boot osx while holding down the alt/option key.

Credits

Much of this guide was adapted from the book “Total Bitcoin Security” by Aaron J. Halbert.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment