0

I am little confused , i have a lxc container and if i do lsusb inside the conatiner i get the following output

root@blunt01:/dev/bus/usb/002# lsusb 
Bus 002 Device 004: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 003: ID 0424:2512 Standard Microsystems Corp. USB 2.0 Hub
Bus 002 Device 006: ID 8564:1000 Transcend Information, Inc. JetFlash
Bus 002 Device 007: ID 0529:0001 Aladdin Knowledge Systems HASP copy protection dongle
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 0624:0249 Avocent Corp. Virtual Keyboard/Mouse
Bus 001 Device 003: ID 0624:0248 Avocent Corp. Virtual Hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Also the lsblk shows me the following :

root@blunt01:/dev/bus/usb/002# lsblk 
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 278.9G  0 disk 
|-sda1   8:1    0 230.9G  0 part /
|-sda2   8:2    0     1K  0 part 
`-sda5   8:5    0    48G  0 part 
sdb      8:16   0   5.5T  0 disk 
sdc      8:32   0   5.5T  0 disk 
sde      8:64   1  14.7G  0 disk 
`-sde1   8:65   1  14.7G  0 part 

But the problem is this :

  1. The fdisk -l shows me NOTHING at all
  2. I need to mount the USB listed at BUS 002 , Device 007 . How can i do so ?
4
  • May be those nodes are missing. If so then create those links by using mknod command
    – SHW
    Jul 28, 2016 at 11:35
  • @SHW so you mean i don't have anything in my /dev/ ? can u please elaborate how to do so] Jul 28, 2016 at 11:36
  • grep -E d[a-g] /proc/partitions > list for i in seq `sed -n '$=' list` do mknod /dev/sed -n ${i}p list | awk '{print $4}' b 8 sed -n ${i}p list | awk '{print $2}' > /dev/null 2> /dev/null done
    – SHW
    Jul 28, 2016 at 11:38
  • how do i make use of it ? Also what does this do ? Jul 28, 2016 at 11:40

1 Answer 1

0

Pseudo answer

Since, in comment I can't write code. Hence commenting here in answer:

Unable to post here the bash code. Better you copy-paste above code which I had replied to you in your question

Above code will create the nodes for all the partitions available in system (recognized by /proc/partition)

2
  • this is bash script, right ? Jul 28, 2016 at 11:48
  • it says mknod: invalid option -- 'n' awk: fatal: cannot open file `b' for reading (No such file or directory) Jul 28, 2016 at 11:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .