Updating Arch Kernel On Digital Ocean

I have not bothered updating my Linux kernel package here since my VPS provider – Digital Ocean – went crazy and deprecated Arch Linux as an install option. That is obviously a bad thing…

This backfired on me today. It turns out that systemd-218 does not like an old i686 kernels (I had 3.13.7) and I could not log in. I am not the only one to notice this, so there may be a genuine bug there. It also seems that DO recovery console is a bit useless if you have a problem other than a network issue. Good thing I have DO system backups set to run every week (in a completely unrelated incident… I think one comment on one of my posts got lost and restoring from my more regular WordPress backup is too much effort).

So how to run a newer kernel – I have no idea what DO do in the background, but your installed kernel needs to match the one you select in the DO control panel. I think the kernel and initrd are stored externally and if this does not match the installed version, your system’s modules fail to load. This is how I know the rescue console is good when networking fails!

Kexec to the rescue! You can do a fancy systemd type thing (see Arch wiki page), but I just provided a script in /usr/bin/init. To do this, install kexec-tools and remove systemd-sysvcompat. Then paste this into /usr/bin/init:

kexec --load /boot/vmlinuz-linux --initrd=/boot/initramfs-linux.img --append="root=LABEL=DOROOT init=/usr/lib/systemd/systemd" &&
mount -o ro,remount / &&
kexec -e
exec /usr/lib/systemd/systemd

Give that file 755 permissions, and all is done.

Now if all that does not put you off, and you really want to install Arch Linux on DO, here is a script that coverts a Debain droplet to an Arch one! You can also use my referral link

Edit: when checking this article before posting I found this and this. I’m not as clever as I thought, or these people are at least equally clever.

6 thoughts on “Updating Arch Kernel On Digital Ocean

    • That looks good. But do you end up with a /boot partition of 1GB to hold the installer?

      I see indications that FreeBSD is not the only OS they allow to have any kernel – CentOS too. That seemed to be one of the last barriers to allowing any distro to be installed anyway, so hopefully we will not need these hacks soon.

      • Hi Alan,

        I did end up with a 1G /boot. What I did notice was that my FreeBSD droplet shows 21G with df –si versus 20G with the same command on Fedora20.

        The extra 1G allowed me space to keep a copy of the live ISO in case of any sort of failure that might require *more* than a rescue shell in the init.

  1. Any way to make that “script” into arch, like a systemd-kexec or something to not neet to replace that init script (wich ironic name)?

      • I was talking about a way to not remove “systemd-sysvcompat” and not edit /usr/bin/init, but have this working.
        maybe a systemd service that call that if kexec is present and reboot but defaut to standard reboot if not.