Install Oracle Linux on a Raspberry Pi Device
Oracle provides an Oracle Linux (aarch64) installation image that is specifically designed to run on a variety of Raspberry Pi™ models, depending on the Oracle Linux release you are installing. Available models include the Raspberry Pi 4 Model B, Raspberry Pi 400, or Raspberry Pi 3 Model B/B+ single-board computer. Raspberry Pi is a trademark of the Raspberry Pi Foundation.
The installation image that is provided is a default installation of Oracle Linux (aarch64) into a raw disk image that can be cloned, block-by-block, to an SD Card for an immediate boot. Btrfs is the default file system that is used in the image. For more information about installing a Linux image onto the Raspberry Pi, visit https://www.raspberrypi.org/documentation/installation/installing-images/linux.md.
Note: The disk image for the Raspberry Pi is available as a technology preview for developer use only. As such, Oracle does not provide support for Oracle Linux on Raspberry Pi systems. Oracle recommends that developers assist each other on the Oracle Linux for Arm community forum at https://community.oracle.com/tech/apps-infra/categories/oracle-linux-for-arm.
- Raspberry Pi system
- Removable storage media for the ISO image
Prepare the Installation Media
Obtain the Raspberry Pi disk image from the Oracle Technology Network at https://www.oracle.com/linux/downloads/linux-arm-downloads.html.
Be sure to unzip the disk image after you download it.
On an existing Oracle Linux system, insert the removable storage device to be used to copy the image file.
For example, insert an SD Card into an SD Card reader that is connected to the system, or, for a USB attached storage device, into the USB port.
Ensure that the removable storage device has enough capacity to store the image.
Identify the device information for the removable storage device, for example:
The command might generate an output resembling the following example.
Note: The following example is an extract. Actual command output would contain more information.
NAME sda |_sda1 |_sda2 |_ol-root |_ol-swap |_ol-home sdb |_sdb1 |_sdb2 |_sdb3
In the example, the removable storage device is
Perform a block copy of the image file to the removable storage device.
Caution: This operation is destructive and overwrites all of the data on the device you have specified. Ensure that you have specified the correct device name. Note that the operation might take some time to complete.
sudo bash -c "xzcat <compressed-image> > <path-to-device-name>"
In the previous command, compressed-image refers to the compressed image that you downloaded. Include the relative path to the image when you type the command. path-to-device-name refers to the name of of the removable storage device. Include the path to the device name when you type the command, such as
Note that current images are optimized to fit into 4G micro SD cards instead of the previous 5G size.
After the operation has completed, eject the removable device from the system.
sudo eject /dev/sdb
Customize the image as appropriate
Insert installation media device into the associated slot on the Raspberry Pi, then power on the device.
The device automatically boots to Oracle Linux.
Log in to the image as the
rootuser by using the password
Change the password immediately as prompted.
If your removable storage device is larger than the image, you can grow the partition size to maximize disk usage.
Identify the device information.
sudo mount | grep root
Information similar to the following example might be displayed:
dev/mmcblk1p3 on / type btrfs (rw,relatime,ssd,space_cache,subvolid=258,subvol=/root)
In the output,
/dev/mmcblk1p3indicates both the device (
mmcblk1) and partition number (
Note: The name of the removable storage device and the partition number are determined by the location where the removable storage device is mounted. This location can vary, depending on your Raspberry Pi model.
Grow the partition size, for example:
growpart /dev/mmcblk0 3 btrfs filesystem resize max /
More Learning Resources
Explore other labs on docs.oracle.com/learn or access more free learning content on the Oracle Learning YouTube channel. Additionally, visit education.oracle.com/learning-explorer to become an Oracle Learning Explorer.
For product documentation, visit Oracle Help Center.