Gentoo Archives: gentoo-dev

From: "Steven J. Long" <slong@××××××××××××××××××.uk>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Re: Re: Re: eselect init
Date: Sat, 08 Jun 2013 13:29:05
Message-Id: 20130608132817.GA7422@rathaus.eclipse.co.uk
In Reply to: Re: [gentoo-dev] Re: Re: eselect init by Luca Barbato
1 On Mon, Jun 03, 2013 at 12:35:29AM +0200, Luca Barbato wrote:
2 > On 06/02/2013 08:20 PM, Steven J. Long wrote:
3 > > On Sun, Jun 02, 2013 at 11:15:37AM +0200, Luca Barbato wrote:
4 > >> On 06/01/2013 11:23 AM, Steven J. Long wrote:
5 > >>> That's not an argument for using a symlink switcher or the
6 > >>> equivalent across the board, by any means.
7 > >>
8 > >> Your opinion.
9 > >
10 > > That's not an argument for it either.
11 >
12 > Had been explained in the thread, please read it.
13
14 ..
15 > Again you should read the whole thread, please do, the whole eselect
16 > init stuff should stay opt-in for the time being so all this discussion
17 > is close to pointless.
18
19 Actually the point is how to implement the best solution in Gentoo, which is
20 the point of this mailing-list. To float ideas and see what other perspectives
21 can contribute to the design. For instance, I think Duncan's idea of a single
22 mode, effectively secondary bootloader, is the only thing that makes any sense.
23
24 It's a Gentoo-specific init-switcher that only runs when the user has initiated
25 a switchover.
26
27 Implementing an init fallback is unneeded, since the kernel tries so many paths
28 already. And Duncan's mail is at least about the interesting, and *useful* part:
29 making the system ready to switch, and a setup for init-system switching as a
30 whole.
31
32 Including write to rootfs, eg to change inittab format.
33
34 > Consider this email a friendly warning, please do not pollute the Gentoo
35 > media with pointless email when you had been already politely told that
36 > your concern had been addressed in the previous email in the thread.
37
38 No you weren't polite. You wrote an email that had zero technical content in
39 it and that was basically just 'ad-hominem' as has been pointed out to me:
40
41 http://www.netbooknews.com/wp-content/2011/07/the-pyramid-of-debate-550x417.jpg
42
43 Review your last email in the context of the above, please.
44
45 > > You're free to work on whatever you want. You just haven't made any
46 > > case for why the rest of the ecosystem should be crippled to allow for a
47 > > use-case that would be better served by an existing, far more robust
48 > > solution.
49 >
50 > Had it been the case we wouldn't had spent some weeks picking our brains
51 > on it.
52
53 Yes because programmers never make mistakes, and humans are so good at separating
54 the woods from the trees..
55
56 > > Then it can be runit or whatever else takes your fancy. You are ignoring
57 > > the point of that paragraph though: someone has to put the install together.
58 > >
59 > > Or it isn't a Gentoo install.
60 >
61 > And you seem to miss the point that all you are telling had been
62 > discussed, taken in consideration and in some part agreed with already...
63
64 Lala. Someone puts the install together: they run (or their script runs):
65 mv /sbin/init /bin/init && mv /sbin/einit || error 'unable to setup init'
66
67 > > Wrt to the first, funnily enough the kernel developers have been here before,
68 > > just like they had with ethN and wlanN. It's a basic requirement for developing
69 > > an OS that you be able to switch init and fallback to other options.
70 >
71 > Again you didn't ready or you forgot. I said already I don't care about
72 > systemd many times, yet you failed to remember that.
73 > My specific use-case would require a trip to single mode and a second
74 > reboot, the way I want to do spares that.
75
76 Actually none of this has got anything to do with systemd, nor did I mention it,
77 so please stop banging on about your feelings about it. They're not relevant to
78 this discussion, since it's init-system agnostic, just like the kernel fallback
79 mechanism is, or there's no point to it.
80
81 > On an EFI-stub only system it would require at least a kernel rebuild or
82 > a trip to the efi shell if available.
83
84 No it wouldn't, see above. And http://marc.info/?l=gentoo-dev&m=136968639518816&w=2
85
86 > > Honestly, my goal is a saving of time so people can focus on making the
87 > > eselect module work properly, and be of real value to an end-user who wants
88 > > to switch init.
89 >
90 > To not make this a waste of time here a summary of the whole thing:
91
92 Ah finally some technical content. Yes, the above was a waste of time, and so
93 was your last email. Just a friendly reminder.
94
95 > - eselect init will be opt-in for the time being, people can be left on
96 > their own tools if the want it
97
98 Yes, but we want a sane and robust implementation in Gentoo, irrespective of
99 who's using it.
100
101 > - the default init will stay sysvinit. Discussion ongoing if is better
102 > to have it installed in a secondary fallback path is open (e.g. /bin/init).
103
104 You mean "use the kernel fallback mechanism"? I'm sure you won't be surprised
105 to hear I think that's a good idea.
106
107 > - I still need to send patches to busybox and sysvinit upstream to add a
108 > command line switch to locate the inittab.
109
110 Sounds good. busybox using the standard location with a non-standard format
111 sounds like a mistake though, at least for the default Gentoo config, where
112 it is supposed to live alongside the normal Linux utils. When the user has
113 a saved-config, it is of course up to them what happens.
114
115 > - people wanting to switch init or enable/disable init addons using
116 > eselect init might have to refer to /sbin/einit or such custom path
117 > (assuming we fail to come to an agreement regarding /bin/init)
118 >
119 > The wrapper in /sbin/init is mostly needed to get to the point of a
120 > clean reboot.
121
122 I think Duncan's idea makes a lot of sense. It'd be easy enough to write the
123 base framework to use sh modules, which users and init-system devs collaborate
124 on, and users maintain effectively over time, by sending in bug-reports and
125 patches. The existing openrc codebase could be used as a starting point.
126
127 > The first time you boot on a new system it is executed picking the new
128 > init and just that.
129 >
130 > For addons such as bootchart2 and e4rat it would do slightly more.
131 >
132 > Assuming upstream doesn't accept custom paths for the inittab, for my
133 > specific usecase I might bake something that would remount r/w and pivot
134 > the inittabs.
135
136 Or build that in as part of the design, as Duncan raised.
137
138 > Anybody willing to do something more extreme could even consider having
139 > /sbin/init as a symlink and have the boot-time configuration switch the
140 > symlink, thus making the whole script run just a single boot per switch.
141 >
142 > Not necessary but surely feasible.
143
144 Many things are doable. Many less are advisable.
145
146 --
147 #friendly-coders -- We're friendly, but we're not /that/ friendly ;-)