Fix Grub configurations for Fedora images built on a UEFI host.
The grub install scripts on Fedora have hardcoded checks for /sys/firmware/efi and if the directory exists, it uses efi specific instruction like initrdefi, linuxefi etc. vm element should fix it once the configuration is generated. Closes-bug: #1231946 Change-Id: I888304cb9167b8e074b04ca6c5b2f9143b70d37d
This commit is contained in:
parent
c7875398b3
commit
50d1e09df1
@ -171,6 +171,10 @@ function install_grub2 {
|
||||
if [ $(lsb_release -rs) = '19' ]; then
|
||||
sed -i "s%UUID=[A-Za-z0-9\-]*%LABEL=cloudimg-rootfs%" /etc/fstab
|
||||
fi
|
||||
# Fix efi specific instructions in grub config file
|
||||
if [ -d /sys/firmware/efi ]; then
|
||||
sed -i 's%\(initrd\|linux\)efi /boot%\1 /boot%g' $GRUB_CFG
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user