X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 352F2386188E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1700764869; bh=Q882S1Rqw1CrAIysLJxWBfJqV6bNKouQkkCyDDZ3N28=; h=To:Subject:In-Reply-To:References:Date:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=T3rPgVA2QOMDizCT28HI8rwqMR9OMohgqemKoVYKwWZkVZSrlmBVt+BdZIEB2AxNh rptCx3KKNNk2OYsjHEOsKjyjEpIMZhieY4CYQHnOvzm+Q4ceoOax+gZhXvzTVtrUG7 GO/DBy57BGuSk6HCTnJ6ZUHOAVAdI9Ryol7/2OIo= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 518203858281 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 518203858281 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700764854; cv=none; b=D0AKJSM3nYDJTiY6i+0MjHQJr6V51gy0w3EyoPJObaCO1ioz5xSCVi7v8fbbQTOk9GRldVasQlT4Va2x4FJ1mRr+mAoHkQBb2UKEEIdQ4ED9gjPyhNNf8QaEQxLb0eclmnPSJ6I37KoUO1c2X+8E6qBCoksqW6Npczhj1/lRwN0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700764854; c=relaxed/simple; bh=G7YV7GQcwKqpk2EcyeNLpaRsyePjKgt9dS0LwomCkyk=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=LrtVluhzWrED1P1VVTVzjd39UCDxZYVX6z8b0kg3wjzv04RUwMCskJTOjDqn7TeDXBuoWscRPLEdztkZ2BatHD9t2LCE5OFwTUymjZxyN7tX+WscRKxqocNcvXoDVawAZyps5T36ZFIcmnPoP7daY4XkSYE5wasyFYEWmxhTlXQ= ARC-Authentication-Results: i=1; server2.sourceware.org To: cygwin AT cygwin DOT com Subject: Re: Capturing a Cygwin instance from another PC In-Reply-To: (Jose Isaias Cabrera via Cygwin's message of "Wed, 22 Nov 2023 14:53:11 +0000") References: Date: Thu, 23 Nov 2023 19:40:38 +0100 Message-ID: <87o7fkmhy1.fsf@Gerda.invalid> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-purgate-type: clean X-purgate: clean X-purgate-size: 2295 X-purgate-ID: 155817::1700764845-DFFFA94E-2732FAA3/0/0 X-Spam-Status: No, score=-3030.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: ASSI via Cygwin Reply-To: ASSI Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" 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 -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple