public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Mount Confusion -- the tallest pique in the world? ;-)
@ 2003-10-30 20:20 Lee D. Rothstein
  2003-10-31 18:42 ` Igor Pechtchanski
  0 siblings, 1 reply; 6+ messages in thread
From: Lee D. Rothstein @ 2003-10-30 20:20 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1307 bytes --]

Either Cygwin or I be confused. (I'm betting on "I". ;-))

I have deleted '/tmp' ('d:/Cygwin/tmp' -- using Explorer)
and issued: 'umount /tmp' and 'mount 'e:\tmp /tmp' repeatedly.

All the other mounts to '/' appear in an 'ls' of '/',
but '/tmp' ('e:/tmp'), does not.

While the apps seem to find 'e:/tmp', should I be worried?

Prior to my doing any of the above (w/ Cygwin root at
'c:/_Programs/Cygwin'), I've had recurring instances
of something (apps?, 'setup.exe?, what?) creating 'tmp'
and more frequently 'var' on both my 'c:' and 'e:' drives.
This problem seems to have subsided since I moved the
Cygwin root directory from 'c:/_Programs/Cygwin'
to D:/Cygwin'.

Also, after I moved Cygwin, despite changing all the
references in the profile and Windows environment variables,
*and* reinstalling the whole of Cygwin, "Cygwin" "insisted"
on looking at the C/_Programs... : root rather than the
D:/Cygwin... directory

Anybody know what's causing this?

Note that at the end of the attached 'cycheck -shv', there is
the following error message:

cygcheck: dump_sysinfo: GetVolumeInformation() failed: 1

which seems to be coincidental when it checks the 'a:/' floppy drive.

Thanks,

Lee


--
Lee D. Rothstein -- lee@veritech.com
VeriTech -- 603-424-2900
7 Merry Meeting Drive
Merrimack, NH 03054-2934

[-- Attachment #2: profile#2003-10-30#09.33.51 --]
[-- Type: application/octet-stream, Size: 11852 bytes --]

#!/usr/bin/bash

# Some resources...

# Customizing Your Shell: http://www.dsl.org/cookbook/cookbook_5.html#SEC69
# Consistent BackSpace and Delete Configuration:
#   http://www.ibb.net/~anne/keyboard.html
# The Linux Documentation Project: http://www.tldp.org/
# The Limux Cookbook: http://www.tldp.org/LDP/linuxcookbook/html/

# Setup some default paths.  Note that this order will allow user installed
#  software to override 'system' software

# If you wish to change the path for all users, it is recommended you edit
#  /etc/bash.bashrc

# If you wish to change the path on a user by user basis, it is recommended you
#  edit ~/.bashrc

#
# Cygwin Bash profile
#
# Goes in the ''/etc'' directory
#
# Example of cygpath with textpad (http://textpad.com) which
# is semi-hip Win-32 app.
#
#  textpad $(cygpath --mixed $SCRIPTS/$1)
#    'textpad' accepts '/' in lieu of '\' but doesn't like
#     '/cygdrive...' or other  Cygwin '/' rooted references in lieu
#     of 'c:/', ... 'z:/'
#

# 2003-04-21
# export CYGWIN="nobinmode ntsec tty"
export CYGWIN=""

# 2003-02-24
# Changes to bin required by use of 'rxvt' for shell windows
#   - needed null-based $PATH definition to avoid doubling
#     '$PATH' every time 'bash' ('rxvt') was invoked from a
#     'bash' window

#for drive in c d e f g h x y a s ; do umount ${drive}:\\ ; mount ${drive}:\\ /z${drive} ; done
umount 'e:\\tmp' ; mount 'e:\\tmp' /tmp

export PATH="/usr/bin:/etc:."
export PATH="$PATH:/usr/X11R6/bin"
export PATH="$PATH:/usr/sbin"
export PATH="$PATH:/zc/_Programs/ACDSee"
export PATH="$PATH:/zc/_Programs/CLI/bin"
export PATH="$PATH:/zc/_Programs/CLI/InfoZip"
export PATH="$PATH:/zc/_Programs/CLI/List"
export PATH="$PATH:/zc/_Programs/CLI/Net_Bin"
export PATH="$PATH:/zc/_Programs/CLI/RAR32"
export PATH="$PATH:/zc/_Programs/ImageSpy"
export PATH="$PATH:/zc/_Programs/J2v1.3.1/bin"
export PATH="$PATH:/zc/_Programs/NetTerm"
export PATH="$PATH:/zc/_Programs/TrueType_Renamer"
export PATH="$PATH:/zc/_Programs/WIN_BIN_32"
export PATH="$PATH:/zc/Progra~1/Intern~1"
export PATH="$PATH:/zc/progra~1/micros~2/office"
export PATH="$PATH:/Scripts"
export PATH="$PATH:/zc/_Programs/TextPad"
export PATH="$PATH:/zc/_Programs/CLI/FOSS/bin"
export PATH="$PATH:/zc/WINNT/system32/WBEM"
export PATH="$PATH:/zc/WINNT/system32"
export PATH="$PATH:/zc/WINNT"
export PATH="$PATH:/{h}/_Scripts"

unset DOSDRIVE
unset DOSDIR

echo "---"
echo "Mounts:"
mount
echo "---"
export USER="`id -un`"
echo "User is: " "$USER"


for i in /etc/profile.d/*.sh ; do
  if [ -f $i ]; then
    . $i
  fi
done

export MANPATH="/usr/local/man:/usr/man:/usr/share/man:/usr/autotool/devel/man"
export MANPATH="$MANPATH:/usr/ssl/man"
export MANPATH="$MANPATH:/usr/X11R6/man"
export MANPATH="$MANPATH:/usr/X11R6/share/man"
export MANPATH="$MANPATH:/usr/src/cvs-1.11.0/man"
export MANPATH="$MANPATH:/usr/src/diffutils-2.8.4-1/man"
export MANPATH="$MANPATH:/usr/src/fileutils-4.1-2/man"
export MANPATH="$MANPATH:/usr/src/ghostscript-7.05/man"
export MANPATH="$MANPATH:/usr/src/groff-1.18.1-2/man"
export MANPATH="$MANPATH:/usr/src/lilypond-2.0.1/Documentation/man"
export MANPATH="$MANPATH:/usr/src/man-1.5j-2/man"
export MANPATH="$MANPATH:/usr/src/opengl-1.1.0/glut-3.7.3/man"
export MANPATH="$MANPATH:/usr/src/procmail-3.22-8/man"
export MANPATH="$MANPATH:/usr/src/rcs-5.7-3/man"
export MANPATH="$MANPATH:/usr/src/sh-utils-2.0.15-4/man"
export MANPATH="$MANPATH:/usr/src/sunrpc-4.0-1/man"
export MANPATH="$MANPATH:/usr/src/sunrpc-4.0-1/secure_rpc/man"
export MANPATH="$MANPATH:/usr/src/SWI-Prolog-5.2.6-1/man"
export MANPATH="$MANPATH:/usr/src/SWI-Prolog-5.2.6-1/packages/xpce/man"
export MANPATH="$MANPATH:/usr/src/SWI-Prolog-5.2.6-1/packages/xpce/prolog/lib/man"
export MANPATH="$MANPATH:/usr/src/sysvinit-2.84-4/man"
export MANPATH="$MANPATH:/usr/src/tetex-bin-2.0.2-2/libs/ncurses/man"
export MANPATH="$MANPATH:/usr/src/tetex-bin-2.0.2-2/texk/web2c/man"

export INFOPATH="/usr/local/info:/usr/info:/usr/share/info:/usr/autotool/devel/info:/usr/autotool/stable/info"
export INFOPATH="$INFOPATH:/lib/db/info"
export INFOPATH="$INFOPATH:/usr/autotool/devel/share/info"
export INFOPATH="$INFOPATH:/usr/autotool/stable/share/info"
export INFOPATH="$INFOPATH:/usr/lib/db/info"
export INFOPATH="$INFOPATH:/usr/src/gcc-3.2-3/libjava/gnu/java/beans/info"
export INFOPATH="$INFOPATH:/usr/src/python-2.2.2-7/Doc/info"
export INFOPATH="$INFOPATH:/usr/src/python-2.2.3-2/Doc/info"
export INFOPATH="$INFOPATH:/usr/src/python-2.3-2/Doc/info"
export INFOPATH="$INFOPATH:/usr/src/SWI-Prolog-5.2.6-1/packages/xpce/man/info"
export INFOPATH="$INFOPATH:/usr/src/tetex-bin-2.0.2-2/utils/texinfo/info"
export INFOPATH="$INFOPATH:/usr/src/texinfo-4.2-4/info"

export TZ=EST5EDT
export MAKE_MODE="unix" # Default to unix make mode

# Recommended that cvs uses ssh for it's remote shell
# environment
export CVS_RSH="/bin/ssh"

# Patches to Cygwin always appreciated ;)
# export CVSROOT=":pserver:anoncvs@sources.redhat.com:/cvs/src"

# Set Prompt

# Original to be used as reference
# export PS1='\[\033]0;\w\007
# \033[32m\]\u@\h \[\033[33m\w\033[0m\]
# $ '

export PS1='\[\033]0;\w\007 \d \T \u@\h
\033[32m\] \[\033[33m\w\033[0m\]
$ '

# Define default printer
case "`uname -s`" in
CYGWIN_NT-*)
  PRINTER="`regtool -q get '\user\Software\Microsoft\Windows NT\CurrentVersion\Windows\Device' | sed 's/,.*$//'`"
  ;;
CYGWIN_9?-*)
  PRINTER="`regtool -q get '\config\System\CurrentControlSet\Control\Print\Printers\Default'`"
  ;;
esac

echo "---"
echo "kernel-name nodename kernel-release kernel-version machine-HW-name processor-type hardware-platform OS"
uname -a

# Make sure we start in home
cd "$HOME"

# Check to see if mkpasswd/mkgroup needs to be run try and cut down the emails
#   about this on the lists!
# If this message keeps appearing and you are sure it's a mistake (ie, don't
#   email about it!), comment out the test below.
case "`id -ng`" in
mkpasswd )
  echo "Your group is currently \"mkpasswd\".  This indicates that"
  echo "the /etc/passwd (and possibly /etc/group) files should be rebuilt."
  echo "See the man pages for mkpasswd and mkgroup then, for example, run"
  echo "mkpasswd -l [-d] > /etc/passwd"
  echo "mkgroup  -l [-d] > /etc/group"
  echo "Note that the -d switch is necessary for domain users."
  ;;

mkgroup )
  echo "Your group is currently \"mkgroup\".  This indicates that"
  echo "the /etc/group (and possibly /etc/passwd) files should be rebuilt."
  echo "See the man pages for mkpasswd and mkgroup then, for example, run"
  echo "mkpasswd -l [-d] > /etc/passwd"
  echo "mkgroup  -l [-d] > /etc/group"
  echo "Note that the -d switch is necessary for domain users."
  ;;

mkgroup_l_d )
  echo "Your group name is currently \"mkgroup_l_d\". This indicates that not"
  echo "all domain users and groups are listed in the /etc/passwd and"
  echo "/etc/group files."
  echo "See the man pages for mkpasswd and mkgroup then, for example, run"
  echo "mkpasswd -l -d > /etc/passwd"
  echo "mkgroup  -l -d > /etc/group"
  echo
  echo "This message is only displayed once (unless you recreate /etc/group)"
  echo "and can be safely ignored."

  # only display the above once
  cp -f /etc/group ~/group.mkgroup_l_d \
  && ( [ -w /etc/group ] || chmod --silent a+w /etc/group ; )\
  && sed -e 's/^mkgroup_l_d/mkgroup-l-d/' ~/group.mkgroup_l_d > /etc/group \
  && chmod --silent --reference=/etc/passwd /etc/group
  rm -f ~/group.mkgroup_l_d
  ;;
esac

# Make shell case-insensitive for file system
shopt -s nocaseglob

# ********************************************************************
# Environment Variable Sets
# ********************************************************************

# ====================================================================
# Top Level -- Master Directories

export LEE=Administrator
export KNOWLEDGE_DUMP=/zg/Knowledge_Dump
export MEDIA_DUMP=/zg/Media_Dump
export SOFTWARE_DUMP=/ze/Software_Dump
export EMAIL_MESSAGES=/ze/eMail_Messages
export KNOWLEDGE_BASE=/ze/Knowledge_Archive
export DOWNLOAD="/ze/Download"

export DIRECTORY="/ze/Directory"
export DISCARDS="/zd/Auto-Recover"
export PF="c:\progra~1"
export PROGRAMS="/zc/_Programs"
export CYGWIN_ROOT="D:/Cygwin"

export PROJECTS="/ze/Work/Projects"

export ALMANAC_DATA="/ze/Directory/Almanac_Data"
export POP="/ze/Directory/POP--People_Organizations_Places"

export ER="/zg/E"
export CLIPART="$MEDIA_Dump/Clipart"
export _CLIPART="$DOWNLOAD/Clipart"

export EUDORA_P="$PROGRAMS/Eudora"
export EUDORA_D="$EMAIL_MESSAGES/Eudora"
# export typeset -l SYSTEM_DRIVE="$(echo ${systemroot}|sed 's/^\(.\).*$/\1/')"
export SYSTEM_DRIVE="c"
export UTILITIES="$PROGRAMS"
export CLI="$UTILITIES/CLI"
export RAR32="$CLI/RAR32"
export LIST="$CLI/List"
export MS_BIN="$CLI/MS_bin"
export USR="$CLI/usr"
export USR_BIN="$USR/bin"
export WIN_BIN_32="$UTILITIES/WIN_BIN_32"
export TRUETYPE_RENAMER="$UTILITIES/TrueType_Renamer"

export INFO_ZIP="$CLI/InfoZip"

export IMAGE_TOOLS="$PROGRAMS"
export ACDSEE="$IMAGE_TOOLS/ACDSee"

export NETTERM="$PROGRAMS/NetTerm"

export TMP="/ze/tmp"
export TMPDIR="$TMP"
export BACKUP="/zf/_B"
export SCRIPTS="/Scripts"
export S="$SCRIPTS"
export EDITOR="TextPad"
export EDITOR_DIR="$UTILITIES/$EDITOR"
export JAVAHOME="/zc/_Programs/J2v1.3.1"

# Here is how HOME is set, in order of priority, when starting from Windows
#  1) From existing HOME in the Windows environment, translated to a Posix path
#  2) from /etc/passwd, if there is an entry with a non empty directory field
#  3) from HOMEDRIVE/HOMEPATH
#  4) / (root)

export HOME="/Home/$LEE"
export GO_DIR="$HOME/Go"
export GO_FILE="$GO_DIR/go.txt"

export PF="/zc/progra~1"
export MS_OFFICE_BIN="$PF/micros~2/office"

export DOWNLOAD="/zd/Download"
export ARCS="$DISCARDS"

# Data & Parameters

export DIRECTORY="/ze/Directory"
export PROJECTS="/ze/Work/Projects"
export POP="/ze/Directory/POP--People_Organizations_Places"

echo "---"
echo '$PATH is: ' $PATH

# ********************************************************************

ac() {
  acdsee32.exe $(cygpath --windows $PWD) &
}

assoc() {
  cmd /c assoc $*
}

cls() {
  cmd /c cls
}

d() {
  for name in ${1}*
  do
    if [[ -d "$name" ]]
    then
      cd "./$name"
      break
    fi
  done
}

dir() {
  cmd /c dir $* /X # including 8.3 filenames
}

e() {
  if [[ -z $1 ]]
  then
    explorer $(cygpath --dos $PWD) &
  else
    explorer $(cygpath --dos $1) &
  fi
}

ftype() {
  cmd /c ftype $*
}

format() {
  command /c format $*
}

g() {
  if [ -z "$1" ]
  then
    return
  fi

  while read key dir           # Reading from go parameter file
  do
    [ "$key" = "#" ] && continue
    if [ "$key" = "$1" ]
    then
      cd "$dir"
      return
    fi
  done <$GO_FILE

  echo "g: Key '$1' not in $GO_FILE"
}

dg() {
  g $1
  shift
  for dir in $*
  do
    . d $dir
  done
}

lis() {
  list /s
}

nt() {
  netterm &
}

e_oh() {
  c:/_Programs/OO/program/oooweb.exe $(cygpath --windows "$1") &
}

e_ow() {
  c:/_Programs/OO/program/ooowriter.exe $(cygpath --windows "$1") &
}
path() {
  cmd /c path
}

po() {
 popd
}

pu() {
  g $1
  pushd .
}

psp() {
  psp.exe $(cygpath --dos "$1") &
}

rd() {
  cmd /c rd $*
}

ren() {
  cmd /c ren $*
}

tp() {
  textpad $(cygpath --mixed $1) &
}

ttr() {
  TrueType_Renamer $(cygpath --dos ./*) &
}

ww() {
  WinWord.exe $(cygpath --dos $1) &
}

ver() {
  cmd /c ver
}

xl() {
  excel.exe $(cygpath --dos $1) &
}

export -f ac
export -f assoc
export -f cls
export -f d
export -f dir
export -f e
export -f ftype
export -f format
export -f g
export -f dg
export -f lis
export -f nt
export -f e_oh
export -f e_ow
export -f path
export -f po
export -f pu
export -f psp
export -f rd
export -f ren
export -f tp
export -f ttr
export -f ww
export -f ver
export -f xl

set +x

cd /

test -f ./.bashrc && . ./.bashrc
#eval `ssh-agent`
#ssh-add
echo "---"
echo "Date:" "$(date)"
echo "Time System Up:" "$(uptime)"
echo "---"
fortune
echo "---"

[-- Attachment #3: cygcheck#2003-10-30#09.16.41.txt.bz2 --]
[-- Type: application/octet-stream, Size: 8439 bytes --]

[-- Attachment #4: Type: text/plain, Size: 218 bytes --]

--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mount Confusion -- the tallest pique in the world? ;-)
  2003-10-30 20:20 Mount Confusion -- the tallest pique in the world? ;-) Lee D. Rothstein
@ 2003-10-31 18:42 ` Igor Pechtchanski
  2003-11-01 18:39   ` Lee D. Rothstein
  0 siblings, 1 reply; 6+ messages in thread
From: Igor Pechtchanski @ 2003-10-31 18:42 UTC (permalink / raw)
  To: Lee D. Rothstein; +Cc: cygwin

On Thu, 30 Oct 2003, Lee D. Rothstein wrote:

> Either Cygwin or I be confused. (I'm betting on "I". ;-))

Bingo.

> I have deleted '/tmp' ('d:/Cygwin/tmp' -- using Explorer)
> and issued: 'umount /tmp' and 'mount 'e:\tmp /tmp' repeatedly.
                                                     ^^^^^^^^^^
Umm, why?  Once should have been enough.

> All the other mounts to '/' appear in an 'ls' of '/',
> but '/tmp' ('e:/tmp'), does not.

What other mounts to "/"?  "/" itself is a mount, but under it everything
should be either a real or virtual (/proc, /dev) directory.

> While the apps seem to find 'e:/tmp', should I be worried?

No.  Mounts can be associated with non-existing directories, and will work
just fine.  If you want tab completion, you can simply "mkdir
/cygdrive/d/Cygwin/tmp" -- it will then show up in "ls /" and allow tab
completion, e.g., "/tm[Tab]".  BTW, unless you repeat this trick with
/proc and /dev, they won't show up in "ls /" either.

> Prior to my doing any of the above (w/ Cygwin root at
> 'c:/_Programs/Cygwin'), I've had recurring instances of something
> (apps?, 'setup.exe?, what?) creating 'tmp' and more frequently 'var' on
> both my 'c:' and 'e:' drives. This problem seems to have subsided since
> I moved the Cygwin root directory from 'c:/_Programs/Cygwin' to
> D:/Cygwin'.

I'd bet you were installing as one user and running as another.

> Also, after I moved Cygwin, despite changing all the references in the
> profile and Windows environment variables, *and* reinstalling the whole
> of Cygwin, "Cygwin" "insisted" on looking at the C/_Programs... : root
> rather than the D:/Cygwin... directory
>
> Anybody know what's causing this?

Stale user mounts?  Your "/", "/usr/bin" and "/usr/lib" mounts appear to
be user mounts.  You should probably remount them as "system" (i.e.,
'mount -f -s -b d:/Cygwin /', 'mount -f -s -b d:/Cygwin/bin /usr/bin',
'mount -f -s -b d:/Cygwin/lib /usr/lib', and 'umount -U').

Also, your system cygdrive prefix is marked "textmode"; you should change
it to "binmode" to avoid spurious errors (by 'mount -s -b -c /').  It's
not very safe to have it set to '/' anyway...

> Note that at the end of the attached 'cycheck -shv', there is
> the following error message:
>
> cygcheck: dump_sysinfo: GetVolumeInformation() failed: 1
>
> which seems to be coincidental when it checks the 'a:/' floppy drive.

This is expected.

> Thanks,
> Lee

Oh, and another small thing:

cls = `() {  cmd /c cls
}'

