hello,

I don’t know if this is the right place to ask this question but could someone explain me how a UEFI system boots, I couldn’t find a guide online. I want to know because I don’t understand certain GRUB commands and how it get installed.

I just copy paste commands from Arch wiki and it just magically works without me knowing anything about it.

all the different distros use different grub command parameter and it’s so confusing. eg, Arch and Gentoo.

Arch command: grub-install --target=x86_64-efi --efi-directory=esp --bootloader-id=GRUB Gentoo command: grub-install --efi-directory=/efi

why both command is different? exactly where does grub gets installed?

sorry if this is a naive question but i really don’t understnad GRUB.

  • @[email protected]
    link
    fedilink
    English
    6
    edit-2
    20 hours ago

    Short answer to your last paragraph:
    vmlinuz is the kernel. It ends with z instead of x, because it’s z-compressed to save space. (I’ve heard that it’s possible to use an uncompressed kernel for that 1ms faster boot time)
    Initramfs (not intramuscular, which my autocorrect thinks is appropriate) is a small filesystem blob, “initial ram filesystem”, meant to be loaded directly into ram to allow the kernel to talk to your hardware via drivers. It also has a lot of binaries needed to perform other tasks that need to run before the root filesystem is mounted.

    • @[email protected]
      link
      fedilink
      1
      edit-2
      18 hours ago

      Oh wait, I see that vmlinuz file has a version to it. I couldn’t remember if vmlinuz was the kernel or not, because I used to have multiples of them, but these days I only have one.

      • @[email protected]
        link
        fedilink
        English
        1
        edit-2
        17 hours ago

        You have one per installed kernel. Not sure what (if any) automagic is common for removing old kernels, I guess this varies between distros, but at least on my computers, old kernel remain. At least the previous one, maybe more. It comes in handy in case a kernel upgrade breaks something, which it actually did recently on one of my laptops - makes it easier to boot from old kernel and revert.

        EDIT: I just checked. I have just one on my daily driver. It’s quite new, and I don’t think I’ve had a kernel upgrade on that one, so it makes sense.

        On my work laptop (the one with borked kernel upgrade) I have two.

        So what you most likely have is one or more vmlinuz-version-numbers, and then simply a symlink named just vmlinuz to the version you boot from.