Duplication constants in boot loader
-
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? -
@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.
-
It's a known issue. It's pretty low priority because whilst it's ugly it's also harmless.
Steve
-
J jimp moved this topic from Problems Installing or Upgrading pfSense Software on
-
@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 inloader.conf
anyhow:https://docs.netgate.com/pfsense/en/latest/config/advanced-tunables.html#managing-loader-tunables
-
@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" -
Do not touch the contents of
loader.conf
, anything you can do there you can do by editingloader.conf.local
instead and the system manages the content ofloader.conf
automatically. It never needs hand editing. It's all covered in the doc I linked. -
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.
-
@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?
-
@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?
-
Hmm, as far as I know the order doesn't matter there. Where have you seen that cause a problem?