CFUMASS(4)
π CFUMASS(4) π
okay so bestie, this is the Kernel Interfaces Manual page for cfumass β USB device side support for Mass Storage Class Transport. and yes we're doing this whole thing, every flag, every default, no skips. periodt. β¨
πΈ NAME πΈ
cfumass β USB device side support for Mass Storage Class Transport
π SYNOPSIS π
so you can bake this driver straight into the kernel by dropping these lines into your kernel configuration file:
device usb
device usb_template
device ctl
device cfumass
orrr you can just load the driver module at boot by adding this line to loader.conf(5):
cfumass_load="YES"
either way works, pick your fighter π
π¦ DESCRIPTION π¦
cfumass is the driver that lets your machine pretend to be a USB mass storage device β like, you're the USB stick now, bestie. it emulates a device that's compliant with the USB Mass Storage Class Bulk-Only (BBB) Transport specification, and it's implemented as a ctl(4) frontend driver. iconic behaviour honestly.
to actually use cfumass, here's the checklist, no skips:
cfumass(4)has to be loaded as a module or compiled into the kernel.- the USB Mass Storage template has to be chosen by setting the
hw.usb.templatesysctl to0. - the USB OTG port has to be working in USB device-side mode. this happens automatically when you connect to a USB host, so don't stress π«Ά
- there has to be a
ctl(4)LUN configured for thecfumassport.
when it loads, the driver creates a ctl(4) port named cfumass, and it presents the first LUN mapped for that port β usually LUN 0 β to the USB host. for the details on configuring the LUN, go look at ctl.conf(5) and ctld(8). and if you want an automated way to configure it at boot, check the cfumass_enable and cfumass_dir rc(8) variables in rc.conf(5). set it and forget it, lowkey the move π
β¨ SYSCTL VARIABLES β¨
these variables are available as both sysctl(8) variables and loader(8) tunables. two for the price of one, we love that:
hw.usb.cfumass.debugβ verbosity level for log messages coming from thecfumassdriver. set it to0to disable logging, or1to warn about potential problems. bigger values turn on debugging output. defaults to1.hw.usb.cfumass.ignore_stopβ ignoreSTART STOP UNITSCSI commands that have the START and LOEJ bits cleared. here's the tea: some initiators send that command to stop the target when the user tries to gracefully eject the drive, but then they fail to start it again when the drive gets reconnected π so set it to0to handle the command in a standards-compliant way,1to ignore it and log a warning, or2to ignore it silently. defaults to1.hw.usb.cfumass.max_lunβ max LUN number to report to the initiator (that's the USB host). must be between0and15. heads up: some initiators incorrectly handle values larger than0. defaults to0.
π SEE ALSO π
ctl(4), umass(4), usb(4), usb_template(4), ctl.conf(5), ctld(8)
π HISTORY π
the cfumass driver first appeared in FreeBSD 11.1. a legend from day one, fr fr β
π AUTHORS π
the cfumass driver was developed by Edward Tomasz Napierala <trasz@FreeBSD.org> under sponsorship from the FreeBSD Foundation. absolute main character energy π«Ά
and that's the whole page, bestie! this one came from the Debian build, dated April 21, 2018, and it lives under the manual name CFUMASS(4). go forth and emulate some mass storage π
β¨π
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2017 The FreeBSD Foundation
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms