DigitalOcean deprecated Arch Linux a while back because it was relatively difficult to support due to the rolling updates. I wrote this script to bring it back! This script downloads a bootstrap Arch Linux image, updates it to the latest version, then overwrites the host operating system with it.
This script may cause your VPS to become unbootable. I only recommend running this script on newly created droplets with no important data.
Create a new Debian 9.x droplet (either 32-bit or 64-bit is fine).
In the droplet, run the following as root:
# wget https://raw.githubusercontent.com/gh2o/digitalocean-debian-to-arch/debian9/install.sh -O install.sh
# bash install.sh
Follow the instructions when prompted.
Sit back and relax! The system will automatically reboot once complete, and you should have a fully updated Arch Linux system in within minutes.
This script supports several flags, all of which are optional.
--archlinux_mirror
--extra_packages
--extra_packages "git wget"
).--grub_timeout
--kernel_package
linux
package.
Other options include linux-lts
for long term support and linux-hardened
for
a kernel with patches from linux-hardened.--mkfs_options
mkfs
. Useful for settings bytes per inode on ext4,
e.g. --mkfs_options="-i 65536"
.--target_architecture
uname -m
.
A 64-bit Debian image may convert to either x86_64
or i686
.
A 32-bit Debian image may only convert to i686
.--target_disklabel
gpt
(GUID partition table
as used by EFI). The alternative is dos
(traditional MBR).--target_filesystem
ext4
. The alternative is btrfs
.pacman -Syu
is called inside the image to pull in all the base packages
along with OpenSSH and any other packages put in the --extra_packages option.digitalocean-synchronize
is installed into
the image. This script is run at every startup to autodetect the network
settings from the metadata service. It also detects if the droplet
was just restored, and if so, it resets the root password and regenerates
the host SSH keys.systemctl switch-root
to enter the minimal
root filesystem.