Re: Re: CS Rocky Linux Kickstart

From Emerald Panda, 2 Years ago, written in Plain Text, viewed 342 times. This paste is a reply to Re: CS Rocky Linux Kickstart from Wet Mousedeer - view diff
URL https://paste.steamr.com/view/475b04ac 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. # Partition information
  62. %include "/tmp/part-include"
  63.  
  64. # System timezone
  65. timezone America/Edmonton --isUtc --nontp
  66.  
  67. # Root password
  68. rootpw --iscrypted $6$tAJB3y5cwWgliCme$sUtnke72wBUdrObmf6c.0YK61hiY9MgVxwU/JFJY6j.7OrnC1Y6yCJzCBgrMI9zbVbxOE6vaO7IIK9Ug2sccr.
  69.  
  70. reboot
  71.  
  72.  
  73. %addon com_redhat_kdump --disable --reserve-mb='auto'
  74.  
  75. %end
  76.  
  77.  
  78. %pre
  79.  
  80. disk_partition() {
  81.         local Disks=""
  82.  
  83.         for Device in `ls -d /sys/block/sd* /sys/block/vd* 2> /dev/null`; do
  84.                 # Add only non-removable devices.
  85.                 local Removable=`cat $Device/removable`
  86.  
  87.                 if [ $Removable == "0" ] ; then
  88.                         Disks="$Disks `basename $Device`"
  89.                 fi
  90.         done
  91.  
  92.         FirstDisk=`echo $Disks | cut -d' ' -f1`
  93.  
  94. cat <<EOF > /tmp/part-include
  95. # Use $FirstDisk only
  96. ignoredisk --only-use=$FirstDisk
  97. zerombr
  98.  
  99. # System bootloader configuration
  100. bootloader --location=mbr --boot-drive=$FirstDisk
  101.  
  102. clearpart --all --initlabel --drives=$FirstDisk
  103.  
  104. # Disk partitioning information
  105. part biosboot --fstype=biosboot --size=1
  106. part /boot    --fstype="ext4"  --ondisk=$FirstDisk --size=512
  107. part pv.1     --fstype="lvmpv" --ondisk=$FirstDisk --size=9727 --grow
  108. volgroup rl_vol --pesize=4096 pv.1
  109. logvol /      --fstype="xfs"  --size=6655 --name=root --vgname=rl_vol
  110. logvol /var   --fstype="xfs"  --size=2048 --name=var  --vgname=rl_vol
  111. logvol swap   --fstype="swap" --size=1024 --name=swap --vgname=rl_vol
  112. EOF
  113. }
  114.  
  115. disk_partition
  116.  
  117. # Update hosts for mirrors hosted on admin host
  118. echo 10.44.120.254  dl.rockylinux.org download.rockylinux.org repo.mysql.com download.cloudstack.org mirror.its.dal.ca >> /etc/hosts
  119.  
  120. %end
  121.  
  122.  
  123. %post
  124.  
  125. # Update hosts for mirrors hosted on admin host
  126. echo 10.44.120.254  dl.rockylinux.org download.rockylinux.org repo.mysql.com download.cloudstack.org mirror.its.dal.ca >> /etc/hosts
  127.  
  128. # this is installed by default but we don't need it in virt
  129. echo "Removing linux-firmware package."
  130. yum -C -y remove linux-firmware
  131.  
  132. # Remove firewalld; it is required to be present for install/image building.
  133. echo "Removing firewalld."
  134. yum -C -y remove firewalld --setopt="clean_requirements_on_remove=1"
  135.  
  136. # remove avahi and networkmanager
  137. echo "Removing avahi/zeroconf and NetworkManager"
  138. yum -C -y remove avahi\*
  139.  
  140. echo -n "Getty fixes"
  141. # although we want console output going to the serial console, we don't
  142. # actually have the opportunity to login there. FIX.
  143. # we don't really need to auto-spawn _any_ gettys.
  144. sed -i '/^#NAutoVTs=.*/ a\
  145. NAutoVTs=0' /etc/systemd/logind.conf
  146.  
  147. # set virtual-guest as default profile for tuned
  148. echo "virtual-guest" > /etc/tuned/active_profile
  149.  
  150. # make sure firstboot doesn't start
  151. echo "RUN_FIRSTBOOT=NO" > /etc/sysconfig/firstboot
  152.  
  153. echo "Fixing SELinux contexts."
  154. touch /var/log/cron
  155. touch /var/log/boot.log
  156. mkdir -p /var/cache/yum
  157. /usr/sbin/fixfiles -R -a restore
  158.  
  159. # reorder console entries
  160. sed -i 's/console=tty0/console=tty0 console=ttyS0,115200n8/' /boot/grub2/grub.cfg
  161.  
  162. # QEMU Agent
  163. yum -y install qemu-guest-agent
  164. systemctl enable qemu-guest-agent
  165.  
  166. # Cloud Init for CloudStack
  167. yum -y install cloud-init cloud-utils-growpart gdisk
  168. systemctl enable cloud-init.service
  169. cat <<EOF > /etc/cloud/cloud.cfg.d/99_cloudstack.cfg
  170. datasource:
  171.   CloudStack: {}
  172.   None: {}
  173. datasource_list:
  174.   - CloudStack
  175. EOF
  176.  
  177.  
  178. %end
  179.  
  180.  
  181. %anaconda
  182. pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
  183. pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
  184. pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
  185. %end
  186.  

Reply to "Re: Re: CS Rocky Linux Kickstart"

Here you can reply to the paste above