From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 02 23:31:43 2024 Received: (at submit) by debbugs.gnu.org; 3 Feb 2024 04:31:43 +0000 Received: from localhost ([127.0.0.1]:45773 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rW7gs-00088v-D5 for submit@debbugs.gnu.org; Fri, 02 Feb 2024 23:31:43 -0500 Received: from lists.gnu.org ([2001:470:142::17]:37668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rVxm6-00081v-C1 for submit@debbugs.gnu.org; Fri, 02 Feb 2024 12:56:27 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rVxlp-0008Sd-QS for bug-guix@gnu.org; Fri, 02 Feb 2024 12:56:09 -0500 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rVxlk-0001a4-Md for bug-guix@gnu.org; Fri, 02 Feb 2024 12:56:09 -0500 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id E2CC241181 for ; Fri, 2 Feb 2024 18:56:00 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dSEvG-uaj6lQ for ; Fri, 2 Feb 2024 18:56:00 +0100 (CET) From: Pierre Neidhardt DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1706896560; bh=jXFNYfejvolVmf9rbrRRY1HCwzIZ4s8P27naUQ7PZjE=; h=From:To:Subject:Date; b=dRULg6N4JobYy+Ixe+12DU+gRv4eq4fQihIZWllhzuBIYwN8VfyxC2Dkds3CAQGpz slUYfjzwkNA0/vwLwasJSbWUM2iIT0N/nkWh4FMTj1xLYyhMN4qX7cWxnX5+/guTJz 6QKoecQ4C2vtnrOMRyRqGvyn+Qo/hplfz53JzgHWInfNp0TYrbHxgt39/QpFT1mz/W BoM0T53cIUVmNU/86+C7bH/PlPHPRKk6lNhbplBkJBt2lYssBlsiUhhZF77u4uH05Y fYZCrm6ms94Hej0+mbErr+x2JvWXz8EUl9dZlBZly4m/3VZlPfEgZMgHGIC2YWeOhF Qglg0gpWMQtrQ== To: bug-guix@gnu.org Subject: Boot fails when symlink exists Date: Fri, 02 Feb 2024 18:55:58 +0100 Message-ID: <87bk8yeonl.fsf@disroot.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=178.21.23.139; envelope-from=vabagot@disroot.org; helo=layka.disroot.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.9 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 02 Feb 2024 23:31:40 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.1 (/) Today my Guix System crashed during the boot process for external reasons. Upon restart, booting a system would drop into the REPL right after the following line: --8<---------------cut here---------------start------------->8--- making '/var/...' the current system... --8<---------------cut here---------------end--------------->8--- complaining that the symlink already exists. I checked gnu/build/activation.scm (activate-current-system), and there is this: --8<---------------cut here---------------start------------->8--- ;; Atomically make SYSTEM current. (let ((new (string-append %current-system ".new"))) (symlink system new) (rename-file new %current-system))) --8<---------------cut here---------------end--------------->8--- And indeed, there was a dangling /run/current-system.new file on my disk. After removing it (from a live USB, didn't know how to do this from the Guile REPL), the system succeeded to boot. The fix should be easy: ensure that (symlink system new) overwrites any potentially existing file. Cheers! Pierre