GNU bug report logs - #67218
Reconfiguring from chroot to fix Grub/boot partition fails because D-bus crashes

Previous Next

Package: guix;

Reported by: Mathieu <matf <at> disr.it>

Date: Thu, 16 Nov 2023 00:32:02 UTC

Severity: normal

To reply to this bug, email your comments to 67218 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#67218; Package guix. (Thu, 16 Nov 2023 00:32:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Mathieu <matf <at> disr.it>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 16 Nov 2023 00:32:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mathieu <matf <at> disr.it>
To: bug-guix <at> gnu.org
Subject: Reconfiguring from chroot to fix Grub/boot partition fails
 because D-bus crashes
Date: Thu, 16 Nov 2023 01:30:51 +0100
[Message part 1 (text/plain, inline)]
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 confirm 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`.

Then there is 3.72 GiB of unallocated space on the drive, and then `/dev/nvme0n1p3` which is my LUKS encrypted Guix root.

I tried following this guide: https://guix.gnu.org/manual/en/html_node/Chrooting-into-an-existing-system.html

I only had to add an extra step at the beginning to decrypt the partition with `cryptsetup luksOpen /dev/nvme0n1p3 cryptroot` and then mounted `/dev/mapper/cryptroot` to `/mnt` before following the next instructions.

Unfortunately, the last step of the guide, `guix system reconfigure /path/to/config.scm`, fails because D-bus crashes, which in turn breaks all my network interfaces (they all are toggled "DOWN" and won't get a IP when I turn them up again), and ultimately the `guix system reconfigure` cannot work either without an Internet connection.

This is what `/var/log/messages` say when I run the last step at 22:51: https://0x0.st/Hv2f.jpg

This looks like a bug since I did everything the guide indicates. Can anyone reproduce it and confirm that chrooting into an existing Guix installation to reconfigure and rescue the system does not work? Is there something missing 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?

Any help would be welcome, as it'd give me hope that I can save my system and data. Many thanks in advance!

Kabouik
[Hvev.jpg (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#67218; Package guix. (Fri, 17 Nov 2023 04:39:02 GMT) Full text and rfc822 format available.

Message #8 received at 67218 <at> debbugs.gnu.org (full text, mbox):

From: Oleg Pykhalov <go.wigust <at> gmail.com>
To: Mathieu <matf <at> disr.it>
Cc: 67218 <at> debbugs.gnu.org
Subject: Re: bug#67218: Reconfiguring from chroot to fix Grub/boot partition
 fails because D-bus crashes
Date: Fri, 17 Nov 2023 07:38:17 +0300
[Message part 1 (text/plain, inline)]
Hi Mathieu,

Mathieu <matf <at> disr.it> 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 confirm
> 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.

[…]

> This looks like a bug since I did everything the guide indicates. Can anyone
> reproduce it and confirm that chrooting into an existing Guix installation to
> reconfigure and rescue the system does not work? Is there something missing 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

[grub.scm (text/x-scheme, attachment)]
[Message part 3 (text/plain, inline)]
config.scm:
--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)))
--8<---------------cut here---------------end--------------->8---

/boot?/efi current state:
--8<---------------cut here---------------start------------->8---
oleg <at> guixsd ~$ find /boot?/efi -type f -exec ls -l {} \;
-rwxr-xr-x 1 root root 159744 May  8  2022 /boot1/efi/EFI/Guix/grubx64.efi
-rwxr-xr-x 1 root root 159744 Nov 16 04:28 /boot1/efi/EFI/BOOT/BOOTX64.EFI
-rwxr-xr-x 1 root root 159744 Mar 17  2022 /boot2/efi/EFI/Guix/grubx64.efi
-rwxr-xr-x 1 root root 159744 Nov 16 04:28 /boot2/efi/EFI/BOOT/BOOTX64.EFI
-rwxr-xr-x 1 root root 76 Feb  9  2020 '/boot2/efi/System Volume Information/IndexerVolumeGuid'
-rwxr-xr-x 1 root root 12 Feb  9  2020 '/boot2/efi/System Volume Information/WPSettings.dat'
-rwxr-xr-x 1 root root 129 Feb  9  2020 '/boot2/efi/$RECYCLE.BIN/desktop.ini'
-rwxr-xr-x 1 root root 159744 Nov 16 04:28 /boot3/efi/EFI/BOOT/BOOTX64.EFI
--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:
--8<---------------cut here---------------start------------->8---
oleg <at> guixsd ~$ findmnt  | grep efi
│ ├─/sys/firmware/efi/efivars   efivarfs                  efivarfs   rw,relatime
├─/boot1/efi                    /dev/sdc1                 vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
├─/boot2/efi                    /dev/sda1                 vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
├─/boot3/efi                    /dev/sdd1                 vfat       rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro
--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.
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 169 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.