This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [1.7] Question: running from a portable drive


* Fergus (Wed, 29 Apr 2009 11:04:48 +0100)
> I run both [1.5] and [1.7] off portable drives plugged into whatever 
> host machine I'm using. After what originally took a lot of messing 
> about involving DOS variables like %CD% and %CWD% and DOS startup batch 
> files, [1.5] is successfully mounted at each use and will run 
> successfully without needing to specify (or even know) the driveletter 
> that has been allocated by the host to the portable drive on which it is 
> installed.
> 
> With [1.7] things are different and at the moment I have an explicit 
> drive letter in my /etc/fstab which in full is:
> 
> m:/bin /usr/bin vfat binary 0 0
> m:/lib /usr/lib vfat binary 0 0
> none / cygdrive user,posix=0 0 0
> 
> and I take steps to ensure that the driveletter allocated by the host to 
> the portable drive on which [1.7] is installed is M:. This is fine on 
> "my" machines but is not always possible on others'.
> 
> Can I write /etc/fstab more generally so that [1.7], like [1.5], can be 
> made to run off a portable drive without needing to specify (or even 
> know) the driveletter allocated by the host to the portable drive?

Interesting one. I have exactly the same environment and will have the 
same problem when starting to use 1.7.

My solution was to determine the drive letter at run time (when plugging 
in the stick). I use the following to set up the mount table (from a 
batch file):
mount -fu %~d0\cygwin     /
mount -fu %~d0\cygwin/bin /usr/bin
mount -fu %~d0\cygwin/lib /usr/lib
mount -fu %temp           /tmp

In principle this should also work for 1.7 presuming that mount simply 
writes to fstab instead of the registry.

Thorsten


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]