So, I have plenty of VMs on Hetzner Cloud, and I wanted to set up zram on one of them as swap, and I noticed it failed… while investigating, I noticed the zram module was not loaded and modprobe zram just told me there’s no such module!

Well, as it turns out, Hetzner (and likely others too), use a slimmed down Linux kernel on their standard (Ubuntu) installs.

The installed kernel package is linux-image-virtual “Virtual Linux kernel image” which lacks many drivers.

Simply installing the package linux-image-extra-virtual (“Extra drivers for Virtual Linux kernel image”) and rebooting solves this.

sudo apt install linux-image-extra-virtual

Et voila! I can now use zram and more.

I hope this little post helped you out, I run this blog in my not-so-spare time and would be happy for a donation of a smol little coffee. 👉👈