This scenario is for long time users who happened to recently upgrade to Ubuntu 20 then their shared folder didn’t work suddenly. TLDR: You just need to upgrade your VirtualBox to at least 6.1.16. I upgraded to 6.1.32 which is the latest version as of Feb 12, 2022.
Fixing Shared Folder
When upgrading the kernel, it will usually automatically rebuild the module for VirtualBox Guest Additions. However, it sometimes broke when upgrading the OS version. If you check the status for the VirtualBox Guest Additions service, you will find some hints on what went wrong.
sudo systemctl status vboxadd.service
You will find out that the kernel module for vboxadd service didn’t build successfully and when you follow the trail into the build log, you will see some error about some linux kernel header file missing.
After a quick search, I found out that this was an issue with the old VirtualBox version and I have to upgrade. I upgraded to 6.1.32 (with extension pack as well as I’m using Windows 10), installed the new Guest Additions then fix the paths for the vboxadd-service by following this guide:
TLDR; again, run the following command:
sudo systemctl edit --full vboxadd-service
Then fix the paths for the new VirtualBox version. Reboot and shared folder should work again.
Kernel Panic After Ubuntu 20 Upgrade
I have two Ubuntu VMs, a desktop VM and a server VM. My desktop VM updates without a problem. When I apply the same update to my server VM, I get a kernel panic error during boot process hinting a problem around grub2
.
Note: I’m upgrading from Ubuntu 18 to 20, the usual LTS upgrade happy path.
To troubleshoot the issue, I boot using an old kernel since it is still available on the grub2
menu. Note that I tried booting recover mode too using the old kernel but I am not really that good at Linux to do hardcore recovery stuff.
My old kernel was 4.15.0-162-generic
and my new kernel is 5.4.0-99-generic
. I’m already familiar with fixing boot loaders like lilo
but this is probably my first time fixing grub2
.
What I did was just boot using the old kernel then run the following as root.
update-grub
After a reboot, I was able to boot using the latest kernel.
I really don’t know why it was broken but I remember I run out of space during the upgrade process, so maybe that was the reason.
That’s it!
Featured image by: Miguel Á. Padriñán