Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to install a lower version kernel in an Azure Ubuntu 16.04 virtual machine

Shulou Source: shulou.com Published: 2022-06-01 01:37:25 09月22日 Update

This article is about how the Azure Ubuntu 16.04 virtual machine installs an earlier version of the kernel. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

The problem scenario is that the system kernel version installed using the platform image is Linux 4.15.0-1052-azure, but the customer environment requires Linux 4.15.0-1045-azure.

1, try the following (be sure to back up the virtual machine or take a snapshot of the disk before operation) to install the Ubuntu 4.15.0-1045-azure kernel:

# apt-get install-y linux-azure*-4.15.0-1045

# apt-get install-y linux-image-4.15.0-1045-azure

# apt-get install-y linux-tools-4.15.0-1045-azure

2, and then use the command to check to see if there is a 1045 kernel version of the file output, as shown below:

Root@leoubuntu1604b:~# grep menuentry / boot/grub/grub.cfg

If [x "${feature_menuentry_id}" = xy]; then

Menuentry_id_option= "--id"

Menuentry_id_option= ""

Export menuentry_id_option

Menuentry 'Ubuntu'-- class ubuntu-- class gnu-linux-- class gnu--class os $menuentry_id_option' gnulinux-simple-8716e09d-0f3d-47c5-a89a-666b9d0bd1bf' {

Submenu 'Advanced options for Ubuntu' $menuentry_id_option' gnulinux-advanced-8716e09d-0f3d-47c5-a89a-666b9d0bd1bf' {

Menuentry'Ubuntu, with Linux 4.15.0-1052Muzazure`-- class ubuntu-- class gnu-linux-- class gnu--class os $menuentry_id_option 'gnulinux-4.15.0-1052KuazureMill 8716e09dMui 0f3dMui 47c5Mui a89aMuth666b9d0bd1bf' {

Menuentry 'Ubuntu, with Linux 4.15.0-1052-azure (recovery mode)'-- class ubuntu-- class gnu-linux-- class gnu--class os $menuentry_id_option 'gnulinux-4.15.0-1052 AzureMuk 8716e09d Mustang 0f3dMui 47c5Mui a89aMuo666b9d0bd1bf' {

Menuentry 'Ubuntu, with Linux 4.15.0-1045 Mustang Azure`-- class ubuntu-- class gnu-linux-- class gnu--class os $menuentry_id_option' gnulinux-4.15.0-1045 Muzureluk advancedlu 8716e09d Mustang 0f3dMui 47c5 Mustang a89aLau666b9d0bd1bf' {

Menuentry 'Ubuntu, with Linux 4.15.0-1045-azure (recovery mode)'-- class ubuntu-- class gnu-linux-- class gnu--class os $menuentry_id_option 'gnulinux-4.15.0-1045 MuzureMui 8716e09d Mustang 0f3dMui 47c5Mui a89aLau666b9d0bd1bf' {

3. After confirming that the output in 2 is correct, modify the "GRUB_DEFAULT" entry in the / etc/default/grub file as follows:

GRUB_DEFAULT= "Advanced options for Ubuntu > Ubuntu, with Linux 4.15.0-1045-azure"

4. After executing the "update-grub" command, restart the operating system and observe whether the version of the virtual machine has changed.

Thank you for reading! This is the end of the article on "how to install a lower version of the kernel in the Azure Ubuntu 16.04virtual machine". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Kernel version content output commands files more articles systems observations good practical operating systems scenarios backups customers platforms snapshots articles environment Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft NVidia Shulou Technology Huawei MySQL