maxieduncan

Saturday, 10 April 2010

Creating bootable Linux USB sticks on the mac

This post is primarily aimed at creating Ubuntu as that's what I've used lately.

From a disk image (.img)

Ubuntu originally provided the Ubuntu Netbook Remix as a .img that made creating a bootable USB as simple as the steps below.

  1. Download the desired .img file
  2. Open a Terminal (under 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/diskX where X is the number of disk determined above
  7. Execute sudo dd if=/path/to/downloaded.img of=/dev/diskX bs=1m again using the disk number from the last step and the actual path to your img.
  8. Run diskutil eject /dev/diskX and remove your flash media when the command completes

From a iso image (.iso)

Since Ubuntu 9.10, Canonical has only supplied iso image files and it's not possible to create a bootable USB drive from the Ubunto iso on a mac. If you follow the steps below you'll see the error Could not validate source - error 254. Mac OSX only supports restoring images in particular formats and the one that Ubuntu use (ISO 9660) isn't supported by Apple.

On the mac the default application supplied for changing this is Disk Utility. You can find this in the Utilities directory in the Applications directory.

To create the USB disk do the following:
  1. First make sure that the disk is bootable and that the Partition Map Scheme used is Master Boot Record
  2. After that it's simply a matter of using the Disk Utility Restore functionality to write the iso image to the USB disk
    • Drag the iso image into Source from the Finder
    • Drag the USB disk into Destination from the list in Disk Utility

No comments:

Post a Comment