From owner-freebsd-geom@FreeBSD.ORG Sun Jul 29 20:29:37 2012 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47E16106566B for ; Sun, 29 Jul 2012 20:29:37 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id 091B58FC1E for ; Sun, 29 Jul 2012 20:29:37 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:9db0:4615:f8f5:e1a7]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 84DED4AC2D for ; Mon, 30 Jul 2012 00:29:35 +0400 (MSK) Date: Mon, 30 Jul 2012 00:29:27 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <803675128.20120730002927@serebryakov.spb.ru> To: freebsd-geom@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: "nextboot" for MBR slice? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jul 2012 20:29:37 -0000 Hello, Freebsd-geom. Is it possible to implement something like "nextboot" for MBR slice? I have typical NanoBSD installation: CF card divided into tow slices (ad1 and ad2), standard boot0 (as "smart" boot0 with partition selection doesn't play well with serial console), each slice contains full NanoBSD installation, current one and previous one. When I need upgrade "firmware" I dd new image on "previous" slice and set active bit in MBR (with gpart set -a active) to it, reboot. It works perfectly when it works. But if new "firmware" is broken (as with latest -CURRENT), I need to perform some non-trivial operations to reset active bit to "previous" slice with "stable" firmware. As this device could not be booted from USB and CF card is in case, secured with several screws, it could be difficult to switch loader back to previous slice, if new one could not be boot even in single-user (fortunately, this time single-user mode worked). Is here any way to switch active MBR slice only for next boot, or instruct boot0 loader in some other way to use specific slice onlt one time? In such case, it will be possible to "commit" all changes after successfull boot with gpart by hands or "rollback" by simple power cycle... -- // Black Lion AKA Lev Serebryakov