Enabling USB in Ubuntu 8.10 Intrepid Ibex

11 Comments
Tags: , , ,
Posted 19 Dec 2008 in Ubuntu

If you are trying to install a driver for your USB printer or trying to enable USB support in Virtualbox in Ubuntu 8.10, you are in more trouble than before. Ubuntu removed support for /proc/bus/usb starting with Ubuntu 7.10, but in Ubuntu 7.10 and Ubuntu 8.04, all they did was, they commented out the lines that enabled /proc/bus/usb to work and all you had to do was to uncomment them as shown here.  In Ubuntu 8.10, they all together removed those lines. To enable /proc/bus/usb in Ubuntu 8.10, you have to add the following lines to mountdevsubfs.sh file.

Warning: The blogging software changed the quotes. You should use normal quotes, not the reverse one, so be careful if you copy and paste.

Open a terminal and type sudo gedit /etc/init.d/mountdevsubfs.sh and press enter. Once the file opens, add the following lines after do_start () function.

#
# Magic to KEEP /proc/bus/usb working
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb ##there should be 2 hyphens before rbind, not one. The blogging software removed one hyphen

Your new mountdevsubfs.sh should look like

do_start () {
#
# Mount a tmpfs on /dev/shm
#
SHM_OPT=
[ "${SHM_SIZE:=$TMPFS_SIZE}" ] && SHM_OPT=”,size=$SHM_SIZE”
domount tmpfs shmfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT

#
# Mount /dev/pts. Master ptmx node is already created by udev.
#
domount devpts “” /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
}
#
# Magic to KEEP /proc/bus/usb working
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs “” /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount –rbind /dev/bus/usb /proc/bus/usb  ##there should be 2 hyphens before rbind, not one. The blogging software removed one hyphen

case “$1″ in
“”)
echo “Warning: mountdevsubfs should be called with the ’start’ argument.” >&2
do_start
;;
start)

Save the file and close it. Reboot the system and you are good to go.

Update: Ubuntu Virtualbox documentation says you have to insert those lines inside the do_start() function, just before the closing }. That didn’t work when I tried to install my USB laser printer. Putting it outside worked. What I did now was, I added the same lines inside too, but my Virtualbox USB is still not working.


10 Comments

  1. Oh! Right, and you must NOT be running the OSE version of Virtualbox! I wondered why I wasn’t even getting the USB setup. Done. Thanks for all your help!

    Reply
    • You are welcome!!!

      Reply
  2. Daniel

    2 suggestions:
    1. mount -rbind /dev/bus/usb /proc/bus/usb needs to be mount –rbind /dev/bus/usb /proc/bus/usb, note the –, another problem with the blogging software I guess.
    see https://help.ubuntu.com/community/VirtualBox#USB and follow instructions. Worked for me.

    2. This is a silly one and it may be your problem because it was mine, in the Virtual Box GUI, make sure you enable USB, it’s not enabled by default. Machine–>Settings

    Reply
    • Yes, It’s blogging softwares issue. I’ll add a note to the post. Thank you for pointing it out.
      The second point is also true. You have to do that manually.

      Reply
  3. Hi,

    I followed the directions above on Ubuntu 8.10 with no USB devices for Virtual Box. The mount list shows /dev/bus/usb/.usbfs, but /proc/bus/usb is empty. I noticed the softlink does not contain an absolute path for .usbfs/devices… is that a problem?

    Here is my mountdevsubfs.sh:

    do_start () {
    #
    # Mount a tmpfs on /dev/shm
    #
    SHM_OPT=
    [ "${SHM_SIZE:=$TMPFS_SIZE}" ] && SHM_OPT=”,size=$SHM_SIZE”
    domount tmpfs shmfs /dev/shm tmpfs -onosuid,nodev$SHM_OPT

    #
    # Mount /dev/pts. Master ptmx node is already created by udev.
    #
    domount devpts “” /dev/pts devpts -onoexec,nosuid,gid=$TTYGRP,mode=$TTYMODE
    #
    # Magic to KEEP /proc/bus/usb working
    #
    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs “” /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount -rbind /dev/bus/usb /proc/bus/usb
    }

    #
    # Magic to KEEP /proc/bus/usb working
    #
    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs “” /dev/bus/usb/.usbfs usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount -rbind /dev/bus/usb /proc/bus/usb

    Any suggestions?

    Thanks!

    Reply
    • I’m not sure why it’s empty for you.

      Reply
  4. It must be the blogging software.

    Reply
  5. tonique

    Thanks for the information, I had been looking for it.

    I should note that the lines to be copied contain so-called smart quotes, “”, which will certainly not work in system files. Probably your blogging software changes quotes automatically to those. The correct characters are of course the regular straight quotation marks.

    (4th try)

    Reply
  6. hank

    I put the lines outside the start(), didn’t work. Put them inside also, didn’t work either for my usb printer.

    Reply
    • Keep those lines in both places, reboot and try.

      Reply

1 Trackbacks/Pingbacks

  1. How to install Samsung CLP-300 laser printer in Ubuntu | Arun's Blog 09 11 09

Add Your Comment