Mac linux usb drive

Create a bootable USB stick on macOS

Creating a bootable USB stick is very simple, especially if you’re going to use the USB stick with a generic Windows or Linux PC. We’re going to cover the process in the next few steps.

Apple hardware considerations

There are a few additional considerations when booting the USB stick on Apple hardware. This is because Apple’s ‘Startup Manager’, summoned by holding the Option/alt (⌥) key when booting, won’t detect the USB stick without a specific partition table and layout. We’ll cover this in a later step.

2. Requirements

  • A 2GB or larger USB stick/flash drive
  • An Apple computer or laptop running macOS
  • An Ubuntu ISO file. See Get Ubuntu for download links

3. Prepare the USB stick

To ensure maximum compatibility with Apple hardware, we’re going to first blank and reformat the USB stick using Apple’s ‘Disk Utility’. But this step can be skipped if you intend to use the USB stick with only generic PC hardware.

  • Launch Disk Utility from Applications>Utilities or Spotlight search
  • Insert your USB stick and observe the new device added to Disk Utility
  • Select the USB stick device (you may need to enable the option View>Show All Devices) and select Erase from the tool bar (or right-click menu)
  • Set the format to MS-DOS (FAT) and the scheme to GUID Partition Map
  • Check you’ve chosen the correct device and click Erase

screenshot

Warning: Disk Utility needs to be used with caution as selecting the wrong device or partition can result in data loss.

4. Install and run Etcher

To write the ISO file to the USB stick, we’re going to use a free and open source application called Etcher. After downloading this and clicking to mount the package, Etcher can either be run in-place or dragged into your Applications folder.

By default, recent versions of macOS block the running of applications from unidentified developers. To side-step this issue, enable ‘App Store and identified developers’ in the ‘Security & Privacy’ pane of System Preferences. If you are still warned against running the application, click ‘Open Anyway’ in the same pane.

screenshot

5. Etcher configuration

Etcher will configure and write to your USB device in three stages, each of which needs to be selected in turn:

  • Select image will open a file requester from which should navigate to and select the ISO file downloaded previously. By default, the ISO file will be in your Downloads folder.
  • Select drive, replaced by the name of your USB device if one is already attached, lets you select your target device. You will be warned if the storage space is too small for your selected ISO.
  • Flash! will activate when both the image and the drive have been selected. As with Disk Utility, Etcher needs low-level access to your storage hardware and will ask for your password after selection.
Читайте также:  Openvpn client linux console

screenshot

6. Write to device

After entering your password, Etcher will start writing the ISO file to your USB device.

The Flash stage of the process will show progress, writing speed and an estimated duration until completion. This will be followed by a validation stage that will ensure the contents of the USB device are identical to the source image.

When everything has finished, Etcher will declare the process a success.

Congratulations! You now have Ubuntu on a USB stick, bootable and ready to go.

screenshot

Warning: After the write process has completed, macOS may inform you that ‘The disk you inserted was not readable by this computer’. Don’t select Initialise. Instead, select Eject and remove the USB device.

7. Boot your Mac

If you want to use your USB stick with an Apple Mac, you will need to restart or power-on the Mac with the USB stick inserted while the Option/alt (⌥) key is pressed.

This will launch Apple’s ‘Startup Manager’ which shows bootable devices connected to the machine. Your USB stick should appear as gold/yellow and labelled ‘EFI Boot’. Selecting this will lead you to the standard Ubuntu boot menu.

screenshot

Finding help

If your Mac still refuses to boot off your USB stick you may find it easier to boot and install off an Ubuntu DVD instead. See our How to burn a DVD on macOS for further details.

Alternatively, if you feel confident using the macOS command line, see the community documentation on How to install Ubuntu on MacBook using USB Stick for a more manual approach.

If you want to install Ubuntu, follow our install Ubuntu desktop tutorial.

Finally, if you get stuck, help is always at hand:

Источник

How to Create a Bootable Ubuntu USB Drive, for Mac, in OS X

Johnny Winter

Johnny Winter Last updated May 26, 2014

Ubuntu is, perhaps, one of the most accessible distributions of Linux available to the home computer user or enthusiast. If you are interested in experimenting with Linux, you can do worse than to test-drive Ubuntu from a USB drive. In this tutorial I’ll show you how to create an Ubuntu USB live-drive, using a Mac, to test on a Mac.

Ubuntu, a Nguni Bantu term meaning Human-ness, recently released version 14.04 LTS (Long Term Support) codename Trusty Tahr. Based on Debian Linux, Ubuntu is estimated to be used on more than 26% of all Linux websites.

Since its first release in October 2004, it is estimated that, in 2011, Ubuntu had in excess of 20-million users worldwide and it is being increasingly adopted for large-scale public sector deployments, notably the Gendarmerie Nationale, thus replacing expensive Microsoft Office licences with OpenOffice for 5,000 workstations.

Читайте также:  Linux ограничить использование оперативной памяти

Regardless of whether you have thousands of workstations, or not, experimenting with Ubuntu from a USB drive is a good way to get an introduction to this interesting and alternative operating system.

How to Create a Bootable Ubuntu USB Drive

