EFI without Bootloader in ArchLinux

I do not know if this procedure is capable of damaging your computer, so any damage caused will be the responsibility of the reader.

From what you've already read in the post title, I'll explain how to boot ArchLinux (no idea if it works on other distros) without any kind of bootloader on EFI or UEFI computers.

First step

Install efibootmgr (if you don't already have it installed)

# pacman -S efibootmgr

Step

Mount efivarfs (if not already mounted)

# mount -t efivarfs efivarfs /sys/firmware/efi/efivars

Third step

Add your distro to your computer's "Boot Order"

# efibootmgr -c -L "Arch Linux" -l /vmlinuz-linux -u "root=/dev/sdaX initrd=/initramfs-linux.img"

in my case I did it like this

# efibootmgr -c -L "Arch Linux" -l /vmlinuz-linux -u "root=UUID=d5e93b09-02a8-4597-b059-3f87a8221825 initrd=/initramfs-linux.img quiet loglevel=0"

Final step

See if it worked

# efibootmgr -v

Delete your bootorder distro

If for some reason it hasn't worked for you or you just don't like the idea of ​​not using a bootloader, you can do the following:

First step

See which is the number that corresponds to your distro in the bootorder

# efibootmgr -v

You should see something like this:

BootCurrent: 0000 Timeout: 0 seconds BootOrder: 0000,3000,2001,2002,2003
Boot0000 * Arch Linux HD (1,800,100000, bf49dd02-7af7-42bb-ac5d-967ea840e3f8) File (\ vmlinuz-linux) root = .UUID = .d.5.e.9.3.b.0.9 .-. 0.2.a.8 .-. 4.5.9.7 .-. B.0.5.9 .-. 3.f.8.7.a.8.2.2.1.8.2.5. .initrd =. /. initramfs-.linux..img .quiet .loglevel = .0. Boot2001 * USB Drive (UEFI) RC Boot2002 * Internal CD / DVD ROM Drive (UEFI) RC Boot3000 * Internal Hard Disk or Solid State Disk RC Boot3001 * Internal Hard Disk or Solid State Disk RC Boot3002 * Internal Hard Disk or Solid State Disk RC

You will see that it marks Boot0000 *, but in this case we are only interested in the number 0000

Step

Delete your bootorder distro

# efibootmgr -b 0000 -B

Source: Arch Linux Wiki


The content of the article adheres to our principles of editorial ethics. To report an error click here!.

17 comments, leave yours

Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: Miguel Ángel Gatón
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   Someone said

    IMPORTANT ANNOUNCEMENT
    in the third step of this entry the command that I use DOES NOT WORK.
    I'm trying to find the solution, I'll post it when I find it

    1.    Someone said

      Here the line that works
      efibootmgr -c -L "Arch Linux" -l / vmlinuz-linux -u "root = UUID = d5e93b09-02a8-4597-b059-3f87a8221825 initrd = / initramfs-linux.img quiet loglevel = 0"

      I ask anyone who can edit the entry, please do so

      1.    KZKG ^ Gaara said

        Ready, corrected right? 🙂

        1.    Someone said

          Thank you

  2.   serfraviros said

    Hi. This I already did some time ago (the same in Arch Linux), and I can tell you that at least my computer did not suffer any damage, my laptop is a Lenovo G480. What if it happened is that when the kernel was updated it could no longer reload the system and again I had to do all the procedure that you describe here; After doing experiments, I loaded the system (I clarify it was my fault, not the system's), so I had to reinstall and I don't know for what reason I could no longer leave it without bootloader. Since at that time I didn't have time to entertain myself with Greek sphinx puzzles and riddles, I installed grub and never tried again.

    1.    Someone said

      Well, I use this method on my laptop (an HP pavilion n029-la), I have updated the kernel and I have not had any problems. But in case something like this happens to me, I always carry an arch livecd in the briefcase with which I carry it.

    2.    Be anonymous said

      I've been reading, and yes, it is true that after a kernel update, the (efibootmgr) command is not able to create an entry (it is only capable of deleting) in some isolated cases. https://bugs.archlinux.org/task/34641

  3.   I do not understand anything said

    Can you explain the relationship with grub to me? I don't understand the difference. or if you explain the concepts of efi / uefi regarding grub, the bootloader

    1.    eVeR said

      Precisely the idea of ​​the entry is to start the team without going through Grub. That is, that the same EFI (that is, the current replacement of the BIOS) is in charge of loading the kernel and the boot image.

      What the BIOS did was read the first part of the first hard disk, where Grub is usually installed, which is responsible for loading the kernel and the image. EFI allows kernels to load itself (and thereby enables advanced security options, like the loved / hated SecureBoot).

      From a practical point of view, it has no advantage for me to use this method to start the PC.
      regards

  4.   Chicxulub Kukulkan said

    One question:

    I want to buy a new (or not so new) computer just to install GNU / Linux on it. In the event that it comes with Window $ 8, will I have a problem with the Secure Boot?

    1.    O_Pixote_O said

      Can. The problem will be that depending on the computer, if it has W8, it will come with UEFI activated and you will have to deactivate it to install according to what distributions. In mine activated I could install ubuntu if I remember correctly but when I installed manjaro it did not work and I had to deactivate it to be able to install it correctly. (Actually now in archlinux I think it can be installed without much difficulty, and I think grub2 supports it but I suppose that when I installed the system a long time ago it was still not completely polished).

    2.    cat said

      Disable the UEFI and Secure Boot and then boot the CD, when you install before it erase the Win8 and UEFI partitions.

    3.    eVeR said

      Almost all EFIs allow operating systems to be loaded in "Legacy" mode, that is, classic. If you configure EFI this way, you won't have any problems.

  5.   elav said

    There is something that I do not understand. Let's say I have a new computer with Windows and UEFI. Where do I perform these steps? In Arch Installation or from a LiveCD?

    1.    serfraviros said

      When I did it it was from the Live CD installing a system from scratch, I never tried it from an already installed system. I imagine that once the system is installed it must also be possible by removing the bootloader, grub or gummiboot to mention the most common ones, and then deleting the bootloader entries to follow the instructions from the beginning, how do you dare to to experience?. If it weren't for the damn absorbent job I have, I was already doing it, you've given me a thorn.
      What if I don't think you can is handle a dual boot with this method.

  6.   DigitOptic said

    In my case, I have an MSI B85M-E45 motherboard and although it worked for me, it corrupted my firmware in such a way that I can no longer enter the BIOS settings; I did a BIOS reset from the jumpers on the motherboard and the problem still persists. I will try to flash the firmware again. Then I will tell you if I could recover the BIOS

    In any case, I consider it a process that is not worth trying because of the risky in exchange for a few benefits

    1.    DigitOptic said

      Fortunately I was able to flash the firmware, although it did not allow me to enter the BIOS configuration, I could still boot from the hard disk, and then create a bootable DOS pendrive with the program to flash the BIOS and the firmware file again.

      I ran with luck, and once I happened that the firmware of an ACER laptop with UEFI was damaged when I installed openSUSE when UEFI compatible distributions were starting to appear.

      Phew less bad, good luck this time !!!!