Pages

Thursday, January 17, 2013

[OSX] Create bootable USB drive on OSX

How to create a bootable USB drive when you only an OSX-based computer?

For readers as lazy as me: Just follow the colored text.


In my case, I want to reinstall my PC with Ubuntu, using a ISO files.
1. Prepare your source file

    For example, ubuntu.iso

2. Convert the .iso files to .dmg
    Here, I want my .dmg file named as ubuntu.dmg
    hdiutil convert -format UDRW -o ~/path/to/ubuntu.img ~/path/to/ubuntu.iso

3. Wipe you USB drive (using Disk Utility)

  1. Open up Disk Utility (it’s in /Applications/Utilities/).
  2. Click you USB root drive on the left panel
  3. Click the 'partition' tab on the right panel
  4. Choose the 'Volume Scheme'  as '1 partition'
  5. Set the 'Format' as Free Space
  6. Click 'Apply'
  7. Unmount the drive (Do not eject)


4. Put you .dmg file into your USB drive

  1. Find the USB disk index by
    diskutil list
    It is disk1, in my case.
  2. use 'dd' to transfer your file into the raw drive
    sudo dd if=./ubuntu.dmg of=/dev/rdisk1

5. Be patient
Your may see messages like this when it is done:
1421912+0 records in
1421912+0 records out
728018944 bytes transferred in 11020.757758 secs (66059 bytes/sec)



Reference
http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx
http://evan.borgstrom.ca/post/1314205955/osx-bootable-usb-from-iso

No comments:

Post a Comment