# warning: error reading file /boot/loader.conf



## Freakbeat (Mar 20, 2018)

Hi All,

I ran FreeBSD 12 in a Rpi3 but I'm getting this error at boot time:


```
warning: error reading file /boot/loader.conf
```

At first boot, I didn't see loader.conf under /boot but I created it and add a some modules but looks like is not reading the file.

any clue?

Thanks


----------



## ShelLuser (Mar 20, 2018)

Could be anything. FreeBSD 12-CURRENT is a developer snapshot which means that there are no guarantees that it'll even run at all.


----------



## cattleman (Mar 20, 2018)

Freakbeat said:


> any clue?



Lets work the problem together. Firstly, did this error show up when there wasn't a /boot/loader.conf file?

Can you post your loader.conf file to the forum so that its contents can be validated? An error reading the file could be as straight-forward as a typo.

Moving into slightly more advanced territory: being a Raspberry Pi, is the /boot filesystem mounted? I vaguely recall these having a msdos filesystem that gets mounted as /boot, but is unmounted (noauto) on boot by default. So, does the file exist on that filesystem, or on the root filesystem?


----------



## Freakbeat (Mar 20, 2018)

Hi there,

I got the same message error that it couldn't read loader.conf, after I created the file still getting the same message at boot. For reference, I used this image FreeBSD-12.0-CURRENT-arm64-aarch64-RPI3-20180315-r331001.img.xz but not sure if I can use another one.

on the loader.conf I got only this:


```
if_rtwn_usb_load="YES"
```

I wanted to try a wireless card.

Where do I need to check if /boot is mounted? on the fstab file?


----------



## SirDice (Mar 20, 2018)

Topics about unsupported FreeBSD versions


----------



## Freakbeat (Mar 20, 2018)

Hi SirDice, I will try the mailing list.

Thanks


----------



## cattleman (Mar 20, 2018)

Freakbeat said:


> Where do I need to check if /boot is mounted? on the fstab file?


Running `mount` will show you what is mounted and where.


----------



## Freakbeat (Mar 20, 2018)

Hi Cattleman, I will check it in a bit. thanks for your help.


----------



## Freakbeat (Mar 21, 2018)

I re-downloaded the img file and tried again. at first boot didn't see any error related to loader.conf but there is no loader.conf in /boot, when I created a empty loader.conf is when I have the warning:

```
warning: error reading file /boot/loader.conf
```

When booting I can see:

```
Loading /boot/defaults/loader.conf
```


```
freebsd@generic:/boot % mount
/dev/ufs/rootfs on / (ufs, local, soft-updates)
devfs on /dev (devfs, local, multilabel)
/dev/msdosfs/MSDOSBOOT on /boot/msdos (msdosfs, local, noatime)
tmpfs on /tmp (tmpfs, local)
```
My question here is where I can load the modules from boot if my loader.conf gives me an error.
If I modify /boot/defaults/loader.conf will give me errors?

Thanks.


----------



## cattleman (Mar 21, 2018)

Okay, so it looks like that msdos filesystem is at /boot/msdos, so that won't be having any impact.

Is there a file called if_rtwn_usb.ko in /boot/kernel? I'm not running 12-CURRENT, but on my 11.1-RELEASE machine this module doesn't exist. There is however a module called if_rtwn.ko, so the appropriate line to load this in /boot/loader.conf would be
`if_rtwn_load="YES"`.

Do you get the error if you change this to `if_rtwn_load="YES"`?


Freakbeat said:


> If I modify /boot/defaults/loader.conf will give me errors?


It would be best to not modify /boot/defaults/loader.conf - overrides for these "defaults" files (others include /etc/defaults/periodic.conf and /etc/defaults/rc.conf should be placed elsewhere.


----------



## Freakbeat (Mar 21, 2018)

I couldn't find if_rtwn.ko,When I try it to load the module it fails but I have if_rtwn_usb.ko and if_rtwn_usb.ko.


----------



## cattleman (Mar 21, 2018)

Okay. I regret to say that I'm out of ideas at this stage.


----------



## Freakbeat (Mar 21, 2018)

I’m going to try building the image with crochet. Thank you


----------

