Project

General

Profile

Actions

Bug #6906

closed

Issues with /tmp and /var in RAM on 2.4

Added by Jim Pingle over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
High
Category:
Package System
Target version:
Start date:
11/09/2016
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.4
Affected Architecture:

Description

I set /tmp and /var to be in RAM on a test box running 2.4 and hit a couple issues:

1. I had two packages installed before switching. After, the packages showed as broken (red text). I had to reinstall them both.

2. On every reboot, the system pauses for input at the console:

Mounting filesystems...
override rwxr-xr-x  root/wheel for /root/var/db/pkg? (y/n [n]) y
mv: rename /var/db/pkg to /root/var/db/pkg: Read-only file system
override rwxr-xr-x  root/wheel for /root/var/cache/pkg? (y/n [n]) y
mv: rename /var/cache/pkg to /root/var/cache/pkg: Read-only file system
Setting up memory disks... done.

If I answer y to both, it continues on and appears to operate OK. Packages show as installed OK.

Setting 'high' because it requires console access to make the system boot.

Actions #1

Updated by Jim Pingle over 7 years ago

Checking deeper, pkg info is empty after switching, which explains why the installed packages showed damaged, but also means the system is in a fairly broken state, upgrade-wise.

Additionally, at bootup this is shown:

pkg: No package(s) matching pfSense-kernel-*

Actions #2

Updated by Jim Pingle over 7 years ago

The prompt when booting appears to be due to the fact that /var was not cleaned out when switching to RAM disk, and the other issue may be related as well.

Forcing an unmount of the /var RAM disk shows there are still files in /var, including the package database. The presence of these files makes it fall into the wrong test in pfSense-rc at boot up and it's attempting to mv a directory when it should not. Specifically, this test is evaluating when it should not be: https://github.com/pfsense/pfsense/blob/master/src/etc/pfSense-rc#L120

Actions #3

Updated by Jim Thompson over 7 years ago

  • Assignee set to Renato Botelho
Actions #4

Updated by Renato Botelho over 7 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

I've used wrong ticket # in commit log. Relevant commits are:

9bf6cdc135ddf108bc08f048687130c09cd09f4b and f09aede6c0f692d93603ad2b3794fe0d78a4cf36

After changes I couldn't reproduce any problems changing it to use or not MFS /var /tmp

Actions #5

Updated by Jim Pingle over 7 years ago

  • Status changed from Feedback to Assigned

On a freshly installed VM I activated the option and when it rebooted, it came up all the way but it shows no packages installed. Rebooting didn't change anything.

When disabling the RAM disk setting, the packages were found again.

Actions #6

Updated by Renato Botelho over 7 years ago

  • Status changed from Assigned to Feedback

The issue was happening on ZFS and should be fixed after b712dd529e2445fc20e983815a80a4e8ea109760

Actions #7

Updated by Jim Pingle over 7 years ago

  • Status changed from Feedback to Resolved

Works fine on two different systems here, thanks!

Actions

Also available in: Atom PDF