Opened 20 years ago

Closed 20 years ago

Last modified 10 years ago

#775 closed defect (fixed)

libusb initscript problem

Reported by: bdubbs@… Owned by: blfs-book@…
Priority: high Milestone:
Component: BOOK Version: ~CVS
Severity: normal Keywords:


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).

Change History (7)

comment:1 by alexander@…, 20 years ago

I stress that the bug does not affect users who compile from b5_1 LFS CVS branch.

Only LFS CVS HEAD is affected now, and addition of hotplug and usbfs line is scheduled for b6_0 just after BLFS bug 769 gets closed.

comment:2 by bdubbs@…, 20 years ago

Resolution: later
Status: newclosed

comment:3 by tushar@…, 20 years ago

We can keep the init script for those who would like to compile it as a module along with the explaination given by Alexandar.

comment:4 by larry@…, 20 years ago

Resolution: later
Status: closedreopened

comment:5 by alexander@…, 20 years ago

The bug can be moved to LFS because:

1) if usbcore is not a module, we don't need the initscript at all 2) if usbcore is a module, the more general problem can be solved with the "modules" script by Zack, therefore no need for a special bootscript.

comment:6 by Randy McMurchy, 20 years ago

Resolution: fixed
Status: reopenedclosed

Corrected libusb instructions as suggested by Alexander Patrakov.

comment:7 by bdubbs@…, 10 years ago

Milestone: old

Milestone old deleted

Note: See TracTickets for help on using tickets.