New to the Ubuntu community & issue tracker so apologies if this comment should go elsewhere.
I am seeing the same behavior on Ubuntu 18.04.3 LTS (bionic) after following the procedure for compiling a new kernel at https://help.ubuntu.com/lts/installation-guide/amd64/ch08s06.html. The compile completes successfully but installation fails when running sudo dpkg -i ../linux-image...deb. After adding "set -x" to /etc/kernel/postinst.d/x-grub-legacy-ec2 and /usr/sbin/update-grub-legacy-ec2, it looks like the /usr/sbin/update- grub-legacy-ec2 script is failing in the ucf_update_kernels function. RET='20 Unsupported command "*" (full line was " * dkms: running auto installation service for kernel 4.15.18custom") received from confmodule.' -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to dkms in Ubuntu. https://bugs.launchpad.net/bugs/1838839 Title: Install of custom kernel fails after recent dkms update Status in dkms package in Ubuntu: Confirmed Bug description: Release: Ubuntu 16.04.6 LTS (xenial) Upgrading dkms from 2.2.0.3-2ubuntu11.6 to 2.2.0.3-2ubuntu11.7 (the "fix" for https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/1827697) breaks installation of custom kernels again, as it undoes the fixes done for bug https://bugs.launchpad.net/ubuntu/+source/nvidia- common/+bug/292606 . To be specific, during package install (either via dpkg or apt-get) I'm now getting the following error from /usr/sbin/update-grub-legacy- ec2 which is run from /etc/kernel/postinst.d/x-grub-legacy-ec2 (after running /etc/kernel/postinst.d/dkms): 20 Unsupported command "*" (full line was " * dkms: running auto installation service for kernel ...") received from confmodule. The only solution I've found so far is to downgrade dkms to 2.2.0.3-2ubuntu11.6. To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/dkms/+bug/1838839/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp