Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2012 00:29:27 +0400
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        freebsd-geom@freebsd.org
Subject:   "nextboot" for MBR slice?
Message-ID:  <803675128.20120730002927@serebryakov.spb.ru>

next in thread | raw e-mail | index | archive | help
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 <lev@FreeBSD.org>




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?803675128.20120730002927>