No space left on device

When copying /boot from the old filesystem to the in-memory one, you might see "No space left on device" errors like the following:

Exception: Command bash -c "set -e; mv /oldroot/boot/* /boot/" failed with return code 1
stdout:

stderr:
mv: error writing '/boot/initrd.img-5.4.1-050401-generic': No space left on device
mv: error writing '/boot/System.map-5.0.0-1027-azure': No space left on device
mv: error writing '/boot/System.map-5.0.0-1028-azure': No space left on device
mv: error writing '/boot/System.map-5.1.0-050100-generic': No space left on device
mv: error writing '/boot/System.map-5.2.0-050200rc7-generic': No space left on device
mv: error writing '/boot/System.map-5.3.1-050301-generic': No space left on device
mv: error writing '/boot/System.map-5.3.7-050307-generic': No space left on device
mv: error writing '/boot/System.map-5.3.8-050308-generic': No space left on device
mv: error writing '/boot/System.map-5.4.1-050401-generic': No space left on device
mv: error writing '/boot/vmlinuz-5.0.0-1027-azure': No space left on device
mv: error writing '/boot/vmlinuz-5.0.0-1028-azure': No space left on device
mv: error writing '/boot/vmlinuz-5.1.0-050100-generic': No space left on device
mv: error writing '/boot/vmlinuz-5.2.0-050200rc7-generic': No space left on device
mv: error writing '/boot/vmlinuz-5.3.1-050301-generic': No space left on device
mv: error writing '/boot/vmlinuz-5.3.7-050307-generic': No space left on device
mv: error writing '/boot/vmlinuz-5.3.8-050308-generic': No space left on device
mv: error writing '/boot/vmlinuz-5.4.1-050401-generic': No space left on device

If it looks as though there's an unreasonable number of old kernels and initramfs images installed, let APT clean them up:

sudo apt autoremove