Motivation.

During 2016, Oracle started a public services of cloud IaaS, PaaS, etc., Component of their adoption strategy includes an assortment of "Always Free" resources available to service account owners. Leaving aside the Philosophical, ownership and open source concerns from the community, these Always Free resources still provide a great testing and learning ground for #homelab and #selfhosting.

When creating an always free compute instance in Oracle Cloud, the standard Operative Systems include Oracle Linux, Redhat, Almalinux, Ubuntu, among others. These options are plenty and fit most use cases, however, due to personal preferences, you may want to use Debian instead.

Core Objective

Modify an existing Oracle Cloud Compute Instance (Virtual Machine) to run Debian 11, 12 or 13 as Operative System.

Required Tools

  • Oracle Account - Get your Free trial here
  • Existing Oracle Compute Instance with Ubuntu 20.04-24.04 (Not Minimal)
  • Existing Oracle Compute Instance with Internet Allow access in Oracle Network
  • Instructions

Log in to your existing Instance through SSH, default Image user account is "ubuntu"

ssh ubuntu@<your public IPv4 address>

Confirm Internet Access

curl ifconfig.co/country

Output of this command should be the Country of location of your Compute Instance

Download the Debi Reinstallation script. This works for both Ampere and AMD/Intel Instances

curl -fLO https://raw.githubusercontent.com/bohanyang/debi/master/debi.sh

Reference:

GitHub - bohanyang/debi: Reinstall your VPS to minimal Debian Reinstall your VPS to minimal Debian. Contribute to bohanyang/debi development by creating an account on GitHub.

Execute the script

chmod a+rx debi.sh
sudo ./debi.sh --version XX

This script can install Debian 10, 11, 12, 13. You shouldn't use 10 anymore, but in case you want to, it's possible.

Note: If your SSH Access Pub Key is already publish to Github, you can prepare your Debian Installation with it as installation process.

sudo ./debi.sh --version XX --authorized-keys-url https://github.com/USERNAME.keys

The default account that will be created will be "debian" you will be asked by a password.

The script will download all the boot partition and initiate a net install of Debian, this process may take 5-10 minutes

Once completed, Login through SSH to your modified Compute Instance, using the "debian" account, with either password or SSH Keys configured.

Recommended Post Install Steps:

  1. Create a different administrative account
  2. Confirm that the allocated Space and Memory remains as configured layout with df -h, free -h, etc.
  3. Configure proper Sudo permissions
  4. deluser "debian" account
  5. Implement your preferred hardening settings.
  6. Update OS installation and features, apt-get update/upgrade

Results

By following these steps, your existing Ubuntu Oracle Compute Instance will run Debian on your preferred version, instead of Ubuntu.

Next Post Previous Post