This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: AllVersions: Running Cygwin X w/ Registy Entries
- From: Svend Sorensen <ssorensen at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 25 Oct 2005 15:59:11 -0700
- Subject: Re: AllVersions: Running Cygwin X w/ Registy Entries
- References: <1130262948.435e71a4abd76@webmail.mail.gatech.edu>
On 10/25/05, gtg793x@mail.gatech.edu <gtg793x@mail.gatech.edu> wrote:
> Greetings
> I would like to be able to have a portable version of cygwin in my Flash Drive.
> I have been able to do it but it requires that I enter some registry entries
> such as:
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/]
><snip>
Here are the batch files I use. In their current state, they must
exist in the parent directory of the cygwin root, which must be named
"cygwin".
install.bat backs up the current cygwin mount table, then creates a
new table for the removable device. It uses the users Windows %TEMP%
dir for /tmp, because I wanted to minimize writes to the flash disk.
uninstall.bat removes the new mount table, and restores the backed up copy.
--begin install.bat--
@echo off
for /F %%A in ('cd') do set WD=%%A
cygwin\bin\mount -m | cygwin\bin\sed s/mount/"cygwin\/bin\/mount"/ >
%TEMP%\cygwin-mounts
cygwin\bin\umount -c
cygwin\bin\umount -A
cygwin\bin\mount --binary --force --user %WD%\cygwin /
cygwin\bin\mount --binary --force --user %WD%\cygwin\bin /usr/bin
cygwin\bin\mount --binary --force --user %WD%\cygwin\lib /usr/lib
cygwin\bin\mount --binary --force --user %TEMP%\ /tmp
--end install.bat--
--begin uninstall.bat--
@echo off
for /F %%A in ('cd') do set WD=%%A
cygwin\bin\umount -c
cygwin\bin\umount -A
cygwin\bin\sh %TEMP%\cygwin-mounts
cygwin\bin\rm %TEMP%\cygwin-mounts
--end uninstall.bat--
--
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/