Previous: , Up: Security   [Contents][Index]


19.10 Signing GRUB itself

To ensure a complete secure-boot chain, there must be a way for the code that loads GRUB to verify the integrity of the core image. This is ultimately platform-specific and individual platforms can define their own mechanisms. However, there are general-purpose mechanisms that can be used with GRUB.

19.11 Signing GRUB for UEFI secure boot

On UEFI platforms, core.img is a PE binary. Therefore, it can be signed with a tool such as pesign or sbsign. Refer to the suggestions in see UEFI secure boot and shim support to ensure that the final image works under UEFI secure boot and can maintain the secure-boot chain. It will also be necessary to enroll the public key used into a relevant firmware key database.

19.12 Signing GRUB with an appended signature

The core.elf itself can be signed with a Linux kernel module-style appended signature (see Using appended signatures in GRUB). To support IEEE1275 platforms where the boot image is often loaded directly from a disk partition rather than from a file system, the core.elf can specify the size and location of the appended signature with an ELF Note added by grub-install or grub-mkimage. An image can be signed this way using the sign-file command from the Linux kernel:

As with UEFI secure boot, it is necessary to build-in the required modules, or sign them if they are not part of the GRUB image.


Previous: Signing certificate and hash files, Up: Security   [Contents][Index]