Bug 195006

Summary: freebsd-update upgrade fails if /var is a tmpfs
Product: Base System Reporter: olivier
Component: binAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: feld
Priority: ---    
Version: 10.0-RELEASE   
Hardware: Any   
OS: Any   

Description olivier 2014-11-14 14:23:32 UTC
If /var is a tmpfs, using a simple "freebsd-update -r X.Y upgrade" will fails.
It will correctly fetch and install the kernel, then ask for reboot and entering "freebsd-update install", but after the reboot, the "freebsd-update install" will say "No updates are available to install" and stuck user with a new kernel but old userland.
=> There should have a check to be added for checking if the temporary directory used by freebsd-update is on a RAM disk (tmpfs, md, etc…)
Comment 1 Mark Felder freebsd_committer freebsd_triage 2014-11-14 16:42:38 UTC
I put up an attempt at solving this, but have no idea if anyone really wants to attempt this protection:

https://reviews.freebsd.org/D1163
Comment 2 commit-hook freebsd_committer freebsd_triage 2014-11-17 15:13:43 UTC
A commit references this bug:

Author: feld
Date: Mon Nov 17 15:12:47 UTC 2014
New revision: 274630
URL: https://svnweb.freebsd.org/changeset/base/274630

Log:
  Add logic for detecting non-persistent filesystems being utilized by
  workdir which would break the upgrade process upon reboot.

  Currently we check for tmpfs and mdmfs.

  PR:		195006
  Differential Revision:	https://reviews.freebsd.org/D1163
  Approved by:	cperciva

Changes:
  head/usr.sbin/freebsd-update/freebsd-update.sh