Skip to content

Instantly share code, notes, and snippets.

@bekicot
Last active April 8, 2019 07:49
Show Gist options
  • Save bekicot/4ffca7c9b1c8d30ee6983cf585fb1af8 to your computer and use it in GitHub Desktop.
Save bekicot/4ffca7c9b1c8d30ee6983cf585fb1af8 to your computer and use it in GitHub Desktop.
Fedora Atomic Kicstart File. With ssh public key config. Stored at authorized_keys. Default password is 123123

Usage

  • Create a fat32 (Or any supported file system) disk image (Or Usb Drive/CD). Name it "OEMDRV"
  • Copy "ks.cfg" to "OEMDRV"
  • Insert "OEMDRV" during installation
  • Start the installation. The installation should start automatically.
#version=DEVEL
ignoredisk --only-use=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
# OSTree setup
ostreesetup --osname="fedora-atomic" --remote="fedora-atomic" --url="file:///ostree/repo" --ref="fedora/29/x86_64/atomic-host" --nogpg
# Use graphical install
graphical
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us'
# System language
lang en_US.UTF-8
# Root password
rootpw --iscrypted $6$ruuffpON41CCftEK$IYzg86hH25WuXLGS68e5oTJdsz/MejglwnfvPSHCKEc2YH7gGdU2t5ZVE22LeJfNP0xE0j4tmrldHGPpFSPuX0
# Run the Setup Agent on first boot
firstboot --enable
# Do not configure the X Window System
skipx
# System services
services --enabled="chronyd"
# System timezone
timezone Asia/Jakarta --isUtc
%post --erroronfail --log=/root/postinstall.log
rm -f /etc/ostree/remotes.d/fedora-atomic.conf
ostree remote add --set=gpg-verify=true --set=gpgkeypath=/etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-29-primary --set=contenturl=mirrorlist=https://ostree.fedoraproject.org/mirrorlist fedora-atomic 'https://ostree.fedoraproject.org'
cp /etc/skel/.bash* /root
# SSH Configuration
mkdir -p /root/.ssh
chmod 700 /root/.ssh
# Macbook ssh keys
# Change this keys to your own publick key
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCoNaAzc2tlGLoosbwmBcE7zsA2yHg3Ta7LgKaCRtwFeSlCYVlkTuG18aLPbOqRfndkWa6MlAaBopRRv85PfhmRRpb2CvUXwMQnqqqcflj/N2z1JQiB7Q+971vf/11oBvY17zUiTAvqaSbGAWCMJDRLd62dhSJNby3+a9vFIKqrLwrYyvg3ilOL5sts5ESXOb6fWI4jDCpKs20z2CQn32R1Zg2I8wkNgI4DiOy18D7pXPws4GbbpMawVfL9BuZfT+ago9xtKUvCBzxErEMXG/fxEVuePNhDFzQKlcD1XR4IV/dra1H8gZi3cNhZoKGAsuhRXDB1ReSA9mxeZIRnFSnH [email protected]" > /root/.ssh/authorized_keys
chmod 600 /root/.ssh/authorized_keys
%end
%addon com_redhat_kdump --disable --reserve-mb='128'
%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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment