GNU bug report logs - #64196
Can't boot due to discrepancy between reconfigure and init

Previous Next

Package: guix;

Reported by: Csepp <raingloom <at> riseup.net>

Date: Tue, 20 Jun 2023 19:46:02 UTC

Severity: normal

To reply to this bug, email your comments to 64196 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#64196; Package guix. (Tue, 20 Jun 2023 19:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Csepp <raingloom <at> riseup.net>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Tue, 20 Jun 2023 19:46:02 GMT) Full text and rfc822 format available.

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

From: Csepp <raingloom <at> riseup.net>
To: bug-guix <at> gnu.org
Subject: Can't boot due to discrepancy between reconfigure and init
Date: Tue, 20 Jun 2023 20:38:58 +0200
I'm trying to move my installation from /dev/sda to /dev/sdb, I created
the file system and changed the bootloader config in my operating-system
definition to point to /dev/sdb and the file-system to use the correct
UUID (previously it was using a label).
First I tried to simply reconfigure my running system and then taking a
BTRFS snapshot and copying that over the /dev/sdb1, but that failed.
The exact error was GRUB not being able to find a file system with a
given UUID, which matched the UUID of /dev/sda1.  This error happened
before GRUB loaded any of its modules, so I was dropped into a rescue
shell.
I thought this might be related to subvolumes, maybe I originally used
the wrong config and the updated config was written to a different
subvolume and GRUB doesn't recognize the default subvolume ID option on
the BTRFS partition.
I think this is a fairly critical error.

The error doesn't manifest when I run guix system init with the same
config, so there is some (possibly un(der)documented) difference between
guix system reconfigure and guix system init that makes the former rely
on the state of the running system in a way that doesn't take into
account the new configuration.

Is this intended behaviour for some reason?




Information forwarded to bug-guix <at> gnu.org:
bug#64196; Package guix. (Wed, 21 Jun 2023 07:46:02 GMT) Full text and rfc822 format available.

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

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Csepp <raingloom <at> riseup.net>, 64196 <at> debbugs.gnu.org
Subject: Re: bug#64196: Can't boot due to discrepancy between reconfigure
 and init
Date: Wed, 21 Jun 2023 09:45:30 +0200
[Message part 1 (text/plain, inline)]
Hi Csepp,

Csepp <raingloom <at> riseup.net> writes:

> I'm trying to move my installation from /dev/sda to /dev/sdb, I created
> the file system and changed the bootloader config in my operating-system
> definition to point to /dev/sdb and the file-system to use the correct
> UUID (previously it was using a label).
> First I tried to simply reconfigure my running system and then taking a
> BTRFS snapshot and copying that over the /dev/sdb1, but that failed.

Any reason you didn't try in the reverse order?  This seems prone to error.

> The exact error was GRUB not being able to find a file system with a
> given UUID, which matched the UUID of /dev/sda1.  This error happened
> before GRUB loaded any of its modules, so I was dropped into a rescue
> shell.
> I thought this might be related to subvolumes, maybe I originally used
> the wrong config and the updated config was written to a different
> subvolume and GRUB doesn't recognize the default subvolume ID option on
> the BTRFS partition.
> I think this is a fairly critical error.

This is too fuzzy to be actionable, but if you manage to reproduce
reliably then I would gladly take a look at it.

> The error doesn't manifest when I run guix system init with the same
> config, so there is some (possibly un(der)documented) difference between
> guix system reconfigure and guix system init that makes the former rely
> on the state of the running system in a way that doesn't take into
> account the new configuration.

