Linux USB drive help needed

Brian K. White brian at aljex.com
Wed Feb 25 09:59:32 PST 2009


Laura Brody wrote:
> Hi all,
> 
>     I have a non-local filePro customer who was running filePro on
> an old SCO box for many years, and then moved everything to Linux
> a few a years ago. I think the flavor is Gentoo Linux. (I can
> double check if that makes a difference). At the moment, I don't
> have a Linux box in my office to test things out, so I need
> a little help from someone who deals with Linux a bit more than
> I do.
> 
>    I wrote an export routine. She wants the resulting file to
> eventually land on a USB thumb drive. Under SCO, she had
> 
>     doscp filename a:
> 
> to copy an export file to a floppy. What command do I use to
> get the export file from /appl/tmp/export.csv to the thumb
> drive so she can work on it on her Windows laptop?

No simple answer for that unfortunately.
Do they have one of the 3 or soe different automounter daemons running?
do they have a new enough dist that they have ntfs-3g which can write to 
ntfs? Or is the usb stick fat32 or fat16 in which case you don't need to 
worry about ntfs. Is their normal hard drive ide or scsi? If ide, are 
they using the old ide driver or the new libata driver? Do they have 
hal, or hotplug, or no hot-plug device manager?

All of this changes where and how or IF a thumb drive shows up when it's 
plugged in. The real, no-guessing answer is to be root and tail -f 
/var/log/messages, and then plug the thumb drive in, and see what device 
name it gets. /dev/sda, /dev/sdb, etc...
Then you can make 2 almost always safe assumptions, that the drive is 
fdisk'd to have a msdos partition table and that the entire drive is 
used by partition one, and that the filesystem is fat32.
So once you know it's, say, "/dev/sdb" you can usually:
mount -t vfat /dev/sda1 /mnt

And then the contents are in /mnt
don't unplug the drive without first doing umount /mnt

However, since a few years ago most dists do have some kind of 
automouner daemon running or kernel module, so these days it's actually 
usually a lot simpler than all that. We just don't know that until we 
know exactly which distro they have and exactly what version, then the 
rest can be googled.

If you're lucky the drive may automatically show up somewhere after you 
plug it in, and chances are the name of the mount directory will reflect 
the volume name on the fat32 filesystem, so, you could tell them to 
format the thumb drive in windows and give it a specific volume name 
which you can look for in filepro. In suse this would be /media/volumename.
Don't know where Gentoo's equivalent is.

If there is an automounter you can run just "mount" to see where it was 
auto mounted.

-- 
bkw


More information about the Filepro-list mailing list