Issues with /tmp and /var in RAM on 2.4
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.
#1 Updated by Jim Pingle 8 months ago
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-*
#2 Updated by Jim Pingle 8 months 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
#4 Updated by Renato Botelho 6 months ago
- Status changed from New to Feedback
- % Done changed from 0 to 100
#5 Updated by Jim Pingle 6 months 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.