2010
01.28

I just needed to create an Ubuntu (9.10) USB bootable device from Osx.

First thing was, of course see if the great Unetbootin supported OsX. Not the case.

Well then. I know it can be done with dd. Should I do anything special to do it under OsX?

Then, a simple google search will drive you to the most copied manual excerpt ever. You will see this steps in a lot of sites:

  1. Download the desired .img file
  2. Open a Terminal (in /Applications/Utilities/)
  3. Run diskutil list to get the current list of devices
  4. Insert your flash media
  5. Run diskutil list again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  6. Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be 2)
  7. Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img, /dev/rdiskN is faster than /dev/diskN). If you see the error dd: Invalid number `1m’, you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
  8. Run diskutil eject /dev/diskN and remove your flash media when the command completes.
  9. Reboot (and boot from the usb device) and enjoy.

And then, if you’re like me, you will go directly to download the ubuntu image from the ubuntu server to make the process. You will go through these steps and, uh! oh!, surprise! It does not work!.

Well, give it another try. From the beginning again. Nothing. The pc does not boot from this USB drive. What the hell am I doing wrong?

Well, you are downloading an iso file, while you should be downloading an img file. Ahhh, did you think it was the same? I did. Three times. I was wrong!

Then you’ll notice that there are no img files available to download. So?. Here it comes. Run as root (sudo -s):

hdiutil convert "path/to/the/file.iso" -format UDRW -o "path/to/the/output.dmg"

Of course, the first “path to the…” should point to the downloaded iso image, and the second one to the file you want to create as this command’s output.

Now, do it again from step 2 using the dmg file instead of the iso one. It will work this time!

No Comment.

Add Your Comment