Advertisement
fatherlinux

Untitled

Sep 26th, 2016
3,858
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. docker run -it rhel7 cat /root/anaconda-ks.cfg
  2. #version=DEVEL
  3. # Use network installation
  4. url --url="http://download.eng.bos.redhat.com/devel/candidate-trees/RHEL-7.2-updates-20160727.0/compose/Server/x86_64/os/"
  5. repo --name="koji-override-0" --baseurl=http://download.lab.bos.redhat.com/devel/candidate-trees/RHEL-7.2-updates-20160727.0/compose/Server/x86_64/os
  6. repo --name="Server-HighAvailability" --baseurl=http://download.eng.bos.redhat.com/devel/candidate-trees/RHEL-7.2-updates-20160727.0/compose/Server/x86_64/os//addons/HighAvailability
  7. repo --name="Server-ResilientStorage" --baseurl=http://download.eng.bos.redhat.com/devel/candidate-trees/RHEL-7.2-updates-20160727.0/compose/Server/x86_64/os//addons/ResilientStorage
  8. # Use graphical install
  9. graphical
  10. # Firewall configuration
  11. firewall --disabled
  12. firstboot --disable
  13. ignoredisk --only-use=vda
  14. # Keyboard layouts
  15. # old format: keyboard us
  16. # new format:
  17. keyboard --vckeymap=us --xlayouts='us'
  18. # System language
  19. lang en_US.UTF-8
  20.  
  21. # Network information
  22. network  --bootproto=dhcp --device=eth0 --ipv6=auto --activate
  23. network  --hostname=localhost.localdomain
  24. # Reboot after installation
  25. reboot
  26. # Root password
  27. rootpw --iscrypted --lock locked
  28. # System services
  29. services --disabled="chronyd"
  30. # System timezone
  31. timezone America/New_York --isUtc --nontp
  32. user --name=none
  33. # System bootloader configuration
  34. bootloader --disabled
  35. # Clear the Master Boot Record
  36. zerombr
  37. # Partition clearing information
  38. clearpart --all
  39. # Disk partitioning information
  40. part / --fstype="xfs" --size=4096
  41.  
  42. %post --logfile /var/log/anaconda/anaconda-post.log
  43.  
  44. # remove the user anaconda forces us to make
  45. userdel -r none
  46.  
  47. # Support for subscription-manager secrets
  48. ln -s /run/secrets/etc-pki-entitlement /etc/pki/entitlement-host
  49. ln -s /run/secrets/rhsm /etc/rhsm-host
  50.  
  51. #Certificate specifying product - RHEL Server
  52. cat <<EOF > /etc/pki/product/69.pem
  53. -----BEGIN CERTIFICATE-----
  54. MIIGDTCCA/WgAwIBAgIJALDxRLt/tU6eMA0GCSqGSIb3DQEBBQUAMIGuMQswCQYD
  55. VQQGEwJVUzEXMBUGA1UECAwOTm9ydGggQ2Fyb2xpbmExFjAUBgNVBAoMDVJlZCBI
  56. YXQsIEluYy4xGDAWBgNVBAsMD1JlZCBIYXQgTmV0d29yazEuMCwGA1UEAwwlUmVk
  57. IEhhdCBFbnRpdGxlbWVudCBQcm9kdWN0IEF1dGhvcml0eTEkMCIGCSqGSIb3DQEJ
  58. ARYVY2Etc3VwcG9ydEByZWRoYXQuY29tMB4XDTE1MDkxMTExMDkyMloXDTM1MDkw
  59. NjExMDkyMlowRDFCMEAGA1UEAww5UmVkIEhhdCBQcm9kdWN0IElEIFtlYjg5ZGVl
  60. Ny1mNzg3LTQ3MjQtYmU3ZC03ZWEzMzJkMGQ5ZmFdMIICIjANBgkqhkiG9w0BAQEF
  61. AAOCAg8AMIICCgKCAgEAxj9J04z+Ezdyx1U33kFftLv0ntNS1BSeuhoZLDhs18yk
  62. sepG7hXXtHh2CMFfLZmTjAyL9i1XsxykQpVQdXTGpUF33C2qBQHB5glYs9+d781x
  63. 8p8m8zFxbPcW82TIJXbgW3ErVh8vk5qCbG1cCAAHb+DWMq0EAyy1bl/JgAghYNGB
  64. RvKJObTdCrdpYh02KUqBLkSPZHvo6DUJFN37MXDpVeQq9VtqRjpKLLwuEfXb0Y7I
  65. 5xEOrR3kYbOaBAWVt3mYZ1t0L/KfY2jVOdU5WFyyB9PhbMdLi1xE801j+GJrwcLa
  66. xmqvj4UaICRzcPATP86zVM1BBQa+lilkRQes5HyjZzZDiGYudnXhbqmLo/n0cuXo
  67. QBVVjhzRTMx71Eiiahmiw+U1vGqkHhQNxb13HtN1lcAhUCDrxxeMvrAjYdWpYlpI
  68. yW3NssPWt1YUHidMBSAJ4KctIf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
  84. mJKZW7ECMV54mFVetoHMhXK95J2gdj8KCCBRiMklNJ/CmObDLwVgiJ+aJyFWkhLx
  85. D9gahhTI9drID4fuiO0rRIgSAD/22bGJY/OnBPq3Fs5Cvaw619Eqth7XjJCl4POb
  86. Kp/OjOg7U7FJSsdrpQKT0/M=
  87. -----END CERTIFICATE-----
  88. EOF
  89.  
  90.  
  91. # Set the language rpm nodocs transaction flag persistently in the
  92. # image yum.conf and rpm macros
  93.  
  94. LANG="en_US"
  95. echo "%_install_lang $LANG" > /etc/rpm/macros.image-language-conf
  96.  
  97. awk '(NF==0&&!done){print "override_install_langs='$LANG'\ntsflags=nodocs";done=1}{print}' \
  98.     < /etc/yum.conf > /etc/yum.conf.new
  99. mv /etc/yum.conf.new /etc/yum.conf
  100.  
  101. #systemd wrongly expects "unpopulated /etc" when /etc/machine-id does not exist
  102. #let's leave machine-id empty
  103. cat /dev/null > /etc/machine-id
  104.  
  105. #https://bugzilla.redhat.com/show_bug.cgi?id=1235969
  106. #rm -f /etc/fstab
  107. #this is not possible, guestmount needs fstab => brew build crashes without it
  108. #fstab is removed in TDL when tar-ing files
  109.  
  110. rm -f /usr/lib/locale/locale-archive
  111. #setup at least some locale, https://bugzilla.redhat.com/show_bug.cgi?id=1129697
  112. localedef -v -c -i en_US -f UTF-8 en_US.UTF-8
  113.  
  114. #https://bugzilla.redhat.com/show_bug.cgi?id=1201663
  115. rm -f /etc/systemd/system/multi-user.target.wants/rhsmcertd.service
  116.  
  117. #content of /run can not be prepared if /run is tmpfs (disappears on reboot)
  118. umount /run
  119. systemd-tmpfiles --create --boot
  120.  
  121. rm -rf /var/cache/yum/*
  122. rm -f /tmp/ks-script*
  123.  
  124. %end
  125.  
  126. %packages --excludedocs --nocore --instLangs=en
  127. bash
  128. findutils
  129. gdb-gdbserver
  130. kexec-tools
  131. python-rhsm
  132. rootfiles
  133. subscription-manager
  134. systemd
  135. vim-minimal
  136. yum
  137. yum-plugin-ovl
  138. yum-utils
  139. -e2fsprogs
  140. -firewalld
  141. -kernel
  142. -kexec-tools
  143. -xfsprogs
  144.  
  145. %end
  146.  
  147. %addon com_redhat_kdump --enable --reserve-mb='auto'
  148.  
  149. %end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement