Ubuntu 14.04 Server で Preseed を使って自動インストールするための
seed ファイルを作ってみました。
「 KVM virt-install でネットワーク環境が全く無い場合でも DVD イメージから Preseed で自動インストール
」このあたりも参照して下さい。
- 環境
- Ubuntu 14.04 Server
seed ファイルのコメントにも書いてますが、設定内容は以下のとおりです。
| 項目 |
設定値 |
| IP address |
192.168.122.100 |
| Netmask |
255.255.255.0 |
| Gateway |
192.168.122.1 |
| Name server addresses |
192.168.122.1 |
| Hostname |
TestServer |
| Domain name |
(blank) |
| Full name for the new user |
Test full name |
| Username for your account |
testuser |
| Choose a password for the new user |
testpasswd |
| Re-enter password to verify |
testpasswd |
| Encrypt your home directory? |
No |
| Language |
English |
| Country, territory or area |
Japan |
| Country to base default locale settings on |
en_US.UTF-8 |
| Select your time zone |
Tokyo |
| Partitioning method |
Guided - use entire disk and set up LVM |
| Write the changes to disks and configure LVM? |
Yes |
| Size of the selected partition |
max |
| Overview of your currently configured partitions and mount points |
Finish partitioning and write changes to disk |
| Write the changes to disks? |
Yes |
| HTTP proxy information (blank for none) |
(blank) |
| How do you want to manage upgrades on this system? |
No automatic updates |
| Choose software to install |
Basic Ubuntu server, OpenSSH server |
| Install the GRUB boot loader to the master boot record? |
Yes |
| Is the system clock set to UTC? |
Yes |
| Installation complete |
Continue |
設定値は一度手動で設定してみて、以下のコマンドの出力を参考にしたりしてます。
$ sudo apt-get install debconf-utils
$ sudo debconf-get-selections --installer
Ubuntu 14.04 Server 用 seed ファイル
d-i netcfg/disable_autoconfig boolean true
# IP address: 192.168.122.100
d-i netcfg/get_ipaddress string 192.168.122.100
# Netmask: 255.255.255.0
d-i netcfg/get_netmask string 255.255.255.0
# Gateway: 192.168.122.1
d-i netcfg/get_gateway string 192.168.122.1
# Name server addresses: 192.168.122.1
d-i netcfg/get_nameservers string 192.168.122.1
# Hostname: TestServer
d-i netcfg/get_hostname string TestServer
# Domain name: (blank)
d-i netcfg/get_domain string
# Full name for the new user: Test full name
d-i passwd/user-fullname string Test full name
# Username for your account: testuser
d-i passwd/username string testuser
# ここにパスワードを書き込むとファイルとしてパスワードが残ってしまうので
# 以下をコメントアウトし、パスワードをコンソールから入力した方が良いです。
# Choose a password for the new user: testpasswd
d-i passwd/user-password password testpasswd
# Re-enter password to verify: testpasswd
d-i passwd/user-password-again password testpasswd
# Encrypt your home directory?: No
d-i user-setup/encrypt-home boolean false
# Language: English
d-i debian-installer/language string en
# Country, territory or area: Japan
d-i debian-installer/country string JP
# Country to base default locale settings on: en_US.UTF-8
d-i localechooser/preferred-locale select en_US.UTF-8
# Select your time zone: Tokyo
d-i time/zone string Asia/Tokyo
# Partitioning method: Guided - use entire disk and set up LVM
d-i partman-auto/method string lvm
# Write the changes to disks and configure LVM?: Yes
d-i partman-lvm/confirm_nooverwrite boolean true
# Size of the selected partition: max
d-i partman-auto-lvm/guided_size string max
# Overview of your currently configured partitions and mount points:
# Finish partitioning and write changes to disk
d-i partman/choose_partition select finish
# Write the changes to disks?: Yes
d-i partman/confirm_nooverwrite boolean true
# HTTP proxy information (blank for none): (blank)
d-i mirror/http/proxy string
# How do you want to manage upgrades on this system?: No automatic updates
d-i pkgsel/update-policy select none
# Choose software to install: Basic Ubuntu server, OpenSSH server
d-i tasksel/first multiselect Basic Ubuntu server, OpenSSH server
# Install the GRUB boot loader to the master boot record?: Yes
d-i grub-installer/only_debian boolean true
# Is the system clock set to UTC?: Yes
d-i clock-setup/utc boolean true
# Installation complete: Continue
d-i finish-install/reboot_in_progress note
# 以下は有効にしなくても自動インストールできました
#d-i console-setup/ask_detect boolean true
#d-i console-setup/layoutcode string jp
#d-i console-setup/charmap select UTF-8
#d-i mirror/country string Japan
#d-i mirror/http/mirror string jp.archive.ubuntu.com
#d-i pkgsel/install-language-support boolean false
# ssh コンソールでのインストール
#d-i anna/choose_modules string network-console
#d-i network-console/password password HogeHoge
#d-i network-console/password-again password HogeHoge