delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/08/26/11:03:27

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 26 Aug 2004 11:03:09 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Doctor Bill <docbill AT gmail DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: Why umount -A is a really bad idea
In-Reply-To: <23bcb8700408260629433c7dbd@mail.gmail.com>
Message-ID: <Pine.GSO.4.61.0408261101080.6014@slinky.cs.nyu.edu>
References: <412CFBCB DOT 3040808 AT breame DOT com> <20040825210724 DOT GG29527 AT mikee DOT ath DOT cx> <Pine DOT GSO DOT 4 DOT 61 DOT 0408251750380 DOT 6014 AT slinky DOT cs DOT nyu DOT edu> <412DC006 DOT 8090907 AT x-ray DOT at> <23bcb8700408260629433c7dbd AT mail DOT gmail DOT com>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

Or, perhaps, a better solution would be to implement a mount table a la
Unix, as CGF has been advocating for years.  Any takers?
	Igor
P.S. <http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks.

On Thu, 26 Aug 2004, Doctor Bill wrote:

> It seems like there is endless confusions with cygwin mount's because
> the name of the command is the same as the Unix mount command, and
> some of the command line options are similar.  Has anyone given
> serious consideration to renaming the command to something like,
> cygmount?
>                                         Bill
>
> On Thu, 26 Aug 2004 12:48:38 +0200, Reini Urban <rurban AT X-XXX DOT XX> wrote:
> > Igor Pechtchanski schrieb:
> > > On Wed, 25 Aug 2004, Mike wrote:
> > >>On Wed, 25 Aug 2004, Colin JN Breame wrote:
> > >>>I tried this once, just to see what would happen.  I then spent the
> > >>>next hour restoring the mount points.  I've learnt a valuable
> > >>>lesson...
> > >>
> > >>Why would a 'mount -a' not work after your 'umount -a' to restore the
> > >>mounts?
> > >>
> > >>Mike
> > >
> > > Because Cygwin's mounts aren't the same as Unix mounts.  The mount and
> > > umount commands on Cygwin modify the mount table directly, so that a
> > > umount really is permanent.  However (and this concerns the OP, too), you
> > > can save the mount table as the output of "mount -m", which you can later
> > > use to restore the mounts.
> >
> > not really.
> > I used to do that quite often, but since /bin and /usr/bin are not known
> > to cygwin anymore after umount -a (and not in the path) I came with this
> > workaround.
> >
> > #!/bin/sh
> > # save mounts
> > BIN=`cygpath -w /bin | sed 's|\\\\|/|g'`
> > mount -m | sed "s|^mount|$BIN/mount|" | tee savemounts
> > umount -a
> >
> > # nano or $EDITOR will not work now to fix savemounts!
> >
> > # restore
> > .. savemounts
> >
> > it will look like "f:/cygnus/bin/mount" now. This will be found, on NT
> > at least.
> >
> >
> > > For those unfortunate enough to have done a "umount -a" without saving the
> > > mounts via "mount -m", the minimum necessary mounts for Cygwin to work are
> > >
> > > mount -sbc /cygdrive
> > > mount -fsb c:/cygwin /
> > > mount -fsb c:/cygwin/bin /usr/bin
> > > mount -fsb c:/cygwin/lib /usr/lib
> > >
> > > (that is provided that you installed Cygwin in c:/cygwin).

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019