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: How to run Cygwin from USB stick without admin access

>> ... but was stopped by the necessity to perform
>> the mount command with admin rights.

Hi, I use Cygwin the whole time from a mobile drive on home, work and other people's machines none of which have Cygwin installed (but they could have). The principles are the same as for CD-bound systems but with much more flexibility (size and write-ability). I'm afraid I have never found any difficulty using it on ancient W98 machines, and on machines running XP up to SP3 (and even Vista, now with SP1) but have never knowingly tried it on W2K. A big chunk of the startup (.cmd or .bat) file is devoted to preserving any pre-existing mounts and if you don't need to do this the startup file is very brief and straightforward (isn't it? in hundreds of contexts on different machines I suppose I could even now be missing some obvious difficulty) as follows (where h: is your USB drivename):

  @h:\bin\mount -buf "h:/bin" "/usr/bin"
  @h:\bin\mount -buf "h:/lib" "/usr/lib"
  @h:\bin\mount -buf "h:/" "/"
  @h:\bin\mount -bufc "/"
  @set SHELL=/bin/bash
  @set HOME=/home/user # OR WHATEVER YOUR $HOME IS
  @start /wait h:\bin\bash
  @set HOME=
  @set SHELL=

This script can be rendered considerably more sophisticated but this would be a good starting point if you are bug-hunting. Can you say where it breaks down, for you?


Unsubscribe info:
Problem reports:

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