Add grub2 element

This patch is adds a new grub2 element that installs the
grub2 bootloader on the image so it can work with Ironic's
local boot support.

This patch also modifies the iso element which was installing
same grub2. It removes the grub2 installation from iso element
and makes it dependent on grub2 element.

Co-Authored-By: Ramakrishnan G <rameshg87@gmail.com>
Change-Id: I37bcf2c525708d1e2e0f95cf5874a279f76861f7
This commit is contained in:
Lucas Alvares Gomes 2015-03-26 09:33:54 +00:00 committed by Ramakrishnan G
parent c5c6a5f4f2
commit 1b9520e955
7 changed files with 44 additions and 8 deletions

View File

@ -0,0 +1,7 @@
=====
grub2
=====
This image installs grub2 bootloader on the image, that's necessary for
the local boot feature in Ironic to work. This is being made a separated
element because usually images have grub2 removed for space reasons and
also because they are going to boot from network (PXE boot).

View File

@ -0,0 +1,3 @@
signed_grub_efi:
signed_shim_efi:
grub_bios:

20
elements/grub2/pkg-map Normal file
View File

@ -0,0 +1,20 @@
{
"family":{
"debian":{
"signed_grub_efi": "grub-efi-amd64-signed",
"signed_shim_efi": "shim-signed",
"grub_bios": "grub-pc-bin"
},
"redhat":{
"signed_grub_efi": "efibootmgr grub2-efi-modules grub2-efi",
"signed_shim_efi": "shim",
"grub_bios": "grub2"
}
},
"default":{
"signed_grub_efi": "grub-efi-amd64-signed",
"signed_shim_efi": "shim-signed",
"grub_bios": "grub-pc-bin"
}
}

View File

@ -0,0 +1,13 @@
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-0} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# Delete /boot/grub2/grubenv if it exists because
# it will fail while doing grub-install again.
rm -f /boot/grub2/grubenv

View File

@ -1 +1,2 @@
grub2
package-installs package-installs

View File

@ -1,3 +1 @@
signed_grub:
signed_shim:
syslinux: syslinux:

View File

@ -1,19 +1,13 @@
{ {
"family":{ "family":{
"debian":{ "debian":{
"signed_grub": "grub-efi-amd64-signed",
"signed_shim": "shim-signed",
"syslinux": "syslinux" "syslinux": "syslinux"
}, },
"redhat":{ "redhat":{
"signed_grub": "grub2-efi",
"signed_shim": "shim",
"syslinux": "" "syslinux": ""
} }
}, },
"default":{ "default":{
"signed_grub": "grub-efi-amd64-signed",
"signed_shim": "shim-signed",
"syslinux": "syslinux" "syslinux": "syslinux"
} }
} }