Re: CS Rocky Linux Kickstart

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

Replies to Re: CS Rocky Linux Kickstart rss

Title Name Language When
Re: Re: CS Rocky Linux Kickstart Emerald Panda text 2 Years ago.

Reply to "Re: CS Rocky Linux Kickstart"

Here you can reply to the paste above