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

    Duplication constants in boot loader

    General pfSense Questions
    5
    10
    926
    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.
    • UnoptanioU
      Unoptanio
      last edited by

      Good morning,

      I upgraded pfSense from version 2.7.0 to 2.7.1.
      Everything OK.
      Subsequently I went to check if a quirk for the Riello UPS that I had inserted had been kept in the "/boot/loader.conf" file and I realized that several constants had been duplicated.
      Can I delete duplicates at the end of the file?

      afbb16db-7514-4b82-a6eb-a0fd0bf28b8b-image.png

      pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
      CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
      n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

      Sergei_ShablovskyS 1 Reply Last reply Reply Quote 0
      • Sergei_ShablovskyS
        Sergei_Shablovsky @Unoptanio
        last edited by

        @Unoptanio
        I have the same issue.
        Of course, You may delete duplicates.

        Better to delete duplicates in order “from start of file to end” because several constants in loader.conf need to be in right order,- see FreeBSD manuals for this.

        —
        CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
        Help Ukraine to resist, save civilians people’s lives !
        (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

        1 Reply Last reply Reply Quote 1
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          It's a known issue. It's pretty low priority because whilst it's ugly it's also harmless.

          Steve

          Sergei_ShablovskyS 1 Reply Last reply Reply Quote 0
          • jimpJ jimp moved this topic from Problems Installing or Upgrading pfSense Software on
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            @Unoptanio said in Duplication constants in boot loader:

            I had inserted had been kept in the "/boot/loader.conf" file

            Your custom changes should be going in /boot/loader.conf.local and not in loader.conf anyhow:

            https://docs.netgate.com/pfsense/en/latest/config/advanced-tunables.html#managing-loader-tunables

            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!

            UnoptanioU 1 Reply Last reply Reply Quote 3
            • UnoptanioU
              Unoptanio @jimp
              last edited by Unoptanio

              @jimp
              Hello,

              My only customization is the line :
              hw.usb.quirk.0="0x04b4 0x5500 0x0000 0xffff UQ_HID_IGNORE"
              Can I move the line to the file /boot/loader.conf.local ?

              Is it correct if I delete the lines marked with **************** ?

              my /boot/loader.conf :

              kern.cam.boot_delay=10000
              kern.geom.label.disk_ident.enable="0"
              kern.geom.label.gptid.enable="0"
              kern.ipc.nmbclusters="1000000"
              kern.ipc.nmbjumbo9="524288"
              kern.ipc.nmbjumbop="524288"
              opensolaris_load="YES"
              zfs_load="YES"
              opensolaris_load="YES" ****************
              zfs_load="YES" ****************
              kern.cam.boot_delay=10000 ****************
              kern.geom.label.disk_ident.enable="0" ****************
              kern.geom.label.gptid.enable="0" ****************
              kern.ipc.nmbclusters="1000000" ****************
              kern.ipc.nmbjumbo9="524288" ****************
              kern.ipc.nmbjumbop="524288" ****************
              kern.geom.label.disk_ident.enable="0" ****************
              kern.geom.label.gptid.enable="0" ****************
              cryptodev_load="YES"
              zfs_load="YES" ****************
              if_re_load="YES"
              if_re_name="/boot/modules/if_re.ko"
              hw.usb.quirk.0="0x04b4 0x5500 0x0000 0xffff UQ_HID_IGNORE"
              autoboot_delay="3"
              hw.hn.vf_transparent="0"
              hw.hn.use_if_start="1"
              net.link.ifqmaxlen="128"
              machdep.hwpstate_pkg_ctrl="1"
              net.pf.states_hashsize="524288"

              pfSensePlus24.03 2U BareMetal Asrock Industrial IMB-X1314MicroATX
              CPU: i7-13700@5.2GHz, RAM:32GB ECC, n°2 Samsung 870EVO SATA 2.5” SSD 1TB (ZFS) Raid1
              n°3 Intel i225-LM 2500/1000/100Mbps, n°1 NIC Intel i350-T4V2 10/100/1000 Mbps 4*GLAN, n°1 Intel X520-DA2

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

                Do not touch the contents of loader.conf, anything you can do there you can do by editing loader.conf.local instead and the system manages the content of loader.conf automatically. It never needs hand editing. It's all covered in the doc I linked.

                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 1
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Yup, you could remove the duplicated lines but it won't change anything and they will likely be replaced after some reboots anyway. So the safest thing is not to! 😉

                  Just make changes in the .local file.

                  1 Reply Last reply Reply Quote 1
                  • dennypageD
                    dennypage @Unoptanio
                    last edited by

                    @Unoptanio said in Duplication constants in boot loader:

                    My only customization is the line :
                    hw.usb.quirk.0="0x04b4 0x5500 0x0000 0xffff UQ_HID_IGNORE"
                    Can I move the line to the file /boot/loader.conf.local ?

                    I believe the instructions you followed in creating the quirk said that it should be put in /boot/loader.conf.local, yes?

                    1 Reply Last reply Reply Quote 0
                    • Sergei_ShablovskyS
                      Sergei_Shablovsky @stephenw10
                      last edited by Sergei_Shablovsky

                      @stephenw10 said in Duplication constants in boot loader:

                      It's a known issue. It's pretty low priority because whilst it's ugly it's also harmless.

                      Steve

                      If this is known issue (that I see last 4 years, and the same question become again and again) is any difficulties to just make bash/sh/zsh script (and put it in crone) that doing “find and delete duplicate string in loader.conf and the same for loader.conf.local”?

                      For example this one (5min of Googling;) How to remove duplicate lines in a file

                      So:

                      sort -o /boot/loader.conf.local -u /boot/loader.conf.local
                      
                      

                      is not good because BROKE THE LINES ORDER (which is important in loader.conf and loader.conf.local).

                      Or You may finding [this code](Post in thread 'Best Practice Advice - Install script and config variables' https://forums.freebsd.org/threads/best-practice-advice-install-script-and-config-variables.74594/) useful for Your case.

                      Any other suggestion?

                      —
                      CLOSE SKY FOR UKRAINE https://youtu.be/_tU1i8VAdCo !
                      Help Ukraine to resist, save civilians people’s lives !
                      (Take an active part in public protests, push on Your country’s politics, congressmans, mass media, leaders of opinion.)

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        Hmm, as far as I know the order doesn't matter there. Where have you seen that cause a problem?

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