Getting the below error while installing from ks.cfg
unable to open input kickstart file curl#37 Couldn't open file /tmp/swappart
Here am trying to include /tmp/swappart file from pre section under disks and partition section. Dont know where exactly am doing wrong. My kickstart file looks like below,
install
cdrom
eula --agreed
firstboot --disable
text
reboot
# System
lang en_US.UTF-8
keyboard us
# Network information
network --bootproto=static --device=ens192 --onboot=off --ipv6=auto --no-activate
network --hostname=localhost.localdomain
# Authentication
auth --useshadow --enablemd5
rootpw xxxx
%pre
act_mem=$((`grep MemTotal: /proc/meminfo | sed ‘s/^MemTotal: *//’|sed ‘s/ .*//’` / 1024/2))
cat > /tmp/swappart <<END
logvol swap --fstype="swap" --name=lv_swap --vgname=sysvg --size=$act_mem
END
%end
# Disk & Partitions
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
ignoredisk --only-use=sda
bootloader --location=mbr --boot-drive=sda
zerombr
clearpart --all --initlabel --drives=sda
part /boot --fstype xfs --size=1000
part pv.01 --size=100000 --grow
volgroup sysvg pv.01
logvol / --vgname=sysvg --fstype=xfs --name=lv_root --size=20000
logvol /var --vgname=sysvg --fstype=xfs --name=lv_var --size=50000
logvol /tmp --vgname=sysvg --fstype=xfs --name=lv_tmp --size=10000
logvol /home --vgname=sysvg --fstype=xfs --name=lv_home --size=20000
logvol none --vgname=sysvg --fstype="None" --name=rpool --size=11544 --thinpool --grow
%include /tmp/swappart
######################################################
# Packages
%packages
@Core
authconfig
yum-utils
binutils.x86_64
compat-libcap1.x86_64
gcc.x86_64
gcc-c++.x86_64
glibc.i686
glibc.x86_64
glibc-devel.i686
glibc-devel.x86_64
ksh
libaio.i686
libaio.x86_64
libaio-devel.i686
libaio-devel.x86_64
libgcc.i686
libgcc.x86_64
libstdc++.i686
libstdc++.x86_64
libstdc++-devel.i686
libstdc++-devel.x86_64
libXi.i686
libXi.x86_64
libXtst.i686
libXtst.x86_64
make.x86_64
sysstat.x86_64
zip
unzip
perl
vim
net-tools
autofs
nfs-utils
open-vm-tools
sos
mlocate
ed
-mariadb-libs
%end
TIA
0 Answers