Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 Reply-To: Cygwin List Message-Id: <6.0.1.1.0.20040409175111.03a38db0@127.0.0.1> X-Sender: Date: Fri, 09 Apr 2004 18:08:26 -0400 To: Andreas , Cygwin List From: Larry Hall Subject: Re: chown, #!command in scripts, auto-execute (.bat), etc Cc: k009aaka AT unet DOT univie DOT ac DOT at In-Reply-To: <4074382E.90305@unet.univie.ac.at> References: <4074382E DOT 90305 AT unet DOT univie DOT ac DOT at> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 01:19 PM 4/7/2004, you wrote: >Larry Hall wrote: > >>At 12:51 PM 3/25/2004, you wrote: >> >> >>>Hallo! >>>I'm using CYGWIN_NT-5.1 (cygcheck.out attached) >>>*I installed Cygwin in a Subdir /cygdrive/d/temp/Cyg/, because here we don't have permissions for /. So I want to chroot to that installation-directory, for getting the programs working properly. >>>chroot $InstallROOT $InstallROOT/usr/bin/bash >>>-->> "chroot: cannot chdir to root directory: No such file or directory" >>>At home I did the same, ADDITIONALLY having /usr/bin/bash, but I get the same errors. >>> >>This makes perfect sense to me, given your cygcheck output. I'll give you >>a hint as to why this makes sense to me. What is "$InstallROOT" set to? >> >> >Hallo! >Content of $InstallROOT is in the comment (see lines below!), but that seems to be unimportant, >perhaps the following lines are more important than cygout.txt?! ;-) OK, so can you get there explicitly? >I unpacked all to a directory (Temp), where we have write-permissions. What do you mean "unpacked"? Do you mean that you installed, using setup.exe, in your "Temp" directory or did you do something else? >So "my (imaginary) Root" is that directory, and I want to chroot to that directory, which doesn't work. (chroot instead of mounting /) If you installed with setup.exe, '/' is already mounted there. >Is mount D:/Temp /Xyz the same as mount /cygwin/d /Xyz ? No. 'mount /cygdrive/d/Temp /Xyz' would be the same but that would imple '/' and '/Xyz' are the same, which doesn't seem necessary. >Why is /cygwin not named /mnt? - Why is it not possible to mount other things into /cygwin? Do you mean '/cygdrive'? Name it whatever you like (see 'man mount'). '/cygdrive' is a virtual file system used to map DOS drives into the POSIX space. >Or is /cygwin the (source-) "device" ? > >>>chroot $InstallROOT; doesn't work # InstallROOT=/cygdrive/d/Temp/Cyg >>>Also cd /; chroot . # doesn't work >>>chroot /; # works, but worthless >>> >>>* mount works, whereas I can't alter anything (umount, mounting others doens't work) >>> -->> umount: /cygdrive/H: Permission denied >>>mkdir X; mount /dev/hda1 X -->> mount: X: Invalid argument >>> which devices are to be used? (As /dev/null nothing exists, but works) >>> >>I think you don't understand what mount does in Cygwin. Read 'man mount' >>and . >> >I read it, but it doesnt work as expected: >mkdir $HOME/L; mount -u D:/ $HOME/L >-->mount: /cygdrive/d/temp/Cyg/home//L: Invalid argument Your example works for me. >>>* Why doesn't work #!bash ? On other systems it's enough to let it find by the $PATH. >>> >>And what's in your path? Would you be able to find bash in it's installed >>location using only your currently defined path as a guide? >$InstallROOT/usr/bin is in my PATH. Typing bash (or any other command) (in the Home-dir) works! >The problem is that under cygwin the path is not searched for any #!Commands (try out yourself!) I did. Works fine. >>>Extension .bat is executed by command.com, if no extension, I would like to be able to leave the #!command out! >>Sorry, I'm not sure what you're driving at with this statement, unless it >>was just meant to clarify that you cannot run 'bash' without specifying >>the full path to it. >> >I'm speaking about the extension. Is it possible to execute any script (without known extension) using bash.exe, >WITHOUT having to write #!bash.exe in the first line?! (Because otherwise it is executed by command.com) Sure. >What does mount -x/-X/-E do in detail? (any files being interpreted as binary, regardless their permissions?) >-o Option (-o managed) doesn't work? Look at the Users Guide. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/