Bug 256395

Summary: Kernel waits 30 seconds for CD drive before mounting root filesystem
Product: Base System Reporter: miner.ben07
Component: usbAssignee: freebsd-usb (Nobody) <usb>
Status: Open ---    
Severity: Affects Some People CC: emaste, grahamperrin, kwiat3k
Priority: --- Keywords: needs-qa
Version: 13.0-RELEASE   
Hardware: amd64   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268157

Description miner.ben07 2021-06-03 05:05:18 UTC
I dual-boot Fedora Silverblue (which I'm using for this bug report) and FreeBSD. When booting FreeBSD in verbose mode and with boot_mute off, I can see that the kernel waits 30 seconds from getting ready to mount the root filesystem and actually doing it. In this time, it repeatedly prints out this message, once every second:

Root mount waiting for: usbus1
Root mount waiting for: usbus1
...and so on...

If I put a CD or DVD in my laptop's DVD drive, or a USB in one of the ports, this does not happen, which means it can't be one of the ports specifically, or whatever usbus1 is changes.

I have very little FreeBSD experience, but have used Linux for nearly a year and as far as I can tell, Linux avoids waiting for a root filesystem on a USB or CD by making GrUB specify the root device in the command line.

Is there a way to specify the root device in loader.conf or something or is this a bug without a workaround?
Comment 1 miner.ben07 2021-06-03 05:13:22 UTC
Wait, the problem still happens when I plug in a USB stick, so it's specific to the CD drive.
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2021-08-28 22:02:53 UTC
(In reply to miner.ben07 from comment #0)

> … workaround?

sysctl hw.usb. | grep wait

– try adding the line below to your /boot/loader.conf

hw.usb.no_boot_wait=1
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2021-08-28 22:04:07 UTC
Additional context: 

<https://github.com/helloSystem/hello/issues/37#issuecomment-853567397>