From owner-freebsd-questions@FreeBSD.ORG Fri May 21 19:58:03 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E927B106566C for ; Fri, 21 May 2010 19:58:03 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id A9E788FC1F for ; Fri, 21 May 2010 19:58:03 +0000 (UTC) Received: from r55.edvax.de (port-92-195-249-33.dynamic.qsc.de [92.195.249.33]) by mx02.qsc.de (Postfix) with ESMTP id B31121E24E; Fri, 21 May 2010 21:58:01 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id o4LJw0tr001436; Fri, 21 May 2010 21:58:01 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 21 May 2010 21:58:00 +0200 From: Polytropon To: Gary Kline Message-Id: <20100521215800.3a8c9da3.freebsd@edvax.de> In-Reply-To: <20100521190340.GA66314@thought.org> References: <20100521190340.GA66314@thought.org> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: how do i use a memory stick on freebsd? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 May 2010 19:58:04 -0000 On Fri, 21 May 2010 12:03:42 -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. It IS possible, and quite easy. > 7.3, dell, plenty of disk, and yes, > i know where the usb slot it! It's right beneath the "4X" cup holder, I know. :-) > do i need to put something in /usr/rc.conf? You mean /etc/rc.conf? Usually not. The /etc/fstab file is where you can add a default mountpoint and mount options for the USB stick. Usually, the device used to access USB sticks is /dev/da (Direct Access), and I think it will be /dev/da0. Check the output of dmesg or the last lines in the system log which will reveal the correct device. FAT file systems correspond to a slice on the device, /dev/da0s1 for example. You can mount this device. If it is your first time, play with it, e. g. # mount_msdosfs -o ro /dev/da0s1 /mnt # ls /mnt Is the intended content there? Good. # umount /mnt Now add a rule to your file system table, making mount attempts more easy. /dev/da0s1 /media/stick msdosfs rw,noauto,noatime 0 0 This could be a valid entry, depending on the existance of the directory. Keep in mind: In order to mount USB sticks as a user you need sufficient permissions to the involved files, as well as to own the mount directory, and finally have vfs.usermount=1 in /etc/sysctl.conf. In case you mount as root (or prefix the mount command with sudo, ur use the system's su), you don't need to pay this attention. You should also read man mount_msdosfs and see if you want to use -m and -M: The old-fashioned FAT file systems don't know file permissions, so files on the USB stick will have the +x attribute, pretending they were executables (which they usually aren't); -m and -M apply masks to "cut away" this mis-information. It can also be possible that you need the "large" option -o large. Feel free to also read this: http://www.freebsd.org/doc/en/books/handbook/mount-unmount.html http://www.freebsd.org/doc/en/books/handbook/usb-disks.html In any case, keep an eye on umounting the USB stick before removing it. PCs are bad at hot plug operations. :-) > build a driver or > utility? This is FreeBSD, not "Windows". :-) > or what? Or nothing. :-) If you want "nothing", KDE and Gnome (and Xfce, too) allow the use of automounting USB devices (if sufficient permissions allow this), through the means of HAL, DBUS and PolicyKit. But that's too complicated to be explained in a man's life. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...