"nextboot" for MBR slice?

Lev Serebryakov lev at FreeBSD.org
Sun Jul 29 20:29:37 UTC 2012


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 at FreeBSD.org>



More information about the freebsd-geom mailing list