From owner-freebsd-questions@FreeBSD.ORG Sat Jul 21 14:26:06 2007 Return-Path: Delivered-To: questions@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6D1D16A41A for ; Sat, 21 Jul 2007 14:26:06 +0000 (UTC) (envelope-from doublef-ctm@yandex.ru) Received: from smtp4.yandex.ru (smtp4.yandex.ru [213.180.223.136]) by mx1.freebsd.org (Postfix) with ESMTP id EAFF313C458 for ; Sat, 21 Jul 2007 14:26:05 +0000 (UTC) (envelope-from doublef-ctm@yandex.ru) Received: from [85.172.95.92] ([85.172.95.92]:56061 "EHLO shark" smtp-auth: "doublef-ctm" TLS-CIPHER: TLS-PEER-CN1: ) by mail.yandex.ru with ESMTP id S737791AbXGUOGa (ORCPT ); Sat, 21 Jul 2007 18:06:30 +0400 X-Comment: RFC 2476 MSA function at smtp4.yandex.ru logged sender identity as: doublef-ctm Received: by shark (Postfix, from userid 1000) id 4519E186F1; Sat, 21 Jul 2007 18:06:28 +0400 (MSD) Date: Sat, 21 Jul 2007 18:06:28 +0400 From: Sergey Zaharchenko To: Tim Baker Message-ID: <20070721140628.GA10510@shark.localdomain> References: <3B46D029C27D7B44811CEB84AD02DDA6010D4A00@CFPF28.commandfinancial.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DocE+STaALJfprDB" Content-Disposition: inline In-Reply-To: <3B46D029C27D7B44811CEB84AD02DDA6010D4A00@CFPF28.commandfinancial.com> X-Listening-To: Silence User-Agent: Mutt/1.5.15 (2007-04-06) Cc: questions@FreeBSD.org Subject: Re: USB dev lock X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Jul 2007 14:26:06 -0000 --DocE+STaALJfprDB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello Tim! Sat, Jul 21, 2007 at 08:12:46AM -0400 you wrote: > I have a PC running FreeBSD 6.1. We use a 1GB USB key to transfer files > from our desktop PC's to this purposed machine. >=20 > Problem is, when inserting the key, it may or may not select the same > device name. For ease of use, and too many newbies > that don't want to learn, I'd like the device to show as the same name > every time I mount it. >=20 > I have added /dev/da0 with a mountpoint of /flash in the /etc/fstab, > but don't want to deal with adding additional lines and=20 > mountpoints either. I'd like the command mount /flash to work with any > one of the 10 1GB keys I purchased. You might want to kldload geom_label.ko (or compile your kernel with the appropriate option), then label all the USB key filesystems with the same identifier, and then they can be accessed as /dev/msdosfs/YOUR-LABEL-HERE. The label is the -L argument to newfs_msdos or the value in the `Volume Label' editbox in the Windows formatting program. geom_label also works similarly on other filesystems. For example, my USB flash shows up as /dev/msdosfs/DOUBLEF and /etc/fstab has the line /dev/msdosfs/DOUBLEF /home/df/flash msdosfs rw,noauto,... HTH, --=20 DoubleF No virus detected in this message. Ehrm, wait a minute... /kernel: pid 56921 (antivirus), uid 32000: exited on signal 9 Oh yes, no virus:) --DocE+STaALJfprDB Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGohLjwo7hT/9lVdwRApNTAJwKmCwK4eOGw9atpesoOon+Jtp7iQCfQXan QU4mzQG6fcawInLoVzHHq/w= =5zqc -----END PGP SIGNATURE----- --DocE+STaALJfprDB--