Sometime in the last year, Scaleway seems to have enabled
kexec. This lets us switch to a custom kernel after booting
I’ve written a few scripts for the Ubuntu 16.04 image to get this process going smoothly, automatically switching kernels immediately after boot: https://github.com/BobVul/Custom-Kernel-Launcher-for-Scaleway
As an alternative, apparently you can add
KEXEC_INITRD options to the server tags, which means you won’t need
kexec-tools nor the systemd services. However, you’ll still need to fix your
/etc/fstab to mount root properly (rw) and also either disable the new network naming system or configure it to use DHCP properly.
You are expected to be running as root. The install scripts are written for a clean image, and might overwrite other settings.
Clone this repository somewhere.
Install a custom or distro-official kernel. In Ubuntu, this can be accomplished with
apt install linux-generic. You are expected to end up with a
/initrd.imgfile in the root. If it prompts you, do not install grub on any devices - leave them all unticked and press enter, then yes continue without installing grub.
kexec. In Ubuntu,
apt install kexec-tools. If it prompts you, you do not want it to handle reboots.
install.sh. This will copy some configs necessary to get prevent errors during the boot.
uname -rand record the output. This is your old (Scaleway) kernel.
Test by running
systemctl kexec, which should switch into the new kernel. You will need to reconnect to SSH.
uname -ragain – you should now be in your new (custom) kernel.
If the manual reboot worked, you can enable auto-switch on boot by running
enable-autostart.sh. If it did not work, I would recommend figuring out why first so you do not get stuck in an unbootable system.
Further details are available on the linked GitHub repo.