From owner-freebsd-hackers@FreeBSD.ORG Fri May 27 18:40:52 2011 Return-Path: Delivered-To: hackers@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A1D01065679 for ; Fri, 27 May 2011 18:40:52 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 570778FC49 for ; Fri, 27 May 2011 18:40:52 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p4RIZqV4057413 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Fri, 27 May 2011 12:35:53 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Fri, 27 May 2011 12:35:46 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20110527.124553.718.1@DEV> <20110527134754.GA94769@freebsd.org> <20110527.164723.750.2@DEV> To: utisoft@gmail.com X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Fri, 27 May 2011 12:35:53 -0600 (MDT) Cc: rank1seeker@gmail.com, hackers@FreeBSD.ORG 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: Fri, 27 May 2011 18:40:52 -0000 On May 27, 2011, at 11:21 AM, Chris Rees wrote: > On 27 May 2011 17:47, wrote: >>=20 >> ----- Original Message ----- >> From: Alexander Best >> To: rank1seeker@gmail.com >> Cc: hackers@freebsd.org >> Date: Fri, 27 May 2011 13:47:54 +0000 >> Subject: Re: Active slice, only for a next boot >>=20 >>> On Fri May 27 11, rank1seeker@gmail.com wrote: >>>> Idea is ... >>>> I have i.e; 3 slices, of which first is active. >>>> Now I wana set slice 2 active, but only for a one/next boot. >>>> Once slice 2 is booted and system is shutdown or rebooted, once = again, >> first slice is active and booted, without user's intervention. >>>>=20 >>>> Is this possible or should be implemented? >>>=20 >>> take a look at the gpart(8) manual, expecially the ATTRIBUTES = section. > if >> you >>> are running with a GPT scheme you can use the "bootonce" attribute = to do >>> exactly what you asked for. >>>=20 >>> cheers. >>> alex >>>=20 >>=20 >> Thanls, but I need it for MBR. >>=20 >> Domagoj S. >=20 > MBR has only a one-bit wide field for active status. You'll need logic = in > the first boot to change the flag, perhaps an fdisk statement. I should have said You can create scripts that keeps state in /, or unconditionally = switches back. gpart works with mbr partitions, but it would have to be = cooperative with the thing booted... Warner=