Skip navigation.
Home
Now Shipping Version 7.0

unable to mount ub.ko


Posts: 1

Hi,

I don't know whether this is the right list to post my query or not, but I am really struggling alot to mount ub.ko. Can anyone comment on the below given steps.....

1) I compiled ub.c, and obtained ub.ko in GNU Linux 2.6.9-5
2) I created a node in /dev but couldn't mount it as I had no root permissions
3) Tried to compile in Fedora2, it gave warnings for "usb_kill_urb" and "msleep"(which I didn't see in GNU LINUX)
4) I ignored those warning and tried to insmod ub.ko, and then it gave the following errors
i) Unknown symbol for "usb_kill_urb" also for "msleep"
5) I commented "ub_probe_clear_stall" and "msleep", and then insmod was successful
6) Then I did "mknod ub b 180 1", it created a node but when I tried to mount it gave error saying that "ub is not a valid block device"
7) Here I tried by passing "UB_MAJOR = 0" and got major number 251. Again node was created but when I tried to mount, I got the same error. Please look into the below given /var/log/messages for the same.....

May 11 22:25:45 localhost kernel: ub_init--MAJOR:251
May 11 22:25:45 localhost kernel: usbcore: registered new driver ub

Note: I gave a printk to see "ub_init--MAJOR"

Cool I renamed the same file as stdr_2/stdr_3 and tried the same. Please look into the below given /var/log/messages for the same....

May 11 22:43:21 localhost kernel: ub_init--MAJOR:0
May 11 22:43:21 localhost kernel: kobject_register failed for ub (-17)
May 11 22:43:21 localhost kernel: Call Trace:
May 11 22:43:21 localhost kernel: [<0218ee9e>] kobject_register+0x31/0x39
May 11 22:43:21 localhost kernel: [<021d978f>] bus_add_driver+0x2e/0x81
May 11 22:43:21 localhost kernel: [<021d9ab3>] driver_register+0x28/0x2c
May 11 22:43:21 localhost kernel: [<1095a031>] ub_init+0x31/0x6c [stdr_2]
May 11 22:43:21 localhost kernel: [<02211850>] usb_register+0x37/0x76
May 11 22:43:21 localhost kernel: [<1095a03e>] ub_init+0x3e/0x6c [stdr_2]
May 11 22:43:21 localhost kernel: [<02127eac>] sys_init_module+0xe7/0x1bd
May 11 22:43:21 localhost kernel:
May 11 22:43:21 localhost kernel: usbcore: error -17 registering driver ub
May 11 22:43:21 localhost kernel:
May 11 22:43:21 localhost kernel: ub_init--MAJOR:-17
May 11 22:45:45 localhost kernel: ub: sizeof ub_scsi_cmd 64 ub_dev 2468
May 11 22:45:45 localhost kernel:
May 11 22:45:45 localhost kernel: ub_init--MAJOR:0
May 11 22:45:45 localhost kernel: kobject_register failed for ub (-17)
May 11 22:45:45 localhost kernel: Call Trace:
May 11 22:45:45 localhost kernel: [<0218ee9e>] kobject_register+0x31/0x39
May 11 22:45:45 localhost kernel: [<021d978f>] bus_add_driver+0x2e/0x81
May 11 22:45:45 localhost kernel: [<021d9ab3>] driver_register+0x28/0x2c
May 11 22:45:45 localhost kernel: [<1095a031>] ub_init+0x31/0x6c [stdr_3]
May 11 22:45:45 localhost kernel: [<02211850>] usb_register+0x37/0x76
May 11 22:45:45 localhost kernel: [<1095a03e>] ub_init+0x3e/0x6c [stdr_3]
May 11 22:45:45 localhost kernel: [<02127eac>] sys_init_module+0xe7/0x1bd
May 11 22:45:45 localhost kernel:
May 11 22:45:45 localhost kernel: usbcore: error -17 registering driver ub

May I know why I did fail to mount the node? Do I need to block usb-stroage driver to test ub.c?

Thank you,

Regards,
JD