CentOS 8 kickstart with encrypted partition

Issues related to applications and software problems and general support
Post Reply
ttyz
Posts: 9
Joined: 2020/05/19 00:42:59

CentOS 8 kickstart with encrypted partition

Post by ttyz » 2020/11/30 09:38:52

Hi support team,

I have been trying to automate my CentOS 8 installation (text mode) with encryption on partitions using the kickstart file but it hangs at storage configuration during installation.
I have read online that to achieve this, I needed to append a "--encrypted" parameter to the specified partition e.g,

Code: Select all

logvol /home --fstype="xfs" --size 4096 --vgname=centos --encrypted --passphrase=<password> 
Apparently this does not work for me when I included it in my kickstart, so I decided to try a manual install of CentOS 8 via the GUI with manual partition with the encrypt option checked for respective partition. Once the OS is installed, I proceed to copy out the anaconda-ks.cfg as a kickstart file for my automated install.

Having done this, it still hangs at storage configuration during installation.
Does this have anything to do with installation using text mode or GUI? What could be the other causes to this issue?
Thanks in advance for helping out!

The kickstart file that I generated with GUI installation looks like this.

Code: Select all

#version=RHEL8
ignoredisk --only-use=sda
# Partition clearing information
clearpart --none --initlabel
# Use graphical install
graphical
# Use CDROM installation media
cdrom
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8

# Network information
network  --bootproto=dhcp --device=enp0s3 --onboot=off --ipv6=auto --no-activate
network  --hostname=localhost.localdomain
repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream
# Root password
rootpw --iscrypted $6$QVZTegGqeTzxng.h$8FB3C4cS1KVhWvFAGz7.FnOWiN2u1Y7WR.TuT61srcOcbQUAmJnywEJAAfc4OkNKTvSOmxGT0avAsSCVKp0uD.
# Run the Setup Agent on first boot
firstboot --enable
# Do not configure the X Window System
skipx
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Singapore --isUtc --nontp
# Disk partitioning information
part /boot/efi --fstype="efi" --ondisk=sda --size=200 --fsoptions="umask=0077,shortname=winnt"
part /boot --fstype="ext4" --ondisk=sda --size=500
part pv.382 --fstype="lvmpv" --ondisk=sda --size=7484
volgroup cl --pesize=4096 pv.382
logvol / --fstype="xfs" --size=4096 --name=00 --vgname=cl
logvol /home --fstype="xfs" --size=1327 --encrypted --luks-version=luks1 --name=03 --vgname=cl
logvol /var --fstype="xfs" --size=1024 --name=01 --vgname=cl
logvol swap --fstype="swap" --size=1026 --encrypted --luks-version=luks1 --name=02 --vgname=cl

%packages
@^server-product-environment
@development
kexec-tools

%end

%addon com_redhat_kdump --enable --reserve-mb='auto'

%end

%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end

Post Reply