When setting up Debian Linux (Bullseye) on my Lenovo IdeaCentre K430 computer, I encountered problems related to UEFI. After the installation, the system did not boot and displayed the message
Error 1962: No operating system found. It took three attempts before I found the solution, which I describe here.
First, ensure that UEFI is enabled in the BIOS before starting the installation. The Debian installer shows whether the system is booted with UEFI—look out for the message on the Welcome screen.
Second, create an EFI System Partition (ESP) when configuring the disk. This will contain the EFI firmware that allows Debian to boot in UEFI mode. If UEFI is unavailable, you will not see this option.
Third, proceed with installation until it completes. Reboot when prompted but expect to see error 1962. You need a few more steps to fix it.
Fourth, boot into the Debian installer again and choose Rescue mode. Mount the
/boot/efi partitions when asked. Then, open a console into
/root from the Debian installer menu.
/boot/efi/EFI/boot/bootx64.efi. The reason for doing this is documented. This is a crucial step.
Lastly, go into the BIOS setup, enable UEFI and disable CSM to force UEFI boot mode only. Also disable OS optimised settings—those are targeted at Windows 8 operating system.
Now, when you restart your computer, you should not get error 1962 and should boot directly into Debian.