Whilst updating my Ubuntu 20.04 virtual machine ( actually an LPAR running on an IBM z/15 box ) : -
apt-get update && apt-get --with-new-pkgs upgrade -y
I saw this
/usr/sbin/update-grub: not found
...
When I checked for the missing script: -
ls -al /usr/sbin/update-grub
I saw: -
ls: cannot access '/usr/sbin/update-grub': No such file or directory
Following this fine link - update-grub command not found - I created the missing script: -
#!/bin/sh
set -e
exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
EOF
and set it to execute: -
chmod +x /usr/sbin/update-grub
and validated: -
ls -al /usr/sbin/update-grub
and then ran it manually: -
/usr/sbin/update-grub
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-73-generic
Found initrd image: /boot/initrd.img-5.4.0-73-generic
Found linux image: /boot/vmlinuz-5.4.0-72-generic
Found initrd image: /boot/initrd.img-5.4.0-72-generic
Found linux image: /boot/vmlinuz-5.4.0-70-generic
Found initrd image: /boot/initrd.img-5.4.0-70-generic
done
which looked good.
I again ran the update: -
apt-get update && apt-get --with-new-pkgs upgrade -y
and everything updated as expected.
For reference, on another box, where grub wasn't properly installed, I searched the Apt cache for relevant binaries: -
apt-cache search grub
grub-common - GRand Unified Bootloader (common files)
grub-ipxe - Network booting from GRUB using iPXE
grub-legacy-ec2 - Handles update-grub for ec2 instances
...
and then installed grub-common as follows: -
apt-get install -y grub-common
No comments:
Post a Comment