Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Nanobsd: persistent read-write files?

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 1.7k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      senser
      last edited by

      You know - the read-write parts of the filesystem in the nanobsd version of pfSense is mounted on memory disks.
      I need a file to be writeable from boot to reboot and persistent between reboots.
      Is there some facility implemented in pfSense that I can use for this task?
      Thanks

      We use the mighty pf, we cannot be fooled.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        No, not just for one file. All slices on the CF are kept read-only unless an event requires that they flip to RW, then once that finishes, it goes back to read-only.

        On 2.1 there is an option to keep the filesystems read-write all the time. It would let you do what you want, but it would also defeat the purpose of using NanoBSD for its protection against excessive filesystem writes.

        Depending on your media (if it's flash-based), you could expect failure sooner rather than later.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • S
          senser
          last edited by

          @jimp, I could create the file on every boot but I need /tmp/ and pppoe0 up to create it (it's a whois request). Also, the file is used by pfBlocker so the command needs to run before pfBlocker creates its tables. Can (early)shellcmd do this? Thanks!

          We use the mighty pf, we cannot be fooled.

          1 Reply Last reply Reply Quote 0
          • S
            senser
            last edited by

            Well, I have made a copy of the /etc/rc.backup_dhcpleases.sh and modified it to update/save my file via cron. Done.

            We use the mighty pf, we cannot be fooled.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.