X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Thu, 26 Aug 2010 01:42:53 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: associating device names with cygdrive directories Message-ID: <20100826054253.GL9152@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <4C758020 DOT 4070501 AT bellsouth DOT net> <4C758C01 DOT 3050109 AT bopp DOT net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C758C01.3050109@bopp.net> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Wed, Aug 25, 2010 at 04:32:49PM -0500, Jeremy Bopp wrote: >On 8/25/2010 3:42 PM, Charles D. Russell wrote: >> Maybe it won't always work, but with debian "mount" I get the following >> line of output, which tells me what I want to know (and more): >> >> /dev/sda1 on /live/image type vfat >> (rw,noatime,fmask=0022,dmask=0022,allow_utime=177777,codepage=cp437,iocharset=utf8) >> >> >> I infer from the replies that in Cygwin there is no easier way to find >> my way around in /dev than the way I was doing it, though I realize >> "strings" is a better choice than "od". With dd >> if=/dev/sda|strings|less I discovered that /dev/sda is actually my hard >> drive. > >How would you handle the case where you have more than a single mount >which looks like that? e.g.) > >/dev/sda1 on /live/image1 type vfat >(rw,noatime,fmask=0022,dmask=0022,allow_utime=177777,codepage=cp437,iocharset=utf8) >/dev/sdb1 on /live/image2 type vfat >(rw,noatime,fmask=0022,dmask=0022,allow_utime=177777,codepage=cp437,iocharset=utf8) > >I think part of what Chris is saying is that you typically don't know >for sure how Linux will associate a particular hardware device with a >particular node in the device filesystem. No, actually what I was saying is that the mount command doesn't know which device is associated with a CD or disk. Something had to *generate* a command like: mount -t vfat /dev/sda1 /live/image That information usually comes from /etc/fstab and /etc/fstab would probably be generated by something which scanned the available devices to produce the file. Sure, when you type "mount" you will see mounted directories but cygdrive directories aren't really mounted in the strictest sense. The mount table is one place where Cygwin and Linux are quite different. cgf -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple