this post was submitted on 17 Dec 2024
83 points (96.6% liked)
Linux
48705 readers
1193 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
When I'm confused about commands, I find checking the man page for the command a good start to understand what the flags do. Once you've got man-pages installed on your Linux system, you can do "man grub-install" (or any other command) from a terminal to see information about that command and it's flags.
I'm not sure if it says it in the Arch wiki, I think it might, but "esp" is often shorthand for whatever directory you're using as an EFI boot directory, I don't think it's a literal directory. On my Arch system, my esp is "/boot/EFI" I'm pretty sure.
As for why Gentoo doesn't include the --target flag, it could be that "x86_64-efi" is either the default on gentoo's version of grub, or just the default for every version of grub, meaning if the latter is the case, that flag could be safely omitted for your arch installation.
I'm pretty sure the --bootloader-id flag is just a friendly name for the bootloader that you can see from the terminal when booted into a Linux system and probably also from the bios menu. I'm not 100% though, a check through the man page would tell you more about that specific flag. Gentoo may omit it, leaving it either blank, or as some sort of default.
To answer your original question, the system boots up, does some basic checking of hardware to make sure everything can run okay and that there are no obvious faults or incompatibilities, then tries to load a program called a "bootloader" (such as grub), which will then hand off execution to whichever operating system you select. If you're not fond of grub, good news! There are plenty of other good bootloaders available. I'm a big fan of rEFInd (UEFI only) or systemd-boot.
I don't know grub SUPER well, but I'm pretty sure it gets installed in that --efi-directory location that you provide when you run the command. It might be nested a few directories down though, not sure.
Remember that the system documentation can be different for different operating systems. For example, it's notorious that the documentation for
sed
differs between GNU and macOS, particularly regarding the-i
option: https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linuxIn order to avoid surprises related to this, "POSIX.1-2024 defines a standard operating system interface and environment, including a command interpreter (or "shell"), and common utility programs to support applications portability at the source code level." https://pubs.opengroup.org/onlinepubs/9799919799/ https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sed.html