Azure Ubuntu 16.04 virtual machine installation low version of the kernel

Problem Scenario for the use of the system version of the platform kernel image installation for Linux 4.15.0-1052-azure, but the customer environment requires Linux 4.15.0-1045-azure.

1, try the following (be sure to do a backup before the operation of the virtual machine or disk to do a snapshot) to install 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 see whether there are 1045 output kernel version observing the output file as follows side:
the root leoubuntu1604b @: ~ # grep menuentry /boot/grub/grub.cfg
IF [X "feature_menuentry_id $ {}" = XY]; the then
menuentry_id_option = "- ID"
menuentry_id_option = ""
Export menuentry_id_option
menuentry 'the Ubuntu' Ubuntu --class gnulinux --class --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-1052-Azure '--class Ubuntu --class gnulinux --class gnu --class os $ menuentry_id_option ' gnulinux-4.15.0-1052-azure-advanced-8716e09d-0f3d-47c5-a89a-666b9d0bd1bf' {
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-azure-recovery-8716e09d-0f3d-47c5-a89a-666b9d0bd1bf' {
menuentry 'Ubuntu, with Linux 4.15.0-1045-azure' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.15.0-1045-azure-advanced-8716e09d-0f3d-47c5-a89a-666b9d0bd1bf' {
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-azure-recovery-8716e09d-0f3d-47c5-a89a-666b9d0bd1bf' {

3, confirm correct output 2, modify / etc / default / grub file "GRUB_DEFAULT" entry for the following:
GRUB_DEFAULT = "Advanced Options for the Ubuntu> the Ubuntu, with the Linux-4.15.0-1045 Azure"

4, the implementation of "update-grub" command to reboot the operating system to see if there are changes to the virtual machine version.

Guess you like

Origin blog.51cto.com/jiaxiaolei/2428070