Re: FreeBSD and USBmemorystick

2008-11-12 Thread Roland Smith
On Tue, Nov 11, 2008 at 09:44:14PM -0200, Gonzalo Nemmi wrote:
 On Tuesday 11 November 2008 9:17:36 pm Roland Smith wrote:
  On Tue, Nov 11, 2008 at 09:04:13PM -0200, Gonzalo Nemmi wrote:
   On Tuesday 11 November 2008 5:39:02 pm Pieter Donche wrote:
On Tue, 11 Nov 2008, Jeremy Chadwick wrote:
 On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:
 If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
 happens. On the same laptop in the SuSE 10.1 partition, the same USB
 stick appears in Konqueror under Storage Media  and is ready to use)
 In FreeBSD, Konqueror shows nothing under Storage Media.
 Is this normal?

 What shows up in your kernel message log (outside of X, usually on
 the first virtual console) when you insert the stick?  It should show
 a umass device being added, then a daX device being added.
   
There are indeed messages:
umass0: M-SysT5 Dell Memory Key, class ...  on uhub4
da0: at umass-sim0 ...
..
da0: 60 Mb   (OK, it is a 64 Mb key)
GEOM_LABEL: Label for provider da0s1 is msdosfs/USB MEMORY
 
  It's better to use this device, since it won't change when you plug in
  an extra USB stick/drive.
 
also when unplugging, some messages
   
$ ls -la /dev/da0s1
shows only the character device line
  
   OK then .. let's get it to work.
  
   1) Open /etc/devfs.rules and add the following lines:
   [system=10]
   add path 'da*' mode 0666
 
  add path 'msdosfs/*' mode 0666
 
  I prefer 'mode 0660 group usb' in principle, but that is personal.
 
 Sure thing. But it adds an extra layer of complexity (I mean, he would have 
 to 
 be a member of the usb group or even create it if it doesn't exist) and I 
 just wanted to be raw simple and to the core.
 
 Now thanks to you reply, Pieter has more info on how to get around this :)
 
   (Edit that line to suit your needs)
  
   2) Open /etc/rc.conf and add the following line
   devfs_system_ruleset=system
  
   (Edit that line to suit your needs)
  
   3) Create a mountpoint for your pendrive
   mkdir -p ~/mnt/pen
  
   (Edit that line to suit your needs)
  
   4) Open /etc/fstab and add a line like this one
  
   /dev/da0s1  /home/your_user_name/mnt/pen msdosfs rw,noauto   0   0
 
  /dev/msdosfs/USB\ MEMORY  /home/your_user_name/mnt/pen msdosfs rw,noauto 0
  0
 
   (Edit that line to suit your needs)
  
   Reboot
  
   Done ...
 
  I prefer to have a script do the mounting, so I can add some sane flags
  to mount_msdosfs that you cannot put in options/fstab AFAICT, like
  '-m 644 -M 755 -l -o noatime -o sync -o noexec -o nosuid'.
 
  Roland
 
 There you go Pieter ... a simple example (mine) and a more in-depth one 
 (Roland's) on how to get your pendrive to work :)
 
 Thanks for improving on my simple example Roland =D

In a separate reply from Giorgos Keramidas I learned that you can put
_all_ types of options in fstab, not just the -o options! So the
improved example would be (where USER is your username):

/dev/msdosfs/USB\ MEMORY  /home/USER/mnt/pen msdosfs 
rw,noauto,noatime,sync,noexec,nosuid,-m=644,-M=755,-l,-u=USER,-g=USER  0  0

A more elegant solution would be to write a script that is called from
devd whenever a /dev/msdosfs device appears. It should then create a
directory named after the label in /home/USER/mnt, and mount the fs
there with appropriate permissions. The hard thing is to do this
correctly on a machine with multiple (concurrent) local users. 

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)


pgpXESBikMysu.pgp
Description: PGP signature


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Jeremy Chadwick
On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:
 If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
 happens. On the same laptop in the SuSE 10.1 partition, the same USB
 stick appears in Konqueror under Storage Media  and is ready to use)
 In FreeBSD, Konqueror shows nothing under Storage Media.
 Is this normal?

What shows up in your kernel message log (outside of X, usually on the
first virtual console) when you insert the stick?  It should show a
umass device being added, then a daX device being added.

-- 
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Pieter Donche

On Tue, 11 Nov 2008, Jeremy Chadwick wrote:


