This is the mail archive of the cygwin-apps 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]

Running Cygwin on Different Drive etters


I've got a clean minimal install of Cygwin 1.7 on a USB
stick, and I'd like to be able to use that Cygwin install
no matter what the actual drive letter is that is assigned
to the stick.

So far, I've modified cygwin.bat with this to get the drive
letter of the stick:

SETLOCAL
  FOR /F %%D in ("%CD%") DO SET CYGDRIVE=%%~dD
  chdir %CYGDRIVE%\cygwin\bin

  bash --login -i
ENDLOCAL

%CYGDRIVE% ends up with the drive letter and colon, which is
useful, but then when we run cygwin.bat...

...it does not quite work - bash complains it cannot create /tmp
because the original drive letter was encoded into a number of
files under /etc, including:

/etc/fstab

And these files assume that the windows system files are under
c:\WINNT\system32.....

/etc/hosts
/etc/networks
/etc/protocols
/etc/services

So, my question is:

  Would it be possible to allow an environment variable to be part
  of an fstab entry?

Cheers, Ralph


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