How to Install Oracle Linux on Raspberry Pi

DZone 's Guide to

How to Install Oracle Linux on Raspberry Pi

Learn how to install Oracle Linux on your Raspberry Pi.

· IoT Zone ·
Free Resource

Did you know that Oracle Linux is also available for ARM processors? This means that you can install Oracle Linux on an SD card for a Raspberry Pi as well. Below, I will show you how to do that with a Mac.


  1. Download the latest Oracle Linux image for ARM
  2. Uncompress the image with xz, for example: xz -dkv rpi3-ol7.6-image-20181116.img.xz
  3. Flash the SD card with the Oracle Linux image, using dd, for example: dd if=rpi3-ol7.6-image-20181116.img of=/dev/disk2 bs=16000000
  4. Put the SD card into your Raspberry Pi and boot it up

Downloading and Uncompressing the Image

Downloading the image is straight forward. Just go to the Oracle Linux for ARM downloads page and download the latest image. You can also get it, for example, via wget http://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz:

$ wget http://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz
--2019-03-14 23:22:42-- http://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz
Resolving download.oracle.com...
Connecting to download.oracle.com||:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz [following]
--2019-03-14 23:22:42-- https://edelivery.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz
Resolving edelivery.oracle.com...
Connecting to edelivery.oracle.com||:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz?AuthParam=1552631082_0be53ad65732e73e53791e1326387a31 [following]
--2019-03-14 23:22:42-- http://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz?AuthParam=1552631082_0be53ad65732e73e53791e1326387a31
Connecting to download.oracle.com||:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: https://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz?AuthParam=1552631082_0be53ad65732e73e53791e1326387a31 [following]
--2019-03-14 23:22:42-- https://download.oracle.com/otn-pub/otn_software/linux/rpi3-ol7.6-image-20181116.img.xz?AuthParam=1552631082_0be53ad65732e73e53791e1326387a31
Connecting to download.oracle.com||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 279309592 (266M) [text/plain]
Saving to: 'rpi3-ol7.6-image-20181116.img.xz'

rpi3-ol7.6-image-20181116.img.xz 100%[================================================================>] 266.37M 7.80MB/s in 32s

2019-03-14 23:23:14 (8.39 MB/s) - 'rpi3-ol7.6-image-20181116.img.xz' saved [279309592/279309592]


Once downloaded, you will have to extract the image, which is in a compressed xz format.

$ xz -dkv rpi3-ol7.6-image-20181116.img.xz
rpi3-ol7.6-image-20181116.img.xz (1/1)
100 % 266.4 MiB / 5,120.0 MiB = 0.052 176 MiB/s 0:29

The parameters for xz are as follows:

d for --decompress
k for --keep, which doesn’t delete the input file
v for --verbose output

Once you have uncompressed the file, you will have an .img file of about 5 GB.

Flashing the SD Card With the Image

The next step is to get the image onto the SD card. Be aware that the next steps will destroy all information on the SD card, so make sure you have all data that you want to keep copied over to somewhere else! Also note that the following steps will vary depending on your operating system. For Mac, it goes as follows:

  1. Put the SD card into your SD card reader.
  2. Open the Disk Utility tool; the SD card should be visible in there, and remember the device at the bottom right for the next step and close Disk Utility again.

  1. In a Terminal session, unmount the SD card by running diskutil umount /dev/[device name], for example:

    $ diskutil unmount /dev/disk2s1
    Volume NO NAME on disk2s1 unmounted

  2. Image the SD card via the dd command. You will have to know:
    1. The path of the image
    2. The device name of the device you just unmounted.

Here is where it gets interesting: The device above already has a partition on it, which is FAT32. This is reflected by the s1 part in /dev/disk2s1. You can also see it in the Disk Utility as well. The Oracle Linux disk image is a complete one, not just for a partition. That means that you will have to image the entire disk, not just partition s1. To do so, just leave out s1 and image /dev/disk2 instead. In that case, you just see something like /dev/disk2; it means that your SD card hasn’t been formatted yet and you can proceed the very same way by imaging /dev/disk2.

$ sudo dd if=rpi3-ol7.6-image-20181116.img of=/dev/disk2 bs=16000000

The dd command takes following parameters:

if for the input file; this is the Oracle Linux image for Raspberry Pi
of for the device to write the image to; this is the SD card you just unmounted
bs for the block size to use for a given write operation. In my case, I used 16MB, but don’t worry too much about it. In theory, it can speed up your write operations, but you will most likely be limited by the 3-4MB/s that an SD card gives you.

If the dd command finishes without any errors, your SD card has successfully been re-imaged.

$ dd if=rpi3-ol7.6-image-20181116.img of=/dev/disk2 bs=16000000
335+1 records in
335+1 records out
5368709120 bytes transferred in 1146.344940 secs (4683328 bytes/sec)

You can now take out the SD card from the SD card reader.

Running Oracle Linux on Raspberry Pi

The rest is business as usual. Put the SD card into your Raspberry Pi and boot it up by plugging in the power. Then, log into the Raspberry Pi as the root user with the password oracle. You will have to change the password immediately after you login.

login: root
root's password:
You are required to change your password immediately (root enforced)
Changing password for root.
(current) UNIX password:
New password:
Retype new password:
[root@rpi3 ~]# uname -a
Linux rpi3 4.14.35-1818.3.3.el7uek.aarch64 #2 SMP Mon Sep 24 15:15:19 PDT 2018 aarch64 aarch64 aarch64 GNU/Linux
[root@rpi3 ~]# cat /etc/oracle-release
Oracle Linux Server release 7.6

Have fun with your Raspberry Pi running on Oracle Linux!

installation, iot, linux, oracle, oracle linux, raspberry pi, raspberry pi tutorial, tutorial

Published at DZone with permission of Gerald Venzl , DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}