Create bootable Ubuntu USB stick

I don’t create bootable USB sticks that often but every time I do it I think that it’s harder than it really is and start to search the web for walkthroughs.

This post could also simply be written: Look at the Ubuntu download page.

Here is the process for OS X:

  1. Download ISO file of the operating system you want to put on the USB stick
  2. Open the terminal
  3. Convert the ISO file using the convert option of hdiutil: hdiutil convert -format UDRW -o /path/to/target.img /path/to/source.iso
  4. Run diskutil list to get the current list of devices
  5. Insert the USB stick
  6. Run diskutil list again to determine the device node assigned to your USB stick
  7. Unmount the USB stick: diskutil unmountDisk /dev/diskN
  8. Write the image to the USB stick: sudo dd if=/path/to/disk.img of=/dev/rdiskN bs=1m
  9. Eject the USB stick: diskutil eject /dev/diskN

Install rmagick gem in OS X 10.8

When installing the rmagick gem under OS X 10.8.1 (Mountain Lion) I got the following error on a system using RVM, Ruby 1.9.2 with ImageMagick installed through Brew.

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
...
checking for stdint.h... *** extconf.rb failed ***
...

The error appears to be due to some issues with the OpenMP implementation in OSX. The solution that worked was to uninstall ImageMagick, then reinstall it without OpenMP support:

brew uninstall imagemagick
brew install imagemagick --disable-openmp

Since I didn’t have X11 on this computer I got warnings about missing X11 and had to dismiss a number of dialogs during compilation. But it went through and seems to be working. At least I could then do a bundle install on my Rails application.