This script is for mac users who want to throw together a bootable usb without hasling with a GUI. Most operating systems require that you take up the entire drive when you install the live CD onto the disk so I've found that this snippet does pretty much the entire job I need. For those who are inspecting the code, the $dmg_path
variable is needed because for some reason macs quite often are known for sticking .dmg
on the end of their generated disk images.
Note: You can get the $usb_path
by using diskutil list
.
iso_path="~/Downloads/ubuntu-15.10-desktop-amd64.iso" && \
usb_path="/dev/rdisk1" && \
img_path="${iso_path}.img" && \
dmg_path="${img_path}.dmg" && \
hdiutil convert -format UDRW -o $img_path $iso_path && \