Why not install the "clear" package and 'function cls() { clear }'? ;-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mount Confusion -- the tallest pique in the world? ;-)
  2003-10-31 18:42 ` Igor Pechtchanski
@ 2003-11-01 18:39   ` Lee D. Rothstein
  2003-11-01 20:27     ` Igor Pechtchanski
  0 siblings, 1 reply; 6+ messages in thread
From: Lee D. Rothstein @ 2003-11-01 18:39 UTC (permalink / raw)
  To: cygwin; +Cc: Igor Pechtchanski

At 2003-10-31 01:08 PM, Igor Pechtchanski wrote:
>On Thu, 30 Oct 2003, Lee D. Rothstein wrote:
>
>> Either Cygwin or I be confused. (I'm betting on "I". ;-))
>
>Bingo.
>
>> I have deleted '/tmp' ('d:/Cygwin/tmp' -- using Explorer)
>> and issued: 'umount /tmp' and 'mount 'e:\tmp /tmp' repeatedly.
>                                                     ^^^^^^^^^^
>Umm, why?  Once should have been enough.
>
>> All the other mounts to '/' appear in an 'ls' of '/',
>> but '/tmp' ('e:/tmp'), does not.
>
>What other mounts to "/"?  "/" itself is a mount, but under it everything
>should be either a real or virtual (/proc, /dev) directory.

/zc -- c:/
...
/zy -- y:/

Why do /zc, /zd, /ze, /zf, /zg, ... ('mount c:/ /zc', ...
'mount g:/ /zg, ...) appear in ls output when no prior
'mkdir's have been carried out. What's different between
/tmp and /<everything else>?


>> Prior to my doing any of the above (w/ Cygwin root at
>> 'c:/_Programs/Cygwin'), I've had recurring instances of something
>> (apps?, 'setup.exe?, what?) creating 'tmp' and more frequently 'var' on
>> both my 'c:' and 'e:' drives. This problem seems to have subsided since
>> I moved the Cygwin root directory from 'c:/_Programs/Cygwin' to
>> D:/Cygwin'.
>
>I'd bet you were installing as one user and running as another.

You'd lose that bet. Only one ID -- Administrator. Cygwin always
*only* installed for/by Administrator.

One thing I do not understand, however, is the appearance of the
owner/user SYSTEM on some files/directories when I do 'ls -l'. 

>> Also, after I moved Cygwin, despite changing all the references in the
>> profile and Windows environment variables, *and* reinstalling the whole
>> of Cygwin, "Cygwin" "insisted" on looking at the C/_Programs... : root
>> rather than the D:/Cygwin... directory
>>
>> Anybody know what's causing this?
>
>Stale user mounts?  Your "/", "/usr/bin" and "/usr/lib" mounts appear to
>be user mounts.  You should probably remount them as "system" (i.e.,
>'mount -f -s -b d:/Cygwin /', 'mount -f -s -b d:/Cygwin/bin /usr/bin',
>'mount -f -s -b d:/Cygwin/lib /usr/lib', and 'umount -U').

This was most helpful. To have a copy of the wisdom expressed above
for future reference, I have written the following script:

#!d:/Cygwin/bin/bash
#
# ^Use absolute[ly brain dead (MS)] paths until mounts are corrected
#
# 'mountproperly' -- This script is only required if Cygwin 'setup.exe'
#                    configuration gets screwed up WRT mounted directories,
#                    I.e., Initialize all mounts to their desired parameters
#
# 2003-10-31 -- as per Cygwin List/Igor Pechtchanski <pechtcha@cs.nyu.edu>
#

do1 () { # Make sure each drive/directory is mounted with the correct
         # parameters:
  d:/Cygwin/bin/umount            $2  # 1st, unmount everything
  d:/Cygwin/bin/mkdir             $2  # 2nd, make a directory representation
       # in the virtual root directory so that certain directories can show
       #  up at all as virtual directories (e.g., '/tmp')
  d:/Cygwin/bin/mount -f -s -b $1 $2  #  -f, force mount, don't warn about
       #     missing mount point directories
       # -s, (default) add system-wide mount point; Lee: necessary? Default!
       # -b, (default) text files are equivalent to binary files
       #     (newline = \n) Lee: necessary? It is the default.
}

d:/Cygwin/bin/umount -U # Unmount all user mounts. We want all mounts as
                        # system mounts, because ?
do1 d:/Cygwin /
d:/Cygwin/bin/mount -s -b -c /  # -c -- change the cygdrive path prefix
     # to / . This doesn't work? 'ls /c', nor 'ls //c', for example, does
     # not list the c: drive! What am I not getting?
do1 d:/Cygwin/bin /usr/bin # any others, missing, here?
do1 d:/Cygwin/lib /usr/lib

mkdir /proc # Allows 'ls' & 'cd's to this virtual directory/information
mkdir /dev

for drive in c d e f g h x y a s # Drive mount points don't need actual
                                 # directories to show up in 'ls' output
                                 # for some reason. Why are these
                                 # different from '/tmp'?
  do
  umount ${drive}:/
  mount -f -s -b ${drive}:/ /z${drive}
  done

mount # See the corrected mounts
------------------------------------------------------------------

>Also, your system cygdrive prefix is marked "textmode"; you should change
>it to "binmode" to avoid spurious errors (by 'mount -s -b -c /').  It's
>not very safe to have it set to '/' anyway...

Please note that in the above script ('mountproperly'), I have tried
to include the advice of the above sentence, but it occurs to me that
I'm having trouble with the referents in the sentence.

As far as I know, my only cygdrive prefix is 'cygdrive'. Are you
saying it's also '/'? Note that in the script I am doing a
'mount -s -b -c /'. That's what you are advocating?

Should this be written up for the FAQ?

>Oh, and another small thing:
>
>cls = `() {  cmd /c cls
>}'
>
>Why not install the "clear" package and 'function cls() { clear }'? ;-)
>        Igor

Artifact of a past limitation of 'clear'. It used to only clear the
screen and not the screen buffer, as well. Now, it clears both.
('cls', of course, never worked with 'rxvt'.)



--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mount Confusion -- the tallest pique in the world? ;-)
  2003-11-01 18:39   ` Lee D. Rothstein
@ 2003-11-01 20:27     ` Igor Pechtchanski
  2003-11-01 21:57       ` Mount Confusion -- the tallest pique in the world! Lee D. Rothstein
  0 siblings, 1 reply; 6+ messages in thread
From: Igor Pechtchanski @ 2003-11-01 20:27 UTC (permalink / raw)
  To: Lee D. Rothstein; +Cc: cygwin

On Sat, 1 Nov 2003, Lee D. Rothstein wrote:

> At 2003-10-31 01:08 PM, Igor Pechtchanski wrote:
> >On Thu, 30 Oct 2003, Lee D. Rothstein wrote:
> >
> >> Either Cygwin or I be confused. (I'm betting on "I". ;-))
> >
> >Bingo.
> >
> >> I have deleted '/tmp' ('d:/Cygwin/tmp' -- using Explorer)
> >> and issued: 'umount /tmp' and 'mount 'e:\tmp /tmp' repeatedly.
> >                                                     ^^^^^^^^^^
> >Umm, why?  Once should have been enough.
> >
> >> All the other mounts to '/' appear in an 'ls' of '/',
> >> but '/tmp' ('e:/tmp'), does not.
> >
> >What other mounts to "/"?  "/" itself is a mount, but under it everything
> >should be either a real or virtual (/proc, /dev) directory.
>
> /zc -- c:/
> ...
> /zy -- y:/
>
> Why do /zc, /zd, /ze, /zf, /zg, ... ('mount c:/ /zc', ...
> 'mount g:/ /zg, ...) appear in ls output when no prior
> 'mkdir's have been carried out. What's different between
> /tmp and /<everything else>?

WAG: this may be due to the code that lists /cygdrive automatic mounts
(since your cygdrive prefix is set to "/", you get your drives listed).

> >> Prior to my doing any of the above (w/ Cygwin root at
> >> 'c:/_Programs/Cygwin'), I've had recurring instances of something
> >> (apps?, 'setup.exe?, what?) creating 'tmp' and more frequently 'var' on
> >> both my 'c:' and 'e:' drives. This problem seems to have subsided since
> >> I moved the Cygwin root directory from 'c:/_Programs/Cygwin' to
> >> D:/Cygwin'.
> >
> >I'd bet you were installing as one user and running as another.
>
> You'd lose that bet. Only one ID -- Administrator. Cygwin always
> *only* installed for/by Administrator.

Nope.  Services run as LocalSystem (aka SYSTEM). :-p

> One thing I do not understand, however, is the appearance of the
> owner/user SYSTEM on some files/directories when I do 'ls -l'.

There you go. :-D

> >> Also, after I moved Cygwin, despite changing all the references in the
> >> profile and Windows environment variables, *and* reinstalling the whole
> >> of Cygwin, "Cygwin" "insisted" on looking at the C/_Programs... : root
> >> rather than the D:/Cygwin... directory
> >>
> >> Anybody know what's causing this?
> >
> >Stale user mounts?  Your "/", "/usr/bin" and "/usr/lib" mounts appear to
> >be user mounts.  You should probably remount them as "system" (i.e.,
> >'mount -f -s -b d:/Cygwin /', 'mount -f -s -b d:/Cygwin/bin /usr/bin',
> >'mount -f -s -b d:/Cygwin/lib /usr/lib', and 'umount -U').
>
> This was most helpful. To have a copy of the wisdom expressed above
> for future reference, I have written the following script:
>
> #!d:/Cygwin/bin/bash
> #
> # ^Use absolute[ly brain dead (MS)] paths until mounts are corrected
> #
> # 'mountproperly' -- This script is only required if Cygwin 'setup.exe'
> #                    configuration gets screwed up WRT mounted directories,
> #                    I.e., Initialize all mounts to their desired parameters
> #
> # 2003-10-31 -- as per Cygwin List/Igor Pechtchanski <pechtcha@cs.nyu.edu>
> #
>
> do1 () { # Make sure each drive/directory is mounted with the correct
>          # parameters:
>   d:/Cygwin/bin/umount            $2  # 1st, unmount everything
>   d:/Cygwin/bin/mkdir             $2  # 2nd, make a directory representation
>        # in the virtual root directory so that certain directories can show
>        #  up at all as virtual directories (e.g., '/tmp')
>   d:/Cygwin/bin/mount -f -s -b $1 $2  #  -f, force mount, don't warn about
>        #     missing mount point directories
>        # -s, (default) add system-wide mount point; Lee: necessary? Default!
>        # -b, (default) text files are equivalent to binary files
>        #     (newline = \n) Lee: necessary? It is the default.
> }
>
> d:/Cygwin/bin/umount -U # Unmount all user mounts. We want all mounts as
>                         # system mounts, because ?
> do1 d:/Cygwin /
> d:/Cygwin/bin/mount -s -b -c /  # -c -- change the cygdrive path prefix
>      # to / . This doesn't work? 'ls /c', nor 'ls //c', for example, does
>      # not list the c: drive! What am I not getting?
> do1 d:/Cygwin/bin /usr/bin # any others, missing, here?
> do1 d:/Cygwin/lib /usr/lib
>
> mkdir /proc # Allows 'ls' & 'cd's to this virtual directory/information
> mkdir /dev
>
> for drive in c d e f g h x y a s # Drive mount points don't need actual
>                                  # directories to show up in 'ls' output
>                                  # for some reason. Why are these
>                                  # different from '/tmp'?
>   do
>   umount ${drive}:/
>   mount -f -s -b ${drive}:/ /z${drive}
>   done
>
> mount # See the corrected mounts
> ------------------------------------------------------------------
>
> >Also, your system cygdrive prefix is marked "textmode"; you should change
> >it to "binmode" to avoid spurious errors (by 'mount -s -b -c /').  It's
> >not very safe to have it set to '/' anyway...
>
> Please note that in the above script ('mountproperly'), I have tried
> to include the advice of the above sentence, but it occurs to me that
> I'm having trouble with the referents in the sentence.
>
> As far as I know, my only cygdrive prefix is 'cygdrive'. Are you
> saying it's also '/'? Note that in the script I am doing a
> 'mount -s -b -c /'. That's what you are advocating?

That's what I'm advising against.  The -c flag to mount changes the
cygdrive prefix (which could be different for the current user and for the
system, like all mounts).  I'd suggest 'mount -s -b -c /cygdrive' and
'mount -u -b -c /cygdrive', just to keep them consistent.

> Should this be written up for the FAQ?
>
> >Oh, and another small thing:
> >
> >cls = `() {  cmd /c cls
> >}'
> >
> >Why not install the "clear" package and 'function cls() { clear }'? ;-)
> >        Igor
>
> Artifact of a past limitation of 'clear'. It used to only clear the
> screen and not the screen buffer, as well. Now, it clears both.
> ('cls', of course, never worked with 'rxvt'.)

You can switch on the terminal type, and output some ANSI sequence to
clear the rxvt buffer, BTW.  Don't know off-hand exactly which one.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mount Confusion -- the tallest pique in the world!
  2003-11-01 20:27     ` Igor Pechtchanski
@ 2003-11-01 21:57       ` Lee D. Rothstein
  2003-11-02  2:35         ` Igor Pechtchanski
  0 siblings, 1 reply; 6+ messages in thread
From: Lee D. Rothstein @ 2003-11-01 21:57 UTC (permalink / raw)
  To: cygwin

At 2003-11-01 03:27 PM, Igor Pechtchanski wrote:
>> At 2003-10-31 01:08 PM, Igor Pechtchanski wrote:

>> Why do /zc, /zd, /ze, /zf, /zg, ... ('mount c:/ /zc', ...
>> 'mount g:/ /zg, ...) appear in ls output when no prior
>> 'mkdir's have been carried out. What's different between
>> /tmp and /<everything else>?
>
>WAG: this may be due to the code that lists /cygdrive automatic mounts
>(since your cygdrive prefix is set to "/", you get your drives listed).

1st, the only cygdrive prefix that works on my system is /cygdrive/.
2nd, no matter what I set the prefix to /cyggdrive/ is the only
     prefix that works.
3rd, even using your suggestion of 'mount -c -b -s /IIFOIALIP', for
     example:

cd /IIFOIALIP/c/ # does not get me to c:/, whereas
cd /cygdrive/c/  # gets me there before during and after!!

Quite apart from the above:

Why (how is it that) I can get /zc ... /zy to show up in the output of 'ls /',
and I can do a cd to any of "/z?", without creating respective directories in /
of /zc .. /zy?

I submit to the group that whatever inconsistency in implementation or
documentation is behind these problems, is the source of numerous
configuration problems that people are having. I have run into this
problem so many times that I refuse to let it rest until I understand
it.

>> >> Prior to my doing any of the above (w/ Cygwin root at
>> >> 'c:/_Programs/Cygwin'), I've had recurring instances of something
>> >> (apps?, 'setup.exe?, what?) creating 'tmp' and more frequently 'var' on
>> >> both my 'c:' and 'e:' drives. This problem seems to have subsided since
>> >> I moved the Cygwin root directory from 'c:/_Programs/Cygwin' to
>> >> D:/Cygwin'.
>> >
>> >I'd bet you were installing as one user and running as another.
>>
>> You'd lose that bet. Only one ID -- Administrator. Cygwin always
>> *only* installed for/by Administrator.
>
>Nope.  Services run as LocalSystem (aka SYSTEM). :-p

I'm not getting the joke, and more importantly the point! Could someone
else jump in here who is not as proud of their own sense of humor.

>> One thing I do not understand, however, is the appearance of the
>> owner/user SYSTEM on some files/directories when I do 'ls -l'.
>
>There you go. :-D

There I go where? I am not installing anything as "SYSTEM". Cygwin
setup (?) must be doing it? Why? How? How do I keep the mismatches
from occurring again?

>> >> Also, after I moved Cygwin, despite changing all the references in the
>> >> profile and Windows environment variables, *and* reinstalling the whole
>> >> of Cygwin, "Cygwin" "insisted" on looking at the C/_Programs... : root
>> >> rather than the D:/Cygwin... directory
>> >>
>> >> Anybody know what's causing this?
>> >
>> >Stale user mounts?  Your "/", "/usr/bin" and "/usr/lib" mounts appear to
>> >be user mounts.  You should probably remount them as "system" (i.e.,
>> >'mount -f -s -b d:/Cygwin /', 'mount -f -s -b d:/Cygwin/bin /usr/bin',
>> >'mount -f -s -b d:/Cygwin/lib /usr/lib', and 'umount -U').

For the third time, why do I have to explicitly specify '-s' and '-b'
when the man page says they are each the default?

What other sub-root directories besides /usr/bin /usr/lib require mounting
for a valid Cygwin configuration?

>> As far as I know, my only cygdrive prefix is 'cygdrive'.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^





--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Mount Confusion -- the tallest pique in the world!
  2003-11-01 21:57       ` Mount Confusion -- the tallest pique in the world! Lee D. Rothstein
