GPT partitioning for UEFI in Debian 12

Selecting partition table GPT or MSDOS

In this post I will describe manual disk partitioning for the instalation of Debian 12. Debian Linux is in my opinion great OS. I like it also due to the fact, that it release cycle of two years is somehow convenient for me compared to something as Ubuntu with releases each 6 months. On 10.6.2023 the Debian 12 Bookworm was released and I was about to install it on the disk. The situation somehow shifted in the recent years. Virtually every BIOS is using UEFI as a first option.

For me personally, MSDOS partition table with MBR is the best option when the BIOS has an option to use it. It is total disaster when you install Windows with its UEFI on the machine as it is almost impossible to install something else. I am not an expert, but in my opinion UEFI is something such as locking bootloader in your mobile phone. Noone really wants it, it causes problems but the non free software vendors love it. So the first option is to disable UEFI in bios and turn on legacy boot, create MSDOS table with one or more primary partitions and you are done.

When you can not install anything

Typically with Windows on your machine it is very tricky to even initiate Linux instalation even from UEFI USB disks because of this UEFI "protections" that Windows is installing. If that is your situation, try to clen CMOS and disconnect hard drive, which contains Windows. That might e.g. on some Windows preinstalled NUCs or cheap HP/Dell laptops be the only option to install Linux. Try also to prepare UEFI USB with linux using Rufus. When everything fails, you are probably not able to install Linux to your machine at all.

So let me now assume, that you at least have USB disk with https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/ on it and it is able to boot.

When MSDOS partition table does not work

Unfortunatelly some bioses now do not support MSDOS tables with MBR at all. And for example my BIOS on high end motherboard had legacy support but was not able to detect and boot from M.2 SSD formatted as MBR with MSDOS partition.

Forcing my BIOS to accept my decision using MSDOS table

But what if you managed to install Linux but it is not booting? There is one option when you want to boot something like this and nothing is working.

If there is no other option than using UEFI disks, you still have a chance to boot your system from it. You just have to have some live USB stick with grub. On the grub screen press e, then issue ls and then issue boot (my partition), where (my partition) is the partition with the MBR bootable system.

When you'd like to boot UEFI enabled disk, then it is trickier but try to Google it.

When you have to GPT

Do manual partitioning, in Debian 12 better from Live system than from graphical installer and select GPT instead of MSDOS.

First partition needs to be FAT32, have boot flag and be mounted to /boot/efi.