Hi, On Mon, Jun 13, 2016 at 10:04:29PM +0200, Holger Wansing wrote: > Joost van Baal-Ilić <joostvb-debian-doc-20160530-1@mdcc.cx> wrote: > > > > Current Debian FAQ in SVN says, in customizing.sgml : > > > > <sect id="booting">Every distribution seems to have a different boot-up > > method. Tell me about Debian's. > > > > <p>Like all Unices, Debian boots up by executing the program <tt>init</tt> > > <footnote>As of this writing, the unstable release for Debian GNU/Linux is > > replacing sysvinit with <prgn/systemd/, a system and service manager for Linux. For > > more information see <url id="https://wiki.debian.org/systemd">.</footnote>. > > The configuration file for <tt>init</tt> (which is <tt>/etc/inittab</tt>) > > specifies that > > > > This is obsolete. > > > > I guess we should update it; and I'm in favor of mentioning e.g. openrc and > > systemd-sysv as alternative ways to boot a Debian system. > > > > > > Some pointers I've found: > > > > https://www.debian.org/devel/tech-ctte#status > > > > 2014-02-11 Bug #727708: The committee decided that the default init system for > > Linux architectures in jessie should be systemd. > > [CTTE #727708] Default init system for Debian > > https://lists.debian.org/debian-devel-announce/2014/02/msg00005.html > > > > 2014-08-01 Bug #746715: The technical committee expects maintainers to continue > > to support the multiple available init systems. > > https://lists.debian.org/debian-devel-announce/2014/08/msg00001.html > > [CTTE #746715] Continuing support for multiple init systems > > > > 2014-11-15 Bug #746578:The committee decided that systemd-shim should be the > > first listed alternative dependency of libpam-systemd instead of systemd-sysv. > > https://lists.debian.org/debian-devel-announce/2014/11/msg00010.html > > [CTTE #746578] libpam-systemd to switch alternate dependency ordering > > > > https://lists.debian.org/debian-devel-announce/2014/11/msg00000.html > > [CTTE #762194] On automatic init system switching on upgrade > > > > > > Thoughts? I am willing to write a draft text. > > I think this change should be done. Thank you Holger. I've now finally comitted some text. I've also used https://bugs.debian.org/#787152 : a nice patch contributed by Alan Lee. I feel some proofreading is needed here. My commit r11725 is attached. Bye, Joost
Index: customizing.sgml =================================================================== --- customizing.sgml (revision 11724) +++ customizing.sgml (working copy) @@ -13,6 +13,7 @@ environment variable. For details, see the manual page <manref name="papersize" section="5">. + <sect id="hardwareaccess">How can I provide access to hardware peripherals, without compromising security? @@ -34,11 +35,13 @@ devices when the system starts; if this happens to the hardware peripherals you are interested in, you will have to adjust the rules at <tt>/etc/udev</tt>. + <sect id="consolefont">How do I load a console font on startup the Debian way? <p>The <package/kbd/ package supports this, edit the <tt>/etc/kbd/config</tt> file. + <sect id="appdefaults">How can I configure an X11 program's application defaults? @@ -48,14 +51,81 @@ marked as configuration files, so their contents will be preserved during upgrades. -<sect id="booting">Every distribution seems to have a different boot-up - method. Tell me about Debian's. -<p>Like all Unices, Debian boots up by executing the program <tt>init</tt> -<footnote>As of this writing, the unstable release for Debian GNU/Linux is -replacing sysvinit with <prgn/systemd/, a system and service manager for Linux. For -more information see <url id="https://wiki.debian.org/systemd">.</footnote>. -The configuration file for <tt>init</tt> (which is <tt>/etc/inittab</tt>) +<sect id="booting">How does a Debian system boot?</sect> + +<p>Like all Unices, Debian boots up by executing the program <tt>init</tt>. +Like most Linux distributions, a default Debian system uses <tt>systemd</tt> as +the init implementation. BTW: traditional System-V style init, and even more, +is supported too, see below. <footnote>In 2014, Debian changed its default +init system from System V init to systemd. Debian 8 "jessie" in april 2015 was +the first release to ship with systemd as default init. Four <url +id='https://www.debian.org/devel/tech-ctte#status' name='decisions'> of the +Debian Technical Committee were involved: + +<url id='https://lists.debian.org/20140211193904.GX24404@rzlab.ucr.edu' +name='Bug #727708'> 2014-02-11: "The committee decided that the default init +system for Linux architectures in jessie should be systemd." + +<url +id='https://lists.debian.org/20140801023630.GF12356@teltox.donarmstrong.com' +name='Bug #746715'> 2014-08-01: "The technical committee expects maintainers to +continue to support the multiple available init systems", and merge reasonable +contributions. + +<url +id='https://lists.debian.org/20141116001628.GO32192@teltox.donarmstrong.com' +name='Bug #746578'> 2014-11-15: "The committee decided that systemd-shim should +be the first listed alternative dependency of libpam-systemd instead of +systemd-sysv." This decision made it easier to keep running a non-systemd +Debian system. + +<url +id='https://lists.debian.org/21592.61064.527547.410074@chiark.greenend.org.uk' +name='Bug #762194'>2017-11-04: "On automatic init system switching on upgrade" + +</footnote> + +<p>Instead of <i>runlevels</i>, as used on traditional +System-V style Unix systems, systemd provides <i>targets</i>. You may check +the default target by the command + + <example>systemctl get-default</example> + +<p>During boot-up, systemd start the services or other targets listed in the +default target file <tt>/lib/systemd/system/default.target</tt>. The files for +these services and targets are installed during Debian package installation. +If you explicitly do not wish to run a packages service during boot-up, instead +of removing the installed package, you can run the command + + <example>systemctl disable <i>package</i>.service</example> + +where <i>package</i>.service is the service file installed in +<tt>/lib/systemd/system</tt>.</p> + +<p>Service file <tt>/lib/systemd/rc.local.service</tt> provides an easy way to +run customized scripts in the file <tt>/etc/rc.local</tt> after boot-up, +similar to what's offered on Debian systems running System-V style init. +Beware: this script will fail if it has interaction to the console such as +asking for a user password or if it tries to clear the screen.</p> + +<p>You can check the status of any service by the command + + <example>systemctl status package.service</example> + +.</p> + +<p>For more information on systemd for Debian, see <nurl +id="https://wiki.debian.org/systemd">. + + +<sect id="sysvinit">And how about Debian and traditional System V init</sect> + + other ways of booting?</sect> + +Debian supports booting using traditional System V init, via the sysvinit-core package. + +The configuration file for System V <tt>init</tt> (which is <tt>/etc/inittab</tt>) specifies that the first script to be executed should be <tt>/etc/init.d/rcS</tt>. This script runs all of the scripts in <tt>/etc/rcS.d/</tt> by forking subprocesses @@ -106,42 +176,18 @@ <p>Note that <prgn/invoke-rc.d/ should not be used to call the <tt>/etc/init.d/</tt> scripts, <prgn/service/ should be used instead. -<sect id="custombootscripts">What other facilities are provided - to customize the boot process besides - <tt>rc.local</tt>? -<p>The <tt>rc.local</tt> script is executed at the end of each multiuser -runlevel. In Debian it is configured to do nothing. This provides -customisation of the boot process, but might not be sufficient -for all situations. +<sect id='altboot'>And are there yet other ways of booting a Debian system?</sect> -<p>Suppose a system needs to execute script <tt>foo</tt> on start-up, -or on entry to a particular (System V) runlevel. Then the system -administrator should: -<list> - <item>Enter the script <tt>foo</tt> into the directory <tt>/etc/init.d/</tt>. - <item>Run the Debian command <tt>update-rc.d</tt> with appropriate - arguments, to specify which runlevels should start the service, and which - runlevels should stop the service. - <item>Consider rebooting the system to check that the service starts - correctly (assuming that you've asked for it to be started in the - default runlevel). Otherwise, manually start it by running - `<tt>/etc/init.d/foo start</tt>'. -</list> +<p>If you do like System V init, but don't like the /etc/rc?.d/* links, you +could install the <package/file-rc/ package. That will convert the links into +one single configuration file /etc/runlevel.conf instead.</p> -<p>One might, for example, cause the script <tt>foo</tt> to execute at -boot-up, by putting it in <tt>/etc/init.d/</tt> and running -<tt>update-rc.d foo defaults 19</tt>. The argument `<tt>defaults</tt>' refers -to the default runlevels, which means (at least in absence of any LSB comment -block to the contrary) to start the service in runlevels 2 through 5, -and to stop the service in runlevels 0, 1 and 6. -(Any LSB Default-Start and Default-Stop directives in <tt>foo</tt> take -precedence when using the sysv-rc version of update-rc.d, but are -ignored by file-rc's variant (v0.8.10 and higher) of update-rc.d.) -The argument `<tt>19</tt>' ensures that <tt>foo</tt> is called after all -scripts whose number is less than 19 have completed, and before all scripts -whose number is 20 or greater. +<p>If you like neither System V nor systemd, you might like <package/openrc/ or +<package/runit/ or <package/daemontools/.</p> + + <sect id="interconffiles">How does the package management system deal with packages that contain configuration files for other packages? Index: debian/changelog =================================================================== --- debian/changelog (revision 11724) +++ debian/changelog (working copy) @@ -11,6 +11,16 @@ been working on this package for 3 years. As requested by Mattia Rizzolo / MIA team. Thanks Mattia. Simon: thanks and please do keep committing! (Closes: #873264) + * 2017-11-30: customizing.sgml: Add section "booting": "How does a Debian system + boot?", with patch with notes on systemd contributed by Alan Lee. Thanks! + Add pointers to relevant 2014 CTTE decisions (The systemd debate). + Rename section "booting": "Every distribution seems to have a different + boot-up method. Tell me about Debian's." to "sysvinit": "And how about + Debian and traditional System V init". Drop section "custombootscripts": + "What other facilities are provided to customize the boot process besides + rc.local?": it is relevant for System V init only and therefore does not + belong here. Add section 'altboot': "And are there yet other ways of booting + a Debian system?" mentioning e.g. openrc. (Closes: #787152) [ Javier Fernández-Sanguino ] * 2017-06-20: ftparchives.sgml: Update releases and names. Update links in
Attachment:
signature.asc
Description: Digital signature