[lxc-devel] [lxc-ci/master] images/centos: Add /sys/firmware workaround for VMs

monstermunchkin on Github lxc-bot at linuxcontainers.org
Fri Mar 6 14:18:49 UTC 2020


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 357 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200306/076039f9/attachment.bin>
-------------- next part --------------
From d44160807573bdf711caebd227558041579518a5 Mon Sep 17 00:00:00 2001
From: Thomas Hipp <thomas.hipp at canonical.com>
Date: Fri, 6 Mar 2020 15:18:35 +0100
Subject: [PATCH] images/centos: Add /sys/firmware workaround for VMs

Signed-off-by: Thomas Hipp <thomas.hipp at canonical.com>
---
 images/centos.yaml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/images/centos.yaml b/images/centos.yaml
index bf58e67..b66d6df 100644
--- a/images/centos.yaml
+++ b/images/centos.yaml
@@ -653,12 +653,18 @@ actions:
     #!/bin/sh
     set -eux
 
+    mount -t tmpfs tmpfs /sys/firmware
+    mkdir /sys/firmware/efi
+
     # Regenerate initramfs
     kver=$(ls /boot/initramfs-*.img | sed -r 's#.*initramfs-(.+)\.img#\1#')
     dracut --kver "${kver}" -f
 
     target="$(readlink -f /etc/grub2-efi.cfg)"
     grub2-mkconfig -o "${target}"
+
+    umount /sys/firmware
+
     sed -i "s#root=[^ ]*#root=/dev/sda2#g" "${target}"
   types:
   - vm


More information about the lxc-devel mailing list