public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Launching cygwin from cd
@ 2003-10-30  0:01 fergus
  0 siblings, 0 replies; 3+ messages in thread
From: fergus @ 2003-10-30  0:01 UTC (permalink / raw)
  To: cygwin; +Cc: fergus

There has been quite a lot on this earlier in the year. (Try searching on
"portable", maybe.) I routinely use a CD containing everything but X
applications, but it would be easy to make one that has them, lacking
something else instead. I've got a 1GB USB stick that would accommodate even
more, but I guess that nowadays something approaching 1.5 GB or more would
be needed to accommodate the whole of Cygwin in a convenient portable
manner.

The real complication in using a portable CD version lies in protecting the
host machine from the temporary intrusion of a CD-mounted Cygwin. Of course,
if the host machine and its owner have never heard of Cygwin, and do not
care about it, this is not an issue. If the case is otherwise, then one
needs to take care in any CD-based session that the host version is properly
un-mounted, the CD-version mounted, used then un-mounted, followed by a
proper re-mount of the host version.

It sounds from what you say that these considerations will not apply. So the
main requirement is to build your Cygwin tree so that it contains all you
want. (All the .exe's, all the .dll's, ...) This can be achieved through
trial and error (try rxvt.exe, whoops! it turns out to need libW11.dll, ...)
or by installing a tailored Cygwin using setup.exe, and copying that to CD.

The only question of significance that remains is what to do with the files
/etc/profile, /etc/passwd, /etc/group, ~/.bash_profile, ~/.bashrc; and what
command you use to start the whole thing off when the CD is inserted in its
drive.

An answer that works is: delete the first 4, put the line

    unset HISTFILE

plus anything else you want (aliases, etc) in ~/.bashrc =
/home/whatever/.bashrc (this stops bash trying to write a history file to an
unwriteable CD) and start the whole thing off with a .bat file containing

    @h:\bin\mount -bfu h:/ /
    @h:\bin\mount -bfu h:/bin /usr/bin
    @h:\bin\mount -bfu h:/lib /usr/lib
    @h:\bin\bash -rcfile /.init

where h: is your CD drive letter and where the file /.init (which is on the
CD) contains the lines

    export SHELL=/bin/bash
    export HOME=/home/whatever
    export PATH=~/bin:/usr/local/bin:/usr/bin:/bin:
    export TMPDIR=c:/tmp

(The 4th line is there because I found that for one of my applications I
needed earlier to have created a directory c:\tmp on the host HD, and then
set TMPDIR to match. So, sorry, this recipe is not foolproof for all
applications, because they might have different minor requirements,
depending how they are built. But at least it provides a starting point. And
the one I am talking about was a non-Cygwin-supplied invader: Cygwin is so
tightly constructed that there may be no annoying outstanding requirements
of this type. I also have ~ = /home/user as a conveniently bland HOME name
that so far hasn't caused any problems, but you might prefer some different
/home/whatever as indicated above.)

Hope this helps. It might do as something to start off with, and if you can
use a write-able drive rather than burning experimental CDs as you develop
your portable version, so much the better. (Easier.)

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/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Launching cygwin from cd
  2003-10-29 14:42 Mailer
@ 2003-10-29 15:01 ` Hannu E K Nevalainen
  0 siblings, 0 replies; 3+ messages in thread
From: Hannu E K Nevalainen @ 2003-10-29 15:01 UTC (permalink / raw)
  To: cygwin

> From: Mailer
> Sent: Wednesday, October 29, 2003 1:40 PM

> Hi,
>
> I'm a newbie cygwin user, and in general about windows, 'cause
> most of time (99,99~) play with linux.
>
> Can anyone give me directions about how to install and execute
> cygwin (however only for launching postgresql) directly from a cd ?
>
> I've to prepare a demo cd for an application that needs postgresql.

"CD launcing" has been discussed thoroughly on the list. A big part of the
solution is to use /bin/mount with -m and -A flags.

You better google on "site:cygwin.com +cygwin +cd" or some such (Err... this
was a lame attempt on that search criteria, I know) than rely on me
remembering details.

/Hannu E K Nevalainen, B.Sc. EE - 59?16.37'N, 17?12.60'E
-- printf("LocalTime: UTC+%02d\n",(DST)? 1:2); --
--END OF MESSAGE--


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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Launching cygwin from cd
@ 2003-10-29 14:42 Mailer
  2003-10-29 15:01 ` Hannu E K Nevalainen
  0 siblings, 1 reply; 3+ messages in thread
From: Mailer @ 2003-10-29 14:42 UTC (permalink / raw)
  To: cygwin

Hi,

I'm a newbie cygwin user, and in general about windows, 'cause
most of time (99,99~) play with linux.

Can anyone give me directions about how to install and execute
cygwin (however only for launching postgresql) directly from a cd ?

I've to prepare a demo cd for an application that needs postgresql.

Thanks in advance

Lucio



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-29 18:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30  0:01 Launching cygwin from cd fergus
  -- strict thread matches above, loose matches on Subject: below --
2003-10-29 14:42 Mailer
2003-10-29 15:01 ` Hannu E K Nevalainen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).