Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Oct 2009 02:32:56 +0200
From:      Manolis Kiagias <sonicy@otenet.gr>
To:        rob1940@gmail.com
Cc:        freebsd-questions@freebsd.org
Subject:   Re: WD External Disc Drive
Message-ID:  <4AE4EE38.4050609@otenet.gr>
In-Reply-To: <aab0909a0910251718q4dc26baeu7c0a452add98d783@mail.gmail.com>
References:  <aab0909a0910251718q4dc26baeu7c0a452add98d783@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



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