LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Linux Mini Distro Suggestion: Emulate USB Flash Disk (https://www.linuxquestions.org/questions/linux-software-2/linux-mini-distro-suggestion-emulate-usb-flash-disk-241245/)

layanto 10-11-2004 04:13 AM

Linux Mini Distro Suggestion: Emulate USB Flash Disk
 
I have a suggestion for a Linux Mini Distribution. I'm don't think this exist out there, but please correct me if I'm wrong.

As we all know, usb flash disk and external notebook hdd usb case are very popular. Just plug these devices into any computer (running linux, mac or windows) and you immediately see the drive mounted ready to transfer files from and to.

I propose (if it is at all possible) a linux mini distribution which when installed on a notebook, allows the notebook's hdd to be seen as an external usb hdd when the notebook is connected to another computer (usb to usb). Once installed, the linux distribution will appear on the boot list, allowing the user to either boot into normal operating system or use the notebook as a portable hdd.

In other words, this linux distribution emulates the behaviour of a usb flash disk or usb hdd case. This allows for easy file transfer without having to set up networking (which may not be possible in some cases, eg transferring files btw uni's computer and notebook).

Is this possible with linux? Is there any Linux distribution out there that can do this? Is there anyone outthere interested in developing this?

rjlee 10-11-2004 04:26 AM

Interesting idea. This could be done, using a special cable and a kernel driver that behaves as a USB client. You'd probably have to plug into the laptop's parallel port rather than USB (the USB standard isn't designed to connect two hosts together).

The only real downsides are that the cable might cost the best part of a cheap USB disk (although the storage capacity would be much larger), and you'd probably have to build the cable yourself.

For anyone reading, I should also note that if you are wanting to transfer files from one computer to another, the traditional methods of PLIP or SLIP will work in most cases; assuming that you can either set up networking or get a program like laplink onto the computer.

markosjal 04-23-2009 01:11 AM

TONS of uses for this
 
I have been scouring the net for a solution that I need that this original post could work for. In fact I concluded I may have to build it, and that is how I came across this post.

I started looking at small PCs such as
http://digg.com/linux_unix/Space_Cub...llest_Linux_PC
and
http://www.picotux.com/

The problem that I see is that OSes support USB HOST controllers and not as a USB "client" (for lack of a better word)

In the case of the PicoTux , It would be perfect for me if it had a USB "client" connection, and appropriate linux support.

In My case the software I would need is as follows:
Mini Web Server to change IP address, and to set up which shares on the network the device would have access to (to pass on to the USB host controller)

proper support for the Network interface and USB host controller.


In my case The device would connect to a USB port on a DVD player to stream files from a NAS. In fact the device I envision , would work with ANY device that could use a USB memory or Hard disk.

Maybe something like DSL would do it all , if the problem with the USB client interface (vs host) were resolvable.

rjlee 04-25-2009 03:30 PM

You may want to look at this: http://www.linux-usb.org/gadget/

linus72 04-25-2009 03:54 PM

I think DSL could do all that-maybe by editing the /etc/fstab, /etc/mtab and filetool.lst
DSL can probaly do the server bit too

You might wanna check out INSERT too, as it has alot of tools.

I do know that if at FIRST boot of dsl you specify "dsl mydsl=xxxx" where "xxxx" is whatever the device is, DSL will put a "mydsl" folder there.
At the desktop, don't install anything, just update mydsl browser, then open a root terminal, type "mount" and see if the device is connected.
try fdisk -l too and then try to mount where the mydsl folder is.

Once mounted, "mkdir /mnt/xxxx/mydsl/modules", and "mkdir /mnt/xxxx/mydsl/optional"
And finally "cp /KNOPPIX/lib/modules/2.4.31/kernel/drivers/block/cloop.o mnt/sda2/mydsl/modules"

Now backup and reboot...

Then at the boot line enter "dsl mydsl=xxxx restore=xxxx" and dsl should find the device and restore(though nothing installed yet).

I have found that once DSL knows where to find it's backup.tar.gz and mydsl folder-it will automatically give the device a name and mount point-making it easier than manually trying to figure it out.

Hope some of that helped...


All times are GMT -5. The time now is 07:10 PM.