]> pere.pagekite.me Git - homepage.git/blob - mypapers/debconf-install/debconf-install.html
Generated.
[homepage.git] / mypapers / debconf-install / debconf-install.html
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <link rel="stylesheet" href="../mrtg-td/slides.css" type="text/css">
5 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
6 <meta name="Language" content="en">
7 <meta name="Author" content="Petter Reinholdtsen">
8 </head>
9 <body>
10
11 <h1>Automated installations in Skolelinux
12 <br>using debian-installer and base-config</h1>
13
14 <p>Skolelinux is a Debian-based Linux distribution with simple
15 installation and preconfigured services targeted for schools.
16 The presentation will present how the standard debian
17 installation system is customised for this purpose.</p>
18
19 <p><tt><a href="http://www.hungry.com/~pere/mypapers/debconf-install/debconf-install.html">http://www.hungry.com/~pere/mypapers/debconf-install/debconf-install.html</a></tt></p>
20
21 <div class="presenter">Petter Reinholdtsen
22 <br>pere@hungry.com
23 <br>Debconf3, 2003-07-20</div>
24
25 <h2>Skolelinux</h2>
26 <ul>
27 <li>Based on Debian/Woody (to get security updates)
28 <li>Simple installation
29
30 <li>Translated to several local languages
31 <li>Includes all the software needed in primary schools
32
33 <li>Preconfigured services (syslog, dns, ntp, dhcp, ssh, ldap,
34 nfs, smb, smtp, imap, ipp, http, web-proxy, ltsp and more)
35
36 <li>No license administration
37 <li>Admin friendly
38 <li>Scalable
39 </ul>
40
41 <h2>The Skolelinux architecture</h2>
42
43 <p><img src="http://developer.skolelinux.no/arkitektur/network-arch_en.jpg">
44
45 <h2>The skolelinux install</h2>
46 <ul>
47 <li>Simple (two questions and the root password)
48 <li>Automatic
49 <li>Using debian-installer (d-i) and base-config (b-c)
50 <li>Complete (everything work out of the box)
51 <li>Very little skolelinux-specific code (two udebs and three
52 config packages).
53 <li>Rewriting the config of other packages to get the services
54 preconfigured out of the box (against policy?)
55
56 </ul>
57
58 <h2>The two stages of the Debian installation</h2>
59 <h3>First stage (debian-installer)</h3>
60 <ul>
61 <li>Booting from cd/floppy/net/whatever
62 <li>Installing base system
63 <li>Making HD bootable
64 </ul>
65 <h3>Second stage stage (base-config)</h3>
66 <ul>
67 <li>Booting from HD
68 <li>Installing and configuring the non-base system
69 </ul>
70
71 <h2>The first stage (debian-installer)</h2>
72 <ul>
73 <li>Modular
74 <li>Extendible
75 <li>Using debconf to ask questions
76 <li>Can be mostly automatic
77 <li>Very Flexible
78 </ul>
79
80 <h2>debian-installer structure</h2>
81 <ul>
82 <li>Selector for installer modules (udebs)
83 <li>Select language and region
84 <li>Autodetect hardware
85 <li>Locate APT source (CD, Net or floppy)
86 <li>Load the rest of the installer modules
87 <li>Partition hard-drive
88 <li>Make filesystems or swap
89 <li>Mount filesystems
90 <li>Install base system
91 <li>Install kernel
92 <li>Install boot loader
93 <li>Reboot
94 </ul>
95
96 <h2>debian-installer hooks</h2>
97 <ul>
98 <li>Include or exclude d-i modules
99 <li>Running script at install system boot time
100 <li>Include or excluding packages going into the HD
101 <li>Running scripts before reboot from HD
102 <li>Partitioning
103 </ul>
104
105 <h2>The second stage (base-config)</h2>
106 <ul>
107 <li>Executed from init on first boot
108 <li>Modular (reading /usr/lib/base-config)
109 <li>Able to adjust the order of the scripts on the fly using
110 return codes.
111 <li>Partly using debconf for configuration decisions.
112 </ul>
113
114 <h2>base-config structure</h2>
115 <ul>
116 <li>Generate locale if needed
117 <li>Start terminal emulator (for non-ascii installs) if needed
118 <li>Load variables based from first stage (/root/dbootstrap_settings)
119 <li>Turn off screen saver
120 <li>Show intro screen
121 <li>Set up console keyboard
122 <li>Set up time zone
123 <li>Configure /etc/passwd, root password and local user
124 <li>Enable ppp?
125 <li>Configure APT sources
126 <li>Select packages to install
127 <li>Fetch packages
128 <li>Configure exim
129 <li>Disable ppp?
130 <li>Show "successful install" screen
131 <li>Rewrite /etc/inittab to not start base-config on next boot
132 </ul>
133
134 <h2>base-config hooks</h2>
135 <ul>
136 <li>Add scripts to /usr/lib/base-config/
137 <li>Update debconf database
138 </ul>
139 </ul>
140
141 <h2>Skolelinux specific code</h2>
142 <h3>First stage</h3>
143 <ul>
144 <li>Shorter language list
145 <li>Set debconf priority limit to high to get automatic install
146 <li>Ask about profile and do automatic partitioning for this
147 profile
148 <li>Reorder d-i module order using dependencies and menu-item value
149 <li>Install extra packages into the HD
150 <li>Pass info to second stage using /root/dbootstrap_settings
151 and /etc/skolelinux/config
152 </ul>
153 <h3>Second stage</h3>
154 <ul>
155 <li>Set debconf frontend to non-interactive (most of the time)
156 <li>Preload debconf answers based on profile choice
157 <li>Automatically install packages for the given profiles
158 <li>Rewrite/replace config files based on profile and language
159 <li>Configure XFree86
160 <li>Restart servers (except kdm)
161 <li>Check installation
162 <li>Restart kdm
163 </ul>
164
165 <h2>Some solved problems</h2>
166 <ul>
167
168 <li>Preloading debconf answers need a dummy question template
169
170 <li>Packages with insufficient install configuration support
171 get their config files rewritten using cfengine.
172
173 <li>Selecting packages to install using meta-packages.
174
175 </ul>
176
177 <h2>Conclusion</h2>
178
179 <ul>
180 <li>The current debian-installer is extendible and can do
181 automated installation, with the hooks needed by Skolelinux.
182
183 <li>The current base-config is is flexible enough for
184 Skolelinux, but could use more hooks to reduce the amount of
185 Skolelinux specific code.
186 </ul>
187
188 <h2>References</h2>
189
190 <ul>
191
192 <li><a href="http://www.skolelinux.no/">Skolelinux web site</a>
193 <li><a href="http://developer.skolelinux.no/">Skolelinux
194 developers web site</a>
195 <li><a href="http://developer.skolelinux.no/arkitektur/arkitektur.html.en">The Skolelinux architeture description</a>
196 <li><a href="http://people.debian.org/~pere/debian-installer/">debian-installer web page</a>
197 <li><a href="http://people.debian.org/~pere/debian-installer/hooks.html">Available hooks in debian-installer</a>
198 </ul>
199
200 <h2>Thank you very much</h2>
201
202 <h3>Questions?</h3>
203
204 </body>
205 </html>