Free Hosting Online for WorkStations

< Previous | Contents | Next >

A very powerful and flexible option offered by the preconfiguration tools is the ability to run com- mands or scripts at certain points in the installation.

When the filesystem of the target system is mounted, it is available in /target. If an installation CD is used, when it is mounted it is available in /cdrom.


# d-i preseeding is inherently not secure. Nothing in the installer checks

# for attempts at buffer overflows or other exploits of the values of a

# preconfiguration file like this one. Only use preconfiguration files from

# trusted locations! To drive that home, and because it’s generally useful,

# here’s a way to run any shell command you’d like inside the installer,

# automatically.


# This first command is run as early as possible, just after

# preseeding is read.

#d-i preseed/early_command string anna-install some-udeb

# This command is run immediately before the partitioner starts. It may be

# useful to apply dynamic partitioner preseeding that depends on the state

# of the disks (which may not be visible when preseed/early_command runs).

#d-i partman/early_command

# string debconf-set partman-auto/disk "$(list-devices disk | head -n1)"

# This command is run just before the install finishes, but when there is

# still a usable /target directory. You can chroot to /target and use it

# directly, or use the apt-install and in-target commands to easily install

# packages and run commands in the target system.

#d-i preseed/late_command string apt-install zsh; in-target chsh -s /bin/zsh


B.5.2. Using preseeding to change default values

Top OS Cloud Computing at OnWorks: