I developed the attached patch to include legacy.so for root or /usr volumes that use the hash ripemd160 or whirlpool. Successfully tested in a VM:
* Use Ubuntu 22.04 installer
* Prepare encrypted disk layout (first partition /boot, second for /) and go one step back
* Then change hash in terminal
```
sudo cryptsetup close vda2_crypt
sudo cryptsetup luksFormat --hash=whirlpool /dev/vda2
sudo cryptsetup luksOpen /dev/vda2 vda2_crypt
sudo mkfs.ext4 /dev/mapper/vda2_crypt
```
* Continue and complete installation
* Ensure that /target/etc/crypttab exists
* Apply workaround from bug description
* Reboot into installation
* Apply attached patch
* Remove workaround
* Run "update-initramfs -u" and reboot
* Systems boots correcty
I could reproduce the issue with encrypted volumes created as following:
```
sudo cryptsetup luksFormat --hash=ripemd160 $volume
sudo cryptsetup luksFormat --hash=whirlpool $volume
```
I developed the attached patch to include legacy.so for root or /usr volumes that use the hash ripemd160 or whirlpool. Successfully tested in a VM:
* Use Ubuntu 22.04 installer vda2_crypt etc/crypttab exists
* Prepare encrypted disk layout (first partition /boot, second for /) and go one step back
* Then change hash in terminal
```
sudo cryptsetup close vda2_crypt
sudo cryptsetup luksFormat --hash=whirlpool /dev/vda2
sudo cryptsetup luksOpen /dev/vda2 vda2_crypt
sudo mkfs.ext4 /dev/mapper/
```
* Continue and complete installation
* Ensure that /target/
* Apply workaround from bug description
* Reboot into installation
* Apply attached patch
* Remove workaround
* Run "update-initramfs -u" and reboot
* Systems boots correcty