cd /news/cloud-computing/diy-install-debian-on-oracle-cloud-i… · home topics cloud-computing article
[ARTICLE · art-12438] src=gist.github.com ↗ pub= topic=cloud-computing verified=true sentiment=· neutral

DIY install debian on Oracle Cloud Infrastructure ( Free Tier ) - ARM64

The article provides a step-by-step guide for replacing the default Ubuntu 20.04 operating system on an Oracle Cloud Infrastructure (OCI) Free Tier ARM64 instance with a Debian 10 cloud image. The process involves booting into a RAM-based temporary filesystem, deleting the original Ubuntu installation, and writing the Debian image directly to the disk. The author confirms success after a forced reboot, noting that the new system uses the same SSH public key but requires logging in with the username "debian."

read3 min views19 publishedJan 27, 2022

reinstall_VPS_from_inside.txt

  This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.

Learn more about bidirectional Unicode characters

Show hidden characters

sudo -i

sudo apt update && sudo apt dist-upgrade -y && sudo apt install lsof && sudo reboot

sudo snap remove --purge oracle-cloud-agent && sudo snap remove --purge core18 sudo apt purge -y $(dpkg-query -Wf '${Package}\n' | grep header) $(apt list --installed | grep -oP "^linux.\d\d\d\d-oracle" | grep -v "$(uname -r)") linux-modules-extra-$(uname -r) lxc lxd* vim* && sudo apt -y autoremove && sudo apt -y autoclean && sudo apt -y clean

sudo rm -rf /var/log/* /var/lib/apt/lists/*

cd /

mount -t tmpfs -o size=1700m tmpfs mnt

tar --one-file-system -c . | tar -C /mnt -x

mount --make-private -o remount,rw /

mount --move dev mnt/dev

mount --move proc mnt/proc

mount --move run mnt/run

mount --move sys mnt/sys

sed -i '/^[^#]/d;' mnt/etc/fstab

echo 'tmpfs / tmpfs defaults 0 0' >> mnt/etc/fstab

cd mnt

mkdir old_root

mount --make-private / unshare -m

pivot_root . old_root

/usr/sbin/sshd -D -p 1022 &

iptables -I INPUT -p tcp -m state --state NEW -m tcp --dport 1022 -j ACCEPT

pkill agetty

pkill dbus-daemon

pkill atd

pkill iscsid

pkill rpcbind

pkill unattended-upgrades

kill 1

umount -l /dev/sda1

df -h

lsblk

curl -L https://cloud.debian.org/cdimage/cloud/buster/latest/debian-10-generic-arm64.tar.xz | tar -OJxvf - disk.raw | dd of=/dev/sda bs=1M sync

reboot

── more in #cloud-computing 4 stories · sorted by recency
── more on @oracle cloud infrastructure 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/diy-install-debian-o…] indexed:0 read:3min 2022-01-27 ·