On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:

If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
happens. On the same laptop in the SuSE 10.1 partition, the same USB
stick appears in Konqueror under Storage Media  and is ready to use)
In FreeBSD, Konqueror shows nothing under Storage Media.
Is this normal?


What shows up in your kernel message log (outside of X, usually on the
first virtual console) when you insert the stick?  It should show a
umass device being added, then a daX device being added.


There are indeed messages:
umass0: M-SysT5 Dell Memory Key, class ...  on uhub4
da0: at umass-sim0 ...
..
da0: 60 Mb   (OK, it is a 64 Mb key)
GEOM_LABEL: Label for provider da0s1 is msdosfs/USB MEMORY

also when unplugging, some messages

$ ls -la /dev/da0s1 
shows only the character device line



--
| Jeremy Chadwickjdc at parodius.com |
| Parodius Networking   http://www.parodius.com/ |
| UNIX Systems Administrator  Mountain View, CA, USA |
| Making life hard for others since 1977.  PGP: 4BD6C0CB |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Mel
On Tuesday 11 November 2008 20:25:51 Pieter Donche wrote:
 If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
 happens. On the same laptop in the SuSE 10.1 partition, the same USB
 stick appears in Konqueror under Storage Media  and is ready to use)
 In FreeBSD, Konqueror shows nothing under Storage Media.
 Is this normal?

This requires HAL-support with KDE and the KDE MEdia Manager enabled in the 
system services. It's fragile to get working and often requires extensive 
knowledge of HAL, dbus and policykit. This is where PC-BSD can be seen as 
SuSE for linux, as it has configured all these things to work out of the box, 
that normally a FreeBSD system administrator would set up.

Alternatively, one can use the desktopbsd-tools from the ports to add some GUI 
system tray apps, among which a removable media manager.

-- 
Mel

Problem with today's modular software: they start with the modules
and never get to the software part.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread matt donovan
On Tue, Nov 11, 2008 at 2:29 PM, Jeremy Chadwick [EMAIL PROTECTED] wrote:

 On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:
  If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
  happens. On the same laptop in the SuSE 10.1 partition, the same USB
  stick appears in Konqueror under Storage Media  and is ready to use)
  In FreeBSD, Konqueror shows nothing under Storage Media.
  Is this normal?

 What shows up in your kernel message log (outside of X, usually on the
 first virtual console) when you insert the stick?  It should show a
 umass device being added, then a daX device being added.

 --
 | Jeremy Chadwickjdc at parodius.com |
 | Parodius Networking   http://www.parodius.com/ |
 | UNIX Systems Administrator  Mountain View, CA, USA |
 | Making life hard for others since 1977.  PGP: 4BD6C0CB |

 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]


yes that is normal, think Pieter is talking about Hal being enabled for
konqueror
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Pieter Donche

I installed (pkg_ad -r) desktopbsd-tools
following instructions from 
http://desktopbsd.net/wiki/doku.php?id=doc:desktopbsd_tools_in_freebsd

I did:
# chgrp wheel /dev/da0
# chmod g+w /dev/da0s1
(I believe USB key is /dev/da0)
# chgrp wheel /dev/ad0
# chmod g+w /dev/ad0s1
(anyway, did that too)
# sysctl vfs.usermount=1
# chmod 1775 /media
# ls -la / | grep media
drwxrwxr-t root wheel /media
# sysctl vfs.usermount=1

started 
$ /usr/local/bin/dbsd-traymounter

inserted an USB memory key
In Konqueror still nothing to see in /media

what's wrong??


On Tuesday 11 November 2008 20:25:51 Pieter Donche wrote:

If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
happens. On the same laptop in the SuSE 10.1 partition, the same USB
stick appears in Konqueror under Storage Media  and is ready to use)
In FreeBSD, Konqueror shows nothing under Storage Media.
Is this normal?


This requires HAL-support with KDE and the KDE MEdia Manager enabled in the
system services. It's fragile to get working and often requires extensive
knowledge of HAL, dbus and policykit. This is where PC-BSD can be seen as
SuSE for linux, as it has configured all these things to work out of the box,
that normally a FreeBSD system administrator would set up.

Alternatively, one can use the desktopbsd-tools from the ports to add some GUI
system tray apps, among which a removable media manager.

--
Mel

Problem with today's modular software: they start with the modules
   and never get to the software part.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Glen Barber
