From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 179241381F3 for ; Wed, 29 May 2013 18:16:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9B80FE0A6B; Wed, 29 May 2013 18:15:59 +0000 (UTC) Received: from ironport2-out.teksavvy.com (ironport2-out.teksavvy.com [206.248.154.182]) by pigeon.gentoo.org (Postfix) with ESMTP id BD7E1E0A45 for ; Wed, 29 May 2013 18:15:58 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av8EABK/CFFFxKuj/2dsb2JhbABEvw4Xc4IeAQEEATocGBALCxgJExIPBSU3G4dwBsEtjWGCSGEDjX6EXIMyhX6IcIFegxM X-IPAS-Result: Av8EABK/CFFFxKuj/2dsb2JhbABEvw4Xc4IeAQEEATocGBALCxgJExIPBSU3G4dwBsEtjWGCSGEDjX6EXIMyhX6IcIFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="15107583" Received: from 69-196-171-163.dsl.teksavvy.com (HELO waltdnes.org) ([69.196.171.163]) by ironport2-out.teksavvy.com with SMTP; 29 May 2013 14:15:50 -0400 Received: by waltdnes.org (sSMTP sendmail emulation); Wed, 29 May 2013 14:15:54 -0400 From: "Walter Dnes" Date: Wed, 29 May 2013 14:15:54 -0400 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] Re: Switchup-mode and boottime selector? Was: eselect init Message-ID: <20130529181554.GB23135@waltdnes.org> References: <51A1DC0C.2070706@gentoo.org> <20130526125742.4584d094@gentoo.org> <51A1F493.90101@gentoo.org> <51A22310.70202@gentoo.org> <20130527224021.GA18963@waltdnes.org> <20130528135619.44259b60@TOMWIJ-GENTOO> <20130529105249.433e57f0@TOMWIJ-GENTOO> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130529105249.433e57f0@TOMWIJ-GENTOO> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: a21e1b3c-800f-407b-83c2-acbca8593726 X-Archives-Hash: bfbb2da76c69a72e19af11575ee673cf 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.duncan@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 I don't run "desktop environments"; I run useful applications