iso image to usb stick

Last week I realized again, that an OSX-System is not allowed to handle simple iso images. I just wanted to create a simple bootable usb-stick to install a new and plain version of debian 7 on my pc tower. Therefore I downloaded the debian iso file from the debian download page. Now I had to convert the iso image into a dmg or img image to create the usb stick.

I did the following steps on my Macbook in a console:

  1. become root: sudo -i

  2. convert iso into img/dmg: $ hdiutil convert -format UDRW -o ~/path/to/img-image ~/path/to/iso-image

  3. recognize already connected devices before we connect the usb-stick: $ diskutil list

  4. connect the usb-stick

  5. repeat step 3. Your usb-stick is the new /dev/diskN device. N is a placeholder for the real number.

  6. Now unmount the device: $ diskutil unmount /dev/diskN
    Note: If you get an error like: diskN was already unmounted or it has a partitioning scheme...
    use: $ diskutil unmountDisk /dev/diskN

  7. Now we can install the image to the stick: $ dd if=~/path/to/img-image of=/dev/diskN bs=1m
    Note: If we get an error because of 1m, this just tells us, that we use Gnu-DD. Therefore we have to change bs=1m to bs=1M.

  8. At the end we have to eject the usb-stick: $ diskutil eject /dev/diskN

comments powered by Disqus