From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id oJ3cCHPuVmWZGwEA9RJhRA:P1 (envelope-from ) for ; Fri, 17 Nov 2023 05:39:15 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id oJ3cCHPuVmWZGwEA9RJhRA (envelope-from ) for ; Fri, 17 Nov 2023 05:39:15 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 81FA75704A for ; Fri, 17 Nov 2023 05:39:13 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=kviJMe4M; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1700195955; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=q6g7ILDSaSVNA1JhrVS3v6OPeLaD6jeX1I0TiMovCm0=; b=hel1gTfev5215kow6gv/56EIqoD2YSQv5u8FUCuf7WF+J7cFF+Cm6gQIfV+DNtpim+3DXr 5xDl/Hk/FZmMRLwj03zP88t4OViK39b+Y7YvU1YcCH1visowl9DeadU2WshgRv7G+qBZ3K fZMHHgyvwoL2cA55aLO/Tt2VTpoGWrJ9aNAmd2daaEQXFUbcXDXW02a9TWlZfbikTKAxIQ 5nrHHP2rb+VYv+b31qvBuW175Yh3mDiWW8H/xG9wEC4cKHQrcsohcXj+mzotgoDY6BXSxT DuzlOfmNldIe5yAxQtnwrq4KarBlMDkh8Or8jp9sG5/nkmh1oGF4Yl0WGjepMg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=kviJMe4M; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1700195955; a=rsa-sha256; cv=none; b=p007JFUXKsZzvsL/hP0msq+Jh/B483authpOLu0X1c40FDR8IIW7lbaQ/KxLdFaMVvC4Ja VYT/OGyNHzW7fCt98jlTXBipmTQwhrYNtZ2YWzQZV2yojVXNO9mcdWNZn2jz6T472+dV4F ymI3dv7T1hEBOCqpYALFamnvHcD7UGWDnX9tlUT4Qv3amkCKMc2ljdvwUv76+aPFugqCMi 1YBmBo+iZZN1IZyJnEWnJ30mUHbmyplT8FcYu2gwphFCQ+jY+AsAahD7PvLgcELyUY61uj oJhtpN3irrvHboV3YXpgskgJNs0ihRGfSr8XQk8MKjzj9yo5JhnMOfXRs8THlA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r3qdD-0001K1-T6; Thu, 16 Nov 2023 23:39:03 -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 1r3qdD-0001GB-7O for bug-guix@gnu.org; Thu, 16 Nov 2023 23:39:03 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r3qdC-0003zS-Uc for bug-guix@gnu.org; Thu, 16 Nov 2023 23:39:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r3qdC-0004U5-IA for bug-guix@gnu.org; Thu, 16 Nov 2023 23:39:02 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#67218: Reconfiguring from chroot to fix Grub/boot partition fails because D-bus crashes Resent-From: Oleg Pykhalov Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 17 Nov 2023 04:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67218 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mathieu Cc: 67218@debbugs.gnu.org Received: via spool by 67218-submit@debbugs.gnu.org id=B67218.170019591017200 (code B ref 67218); Fri, 17 Nov 2023 04:39:02 +0000 Received: (at 67218) by debbugs.gnu.org; 17 Nov 2023 04:38:30 +0000 Received: from localhost ([127.0.0.1]:44961 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3qcf-0004TL-R7 for submit@debbugs.gnu.org; Thu, 16 Nov 2023 23:38:30 -0500 Received: from mail-lf1-x134.google.com ([2a00:1450:4864:20::134]:40370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r3qcb-0004T3-LM for 67218@debbugs.gnu.org; Thu, 16 Nov 2023 23:38:29 -0500 Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-507cb194e30so422065e87.1 for <67218@debbugs.gnu.org>; Thu, 16 Nov 2023 20:38:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1700195899; x=1700800699; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=q6g7ILDSaSVNA1JhrVS3v6OPeLaD6jeX1I0TiMovCm0=; b=kviJMe4MaVLqNNMILGSvdpVOuHcn9jHPdIHkHXGF1WbMr7n8WSMnI2CrmPh2F4JA+N 3VpgbpEq2Rhq+/9F391ON4bCBQl7GnB6t3iq1btfO0ke6coK5WqH3v2SvYebO6tyVc35 4Bia9fj9pwKv7HKu5yuxvfQyELusxEfJmkD4th0aFf09S6IlW/c/hS6CAfRVnvzPcTVb VqIVrGH0AnGHpk3itK8WsVinpN7LO1XkJbA0G9bR6iXF+VCoe1jsp1yBPnMr9yE4JFN8 Qrpw45hsGXBVeS6Veqwc9Uy3p0eAkkv4tmnPrflcuW7tpvhEEbr8pERXYlHbBPYdJMQi YR6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1700195899; x=1700800699; h=mime-version:user-agent:message-id:in-reply-to:date:references :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q6g7ILDSaSVNA1JhrVS3v6OPeLaD6jeX1I0TiMovCm0=; b=wG4ukd39zhNBra3u2g7MgOKQLL2/ALuRA7T+oFp9RmDqzNt3ng+0JA2c5FWSajx/Qc 90yymgwW03vpDncOjkIOLL+JhV94Ly+Qlk26RZbELjPyIbnew0HB/lJ9hYYd3FclGuIg OVmqB9DQX02hz1s1hqlYDbXRKzURs5DAbrLEV2g+AoaznvmL+8arA0Ih/1ih5KyRCLzK tN5ZY9bSuviIMrUlpLE9IK/qE7ysGJQeAI/1oQBA4RFBZIIMWLpJZlbpWp6QqFH22ik7 r0w5e0gksOYCkUyl6bd7YQhf2vfasf8B86p+dgiHjQaylYWeNBy2aFPeImhoJoDeY6cP IrEw== X-Gm-Message-State: AOJu0Yw5RASKPEnK2/zYTbqRB5Q6Y6JEn9OmGYaNHzP9/IUwg+xnOJXd slm5d242luAwBXHnaTj8/+k= X-Google-Smtp-Source: AGHT+IEtMalVBKystEkS9psqTX2NNOTyvINeDrIHBSxKk6FbKva8YZoOle8Afgf1gVD23I4GBtRQkQ== X-Received: by 2002:a05:6512:b93:b0:503:3150:afbf with SMTP id b19-20020a0565120b9300b005033150afbfmr7781124lfv.4.1700195898856; Thu, 16 Nov 2023 20:38:18 -0800 (PST) Received: from localhost ([88.201.161.72]) by smtp.gmail.com with ESMTPSA id q7-20020a0565123a8700b005091665b83asm110616lfu.28.2023.11.16.20.38.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Nov 2023 20:38:18 -0800 (PST) From: Oleg Pykhalov References: Date: Fri, 17 Nov 2023 07:38:17 +0300 In-Reply-To: (Mathieu's message of "Thu, 16 Nov 2023 01:30:51 +0100") Message-ID: <87r0kpyoxy.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: 0.81 X-Spam-Score: 0.81 X-Migadu-Queue-Id: 81FA75704A X-Migadu-Scanner: mx13.migadu.com X-TUID: esNkGaa9WP7W --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Mathieu, Mathieu writes: > Dear Guix users, > > For some reason, still to be understood, my EFI partition is no longer > detected at boot and I cannot boot my existing Guix System. I could confi= rm > that the Guix partition (encrypted) is fine, but my BIOS won't detect any > bootable partition. Turns out my `/dev/nvme0n1p1` partition only contains= a > single file: `EFI/Guix/grubx64.efi`. It could be broken 'nvram' of a motherboard. Because of that happened to me on a single UEFI motherboard, personally I try not to use it at all, but use all available disks instead. With current Guix I'm not sure it is supported by the distribution. If anyone would like to implement it in the upstream, here is my configuration which I use [1] hopefully 'nvram' is not touched at all on 'guix system reconfigure' and survive a disk failure. [=E2=80=A6] > This looks like a bug since I did everything the guide indicates. Can any= one > reproduce it and confirm that chrooting into an existing Guix installatio= n to > reconfigure and rescue the system does not work? Is there something missi= ng in > the how-to to prevent the D-bus crash? Would there be another way to save= my > system, i.e., reinstalling Guix from scratch on another SSD and then `dd`= the > LUKS partition from the broken SSD onto the root partition of the new one? I could recommend to delete everything not required for a boot from the configuration file and try to reconfigure again (warning that you will probably get permission errors after adding those services again which will require to 'chown' their state directories). Another way to recover is reinstalling Guix from scratch, but it's possible to do this without reformating or using another drive. Just move every directory in your '/' to '/old-system' and proced regular installation. [1]: guix 1f734a6 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 1f734a6f0a7db5b0e12091a0c869c5c4810ac80e --=-=-= Content-Type: text/x-scheme Content-Disposition: attachment; filename=grub.scm Content-Description: grub uefi without nvram (define-module (bootloader grub) #:use-module (gnu bootloader) #:use-module (gnu bootloader grub) #:use-module (guix gexp) #:export (grub-efi-bootloader-removable)) (define install-grub-efi-removable #~(lambda (bootloader efi-dir mount-point) ;; There is nothing useful to do when called in the context of a disk ;; image generation. (when efi-dir ;; Install GRUB onto the EFI partition mounted at EFI-DIR, for the ;; system whose root is mounted at MOUNT-POINT. (let ((grub-install (string-append bootloader "/sbin/grub-install")) (install-dir (string-append mount-point "/boot")) ;; When installing Guix, it's common to mount EFI-DIR below ;; MOUNT-POINT rather than /boot/efi on the live image. (target-esp (if (file-exists? (string-append mount-point efi-dir)) (string-append mount-point efi-dir) efi-dir))) ;; Tell 'grub-install' that there might be a LUKS-encrypted /boot or ;; root partition. (setenv "GRUB_ENABLE_CRYPTODISK" "y") (invoke/quiet grub-install "--boot-directory" install-dir "--efi-directory" target-esp ;; do not write to nvram on the motherboard "--no-nvram" "--target=x86_64-efi" "--removable"))))) (define grub-efi-bootloader-removable (bootloader (inherit grub-efi-bootloader) (name 'grub-efi-bootloader-removable) (installer install-grub-efi-removable))) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable config.scm: =2D-8<---------------cut here---------------start------------->8--- (operating-system ;; ... (bootloader (bootloader-configuration (bootloader grub-efi-bootloader-removable) (targets '("/boot1/efi" "/boot2/efi" "/boot3/efi")))) (file-systems (cons* (file-system (device (file-system-label "boot1")) (mount-point "/boot1/efi") (type "vfat")) (file-system (device (file-system-label "boot2")) (mount-point "/boot2/efi") (type "vfat")) (file-system (device (file-system-label "boot3")) (mount-point "/boot3/efi") (type "vfat")) ;; ... %base-file-systems))) =2D-8<---------------cut here---------------end--------------->8--- /boot?/efi current state: =2D-8<---------------cut here---------------start------------->8--- oleg@guixsd ~$ find /boot?/efi -type f -exec ls -l {} \; =2Drwxr-xr-x 1 root root 159744 May 8 2022 /boot1/efi/EFI/Guix/grubx64.efi =2Drwxr-xr-x 1 root root 159744 Nov 16 04:28 /boot1/efi/EFI/BOOT/BOOTX64.EFI =2Drwxr-xr-x 1 root root 159744 Mar 17 2022 /boot2/efi/EFI/Guix/grubx64.efi =2Drwxr-xr-x 1 root root 159744 Nov 16 04:28 /boot2/efi/EFI/BOOT/BOOTX64.EFI =2Drwxr-xr-x 1 root root 76 Feb 9 2020 '/boot2/efi/System Volume Informat= ion/IndexerVolumeGuid' =2Drwxr-xr-x 1 root root 12 Feb 9 2020 '/boot2/efi/System Volume Informat= ion/WPSettings.dat' =2Drwxr-xr-x 1 root root 129 Feb 9 2020 '/boot2/efi/$RECYCLE.BIN/desktop.= ini' =2Drwxr-xr-x 1 root root 159744 Nov 16 04:28 /boot3/efi/EFI/BOOT/BOOTX64.EFI =2D-8<---------------cut here---------------end--------------->8--- as you can see /boot?/efi/EFI/BOOT/BOOTX64.EFI is the thing needed for boot, everything else probably a garbage. mount points: =2D-8<---------------cut here---------------start------------->8--- oleg@guixsd ~$ findmnt | grep efi =E2=94=82 =E2=94=9C=E2=94=80/sys/firmware/efi/efivars efivarfs = efivarfs rw,relatime =E2=94=9C=E2=94=80/boot1/efi /dev/sdc1 v= fat rw,relatime,fmask=3D0022,dmask=3D0022,codepage=3D437,iocharset=3D= iso8859-1,shortname=3Dmixed,errors=3Dremount-ro =E2=94=9C=E2=94=80/boot2/efi /dev/sda1 v= fat rw,relatime,fmask=3D0022,dmask=3D0022,codepage=3D437,iocharset=3D= iso8859-1,shortname=3Dmixed,errors=3Dremount-ro =E2=94=9C=E2=94=80/boot3/efi /dev/sdd1 v= fat rw,relatime,fmask=3D0022,dmask=3D0022,codepage=3D437,iocharset=3D= iso8859-1,shortname=3Dmixed,errors=3Dremount-ro =2D-8<---------------cut here---------------end--------------->8--- '/boot/grub' is not configured anywhere, but it's placed on a '/' mount point which mounted from a raid disk array. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJIBAEBCgAyFiEEcjhxI46s62NFSFhXFn+OpQAa+pwFAmVW7jkUHGdvLndpZ3Vz dEBnbWFpbC5jb20ACgkQFn+OpQAa+pzv2xAAtJKv+zjHgetTckl4fE+fHsTRZyTM vDut9Hik3yAtRaLGfBcdJ/0TyD6Z7IYPE4nk0pWdlC/2GNzELG/HghWXJcq0S6CF gomV9ngS7SbFCL7IMvjMJgWgW405Nr1ioNiSviW6jz1O0BekH6UM33bkqJqTutec 5Q6PF+ptCRC4VPE1zrwVBG8Yf81hk/dWBS10xuw0PL/lf/xIcAmMKNsF8LSvVMRg Cc6D/ZY5H0QTpd016Fa1m2dSCsQwxlhhA1FjtRf2kLkCH7nVEhM1T3oiTMh87H1A eDjGTP3zLplWcoMt6N925j68PJYkeHP7HgvlygrYnER+5tDsvXa6CUB4ErYoHu7O dMmFrOeYsplcAWHbH81XVMUq1OU2LrJhhe0FTBZk3kxXq7TAE5OTkbiZlbzTbELp iOGPfPJgQECUKcdZoo4RRpF0JSnDk09EN2SjPkV0+7ZXptTT5KravCHtQM9TAzPl i7WHVuSU3vi8K9tJFJHIRaAdHrZdhstTLtqUhFd12K9AO6/7mM9gl/J8A/JTG0d0 kdLPzwYZ/NR3h357wVfslalkqTYD/pSIE2zSxwnU7Qbf/I+sResBowDz25xW8W/Y OVRuYoNMK/lu2QJlSpvsfIXbKlPEKZoQ61leRCwRsZzo1vYNET+8/7/JWHNk9aAs hsOPCoiaiWmipgo= =lc03 -----END PGP SIGNATURE----- --==-=-=--