Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2008 00:17:36 +0100
From:      Roland Smith <rsmith@xs4all.nl>
To:        Gonzalo Nemmi <gnemmi@gmail.com>
Cc:        Pieter Donche <Pieter.Donche@ua.ac.be>, freebsd-questions@freebsd.org
Subject:   Re: FreeBSD and USBmemorystick
Message-ID:  <20081111231736.GA41416@slackbox.xs4all.nl>
In-Reply-To: <200811112104.13257.gnemmi@gmail.com>
References:  <Pine.GSO.4.63.0811112006430.700@hmacs.cmi.ua.ac.be> <20081111192900.GA5398@icarus.home.lan> <Pine.GSO.4.63.0811112032500.700@hmacs.cmi.ua.ac.be> <200811112104.13257.gnemmi@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--C7zPtVaVf+AK4Oqc
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
> >
>=20
> OK then .. let's get it to work.
>=20
> 1) Open /etc/devfs.rules and add the following lines:
> [system=3D10]
> 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)
>=20
> 2) Open /etc/rc.conf and add the following line
> devfs_system_ruleset=3D"system"
>=20
> (Edit that line to suit your needs)
>=20
> 3) Create a mountpoint for your pendrive
> mkdir -p ~/mnt/pen
>=20
> (Edit that line to suit your needs)
>=20
> 4) Open /etc/fstab and add a line like this one
>=20
> /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)
>=20
> Reboot
>=20
> 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=20
'-m 644 -M 755 -l -o noatime -o sync -o noexec -o nosuid'.

Roland
--=20
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)

--C7zPtVaVf+AK4Oqc
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkkaEpAACgkQEnfvsMMhpyVrigCfRP4Qm1DkeB4UbsGHViDqw8yB
YEMAnR4/eLqpi0+o3VeIcs0ZRAi3+dA3
=iX4v
-----END PGP SIGNATURE-----

--C7zPtVaVf+AK4Oqc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081111231736.GA41416>