Gentoo Archives: gentoo-dev

From: Tom Wijsman <TomWij@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] eselect init
Date: Sat, 25 May 2013 19:58:00
Message-Id: 20130525215520.77ca8df0@TOMWIJ-GENTOO
In Reply to: Re: [gentoo-dev] eselect init by "J. Roeleveld"
1 On Sat, 25 May 2013 21:09:47 +0200
2 "J. Roeleveld" <joost@××××××××.org> wrote:
3
4 > I was thinking of a "default" option in the "eselect init" part that
5 > would remove "init=/sbin/einit" from the kernel boot parameters.
6
7 With the different boot loaders, it's not easy to do this consistently
8 everywhere; lilo != grub != grub2 != .config with EFI. While you can
9 support all syntaxes around there, you also need to take into account
10 that there are multiple entries and not all entries relate to Gentoo.
11
12 Or in the EFI use case the user may have an entry that explicitly has a
13 different init value or no init value at all. It's also not only about
14 removing init= but also about adding it again. I probably forget
15 crucial details, but you can guess the complexity this brings.
16
17 > Not sure how that would be best achieved as a lot (most?) users will
18 > have more then one boot-option in their grub(2)/lilo config.
19
20 Seems I skipped this paragraph, I've expanded the thoughts behind this
21 above for more completeness; I don't think this should be achieved.
22
23 > I don't have "init=" set on my machines and it seems to
24 > start /sbin/init. So that should be correct.
25
26 Ah yeah, a quick `ps axjf | grep bin/[i]nit` indeed confirms that.
27
28 > +1 for wrapper, from my understanding, symlinks for init-systems
29 > can't be altered on a running system without risking strange
30 > behaviour.
31
32 Exactly...
33
34 # shutdown -h now
35
36 The system is going down for system halt NOW!s/1) (Sat May 25 21:25:41
37 2013): Excess arguments.
38
39 > >> eselect init
40 > >> must keep track of the current active init and make sure the
41 > >> current init configuration is used till the system reboots
42 > >
43 > > When we kick off the right init system at boot, [SNIP]
44 >
45 > With a case-statement in the wrapper script to handle the different
46 > init-systems?
47
48 I think so.
49
50 > How will the stop/start part of services/init-scripts/... be done?
51
52 Not sure what you mean here; if you keep init function the same as the
53 init you boot with, this should continue to work.
54
55 > I am assuming that should be for the user to keep in mind, but will
56 > it be possible to add something that will make init.d-scripts not
57 > work when systemd is running and unit-files not work when systemd is
58 > not running?
59
60 They currently just bail out with bogus errors as far as I am aware.
61
62 # /etc/init.d/ntpd start
63 ntpd | * WARNING: ntpd is already starting
64 # /etc/init.d/ntpd stop
65 ntpd | * ERROR: ntpd stopped by something else
66
67 > From what I understand, the tools for the different init-systems will
68 > end up being installed simultaneously.
69
70 Correct, I don't think it makes sense to switch between things that
71 aren't installed; eselect historically only lists options that are
72 installed, and I think it should be kept this way.
73
74 > >> hooks on reboot are still needed for more complex ones.
75 > >
76 > > Which complex cases would these hooks be needed on?
77 >
78 > I think one of these would be the stopping/starting of services (see
79 > above)
80
81 No, if you keep the init system the same as the one you boot with there
82 should be no problems.
83
84 > [[ Below is my ONLY remark on that, please feel free to mentally
85 > paste it as a response any email trying to explain why it's important
86 > to reduce the boottime ]]
87
88 My intention was not to advocate optimizing boot times; as a kernel
89 maintainer / developer I need to test new releases, run git bisects, do
90 Nouveau reclocking work. I really need this, the average person that
91 keeps his PC running, not so much; I care for it because I can't wait 2
92 minutes, not because I think it's shiny to have such a short boot...
93
94 PS: I'm also a mobile laptop user that no longer has a battery. :/
95
96 --
97 With kind regards,
98
99 Tom Wijsman (TomWij)
100 Gentoo Developer
101
102 E-mail address : TomWij@g.o
103 GPG Public Key : 6D34E57D
104 GPG Fingerprint : C165 AF18 AB4C 400B C3D2 ABF0 95B2 1FCD 6D34 E57D

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] eselect init Alex Xu <alex_y_xu@×××××.ca>
Re: [gentoo-dev] eselect init "J. Roeleveld" <joost@××××××××.org>
Re: [gentoo-dev] eselect init "Michał Górny" <mgorny@g.o>