how do i use a memory stick on freebsd?
Roland Smith
rsmith at xs4all.nl
Fri May 28 15:31:55 UTC 2010
On Fri, May 21, 2010 at 12:03:42PM -0700, Gary Kline wrote:
>
> guys,
>
> my wife emptied a bunch of files onto her memory stick; the pc
> is not here. i have never used one of these devices before and
> want to know how, if it is possible, to read her dos/lose
> material from my bsd system. 7.3, dell, plenty of disk, and yes,
> i know where the usb slot it!
>
> do i need to put something in /usr/rc.conf? build a driver or
> utility? or what?
You can mount it as root without having to do anything special. Plug in the
USB stick, and watch dmesg output to see which device appears. Say you see a
device 'da0' appear. Then look in /dev/ to see if there are any slices on it;
'ls /dev/da0*'. You'll probably see one slice, e.g. /dev/da0s1. Then use
mount_msdosfs(8) to mount it somewhere.
If you want to mount as a regular user, things are somewhat more
involved. First, you have to set the sysctl 'vfs.urermount=1'. This has to be
done as root, of course. Then you have to make sure that the user in question
has read/write access to the devices. Generally, I do that by creating a group
called 'usb' with the pw(8) utility, and making users that need access to USB
devices a member of that group. Then I add some lines to /etc/devfs.rules to
make the usb and related devices accessible to that group;
[my_rules=10]
add path 'da*' mode 0660 group usb
add path 'msdosfs/*' mode 0660 group usb
add path 'usb/*' mode 0660 group usb
add path 'ugen*' mode 0660 group usb
The latter two lines are to make e.g. digital cameras and scanners accessible.
This ruleset has to be activated in /etc/rc.conf;
devfs_system_ruleset="my_rules"
You'll need to reboot the system or restart devfs for this to take
effect. With these adaptations, you can mount USB drives as a normal user.
Roland
--
R.F.Smith http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914 B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100528/c899a91e/attachment.pgp
More information about the freebsd-questions
mailing list