I have a setup on my laptop in which there are three partitions relevant to Ubuntu: a ext4 /boot partition, a btrfs root partition on LUKS and a swap partition on LUKS.
Sometimes, after an unclean shutdown, Ubuntu would refuse to boot, and would just stop after it successfully maps the LUKS partitions and appears to mount the root partition. Recovery mode does not work either.
This is easily fixed by booting into a livecd, mounting and unmounting the partition (which shows some errors found on the partition in dmesg), and then booting normally.
Is there any way to make Ubuntu fix the errors automatically instead?