How do I recover from "cannot get C/H/S values" errors in GRUB?
I have a system running Debian Stable that has worked flawlessly for 15 years or so, and booted several times in that period (generally due to power failures that exceed UPS duration). Since the last successful boot, the only changes have been periodic aptitude upgrade - no hardware or BIOS changes.
However, it now fails to boot because GRUB is unable to read the kernel image or initrd from the disk¹:
error: hd4 cannot get C/H/S values
I'm surprised that GRUB even needs to care about disk geometry, since the disk in question is a modern LBA solid-state drive (with GPT partitions). I have extracted the drive and mounted it on another machine, where nothing looked out of place, and hdparm showed nothing surprising.
Back in the target system, I've confirmed that GRUB commands that access the filesystem fail with the same message - I cannot ls, cat etc. (unfortunately I didn't think to try these commands against any of the other disks in the machine).
What causes GRUB to fail for this reason on a disk that it has worked with for 5-10 years without any such problem? What can I do to recover the system?
¹ re-typed by hand, since the system in question is the one with the cable modem that provides connectivity for the entire household, so I have had to post from work.