From owner-freebsd-hackers@FreeBSD.ORG Sat Apr 16 14:29:56 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5917B106564A for ; Sat, 16 Apr 2011 14:29:56 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id DE3E58FC08 for ; Sat, 16 Apr 2011 14:29:55 +0000 (UTC) Received: by wwc33 with SMTP id 33so4071958wwc.31 for ; Sat, 16 Apr 2011 07:29:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:subject:date:in-reply-to :references:x-mailer; bh=w++y6+OGYbWYeDeQBTHJ8+cIP+ig9z/RJwXfgm4pTnE=; b=gx/bdW1Yukr/lruagyZmxByk9EujYZUR1XNE0Bn+Eb8Nyv8ZspEZDjBd64Hg1MaKVl 6EXzl2DO+mwF9BBGY8sDtU6EguZYxt6oE5dUOQpdeGGhXr2nB3roxVyTGclZhGYYmkhp 2J94UOBZxss94VZgtgW9e8z4Ywh10VeGHEb2Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:subject:date:in-reply-to:references:x-mailer; b=ptbjfpEt7rVGzy3qcxZrr9Go+/ZVhY1XNQzPFZaQ5U+I3ZmmiHu4s4zJP+jvwU0bGq 3DDZygcL9BYO7hNTvALj31AR6r7o5lR6JtdrMo485N8SOPih0Q3aL0QTJRCnK5EkTkQi 6HifNQa0wdRX2u4lQzrMwfva10w+FZnXyUK0M= Received: by 10.216.24.92 with SMTP id w70mr697442wew.43.1302964194807; Sat, 16 Apr 2011 07:29:54 -0700 (PDT) Received: from DEV ([82.193.208.173]) by mx.google.com with ESMTPS id s40sm1759224weq.28.2011.04.16.07.29.50 (version=SSLv3 cipher=OTHER); Sat, 16 Apr 2011 07:29:53 -0700 (PDT) Message-ID: <20110416.142444.546.5@DEV> From: rank1seeker@gmail.com To: freebsd-hackers@freebsd.org Date: Sat, 16 Apr 2011 16:24:44 +0200 In-Reply-To: References: <20110415.150349.671.1@DEV> <22B12EE4-AE7B-49F7-B6BA-3FE7F967F508@gsoft.com.au> <20110415.154921.875.2@DEV> <20110415.171211.343.3@DEV> <6F20BB76-0D6A-4AB5-99DF-15954D8C2C9D@gsoft.com.au> <20110416.111455.390.4@DEV> X-Mailer: POP Peeper (3.7.0.0) Subject: Re: Add SUM sysctl X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Apr 2011 14:29:56 -0000 > Yes, because there is no concept of single user mode to the kernel. That's why there is no sysctl for it. I've already accepted that as a fact, so let's not pull that cat, with rope, around, ...anymore. > > I truly prefer focusing on a goal and finding a way of achieving it. > > Your question is just an open road for an endless chater, with many new > > roads, for splitting into endless subchaters ... > > > > I wana create an sh function, which returns 0 if sys is in SUM or return 1 > > if in MUM. > > Then I can use that function, wherever I want. > > > > I.e; (I CAN NOT BELIEVE I AM TYPING SO MUCH!) > > Get used to it, > > > If I use geli encryption AND I am upgrading from 8.2 to 8.3, then upon > > rebuild of whole system, I must install kernel and world in a ONE SHOT! > > (Just a rebuild of a same version of OS doesn't require this) > > So I need to drop into SUM and install kernel and world, NOT regulary > > install kernel, then reboot into SUM and then install world! > > This is just a one scenario ... > > Now that does it! > > Do you know, or not, what should I look for, to prove that I am in SUM? (As > > human I know when I am in SUM, as I initiate it, but scripts are retards, > > so they need it, not me ...) > > Simple as that. > > I think you're looking at it the wrong way. > It isn't that being in multi user mode causes a problem as such, it's because something happens when you run /etc/rc which causes the problem. > > Your example doesn't say why you need to be in single user mode when using geli.. The only reason you need to be in single user mode during an upgrade is so that running programs don't find libraries ripped out from under them and then they crash. > > In that case you don't need to reboot into single user mode, you just make sure there aren't any non-kernel processes (besides sh) which are running. I know all this!!! I KNEW chatter would start to go this way! After compilation of kernel and world in MUM, kernel is installed in MUM, but to install world, we reboot into SUM, then install world. (HANDBOOK) Now, in case of GELI usage AND if upgrading is taking place, i.e; 8.2 -> 8.3, once you reboot into SUM to install world, you are doomed, BECAUSE ... Kernel will bitch (GELI part), about world->kernel mismatch and you won't be able to install world as you cant decrypt geom providers!! The only way to save yourself in that case is to restore /boot/kernel.old, or one is doomed. So that is way, they both need to be installed in SUM, in one shot! Kernel then world! But this is just a ONE example, of usage of THAT function! Next time it won't be GELI case but something else. And now I brag about encryption, compilation of world and kernel, bla, bla..., what is NOT a subject, of this "thread" DO YOU KNOW, what to look for, in sys that will indicate to my function, that it is in SUM? Domagoj S.