config.xml corrupting itself
-
I have a standard configuration i want to be loading on to many NG1100 routers.
I set up one router how i wanted. Took a backup of it. And restored that backup onto the next one. It will boot up fine once. The next time it boots up though and i watch the boot up using 'screen' it says config.xml is corrupted.Why does this become corrupt? Can I not just restore a backup with the settings I'd like and be OK? Do i need to replace the config.xml with my config.xml?
-
@taylor_wright2022 As we've discussed in our TAC ticket that you filed it's typically caused by shutting the machine down by pulling the power from the back of the device before telling it to halt.
https://docs.netgate.com/pfsense/en/latest/diagnostics/system-halt.htmlIt's possible that running the fsck commands outlined at https://docs.netgate.com/pfsense/en/latest/troubleshooting/filesystem-check.html#manual-filesystem-check may result in your system booting properly without doing these steps.
But it is highly discouraged for the very experiences you are having to not simply pull the plug from the device.
-
@taylor_wright2022 said in config.xml corrupting itself:
Why does this become corrupt?
"pfSense" is not like most other "small boxes with a lot of plugs" : it uses a real 'hard disk or comparable SSD", lots of RAM, an OS like what's used on your PC device.
These system use a complex file systems.
Take you PC : how do you shut it down ? By ripping out the power ? You shouldn't do that, as it will complain the next time you boot. Do this several time, and you lose all the data on the disk data, and you'll be good for a complete re install.
Even if pfSense is a small box, treat is seriously, and even give an UPS.
To shut it down, use the GUI menu option, or a console/SSH command.Btw : classic SOHO routers firewall store very few information in non volatile RAM, use no 'drives' and run their code out of ROM. These devices can survive power ripping just fine.
-
@gertjan This is what the support team informed me as well. Which i understand and can start using halt system prior. However it still seems odd to me. I've been using Edge Routers which, not BSD, but do us their own OS and unpugging the power from them hasn't ever caused an issue.
-
For it to happen repeatedly like that and damage the config file everytime you would have to be removing the power during the config write. So maybe pulling the power immediately after clicking save on something each time? Is that possible?
Either way you should always halt the system properly before unplugging it if you can.
Steve