1. added the following codes back to diskimage_builder/elements/grub2/install.d/02-grub-install-spec
#!/bin/bash
if [ ${DIB_DEBUG_TRACE:-1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# grub-efi-amd64-signed in ubuntu post will try to call grub-efi-amd64 to install grub into root
# device which definitely fail at this stage
# the workaround is to skip error and remove postinst script
if [[ "ubuntu" =~ "$DISTRO_NAME" ]]; then
if ! install-packages grub-efi-amd64-signed; then
rm -f /var/lib/dpkg/info/grub-efi-amd64-signed.postinst
rm -f /var/lib/dpkg/info/grub-efi-amd64.postinst
fi
dpkg --configure grub-efi-amd64
dpkg --configure grub-efi-amd64-signed
fi
2. added the following codes back to diskimage_builder/elements/grub2/pkg-map
"distro":{
"ubuntu":{
"signed_grub_efi": "",
"signed_shim_efi": "shim-signed",
"grub_bios": "grub-pc-bin"
}
},
The Xenial build successfully but there seems to be an issue with cloud-init failing to initialize the hostname. The hostname of my bare metal node comes up at "Ubuntu."
This issue is probably related to this: https:/ /bugs.launchpad .net/diskimage- builder/ +bug/1659578
I'm able to build a Xenial image using DiB 2.2 but not without a few hacks. I got the same errors above until I did this following.
I added back the following codes which have been removed from here: https:/ /github. com/openstack/ diskimage- builder/ commit/ 003fc17208e645b 453ccb7c7ad27d3 32bdae490c
1. added the following codes back to diskimage_ builder/ elements/ grub2/install. d/02-grub- install- spec
#!/bin/bash
if [ ${DIB_DEBUG_ TRACE:- 1} -gt 0 ]; then
set -x
fi
set -eu
set -o pipefail
# grub-efi- amd64-signed in ubuntu post will try to call grub-efi-amd64 to install grub into root amd64-signed; then dpkg/info/ grub-efi- amd64-signed. postinst dpkg/info/ grub-efi- amd64.postinst amd64-signed
# device which definitely fail at this stage
# the workaround is to skip error and remove postinst script
if [[ "ubuntu" =~ "$DISTRO_NAME" ]]; then
if ! install-packages grub-efi-
rm -f /var/lib/
rm -f /var/lib/
fi
dpkg --configure grub-efi-amd64
dpkg --configure grub-efi-
fi
2. added the following codes back to diskimage_ builder/ elements/ grub2/pkg- map grub_efi" : "", shim_efi" : "shim-signed",
"distro":{
"ubuntu":{
"signed_
"signed_
"grub_bios": "grub-pc-bin"
}
},
The Xenial build successfully but there seems to be an issue with cloud-init failing to initialize the hostname. The hostname of my bare metal node comes up at "Ubuntu."