Sunday, May 20, 2012

Linux Load USB Driver

How do I load USB driver under Linux operating system using the command prompt?

usb-storage.ko is USB mass storage driver for Linux. It is usaully installed at the following location:
ls -l /lib/modules/$(uname -r)/kernel/drivers/usb/storage/usb-storage.ko
The modprobe command is used to add and remove modules (device drivers) from the Linux Kernel. To load the usb-storage.ko driver type the following command as the root user:
# modprobe usb-storage
OR
$ sudo modprobe usb-storage
Type the following command to see all detected device drivers:
# tail -f /var/log/messages
Sample outputs:
Oct  7 01:00:54 vivek-desktop kernel: [16813.127866] Initializing USB Mass Storage driver...
Oct 7 01:00:54 vivek-desktop kernel: [16813.127984] scsi6 : SCSI emulation for USB Mass Storage devices
Oct 7 01:00:54 vivek-desktop kernel: [16813.128084] usbcore: registered new interface driver usb-storage
Oct 7 01:00:54 vivek-desktop kernel: [16813.128088] USB Mass Storage support registered.
Oct 7 01:00:59 vivek-desktop kernel: [16818.125391] scsi 6:0:0:0: Direct-Access Seagate FreeAgent 102D PQ: 0 ANSI: 4
Oct 7 01:00:59 vivek-desktop kernel: [16818.152306] sd 6:0:0:0: [sdd] 2930277168 512-byte hardware sectors: (1.50 TB/1.36 TiB)
Oct 7 01:00:59 vivek-desktop kernel: [16818.153604] sd 6:0:0:0: [sdd] Write Protect is off
Oct 7 01:00:59 vivek-desktop kernel: [16818.155350] sd 6:0:0:0: [sdd] 2930277168 512-byte hardware sectors: (1.50 TB/1.36 TiB)
Oct 7 01:00:59 vivek-desktop kernel: [16818.156597] sd 6:0:0:0: [sdd] Write Protect is off
Oct 7 01:00:59 vivek-desktop kernel: [16818.156605] sdd: sdd1
Oct 7 01:00:59 vivek-desktop kernel: [16818.183660] sd 6:0:0:0: [sdd] Attached SCSI disk
Oct 7 01:00:59 vivek-desktop kernel: [16818.183732] sd 6:0:0:0: Attached scsi generic sg4 type 0

No comments:

Post a Comment