Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
That is great. Thanks for your patient. I have another question. Can the first field of fstab use relative path. I expect to make the cygwin portable, that is, i need to move it to somewhere esle without changing the fstab every time. If you are using Cygwin in portable mode (presumably on a stick or similar mobile device) there is a way to achieve what you want - but it is fiddly. I am guessing that Cygwin is mounted at the root of your device ie /bin, /etc, /usr, and all the rest are all located under d: or f: or g: or p: or whatever the device might turn out to be labelled as you move from one host machine to another host machine, and that you do not want the grief of having to identify the variant drivename every time and manually re-configure the line in /etc/fstab as f:/cygwin_1.7/usr/bin /usr/bin ntfs binary 0 0 or h:/cygwin_1.7/usr/bin /usr/bin ntfs binary 0 0 accordingly, as might be necessary. The way I do it (if_there_is_a_better_way_I_would_like_to_know_it) is to start portable Cygwin with a .cmd file (called go.cmd or something) that resides at the root of the device and starts with the lines @set DOS_CMD=%0 @set CWD=%CD% @set DN=%CWD:~0,2% @if (%DOS_CMD:~1,1%)==(:) set DN=%DOS_CMD:~0,2% @if (%DOS_CMD:~2,1%)==(:) set DN=%DOS_CMD:~1,2% All this is designed so that the variable DN (standing for drivename) is exactly D: or F: or G: or P: as appropriate, and the reason for the five lines is so that this identification is correctly made however you start Cygwin, whether by (i) typing go.cmd at the prompt in a Command Prompt window located at F: (ii) typing f:\go.cmd at the prompt in a Command Prompt window located somewhere else (iii) double clicking the go.cmd icon in Explorer (iv) using Start - Run - f:\go.cmd Yeah, I know, all that effort just so that DN accurately identifies the drivename, but it all has to be done BEFORE Cygwin is triggered. You can then go on, still in go.cmd, to say something like @%DN%\bin\echo %DN%/cygwin_1.7/usr/bin /usr/bin ntfs binary 0 0 %DN%\etc\fstab ... any other requirements ... %DN%\etc\fstab and then, FINALLY, start Cygwin with (well, in my case: your requirement might differ) @set SHELL=/bin/bash @set HOME=/home/user @%DN%\bin\rxvt Awfully sorry for long post. A fiddly way to get something rather simple, but it works in all of W98, XP, Vista and 7. And there are lots of other reasons (if you are running portable Cygwin off one device on any number of potential host machines) why you might want to use DN without having to discover it (or, in fact, even know it) each time. Fergus -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
On Wed, Sep 23, 2009 at 12:37:58PM +0800, ??? wrote: The entry that you used in your previous mail was not correctly formatted. It should be something like: f:/cygwin_1.7/usr/bin /usr/bin ntfs binary 0 0 That is great. Thanks for your patient. I have another question. Can the first field of fstab use relative path. That's one of those Why not just try it questions but the answer is no. How could that possibly work? I expect to make the cygwin portable, that is, i need to move it to somewhere esle without changing the fstab every time. In that case, you should just rely on the fact that Cygwin sets / relative to where cygwin1.dll lives and not mess with fstab at all. 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
That's one of those Why not just try it questions but the answer is no. How could that possibly work? Thanks. I have tried it. I think it is possible. The relative path can be convented the absolute path according to where cygwin1.dll lives. -- 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
how to let cygwin does not mount /bin /usr/bin automaticlly?
how to let cygwin does not mount /bin /usr/bin automaticlly? -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
tianlijian wrote: how to let cygwin does not mount /bin /usr/bin automaticlly? Lots of things won't work without that mount. I advise not to tamper with it. cheers, DaveK -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
I use a older version of 1.7, which do not mount `/bin', `/usr/bin' automatically. It works well. On Tue, Sep 22, 2009 at 11:04 PM, Dave Korn dave.korn.cyg...@googlemail.com wrote: tianlijian wrote: how to let cygwin does not mount /bin /usr/bin automaticlly? Lots of things won't work without that mount. I advise not to tamper with it. cheers, DaveK -- 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 -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
On 09/22/2009 11:01 AM, tianlijian wrote: I use a older version of 1.7, which do not mount `/bin', `/usr/bin' automatically. It works well. Why do you care what Cygwin requires here? Are you having a problem? -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
tianlijian wrote: I use a older version of 1.7, which do not mount `/bin', `/usr/bin' automatically. Something must have gone wrong with creating fstab during the upgrade I guess, it should have been done. It works well. What happens when a shell script begins #!/bin/sh? Alternatively, what happens when a shell script begins #!/usr/bin/sh? I would expect one of those two to fail. cheers, DaveK -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
I want to put thd command according to filesytem hierarchy standard, that is putting the cmd such as sh in /bin, and env in /usr/bin/. On Tue, Sep 22, 2009 at 23:06, Larry Hall (Cygwin) reply-to-list-only...@cygwin.com wrote: On 09/22/2009 11:01 AM, tianlijian wrote: I use a older version of 1.7, which do not mount `/bin', `/usr/bin' automatically. It works well. Why do you care what Cygwin requires here? Are you having a problem? -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- 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 -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
On 09/22/2009 11:30 AM, ︶ㄣ無名氏 wrote: On Tue, Sep 22, 2009 at 23:06, Larry Hall (Cygwin) reply-to-list-only-lh... wrote: ^ http://cygwin.com/acronyms/#PCYMTNQREAIYR. Thanks. On 09/22/2009 11:01 AM, tianlijian wrote: I use a older version of 1.7, which do not mount `/bin', `/usr/bin' automatically. It works well. Why do you care what Cygwin requires here? Are you having a problem? I want to put thd command according to filesytem hierarchy standard, that is putting the cmd such as sh in /bin, and env in /usr/bin/. Ah, OK. I understand your goal. However, with Cygwin, there is really no difference in the two directories, which is why one is mounted to the other. While you are free to change this, it will be a non-standard configuration and any problem you encounter as a result won't be supported by this list. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
Thanks. I want to know how to change this configuration. I do as follows: bash-3.2$ /bin/umount /usr/bin umount: /usr/bin: Operation not permitted but i does not work. Any idea? On Tue, Sep 22, 2009 at 23:40, Larry Hall (Cygwin) reply-to-list-only...@cygwin.com wrote: On 09/22/2009 11:30 AM, ︶ㄣ無名氏 wrote: On Tue, Sep 22, 2009 at 23:06, Larry Hall (Cygwin) reply-to-list-only-lh... wrote: ^ http://cygwin.com/acronyms/#PCYMTNQREAIYR. Thanks. On 09/22/2009 11:01 AM, tianlijian wrote: I use a older version of 1.7, which do not mount `/bin', `/usr/bin' automatically. It works well. Why do you care what Cygwin requires here? Are you having a problem? I want to put thd command according to filesytem hierarchy standard, that is putting the cmd such as sh in /bin, and env in /usr/bin/. Ah, OK. I understand your goal. However, with Cygwin, there is really no difference in the two directories, which is why one is mounted to the other. While you are free to change this, it will be a non-standard configuration and any problem you encounter as a result won't be supported by this list. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- 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 -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
2009/9/22 ︶ㄣ無名氏: Thanks. I want to know how to change this configuration. I do as follows: bash-3.2$ /bin/umount /usr/bin umount: /usr/bin: Operation not permitted but i does not work. Any idea? /etc/fstab -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
Again, I'd ask that you http://cygwin.com/acronyms/#PCYMTNQREAIYR. I don't need the spam and others that respond to you also are likely to not want to see more. On 09/22/2009 12:11 PM, ︶ㄣ無名氏 wrote: Thanks. I want to know how to change this configuration. I do as follows: bash-3.2$ /bin/umount /usr/bin umount: /usr/bin: Operation not permitted but i does not work. Any idea? You won't be able to do this without changing some code internally. Cygwin 1.7 tries very hard to keep your installation consistent and valid. If you want something different, you'll need to undo the code that works to accomplish this. Off-hand, I don't recall where that code is. But since you can also look at the code (and recent changelogs :-) ), I expect you can locate it at least as quickly as I could. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _ A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting annoying in email? -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
On Wed, Sep 23, 2009 at 12:11:23AM +0800, ??? wrote: Thanks. I want to know how to change this configuration. I do as follows: bash-3.2$ /bin/umount /usr/bin umount: /usr/bin: Operation not permitted but i does not work. Any idea? If you want /usr/bin to point someplace nonstandard, try using the -f -o override options to mount. Note that, in Cygwin 1.7 mount is not permanent. You'll have to change /etc/fstab if you want permanent mounts. I can't think of any way to keep /usr/bin permanently unmounted. 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
I have try the command: $ mount -f -o binary,user 'f:\cygwin_1.7\usr\bin\' /usr/bin mount: /usr/bin: Operation not permitted The -f option does not work well. I have alse add this line to fstab: ntfs f:\cygwin_1.7\usr\bin\ /usr/bin binary,user 0 0 It fails, too. On Wed, Sep 23, 2009 at 00:34, Christopher Faylor . wrote: On Wed, Sep 23, 2009 at 12:11:23AM +0800, ??? wrote: Thanks. I want to know how to change this configuration. I do as follows: bash-3.2$ /bin/umount /usr/bin umount: /usr/bin: Operation not permitted but i does not work. Any idea? If you want /usr/bin to point someplace nonstandard, try using the -f -o override options to mount. Note that, in Cygwin 1.7 mount is not permanent. You'll have to change /etc/fstab if you want permanent mounts. I can't think of any way to keep /usr/bin permanently unmounted. 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 -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
On Wed, Sep 23, 2009 at 11:09:06AM +0800, ??? wrote: I have try the command: $ mount -f -o binary,user 'f:\cygwin_1.7\usr\bin\' /usr/bin mount: /usr/bin: Operation not permitted The -f option does not work well. You really do need the -o override option that I mentioned. See: http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mount cgf On Wed, Sep 23, 2009 at 00:34, Christopher Faylor . wrote: If you want /usr/bin to point someplace nonstandard, try using the -f -o override options to mount. ??Note that, in Cygwin 1.7 mount is not permanent. You'll have to change /etc/fstab if you want permanent mounts. -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
$ mount -f -o override 'f:\cygwin_1.7\usr\bin\' /usr/bin mount: /usr/bin: Operation not permitted I have used the `override' option, but the error occurs again. On Wed, Sep 23, 2009 at 11:21, Christopher Faylor cgf-use-the-mailinglist-ple...@cygwin.com wrote: On Wed, Sep 23, 2009 at 11:09:06AM +0800, ??? wrote: I have try the command: $ mount -f -o binary,user 'f:\cygwin_1.7\usr\bin\' /usr/bin mount: /usr/bin: Operation not permitted The -f option does not work well. You really do need the -o override option that I mentioned. See: http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mount cgf On Wed, Sep 23, 2009 at 00:34, Christopher Faylor . wrote: If you want /usr/bin to point someplace nonstandard, try using the -f -o override options to mount. ??Note that, in Cygwin 1.7 mount is not permanent. You'll have to change /etc/fstab if you want permanent mounts. -- 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 -- 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
On Wed, Sep 23, 2009 at 11:36:13AM +0800, ??? wrote: $ mount -f -o override 'f:\cygwin_1.7\usr\bin\' /usr/bin mount: /usr/bin: Operation not permitted I have used the `override' option, but the error occurs again. Sorry for the misinformation. You need to add an entry for /usr/bin to /etc/fstab if you want to override it. And, on checking the code that I wrote and didn't remember, you don't have to use the override option. The entry that you used in your previous mail was not correctly formatted. It should be something like: f:/cygwin_1.7/usr/bin /usr/bin ntfs binary 0 0 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
Re: how to let cygwin does not mount /bin /usr/bin automaticlly?
The entry that you used in your previous mail was not correctly formatted. It should be something like: f:/cygwin_1.7/usr/bin /usr/bin ntfs binary 0 0 That is great. Thanks for your patient. I have another question. Can the first field of fstab use relative path. I expect to make the cygwin portable, that is, i need to move it to somewhere esle without changing the fstab every time. -- 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