Once rebooted after patching, you will kindly greated by error: symbol 'grub_calloc' not found, entering rescue mode and way to boot the OS anymore...
The thing become even more horrible if you are using an encrypted partition plus LVM...
You can skip the steps 2 and 4 if you just have a normal partition scheme with no encryption or
LVM.
Just open the file browser, select your encrypted drive and enter passphrase to unlock it when prompted.
Just use:
# Become root
sudo su -
# List block devices
lsblk
# List all disks / partitions
fdisk -lIt will be usefull for the next steps.
Skip the next step if you have a normal partition and no LVM and go directly to step 5. Just replace
/dev/mapperby/dev/your-partition-found-with-fdisk.
You might need to install the lvm2 package to proceed:
# Update your package cache
apt update
# Install required lvm2 package
apt install lvm2
# Scan volume groups
vgscan -v
# Activate volume group
vgchange -ay -v
# Scan everything
pvs ; vgs ; lvs
# Display logical volume found
lvdisplayIn my case, it was /dev/mapper/data-root that I needed to mount.
Now that the root partition is found, you'll need to map it to your live OS:
# Create the 'rescue' folder
mkdir -v /rescue
# Mount the 'root' partition found
mount -v /dev/mapper/data-root /rescue
# Mount the 'boot' partition found with 'fdisk'
mount -v /dev/vda1 /rescue/boot
# Bind mount required folders for later 'chroot'
for fs in /proc /sys /run /tmp /dev ; do mount -v --bind "$fs" "/rescue${fs}" ; doneOnce everything has been mounted correctly, we can setup the chroot and proceed to the GRUB repair:
# Setup 'chroot'
chroot /rescue
# Repair GRUB (by reinstalling it)
grub-install /dev/vda1
# You should get this as final result
Installing for i386-pc platform.
Installation finished. No error reported.
# Leave 'chroot'
exitNow that GRUB has been reinstalled, you can unmount everything and restart your computer:
# Move to the root path
cd /
# Unmount everything
for fs in /proc /sys /run /tmp /dev ; do umount "/rescue${fs}" ; done
umount -v /rescue/boot
umount -v /rescue
# Delete 'rescue' folder
rm -v /rescue
# Restart your computer
rebootIf all steps went without any issues, you should get your computer OS booting again as expected 😉.