CS Rocky Linux Kickstart

From Ivory Butterfly, 2 Years ago, written in Plain Text, viewed 199 times.
URL https://paste.steamr.com/view/26aba70e Embed
Download Paste or View Raw
  1. #version=RHEL8
  2. # Use graphical install
  3. graphical
  4.  
  5. repo --name="Minimal" --baseurl=file:///run/install/sources/mount-0000-cdrom/Minimal
  6.  
  7. %packages
  8. @^minimal-environment
  9. @standard
  10. openssh-server
  11. openssh-clients
  12. sudo
  13.  
  14. # unnecessary firmware
  15. -aic94xx-firmware
  16. -atmel-firmware
  17. -b43-openfwwf
  18. -bfa-firmware
  19. -ipw2100-firmware
  20. -ipw2200-firmware
  21. -ivtv-firmware
  22. -iwl100-firmware
  23. -iwl1000-firmware
  24. -iwl3945-firmware
  25. -iwl4965-firmware
  26. -iwl5000-firmware
  27. -iwl5150-firmware
  28. -iwl6000-firmware
  29. -iwl6000g2a-firmware
  30. -iwl6050-firmware
  31. -libertas-usb8388-firmware
  32. -ql2100-firmware
  33. -ql2200-firmware
  34. -ql23xx-firmware
  35. -ql2400-firmware
  36. -ql2500-firmware
  37. -rt61pci-firmware
  38. -rt73usb-firmware
  39. -xorg-x11-drv-ati-firmware
  40. -zd1211-firmware
  41.  
  42. %end
  43.  
  44. # Keyboard layouts
  45. keyboard --xlayouts='us'
  46. # System language
  47. lang en_US.UTF-8
  48.  
  49. # Network information
  50. network  --bootproto=dhcp --device=ens18 --ipv6=auto --activate
  51. network  --hostname=localhost.localdomain
  52.  
  53. # Use CDROM installation media
  54. cdrom
  55.  
  56. # Run the Setup Agent on first boot
  57. firstboot --disabled
  58. # Do not configure the X Window System
  59. skipx
  60.  
  61. ignoredisk --only-use=sda
  62. # Partition clearing information
  63. clearpart --none --initlabel
  64. # Disk partitioning information
  65. part pv.116 --fstype="lvmpv" --ondisk=sda --size=7167
  66. part /boot --fstype="xfs" --ondisk=sda --size=1024
  67. volgroup rl --pesize=4096 pv.116
  68. logvol / --fstype="xfs" --size=6652 --name=root --vgname=rl
  69. logvol swap --fstype="swap" --size=512 --name=swap --vgname=rl
  70.  
  71. # System timezone
  72. timezone America/Edmonton --isUtc --nontp
  73.  
  74. # Root password
  75. rootpw --iscrypted $6$tAJB3y5cwWgliCme$sUtnke72wBUdrObmf6c.0YK61hiY9MgVxwU/JFJY6j.7OrnC1Y6yCJzCBgrMI9zbVbxOE6vaO7IIK9Ug2sccr.
  76.  
  77. reboot
  78.  
  79.  
  80. %pre
  81. disk_partition() {
  82.         local Disks=""
  83.  
  84.         for Device in `ls -d /sys/block/sd* 2> /dev/null`; do
  85.                 # Add only non-removable devices.
  86.                 local Removable=`cat $Device/removable`
  87.  
  88.                 if [ $Removable == "0" ] ; then
  89.                         Disks="$Disks `basename $Device`"
  90.                 fi
  91.         done
  92.  
  93.         FirstDisk=`echo $Disks | cut -d' ' -f1`
  94.  
  95. cat <<EOF > /tmp/part-include
  96. # Use $FirstDisk only
  97. ignoredisk --only-use=$FirstDisk
  98. zerombr
  99.  
  100. # System bootloader configuration
  101. bootloader --location=mbr --boot-drive=$FirstDisk
  102.  
  103. clearpart --all --initlabel --drives=$FirstDisk
  104.  
  105. # Disk partitioning information
  106. part biosboot --fstype=biosboot --size=1
  107. part /boot    --fstype="ext4"  --ondisk=$FirstDisk --size=512
  108. part pv.1     --fstype="lvmpv" --ondisk=$FirstDisk --size=9727 --grow
  109. volgroup rl_vol --pesize=4096 pv.1
  110. logvol /      --fstype="xfs"  --size=6655 --name=root --vgname=rl_vol
  111. logvol /var   --fstype="xfs"  --size=2048 --name=var  --vgname=rl_vol
  112. logvol swap   --fstype="swap" --size=1024 --name=swap --vgname=rl_vol
  113. EOF
  114. }
  115.  
  116. disk_partition
  117.  
  118. # Update hosts for mirrors hosted on admin host
  119. echo 10.44.120.254  dl.rockylinux.org download.rockylinux.org repo.mysql.com download.cloudstack.org mirror.its.dal.ca >> /etc/hosts
  120.  
  121. %end
  122.  
  123.  
  124. %addon com_redhat_kdump --disable --reserve-mb='auto'
  125.  
  126. %end
  127.  
  128.  
  129. %post
  130. # this is installed by default but we don't need it in virt
  131. echo "Removing linux-firmware package."
  132. yum -C -y remove linux-firmware
  133.  
  134. # Remove firewalld; it is required to be present for install/image building.
  135. echo "Removing firewalld."
  136. yum -C -y remove firewalld --setopt="clean_requirements_on_remove=1"
  137.  
  138. # remove avahi and networkmanager
  139. echo "Removing avahi/zeroconf and NetworkManager"
  140. yum -C -y remove avahi\*
  141.  
  142. echo -n "Getty fixes"
  143. # although we want console output going to the serial console, we don't
  144. # actually have the opportunity to login there. FIX.
  145. # we don't really need to auto-spawn _any_ gettys.
  146. sed -i '/^#NAutoVTs=.*/ a\
  147. NAutoVTs=0' /etc/systemd/logind.conf
  148.  
  149. # set virtual-guest as default profile for tuned
  150. echo "virtual-guest" > /etc/tuned/active_profile
  151.  
  152. # make sure firstboot doesn't start
  153. echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
  154.  
  155. echo "Fixing SELinux contexts."
  156. touch /var/log/cron
  157. touch /var/log/boot.log
  158. mkdir -p /var/cache/yum
  159. /usr/sbin/fixfiles -R -a restore
  160.  
  161. # reorder console entries
  162. sed -i 's/console=tty0/console=tty0 console=ttyS0,115200n8/' /boot/grub2/grub.cfg
  163.  
  164. # QEMU Agent
  165. yum -y install qemu-guest-agent
  166. systemctl enable qemu-guest-agent
  167.  
  168. # Cloud Init for CloudStack
  169. yum -y install cloud-init cloud-utils-growpart gdisk
  170. systemctl enable cloud-init.service
  171. cat <<EOF > /etc/cloud/cloud.cfg.d/99_cloudstack.cfg
  172. datasource:
  173.   CloudStack: {}
  174.   None: {}
  175. datasource_list:
  176.   - CloudStack
  177. EOF
  178.  
  179. %end
  180.  
  181.  
  182. %anaconda
  183. pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
  184. pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
  185. pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
  186. %end
  187.  

Replies to CS Rocky Linux Kickstart rss

Title Name Language When
Re: CS Rocky Linux Kickstart Wet Mousedeer text 2 Years ago.

Reply to "CS Rocky Linux Kickstart"

Here you can reply to the paste above