1. Format a USB Drive

The first part of the process is to format a USB drive such that it is bootable on a Mac.

Find a USB drive, of 2GB capacity or more, and plug it into the Mac. Launch the Disk Utility app which is located in Applications > Utilities.

  • In the left-hand pane, click on the USB drive to select it
  • Click the Partition tab
  • Select 1 Partition from the drop-down menu
  • Enter a name for the drive, in this example Ubuntu Mac
  • Change the Format to Mac OS Extended (Journaled)
  • Click the Options button

  • Ensure that the GUID Partition Table radio button is selected and click OK
  • Click Apply

2. Download Ubuntu

Open a web browser and navigate to the Ubuntu download page.

In the dropdown menu, under Choose your flavour, ensure that you select 64-bit Mac (AMD64) then click the Download button.

At the time of writing, the current version of Ubuntu is 14.04 LTS which was released in April 2014. The LTS denotes that this version is a Long Term Support version, in other words this version an LTS version includes updates for new hardware, security patches and updates to the Ubuntu stack for a period of five years following the version release.

3. Convert the Downloaded File Format

It is first necessary to convert the downloaded .iso file to a .img . This is done with the hdiutil command in Terminal.

Open Terminal and enter the following command:

hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso

Replace the /path/to/ with the actual path to the files in question, for example:

hdiutil convert -format UDRW -o ~/Downloads/ubuntu-14.04-desktop-amd64+mac ~/Downloads/ubuntu-14.04-desktop-amd64+mac

Tip: OS X may append the file extension .dmg to the output file, so you’ll end up with ubuntu-14.04-desktop-i386.img.dmg

4. Determine the Device Node for the USB Drive

Enter the following command, in Terminal, to determine the connected devices:

Make a note of the output information. Then insert the USB drive and run the command again. Look for the difference and check that the capacity of the new drive matches the USB drive that you have inserted.

Once you have made a note of the identity of the USB drive, in my case /dev/disk2 , execute the following command:

diskutil unmountDisk /dev/diskN

Where N denotes the node number assigned to the USB drive. In my example, I run the command:

diskutil unmountDisk /dev/disk2

5. Create the Bootable USB Drive

To create the USB drive, the command dd is used to copy and convert a file. This is a very powerful command and it should be used with care and caution.

If used incorrectly it is possible to corrupt the the hard drive of a Mac with catastrophic consequences meaning that you will not be able to boot into OS X. Double-check, and triple-check, that you have entered the command correctly.

Читайте также:  Where are passwords stored in linux

Enter the following command into the command line:

sudo dd if=/path/to/ubuntu-14.04-desktop-amd64+mac.img.dmg of=/dev/rdiskN bs=1m
sudo dd if=/Users/johnnywinter/Downloads/ubuntu-14.04-desktop-amd64+mac.dmg of=/dev/rdisk2 bs=1m

An explanation of the command used is:

  • sudo means substitute user do and gives you greater privileges to carry out a command that you would normally not be able to execute
  • dd means convert and copy
  • if is the input file
  • of is the output file

It will be necessary to enter the Mac’s admin user password in order to proceed with this command, so enter the password at the Password: prompt in Terminal.

Note, when you enter the password, you will not see the characters or any asterisks as you might expect. Though the cursor does not move, Terminal is accepting the characters that are being entered.

Once the password has been entered, press the Enter key.

It is also important to note that there is no indication or display of progress whilst Terminal executes the command entered. Sit tight, it will take a few minutes to complete. Don’t be tempted to interrupt the process in any way; be patient and wait for the confirmation from Terminal that the process has completed.

6. Prepare to Remove the USB Drive

It may be that, on completion of the creation of the USB drive, a dialogue box pops up that says The disk you inserted was not readable by this computer.

There are three buttons: Initialize. , Ignore and Eject. Don’t click any of them!

Instead, return to Terminal where you should see a confirmation that the process has completed. In my example, the confirmation reads:

1008730112 bytes transferred in 182.599702 secs (5524270 bytes/sec) 

At the command prompt, enter the command:

Where N is the node number assigned to the USB drive. In my case it is disk2 , so the command entered is:

Regarding the dialogue box, click Ignore to get rid of it.

It is now safe to remove the USB drive from the Mac.

Test the Ubuntu USB Drive

The newly created Ubuntu USB drive is now ready to be inserted into a Mac as a live-drive from which you can run the Ubuntu operating system.

To test Ubuntu Linux on a Mac:

  1. insert the USB drive into an available USB port.
  2. Reboot, or turn on, the Mac
  3. Immediately after the start-up chime press the Option key (sometimes marked alt)
  4. Select the USB drive from which to boot by using the left and right arrow and Enter keys

Conclusion

In this tutorial, I have shown you how to download the correct version of Ubuntu Linux to test on a Mac. I have shown you how to correctly format a USB drive and how to copy Ubuntu to that drive in order to make a bootable live-drive.

I have also shown you how to boot from the drive, that you have created, to test Ubuntu Linux on a Mac.

If you want to do more with your Mac, check out some of the Mac apps available on Envato Market.

Источник

Оцените статью
Adblock
detector