Available in VPC
This guide describes how to update a kernel on the Ubuntu 24.04 server of NAVER Cloud Platform.
This guide is written based on new servers created on NAVER Cloud Platform, so there might be differences from the user server environment. User server environments may be affected by kernel updates and server restarts due to various reasons such as security hardening tasks and other setting tasks. Therefore, review the following before you perform a kernel update:
- Create a replicated server using Server image before updating a kernel of the actual server. Perform the kernel update on the replicated server and check if it restarts successfully. When switching to operational status after restarting, check for any issues in the server. Perform the kernel update only after thorough validation to ensure there are no issues.
- In the case of GPU servers, the GPU driver that matches the kernel version must be installed for normal operation. If the updated kernel is incompatible with GPU drivers, the GPU server might not function normally. Therefore, check GPU driver compatibility before you perform kernel updates. For related information, see GPU driver guide.
This kernel update guide no longer provide regular updates. Therefore, when checking for the latest information or installing a different kernel version, see the relevant guide and take the necessary steps.
The kernel version specified in the guide serves as an example, so make sure to thoroughly test other kernel versions as needed before installation.
- Kernel updates are performed at your own risk, and you are responsible for managing any issues that arise during the update process.
- You can work safely by using a server image to create a backup copy before updating the kernel.
- NAVER Cloud Platform does not provide separate technical support regarding this guide and kernel updates.
Check kernel versions available for update
To update kernels for Ubuntu 24.04 servers, follow these steps:
By default, the repository URL is set to NCP Repo(http://repo.ncloud.com). However, in environments with a public IP or a private subnet configured with NAT, you may use an external public mirror site instead of NCP Repo.
NCP repo is a repository provided by NAVER Cloud Platform to support user environments like VPC private subnets where external access is limited.
To quickly apply the latest patches, we recommend switching to an external Public Mirror site. For more information, see Linux OS repository configuration checklist guide.
- Access the server you want to apply the kernel update to remotely.
- Check the kernel version to apply to the server.
root@ubuntu2404:~# apt-cache search linux-image-6.8.0 | grep generic linux-image-6.8.0-31-generic - Signed kernel image generic linux-image-6.8.0-35-generic - Signed kernel image generic linux-image-6.8.0-36-generic - Signed kernel image generic linux-image-6.8.0-38-generic - Signed kernel image generic linux-image-6.8.0-39-generic - Signed kernel image generic linux-image-6.8.0-40-generic - Signed kernel image generic linux-image-6.8.0-41-generic - Signed kernel image generic linux-image-6.8.0-44-generic - Signed kernel image generic linux-image-6.8.0-45-generic - Signed kernel image generic linux-image-6.8.0-47-generic - Signed kernel image generic linux-image-6.8.0-48-generic - Signed kernel image generic linux-image-6.8.0-49-generic - Signed kernel image generic linux-image-6.8.0-50-generic - Signed kernel image generic linux-image-6.8.0-51-generic - Signed kernel image generic linux-image-6.8.0-52-generic - Signed kernel image generic linux-image-6.8.0-53-generic - Signed kernel image generic linux-image-6.8.0-54-generic - Signed kernel image genericNoteIf the latest kernel information is not updating, run the
apt updatecommand and try again.
This command refreshes the OS repository's metadata and is recommended before executing any apt commands.
Update kernel
To update kernels for Ubuntu 24.04 servers, follow these steps:
This guide provides an example of upgrading the kernel version to 6.8.0-54-generic on a Ubuntu 24.04 server.
The kernel versions available for installation at the time of referencing the guide may vary, so thoroughly test other versions before installation.
- Access the server you want to apply the kernel update to remotely.
- Check the kernel version of the server.
root@ubuntu2404:~# uname -r 6.8.0-52-generic - Check the repository information connected to the server.
root@ubuntu2404:~# cat /etc/apt/sources.list.d/ubuntu.sources Types: deb URIs: http://repo.ncloud.com/ubuntu/ Suites: noble noble-updates noble-backports Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg Types: deb URIs: http://repo.ncloud.com/ubuntu/ Suites: noble-security Components: main restricted universe multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg - Check the kernel version provided by the repository.
root@ubuntu2404:~# rm -rf /var/cache/apt/archives/* root@ubuntu2404:~# rm -rf /var/lib/apt/lists/* root@ubuntu2404:~# apt clean root@ubuntu2404:~# apt update Get:1 http://repo.ncloud.com/ubuntu noble InRelease [256 kB] Get:2 http://repo.ncloud.com/ubuntu noble-updates InRelease [126 kB] Get:3 http://repo.ncloud.com/ubuntu noble-backports InRelease [126 kB] Get:4 http://repo.ncloud.com/ubuntu noble-security InRelease [126 kB] Get:5 http://repo.ncloud.com/ubuntu noble/main amd64 Packages [1,401 kB] ... Omitted ... Get:59 http://repo.ncloud.com/ubuntu noble-security/multiverse Translation-en [4,308 B] Get:60 http://repo.ncloud.com/ubuntu noble-security/multiverse amd64 Components [212 B] Get:61 http://repo.ncloud.com/ubuntu noble-security/multiverse amd64 c-n-f Metadata [356 B] Fetched 35.2 MB in 6s (5,890 kB/s) Reading package lists... Done root@ubuntu2404:~# apt policy linux-image-6.8.0-54-generic linux-image-6.8.0-54-generic: Installed: (none) Candidate: 6.8.0-54.56 Version table: 6.8.0-54.56 500 500 http://repo.ncloud.com/ubuntu noble-updates/main amd64 Packages 500 http://repo.ncloud.com/ubuntu noble-security/main amd64 Packages - Install the reviewed version of the kernel.
Carefully review the list of packages being newly installed, updated, or removed. If everything is in order, enterYto complete the installation.root@ubuntu2404:~# apt install linux-{image,headers}-6.8.0-54-generic Reading package lists... Done Building dependency tree... Done The following additional packages will be installed: linux-headers-6.8.0-54 linux-libc-dev linux-modules-6.8.0-54-generic linux-tools-common Suggested packages: fdutils linux-tools linux-modules-extra-6.8.0-54-generic The following NEW packages will be installed: linux-headers-6.8.0-54 linux-headers-6.8.0-54-generic linux-image-6.8.0-54-generic linux-modules-6.8.0-54-generic The following packages will be upgraded: linux-libc-dev linux-tools-common 2 upgraded, 4 newly installed, 0 to remove and 192 not upgraded. Need to get 74.3 MB of archives. After this operation, 169 MB of additional disk space will be used. Do you want to continue? [Y/n] Y ... Omitted ... Pending kernel upgrade! Running kernel version: 6.8.0-52-generic Diagnostics: The currently running kernel version is not the expected kernel version 6.8.0-54-generic. Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting. No services need to be restarted. No containers need to be restarted. No user sessions are running outdated binaries. No VM guests are running outdated hypervisor (qemu) binaries on this host. - After the installation is complete, check all bootable kernel versions.
root@ubuntu2404:~# dpkg -l | grep linux-image | grep ii ii linux-image-6.8.0-48-generic 6.8.0-48.48 amd64 Signed kernel image generic ii linux-image-6.8.0-52-generic 6.8.0-52.53 amd64 Signed kernel image generic ii linux-image-6.8.0-54-generic 6.8.0-54.56 amd64 Signed kernel image generic - Configure it so that the most recent kernel version can be selected as the default when booting.
root@ubuntu2404:~# sed -i 's/GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/g' /etc/default/grub root@ubuntu2404:~# grep "GRUB_DEFAULT" /etc/default/grub GRUB_DEFAULT=saved root@ubuntu2404:~# grub-set-default "Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-54-generic" root@ubuntu2404:~# grub-editenv list saved_entry=Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-54-generic root@ubuntu2404:~# update-grub Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.8.0-54-generic Found initrd image: /boot/initrd.img-6.8.0-54-generic Found linux image: /boot/vmlinuz-6.8.0-52-generic Found initrd image: /boot/initrd.img-6.8.0-52-generic Found linux image: /boot/vmlinuz-6.8.0-48-generic Found initrd image: /boot/initrd.img-6.8.0-48-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done - Reboot the server to activate the latest kernel version.
root@ubuntu2404:~# sync;rebootNoteIf the server reboot fails, it means the kernel update was not successfully applied. In this case, see Restore kernel update to revert to the previous kernel version.
- Log in to the server again and check if the new kernel is activated.
root@ubuntu2404:~# uname -r 6.8.0-54-genericNoteTo check if the updated kernel is properly applied, see Check kernel update to check the kernel installation status.
Check kernel update
To check if the kernel update was successfully applied:
- Access the server remotely.
- Check if the kernel package is installed.
root@ubuntu2404:~# dpkg -l | grep linux-image-6.8.0-54-generic ii linux-image-6.8.0-54-generic 6.8.0-54.56 amd64 Signed kernel image generic - Check if the initramfs file and vmlinuz file are created in the /boot directory.
root@ubuntu2404:~# ls -l /boot/initrd.img-6.8.0-54-generic -rw-r--r-- 1 root root 43681971 Mar 5 18:49 /boot/initrd.img-6.8.0-54-generic root@ubuntu2404:~# ls -l /boot/vmlinuz-6.8.0-54-generic -rw------- 1 root root 14985608 Feb 8 07:01 /boot/vmlinuz-6.8.0-54-generic - Check if the latest kernel settings are registered in the grub.cfg file.
root@ubuntu2404:~# awk -F"--class" '/menuentry/ && /with Linux/ {print $1}' /boot/grub/grub.cfg | awk '{print i++ " : " $5,$6,$7,$8}' | sed -e "s/'/ /g" 0 : 6.8.0-54-generic 1 : 6.8.0-54-generic (recovery mode) 2 : 6.8.0-52-generic 3 : 6.8.0-52-generic (recovery mode) 4 : 6.8.0-48-generic 5 : 6.8.0-48-generic (recovery mode)
Restore kernel update
If the server fails to restart properly after a kernel update, you must revert to the previous kernel before the update. You can revert it to one of the many installed kernel versions, and this guide describes how to revert the kernel to the version immediately before the update.
To resolve server restart issues, you can attempt server recovery by entering the Single mode. For more information on how to run reboot in the Single mode, see Server recovery guide.
-
In the VPC environment of the NAVER Cloud Platform console, navigate to Menu > Services > Compute > Server.
-
Click the Server menu.
-
Select the server to recover from the server list, and click [Server connection console].
-
Select the previous version as the booting kernel from the grub booting interface and reboot.
-
Ubuntu 24.04 grub booting interface


-
-
After booting is complete, check the kernel version of the server.
root@ubuntu2404:~# uname -r 6.8.0-52-generic -
Check the kernel version that is currently active.
root@ubuntu2404:~# awk -F"--class" '/menuentry/ && /with Linux/ {print $1}' /boot/grub/grub.cfg | awk '{print i++ " : " $5,$6,$7,$8}' | sed -e "s/'/ /g" 0 : 6.8.0-54-generic 1 : 6.8.0-54-generic (recovery mode) 2 : 6.8.0-52-generic 3 : 6.8.0-52-generic (recovery mode) 4 : 6.8.0-48-generic 5 : 6.8.0-48-generic (recovery mode) -
Reset the default kernel version to the previous kernel version when booting.
root@ubuntu2404:~# sed -i 's/GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/g' /etc/default/grub root@ubuntu2404:~# grep "GRUB_DEFAULT" /etc/default/grub GRUB_DEFAULT=saved root@ubuntu2404:~# grub-set-default "Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-52-generic" root@ubuntu2404:~# grub-editenv list saved_entry=Advanced options for Ubuntu>Ubuntu, with Linux 6.8.0-52-generic root@ubuntu2404:~# update-grub Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.8.0-54-generic Found initrd image: /boot/initrd.img-6.8.0-54-generic Found linux image: /boot/vmlinuz-6.8.0-52-generic Found initrd image: /boot/initrd.img-6.8.0-52-generic Found linux image: /boot/vmlinuz-6.8.0-48-generic Found initrd image: /boot/initrd.img-6.8.0-48-generic Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done -
(Optional) Reboot the server to check whether the server boots up normally with the updated kernel version.
root@ubuntu2404:~# sync;reboot -
(Optional) Log back into the server to check the booting status and the kernel version.
root@ubuntu2404:~# uname -r 6.8.0-52-generic