Thursday, November 23, 2006

Simple method to disable usb disk on linux

There are many way in the internet. But I think of this way.
You can disable the usb disk, and you can still use the keyboard.

1.
find /lib/modules/-name "storage"

/lib/modules/2.6.9-34.ELsmp/kernel/drivers/usb/storage
/lib/modules/2.6.9-34.0.2.EL/kernel/drivers/usb/storage
/lib/modules/2.6.9-34.EL/kernel/drivers/usb/storage
/lib/modules/2.6.9-34.0.2.ELsmp/kernel/drivers/usb/storage

2.
you can change "usb-storage.ko" to another name in these folder

or delete "usb-storage.ko".
( or rm /lib/modules/`uname -r`/kernel/drivers/usb/storage)

If you restore "usb-storage.ko" , system will connect usb without reboot.

No comments:

Post a Comment