FreeBSD boot hangs randomly "Root mount waiting for..."

retux

New Member


Messages: 3

Hi everyone,

I installed FreeBSD version 12.1-STABLE on a pretty old netbook (Intel based motherboard).
Many times FreeBSD boots up fine and I can work with it normally, but quite randomly system boot hangs on the following message:
Code:
Root mount waiting for: usbus4 CAM
It seems to be an issue with the webcam, that it's usb based. But this issue only occurs certain times while FreeBSD is booting.

I can not disable the webcam by using the bios utility. I'd really like to fix this issue, I guess some kernel parameter can do the trick. Any tips will be highly appreciated.
Cheers!
 

Elazar

Well-Known Member

Reaction score: 127
Messages: 304

CAM is likely not the Webcam, but rather cam(4).

There is a sysctl regarding the wait time:
vfs.root_mount_always_wait=1
 

T-Daemon

Aspiring Daemon

Reaction score: 361
Messages: 860

You can try to disable root mount waiting for USB by setting in /boot/loader.conf :

Code:
hw.usb.no_boot_wait=1
 

Elazar

Well-Known Member

Reaction score: 127
Messages: 304

I think he wants to wait, because he is booting from usb, isn't he?
 
OP
R

retux

New Member


Messages: 3

Hey guys,

Thank you for your responses.
This box is not booting from usb. This issue appears to happen 50% of boot times. That is why it is kinda "random".
I added hw.usb.no_boot_wait=1 to /boot/loader.conf and I saw the booting process getting stack while running /sbin/init as it can be seen on the snapshot attached. The behavior is pretty similar, it only fails some times, not always. Going to reverse hw.usb.no_boot_wait=1 change to see if I get the previous behavior.
 

Attachments

VladiBG

Aspiring Daemon

Reaction score: 338
Messages: 795

According to your attached screenshot your sata controller also fail to query the device. You may try to change your hard-disk to see if there's any difference.
 

mjollnir

Aspiring Daemon

Reaction score: 269
Messages: 658

You can also try
Code:
kern.cam.boot_delay="2000"
in /boot/loader.conf. IIRC it's in milli seconds.
EDIT Install sysutils/smartmontools and check the disk: smartctl -t long /dev/ad0
 
OP
R

retux

New Member


Messages: 3

Hey guys,

I enabled smartd and it does not report errors so far. I suspect it might be a boot time issue because those times when the box completes the boot I can startx, and run enlightenment with no issues at all.
boot mode is set to verbose. And kern.cam.boot_delay="2000" was also added to /boot/loader.conf as suggested by mjollnir. But still no luck half of the times boot get still stuck.
The machine is running multi-boot with grub2 and linux install on different partition (that linux works with no issue at all).
 

mjollnir

Aspiring Daemon

Reaction score: 269
Messages: 658

Sporadic failures are 99% due to bad hardware. 2nd, some controllers and devices (HDD/USB) have quirks encoded in the kernel (they do not 100% comply to standards). For shure Linux has similar things. Carefully inspect the verbose boot messages of your Linux system, to see if they have a quirk that FreeBSD does not have.
 

Elazar

Well-Known Member

Reaction score: 127
Messages: 304

I would rather try to increase the delay, so that cam can finish probing.. Something like kern.cam.boot_delay="10000".

Or set "vfs.root_mount_always_wait=1" in
/boot/loader.conf

dmesg | grep usbus4 should tell you which usb device is causing the problems.
 
Top