debian – How can reinstall the boot in new created grub.cfg?

I have installed debian11-lxde in /dev/sda1 at first, then installed windows10 in /dwv/sda5, at last installed debian11-cinnamon in /dev/sda8.

sudo fdisk -l
Disklabel type: gpt

Device          Start        End   Sectors   Size Type
/dev/sda1        2048  585936895 585934848 279.4G Linux filesystem   #debian11-lxde
/dev/sda2   585936896  617187327  31250432  14.9G Linux swap
/dev/sda3   617187328  625000447   7813120   3.7G EFI System
/dev/sda4   678057984  678090751     32768    16M Microsoft reserved
/dev/sda5   678090752  928479231 250388480 119.4G Microsoft basic data
/dev/sda6   928479232  929521663   1042432   509M Windows recovery environment
/dev/sda7   929521664 1125421055 195899392  93.4G Linux filesystem
/dev/sda8  1125421056 1320732671 195311616  93.1G Linux filesystem  #debian11-cinnamon 

Reboot my pc,i only find the last os (debian11-cinnamon + windows10) shown in the grub gui.Login the debian11-cinnamon in /dev/sda8,mount /dev/sda1 and list the boot folder in it:

└── EFI
    ├── Boot
    │   └── bootx64.efi
    ├── debian
    │   ├── BOOTX64.CSV
    │   ├── fbx64.efi
    │   ├── grub.cfg
    │   ├── grubx64.efi
    │   ├── mmx64.efi
    │   └── shimx64.efi

Try to reinstall grub file:

sudo grub-mkconfig -o  /boot/grub/grub.cfg
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinuz-5.10.0-18-amd64
Found initrd image: /boot/initrd.img-5.10.0-18-amd64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Debian GNU/Linux 11 (bullseye) on /dev/sda1
Found Windows Boot Manager on /dev/sda3@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...

The first installed Debian on /dev/sda1 can be detected and it say to add in boot menu entry,but reboot to see the grub gui menu ,no debian11-lxde on /dev/sda.
How can fix it?

Read more here: Source link