Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jul 2018 19:01:57 +0300
From:      Lev Serebryakov <lev@FreeBSD.org>
To:        freebsd-embedded@freebsd.org
Subject:   NanoBSD: how to add manual upgrade "approval" / auto roll-back?
Message-ID:  <a4e2a130-eb5f-7cfd-ff43-7897ea8ba75a@FreeBSD.org>

next in thread | raw e-mail | index | archive | help

 I have typical NanoBSD installation: MBR, two code slices, "upgrade"
script which write new FS to inactive slice and swap "active" attribute.

 Here is one problem with this installation: if new "firware" can not
boot, I need to go to console to switch active slice back (to previous,
working, version of "firmware").

 Is it possible to make some mechanism (in loader? I don't think
mbr/boot0 can accommodate this) which switch back active slice if boot
into new version was not successful (not all services started, or kernel
hangs, or network is unavailable), so it will be possible to roll-back
upgrade by simple power cycle, without console access? Very important
point is, that it should work even if kernel failed to load: it could
not be simple start-up script in /usr/local/etc/rc.d. Such script could
be useful to check additional conditions (that network is Ok, for
example)m but it could not be used alone, because it will not wrok if
kernel is failed completely or goes to single-user mode.

 Maybe, here is this feature, but I don't know about it?

-- 
// Lev Serebryakov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a4e2a130-eb5f-7cfd-ff43-7897ea8ba75a>