Forum Stats

  • 3,722,386 Users
  • 2,244,298 Discussions
  • 7,849,820 Comments

Discussions

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Create Bootable USB Installation Media for Oracle Linux

David Gilpin-Oracle
David Gilpin-Oracle Posts: 8 Employee
edited February 2020 in Oracle Linux

image

Introduction

Long gone are the days of installing Linux from floppies! As the OS has matured, it has grown up... and out. Recent versions of Linux are now 64-bit binaries only, and those binaries are bigger than their 32-bit predecessors. Recent versions of Oracle Linux contain more packages than older ones.

As Linux grew it became a challenge to contain the distribution within the boundaries of the commonly used media of the time. Early Linux distributions came on multiple "floppy" disks! The first convenient common media was the CD-R with a capacity of about 650MB. Oracle Linux 3, 4, and early versions of 5 were distributed with multi-volume CDROM images. Eventually, dealing with multiple CDROM images became unwieldy and the DVD image became very common. The first DVD writable DVD drives and media were Single Layer with a capacity of about 4.7GB

Below is a chart that shows how the x86_64 version of the ISO image has grown over the years:

Oracle Linux Version [x86_64]
Part NumberSize
Oracle Linux 5 Update 2 (first DVD release)V15099-013.2GB
Oracle Linux 6 Update 10 (final OL6 release)V978757-013.8GB

Oracle Linux 7 Update 7 (current OL7 release)

V983339-014.4GB
Oracle Linux 8 Update 0 (first OL8 release)V983280-016.6GB
Oracle Linux 8 Update 1 (current OL8 release)V984216-017.2GB

It's been a struggle to keep the Oracle Linux 7 images within the 4.7GB boundaries of a single layer DVD image. While dual layer drives are now commonplace, the availability of dual layer media (and it's cost) kept it from becoming mainstream. With Oracle Linux 8 - it's grown so large that efforts to contain it have been largely abandoned.

Large ISO images are not a problem for installing Oracle Linux in VirtualBox; just mount up the ISO image and go. But there are still folks that want to install Oracle Linux on "real" hardware - an older server, laptop, or desktop machine. Many newer machines do not have an optical drive.

Over time I have noticed a growing trend of folks experiencing difficulties with installing recent versions of Oracle Linux on "real" hardware. Some were downloading the wrong ISO image. Others had corrupted downloads or were attempting to burn a large ISO (Oracle Linux 8) on single layer DVD-ROM.

That's the purpose of this article - a one-stop place to learn how to create a bootable USB memory stick to be used as the Oracle Linux installation media for "real" hardware.

This article will show:

  • Where to download Oracle Linux
  • Choosing the correct image for installation
  • How to run a checksum hash on the downloaded image to make sure it was not corrupted during the download
  • How to properly place that image on a USB memory stick, creating a USB installation media for Oracle Linux

The Oracle documented method of creating Oracle Linux USB Installation Media can be found in the Oracle Linux documentation:

https://docs.oracle.com/en/operating-systems/oracle-linux/8/install/install-media-usb.html

https://docs.oracle.com/en/operating-systems/oracle-linux/7/install/ol7-install-media-usb.html

I realize that not everyone has access to an Oracle Linux machine to do this... So instructions for Windows, Mac, and Linux users will be shown!

Note that using Oracle Linux to create the USB Installation Media is the only method supported by Oracle. The suggested use of third party tools (such as balenaEtcher or Rufus) are provided here as a convenience. Support of these utilities are not covered by Oracle.

Also note: Creating bootable USB media can be tricky. Not all USB sticks are created equal... If you create a bootable USB media that does not work on your system, try a different brand of USB stick - or a larger one. If BalenaEtcher does not work for you, try Rufus or another USB utility.

Downloading Oracle Linux

The usual place to download Oracle Linux is the Oracle Software Delivery Cloud https://edelivery.oracle.com

Oracle Software Delivery Cloud requires an Oracle Single Sign On for access.

Note: you can click on the screenshots in this document to get a larger, more readable version.

pastedImage_1.png

Once logged in, enter "Oracle Linux" in the Search box; results will begin to show automatically, and Oracle Linux should be at the top of the list.

pastedImage_2.png

You can click the "Oracle Linux" entry or wait for a few seconds and it will be selected automatically. Since this list is the result of a search, there will be other "hits" displayed that are for products that run on Oracle Linux; ignore those. The higher numbered Oracle Linux versions (more recent) are at the top of the list.

Add the ones you want to your cart by clicking the "+ Add to Cart" button; a brief icon will appear to confirm your selection.

Once you have the items in your cart, click the Checkout link at the top right of the page.

