Kernel upgrade issue with new start udisk

Kernel upgrade issue with new start udisk

Recently I upgrade my dell XPS laptop SSD to Samsung 970 EVO NVMe M.2, but because my laptop is a little old(2015 produced), it didn't fully support NVMe, once I install the Ubuntu 18.04, it can't start.

After some search, I found a workaroud to start the OS from a external udisk(I will post how did I do that in another post). It worked good for a while. but today when I did the system upgrade, it failed when kernel upgrade.

Kernel upgrade issue

Setting up grub-efi-amd64-signed (1.93.3+2.02-2ubuntu8.2) ...
Installing for x86_64-efi platform.
Could not delete variable: Invalid argument
grub-install: error: efibootmgr failed to register the boot entry: Block device required.
dpkg: error processing package grub-efi-amd64-signed (--configure):
 installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 grub-efi-amd64-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)

solution:

WORKAROUND from:
https://askubuntu.com/questions/1031066/errors-during-upgrade-from-17-10-to-18-04-shim-signed-and-grub-efi-amd64-signed

sudo su -
cd /boot/efi/EFI
mv ubuntu ubuntu-old
apt install -f
mv ubuntu-old ubuntu
update-grub2
exit

"It seems that the newer grub couldn't access the /boot/efi/EFI/ubuntu directory, for some reason.
So since my system was booting normally, I want just to get rid off that error everytime I was using the apt.
So I thought that workaround just to check it the installation would finish and it seems that worked. Lastly,
I restored the ubuntu directory name just not mess around with my system's ability to boot. It seems,
I forgot to mention to issue an update-grub2 afterwards. – George Tavantzopoulos"