Cannot recover system after Ubuntu went into emergency mode

You should check the integrity of installed packages and complete the upgrade to restore your system back to normal.

Ensure all unpacked packages have been configured:

sudo dpkg --configure -a

The debsum package achieves integrity verification using each package's MD5SUMS file. You can install it:

sudo apt update
sudo apt install debsums

You then need to clear apt's cache, and initialise debsums by downloading the packages again:

sudo apt clean
sudo debsums_init

Then run a manual check, whereby debsums reports changed or corrupt files:

sudo debsums -cs

Check to make sure the configuration changes are ones that you expect. If any errors are reported, you need to re-install those packages:

sudo apt install --reinstall broken-package

You should then complete the update.

Before you perform your update, however, as we have removed the /boot/efi mount from /etc/fstab, you should mount it again in case GRUB needs updating. Uncomment the line in /etc/fstab, then run:

sudo mount /boot/efi

You can then proceed with the update:

sudo apt update
sudo apt upgrade --with-new-pkgs

Reboot. If the system does not come up again because the ESP is still not mounting, then more troubleshooting needs to be done.