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:
parent
c5c6a5f4f2
commit
1b9520e955
7
elements/grub2/README.rst
Normal file
7
elements/grub2/README.rst
Normal 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).
|
3
elements/grub2/package-installs.yaml
Normal file
3
elements/grub2/package-installs.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
signed_grub_efi:
|
||||
signed_shim_efi:
|
||||
grub_bios:
|
20
elements/grub2/pkg-map
Normal file
20
elements/grub2/pkg-map
Normal 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"
|
||||
}
|
||||
}
|
||||
|
13
elements/grub2/post-install.d/01-delete-grubenv
Executable file
13
elements/grub2/post-install.d/01-delete-grubenv
Executable 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
|
@ -1 +1,2 @@
|
||||
grub2
|
||||
package-installs
|
||||
|
@ -1,3 +1 @@
|
||||
signed_grub:
|
||||
signed_shim:
|
||||
syslinux:
|
||||
|
@ -1,19 +1,13 @@
|
||||
{
|
||||
"family":{
|
||||
"debian":{
|
||||
"signed_grub": "grub-efi-amd64-signed",
|
||||
"signed_shim": "shim-signed",
|
||||
"syslinux": "syslinux"
|
||||
},
|
||||
"redhat":{
|
||||
"signed_grub": "grub2-efi",
|
||||
"signed_shim": "shim",
|
||||
"syslinux": ""
|
||||
}
|
||||
},
|
||||
"default":{
|
||||
"signed_grub": "grub-efi-amd64-signed",
|
||||
"signed_shim": "shim-signed",
|
||||
"syslinux": "syslinux"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user