------- Comment From <email address hidden> 2021-05-17 10:50 EDT-------
I just did an "apt update && apt upgrade" on a KVM guest with Ubuntu 20.04 that I had previously used installkernel on with an early version of your updated script:
Setting up linux-image-5.4.0-73-generic (5.4.0-73.82) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.12.0-rc8-07595-g446009324fa8
I: /boot/initrd.img.old is now a symlink to initrd.img-5.12.0-rc8-07595-g446009324fa8
I: /boot/vmlinuz is now a symlink to vmlinuz-5.4.0-73-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.4.0-73-generic
Setting up alsa-utils (1.2.2-1ubuntu2.1) ...
alsa-restore.service is a disabled or a static unit not running, not starting it.
alsa-state.service is a disabled or a static unit not running, not starting it.
Setting up procps (2:3.3.16-1ubuntu2.1) ...
Setting up bind9-dnsutils (1:9.16.1-0ubuntu2.8) ...
Setting up cloud-init (21.1-19-gbad84ad4-0ubuntu1~20.04.2) ...
Setting up linux-modules-extra-5.4.0-73-generic (5.4.0-73.82) ...
Setting up linux-image-generic (5.4.0.73.76) ...
Setting up linux-generic (5.4.0.73.76) ...
Setting up python3-distupgrade (1:20.04.32) ...
Setting up ubuntu-release-upgrader-core (1:20.04.32) ...
Setting up python3-update-manager (1:20.04.10.7) ...
Setting up update-manager-core (1:20.04.10.7) ...
Setting up update-notifier-common (3.192.30.7) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for rsyslog (8.2001.0-1ubuntu1.1) ...
Processing triggers for systemd (245.4-4ubuntu3.6) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-2ubuntu2.1) ...
Processing triggers for initramfs-tools (0.136ubuntu6.4) ...
update-initramfs: Generating /boot/initrd.img-5.12.0-rc8-07595-g446009324fa8 <--- this is the currently running kernel installed with installkernel
Not invoking zipl: initrd doesn't exist yet
Processing triggers for linux-image-5.4.0-73-generic (5.4.0-73.82) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.4.0-73-generic
Not invoking zipl: initrd doesn't exist yet
/etc/kernel/postinst.d/zz-zipl:
Not invoking zipl: initrd doesn't exist yet <--- but above it said it generated ?it!?
So usually I would expect that upgrading the kernel after having used installkernel will afterwards use the new distro kernel. Am I correct in that assumption? It might also be that this system is somehow in a weird state but would like confirmation either way.
------- Comment From <email address hidden> 2021-05-17 10:50 EDT-------
I just did an "apt update && apt upgrade" on a KVM guest with Ubuntu 20.04 that I had previously used installkernel on with an early version of your updated script:
Setting up linux-image- 5.4.0-73- generic (5.4.0-73.82) ... 5.12.0- rc8-07595- g446009324fa8 img.old is now a symlink to initrd. img-5.12. 0-rc8-07595- g446009324fa8 5.4.0-73- generic img-5.4. 0-73-generic service is a disabled or a static unit not running, not starting it. 16-1ubuntu2. 1) ... 1-0ubuntu2. 8) ... gbad84ad4- 0ubuntu1~ 20.04.2) ... extra-5. 4.0-73- generic (5.4.0-73.82) ... release- upgrader- core (1:20.04.32) ... update- manager (1:20.04.10.7) ... notifier- common (3.192.30.7) ... 0-1ubuntu1. 1) ... 2ubuntu2. 1) ... img-5.12. 0-rc8-07595- g446009324fa8 <--- this is the currently running kernel installed with installkernel 5.4.0-73- generic (5.4.0-73.82) ... postinst. d/initramfs- tools: img-5.4. 0-73-generic postinst. d/zz-zipl:
I: /boot/vmlinuz.old is now a symlink to vmlinuz-
I: /boot/initrd.
I: /boot/vmlinuz is now a symlink to vmlinuz-
I: /boot/initrd.img is now a symlink to initrd.
Setting up alsa-utils (1.2.2-1ubuntu2.1) ...
alsa-restore.
alsa-state.service is a disabled or a static unit not running, not starting it.
Setting up procps (2:3.3.
Setting up bind9-dnsutils (1:9.16.
Setting up cloud-init (21.1-19-
Setting up linux-modules-
Setting up linux-image-generic (5.4.0.73.76) ...
Setting up linux-generic (5.4.0.73.76) ...
Setting up python3-distupgrade (1:20.04.32) ...
Setting up ubuntu-
Setting up python3-
Setting up update-manager-core (1:20.04.10.7) ...
Setting up update-
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for rsyslog (8.2001.
Processing triggers for systemd (245.4-4ubuntu3.6) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for dbus (1.12.16-
Processing triggers for initramfs-tools (0.136ubuntu6.4) ...
update-initramfs: Generating /boot/initrd.
Not invoking zipl: initrd doesn't exist yet
Processing triggers for linux-image-
/etc/kernel/
update-initramfs: Generating /boot/initrd.
Not invoking zipl: initrd doesn't exist yet
/etc/kernel/
Not invoking zipl: initrd doesn't exist yet <--- but above it said it generated ?it!?
So usually I would expect that upgrading the kernel after having used installkernel will afterwards use the new distro kernel. Am I correct in that assumption? It might also be that this system is somehow in a weird state but would like confirmation either way.