Hubesco's Blog

Inside a software engineer mind

Update Linux Kernel on OVH VPS SSD

Rédigé par Pao 1 commentaire

It's been a while since I wanted to upgrade my linux kernel on my OVH VPS SSD. But for some reason I couldn't manage to do it. I was stuck understanding why I couldn't figure it out while I have been able to do so for other servers and Linux distribs. 

Here what I found after two evenings and a backup (using OVH snapshot option). Never forget to backup before messing with configuration.

Configuration

  • Provider : OVH
  • Server : VPS SSD 2016
  • OS : Debian 9 Stretch
  • Bootloader : extlinux (<= this is where I struggled)
  • Current Linux kernel : linux-image-3.16.0-4-amd64
  • Wanna be Linux kernel : linux-image-4.9.0-8-amd64

Step 1 - Install the new Linux kernel

Find the Linux kernel to install :

apt-cache search linux-image
linux-image-amd64 - Linux pour les ordinateurs 64 bits (métapaquet)
linux-image-rt-amd64 - Linux pour les ordinateurs 64 bits (métapaquet) avec PREEMPT_RT
linux-headers-4.9.0-8-amd64 - Header files for Linux 4.9.0-8-amd64
linux-headers-4.9.0-8-rt-amd64 - Header files for Linux 4.9.0-8-rt-amd64
linux-image-4.9.0-8-amd64 - Linux 4.9 for 64-bit PCs
linux-image-4.9.0-8-amd64-dbg - Debug symbols for linux-image-4.9.0-8-amd64
linux-image-4.9.0-8-rt-amd64 - Linux 4.9 for 64-bit PCs, PREEMPT_RT
... // more here 

Install the kernel

apt-get install linux-image-4.9.0-8-amd64

 

Step 2 - Update the bootlader

This is where I struggled. All the posts I found on Internet mention GRUB or syslinux. But nothing on extlinux even on the official Debian wiki.
Until when I found that extlinux is a variant of syslinux and OVH uses extlinux.

So I proceed to update the configuration as mentionned in the official extlinux wiki with :

extlinux --install /boot

But still no luck until then I found this serverfault answer that says :

I had the same issue, also on OVH after the last update. After looking in the boot folder, I had two different versions: vmlinuz-3.16.0-4-amd64 & vmlinuz-3.16.0-5-amd64 I changed in both extlinux.conf files the version and it worked.

Ah ! So I searched for this second config file :

locate extlinux.conf
/boot/extlinux/extlinux.conf
/extlinux.conf

Here you are !!! 
All what remains is then to update both files, reboot the server and TADA ! I have my new linux kernel.

Happy Ending <3

Fil RSS des articles de ce mot clé