Advertisement
vonschutter

ks.cfg

Mar 8th, 2023 (edited)
2,349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # --------------------------------------------------- #
  2. # Unattended Installation
  3. # --------------------------------------------------- #
  4. # Simple instruction to tell the debian installer that
  5. # this is intended to be an unattended install and to only
  6. # ask critical questions (wich we will answer in this file)
  7. # End of documentation
  8. d-i auto-install/enable boolean true
  9. d-i debconf/priority select critical
  10. # --------------------------------------------------- #
  11.  
  12.  
  13. # --------------------------------------------------- #
  14. # Install the KDE/Gnome oem-config frontend
  15. # --------------------------------------------------- #
  16. # Instructions to tell the installer what front end to display.
  17. # The default is to use a console based display with a light
  18. # Weight GUI. This is equally informative and stable. It is the
  19. # prefferred option for unseen deployments, for example in a
  20. # cloud service like AWS or AZURE. However, if the installation
  21. # will be seen by end users it may be preferable to show a modern
  22. # GUI that users will recognize and not be intimidated by.
  23. #
  24. # d-i     oem-config-udeb/frontend        string kde
  25. d-i     oem-config-udeb/frontend        string gnome
  26. # --------------------------------------------------- #
  27.  
  28. # --------------------------------------------------- #
  29. # Network configuration
  30. # --------------------------------------------------- #
  31. # Network setup. This can be a static setup or dhcp.
  32. # The RTD default prefferred config is to rely on DHCP,
  33. # and for wireless networks (systems with only wireless cards)
  34. # default to an SSID named "loader" and the guest wpa string
  35. # "letmein1234". This allows supported systems to be
  36. # installed directly over WiFi with no user input.
  37. # End of documentation
  38. d-i netcfg/choose_interface select manual
  39. d-i netcfg/hostname string RTD-Client
  40. d-i netcfg/get_hostname string unassigned-hostname
  41. d-i netcfg/get_domain string unassigned-domain
  42. d-i hw-detect/load_firmware boolean true
  43.  
  44. # We want the preconfiguration file to work on systems both with and
  45. # without sucessful dhcp configuration
  46. d-i netcfg/dhcp_failed note
  47. d-i netcfg/dhcp_options select Configure network manually
  48. # d-i netcfg/dhcp_timeout string 60
  49.  
  50. d-i netcfg/wireless_show_essids select manual
  51. d-i netcfg/wireless_essid string loader
  52. d-i netcfg/wireless_essid_again string loader
  53. d-i netcfg/wireless_security_type select wpa
  54. d-i netcfg/wireless_wpa string letmein1234
  55.  
  56. # --------------------------------------------------- #
  57.  
  58.  
  59. # --------------------------------------------------- #
  60. # Do NOT install on the USB stick(!)
  61. # --------------------------------------------------- #
  62. #
  63. # The Debian installer will install on the first disk it finds which can
  64. # sometimes be the USB stick itself. Work around this by rolling our own auto
  65. # detect logic which disallows installing on USB devices.
  66. #
  67. # d-i partman/early_command string [ "$(ls -A /tmp)" ] && umount -l /media || echo "Empty" ;
  68. # End of documentation
  69. d-i partman/early_command string \
  70. USBDEV=$(mount | grep hd-media | cut -d" " -f1 | sed "s/\(.*\)./\1/");\
  71. BOOTDEV=$(list-devices disk | grep -v \$USBDEV | head -1);\
  72. debconf-set partman-auto/disk $BOOTDEV;\
  73. debconf-set grub-installer/bootdev $BOOTDEV;
  74.  
  75. # --------------------------------------------------- #
  76.  
  77.  
  78. # --------------------------------------------------- #
  79. # Account setup (temporary user account)
  80. # --------------------------------------------------- #
  81. # Setup an initial user and disable root login by default.
  82. # root login may be re-enabled later by setting a root password.
  83. # An encrypted password is set here, and should be changed
  84. # ASAP after the system is built. Preferebly connect to LDAP/AD
  85. # in a managed environment.
  86. # End of documentation
  87. d-i passwd/root-login boolean false
  88. d-i passwd/user-fullname string RTD User
  89. d-i passwd/username string tangarora
  90. d-i passwd/user-password seen true
  91. d-i user-setup/allow-password-weak boolean true
  92. d-i passwd/user-password-crypted password $6$Rn5/UTzjIs68MX$9gz8vmshGlPqse3VoX8dzSfhWxRVoYv1MB6aGRD8xdvztOf.gD.SxxVWkxYrwwbShB9Q14flquK/apbdQJ65t1
  93. d-i passwd/auto-login boolean true
  94.  
  95. # --------------------------------------------------- #
  96.  
  97.  
  98. # --------------------------------------------------- #
  99. # Localization
  100. # --------------------------------------------------- #
  101. # Provide localizaton preferences so that the prefferred
  102. # language is used for display and formats. Comparable to
  103. # the MUI in Microsoft environments.
  104. # End of documentation
  105. d-i debian-installer/locale string en_US.UTF-8
  106. d-i localechooser/supported-locales multiselect en_US.UTF-8, se_SE.UTF-8
  107. d-i console-setup/ask_detect boolean false
  108.  
  109. # --------------------------------------------------- #
  110.  
  111.  
  112.  
  113. # --------------------------------------------------- #
  114. # Set Keyboard layout
  115. # --------------------------------------------------- #
  116. # Set the prefferred keyboard layout. Keyboards will work
  117. # regardless, but the letters and symbols may not actually
  118. # be the ones drawn on the keys. Default is us.
  119. d-i keyboard-configuration/xkb-keymap select se
  120. d-i keyboard-configuration/layoutcode string se
  121. d-i debian-installer/keymap select se
  122. d-i keymap select se
  123. d-i console-setup/layoutcode string se
  124. d-i console-setup/ask_detect boolean false
  125.  
  126. # --------------------------------------------------- #
  127.  
  128.  
  129. # --------------------------------------------------- #
  130. # Clock and time zone setup
  131. # --------------------------------------------------- #
  132. d-i clock-setup/utc boolean true
  133. d-i time/zone string Etc/UTC
  134. d-i clock-setup/ntp boolean true
  135. d-i clock-setup/ntp-server string ntp.ubuntu.com
  136.  
  137. # --------------------------------------------------- #
  138.  
  139.  
  140. # --------------------------------------------------- #
  141. # EFI
  142. # --------------------------------------------------- #
  143. #
  144. # The EFI (Extensible Firmware Interface) system partition is a partition on a data storage device.
  145. # UEFI provides backward compatibility with legacy systems by reserving the first block (sector) of
  146. # the partition for compatibility code, effectively creating a legacy boot sector. On legacy BIOS-based
  147. # systems, the first sector of a partition is loaded into memory and execution is transferred to this code.
  148. # Here we tell setup to install EFI boot setup if possible so that both NEW and old systems may be handled
  149. # and the installed system can be started.
  150. d-i partman-efi/non_efi_system boolean true
  151. # End of documentation
  152. # --------------------------------------------------- #
  153.  
  154.  
  155. # --------------------------------------------------- #
  156. # GRUB bootloader installation
  157. # --------------------------------------------------- #
  158. #
  159. # Tell the grub-installer to install to the MBR even if it also finds some other
  160. # OS, which is more likely to allow the newly installed Linux OS to boot without issue.
  161. # End of documentation
  162. d-i grub-installer/only_debian boolean true
  163. d-i grub-installer/with_other_os boolean true
  164. # --------------------------------------------------- #
  165.  
  166.  
  167. # --------------------------------------------------- #
  168. #   Disk layout (default encrypted disk)
  169. # --------------------------------------------------- #
  170. #
  171. # Set option to encrypt the hard disk:
  172. # By default the harddisk will be encrypted to pretect data
  173. # and will need to be unlocked with a password when the
  174. # system is booted. In addition a default is prefferred
  175. # where the swap space is set to 200% of RAM so that
  176. # hibernate can be supported.
  177. # End of documentation
  178.  
  179. d-i partman-auto/method string crypto
  180. d-i partman-crypto/passphrase password letmein1234
  181. d-i partman-crypto/passphrase-again password letmein1234
  182. d-i partman-auto-crypto/erase_disks boolean false
  183. d-i partman-lvm/device_remove_lvm boolean true
  184. d-i partman-lvm/device_remove_lvm_span boolean true
  185. d-i partman-auto/purge_lvm_from_device boolean true
  186. d-i partman-lvm/confirm boolean true
  187. d-i partman-lvm/confirm_nooverwrite boolean true
  188. d-i partman-auto-lvm/guided_size string max
  189. d-i partman-auto-lvm/new_vg_name string crypt
  190. #d-i partman-auto/choose_recipe select root-encrypted
  191. d-i partman-auto/expert_recipe string                   \
  192. multi-cnx ::                                            \
  193. 538 538 1075 free                               \
  194. $primary                                \
  195. $iflabel{ gpt }                         \
  196. $reusemethod{ }                         \
  197. method{ efi } format{ }                 \
  198. .                                               \
  199. 3500 3500 3500 ext3                             \
  200. $primary{ } $bootable{ }                \
  201. method{ format } format{ }              \
  202. use_filesystem{ } filesystem{ ext4 }    \
  203. mountpoint{ /boot }                     \
  204. .                                               \
  205. 200% 25000 200% linux-swap                      \
  206.     $lvmok{ } lv_name{ swap }               \
  207.     in_vg { crypt }                         \
  208.     $primary{ }                             \
  209.     method{ swap } format{ }                \
  210. .                                               \
  211. 500 1000 1000000000 ext4                        \
  212. $lvmok{ } lv_name{ root }               \
  213. in_vg { crypt }                         \
  214. $primary{ }                             \
  215. method{ format } format{ }              \
  216. use_filesystem{ } filesystem{ ext4 }    \
  217. mountpoint{ / }                         \
  218. .
  219.  
  220. d-i partman-md/device_remove_md boolean true
  221. d-i partman-md/confirm boolean true
  222. d-i partman-basicfilesystems/no_mount_point boolean false
  223. d-i partman-partitioning/confirm_write_new_label boolean true
  224. d-i partman/choose_partition select finish
  225. d-i partman/confirm boolean true
  226. d-i partman/confirm_nooverwrite boolean true
  227.  
  228. # --------------------------------------------------- #
  229.  
  230.  
  231. # --------------------------------------------------- #
  232. # Package selection
  233. # --------------------------------------------------- #
  234. # Packages may be selected as groups (meta packages) like kde-desktop or
  235. # as individual packages. Only one "pkgsel/include" string will be used though!
  236. # remembder to fit all the packages you want on one line.
  237. # tasksel tasksel/first multiselect standard options:
  238. # ubuntu-desktop-minimal kubuntu-desktop, ubuntu-gnome-desktop, lubuntu-desktop, ubuntu-mate-desktop
  239. # desktop,  gnome-desktop, kde-desktop, cinnamon-desktop, mate-desktop,
  240. # lxde-desktop, web-server, ssh-server, print-server.
  241. # The "OEM" line below ist to make it simple to replace the line with a
  242. # relevant chice of debian role using "sed" or similar.
  243. # End of documentation
  244. tasksel tasksel/first multiselect kubuntu-desktop
  245. d-i pkgsel/include string openssh-server dialog virt-what curl wget spice-vdagent git
  246.  
  247. # Valid choices for pkgsel/upgrade are: safe-upgrade full-upgrade none
  248. d-i pkgsel/upgrade select safe-upgrade
  249. d-i pkgsel/update-policy select unattended-upgrades
  250.  
  251. # By default, the system’s locate database will be updated after the
  252. # installer has finished installing most packages. This may take a while, so
  253. # if you don’t want it, you can set this to "false" to turn it off.
  254. # d-i pkgsel/updatedb boolean false
  255. # --------------------------------------------------- #
  256.  
  257.  
  258. # --------------------------------------------------- #
  259. # Default preseed Addon Tasks
  260. # --------------------------------------------------- #
  261. # for Debian to work (ignored by Ubuntu)...
  262. d-i preseed/late_command string \
  263. in-target apt-get -y install git ; \
  264. in-target git clone https://github.com/vonschutter/RTD-Setup.git /opt/rtd ; \
  265. in-target /usr/bin/chmod 755 /opt/rtd/core/rtd* ; \
  266. in-target /bin/bash /opt/rtd/core/rtd-oem-enable-config.sh ; \
  267.     cp /*.cfg /target/opt/rtd/ ; \
  268. umount -l /media || echo "Empty" ; \
  269. eject || true; \
  270. echo "------  initial Setup Complete!  ------"
  271.  
  272. # for Ubuntu to work (ignored by Debian)...
  273. ubiquity ubiquity/success_command string \
  274. in-target apt-get -y install git ; \
  275. in-target git clone https://github.com/vonschutter/RTD-Setup.git /opt/rtd ; \
  276. in-target /usr/bin/chmod 755 /opt/rtd/core/rtd* ; \
  277. in-target /bin/bash /opt/rtd/core/rtd-oem-enable-config.sh ; \
  278.     cp /*.cfg /target/opt/rtd/ ; \
  279. umount -l /media || echo "Empty" ; \
  280. eject || true; \
  281. echo "------  initial Setup Complete!  ------"
  282.  
  283. # Answer the last question
  284. d-i debian-installer/splash boolean true
  285.  
  286. # Option to try to gracefully eject the installation media:
  287. d-i cdrom-detect/eject boolean true
  288.  
  289. # Shutdown machine
  290. d-i finish-install/reboot_in_progress note
  291.  
  292. # --------------------------------------------------- #
  293.  
Tags: ks.cfg
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement