Packages are not automatically reinstalled when restoring configuration using the installer
pfSense does not install the configured packages during the first boot after installation if the first documented method of restoring the configuration is used (/conf/config.xml present during installation). It works with the second method (/config/config.xml present at first boot).
In the failing case, the boot process does not print a message about reinstalling packages. Instead, it reports the (absent) packages as successfully started:
Starting package Zabbix Agent 5.2...done.
Starting package Shellcmd...done.
The system.log contains these lines near the end:
Jul 4 18:54:09 hostname php-fpm350: /rc.start_packages: Restarting/Starting all packages.
Jul 4 18:54:09 hostname php-fpm350: /rc.start_packages: The Zabbix Agent 5.2 package is missing its configuration file and must be reinstalled.
Jul 4 18:54:09 hostname check_reload_status389: Syncing firewall
Jul 4 18:54:09 hostname root21926: /etc/rc.d/hostid: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one
Jul 4 18:54:11 hostname php-fpm350: /rc.start_packages: The Shellcmd package is missing its configuration file and must be reinstalled.
Jul 4 18:54:11 hostname check_reload_status389: Syncing firewall
Jul 4 18:54:11 hostname root85049: Bootup complete
Jul 4 18:54:17 hostname pkg-static20951: pfSense-repo upgraded: 2.5.1 -> 2.5.1_2
pfSense is 2.5.1-RELEASE, the amd64 memstick-serial image.
Updated by Christian Ullrich 11 months ago
Actually, the documentation mentions automatic package reinstallation only for the ECL method, and that is what works for me. If this is working as designed, please pardon the noise.
However, I'm certain that it worked with the other method in the past, too. Didn't it?
Updated by Christian Ullrich 11 months ago
Jim Pingle wrote:
Which methods were you testing? Was it loading a config from USB during the installation, or using the "Recover config.xml" choice? Or both?
I'm not concerned about restoring a configuration via the web interface right now; I don't know whether that works.
Regarding the two ways of installing a configuration in the context of installing pfSense, what I found is this:
- If I install with a /conf/config.xml on a second USB memory, this configuration is copied during installation and used on the first reboot. The packages this configuration contains do not get installed, but are reported as successfully started; see above.
- If I install with a /config/config.xml on a second USB memory, this configuration is copied during the first reboot and the packages are installed and started.
Updated by Jim Pingle 10 months ago
- Status changed from New to Confirmed
- Target version set to 2.6.0
- Plus Target Version set to 21.09
- Affected Version changed from 2.5.1 to 2.5.2
Looks like the base system moved to using
/cf/conf/needs_package_sync for the flag file a while back in 10511c3b024620f094146e58acf1ed2f4ea9fa41 but the code in
usr.sbin/bsdinstall/scripts/auto in the FreeBSD-src repo is still using the old name
That path is the same for both "Recover config.xml" and for the case where the config is on a DOS partition during install.
Updated by Chris Linstruth 4 months ago
Existing 2.6.0 CE KVM/Proxmox Node.
Reinstalled ZFS using pfSense-CE-2.6.0-RC-amd64-20220117-2310.iso, Recovering config.xml.
Configuration properly reinstalled when restarted.
But packages did not reinstall. I got these alerts instead:
SSH KeyGen pfSense has started creating missing SSH keys. SSH Startup will be delayed. Please note that reloading the filter rules and changes will be delayed until this operation is completed. @ 2022-01-19 15:33:36 SSH Startup pfSense has completed creating your SSH keys. SSH is now started. @ 2022-01-19 15:33:40 General Package acme does not exist in current pfSense version and it has been removed. @ 2022-01-19 15:34:14 Package frr does not exist in current pfSense version and it has been removed. @ 2022-01-19 15:34:15 Package Cron does not exist in current pfSense version and it has been removed. @ 2022-01-19 15:34:16 Package pfBlockerNG-devel does not exist in current pfSense version and it has been removed. @ 2022-01-19 15:34:17 Package reinstall process finished successfully @ 2022-01-19 15:34:18
No packages were reinstalled. Packages show under "Available Packages."