Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Ubuntu Server

You're reading from   Mastering Ubuntu Server Upgrade your Ubuntu skills

Arrow left icon
Product type Paperback
Published in Jul 2016
Publisher
ISBN-13 9781785284526
Length 430 pages
Edition 1st Edition
Concepts
Arrow right icon
Author (1):
Arrow left icon
Jay LaCroix Jay LaCroix
Author Profile Icon Jay LaCroix
Jay LaCroix
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Deploying Ubuntu Server FREE CHAPTER 2. Managing Users 3. Managing Storage Volumes 4. Connecting to Networks 5. Managing Software Packages 6. Controlling and Monitoring Processes 7. Managing Your Ubuntu Server Network 8. Accessing and Sharing Files 9. Managing Databases 10. Serving Web Content 11. Virtualizing Hosts and Applications 12. Securing Your Server 13. Troubleshooting Ubuntu Servers 14. Preventing and Recovering from Disasters Index

Creating a bootable Ubuntu Server flash drive (Mac)

The process for creating bootable USB media with Mac OS X is very similar to that of Linux, but there's a little preparation to do first. After you download the ISO, as mentioned earlier, we will need to convert the ISO file to the IMG format and then write the media.

First, let's convert the downloaded ISO image.

Open a terminal and then execute the following command:

hdiutil convert -format UDRW -o <path_to_save_IMG_file> <path_to_ISO_image>

In my case, the command is as follows:

hdiutil convert -format UDRW -o /Users/jay/ubuntu_server.img
/Users/jay/Downloads/ubuntu-16.04-server-amd64.iso

All you should need to do is change the paths accordingly. First, we're choosing the path we want the created IMG file to be saved to, followed by the path to the Ubuntu ISO. The following screenshot shows an example run of this process:

Creating a bootable Ubuntu Server flash drive (Mac)

Converting the Ubuntu Server ISO to IMG format

With the conversion out of the way, we can run the following command to show information regarding the disks which are currently attached to the system. We need to do this so we know the device name OS X has given our USB drive, since we'll be referring to it later:

diskutil list

In the example screenshot, you can see what the process looks like on the system I was using. In my case, I know my USB media is /dev/disk2, as it's the only thing attached to the Mac, which is roughly 8 GB in size. In your case, double-check the output of the diskutil list command and make a note of which entry is referring to your USB media. If in doubt, run the command before and after inserting your flash drive and compare the results:

Creating a bootable Ubuntu Server flash drive (Mac)

Listing attached disks on a Mac system

Now that we know the device name of your USB media, we can continue with the final command and perform the actual creation of our Ubuntu Server media. But first, we should make sure that the flash drive is not mounted:

diskutil unmountDisk /dev/disk2

Be sure to change the device name to match the one you saw in the results of the diskutil list command you performed earlier.

The following command will create our actual media:

# sudo dd if=<path_to_IMG_file> of=<device_node_of_usb_media> bs=1m

For example, using the paths and device name on my system, the command would become the following:

# sudo dd if=/Users/jay/ubuntu_server.img.dmg of=/dev/rdisk2 bs=1m

Note

Here, I'm using the sudo command, which means that I want to run the command using root privileges. From this point forward, I'll prefix commands with # if you need to run the commands with root privileges. It doesn't matter if you use sudo or switch to root whenever you see this mark. (Just keep in mind that commands prefixed with # needs to be executed either with root or sudo). Even though this section involves using a Mac, I thought it would be worth bringing up.

The next screenshot shows an example run of this dd command:

Creating a bootable Ubuntu Server flash drive (Mac)

Writing the Ubuntu Server IMG file to a USB flash drive

Now that we have our media, you can remove it from your Mac and continue on and get some installations going. Before we get into that, though, we should have a quick discussion regarding partitioning.

You have been reading a chapter from
Mastering Ubuntu Server
Published in: Jul 2016
Publisher:
ISBN-13: 9781785284526
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image