Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jan 2008 19:03:48 +0100
From:      Roland Smith <rsmith@xs4all.nl>
To:        Mario Lobo <mlobo@digiart.art.br>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Fixing a USB disk to a specific device name
Message-ID:  <20080121180348.GA52225@slackbox.xs4all.nl>

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

--bp/iNruPH9dso1Pn
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 21, 2008 at 02:16:50PM -0300, Mario Lobo wrote:
> On Monday 21 January 2008 14:05:04 Mike Bristow wrote:
> > On Mon, Jan 21, 2008 at 05:55:51PM +0100, Roland Smith wrote:
> > > On Mon, Jan 21, 2008 at 08:56:32AM +0400, Rakhesh Sasidharan wrote:
> > > >> It is possible, but not as daX. Use the glabel(8) utility to label
> > > >> your disks. They will show up as /dev/label/<yourlabel>
> > >
> > > On 7.0-PRERELEASE, 'options GEOM_LABEL' is built into of the GENERIC
> > > kernel, so it shouldn't be necessary there.
> >
> > Note that you can use UFS (and other filesystems labeling) too:  for
> > example. 'newfs -L bobs_disk' will cause the device containing it to ap=
pear
> > as /dev/ufs/bobs_disk.
> >
> > This approach may be better for removable disks; it'll play better with
> > other OSs, for example.
>=20
> I simply put;
>=20
> /dev/da0s1		/PenDrive	msdosfs	rw,noauto	0	0
>=20
> in fstab. After pluging it in, i type=20
>=20
> mount /PenDrive


Keep in mind that this only works for _one_ drive. As soon as you have
two, this won't work correctly.

If you have multiple drives, you should label them (with newfs_msdos or
mtools) e.g. 'diskA' and 'diskB'.

With GEOM_LABEL you'll then get /dev/msdosfs/diskA and /dev/msdosfs/diskB,
which you can then put in your /etc/fstab;

/dev/msdosfs/diskA	/mnt/diskA	msdosfs	rw,noauto	0	0
/dev/msdosfs/diskB	/mnt/diskB	msdosfs	rw,noauto	0	0

Of course you need to own /mnt/diskX if you want to mount it as a normal us=
er.

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)

--bp/iNruPH9dso1Pn
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQFHlN6DEnfvsMMhpyURAiuKAJwIW9MJWn5m1IoqT/bO3X9WfSZBiQCgn7Fi
O8gAEAktpgVXopYUT0kZy8E=
=qqPn
-----END PGP SIGNATURE-----

--bp/iNruPH9dso1Pn--



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