Bug 195006 - freebsd-update upgrade fails if /var is a tmpfs
Summary: freebsd-update upgrade fails if /var is a tmpfs
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-14 14:23 UTC by olivier
Modified: 2014-11-17 15:24 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 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 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