@ 2003-11-02  2:35         ` Igor Pechtchanski
  0 siblings, 0 replies; 6+ messages in thread
From: Igor Pechtchanski @ 2003-11-02  2:35 UTC (permalink / raw)
  To: Lee D. Rothstein; +Cc: cygwin

On Sat, 1 Nov 2003, Lee D. Rothstein wrote:

> At 2003-11-01 03:27 PM, Igor Pechtchanski wrote:
> >> At 2003-10-31 01:08 PM, Igor Pechtchanski wrote:
>
> >> Why do /zc, /zd, /ze, /zf, /zg, ... ('mount c:/ /zc', ...
> >> 'mount g:/ /zg, ...) appear in ls output when no prior
> >> 'mkdir's have been carried out. What's different between
> >> /tmp and /<everything else>?
> >
> >WAG: this may be due to the code that lists /cygdrive automatic mounts
> >(since your cygdrive prefix is set to "/", you get your drives listed).
>
> 1st, the only cygdrive prefix that works on my system is /cygdrive/.
> 2nd, no matter what I set the prefix to /cyggdrive/ is the only
>      prefix that works.
> 3rd, even using your suggestion of 'mount -c -b -s /IIFOIALIP', for
>      example:
>
> cd /IIFOIALIP/c/ # does not get me to c:/, whereas
> cd /cygdrive/c/  # gets me there before during and after!!

I'm sorry, you must be doing something wrong:

$ mount -u -b -c "/IIFOIALIP"
$ ls /IIFOIALIP/c/cygwin/
Cygwin.bat*  bin/       dev/  export/  lib/  proc/  tmp/  var/
Cygwin.ico*  cygdrive/  etc/  home/    mnt/  root/  usr/
$ ls /cygdrive/c/cygwin/
/bin/ls: /cygdrive/c/cygwin/: No such file or directory
$ mount -u -b -c "/cygdrive"
$ ls /IIFOIALIP/c/cygwin/
/bin/ls: /IIFOIALIP/c/cygwin/: No such file or directory
$ ls /cygdrive/c/cygwin/
Cygwin.bat*  bin/       dev/  export/  lib/  proc/  tmp/  var/
Cygwin.ico*  cygdrive/  etc/  home/    mnt/  root/  usr/
$

Note: my *system* cygdrive prefix stayed "/cygdrive" throughout the above.

> Quite apart from the above:
>
> Why (how is it that) I can get /zc ... /zy to show up in the output of 'ls /',
> and I can do a cd to any of "/z?", without creating respective directories in /
> of /zc .. /zy?

Umm, could you please post the result of "ls /cygdrive/c/cygwin"?  Does it
contain all the "z*" directories?

> I submit to the group that whatever inconsistency in implementation or
> documentation is behind these problems, is the source of numerous
> configuration problems that people are having. I have run into this
> problem so many times that I refuse to let it rest until I understand
> it.
>
> >> >> Prior to my doing any of the above (w/ Cygwin root at
> >> >> 'c:/_Programs/Cygwin'), I've had recurring instances of something
> >> >> (apps?, 'setup.exe?, what?) creating 'tmp' and more frequently 'var' on
> >> >> both my 'c:' and 'e:' drives. This problem seems to have subsided since
> >> >> I moved the Cygwin root directory from 'c:/_Programs/Cygwin' to
> >> >> D:/Cygwin'.
> >> >
> >> >I'd bet you were installing as one user and running as another.
> >>
> >> You'd lose that bet. Only one ID -- Administrator. Cygwin always
> >> *only* installed for/by Administrator.
> >
> >Nope.  Services run as LocalSystem (aka SYSTEM). :-p
>
> I'm not getting the joke, and more importantly the point! Could someone
> else jump in here who is not as proud of their own sense of humor.

There is no joke.  Services (e.g., sshd, telnetd, cron) run under a
different username.  If they create files, you're likely to have them
owned by SYSTEM.  The emoticon was on the "I'd bet/you'll lose" exchange.

> >> One thing I do not understand, however, is the appearance of the
> >> owner/user SYSTEM on some files/directories when I do 'ls -l'.
> >
> >There you go. :-D
>
> There I go where? I am not installing anything as "SYSTEM". Cygwin
> setup (?) must be doing it? Why? How? How do I keep the mismatches
> from occurring again?

Another example of something owned by SYSTEM being created is by the
ssh-host-config script, which does an explicit "chown".  Some of the
"mismatches"  are necessary -- sshd, for example, won't work without them.

> >> >> Also, after I moved Cygwin, despite changing all the references in the
> >> >> profile and Windows environment variables, *and* reinstalling the whole
> >> >> of Cygwin, "Cygwin" "insisted" on looking at the C/_Programs... : root
> >> >> rather than the D:/Cygwin... directory
> >> >>
> >> >> Anybody know what's causing this?
> >> >
> >> >Stale user mounts?  Your "/", "/usr/bin" and "/usr/lib" mounts appear to
> >> >be user mounts.  You should probably remount them as "system" (i.e.,
> >> >'mount -f -s -b d:/Cygwin /', 'mount -f -s -b d:/Cygwin/bin /usr/bin',
> >> >'mount -f -s -b d:/Cygwin/lib /usr/lib', and 'umount -U').
>
> For the third time, why do I have to explicitly specify '-s' and '-b'
> when the man page says they are each the default?

You don't have to explicitly specify them, but it's good to make sure
you're doing *exactly* what you intend to do.  I've long stopped relying
on "default" option values in important tasks.  Besides, there's got to be
a reason your system cygdrive prefix ended up in textmode...

FWIW, the user cygdrive prefix does override the system one (as seen in my
example above).  However, the system one will show up for services and
such, so you may be surprised trying to access "/cygdrive/c/WINNT" from,
say, cron.

> What other sub-root directories besides /usr/bin /usr/lib require mounting
> for a valid Cygwin configuration?

None (unless your "/" is mounted in textmode, in which case /tmp and
/usr/X11R6/lib/X11/fonts should both be binary-mounted, or X won't work).

> >> As far as I know, my only cygdrive prefix is 'cygdrive'.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I have to concede on one point: there is no way that I know (short of the
no-no of editing the registry) of removing the user cygdrive prefix, so
you probably weren't ever exposed to the system one during normal console
operation.  I really have no idea how your system prefix could have ended
up that way (i.e., "/" and textmode).  In any case, "mount -p" or "mount
-m" should show you both prefixes.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
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/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2003-11-02  2:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 20:20 Mount Confusion -- the tallest pique in the world? ;-) Lee D. Rothstein
2003-10-31 18:42 ` Igor Pechtchanski
2003-11-01 18:39   ` Lee D. Rothstein
2003-11-01 20:27     ` Igor Pechtchanski
2003-11-01 21:57       ` Mount Confusion -- the tallest pique in the world! Lee D. Rothstein
2003-11-02  2:35         ` Igor Pechtchanski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).