From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 27 18:57:51 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B111E106564A; Tue, 27 Mar 2012 18:57:51 +0000 (UTC) (envelope-from rank1seeker@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9412F8FC15; Tue, 27 Mar 2012 18:57:50 +0000 (UTC) Received: by bkcjc3 with SMTP id jc3so291879bkc.13 for ; Tue, 27 Mar 2012 11:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:from:to:subject:date:content-type :content-transfer-encoding:in-reply-to:references:x-mailer; bh=8WM8QQLAVIGcFWbRvAxe3B4pix5uA/jworn2rygQsSg=; b=Y8dqy4LyeSKNPuCfTUGRvfGoglG6hbpVlPis+y87Pq+uN5L4bLKismizSwcXjPZenz xuLtQY1P8oEP/UUFRfKIqvDwXKtoDef0Ws4jr3gAQz9LzZrC6+0hBllDtqGNPxKbW6ao 42rSqqCc4R4VxuX0QJ6qsAVtxnWO9SL+7C0f4fpIObCRZNby7WVr7P6+fg2nRRKNWUzD gtt4t96cTcRUQmuWk8VQNtOCZOL5ah3n+KISO5+CfkdjJyQceGdgJdTp3tcRLOe191cU Pr8M55lEJ6QsmRgdeKFQaqHxUKwGuBH+dbMNUjkLdpCkEI1h6Abl8k/VQKBLLmQr7EsV pLdQ== Received: by 10.205.81.3 with SMTP id zw3mr6794099bkb.30.1332874668461; Tue, 27 Mar 2012 11:57:48 -0700 (PDT) Received: from DOMYPC ([82.193.208.173]) by mx.google.com with ESMTPS id o7sm1290419bkw.16.2012.03.27.11.57.41 (version=SSLv3 cipher=OTHER); Tue, 27 Mar 2012 11:57:46 -0700 (PDT) Message-ID: <20120327.185746.474.1@DOMY-PC> From: rank1seeker@gmail.com To: "Chris Rees" , "John Baldwin" , hackers@freebsd.org Date: Tue, 27 Mar 2012 20:57:46 +0200 Content-Type: text/plain; charset="Windows-1250" Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20120325.184917.751.1@DOMY-PC> <201203261018.53717.jhb@freebsd.org> <20120326.181050.391.3@DOMY-PC> X-Mailer: POP Peeper (3.8.1.0) Cc: Subject: Re: Active slice, only for a next boot 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: Tue, 27 Mar 2012 18:57:51 -0000 ----- Original Message -----=0D=0AFrom: Chris Rees = =0D=0ATo: rank1seeker@gmail.com=0D=0ACc: John Baldwin = , hackers@freebsd.org=0D=0ADate: Mon, 26 Mar 2012 = 21:28:07 +0000=0D=0ASubject: Re: Active slice, only for a next = boot=0D=0A=0D=0A> On 26 March 2012 18:10, = wrote:=0D=0A> > ----- Original Message -----=0D=0A> > From: John Baldwin = =0D=0A> > To: freebsd-hackers@freebsd.org=0D=0A> > Cc: = rank1seeker@gmail.com, hackers@freebsd.org=0D=0A> > Date: Mon, 26 Mar = 2012 10:18:53 -0400=0D=0A> > Subject: Re: Active slice, only for a next = boot=0D=0A> >=0D=0A> >> On Sunday, March 25, 2012 2:49:17 pm = rank1seeker@gmail.com wrote:=0D=0A> >> > After having a thought about = this issue and also currently looking at a=0D=0A> >> BootEasy boot = manager ...=0D=0A> >> > 'boot0cfg' is almost perfect for this task and = should/could be "exploited".=0D=0A> >> >=0D=0A> >> > It's '-o noupdate' = already does a major task, of keeping main slice active.=0D=0A> >> > Now = all we need is a flag, through which we specify slice to boot = (replacing=0D=0A> >> human presing button).=0D=0A> >> > From that point = on, existing code simply proceeds with received value.=0D=0A> >> >=0D=0A> = >> > '-o noupdate' ensures next boot will bring up main/active = slice.=0D=0A> >>=0D=0A> >> You mean like 'boot0cfg -s 4'?=0D=0A> = >>=0D=0A> >> --=0D=0A> >> John Baldwin=0D=0A> >>=0D=0A> >=0D=0A> >=0D=0A> = > Yes, but new flag for that purpose ('-n' for example =3D> = nextboot).=0D=0A> >=0D=0A> > I.e;=0D=0A> > =A0 =A0# 'boot0cfg -s 4 -o = noupdate -n 3'=0D=0A> >=0D=0A> > Would, set the default/main boot = selection to slice 4 and =A0'-o noupdate' =A0ensures it remains that way, = while '-n 3' would auto press/choose slice 3 in selection menu, as human = would.=0D=0A> > Well in that case, better to not show menu at all, thus = only "blic" into slice 3.=0D=0A> > At next boot it is at slice 4 = again.=0D=0A> =0D=0A> I'm afraid this sounds like a great way to make a = very confusing=0D=0A> scenario, where you have to reboot twice to be sure = of a consistent=0D=0A> boot sector, unless I've misunderstood you.=0D=0A> = =0D=0A> Chris=0D=0A=0D=0A=0D=0ALet me put it this way.=0D=0A'boot0cfg' = should continue to behave as it does. Exactly in this form, it is a = perfect (almost) solution.=0D=0AThis means that none of it's current flag = shall be edited in terms of functionality, thus preserving backward = compatibility with everthing.=0D=0A=0D=0ASo, on top of all it's code, we = add just a 1 flag which auto selects boot option/slice, as human would = from it's boot menu.=0D=0ASimple as that. We can call that flag:=0D=0A = -n nextboot slice=0D=0Aor maybe=0D=0A -a (auto)answer=0D=0A=0D=0AOn = existing machine with active and booted, i.e; slice 3=0D=0A# 'boot0cfg -n = 1'=0D=0A Would upon next power on, instead showing boot menu, simply = choose slice 3 to boot. Same result as if human would press F3 for slice = 3.=0D=0A=0D=0ANothing more, nothing else. Simple as that.=0D=0AIt's = indirect effect is determined by combination of other already existing = flags, i.e; '-o noupdate'=0D=0A=0D=0AIn above example without '-o = noupdate' it would also make slice 1 active.=0D=0AContrary to that, with = specified '-o noupdate' , it would boot slice 1 only once, preserving = slice 3 as active (all furter boots stick to it)=0D=0A=0D=0AIt is now = clearer?=0D=0A=0D=0A=0D=0ADomagoj Smol=E8i=E6