Differences between revisions 1 and 2
Revision 1 as of 2013-06-18 13:08:25
Size: 1625
Editor: ?BertrandMarc
Comment: Howto EFI stub
Revision 2 as of 2014-03-04 00:35:39
Size: 1629
Editor: ?JonathanMcCrohan
Comment: Fix typo which causes invalid EFI boot option
Deletions are marked like this. Additions are marked like this.
Line 24: Line 24:
efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\vmlinuz' -u root=UUID=$UUID ro quiet rootfstype=ext4 add_efi_memmap initrd=\\EFI\\debian\\initrd efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\vmlinuz' -u root=UUID=$UUID ro quiet rootfstype=ext4 add_efi_memmap initrd=\\EFI\\debian\\initrd.img

Translation(s): none


Since Wheezy, Debian kernel on x86 contain their own BootLoader called EFI stub. Therefore it is possible to load the kernel directly, without any additional bootloader (like grub-efi).

Copy the files

The UEFI firmware is only able to load files from the EFI partition (usually FAT). If you use a standard UEFI installation of Debian, you should copy the kernel and the initrd to /boot/efi. The best way to keep it up to date is to place a script in /etc/kernel/postinst.d/zz-update-efistub:

   1 #!/bin/sh
   2 cp -u /vmlinuz /initrd /boot/efi/EFI/debian/

Make it executable and launch it manually:

chmod +x /etc/kernel/postinst.d/zz-update-efistub
./etc/kernel/postinst.d/zz-update-efistub

Add the boot entry

Replace the UUID with the one of your / partition, see the efibootmgr manpage if you EFI partition is not /dev/sda1:

efibootmgr -c -g -L "Debian (EFI stub)" -l '\EFI\debian\vmlinuz' -u root=UUID=$UUID ro quiet rootfstype=ext4 add_efi_memmap initrd=\\EFI\\debian\\initrd.img

You can check your new boot entry. Since EFI uses UCS2, it should look like this:

#efibootmgr -v
...
.i.n.i.t.r.d.=.\.E.F.I.\.d.e.b.i.a.n.\.i.n.i.t.r.d.


CategoryBootProcess