Ubuntu preseed

最後更新: 2018-03-09

介紹

 


ubuntu-16.04.4 PXE Installer

 

mkdir /mnt/iso

mount -o loop ubuntu-16.04.4-server-amd64.iso /mnt/iso

cp -rf /mnt/iso/install/netboot/* /home/pxe/tftpboot

 


preseed

 

# features of Debian Installer

perseed = linux kernel append options

cd /home/pxe/tftpboot/ubuntu-installer/amd64/boot-screens

chmod 644 txt.cfg

vim txt.cfg

label cli
        menu label ^Command-line install
        kernel ubuntu-installer/amd64/linux
        append auto=true tasks=standard keymap=us language=en country=HK locale=en_HK.UTF-8 ... --- quiet

解釋:

"auto" is thus not a parameter, it means selecting that boot choice

A “---” in the boot options has special meaning.
Kernel parameters that appear after the last “---” may be copied into the bootloader configuration for the installed system
(if supported by the installer for the bootloader).

 

 


preseed File

 

# 首先要有 Web Server

apt-get install apache2

systemctl start apache2

/home/pxe/tftpboot/ubuntu-installer/amd64/boot-screens/txt.cfg

label cli
        menu label ^Command-line install
        kernel ubuntu-installer/amd64/linux
        append auto=true url=http://192.168.123.10/ubuntu/preseed/local-sources.seed ... --- quiet

/var/www/html/ubuntu/preseed/local-sources.seed

d-i live-installer/net-image string http://192.168.123.10/ubuntu/install/filesystem.squashfs

# Network
d-i netcfg/get_hostname string u16
d-i netcfg/get_domain string local
d-i netcfg/dhcpv6_timeout string 5

# Mirror
d-i mirror/country string manual
d-i mirror/http/hostname string 192.168.123.10
d-i mirror/http/directory string /ubuntu/
d-i mirror/http/proxy string

# Account
d-i passwd/root-login boolean true
d-i passwd/make-user boolean false
d-i passwd/root-password password ????
d-i passwd/root-password-again password ????

# time/zone
d-i clock-setup/utc boolean true
d-i time/zone string Asia/Hong_Kong
d-i clock-setup/ntp boolean true

DOC

https://www.debian.org/releases/wheezy/example-preseed.txt

 


Local Installation Source Files

 

# 首先要有 Web Server

apt-get install apache2

systemctl start apache2

# 準備 file

mount -o loop ubuntu-16.04.4-server-amd64.iso /mnt/iso

rm -f rm /var/www/html/index.*

cp -rf /mnt/iso/* /var/www/html/

# 設定 Mirror

vim /var/www/html/ubuntu/preseed/local-sources.seed

d-i live-installer/net-image string http://<YOUR_WEBSERVER_IP>/ubuntu/install/filesystem.squashfs

# Mirror
d-i mirror/country string manual
d-i mirror/http/hostname string 192.168.123.10
d-i mirror/http/directory string /ubuntu/
d-i mirror/http/proxy string

 


Other

 

iscsi boot: https://datahunter.org/ubuntu_iscsi

 

 

 

 

 

Creative Commons license icon Creative Commons license icon