Creating an Ubuntu 16.04 bootable external drive on a Mac

in #blog6 years ago (edited)

Having a bootable external drive can save you time and money if you are in the IT field. If a system crashes you can use it to troubleshoot, and it's also nice to be able to install an OS in under ten minutes from an external drive!

It took me quite a while to figure out the best way to do this. After downloading countless pieces of software (some of which worked, some of which didn't) I found a how-to that described the process from start to finish. It's actually a very simple process and can be completed in about ten minutes (depending on the speed of your external drive).

I can't seem to find that particular article, so I figured I'd make one and share some of my vast Ubuntu knowledge! (and also, i'll be honest, I'd like to have a reminder on this in case I forget how to do it... again... ).

First, plug in the external drive you wish to use. Keep in mind you want something with a decent amount of space, to be able to hold the OS as well as any files you wish to store within. 15+ GB should be plenty, but I personally like to have at least 100 GB+.


WARNING
FOLLOWING THIS PROCEDURE REQUIRES YOU TO COMPLETELY ERASE THE EXTERNAL DRIVE. ANY DATA CONTAINED WITHIN WILL BE UNRECOVERABLE!


Navigate to https://www.ubuntu.com/download/desktop to make sure you are downloading the most current version of Ubuntu.

As of this article, this is the current version:
http://releases.ubuntu.com/16.04.3/ubuntu-16.04.3-desktop-amd64.iso?_ga=2.158920888.383770086.1515117620-1715978284.1512253569

Once you have obtained the ISO, rename it to ubuntu.img, so it's easier to work with in the terminal, then open a terminal window, and run the following command:

diskutil list

Make a note of the information that is displayed. My system shows the following:

/dev/disk0 (internal):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:      GUID_partition_scheme                         500.3 GB   disk0
1:                        EFI EFI                     314.6 MB   disk0s1
2:          Apple_CoreStorage APPLE SSD               499.3 GB   disk0s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

/dev/disk1 (internal, virtual):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:                  Apple_HFS APPLE SSD              +499.0 GB   disk1
                               Logical Volume on disk0s2
                               E9DD7E74-ECDF-430A-8433-966C826D5B11
                               Unlocked Encrypted

/dev/disk2 (external, physical):
#:                       TYPE NAME                    SIZE       IDENTIFIER
0:     Apple_partition_scheme                        *1.0 TB     disk2
1:        Apple_partition_map                         4.1 KB     disk2s1
2:                  Apple_HFS                         2.4 MB     disk2s2  

The important information to make note of here is the drive labels. In the above example they are:
/dev/disk0 (internal, physical)
/dev/disk1 (internal, virtual)
/dev/disk2 (external, physical)

So based on this information, the drive we want to make changes to is /dev/disk2 (because we know it is external).

Run the following commands to navigate to the folder containing the ISO file you downloaded, erase the external drive, convert the downloaded .iso file into an .img file, and create the bootable drive. This may be a folder other than ~/Downloads/, depending on where your browser stored the ISO:

cd ~/Downloads
sudo hdiutil convert -format UDRW -o ~/Downloads/ubuntu.img ~/Downloads/ubuntu.iso
diskutil eraseDisk JHFS+ UbuntuBoot disk2
diskutil unmountDisk disk2
dd if=/ubuntu.img of=/dev/rdisk2 bs=1m

And thats it! The disk should be automatically created for you and is ready for use. All you need to do is plug it into whatever system you'd like to use it with, and boot to it using the system BIOS settings.

If anyone has any questions, please let me know below in the comments. I welcome the opportunity to share the knowledge that has been so generously given to me.

macmacmac.png

Sort:  

Super nice tutorial @chivesz! :D
XreQmk7ETCak0.gif

Thanks W0olf! I'm glad you enjoyed it!

hmm i think this might be of interest for @snail7777777
wicked post btw! Very educational ^^ aaaand your avatar is Donatello...I'm sold

I'm glad you enjoyed it. Let me know if you have any suggestions for my next how-to!

<3
I would like to know what apps/tools/options exist for Steemit on Linux!

Excellent post idea. I'll make sure to tag you once I'm finished! Thanks!

Excelsior! I look forward to it :)

I'm a linux guy through and through myself. I always have a thumb drive with some type of linux on it. Right now I'm in favor of Lubuntu and Peppermint OS. Never Cared much for the gui of Ubuntu itself. I think i'm partial to lubuntu just because its so lightweight that I can run it on whatever system comes my way without being worried about specs.

thats really cool, thanks for sharing that. ill have to check out lubuntu as well as peppermint. other flavors im partial to are kali linux for penetration testing, and ubuntu server. those are the only ones i really have much experience with.

i like ubuntu because to be honest, im somewhat of a noob when it comes to terminal commands. i can find my way around usually after some research, but it's nice not to have to do any if i want to just use the GUI.

remembered this post after reading about lubuntu yesterday. definitely a great option if you are trying to get the most out of your hardware!

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by Chivesz from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, theprophet0, someguy123, neoxian, followbtcnews/crimsonclad, and netuoso. The goal is to help Steemit grow by supporting Minnows and creating a social network. Please find us in the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP. Be sure to leave at least 50SP undelegated on your account.