|
#=========================================================================================== |
|
# MIT License |
|
# |
|
# Copyright (c) 2017 Naoki Aoyama (@FoxBoxsnet) |
|
# |
|
# Permission is hereby granted, free of charge, to any person obtaining a copy |
|
# of this software and associated documentation files (the "Software"), to deal |
|
# in the Software without restriction, including without limitation the rights |
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|
# copies of the Software, and to permit persons to whom the Software is |
|
# furnished to do so, subject to the following conditions: |
|
# |
|
# The above copyright notice and this permission notice shall be included in all |
|
# copies or substantial portions of the Software. |
|
# |
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
|
# SOFTWARE. |
|
#=========================================================================================== |
|
# BOOT SEQUENCE CONFIGURATIONS START |
|
# The settings become effective only if the far END set shipped on DVD media, USB media. |
|
# This section is ignored if the PXE boot. |
|
#=========================================================================================== |
|
d-i debian-installer/language string en |
|
d-i debian-installer/country string US |
|
d-i debian-installer/locale string en_US.UTF-8 |
|
d-i localechooser/supported-locales en_US.UTF-8 |
|
d-i console-setup/ask_detect boolean false |
|
d-i console-setup/layoutcode string us |
|
d-i console-setup/charmap select UTF-8 |
|
|
|
# Characteristics of the keyboard layout settings (Japan language keyboard) |
|
d-i keyboard-configuration/layoutcode string jp |
|
d-i keyboard-configuration/modelcode jp106 |
|
|
|
#=========================================================================================== |
|
# Network settings |
|
#------------------------------------------------------------------------------------------- |
|
# Static IP |
|
#------------------------------------------------------------------------------------------- |
|
# Important do not set the following two items are not treated as static IP |
|
d-i netcfg/use_autoconfig boolean false |
|
d-i netcfg/disable_autoconfig boolean true |
|
|
|
#=========================================================================================== |
|
# Select a mirror to download the Installer package |
|
#------------------------------------------------------------------------------------------- |
|
d-i mirror/country string manual |
|
d-i mirror/http/hostname string jp.archive.ubuntu.com |
|
d-i mirror/http/directory string /ubuntu/ |
|
d-i mirror/http/proxy string |
|
|
|
#=========================================================================================== |
|
# Clock and time zone setup |
|
#------------------------------------------------------------------------------------------- |
|
d-i clock-setup/utc boolean true |
|
d-i time/zone string Asia/Tokyo |
|
d-i clock-setup/ntp boolean true |
|
d-i clock-setup/ntp-server string ntp.nict.jp |
|
|
|
#=========================================================================================== |
|
# Partitioning |
|
#------------------------------------------------------------------------------------------- |
|
# d-i partman-auto/disk string /dev/sda |
|
d-i partman-auto/method string regular |
|
d-i partman-auto/choose_recipe select atomic |
|
d-i partman-partitioning/confirm_write_new_label boolean true |
|
d-i partman/choose_partition select finish |
|
d-i partman/confirm boolean true |
|
d-i partman/confirm_nooverwrite boolean true |
|
|
|
#=========================================================================================== |
|
# Base system installation |
|
#------------------------------------------------------------------------------------------- |
|
d-i base-installer/kernel/image string linux-server |
|
|
|
#=========================================================================================== |
|
#### Account setup |
|
|
|
#------------------------------------------------------------------------------------------- |
|
## Root account setup |
|
#------------------------------------------------------------------------------------------- |
|
d-i passwd/root-login boolean true |
|
d-i passwd/make-user boolean true |
|
d-i passwd/root-password p@ssw0rd p@ssw0rd |
|
d-i passwd/root-password-again p@ssw0rd p@ssw0rd |
|
|
|
#------------------------------------------------------------------------------------------- |
|
## To create a normal user01 account. |
|
#------------------------------------------------------------------------------------------- |
|
d-i passwd/user-fullname string user01 |
|
d-i passwd/username string user01 |
|
d-i passwd/user-password p@ssw0rd p@ssw0rd |
|
d-i passwd/user-password-again p@ssw0rd p@ssw0rd |
|
d-i user-setup/allow-password-weak boolean true |
|
d-i passwd/user-default-groups string sudo |
|
d-i user-setup/encrypt-home boolean false |
|
|
|
#=========================================================================================== |
|
# Package selection |
|
#------------------------------------------------------------------------------------------- |
|
#tasksel tasksel/first multiselect none |
|
tasksel tasksel/first multiselect none |
|
## openssh-server, vim, tmux |
|
d-i pkgsel/include string openssh-server |
|
|
|
d-i pkgsel/upgrade select none |
|
d-i pkgsel/update-policy select none |
|
popularity-contest popularity-contest/participate boolean false |
|
d-i pkgsel/updatedb boolean true |
|
|
|
#=========================================================================================== |
|
# GRUB Installer |
|
#------------------------------------------------------------------------------------------- |
|
d-i grub-installer/grub2_instead_of_grub_legacy boolean true |
|
d-i grub-installer/only_debian boolean true |
|
d-i grub-installer/bootdev string /dev/sda |
|
|
|
#=========================================================================================== |
|
# Restart the server after installation |
|
#------------------------------------------------------------------------------------------- |
|
d-i finish-install/reboot_in_progress note |
|
|
|
#=========================================================================================== |
|
# This first command is run as early as possible, just after |
|
# preseeding is read. |
|
#------------------------------------------------------------------------------------------- |
|
d-i preseed/late_command string apt-install bash-completion curl wget ubuntu-desktop psmisc sshpass tree unzip vim zip; \ |
|
in-target apt-get -y update; \ |
|
in-target apt-get -y upgrade; \ |
|
in-target apt-get -y clean; \ |
|
in-target sed -i -e "s/PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config; \ |
|
in-target sed -i -e "s/%sudo ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD:ALL/g" /etc/sudoers \ |
|
in-target curl -sSL https://releases.rancher.com/install-docker/1.12.sh | sh \ |