Differences between revisions 2 and 3
Revision 2 as of 2014-03-04 00:35:39
Size: 1629
Editor: ?JonathanMcCrohan
Comment: Fix typo which causes invalid EFI boot option
Revision 3 as of 2014-12-13 19:28:36
Size: 1948
Editor: ?MatthewNowak
Comment:
Deletions are marked like this. Additions are marked like this.
Line 13: Line 13:
cp -u /vmlinuz /initrd /boot/efi/EFI/debian/ cp /vmlinuz /initrd.img /boot/efi/EFI/debian/
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.img 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'
Line 33: Line 33:
{{{#!wiki tip
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.
}}}

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 /initrd.img /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.

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