-
Notifications
You must be signed in to change notification settings - Fork 378
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds the new demo-efi directory to the installer build. Depending on security settings, it may contain: shimx64.efi <- shim signed for secure boot grubx64.efi <- GRUB signed for secure boot grub.cfg <- a grub.cfg to disable GRUB signature checking grub.cfg.sig <- signature of ^^ grub.cfg so secure GRUB will not reject it. These files get installed under /boot/efi/EFI/ONIE-DEMO-OS Previously the Demo OS was able to install by copying over the efi binaries installed under /boot/efi/EFI/ONIE, as they were already signed to be part of the Secure Boot chain of trust. This is a bit unrealistic for a real NOS, as it will be deploying it's own signed shim/GRUB, etc, so requiring the Demo OS to deploy its own copies of these binaries will help demonstrate the concept and allow for different testing configurations. Copying the contents of the /boot/efi/EFI/ONIE directory also falls apart with Secure GRUB, where GRUB is compiled to validate the config files it loads against their detached signature (*.sig) files. The Demo OS GRUB config was generated during install, and thus could not be signed. So, onie/demo/installer/grub-arch/grub.cfg has been added as the grub.cfg that ends up under /boot/efi/EFI/ONIE-DEMO-OS It gets signed during demo make, and is added to the demo-efi directory (along with shim, GRUB, and the grub.cfg.sig detached signature), to be present when GRUB goes to boot Demo OS. Astute developers may note that the first thing this config does is switch off GRUB's check_signatures so the rest of the generated GRUB configuration can load. ...but it serves its purpose of demonstrating how this works. Also note, once the Demo OS is loaded, the GRUB login and password will be required to chain load the ONIE boot menu. This demonstrates the use of the password to do any additional configuration. If this behavior is undesirable, 50_onie_grub can be edited to have '--unrestricted' in the ONIE GRUB entry to NOT require a Secure GRUB login. ...and there is a comment there saying as much. Testing: --------- Demo OS builds, boots, and can be logged in to with: SECURE_BOOT_ENABLE yes/no (no required alternate kernel config) SECURE_BOOT_EXT yes/no SECURE_GRUB yes/no Signed-off-by: Alex Doyle <[email protected]>
- Loading branch information
Showing
5 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Set configuration to use in /mnt/onie-boot/grub | ||
# For demo OS | ||
# If Secure Grub is in use, this file will require | ||
# a detached signature to be deployed with it, so | ||
# that grub will use it. | ||
# Note that the first step here is disabling | ||
# signatures so that the Demo OS' dynamically | ||
# created GRUB config can be used. | ||
# Further signing is left as an exercise for the developer | ||
set check_signatures=no | ||
export check_signatures | ||
search --no-floppy --label --set=root ONIE-DEMO-OS | ||
set prefix=($root)'/grub' | ||
configfile $prefix/grub.cfg | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters