[Bug 775] New: libusb initscript problem

blfs-bugs at linuxfromscratch.org blfs-bugs at linuxfromscratch.org
Wed May 19 22:51:02 PDT 2004


http://blfs-bugs.linuxfromscratch.org/show_bug.cgi?id=775

           Summary: libusb initscript problem
           Product: Beyond LinuxFromScratch
           Version: CVS
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: BOOK
        AssignedTo: blfs-book at linuxfromscratch.org
        ReportedBy: bdubbs at swbell.net
         QAContact: blfs-book at linuxfromscratch.org


>From Alexander:

Currently, the libusb page contains an initscript. The whole reason for ii is
that just adding a line to /etc/fstab does not work for users who compile
usbcore as a module.

However, a semi-consensus on the LFS list is that such configuration should not
be supported by the book. Also, if one follows both inctructions from LFS CVS
HEAD and the libusb page, he will have an error that /proc/bus/usb is already
mounted.

Below I post a draft replacement of the entire libusb configuration section
(yes, I don't agree with the text below, but I must agree with the community).
Please review and, upon reaching consensus, I will tag that appropriately and
post a patch for the book.

===========================================================
Libusb requires the "usbfs" kernel filesystem to be mounted on
/proc/bus/usb. Applications require the files in these directory to be
accessible to the user, sometimes for both reading and writing.

New versons of LFS have everything already set up correctly. That includes
having a "usb" group for restricting access to USB devices, and mounting the
"usbfs" filesystem. If you already have this set up, skip the rest of this section.

For older versions of LFS, one has to create the "usb" group manually:

groupadd -g 15 usb

Then, if the usbfs line is not in your /etc/fstab file, add it:

cat >>/etc/fstab <<"EOF"
usbfs         /proc/bus/usb usbfs   devgid=15,devmode=0660 0 0
EOF

Note: this won't work if during the kernel build you have configured "USB device
filesystem" as a module, and therefore have a "usbcore" module. Such
configuration is not supported, because there is no valid reason for you to
compile a module that does not take useful parameters and must always be loaded.
If you still insist in "usbcore" being a module, you should insert it into the
running kernel by means of your own custom initscript that runs before mountfs
(it is impossible to do so by means of the /etc/modules.conf file).



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
You are the QA contact for the bug, or are watching the QA contact.



More information about the blfs-book mailing list