[RESOLVED] FreeBSD 14-Current - crashes when removing adapter

Since asking on the FreeBSD forums is not allowed at this moment

Batch 3 of Framework Laptop 13 (13th Gen Intel Core)

FreeBSD 14.*

Whether using the dedicated network card, or USB-A → Network adapter, I can get FBSD installed using the hard line. Once I get everything installed reboot the computer, I get wpa_supplicant installed and can use WiFi.

At this point I try to remove the NIC card or remove the USB-A NIC adapter and reboot.

Everytime I try and remove the NIC’s, and boot I get this error or one very similar

Note the “mounting from zfs:zroot/ROOT/default failed with error 22: retryin for 3 more seconds”
“mounting from zfs:zroot/ROOT/default failed with error 22: invalid fstype”

when I insert the previous card, it boots just fine.

Not sure where to begin to “fix” this issue

thanks

Here is a link to the screenshot

https://imgur.com/a/e1lnYBP

What options are listed when you press ‘?’ there?

I’m wondering if you’re using a bootloader that doesn’t support ZFS? Or maybe you didn’t install to ZFS?

If that was happening to me, I’d likely try installing to a UFS filesystem and see if that works.

Honestly, unless I had maxed out the RAM, I would start with UFS on a laptop.

Tagged this as BSD as it’s is BSD related, always welcome here.

My *BSD days are limited, however, I believe Deuce has a good jumping off point.

I’m using FreeBSD 14, as FreeBSD won’t install

Bootloader will boot if I have the network cards installed. I get this error when I remove them to free up module space. if i try to mount the individual partitions , same error.

turn machine off, plug network adapters in, and it boots normal, so zfs vs ufs is not an issue.

i have 32G in the laptop, so memory “should not” be an issue.

Yo, follow demonologist here. I’ve got the 11th gen framework laptop so we have different hardware which unfortunately means this isn’t a perfect test. Regardless, I attempted to recreate the issue and I couldn’t.

I used the latest disc1 iso of the amd64 FreeBSD 14.0 snapshots (FreeBSD-14.0-CURRENT-amd64-20230727-474708c334a7-264358-disc1.iso with sha512 of 752bc1d27130daa283321bdf2518cc4658ceb5c1ca49c7cac19b3324790efd17c9f381ad3915f457819452bfffdcddf5cbbc9f3a9c982e945a315da6c0e9f60e).

I then proceeded through the FreeBSD installer, installing on ZFS, and connecting to wifi (I use an AR9462 from ThinkPenguin so my wifi works out-of-the-box which lets me set it up through the installer).

Then I booted into FreeBSD and fetched google to show that wifi was working. Afterwards I shutdown, unplugged the wifi m.2 card, and rebooted and it still booted fine.

Here is a video of the process in case you can notice anything different that we did (I blur out anything that shows SSIDs since they can be used to get a pretty precise location): https://youtu.be/w4hq7wOkw4c

So reading your description, personally my first debugging step would be to try to figure out if this is a hardware or a software issue by doing the same things on Linux (as in, install a Linux distro and connect to wifi, then remove the wifi card and attempt to boot into it). If there’s something funky going on with the PCIe then hopefully that would also trigger issues.

Also I’d check to see if the FreeBSD 14 snapshot you are installing from is different from the one I am. Since FreeBSD 14 is a development release, those builds are just snapshots of whatever happens to be in git at the time, which means those builds are sometimes broken. I’ve had the FreeBSD snapshots from one week fail and the next week work fine.

Also idk how versed you are in FreeBSD but in case you don’t know: FreeBSD 14, despite the poorly named version of “-CURRENT”, is just the development version and it is not yet released. Unless you’re either a FreeBSD developer or the hardware in the 13th gen laptops requires FreeBSD 14, I would stick to the released version of FreeBSD 13.2-RELEASE. You avoid a lot of breakage and you don’t have to deal with compiling your own build of FreeBSD to disable the debugging stuff that is enabled in -CURRENT that makes everything slow.

Is that possible? AFAIK the only only bootloader that boots FreeBSD is the FreeBSD bootloader. Regardless, OP says that putting his network card back in the laptop makes it boot again, so the bootloader would not have changed in between working and not-working states.

Booo! ZFS runs fine on low-ram systems. Definitely couldn’t hurt to try UFS as a debugging step but to deny our ZFS is to deny (one of) the very thing that makes us FreeBSD. (Yes I know Linux can use ZFS, I use both. No, ZFS on Linux is not as good as ZFS on FreeBSD.)

The EINVAL suggests that the zroot is not being found by loader, though it’s clear at least one USB mass storage device is found (not sure if that’s the one you’re trying to boot from).

So reading your description, personally my first debugging step would be to try to figure out if this is a hardware or a software issue by doing the same things on Linux

I would start by pressing ? at the prompt to see what boot sources are detected…

I’m wondering if you’re using a bootloader that doesn’t support ZFS?

Is that possible? AFAIK the only only bootloader that boots FreeBSD is the FreeBSD bootloader.

For non-EFI boot, it certainly used to be (haven’t really dug into 14, but BIOS boot is pretty limited, especially with MBR). zfsloader(8) and loader(8) were different, and if EFI isn’t being used, but GPT is, you needed to use gptzfsboot(8) (instead of gptboot). For BIOS-based MBR systems, you needed zfsboot(8) (instead of boot0). With EFI, I’m pretty sure loader.efi(8) supports every supported rootfs, but yeah, it depends on the installer knowing what the right thing is.

the bootloader would not have changed in between working and not-working states.

I’m not saying it would have, but it’s not impossible that the enumeration order in the system changes, and it switches from EFI boot from somewhere with loader.efi to BIOS booting the USB drive which only has gptboot(8) (or boot0) installed. It’s one of the maddening things about USB specifically, and removable boot devices in general.

Honestly, unless I had maxed out the RAM, I would start with UFS on a laptop.

Booo! ZFS runs fine on low-ram systems.

Sure, but just because something runs doesn’t mean you want it running… and UFS is a lot easier to boot.

Oh, one thing to try is to ensure the ZFS module is loaded… escape to the loader prompt (I think it’s 3 from the menu?) and try:

> load /boot/kernel/kernel
> load /boot/kernel/zfs.ko
> set currdev="zfs:zroot/ROOT/default:"
> boot
1 Like

TIL! Though, the framework laptop does not support legacy BIOS boot, only EFI, so OP should be good there.

Solved - Sort of

I installed FreeBSD 14 onto the non-nvme drive, and that works as advertised.

Onto the graphics not working

1 Like

Following this myself, appreciate everyone’s updates.

1 Like

okay. with the installation of FreeBSD 13.2. it was able to be installed onto the nvme drive.

No idea why 14.0 won’t .

Marking closed

1 Like

That is weird, but, 13.2 for the win!

exactly. I know that the FreeBSD support forum only supports “CURRENT”, so I went back to 13.2. first go around ti installed and booted normally.

Now waiting for the video drivers to catch up

1 Like

Yes, I know marked as resolved. Just more updated info.

Updated from FreeBSD 13.2 to FreeBSD 14.0-BETA1. everything upgraded as expected. Except the video drivers. Still waiting on them to be added

1 Like

Just curious, does WiFi and Bluetooth work out of the box for the Intel card or have you swapped out the card/use wifibox?

Last time I tried 13, I had the issue where it WiFi would keep dropping and sleep wouldn’t resume (on 11th gen Intel with Ax210).

WiFi works. I don’t use bluetooth

in the /etc/rc.conf I have the following;

kld_list=“iwlwifi”

for internal wifi card

wlans_iwlwifi0=“wlan0”
ifconfig_wlan0=“WPA SYNCDHCP”
create_args_wlan0=“wlanmode sta regdomain FCC country US”
wlandebug_wlan0=“+state +crypto +node +auth +assoc +dot1xsm +wpa”
ifconfig_iwlwifi0=“DHCP”
devfs_system_ruleset=“system”

2 Likes

Fantastic shares, thank you!

1 Like

FYI, FreeBSD 14 still has no gui, though…

Just installed FreeBSD 15-CURRENT, desktop installer, and the desktop appears to work