A new page will be displayed. Some versions of Oracle Linux were made available in both 32-bit and 64-bit variants, you can select that here. Click the "Continue" button when ready.

pastedImage_4.png

The Terms and Restrictions page will be displayed. If you agree with the Terms and Restrictions, click the "I Accept..." check box, then click "Continue"

You will finally be at the Download page. It's very important that you select the correct image! Here is a screenshot for Oracle Linux 8:

pastedImage_0.png

  • In order to comply with open source licensing, we must make our source code available... Note that very few folks will ever need to download the source.
  • The next image listed looks very promising as it is called a "Boot ISO image" and is considerably smaller than the others. However, this image is only used for network installations; it is NOT a full installation image of Oracle Linux! For more information on using the Boot ISO and the network installation server required for its use, see this link to the Oracle Installation Guide for Release 8 https://docs.oracle.com/cd/F12552_01/F13930/html/netinst-req.html
  • The full Oracle Linux 8 ISO image is highlighted with a red arrow in the screenshot above. If you are downloading a different version of Oracle Linux, use this example as a guide - look for a file that is NOT the Source DVD, and NOT the Boot ISO image.
  • Click the Download button to begin, and follow the instructions shown.

Always run a checksum!

Another very important task is to verify the downloaded image! Even with high speed broadband, anything can happen en route. So ALWAYS check the hash of these large ISO files.

If you click the "View Digest Details" link (highlighted with another red arrow in the screenshot above) you will be presented with a list of hash values (highlighted with a red box in the screenshot below):

pastedImage_0.png

Oracle currently publishes the SHA-1 and SHA-256 hashes for our images.

For a brief primer on using file hashes to check file integrity, see this article from the State of New Jersey Cybersecurity team:https://www.cyber.nj.gov/be-sure-to-secure/an-intro-to-using-hashes-to-check-file-integrity

It is now recommended to use the longer SHA-256 as it is a more secure hash. For the examples below I will show using the SHA-256 values; using SHA-1 would be similar.

Checking File Hash - Windows

There are many Windows based file hashing utilities available. Some are "free", others require a paid license.

7-Zip is an open source based free utility; recent versions include a nice addition to the Windows Context menu that includes a SHA hashing tool.

https://7zip.org

Important note: Oracle employees should download 7-Zip from MyDesktop

To run the hash on your ISO from Windows with 7-Zip, RIGHT CLICK on the ISO you wish to hash. The Windows context menu will appear, LEFT click the CRC SHA menu item then LEFT click the SHA-256 menu item (screenshot below):

pastedImage_4.png

A window will appear and show the progression:

pastedImage_0.png

When completed the hash will appear in another window:

pastedImage_1.png

Now compare the computed hash to the one from Oracle Software Delivery Cloud Digest to make sure they are identical:

pastedImage_2.png

If they match, your Oracle Linux ISO is good to go.

If they don't, double check to make sure you ran the hash on the correct ISO file, and that you used SHA-256.

If the hash still compares wrong, most likely your download was corrupted. Delete that ISO and download it again.

Here are some suggestions to try if you get corrupted downloads:

  • If possible use a wired connection instead of wireless. Wired connections are less prone to interference.
  • Try a different browser, or clear the browser cache
  • If you haven't rebooted lately - reboot the OS
  • Try a different computer (if available)

Checking File Hash - Mac

The Mac has a native command line hashing tool.

Open Terminal - you can search for it in Spotlight or Launchpad (or ask Siri if you are lazy)... Or open it directly in Applications > Utilities.

Once open, enter the command "shasum -a 256 " followed by the path to the ISO you want to hash, OR drag and drop the file onto Terminal's window to automatically past the full path to it. Example:

MacBook:~ shasum -a 256 /Users/bryan/Downloads/ol8ga-64bit-V983280-01.iso

After the hash is calculated it will be displayed on the next line in Terminal. Example:

DD8BDBBA910BB0E49E170503541F26A4FBBF5F6C26F37BAE9F77E5D18F411D20  /Users/bryan/Downloads/ol8ga-64bit-V983280-01.iso

Then compare the hash generated to the one from the Digest on Oracle Software Delivery Cloud.

Checking File Hash - Oracle Linux

Oracle Linux has a native command line hashing tool.

In a command line session (terminal or console), enter the command "sha256sum" followed by the path to the ISO you want to hash. Example:

[[email protected] ~]$ sha256sum /home/david/Downloads/ol8ga-64bit-V983280-01.iso

After the hash is calculated it will be displayed on the next line in Terminal. Example:

