Tag Archives: bootable

Create a bootable Ubuntu USB drive from an ISO in Mac OS X

Some months ago I burned a Xubuntu distro into a USB drive to use an old barebone computer (BTW I used this link as a guide).

usb-drive

To do that from a Mac OS X system first you have to convert the ISO image to a UDRW format:

$ hdiutil convert -format UDRW -o target xubuntu-10.04-desktop-i386.iso

Then insert the USB drive and list all connected disks:

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *320.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            319.2 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:                            Xubuntu 10.04 i3       *2.1 GB     disk1

Once you know the USB drive’s identifier (disk1 in my case) unmount it, inject the image you created before and eject the drive.

$ diskutil unmountDisk /dev/disk1
$ sudo dd if=target.dmg of=/dev/rdisk1 bs=1m
$ diskutil eject /dev/disk1

We can use now that drive to boot on any computer.