| 1 |
|
| 2 |
Preseeding and Automatic Installation |
| 3 |
======================================= |
| 4 |
|
| 5 |
Preseeding [1][2] provides a way to set answers to questions asked |
| 6 |
during the installation process, without having to manually enter the |
| 7 |
answers while the installation is running. This makes it possible to |
| 8 |
fully automate installations. |
| 9 |
|
| 10 |
To use preseeding with 'di-netboot-assistant', do the following: |
| 11 |
|
| 12 |
• Provide a 'preseed.cfg' file. An example is available: |
| 13 |
'/usr/share/doc/di-netboot-assistant/examples/preseed.cfg'. |
| 14 |
Copy it to the directory '$TFTP_ROOT/d-i/<CODENAME>/', where |
| 15 |
<CODENAME> is the release you want to install: |
| 16 |
|
| 17 |
# mkdir -p /var/lib/tftpboot/d-i/<CODENAME>/ |
| 18 |
# cp /usr/share/doc/di-netboot-assistant/examples/preseed.cfg \ |
| 19 |
/var/lib/tftpboot/d-i/<CODENAME>/ |
| 20 |
|
| 21 |
• Modify it to fit your needs. You might want to modify the |
| 22 |
partitioning and provide another (or no) public key for ssh. The |
| 23 |
user's password provided should be changed after the installation. |
| 24 |
|
| 25 |
• Enable the commented sections in: |
| 26 |
'/etc/di-netboot-assistant/pxelinux.HEAD' and |
| 27 |
'/etc/di-netboot-assistant/grub.cfg.HEAD'. |
| 28 |
Run 'di-netboot-assistant rebuild-menu' to add the new boot entry |
| 29 |
to the PXElinux and grub-efi menus. |
| 30 |
|
| 31 |
• Make sure the TFTP server is resolved as 'installbox' (or modify |
| 32 |
the boot parameter 'url=tftp://installbox' to fit your local |
| 33 |
setup). |
| 34 |
|
| 35 |
• Configure the DHCP server to provide a hostname for the client. |
| 36 |
This hostname will be assigned to the host during installation. |
| 37 |
If you use 'dnsmasq', the latter can be achieved by adding |
| 38 |
corresponding lines in the host's '/etc/hosts' file. |
| 39 |
|
| 40 |
The provided example 'preseed.cfg' configures ssh login for the user |
| 41 |
'ansible' with public key authentication. This allows further |
| 42 |
customization of the system after installation using ansible |
| 43 |
playbooks. |
| 44 |
|
| 45 |
In addition, it shows how to apply a playbook (defined by the |
| 46 |
'playbook=example.yml' boot parameter) already during installation |
| 47 |
with 'ansible-pull'. This allows to add installer boot menu entries |
| 48 |
with different playbooks and choose a profile at install time. |
| 49 |
|
| 50 |
|
| 51 |
[1] <URL:https://wiki.debian.org/DebianInstaller/Preseed> |
| 52 |
[2] <URL:https://www.debian.org/releases/stable/amd64/apb.html.en> |