dd8bdbba910bb0e49e170503541f26a4fbbf5f6c26f37bae9f77e5d18f411d20  /home/david/Downloads/ol8ga-64bit-V983280-01.iso

Then compare the hash generated to the one from the Digest on Oracle Software Delivery Cloud.

Creating the USB Stick

Capacity

The largest image to date (Oracle Linux 8) is 7.2GB, so an 8GB USB memory stick is sufficient. As capacities have grown and prices have fallen, I have noticed that some stores are only selling 8GB sticks in multiple packs, and 16GB sticks are the smallest individual ones sold.

Type

"Know your hardware!" Newer machines will have USB 3.0 ports. SOME machines will identify USB 3.x ports with a blue, green, or red tab in the port, but you can't rely on that. So check the hardware specs of the machine(s) involved.

Since a USB 3 memory stick is compatible with USB 2 ports, you can always create your Oracle Linux installation on a USB 3 memory stick and use it on older hardware.

Of course if your machine has both USB 2 and USB 3 ports, use a USB 3 memory stick in a USB 3 port for best (and fastest) results!

File System

For maximum portability and compatibility, use FAT32. Check the drive before attempting the "build" process.

Format the drive if you need to change file systems or clean up the drive before reuse.

  • On Windows, use the Format command
  • On Mac, use Disk Utility and chose "MS-DOS (FAT)". Even though it is not specified, that format is FAT32.
  • On Oracle Linux, use "mkfs" on the command line. You will need to use the "fdisk" command (as superuser) to determine the exact device path to the USB flash device. In the following example the device was identified as /dev/sdb1:

[[email protected] ~]# mkfs -t vfat /dev/sdb1

Create the image - Windows

There are a number of flash writing utilities available for Windows, including Rawrite32, Rufus, and others.

Rufus is a free and open source utility for Windows 7 and later (released under GPLv3). It has been around for a while and is quite popular.

For more information see their website: http://rufus.ie

A newer utility - and the one that I will document here - is balenaEtcher (sometimes just called Etcher.) It is a free and open-source utility., released under Apache Version 2.0.  Features:

  • Supported on Windows, macOS, and Linux
  • Same GUI on all platforms
  • Extremely easy to use.
  • Designed from the ground up for speed, safety, and reliability

Read more from the Etcher announcement blog: https://www.balena.io/blog/introducing-etcher/

Download balenaEtcher from https://www.balena.io/etcher/

Launch the installer and follow the directions.

Insert the USB memory stick into the USB port, and launch balenaEtcher:

pastedImage_0.png

Click the Select image button; a window will appear. Navigate to the ISO file that you want to use, then click Open

pastedImage_1.png

balenaEtcher does a very good job assuming the USB Device, it should be already selected for you. If it is wrong, click "Change" and select the correct device. Notice in my example the empty, FAT32 formatted USB memory stick shows a capacity of 7.74GB - about right for an 8GB device.

Click the Flash! button to begin flashing.

pastedImage_2.png

You may get an approval request from Windows to proceed, if so click OK. As balenaEtcher is working, you will see a progress bar with an estimated ETA:

pastedImage_3.png

After the Flashing phase, balenaEtcher will Validate the flashed image:

pastedImage_0.png

If the Validation check is OK, balenaEtcher will automatically unmount the USB Memory stick and show this result:

pastedImage_2.png

Create the image - Mac

balenaEtcher is available for the Mac, and the user interface is identical to Windows.

Use the procedure and the screenshots for using balenaEtcher on Windows above as the guide for proceeding on a Mac.

Create the image - Oracle Linux

If you have Oracle Linux with a GUI, you can install balenaEtcher on Oracle Linux. It is distributed in AppImage format (not an RPM). For more info on AppImage, visit https://appimage.org/

AppImage will require Oracle Linux to have FUSE installed.

balenaEtcher on Oracle Linux GUI will look identical to the Windows screenshots above, so use those instructions as a guide.

Use a command line interface on Oracle Linux machines that do not have a GUI. Instructions for writing the image are listed in the Oracle Linux Installation Guides for each version of Oracle Linux. As an example, here is the link using Oracle Linux 7 to prepare the USB Installation Media: https://docs.oracle.com/cd/E52668_01/E54695/html/ol7-install-media-usb.html

Summary

You should now be well-prepared to create USB Installation Media for Oracle Linux. I suggest you "burn" the latest version of Oracle Linux 7 and Oracle Linux 8 to a couple of inexpensive 8GB or 16GB USB sticks and toss them in your computer bag, just in case you suddenly get the urge to install Oracle Linux on "real" hardware!

Comments

Sign In or Register to comment.