January 2023

Upgrade Carmine from Ubuntu 20.04 LTS to 22.04 LTS

/dev/volgroup1/ubuntu16.04 is really Ubuntu 20.04
/dev/volgroup1/ubuntu18.04 is the old Ubuntu 18.04 installation
Both logical volumes are the same size

Rename the old logical volume

First rename the old logical volume to reflect what will be stored there:
sudo lvrename volgroup1 ubuntu18.04 linux2

Back up the current OS

copy the contents of the current OS in ubuntu16.04 to linux2:
sudo dd if=/dev/volgroup1/ubuntu16.04 of=/dev/volgroup1/linux2 bs=1024k

Update the backup copy to be bootable

Mount the new volume:
sudo mkdir /media/linux2
sudo mount /dev/volgroup1/linux2 /media/linux2
Edit /media/linux2/etc/fstab and change / to point to /dev/mapper/volgroup1-linux2

Update Grub

Load Grub Customizer if you don’t already have it:
sudo apt install grub-customizer
Run Grub Customizer and check the entries for both logical volumes including the paths and LVIDs (which you can get from lvdisplay)
Rename the entries to Ubuntu primary (linux1) and Ubuntu alternate (linux2)
Don’t forget to save, which runs update-grub and install to MBR

Check both logical volumes are OK

Verify you can boot into primary and alternate

When running alternate, rename logical volume ubuntu16.04 to linux1, update its fstab and update Grub as above.

Now that there’s a backup copy of the current OS in Ubuntu alternate, it’s safe to boot into Ubuntu primary and begin the upgrade


Comments (0)


Upgrading from PHP 7.4 to 8.0

PHP 7.4 is no longer supported. My host offers 8.0, so I upgraded, but WordPress failed to run.

Starting State

WordPress version 6.1.1
PHP 7.4 FastCGI

Error Description

Upgrading to PHP 8.0 FastCGI caused WordPress to show:

There has been a critical error on this website. Please check your site admin email inbox for instructions.

None of the WordPress pages worked, including the recovery page that WordPress emailed to me, wp-login.php?action=enter_recovery_mode.


To diagnose the problem, I turned on debug logs by adding these lines to wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );

This showed a fatal error in the wp-cache plugin. This was surprising because that plugin was disabled.


Moving the wp-cache directory from the plugins directory to another directory I created, plugins-old, fixed the problem.


Comments (0)