On Tue, Nov 11, 2008 at 5:31 PM, Pieter Donche [EMAIL PROTECTED] wrote:
 I installed (pkg_ad -r) desktopbsd-tools
 following instructions from
 http://desktopbsd.net/wiki/doku.php?id=doc:desktopbsd_tools_in_freebsd
 I did:
 # chgrp wheel /dev/da0
 # chmod g+w /dev/da0s1
 (I believe USB key is /dev/da0)
 # chgrp wheel /dev/ad0
 # chmod g+w /dev/ad0s1
 (anyway, did that too)
 # sysctl vfs.usermount=1
 # chmod 1775 /media
 # ls -la / | grep media
 drwxrwxr-t root wheel /media
 # sysctl vfs.usermount=1

 started $ /usr/local/bin/dbsd-traymounter
 inserted an USB memory key
 In Konqueror still nothing to see in /media

 what's wrong??


Have you edited '/etc/devfs.conf' and '/etc/devfs.rules' ?

-- 
Glen Barber

If you have any trouble sounding condescending, find a Unix user to
show you how it's done.
 --Scott Adams
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Gonzalo Nemmi
On Tuesday 11 November 2008 5:39:02 pm Pieter Donche wrote:
 On Tue, 11 Nov 2008, Jeremy Chadwick wrote:
  On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:
  If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
  happens. On the same laptop in the SuSE 10.1 partition, the same USB
  stick appears in Konqueror under Storage Media  and is ready to use)
  In FreeBSD, Konqueror shows nothing under Storage Media.
  Is this normal?
 
  What shows up in your kernel message log (outside of X, usually on the
  first virtual console) when you insert the stick?  It should show a
  umass device being added, then a daX device being added.

 There are indeed messages:
 umass0: M-SysT5 Dell Memory Key, class ...  on uhub4
 da0: at umass-sim0 ...
 ..
 da0: 60 Mb   (OK, it is a 64 Mb key)
 GEOM_LABEL: Label for provider da0s1 is msdosfs/USB MEMORY

 also when unplugging, some messages

 $ ls -la /dev/da0s1
 shows only the character device line


OK then .. let's get it to work.

1) Open /etc/devfs.rules and add the following lines:
[system=10]
add path 'da*' mode 0666

(Edit that line to suit your needs)

2) Open /etc/rc.conf and add the following line
devfs_system_ruleset=system

(Edit that line to suit your needs)

3) Create a mountpoint for your pendrive
mkdir -p ~/mnt/pen

(Edit that line to suit your needs)

4) Open /etc/fstab and add a line like this one

/dev/da0s1  /home/your_user_name/mnt/pen msdosfs rw,noauto   0   0

(Edit that line to suit your needs)

Reboot

Done ...

Now you can create a Link to device on your KDE desktop and make it point to 
your /dev/da0s1. Insert your pendrive and click on your newly 
created pendrive device link.

Remember to umount it before unplug it

Otherwise .. get ready to wrestle hal/dbus and policykit ...

Regards
-- 
Blessings
Gonzalo Nemmi
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Roland Smith
On Tue, Nov 11, 2008 at 09:04:13PM -0200, Gonzalo Nemmi wrote:
 On Tuesday 11 November 2008 5:39:02 pm Pieter Donche wrote:
  On Tue, 11 Nov 2008, Jeremy Chadwick wrote:
   On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:
   If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
   happens. On the same laptop in the SuSE 10.1 partition, the same USB
   stick appears in Konqueror under Storage Media  and is ready to use)
   In FreeBSD, Konqueror shows nothing under Storage Media.
   Is this normal?
  
   What shows up in your kernel message log (outside of X, usually on the
   first virtual console) when you insert the stick?  It should show a
   umass device being added, then a daX device being added.
 
  There are indeed messages:
  umass0: M-SysT5 Dell Memory Key, class ...  on uhub4
  da0: at umass-sim0 ...
  ..
  da0: 60 Mb   (OK, it is a 64 Mb key)
  GEOM_LABEL: Label for provider da0s1 is msdosfs/USB MEMORY

It's better to use this device, since it won't change when you plug in
an extra USB stick/drive.

  also when unplugging, some messages
 
  $ ls -la /dev/da0s1
  shows only the character device line
 
 
 OK then .. let's get it to work.
 
 1) Open /etc/devfs.rules and add the following lines:
 [system=10]
 add path 'da*' mode 0666
