07.06.2014 Views

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

2 - Raspberry PI Community Projects

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• installing the base system;<br />

• preseeding the Debconf database with fai-debconf;<br />

• fetching the list of available packages for APT;<br />

• installing the packages listed in /fai/package_config/class;<br />

• executing the post-configuration scripts, /fai/scripts/class/[0-9][0-9]*;<br />

• recording the installation logs, unmounting the partitions, and rebooting.<br />

12.3.2. Preseeding Debian-Installer<br />

At the end of the day, the best tool to install Debian systems should logically be the official<br />

Debian installer. This is why, right from its inception, debian-installer has been designed for<br />

automated use, taking advantage of the infrastructure provided by debconf. The latter allows,<br />

on the one hand, to reduce the number of questions asked (hidden questions will use the provided<br />

default answer), and on the other hand, to provide the default answers separately, so that<br />

installation can be non-interactive. This last feature is known as preseeding.<br />

GOING FURTHER<br />

Debconf with a centralized<br />

database<br />

Preseeding allows to provide a set of answers to Debconf questions at installation<br />

time, but these answers are static and do not evolve as time passes.<br />

Since already-installed machines may need upgrading, and new answers may<br />

become required, the /etc/debconf.conf configuration file can be set up so<br />

that Debconf uses external data sources (such as an LDAP directory server,<br />

or a remote file mounted via NFS or Samba). Several external data sources<br />

can be defined at the same time, and they complement one another. The local<br />

database is still used (for read-write access), but the remote databases are<br />

usually restricted to reading. The debconf.conf(5) manual page describes all<br />

the possibilities in detail.<br />

12.3.2.1. Using a Preseed File<br />

There are several places where the installer can get a preseeding file:<br />

• in the initrd used to start the machine; in this case, preseeding happens at the very beginning<br />

of the installation, and all questions can be avoided. The file just needs to be called<br />

preseed.cfg and stored in the initrd root.<br />

• on the boot media (CD or USB key); preseeding then happens as soon as the media is<br />

mounted, which means right after the questions about language and keyboard layout.<br />

The preseed/file boot parameter can be used to indicate the location of the preseeding<br />

file (for instance, /cdrom/preseed.cfg when the installation is done off a CD-ROM, or<br />

/hd-media/preseed.cfg in the USB-key case).<br />

338 The Debian Administrator's Handbook

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!