Skip to content

Instantly share code, notes, and snippets.

@mmcdaris
Created December 6, 2013 05:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmcdaris/7818913 to your computer and use it in GitHub Desktop.
Save mmcdaris/7818913 to your computer and use it in GitHub Desktop.
making an xubuntu.img on a flash drive on mac http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx
#
curl -o xubuntu.iso http://mirror.anl.gov/pub/ubuntu-iso/CDs-Xubuntu/12.10/release/xubuntu-12.10-desktop-amd64.iso
# iso to img
$ sudo hdiutil convert -format UDRW -o ./xubuntu.img ./xubuntu.iso
Password:
Reading Driver Descriptor Map (DDM : 0)…
Reading Xubuntu 12.10 amd64 (Apple_ISO : 1)…
Reading Apple (Apple_partition_map : 2)…
Reading Xubuntu 12.10 amd64 (Apple_ISO : 3)…
.............................................................................................................................................................................
Reading EFI (Apple_HFS : 4)…
..............................................................................................................................................................................
Reading Xubuntu 12.10 amd64 (Apple_ISO : 5)…
................................................................................................................................................................................
Elapsed Time: 4.667s
Speed: 148.7Mbytes/sec
Savings: 0.0%
created: /Users/mmcdaris/Downloads/xubuntu.img.dmg
$ diskutil list
➜ Downloads diskutil list
/dev/disk0
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *121.3 GB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 120.5 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
/dev/disk1
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *61.8 GB disk1
1: Windows_FAT_32 USB DISK 61.8 GB disk1s1
➜ Downloads
# remove the dmg extension
$ mv xubuntu.img.dmg xubuntu.img
$ diskutil unmountdisk /dev/disk1; sudo dd if=xubuntu.img of=/dev/rdisk1 bs=1m
# Just wait for it to finish...
Unmount of all volumes on disk1 was successful
Password:
694+0 records in
694+0 records out
727711744 bytes transferred in 168.067158 secs (4329887 bytes/sec)
# now just eject the disk
$ diskutil eject /dev/disk1
Disk /dev/disk1 ejected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment