On Fri, Jun 11, 2021 at 09:38:37PM +0300, Semih Ozlem wrote: > I reinstalled the system, including an efi partition (500MiB) and the > problem was fixed.
This suggests that you booted the installer in UEFI mode, rather than in Legacy mode. If you boot the installer in UEFI mode, you are expected to install a system that will boot in UEFI mode, which means it needs an EFI partition (and GPT disk label). If you wanted to create an install that would boot in Legacy mode, you need to boot the installer in Legacy mode first. (Or maybe there's something you can do in Expert mode to work around it; I don't know. At a bare minimum, you'd need to switch which of the GRUB packages gets installed -- grub-pc vs. grub-efi.) > How to check where grub is installed? And what is a friendly guide to > learning about grub? GRUB should be installed on the *disk* (not on a partition) that you intend to boot. There are two different GRUB packages: grub-efi for UEFI booting, and grub-pc for Legacy (BIOS) booting. The mode in which you booted the installer determines which of these gets installed at the end of the installation. Legacy (BIOS) booting is the old quasi-standard. It's been around since the 1980s. In this paradigm, the boot loader code is installed to something called the "master boot record" (MBR) which is really just the first few hundred bytes of the disk. Some space is left unpartitioned at the start of the disk to make room for this. Much hand-waving is involved. UEFI booting is the new standard. It's been around for several years now, so it's fairly widespread, but not quite ubiquitous. UEFI booting requires a GPT disk label (partition table type), and one of the partitions on the disk must be an EFI partition. This is a FAT-type file system which contains programs used by the boot loader. A lot of machine (probably most machines made today) can boot in either of these two modes, because not everyone has moved over to the new standard yet. Older machines will only support Legacy booting. A few newer machines may only support UEFI booting. Secure Boot (Microsoft's attempt to stop you from using Linux) relies on UEFI booting, and therefore this was one of the driving forces behind it, but not the *only* driving force. If your machine doesn't use Secure Boot, don't worry about it. It won't affect you. Of course, this is not everything there is to know about UEFI and Legacy booting, but it might be enough for most purposes, especially if you just want to install and run Debian, and don't particularly care about the inner workings. Next, the care and feeding of GRUB on an installed Debian system: In the /boot/grub directory there's a file named grub.cfg. This is the menu that GRUB reads from disk when you boot. It's generated automatically every time you do certain things (like installing a new kernel package). If at any time you'd like to regenerate this menu (because you changed something yourself), you run this command: update-grub You should not edit grub.cfg directly, because your changes will be overwritten eventually. If you'd like to change how the menu operates, there are a few pieces you need to know about. The first is /etc/default/grub which is a file containing lines of shell code. It's only supposed to contain variable definitions, and these variables affect the overall menu, or they affect every menu entry. You can change these variables (e.g. if you'd like the menu timeout to be a bit longer because your monitor takes several seconds to switch modes, or if you'd like to remove the "quiet" flag so that you can see more details of what's happening). Individual menu entries are generated by shell code fragments in the /etc/grub.d/ directory. If you'd like to add a menu entry of your own, you can create a new file in this directory. You'll need some expertise for this. If you'd like to customize the generated segments of the GRUB menu, you might consider editing one of the existing files in this directory, but make sure you have a backup, and a means of booting in rescue mode, first. This is not something you want to break, especially if it's a remote system.