From owner-freebsd-questions@FreeBSD.ORG Sat Feb 17 07:03:06 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 36E2F16A41F for ; Sat, 17 Feb 2007 07:03:06 +0000 (UTC) (envelope-from grog@lemis.com) Received: from ext-gw.lemis.com (ext-gw.lemis.com [150.101.14.10]) by mx1.freebsd.org (Postfix) with ESMTP id 7333D13C4A7 for ; Sat, 17 Feb 2007 07:03:05 +0000 (UTC) (envelope-from grog@lemis.com) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.135]) by ext-gw.lemis.com (Postfix) with ESMTP id EAC3F132072; Sat, 17 Feb 2007 17:33:03 +1030 (CST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id E65D91A9C97; Sat, 17 Feb 2007 17:33:03 +1030 (CST) Date: Sat, 17 Feb 2007 17:33:03 +1030 From: Greg 'groggy' Lehey To: Drew Jenkins Message-ID: <20070217070303.GI36295@wantadilla.lemis.com> References: <454499.22993.qm@web62211.mail.re1.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="8YDLdOu/DaKXZo9W" Content-Disposition: inline In-Reply-To: <454499.22993.qm@web62211.mail.re1.yahoo.com> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 VoIP: sip:0871270137@sip.internode.on.net WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-questions@freebsd.org Subject: Re: Can I Mount A Windoze 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: Sat, 17 Feb 2007 07:03:06 -0000 --8YDLdOu/DaKXZo9W Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [Format recovered--see http://www.lemis.com/email/email-format.html] Single line message. On Saturday, 17 February 2007 at 13:46:28 +0700, Drew Jenkins wrote: > Newbie question here. I just want to make sure I don't screw > anything up. I have two hard drives in my box...one for Windoze, one > for FBSD. Can I mount the former from FBSD and copy over files? Well, you mount file systems, not disks. But yes, using mount_ntfs (or, if your Microsoft box is very old, mount_msdos). In your fstab you might have: /dev/ad2s2 /C: ntfs rw 0 0 If you now create a directory /C:, and assuming that the drive partition is correct, this file system will be mounted automatically when you start the system. You can mount or unmount it manually with 'mount /C;' and 'umount /C:'. Which disk? Look at the device nodes in /dev: $ ls -l /dev/ad* crw-r----- 1 root operator 4, 11 Feb 3 08:41 /dev/ad2 crw-r----- 1 root operator 4, 12 Feb 3 08:41 /dev/ad2s1 crw-r----- 1 root operator 4, 13 Feb 3 08:41 /dev/ad2s2 crw-r----- 1 root operator 4, 14 Feb 3 08:41 /dev/ad2s3 crw-r----- 1 root operator 4, 15 Feb 3 08:41 /dev/ad2s4 crw-r----- 1 root operator 4, 16 Feb 3 08:44 /dev/ad2s4a crw-r----- 1 root operator 4, 17 Feb 3 08:42 /dev/ad2s4b crw-r----- 1 root operator 4, 18 Feb 3 08:41 /dev/ad2s4c crw-r----- 1 root operator 4, 19 Feb 3 08:42 /dev/ad2s4d The node names ending in letters are BSD partitions; ad2 is the whole drive one of the others is the Microsoft partition. fdisk will tell you which one: $ fdisk ad2 Information from DOS bootblock is: The data for partition 1 is: sysid 6 (0x06),(Primary 'big' DOS (>= 32MB)) The data for partition 2 is: sysid 7 (0x07),(OS/2 HPFS, NTFS, QNX-2 (16 bit) or Advanced UNIX) The data for partition 3 is: sysid 219 (0xdb),(CP/M, Concurrent CP/M, Concurrent DOS or CTOS) The data for partition 4 is: sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD) I've removed unnecessary output from this example. > Do I navigate it just like a FBSD disk..."cd", "cp", etc? In principle, yes. Microsoft has this stupid idea of embedding spaces in file names. You'll see how stupid this is when you have to navigate them using UNIX commands: $ ls -l /C:/WINDOWS ... drwxr-xr-x 0 yana home 0 Dec 9 2004 Connection Wizard ... drwxr-xr-x 0 yana home 0 Dec 9 2004 Driver Cache $ cd /C:/WINDOWS/Connection Wizard bash: cd: /C:/WINDOWS/Connection: No such file or directory $ cd '/C:/WINDOWS/Connection Wizard' $ This will work if you haven't redefined cd as a macro, like I have done. When I try this, I still get the error message. This problem will bite you everywhere you go. You can minimize it by not using spaces in file names yourself, but you'll constantly have problems with it otherwise. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers. --8YDLdOu/DaKXZo9W Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFF1qinIubykFB6QiMRAgrtAJ0Z3OW0YYRDA32L4ZZwGOaSNZOY4wCgp/ss /PcQwyKnV9S6vu2qFHpfYGE= =ioy5 -----END PGP SIGNATURE----- --8YDLdOu/DaKXZo9W--