Well to be fair, it was me that made it unbootable. I’d been reading this Wiki page on configuring the Pi. I’d told it to give the GPU almost a GB of RAM. The Pi is a 4 GB Pi 4B. I did it last night and so this morning, I found it not working at all well.
My first thoughts were I’d messed up the Operating system and so I took the SD card put it in a holder and booted up my old laptop which has Ubuntu 18.04 LTS on it. This page on switchdoc suggested I could do a repair with these commands.
First lsblk to view attached devices. There was a /dev/sdc2 . There was also a /dev/sdc1
sudo fsck -fy /dev/sdc1
That gave information about the drive but not the disk. That took
sudo fsck -fy /dev/sdc2
That took a few seconds and listed information, but still my drive wouldn’t boot back in the Pi.
Then I remembered I’d changed the boot config.txt and it was back with the SD card in the laptop and rebooted that. It showed two devices on the desktop (no need to mount anything) and clicking boot gave me a directory listing of /boot. I edited config.txt and changed the GPU Mem value to 256MB.
That fixed it and my PI is now booting quite happily again. I am now going to make a backup copy! It wouldn’t the end of the world if I had made it permanently unbootable, I’d just burn the OS again. It’s just the time wasted and minor hassles copying files, downloading and reinstalling software. Best avoided if possible!