----------------------------
Symtom:
----------------------------
error: no such partitionEntering rescue mode...grub rescue>1. Find linux
grub rescue> ls(hd0) (hd0,gpt7) (hd0,gpt6) (hd0,gpt5) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1)grub rescue> ls (hd0,gpt6)(hd0,gpt6): Filesystem is unknown.grub rescue> ls (hd0,gpt7)(hd0,gpt7): Filesystem is ext2.grub rescue> ls (hd0,gpt7)/boot./ ../ ...... /grub ......grub rescue> set root=(hd0,gpt7)grub rescue> set prefix=(hd0,gpt7)/boot/grubgrub rescue> insmod normalgrub rescue> normal5. Using step no. 3, we enter Debian OS to repair grub. We reinstall grub-efi-amd64, or run apt-get install without --reinstall to install grub-efi-amd64
# apt-get install --reinstall grub-efi-amd64# mkdir /boot/efi# fdisk -lDisk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 4096 bytesI/O size (minimum/optimal): 4096 bytes / 4096 bytesDisklabel type: gptDisk identifier: 2248606F-393A-467A-9527-D0649049F9E3Device Start End Sectors Size Type/dev/sda1 2048 616447 614400 300M Windows recovery environment/dev/sda2 616448 821247 204800 100M EFI System/dev/sda3 821248 1083391 262144 128M Microsoft reserved/dev/sda4 1083392 244840447 243757056 116.2G Microsoft basic data/dev/sda5 245762048 567171071 321409024 153.3G Microsoft basic data/dev/sda6 567171072 582795263 15624192 7.5G Linux swap/dev/sda7 582795264 976771071 393975808 187.9G Microsoft basic data# mount /dev/sda2 /boot/efi/# grub-install /dev/sdaInstalling for x86_64-efi platform.Installation finished. No error reported.