delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/25/06:02:03

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <4811ABF0.3040707@bonhard.uklinux.net>
Date: Fri, 25 Apr 2008 11:01:20 +0100
From: Fergus <fergus AT bonhard DOT uklinux DOT net>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
To: Cygwin ML <cygwin AT cygwin DOT com>
CC: Fergus <fergus AT bonhard DOT uklinux DOT net>
Subject: Re: How to run Cygwin from USB stick without admin access
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

 >> ... 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?

Fergus



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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019