How do I get Unbuntu on flash drive for install using a Mac

I have a Mac 10.6.8 (I don't know how to update it) and 32 gig flash drive. I have another laptop that won't boot because I think I deleted windows from it and its disc drive is broken. I want to get Unbuntu on it so that at least it will run. I've downloaded Unbuntu. Using a mac I don't know how to get it onto the flash drive so that it will install. Is there a free and easy way to do this?

Ubuntu has a tutorial for this directly on their site. It requires a little bit of work in the terminal, but overall should be pretty easy and effortless. If you need any help just be sure to ask, you can find it here.

Open a terminal up and type;

diskutil list

Make a note of the /dev/disk number of your flash drive.

Then you can run this command.

dd if=/

Don't press enter yet, drag the ISO of ubuntu onto the terminal window and then after it has filled in the path for you type;

of=/dev/r(disk number from first command)

MAKE SURE YOU DONT GET THESE /DEV/ NUMBERS WRONG TRIPLE CHECK!!!!

Once done, press enter and wait for it to finish, it could take a while.

Next you need to download rEFInd and install it.

Then reboot with your USB connected and choose the Ubuntu option.

A more comprehensive guide is available on the Ubuntu Community Forum.

Use hdiutil via terminal to convert an iso to img, then burn with dd.
eg

hdutil convert -format UDRW -o (target img file) (source iso file)

Note osx may auto save the file as a dmg, don't fret.

via dd, burn directly to the flash drive

diskutil unmountdisk (device, usually /dev/sd#)

dd bs=1M if=(img/dmg file) of=(device, usually /dev/sd#)

Once it's done, eject the disk, and bam good to go. (usually)

Good idea to run "diskutil list" to see device IDs before coping to device id via the terminal...
Also, these commands will most likely require you be root, so sudo su before running.

1 Like

The conversion isn't required because Ubuntu uses a Hybrid ISO designed for both USB and DVD. You can also just drag and drop the image file into the terminal to avoid potentially complex pathing.

This I did not know, I just know this method because it's universal, for nix installs I usually do a netboot install and go with a bare and naked stock os, just a package manager and some utils. Been a while since I played with full distros.

Aside,
Going forward we are going to need methods for uefi linux installs.
May be a good topic for the next teklinux episode?

UEFI isn't treated any different to BIOS based installs and in fact this persons query was on a Mac which will likely result in using UEFI. The UEFI can either boot the Linux kernel directly through a technique called stub loading, or it can boot GRUB2-EFI and then that can start the kernel.

If you dd an ISO that supports EFI, a la Ubuntu, then you will find it will show up as two devices in the boot selection screen of any UEFI motherboard. UEFI and Legacy.

Interesting because we have 2 pxe/tftp servers I'm managing/setting up and efi is giving us a hell of a time. 1 server2012 deployment services 1 centos tftp.
Maybe it's the pxe kernel. idk.
Anywho, way OT from this thread, I digress.

goes back to gaming
whoosh

Interesting. If you want to PM me your issues I can look into them if you like?

You can just use this: http://unetbootin.sourceforge.net/

1 Like

Whoa, the Logan has spoken. So I'm downloading unbuntu-14.04.3-desktop-i386.iso on my mac. I have a USB 2.0 32GB plugged. Do I just drag and drop the file into the USB and then plug the USB into the other laptop? I've never installed an operating system