Skip to content

Arch Linux Install EFI Stub

Instruction Order

  1. Alternate EFI Boot Location
  2. Installation Instructions

Installation Instructions

Note: You will require the package, "efibootmgr".

  1. Find the desired block device name that will be booting from.
    $ lsblk
    
    NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
    sda      8:0    0 232.9G  0 disk 
    ├─sda1   8:1    0   499M  0 part /boot
    └─sda2   8:2    0 232.4G  0 part /
    
  2. Get the UUID of the root partition from "/mnt/etc/fstab", in this case it is "087dbc54-86c8-4523-a952-5191181b284b"
    $ cat /mnt/etc/fstab
    
    UUID=087dbc54-86c8-4523-a952-5191181b284b  /                btrfs  rw,relatime,compress=zlib,ssd,space_cache,subvolid=257,subvol=/ROOT,subvol=ROOT  0 0
    
    # /dev/sda1
    UUID=283A-FC18                             /boot            vfat  rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro  0 0
    
    # /dev/sdb1 LABEL=data
    UUID=57c7448d-e72b-4318-8de6-7478f2f79a52  /mnt/data-drive  btrfs  rw,relatime,compress=zlib,subvol=data  0 0
    
  3. Add a boot entry using "efibootmgr". Choose one of the applicable options below.

    • BTRFS:
      $ efibootmgr -d /dev/sda -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=UUID=087dbc54-86c8-4523-a952-5191181b284b rootflags=compress=zlib,ssd,space_cache,subvol=ROOT rw initrd=/initramfs-linux.img"
      
    • Ext4:

      $ efibootmgr -d /dev/sda -p 1 -c -L "Arch Linux" -l /vmlinuz-linux -u "root=UUID=087dbc54-86c8-4523-a952-5191181b284b rootflags=rw initrd=/initramfs-linux.img"
      

      -d  Device name.
      -p  Device partition number.
      -L  Boot manager display label.
      -l  Specifiy the loader.
      -u  Extract command line options.
      
  4. Verify the new boot entry.

    $ efibootmgr -v
    
    BootCurrent: 0000
    Timeout: 1 seconds
    BootOrder: 0000,0001,0002
    Boot0000* Arch Linux    HD(1,GPT,06730e26-9e87-47dc-b13a-7069661fb875,0x800,0xf9801)/File(\vmlinuz-linux)r.o.o.t.=.U.U.I.D.=.0.8.7.d.b.c.5.4.-.8.6.c.8.-.4.5.2.3.-.a.9.5.2.-.5.1.9.1.1.8.1.b.2.8.4.b. .r.o.o.t.f.l.a.g.s.=.c.o.m.p.r.e.s.s.=.z.l.i.b.,.s.s.d.,.s.p.a.c.e._.c.a.c.h.e.,.s.u.b.v.o.l.=.R.O.O.T. .r.w. .i.n.i.t.r.d.=./.i.n.i.t.r.a.m.f.s.-.l.i.n.u.x...i.m.g.
    Boot0001* Hard Drive    BBS(HD,,0x0)..GO..NO........o.S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .2.5.0.G.B....................A...........................>..Gd-.;.A..MQ..L.2.S.N.1.X.N.G.A.2.C.1.3.6.4. .R. . . . ........BO..NO........o.W.D.C. .W.D.1.0.0.3.F.Z.E.X.-.0.0.M.K.2.A.0....................A...........................>..Gd-.;.A..MQ..L. . . . .W. .-.D.C.W.3.C.1.F.R.L.D.L.9.9........BO..NO........[.G.e.n.e.r.i.c.-.S.D./.M.M.C. .1...0.0....................A..........................Gd-.;.A..MQ..L.0.5.8.F.6.3.6.4.6.4.7.6........BO..NO........`.G.e.n.e.r.i.c.-.C.o.m.p.a.c.t. .F.l.a.s.h. .1...0.1....................A...............................Gd-.;.A..MQ..L.0.5.8.F.6.3.6.4.6.4.7.6........BO..NO........`.G.e.n.e.r.i.c.-.S.M./.x.D.-.P.i.c.t.u.r.e. .1...0.2....................A...............................Gd-.;.A..MQ..L.0.5.8.F.6.3.6.4.6.4.7.6........BO..NO........`.G.e.n.e.r.i.c.-.M.S./.M.S.-.P.r.o. .1...0.3....................A...............................Gd-.;.A..MQ..L.0.5.8.F.6.3.6.4.6.4.7.6........BO..NO........k.S.a.n.D.i.s.k. .C.r.u.z.e.r. .2...0.1....................A.......................>..Gd-.;.A..MQ..L.2.0.0.5.2.4.4.4.1.1.1.8.C.2.5.0.8.9.B.9........BO
    Boot0002* CD/DVD Drive  BBS(CDROM,,0x0)..GO..NO........o.H.L.-.D.T.-.S.T. .D.V.D.R.A.M. .G.H.2.4.N.S.C.0....................A...........................>..Gd-.;.A..MQ..L.2.K.F.N.M.A.4.B.0.8. .1. . . . . . . . ........BO
    

Alternate EFI Boot Location

If you are choosing to store your EFI boot files in a different location than "/boot" additional steps are required.

Copy the required boot files into "/boot/EFI".

  1. Create directory.
    # mkdir -p /boot/EFI
    
  2. Copy boot file, "vmlinuz-linux".
    # cp /boot/vmlinuz-linux /mnt/boot/EFI/vmlinuz-linux
    
  3. Copy boot file, "initramfs-linux.img".
    # cp /boot/initramfs-linux.img /mnt/boot/EFI/initramfs-linux.img
    
  4. Copy boot file, "initramfs-linux-fallback.img".
    # cp /boot/initramfs-linux-fallback.img /mnt/boot/EFI/initramfs-linux-fallback.img
    

Note: This has to be done EVERY TIME there is a kernel update or "mkinitcpio" executes! To automate this, see the EFI System Partition - ArchWiki and choose a method to implement.

Trouble Shooting

If for some reason you experience issues booting reboot the system using the Arch Linux flash drive. Delete the boot entry and try re-creating it again following the provided steps above.

Remove EFI Boot Entry

  1. Find the boot order number of the desired entry to delete.
    $ efibootmgr
    
    BootCurrent: 0000
    Timeout: 1 seconds
    BootOrder: 0000,0001,0002
    Boot0000* Arch Linux
    Boot0001* Hard Drive
    Boot0002* CD/DVD Drive
    
  2. Delete the boot entry
    # efibootmgr -b 0000 -B