I don't think there is, the biggest difference is that `guix system
init` will copy stuff into the target store and initialize the basic
directories for Guix, whereas reconfigure will just build everything in
the current store.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#64196; Package guix. (Wed, 21 Jun 2023 22:14:01 GMT) Full text and rfc822 format available.

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

From: Csepp <raingloom <at> riseup.net>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 64196 <at> debbugs.gnu.org, Csepp <raingloom <at> riseup.net>
Subject: Re: bug#64196: Can't boot due to discrepancy between reconfigure
 and init
Date: Thu, 22 Jun 2023 00:08:36 +0200
Josselin Poiret <dev <at> jpoiret.xyz> writes:

> [[PGP Signed Part:Undecided]]
> Hi Csepp,
>
> Csepp <raingloom <at> riseup.net> writes:
>
>> I'm trying to move my installation from /dev/sda to /dev/sdb, I created
>> the file system and changed the bootloader config in my operating-system
>> definition to point to /dev/sdb and the file-system to use the correct
>> UUID (previously it was using a label).
>> First I tried to simply reconfigure my running system and then taking a
>> BTRFS snapshot and copying that over the /dev/sdb1, but that failed.
>
> Any reason you didn't try in the reverse order?  This seems prone to error.

Since reconfigure overwrites /dev/sdb, I don't see how reversing the
order would fix things??
Maybe copying the file system over and *then* running init would make
sense.

>> The exact error was GRUB not being able to find a file system with a
>> given UUID, which matched the UUID of /dev/sda1.  This error happened
>> before GRUB loaded any of its modules, so I was dropped into a rescue
>> shell.
>> I thought this might be related to subvolumes, maybe I originally used
>> the wrong config and the updated config was written to a different
>> subvolume and GRUB doesn't recognize the default subvolume ID option on
>> the BTRFS partition.
>> I think this is a fairly critical error.
>
> This is too fuzzy to be actionable, but if you manage to reproduce
> reliably then I would gladly take a look at it.

I tried reproducing it, it seems to happen every time, but I can try to
create a more minimal test case.

>> The error doesn't manifest when I run guix system init with the same
>> config, so there is some (possibly un(der)documented) difference between
>> guix system reconfigure and guix system init that makes the former rely
>> on the state of the running system in a way that doesn't take into
>> account the new configuration.
>
> I don't think there is, the biggest difference is that `guix system
> init` will copy stuff into the target store and initialize the basic
> directories for Guix, whereas reconfigure will just build everything in
> the current store.
>
> Best,

I mean, that's the theory, but either Guix or GRUB seems to get the
incorrect UUID from *somewhere*.




Information forwarded to bug-guix <at> gnu.org:
bug#64196; Package guix. (Thu, 22 Jun 2023 07:36:01 GMT) Full text and rfc822 format available.

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

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Csepp <raingloom <at> riseup.net>
Cc: 64196 <at> debbugs.gnu.org, Csepp <raingloom <at> riseup.net>
Subject: Re: bug#64196: Can't boot due to discrepancy between reconfigure
 and init
Date: Thu, 22 Jun 2023 09:35:08 +0200
[Message part 1 (text/plain, inline)]
Hi,

Csepp <raingloom <at> riseup.net> writes:
>> I don't think there is, the biggest difference is that `guix system
>> init` will copy stuff into the target store and initialize the basic
>> directories for Guix, whereas reconfigure will just build everything in
>> the current store.
>>
>> Best,
>
> I mean, that's the theory, but either Guix or GRUB seems to get the
> incorrect UUID from *somewhere*.

You can manually check that the generated grub.cfg file contains the
expected UUID after the reconfigure, it should be in
/boot/grub/grub.cfg.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#64196; Package guix. (Sat, 24 Jun 2023 18:04:01 GMT) Full text and rfc822 format available.

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

From: Csepp <raingloom <at> riseup.net>
To: Josselin Poiret <dev <at> jpoiret.xyz>
Cc: 64196 <at> debbugs.gnu.org, Csepp <raingloom <at> riseup.net>
Subject: Re: bug#64196: Can't boot due to discrepancy between reconfigure
 and init
Date: Sat, 24 Jun 2023 20:01:12 +0200
Josselin Poiret <dev <at> jpoiret.xyz> writes:

> [[PGP Signed Part:Undecided]]
> Hi,
>
> Csepp <raingloom <at> riseup.net> writes:
>>> I don't think there is, the biggest difference is that `guix system
>>> init` will copy stuff into the target store and initialize the basic
>>> directories for Guix, whereas reconfigure will just build everything in
>>> the current store.
>>>
>>> Best,
>>
>> I mean, that's the theory, but either Guix or GRUB seems to get the
>> incorrect UUID from *somewhere*.
>
> You can manually check that the generated grub.cfg file contains the
> expected UUID after the reconfigure, it should be in
> /boot/grub/grub.cfg.
>
> Best,

I did, I think I already wrote that it wasn't coming from there, but
I'll check again when I next try it.




Information forwarded to bug-guix <at> gnu.org:
bug#64196; Package guix. (Wed, 26 Jul 2023 22:47:01 GMT) Full text and rfc822 format available.

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

From: Csepp <raingloom <at> riseup.net>
To: Csepp <raingloom <at> riseup.net>
Cc: 64196 <at> debbugs.gnu.org, Josselin Poiret <dev <at> jpoiret.xyz>
Subject: Re: bug#64196: Can't boot due to discrepancy between reconfigure
 and init
Date: Thu, 27 Jul 2023 00:42:45 +0200
Csepp <raingloom <at> riseup.net> writes:

> Josselin Poiret <dev <at> jpoiret.xyz> writes:
>
>> [[PGP Signed Part:Undecided]]
>> Hi,
>>
>> Csepp <raingloom <at> riseup.net> writes:
>>>> I don't think there is, the biggest difference is that `guix system
>>>> init` will copy stuff into the target store and initialize the basic
>>>> directories for Guix, whereas reconfigure will just build everything in
>>>> the current store.
>>>>
>>>> Best,
>>>
>>> I mean, that's the theory, but either Guix or GRUB seems to get the
>>> incorrect UUID from *somewhere*.
>>
>> You can manually check that the generated grub.cfg file contains the
>> expected UUID after the reconfigure, it should be in
>> /boot/grub/grub.cfg.
>>
>> Best,
>
> I did, I think I already wrote that it wasn't coming from there, but
> I'll check again when I next try it.

This is still happening.  Couldn't figure out a decent way to transfer
my system with btrfs send.
I checked the generated bootloader installer script that gets run, it
seems to refer to the correct device, but somehow the UUID of the booted
partition still gets accessed.
I guess I'll have to strace it.




This bug report was last modified 282 days ago.

Previous Next


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