Does my new rc.conf have errors in it?

Yes and I thought the critical setting was bgfsck. You might need to turn off background fsck in certain corner cases.
I don't think half these settings do anything.

Do you have this installed ? The port was last updated in 2013...
sysutils/swapexd


Do you know what this does? What programs require an audio daemon?

We have no idea if your list is sane. We don't know what programs you run.
I accidentally broke my installation of BSD yesterday, but I will consider commenting it out, now that I know a little bit more about it.
 
Code:
cat /var/db/dhclient* | grep -i router

Yes you better remove the defaultrouter line.

I also have IPV6 config,
Code:
ifconfig_em0="DHCP"
ifconfig_em0_ipv6="inet6 accept_rtadv"
ipv6_activate_all_interfaces="YES"
ipv6_privacy="YES"               # Use privacy address on RA-receiving IFs  # (RFC 4941)
rtsold_enable="YES"
ip6addrctl_enable="YES"            # Set to YES to enable default address selection
ip6addrctl_policy="ipv6_prefer"    # Set to YES to enable default address selection
ip6addrctl_verbose="NO" # Set to YES to enable verbose configuration messages

And in sysctl.conf
Code:
net.inet6.ip6.temppltime=7200            # 86400 ,  Maximum preferred lifetime for temporary addresses
net.inet6.ip6.tempvltime=14400           # 604800 , Maximum valid lifetime for temporary addresses
net.inet6.ip6.accept_rtadv=1             #0 Default value of per-interface flag for accepting ICMPv6 RA messages
net.inet6.ip6.fw.enable=1
Will do.
 
Code:
fsck_y_enable="YES"     # Set to YES to do fsck -y if the initial preen fails.
background_fsck="NO"   # Attempt to run fsck in the background where possible.
#background_fsck_delay="60" # Time to wait (seconds) before starting the fsck.
So, it seems as though enabling fsck in rc.conf isn't really that useful, and it would be better to manually run it when the system prompts me to do so. I admit, I have a lot to learn, and I should probably start looking at the Handbook some more.
 
I hope that you don't mind me beating a broken drum here, but it seems like it would probably be a good idea for me to comment out the below lines located in my rc.conf file?

# devfs_system_ruleset="devfsrules_common"
# fsck_enable="YES"
# swapexd_enable="YES"
# defaultrouter="192.168.1.1"
 
Remove

swapexd_enable="YES"
defaultrouter="192.168.1.1"
devfs_system_ruleset="devfsrules_common"

I have
devfs_enable="YES"

Put an fsck line ; for fsck ,chose enable yes ,if you like automatic ; chose enable no , if you like manual.

It can be interesting to have devfs.rules like,
Code:
    link    cd0                cdrom
    link    cd0                dvd
    perm    acd*            0660
    perm    cd*             0660
    perm    da*             0660
    perm    pass*           0660
    perm    xpt*            0660
    perm    uscanner*       0660
    perm    video*          0660
    perm    tuner*          0660
    perm    devstat            0444
    own        /dev/cd0        x:operator
    perm    /dev/cd0        0660
    own     vboxnetctl      root:vboxusers
    perm    vboxnetctl      0660
 
Remove

swapexd_enable="YES"
defaultrouter="192.168.1.1"
devfs_system_ruleset="devfsrules_common"

I have
devfs_enable="YES"

Put an fsck line ; for fsck ,chose enable yes ,if you like automatic ; chose enable no , if you like manual.

It can be interesting to have devfs.rules like,
Code:
    link    cd0                cdrom
    link    cd0                dvd
    perm    acd*            0660
    perm    cd*             0660
    perm    da*             0660
    perm    pass*           0660
    perm    xpt*            0660
    perm    uscanner*       0660
    perm    video*          0660
    perm    tuner*          0660
    perm    devstat            0444
    own        /dev/cd0        x:operator
    perm    /dev/cd0        0660
    own     vboxnetctl      root:vboxusers
    perm    vboxnetctl      0660
So just to be clear, I will add the below line back into my rc.conf file, and then the above rules that you sent me will go into /etc/devfs.rules

Below line I should add back into rc.conf
Code:
devfs_system_ruleset="system"

Sorry to ask so many redundant questions, but I'm still at the beginning of my learning phase.
 
Actually, I'm one of those people who keeps pointlessly playing with software settings until everything is broken, and then I learn by trying to make it bootable again.

Welcome to the club ;)

