Buster - unable to boot, unable to recreate boot bits
by Mark Nagel from LinuxQuestions.org on (#531ND)
As the result of some stupidity I can no longer boot my system.
The problem occurred after running fsck on a filesystem that was, as far as I understand, my EFI partition.
I can boot via Debian Live and mount and see everything OK (I can see my kernels, gnu stuff etc), but I am unable to come up with the right incantations to get grub to recreate the boot bits.
I suppose some of my problem lies in my ignorance of how EFI works.
The disk that I'm working with (a memory drive) is GUID partitioned. Running grub-install --efi-directory=/boot/efi on this device gives me:
grub-install: error: /boot/efi doesn't look like an EFI parition
The partition that I am mounting /boot/efi on IS created as an EFI System partition type (Ext4).
I am mounting my system partition on /mnt, mounting my efi partition on /mnt/boot/efi, mounting /dev /pts /proc /sys /run on /mnt and running chroot /mnt, then running the grub command shown above.
My hardware IS using EFI (verified via sudo dmesg | grep efi).
I recently upgraded from Stretch. Thought everything was fine (no errors in upgrade). Had been running a couple days perfectly fine: no problems booting. Due to hanging the system (I had an mysql query run amok) I ended up power-cycling the system: it's a headless server. Problems bringing the server back up led me to trashing it via efsck.
I think that I've tried every repair application and every suggested repair steps and I'm now totally stumped. I REALLY don't want to have to reinstall the OS.


The problem occurred after running fsck on a filesystem that was, as far as I understand, my EFI partition.
I can boot via Debian Live and mount and see everything OK (I can see my kernels, gnu stuff etc), but I am unable to come up with the right incantations to get grub to recreate the boot bits.
I suppose some of my problem lies in my ignorance of how EFI works.
The disk that I'm working with (a memory drive) is GUID partitioned. Running grub-install --efi-directory=/boot/efi on this device gives me:
grub-install: error: /boot/efi doesn't look like an EFI parition
The partition that I am mounting /boot/efi on IS created as an EFI System partition type (Ext4).
I am mounting my system partition on /mnt, mounting my efi partition on /mnt/boot/efi, mounting /dev /pts /proc /sys /run on /mnt and running chroot /mnt, then running the grub command shown above.
My hardware IS using EFI (verified via sudo dmesg | grep efi).
I recently upgraded from Stretch. Thought everything was fine (no errors in upgrade). Had been running a couple days perfectly fine: no problems booting. Due to hanging the system (I had an mysql query run amok) I ended up power-cycling the system: it's a headless server. Problems bringing the server back up led me to trashing it via efsck.
I think that I've tried every repair application and every suggested repair steps and I'm now totally stumped. I REALLY don't want to have to reinstall the OS.