On Wed, May 29, 2013 at 10:52:49AM +0200, Tom Wijsman wrote
> On Wed, 29 May 2013 00:36:58 +0000 (UTC)
> Duncan <1i5t5.dun...@cox.net> wrote:
> 
> > 3b) Except... at that point root isn't writable
> 
> Let me stop you here. Does it need to be writable at that point?
> 
> We're reading the path of the init file to boot from a file, we start
> the executable at that path; no writes are involved here.
> 
> The only problem left here is that some init systems need a specific
> version of the inittab file, although this can likely be changed in
> late shutdown as the only exception to this approach.

  In order for a different init system to come up, some file(s)
somewhere *MUST* be different, no ifs/ands/ors/buts.  The problem with
an eselect approach is that it's like asking a brain surgeon to operate
on himself.  The proper procedure is to have another brain surgeon
operate on him while the patient is under anesthesia.

> It sounds very feasible for init systems that are an exception to just
> being able to switch init alone or have conflicting files to fix up
> whatever is inconsistent; either by scheduling changes till when the
> disk is writable, or by doing it on shutdown...
> 
> > But it occurred to me that we actually do have a demonstrated
> > workable and long used in actual practice exception to the normal
> > boot case as precedent, where such maintenance tasks traditionally
> > occur, single user mode.
> 
> Iff nothing else is feasible enough, this makes a lot of sense to me.

  There are a couple of other possible approaches...

1) If the 2 systems can achieve peacefull co-existance (i.e. no
identically-named files with different contents) then simply have 2 boot
entries in /etc/lilo.conf (or grub equivalant)...

append = "init=/etc/foo"
append = "init=/etc/bar"

...and select whichever one you want from the boot menu.  This guarantees
a) the system shuts down properly with the old init
b) the system starts up properly with the new init
c) if the new files are incorrect/unbootable, you can simply reboot to
the old version and try to figure out what went wrong

> > [initr* SNIP]
> 
> Having an initr* as a requirement for being able to switch init system
> is maybe a bit too much to ask; same as above, iff nothing else ...

2) We already have such a solution; it's called the Gentoo minimal
install ISO.  If the 2 init systems conflict over identically-named
files, I strongly recommend that the changes be done while booted from a
gentoo minimal install ISO.  This guarantees
a) the system shuts down properly with the old init
b) the system starts up properly with the new init
c) if the new files are incorrect/unbootable, you can simply chroot into
the machine and send pleas for help to the Gentoo user mailing list ;)

-- 
Walter Dnes <waltd...@waltdnes.org>
I don't run "desktop environments"; I run useful applications

Reply via email to