Actually I find Ventoy a Godsend because it lets you boot various ISOs, but in addition you can create numerous bootable partitions in the remaing space on your device and start them via a Ventoy grub file. Sometimes I have 3, 4 or more FreeBSD partitions. Adding a new installation is as simple as creating a new partition, formating it, mounting, all from an existing partition then extracting base.txz and kernel.txz onto and you can boot straight into it without going through an install process. Takes a few minutes that's all.
 
I find Ventoy a Godsend because it lets you boot various ISOs, but in addition you can create numerous bootable partitions in the remaing space on your device
Aghh....I wish that I would have known about Ventoy earlier. Last year I installed FreeBSD on a spare drive I had lying around, but I screwed things up when I tried to use the same version of Grub which boots my Kubuntu installation. I think that the Freebsd appeared on the menu below Windows and Linux, but when I tried to boot it, nothing. Later I reconfigured the sata cables to make my BSD harddrive the primary harddrive in the boot order, but still nothing. I don't know what happened, but it appears that the version of Grub I had on my system to boot Linux must have somehow wiped out the boot files for FreeBSD, and after that, I just put last years project on hold for a while.
 
Then you need,

cat devfs.rules
Code:
[[CODE]devfsrules_system=10
]
... your config
[/CODE]
Just to make certain that I understand things, if my /etc/rc.conf file contains the below line
Code:
devfsrules_system=10

Then does my /etc/devfs.rules file need to contain information designating it as "10" or am I making this too complicated?
 
So, it seems as though enabling fsck in rc.conf isn't really that useful, and it would be better to manually run it when the system prompts me to do so. I admit, I have a lot to learn, and I should probably start looking at the Handbook some more.

No, you have misunderstood.

fsck always runs at boot-time, regardless of what you set. The variable fsck_enable is just ignored, but it's best to remove cruft like this - if only because it's confusing.
 
No, you have misunderstood.

fsck always runs at boot-time, regardless of what you set. The variable fsck_enable is just ignored, but it's best to remove cruft like this - if only because it's confusing.
No it does not.
If mount is run ,and when the mount is rw , and the filesystem is dirty then, mount will fail.

/etc/rc.d/fsck
Code:
#!/bin/sh
#
#

# PROVIDE: fsck
# REQUIRE: swap
# KEYWORD: nojail

. /etc/rc.subr

name="fsck"
desc="Run file system checks"
start_cmd="fsck_start"
stop_cmd=":"

fsck_start()
{
    if [ "$autoboot" = no ]; then
        echo "Fast boot: skipping disk checks."
    elif [ ! -r /etc/fstab ]; then
        echo "Warning! No /etc/fstab: skipping disk checks."
    elif [ "$autoboot" = yes ]; then
        # During fsck ignore SIGQUIT
        trap : 3

        startmsg "Starting file system checks:"
        # Background fsck can only be run with -p
        if checkyesno background_fsck; then
            fsck -F -p
        else
            fsck ${fsck_flags}
        fi

        err=$?
        if [ ${err} -eq 3 ]; then
            echo "Warning! Some of the devices might not be" \
                "available; retrying"
            root_hold_wait
            startmsg "Restarting file system checks:"
            # Background fsck can only be run with -p
            if checkyesno background_fsck; then
                fsck -F -p
            else
                fsck ${fsck_flags}
            fi
            err=$?
        fi

        case ${err} in
        0)
            ;;
        2)
            stop_boot
            ;;
        4)
            echo "Rebooting..."
            reboot
            echo "Reboot failed; help!"
            stop_boot
            ;;
        8|16)
            if checkyesno fsck_y_enable; then
                echo "File system preen failed, trying fsck -y ${fsck_y_flags}"
                fsck -y ${fsck_y_flags}
                case $? in
                0)
                    ;;
                *)
                echo "Automatic file system check failed; help!"
                    stop_boot
                    ;;
                esac
            else
                echo "Automatic file system check failed; help!"
                stop_boot
            fi
            ;;
        12)
            echo "Boot interrupted."
            stop_boot
            ;;
        130)
            stop_boot
            ;;
        *)
            echo "Unknown error ${err}; help!"
            stop_boot
            ;;
        esac
    fi
}

load_rc_config $name

# doesn't make sense to run in a svcj
fsck_svcj="NO"

run_rc_command "$1"
 
No it does not.
If mount is run ,and when the mount is rw , and the filesystem is dirty then, mount will fail.
If you are booting off UFS, then fsck will run. I didn't say it will do a full scan of anything, but even if it doesn't, it still has to run to check that the appropriate file systems are clean.
 
Indeed but it's preen mode.

fsck -p (preen mode) on filesystems listed in /etc/fstab.
  • If clean: If the "clean" flag is set (meaning the system was shut down properly), fsck performs a very fast check and proceeds immediately.
 
Back
Top