aboutsummaryrefslogtreecommitdiffstats
path: root/install.sh
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.singh@amd.com>2020-05-24 07:14:11 -0500
committerBrijesh Singh <brijesh.singh@amd.com>2020-05-24 07:14:11 -0500
commitcd68fbefd9c9470539cf5656074906b3baeca63c (patch)
treebabbd696343964675dc905a9bbae758fcf1ed732 /install.sh
parentf50f628deebbb0b6f5ec64fe5f4d7137f83e3f5b (diff)
downloadcachepc-amdsev-cd68fbefd9c9470539cf5656074906b3baeca63c.tar.gz
cachepc-amdsev-cd68fbefd9c9470539cf5656074906b3baeca63c.zip
fix SEV policy calculation and remove thp change from grub
Diffstat (limited to 'install.sh')
-rwxr-xr-xinstall.sh19
1 files changed, 1 insertions, 18 deletions
diff --git a/install.sh b/install.sh
index 216c741..c73911b 100755
--- a/install.sh
+++ b/install.sh
@@ -1,6 +1,6 @@
#!/bin/bash
-. /etc/os-release
+[ -e /etc/os-release ] && . /etc/os-release
# This will install all the dependent packages for qemu and ovmf to run
if [ "$ID_LIKE" = "debian" ]; then
@@ -15,23 +15,6 @@ else
rpm -ivh linux/kernel-*.rpm
fi
-# update grub.cfg to disable THP
-if ! grep "transparent_hugepage=never" /etc/default/grub >/dev/null; then
- orig_cmdline="`grep GRUB_CMDLINE_LINUX /etc/default/grub | cut -f2- -d=`"
- cmdline="${orig_cmdline::-1}"
- cmdline="${cmdline:1}"
- cmdline="${cmdline} transparent_hugepage=never"
-
- sed -i "/GRUB_CMDLINE_LINUX/c\GRUB_CMDLINE_LINUX=\"${cmdline}\"" /etc/default/grub
-
- if [ "$ID_LIKE" = "debian" ]; then
- update-grub2
- else
- grub2-mkconfig
- fi
-fi
-
-#
cp kvm.conf /etc/modprobe.d/
echo