add path 'msdosfs/*' mode 0666

I prefer 'mode 0660 group usb' in principle, but that is personal.

 (Edit that line to suit your needs)
 
 2) Open /etc/rc.conf and add the following line
 devfs_system_ruleset=system
 
 (Edit that line to suit your needs)
 
 3) Create a mountpoint for your pendrive
 mkdir -p ~/mnt/pen
 
 (Edit that line to suit your needs)
 
 4) Open /etc/fstab and add a line like this one
 
 /dev/da0s1  /home/your_user_name/mnt/pen msdosfs rw,noauto   0   0
/dev/msdosfs/USB\ MEMORY  /home/your_user_name/mnt/pen msdosfs rw,noauto 0 0

 (Edit that line to suit your needs)
 
 Reboot
 
 Done ...

I prefer to have a script do the mounting, so I can add some sane flags
to mount_msdosfs that you cannot put in options/fstab AFAICT, like 
'-m 644 -M 755 -l -o noatime -o sync -o noexec -o nosuid'.

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)


pgpRFRZdCvxbV.pgp
Description: PGP signature


Re: FreeBSD and USBmemorystick

2008-11-11 Thread Gonzalo Nemmi
On Tuesday 11 November 2008 9:17:36 pm Roland Smith wrote:
 On Tue, Nov 11, 2008 at 09:04:13PM -0200, Gonzalo Nemmi wrote:
  On Tuesday 11 November 2008 5:39:02 pm Pieter Donche wrote:
   On Tue, 11 Nov 2008, Jeremy Chadwick wrote:
On Tue, Nov 11, 2008 at 08:25:51PM +0100, Pieter Donche wrote:
If I insert a USB memory stick in my laptop with FreeBSD 7.0 nothing
happens. On the same laptop in the SuSE 10.1 partition, the same USB
stick appears in Konqueror under Storage Media  and is ready to use)
In FreeBSD, Konqueror shows nothing under Storage Media.
Is this normal?
   
What shows up in your kernel message log (outside of X, usually on
the first virtual console) when you insert the stick?  It should show
a umass device being added, then a daX device being added.
  
   There are indeed messages:
   umass0: M-SysT5 Dell Memory Key, class ...  on uhub4
   da0: at umass-sim0 ...
   ..
   da0: 60 Mb   (OK, it is a 64 Mb key)
   GEOM_LABEL: Label for provider da0s1 is msdosfs/USB MEMORY

 It's better to use this device, since it won't change when you plug in
 an extra USB stick/drive.

   also when unplugging, some messages
  
   $ ls -la /dev/da0s1
   shows only the character device line
 
  OK then .. let's get it to work.
 
  1) Open /etc/devfs.rules and add the following lines:
  [system=10]
  add path 'da*' mode 0666

 add path 'msdosfs/*' mode 0666

 I prefer 'mode 0660 group usb' in principle, but that is personal.

Sure thing. But it adds an extra layer of complexity (I mean, he would have to 
be a member of the usb group or even create it if it doesn't exist) and I 
just wanted to be raw simple and to the core.

Now thanks to you reply, Pieter has more info on how to get around this :)

  (Edit that line to suit your needs)
 
  2) Open /etc/rc.conf and add the following line
  devfs_system_ruleset=system
 
  (Edit that line to suit your needs)
 
  3) Create a mountpoint for your pendrive
  mkdir -p ~/mnt/pen
 
  (Edit that line to suit your needs)
 
  4) Open /etc/fstab and add a line like this one
 
  /dev/da0s1  /home/your_user_name/mnt/pen msdosfs rw,noauto   0   0

 /dev/msdosfs/USB\ MEMORY  /home/your_user_name/mnt/pen msdosfs rw,noauto 0
 0

  (Edit that line to suit your needs)
 
  Reboot
 
  Done ...

 I prefer to have a script do the mounting, so I can add some sane flags
 to mount_msdosfs that you cannot put in options/fstab AFAICT, like
 '-m 644 -M 755 -l -o noatime -o sync -o noexec -o nosuid'.

 Roland

There you go Pieter ... a simple example (mine) and a more in-depth one 
(Roland's) on how to get your pendrive to work :)

Thanks for improving on my simple example Roland =D

Regards
-- 
Blessings
Gonzalo Nemmi
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]