Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Boot Ubuntu with custom kernel on Digital Ocean
apt-get install kexec-tools
# Insert this at the top of /etc/init.d/rcS
if grep -qv ' kexeced$' /proc/cmdline ;then
kexec --load /vmlinuz --initrd=/initrd.img --append='root=LABEL=DOROOT kexeced' &&
mount -o ro,remount / &&
kexec -e
fi
# Then just use apt/dpkg to install whatever kernel you want, e.g. from http://kernel.ubuntu.com/~kernel-ppa/mainline/
@mamarley

This comment has been minimized.

Copy link

commented Apr 1, 2014

This doesn't work quite right for me; for some reason the mount command fails, which also skips the kexec -e. If I remove the && after the mount command, allowing the kexec -e to be executed even if the mount fails, everything works.

@rodrigoaguilera

This comment has been minimized.

Copy link

commented Mar 23, 2016

I think is important to update this to reflect that the bootloader for many images(debian and ubuntu included) in digitalocean changed to boot the kernel configured in debian and not in the control panel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.