-   Linux - Software (
-   -   Is there a way to emulate a usb device? (

mriedel 07-08-2008 10:44 AM

Is there a way to emulate a usb device?
Dunno if this is the right place to post it, couldn't really decide.

Anyway I was wondering whether there is a way to, say, create two partitions on a usb device, one of which is encrypted with cryptsetup/LUKS and then fool the system into believing the encrypted one is a standalone usb device after cryptsetup luksOpen'ing it without the decrypted partition being mounted anywhere.

In simpler terms I want /dev/mapper/sdX_crypt to appear as a (fake) usb device.

Ideally hotplugging would still work so that when I unplug the actual usb device (which will be used read-only), the mapper device disappears (making the system believe the fake usb device was just unplugged).

mriedel 07-09-2008 06:41 AM


Fabulatech 08-21-2008 08:42 AM

there is a special software which can solve your problem - USB over Network. As link dropping is not allowed, surf google for it.

markosjal 04-23-2009 10:38 AM

USB device
I am looking for the same USB over Ethernet is not the solution. We are looking for a solutio to have a computer emulate a USB device.

i92guboj 04-23-2009 11:03 AM

vhba does this for cdemu, it hooks into the kernel scsi layer to emulate a virtual cdrom device.

I never looked into its internals, but since usb drives are also hooked as scsi devices, I guess that in theory it should be possible to use vhba to also emulate an usb device. I am not completely sure since in the case of usb drives there's at least one more module involved which is the usb storage one.

Maybe the subforum for the kernel would be a better place to get feedback on this. You could also try to contact with the vhba author(s) and ask them if this is indeed possible or if you should be looking into any other direction.

All times are GMT -5. The time now is 12:53 AM.