Differences between revisions 6 and 8 (spanning 2 versions)
Revision 6 as of 2016-01-01 01:12:16
Size: 1948
Editor: ?GeorgePolitis
Comment: Uses double quotes instead of single quotes for the -u argument in the efibootmgr command.
Revision 8 as of 2017-05-07 13:43:14
Size: 2317
Editor: ?JochenSprickerhof
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
cp /vmlinuz /initrd.img /boot/efi/EFI/debian/ cp /vmlinuz /boot/efi/EFI/debian/
Line 18: Line 18:
./etc/kernel/postinst.d/zz-update-efistub /etc/kernel/postinst.d/zz-update-efistub
}}}

/etc/initramfs/post-update.d/zz-update-efistub (create the directory if it does not exist):
{{{#!highlight bash
#!/bin/sh
cp /initrd.img /boot/efi/EFI/debian/
}}}
Make it executable and launch it manually:
{{{
chmod +x /etc/initramfs/post-update.d/zz-update-efistub
/etc/initramfs/post-update.d/zz-update-efistub
Line 22: Line 33:
Replace the UUID with the one of your / partition, see the [[http://manpages.debian.net/cgi-bin/man.cgi?query=efibootmgr|efibootmgr manpage]] if you EFI partition is not /dev/sda1: Replace /dev/sda3 with the device of your / partition, see the [[http://manpages.debian.net/cgi-bin/man.cgi?query=efibootmgr|efibootmgr manpage]] if you EFI partition is not /dev/sda1:
Line 24: Line 35:
export UUID=$(blkid -s UUID -o value /dev/sda3)

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 /vmlinuz /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

/etc/initramfs/post-update.d/zz-update-efistub (create the directory if it does not exist):

   1 #!/bin/sh
   2 cp /initrd.img /boot/efi/EFI/debian/

Make it executable and launch it manually:

chmod +x /etc/initramfs/post-update.d/zz-update-efistub
/etc/initramfs/post-update.d/zz-update-efistub

Add the boot entry

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

export UUID=$(blkid -s UUID -o value /dev/sda3)
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.

If you were installing Debian from UEFI medium, efibootmgr should be installed by default. However, sometimes it can report that EFI variables are not supported. If you are sure that you have EFI partition, probably you need to download efivar package and modprobe efivars module.


CategoryBootProcess