From owner-freebsd-questions@FreeBSD.ORG Mon Oct 26 00:32:59 2009 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 42FF21065694 for ; Mon, 26 Oct 2009 00:32:59 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from rosebud.otenet.gr (rosebud.otenet.gr [83.235.67.32]) by mx1.freebsd.org (Postfix) with ESMTP id BFB818FC12 for ; Mon, 26 Oct 2009 00:32:58 +0000 (UTC) Received: from pulstar.local (athedsl-4472418.home.otenet.gr [94.71.126.82]) by rosebud.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id n9Q0Wu4W032551; Mon, 26 Oct 2009 02:32:56 +0200 Message-ID: <4AE4EE38.4050609@otenet.gr> Date: Mon, 26 Oct 2009 02:32:56 +0200 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: rob1940@gmail.com References: In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: WD External Disc Drive 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: Mon, 26 Oct 2009 00:32:59 -0000 Rob Hurle wrote: > Dear All, > > This may sound like a Windows problem, but please read on. I made a > mistake and bought a WD "My Passport" external 350GB disc drive for > use on several Windows machines, on some of which I don't have admin > access, and a couple of FreeBSD systems. > > On first use on Windows the disc shows up only as a virtual CD (I > assume this is the firmware), "unlock.exe" has to be run and the > software installed (admin privileges necessary). Once it's unlocked > and the software installed, the big disc appears, the software can be > uninstalled, and the big disc reformatted as NTFS. From then on, the > virtual CD can be ignored and the big disc used on any Windows system. > > Now to FreeBSD. The newly formatted (as NTFS) disc appears as two > devices - /dev/cd0 (never seen this before) This is how a USB cdrom appears to FreeBSD - as a SCSI device. No problem there. > and /dev/da0s1 (the normal > USB disc drive device). They can be mounted as follows: > > freebsd [10:45] ~#mount_udf /dev/cd0 /mnt > freebsd [10:45] ~#mount /usb0 > > (/etc/fstab describes the NTFS file system type, and the virtual CD is > a UDF file system). We now have: > > freebsd [10:46] ~#df > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/cd0 582962 582962 0 100% /mnt > /dev/da0s1 311877845 2332729 309545116 1% /usb0 > > If we look at each device, the virtual CD has the WD software, as expected: > > freebsd [10:45] ~#ll /mnt > total 6300 > drwxr-xr-x 3 501 staff 2048 12 Sep 05:32 Extras > -rwxrwxrwx 1 501 staff 3680544 5 Sep 08:20 Unlock.exe > drwxrwxrwx 5 501 staff 2048 5 Sep 08:30 User Manuals > drwxr-xr-x 3 501 staff 2048 12 Sep 05:28 WD SmartWare > -rwxrwxrwx 1 501 staff 2770208 5 Sep 08:20 WD SmartWare.exe > -rwxrwxrwx 1 501 staff 695 19 Jun 03:06 What is this.html > -rwxrwxrwx 1 501 staff 88 19 Jun 07:12 autorun.inf > > No problem. Now for the FreeBSD problem. If we look at what's on the > big disc (newly formatted as NTFS on a Windows system): > > freebsd [10:45] ~#ll /usb0 > total 75200 > -rwxrwxrwx 1 root wheel 2560 23 Apr 2009 $AttrDef > -rwxrwxrwx 1 root wheel 0 25 Oct 14:37 $BadClus > -rwxrwxrwx 1 root wheel 9746184 23 Apr 2009 $Bitmap > -rwxrwxrwx 1 root wheel 8192 25 Oct 14:37 $Boot > drwxrwxrwx 1 root wheel 0 25 Oct 14:37 $Extend > -rwxrwxrwx 1 root wheel 67108864 25 Oct 14:37 $LogFile > -rwxrwxrwx 1 root wheel 4096 25 Oct 14:37 $MFTMirr > -rwxrwxrwx 1 root wheel 0 23 Apr 2009 $Secure > -rwxrwxrwx 1 root wheel 131072 23 Apr 2009 $UpCase > -rwxrwxrwx 1 root wheel 0 25 Oct 14:37 $Volume > drwxrwxrwx 1 root wheel 0 25 Oct 15:54 MyStuff > drwxrwxrwx 1 root wheel 0 25 Oct 16:23 RECYCLER > drwxrwxrwx 1 root wheel 0 25 Oct 14:37 System Volume > Information > > The only thing that shows up in Windows is the "MyStuff" directory, > which I put there. I can copy anything from "MyStuff" to anywhere > else on the FreeBSD system, no worries. But if I attempt to copy a > new file into the "MyStuff" directory, I get the following: > > freebsd [10:46] ~#cp ~/tmp/test /usb0/MyStuff > cp: /usb0/MyStuff/test: No such file or directory > freebsd [11:08] ~# > > You are using the ntfs driver that is built-in the FreeBSD kernel. This is read only - you will be able to read from the disc, but not write to it. In order to be able to write to this disc, install sysutils/fusefs-ntfs and use the ntfs-3g command to mount your disk. If you are not going to use the disc to transfer data between Windows and FreeBSD, I would advise you to repartition the disk and create an NTFS partition for your windows data and a FreeBSD partition in UFS format. Just backup any data, and use windows disk management to create an appropriately sized NTFS partition, leaving the rest of the disk unallocated. Then use fdisk and bsdlabel (or sysinstall) in FreeBSD to create a slice and partition for FreeBSD.