Smallest Oracle Cloud instance OS

 


I'm a big fan of Oracle's ARM compute instance, but the free OS options are fairly limited:


They're also fairly big. Ignoring Red Hat and Windows due to licensing restrictions and CentOS since it has been deprecated, you're left with these four options:

  • Oracle Linux 9
    • 771 installed packages
    • 9.5 GB disk space usage
  • Ubuntu 22.04 Minimal
    • 454 installed packages
    • 1.1 GB disk space usage
  • AlmaLinux 9
    • 433 installed packages
    • 1.2 GB disk space usage
  • Rocky Linux 9.1
    • 455 installed packages
    • 9.6 GB disk space usage
Within the Marketplace, the only real standout is FreeBSD, with 83 installed packages and 857 MB disk space usage.

Wanting to remain with Linux, my real dream would be to run Alpine Linux, a tiny, secure OS that includes a package manager and is popular with containers. Although not natively supported, we can accomplish it with the help of a cool project called netboot.xyz, which supports ARM on Oracle Cloud.

1. Create an ARM instance using Ubuntu 20.04 Image build 2024.08.26-0 as the image (note: do not use newer image builds or OS versions)


2. Login via SSH and run the following commands:

sudo wget -O /boot/efi/netboot.xyz-arm64.efi https://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi
sudo grub-reboot "UEFI Firmware Settings"

3. On the Oracle Cloud dashboard page, scroll down to the Resources list and click on Console connection and then click on Launch Cloud Shell connection:


Tip: maximize the connection window for easier viewing:



4. In your other SSH terminal, run: sudo reboot

5. In the Oracle Cloud connection window, you'll see the instance restart and then display a KVM Virtual Machine menu. Select Boot Maintenance Manager and press Enter:


6. Select Boot From File and press Enter


7. Press Enter when shown the highlighted UEFI option:



8. Select netboot.xyz-arm64.efi and press Enter


9. Select Linux Network Installs (arm64) and press Enter


10. You now have a number of additional operating systems you can install on your Oracle Cloud ARM instance! Select Alpine Linux and press Enter:


Note: if you only wanted to run container images, Talos would technically be the smallest option but for some reason that option hung on the "adjusting time" step for me.

11. After a minute, Alpine Linux will be running. Login with user root:


12. Next, run setup-alpine to complete the setup


Enjoy!

# apk list -I | wc -l
58

# df -h
Filesystem    Used     Mounted on
/dev/sda3     205.3M   /


______________________________________

Update: NixOS appears to be even smaller:

# nix-store -q --references /run/current-system | wc -l
31

# df -h
Filesystem     Used     Mounted on
tmpfs          25M      /

Comments

Popular Posts