public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: ASSI <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: Capturing a Cygwin instance from another PC
Date: Thu, 23 Nov 2023 19:40:38 +0100	[thread overview]
Message-ID: <87o7fkmhy1.fsf@Gerda.invalid> (raw)
In-Reply-To: <DB9P251MB00639D5E85344DBC6BB9E9A2DEBAA@DB9P251MB0063.EURP251.PROD.OUTLOOK.COM> (Jose Isaias Cabrera via Cygwin's message of "Wed, 22 Nov 2023 14:53:11 +0000")

Jose Isaias Cabrera via Cygwin writes:
> I have a new Win11 PC, and I wanted to capture the same Cygwin setup
> that I have in another Win10 PC. I copied the C:\cygwin64 folder from
> the Win10 pc to the Win11 pc,

This doesn't really work unless both machines are domain joined and all
SID for the installation are identical on both machines plus you'd need
to ensure that symlinks and stuff make it to the new machine unharmed.
It's actually easier to re-install from scratch and don't worry about
all those things.

>  then I downloaded a fresh
> setup-x86_64.exe from cygwin.com to the win11 PC. I ran it and chose
> "Install from Local Directory" and only one shortcut for "Cygwin64
> Terminal" was created on the desktop. No Cygwin nor Cygwin-X folders
> were created on the Start menu. The original cygwin from the Win10 PC
> had X installed also.
>
> Any idea how to get this done automatically? I know I can go and
> create folders manually, etc., but it kind of a pain. Any help would
> be greatly appreciated. Thanks.

Do a base install on the new machine, then copy over the
/etc/setup/installed.db from the old machine.  Then reset all the
version/release numbers in that file to zero:

sed -re 's/^(.+) (\1)-[0-9].+(\.bz2)/\1 \1-0-0\3/' -i.bak /etc/setup/installed.db

Close the Cygwin shell and run setup again and it will re-install
everything you've had installed on your old machine, thus ensuring that
all postinstall scripts will execute in the correct order.

If you've changed any system-wide configuration files like
/etc/nsswitch.conf or /etc/fstab, compare those to the new files just
installed and decide which version to keep.  Take note if you've used
the "desc" schema for user mapping and re-apply those to the SAM for
local accounts.  If you've had an SSH server running on the old machine
you will of course need to create new host keys and install the
services, again that's easier to do from scratch IMHO.

Once the system is set up to your satisfaction, copy any home
directories you want to keep on the new machine.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada

  parent reply	other threads:[~2023-11-23 18:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-22 14:53 Jose Isaias Cabrera
2023-11-22 15:43 ` Bill Stewart
2023-11-22 16:15   ` Eliot Moss
2023-11-22 21:38     ` Jose Isaias Cabrera
2023-11-22 22:01       ` Ken Brown
2023-11-23  3:25       ` Eliot Moss
2023-11-23  9:12         ` Backwoods BC
2023-11-22 22:44     ` Cedric Blancher
2023-11-23 15:24       ` Corinna Vinschen
2023-11-22 16:20 ` EXTERNAL SENDER: " Dale Lobb (Sys Admin)
2023-11-22 21:49   ` Jose Isaias Cabrera
2023-11-23 18:40 ` ASSI [this message]
2023-11-23 20:27   ` Doug Henderson
2023-11-27  2:36 ` Chris Wagner
2023-11-27  8:24   ` ASSI
2023-11-27 17:43     ` Brian Inglis
2023-11-29 17:42       ` Jose Isaias Cabrera
2024-01-14 19:23       ` Andrey Repin
2023-11-27  2:46 ` Capturing a Cygwin instance from another PC (CORRECTION) Chris Wagner
2023-12-07 22:59 ` Capturing a Cygwin instance from another PC Andrew Schulman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o7fkmhy1.fsf@Gerda.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).