I finally got down to do some debugging. I downloaded the grub source via apt and made some changes to the source code. Specifically, near line 567 of grub-core/disk/efi/efidisk.c, adding the status code to the error message:
"failure writing sector 0x%llx to `%s' [status %lx]" with variable status passed in.
Now I can read the actual error code, which on my machine is [status 80000....0012]. The error code of 12 seemingly corresponds to GRUB_EFI_NO_MEDIA.
Obviously reads and writes from the physical device succeed, as the boot loader runs and the operating system runs. I have no idea why only GRUB's writes are not working (or why NO_MEDIA specifically is the returned error), but I plan to look into that more over the next week or so. The drive itself is reported as using the SATA3 interface by hdparm, smartctl, etc., and I know it is an M.2 chip from specifications.
I finally got down to do some debugging. I downloaded the grub source via apt and made some changes to the source code. Specifically, near line 567 of grub-core/ disk/efi/ efidisk. c, adding the status code to the error message:
"failure writing sector 0x%llx to `%s' [status %lx]" with variable status passed in.
Now I can read the actual error code, which on my machine is [status 80000....0012]. The error code of 12 seemingly corresponds to GRUB_EFI_NO_MEDIA.
Obviously reads and writes from the physical device succeed, as the boot loader runs and the operating system runs. I have no idea why only GRUB's writes are not working (or why NO_MEDIA specifically is the returned error), but I plan to look into that more over the next week or so. The drive itself is reported as using the SATA3 interface by hdparm, smartctl, etc., and I know it is an M.2 chip from specifications.