Skip to content

Instantly share code, notes, and snippets.

@AlexVlan
Created September 30, 2024 15:08
Show Gist options
  • Select an option

  • Save AlexVlan/f5217a2064359e0004ff3a492a8b7fd0 to your computer and use it in GitHub Desktop.

Select an option

Save AlexVlan/f5217a2064359e0004ff3a492a8b7fd0 to your computer and use it in GitHub Desktop.
redos-7.ks.pkrtpl.hcl
# Generated by Anaconda 33.25.4
# Generated by pykickstart v3.30
#version=F33
# url --url https://repo1.red-soft.ru/redos/7.3/x86_64/os/
# repo --name="Updates" --baseurl='https://repo1.red-soft.ru/redos/7.3/x86_64/updates/'
# repo --name="Extras" --baseurl='https://repo1.red-soft.ru/redos/7.3/x86_64/extras/'
# Repositories
url --url=https://repo1.red-soft.ru/redos/7.3/x86_64/os
# ,https://mirror.yandex.ru/redos/7.3/x86_64/os,http://repo.red-soft.ru/redos/7.3/x86_64/os
repo --name="Updates" --baseurl=https://repo1.red-soft.ru/redos/7.3/x86_64/updates
# ,https://mirror.yandex.ru/redos/7.3/x86_64/updates,http://repo.red-soft.ru/redos/7.3/x86_64/updates"
repo --name="kernels6" --baseurl=https://repo1.red-soft.ru/redos/7.3/x86_64/extras/kernels6-73
# ,https://mirror.yandex.ru/redos/7.3/x86_64/extras/kernels6-73,http://repo.red-soft.ru/redos/7.3/x86_64/extras/kernels6-73"
repo --name="yandex-browser-release" --baseurl=https://repo.yandex.ru/yandex-browser/rpm/redos/x86_64/
cdrom
poweroff
firewall --disabled
firstboot --disable
lang en_US.UTF-8
keyboard us
network --device=link --bootproto=dhcp
selinux --disabled
timezone UTC --isUtc
bootloader --location=mbr --timeout=1
rootpw --plaintext password
zerombr
clearpart --all --initlabel
part / --size=1 --grow --asprimary --fstype=ext4
%post --erroronfail
# workaround anaconda requirements and clear root password
passwd -d root
passwd -l root
# Clean up install config not applicable to deployed environments.
for f in resolv.conf fstab; do
rm -f /etc/$f
touch /etc/$f
chown root:root /etc/$f
chmod 644 /etc/$f
done
dnf update -y
dnf install cloud-utils-growpart -y
dnf install python2-oauthlib -y
dnf install e2fsprogs -y
dnf install cloud-init -y
dnf install kernel -y
dnf install efibootmgr -y
rm -f /etc/sysconfig/network-scripts/ifcfg-[^lo]*
# Kickstart copies install boot options. Serial is turned on for logging with
# Packer which disables console output. Disable it so console output is shown
# during deployments
sed -i 's/^GRUB_TERMINAL=.*/GRUB_TERMINAL_OUTPUT="console"/g' /etc/default/grub
sed -i '/GRUB_SERIAL_COMMAND="serial"/d' /etc/default/grub
sed -ri 's/(GRUB_CMDLINE_LINUX=".*)\s+console=ttyS0(.*")/\1\2/' /etc/default/grub
# sed -i 's/GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=false/g' /etc/default/grub
sed -i 's/GRUB_ENABLE_BLSCFG=.*/GRUB_ENABLE_BLSCFG=true/g' /etc/default/grub
# grub2-mkconfig --update-bls-cmdline -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
dracut --force /boot/initramfs-$(uname -r).img $(uname -r)
# Отключение hostonly в Dracut
# echo 'hostonly="no"' >> /etc/dracut.conf
# dracut --force --no-hostonly /boot/initramfs-$(uname -r).img $(uname -r)
dnf clean all
##
# Проверка доступности репозиториев
dnf repolist
# Проверка наличия необходимых утилит
# dnf install -y grub2-efi-x64 shim-x64 grub2-efi-x64-modules efibootmgr dosfstools lvm2 mdadm device-mapper-multipath iscsi-initiator-utils
%end
%packages
@core
@^server-minimal
bash-completion
# cloud-init
# cloud-init only requires python-oauthlib with MAAS. As such upstream
# has removed python-oauthlib from cloud-init's deps.
# python2-oauthlib
# cloud-utils-growpart
rsync
tar
yum-utils
# bridge-utils is required by cloud-init to configure networking. Without it
# installed cloud-init will try to install it itself which will not work in
# isolated environments.
bridge-utils
# Tools needed to allow custom storage to be deployed without acessing the
# Internet.
grub2-efi-x64
shim-x64
# Older versions of Curtin do not support secure boot and setup grub by
# generating grubx64.efi with grub2-efi-x64-modules.
grub2-efi-x64-modules
efibootmgr
dosfstools
lvm2
mdadm
device-mapper-multipath
iscsi-initiator-utils
# *
e2fsprogs
# *
-plymouth
# Remove ALSA firmware
-a*-firmware
# Remove Intel wireless firmware
-i*-firmware
dracut-live
# syslinux
# memtest86+
# grub2-efi
# redos-logos
kernel
%end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment