Main Page | Report this Page
Linux Forum Index  »  Linux - Red Hat Forum  »  another little question !
Page 1 of 1    

another little question !

Author Message
Donny Brasco
Posted: Wed Mar 10, 2004 5:36 am
Guest
Hi again

how is it possible to mount an USB memory stick on linux ?
and what about an USB scanner ?

thank you
 
Vic
Posted: Wed Mar 10, 2004 5:36 am
Guest
"Donny Brasco" <DBrasco@hotmail.com> wrote in message
news:c2mqts$f2d$1@news-reader5.wanadoo.fr

Quote:
how is it possible to mount an USB memory stick on linux ?

man mount
man fstab

Quote:
and what about an USB scanner ?

Google for sane

HTH

Vic.


--
Posted via Mailgate.ORG Server - http://www.Mailgate.ORG
 
RodgerH
Posted: Wed Mar 10, 2004 9:34 am
Guest
Donny Brasco wrote:

Quote:
how is it possible to mount an USB memory stick on linux ?
and what about an USB scanner ?

Here is how i do it, by using a script (i named it jumpdrive.sh):

#!/bin/bash

#mount /mnt/jumpdrive 2>/dev/null
#mount -t vfat -o rw,users,uid=501 /dev/sda1 /mnt/jumpdrive 2>/dev/null

mount -t vfat -o rw,users,uid=501 /dev/sda1 /mnt/jumpdrive
konqueror /mnt/jumpdrive

uid 501 is the uid of my personal userid where i will be using the usb
drive.

--
Regards,
Rodger
---
Fedora: Registered Linux User #285004.
---
"Do, or do not. There is no try." -- A Jedi Master.
---
 
Nils O. Selåsdal
Posted: Wed Mar 10, 2004 9:36 am
Guest
In article <c2mqts$f2d$1@news-reader5.wanadoo.fr>, Donny Brasco wrote:
Quote:
Hi again

how is it possible to mount an USB memory stick on linux ?
and what about an USB scanner ?
Atleast Fedora sets it up for me automatically, all I need to do

is the command
mount /mnt/flash/
And its there, under /mnt/flash/
If it doesn't handle it automatically, I'd expect
mkdir /mnt/usbstick/
mount /dev/sda1 /mnt/usbstick

If /dev/sda1 is not the device, the "dmesg" command might help
figure out which device it is..
(and if it's not formatted, you need to do that first ,
mkfs.vfat /dev/sda1 ought to be appropriate.)

--
Vennlig hilsen/Best Regards
Nils Olav Selåsdal
System Engineer
w w w . u t e l s y s t e m s . c o m
 
Fred
Posted: Wed Mar 10, 2004 10:32 am
Guest
[snip]
Quote:
how is it possible to mount an USB memory stick on linux ?
and what about an USB scanner ?

This week several members of this group helped me. Following are my
notes:

How to mount a USB memory device in FC-1

Do all of the following commands as "root" from terminal mode or in a
terminal of X. Create a dir w/ write privilege for you, the user. I
used "usb1" as the directory and "user1" as the user in "users" group.

mkdir "/mnt/usb1" #usb1 to be the directory of the USB device.
chown -v user1:users /mnt/usb1 #allow user1 & group "users" to write
to dir.

Find what device name the kernel gives the usb device. Disconnect the
device from the usb port and:

dmesg -c #Clear the kernel log.

Insert the usb device.

dmesg #Readout of kernel log.

You might have to output this to a text file to read the whole output:

dmesg > kernel-message-name.txt

Find somewhere in the readout the name of the device. Mine was "sda1".

Add the following line to "/etc/fstab":
"/dev/sda1 /mnt/usb1 vfat noauto,owner 0 0"

The file system of my usb device is vfat since I also use it in a M$
machine.

You, "user1" and any member of group "users" or "root" should now be
able to mount and umount "/mnt/usb1". (Note, any X programs you used to
access the usb device needed to have their default directory moved up
the dir tree from /mnt/usb before closing them, or umount will show as
busy.)

mount /mnt/usb1 #command to mount the usb device

Make sure and un-mount the usb device before unplugging it.

umount /mnt/usb1 #un-mount the usb device

For your further research:
I tried to use the following devlabel command to configure a permanent
alias for the drive, but messed something up. I think something like
this would allow auto-mounting of any of your usb memory devices.

devlabel add -d /dev/sda1 -s /dev/usb1 --automount

Good Luck,

Fred Connell
 
Max O.
Posted: Wed Mar 10, 2004 10:53 am
Guest
Donny Brasco wrote:
Quote:
Hi again

how is it possible to mount an USB memory stick on linux ?

With a new distro you do this: insert memory stick........and find a
nice little icon on your desktop in a couple seconds.

Quote:
and what about an USB scanner ?

Depends, usually parallel port scanners are better supported, but do a
search on SANE support for your model, you might get lucky!

Quote:

thank you

 
Nils O. Selåsdal
Posted: Wed Mar 10, 2004 11:08 am
Guest
In article <404f3476.6676133@nntp.comporium.net>, Fred wrote:
Quote:
[snip]
how is it possible to mount an USB memory stick on linux ?
and what about an USB scanner ?

This week several members of this group helped me. Following are my
notes:

How to mount a USB memory device in FC-1

Do all of the following commands as "root" from terminal mode or in a
terminal of X. Create a dir w/ write privilege for you, the user. I
used "usb1" as the directory and "user1" as the user in "users" group.

mkdir "/mnt/usb1" #usb1 to be the directory of the USB device.
chown -v user1:users /mnt/usb1 #allow user1 & group "users" to write
to dir.

Find what device name the kernel gives the usb device. Disconnect the
device from the usb port and:

dmesg -c #Clear the kernel log.

Insert the usb device.

dmesg #Readout of kernel log.

You might have to output this to a text file to read the whole output:

dmesg > kernel-message-name.txt

Find somewhere in the readout the name of the device. Mine was "sda1".

Add the following line to "/etc/fstab":
"/dev/sda1 /mnt/usb1 vfat noauto,owner 0 0"

The file system of my usb device is vfat since I also use it in a M$
machine.

You, "user1" and any member of group "users" or "root" should now be
able to mount and umount "/mnt/usb1". (Note, any X programs you used to
access the usb device needed to have their default directory moved up
the dir tree from /mnt/usb before closing them, or umount will show as
busy.)

mount /mnt/usb1 #command to mount the usb device

Make sure and un-mount the usb device before unplugging it.

umount /mnt/usb1 #un-mount the usb device

For your further research:
I tried to use the following devlabel command to configure a permanent
alias for the drive, but messed something up. I think something like
this would allow auto-mounting of any of your usb memory devices.

devlabel add -d /dev/sda1 -s /dev/usb1 --automount
3 more notes.

1. Some distros set this up (usually)automatically, e.g. under Fedora
mount /mnt/flash (as a user or root..). SuSE makes it even easier, an
icon appears on the desktop when you attach the stick..
2. Adding mount option noatime might extend its lifetime, as it won't get
written to every time you access a file, or list the files..
3. adding mount options sync,dirsync will write to the device immediatly,
somewhat help prevent corruption if you forget to umount it before you
remove the stick..


--
Vennlig hilsen/Best Regards
Nils Olav Selåsdal
System Engineer
w w w . u t e l s y s t e m s . c o m
 
 
Page 1 of 1    
All times are GMT - 5 Hours
The time now is Wed Nov 25, 2009 10:45 am