Hi All,
We’re running ubuntu 16.04 on a couple of large droplets and running into an apt-get issue. Whenever apt-get [install/upgrade] is run, it tries to remove older packages marked for removal. Specifically, it’s trying to remove older kernels. Doing so triggers grub to run updates, which fails with the following error:
...
Removing linux-image-4.4.0-128-generic (4.4.0-128.154) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-128-generic /boot/vmlinuz-4.4.0-128-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-128-generic
run-parts: executing /etc/kernel/postrm.d/x-grub-legacy-ec2 4.4.0-128-generic /boot/vmlinuz-4.4.0-128-generic
Searching for GRUB installation directory ... found: /boot/grub
Searching for default file ... found: /boot/grub/default
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-4.4.0-134-generic
Found kernel: /boot/vmlinuz-4.4.0-130-generic
Found kernel: /boot/vmlinuz-4.4.0-134-generic
Found kernel: /boot/vmlinuz-4.4.0-130-generic
Updating /boot/grub/menu.lst ... done
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-128-generic /boot/vmlinuz-4.4.0-128-generic
Generating grub configuration file ...
grub-probe: error: unknown filesystem.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-128-generic.postrm line 330.
dpkg: error processing package linux-image-4.4.0-128-generic (--remove):
subprocess installed post-removal script returned error exit status 1
...
Specifically, I think the issue is due to
Generating grub configuration file ...
grub-probe: error: unknown filesystem
As a workaround, I’ve tried marking the above packages as install instead of deinstall using dpkg --set-selections, but they immediately get reset on the next apt-get call.
Cheers.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hello,
The issue might be related to a configuration mistake, or an outdated package causing the problem. I would recommend trying the following steps:
If none of these steps resolve the issue, you might want to consider migrating to a newer version of Ubuntu, such as Ubuntu 18.04 or 20.04, as Ubuntu 16.04 is nearing its end of life.
For more information on working with kernels, you can refer to the DigitalOcean documentation: https://docs.digitalocean.com/products/droplets/how-to/kernel/
Hope that this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.