Automated installations in Skolelinux
using debian-installer and base-config
Skolelinux is a Debian-based Linux distribution with simple
installation and preconfigured services targeted for schools.
The presentation will present how the standard debian
installation system is customised for this purpose.
Petter Reinholdtsen
pere@hungry.com
Debconf3, 2003-07-20
Skolelinux
- Based on Debian/Woody (to get security updates)
- Simple installation
- Translated to several local languages
- Includes all the software needed in primary schools
- Preconfigured services (syslog, dns, ntp, dhcp, ssh, ldap,
nfs, smb, smtp, imap, ipp, http, web-proxy, ltsp and more)
- No license administration
- Admin friendly
- Scalable
The Skolelinux architecture
The skolelinux install
- Simple (two questions and the root password)
- Automatic
- Using debian-installer (d-i) and base-config (b-c)
- Complete (everything work out of the box)
- Very little skolelinux-specific code (two udebs and three
config packages).
- Rewriting the config of other packages to get the services
preconfigured out of the box (against policy?)
The two stages of the Debian installation
First stage (debian-installer)
- Booting from cd/floppy/net/whatever
- Installing base system
- Making HD bootable
Second stage stage (base-config)
- Booting from HD
- Installing and configuring the non-base system
The first stage (debian-installer)
- Modular
- Extendible
- Using debconf to ask questions
- Can be mostly automatic
- Very Flexible
debian-installer structure
- Selector for installer modules (udebs)
- Select language and region
- Autodetect hardware
- Locate APT source (CD, Net or floppy)
- Load the rest of the installer modules
- Partition hard-drive
- Make filesystems or swap
- Mount filesystems
- Install base system
- Install kernel
- Install boot loader
- Reboot
debian-installer hooks
- Include or exclude d-i modules
- Running script at install system boot time
- Include or excluding packages going into the HD
- Running scripts before reboot from HD
- Partitioning
The second stage (base-config)
- Executed from init on first boot
- Modular (reading /usr/lib/base-config)
- Able to adjust the order of the scripts on the fly using
return codes.
- Partly using debconf for configuration decisions.
base-config structure
- Generate locale if needed
- Start terminal emulator (for non-ascii installs) if needed
- Load variables based from first stage (/root/dbootstrap_settings)
- Turn off screen saver
- Show intro screen
- Set up console keyboard
- Set up time zone
- Configure /etc/passwd, root password and local user
- Enable ppp?
- Configure APT sources
- Select packages to install
- Fetch packages
- Configure exim
- Disable ppp?
- Show "successful install" screen
- Rewrite /etc/inittab to not start base-config on next boot
base-config hooks
- add scripts to /usr/lib/base-config/
- update debconf database
Skolelinux specific code
First stage
- Ask about profile with automatic partitioning
- Reorder d-i module order using dependencies and menu-item value
- Install extra packages into the HD
- Pass info to second stage
Second stage
- Preload debconf answers based on profile question
- Automatically install packages
- Rewrite/replace config files
- Restart servers (except kdm)
- Check installation
- Restart kdm
Some solved problems
- Preloading debconf answers need a dummy question template
- Packages with insufficient install configuration support
get their config files rewritten using cfengine.
- Selecting packages to install using meta-packages.
-
Conclusion
- The current debian-installer is extendible and can do
automated installation, with the hooks needed by Skolelinux.
- The current base-config is is flexible enough for
Skolelinux, but could use more hooks to reduce the amount of
Skolelinux specific code.
References
Thank you very much
Questions?
This presentation is available from
http://www.hungry.com/~pere/mypapers/debconf-install/debconf-install.html