GNU bug report logs - #22802
guix system init installs grub.cfg gcroot to host

Previous Next

Package: guix;

Reported by: Jookia <166291 <at> gmail.com>

Date: Thu, 25 Feb 2016 04:00:02 UTC

Severity: important

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22802 in the body.
You can then email your comments to 22802 AT debbugs.gnu.org in the normal way.

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#22802; Package guix. (Thu, 25 Feb 2016 04:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Jookia <166291 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 25 Feb 2016 04:00:02 GMT) Full text and rfc822 format available.

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

From: Jookia <166291 <at> gmail.com>
To: bug-guix <at> gnu.org
Subject: guix system init installs grub.cfg gcroot to host
Date: Thu, 25 Feb 2016 14:56:23 +1100
When running 'guix system init', GRUB requires a GC root to be placed in
/var/guix. When building a VM, this GC root is placed in <disk>/var/guix/gcroots
however while building a system on another drive, the GC root is placed on the
host's /var/guix/gcroots , not only overwriting the host's grub.cfg which could
be problematic if GC is run and the host has a different grub.cfg to the system
being inited, but the system being inited lacks the grub.cfg and can run GC and
clear out its GRUB files itself.

'guix system reconfigure' once you're inside the new system fixes this issue for
the new system, but the host system may still have a broken grub.cfg and will
need reconfiguring also.




Severity set to 'important' from 'normal' Request was from ludo <at> gnu.org (Ludovic Courtès) to control <at> debbugs.gnu.org. (Mon, 29 Feb 2016 14:25:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#22802; Package guix. (Mon, 07 Mar 2016 12:16:01 GMT) Full text and rfc822 format available.

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

From: ludo <at> gnu.org (Ludovic Courtès)
To: Jookia <166291 <at> gmail.com>
Cc: 22802 <at> debbugs.gnu.org
Subject: Re: bug#22802: guix system init installs grub.cfg gcroot to host
Date: Mon, 07 Mar 2016 13:15:38 +0100
[Message part 1 (text/plain, inline)]
Jookia <166291 <at> gmail.com> skribis:

> When running 'guix system init', GRUB requires a GC root to be placed in
> /var/guix. When building a VM, this GC root is placed in <disk>/var/guix/gcroots
> however while building a system on another drive, the GC root is placed on the
> host's /var/guix/gcroots

Indeed, good catch!

I believe this is fixed with the patch below.  Can you confirm?

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/guix/scripts/system.scm b/guix/scripts/system.scm
index 9f56a96..8ebeb4d 100644
--- a/guix/scripts/system.scm
+++ b/guix/scripts/system.scm
@@ -128,7 +128,8 @@ TARGET, and register them."
 (define (install-grub* grub.cfg device target)
   "This is a variant of 'install-grub' with error handling, lifted in
 %STORE-MONAD"
-  (let* ((gc-root      (string-append %gc-roots-directory "/grub.cfg"))
+  (let* ((gc-root      (string-append target %gc-roots-directory
+                                      "/grub.cfg"))
          (temp-gc-root (string-append gc-root ".new"))
          (delete-file  (lift1 delete-file %store-monad))
          (make-symlink (lift2 switch-symlinks %store-monad))

Information forwarded to bug-guix <at> gnu.org:
bug#22802; Package guix. (Mon, 07 Mar 2016 23:45:01 GMT) Full text and rfc822 format available.

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

From: Jookia <166291 <at> gmail.com>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 22802 <at> debbugs.gnu.org
Subject: Re: bug#22802: guix system init installs grub.cfg gcroot to host
Date: Tue, 8 Mar 2016 10:40:22 +1100
On Mon, Mar 07, 2016 at 01:15:38PM +0100, Ludovic Courtès wrote:
> Jookia <166291 <at> gmail.com> skribis:
> > When running 'guix system init', GRUB requires a GC root to be placed in
> > /var/guix. When building a VM, this GC root is placed in <disk>/var/guix/gcroots
> > however while building a system on another drive, the GC root is placed on the
> > host's /var/guix/gcroots
>
> Indeed, good catch!
>
> I believe this is fixed with the patch below.  Can you confirm?

I can't easily confirm since I don't have a system I can 'init' to anymore, and
I've already fixed this in my set of GRUB patches so it'd also lock me out of
Libreboot on my actual machine if I did.

> Thanks,
> Ludo’.

Sorry,
Jookia.




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Tue, 08 Mar 2016 10:16:02 GMT) Full text and rfc822 format available.

Notification sent to Jookia <166291 <at> gmail.com>:
bug acknowledged by developer. (Tue, 08 Mar 2016 10:16:02 GMT) Full text and rfc822 format available.

Message #18 received at 22802-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Jookia <166291 <at> gmail.com>
Cc: 22802-done <at> debbugs.gnu.org
Subject: Re: bug#22802: guix system init installs grub.cfg gcroot to host
Date: Tue, 08 Mar 2016 11:15:28 +0100
Jookia <166291 <at> gmail.com> skribis:

> On Mon, Mar 07, 2016 at 01:15:38PM +0100, Ludovic Courtès wrote:
>> Jookia <166291 <at> gmail.com> skribis:
>> > When running 'guix system init', GRUB requires a GC root to be placed in
>> > /var/guix. When building a VM, this GC root is placed in <disk>/var/guix/gcroots
>> > however while building a system on another drive, the GC root is placed on the
>> > host's /var/guix/gcroots
>>
>> Indeed, good catch!
>>
>> I believe this is fixed with the patch below.  Can you confirm?
>
> I can't easily confirm since I don't have a system I can 'init' to anymore, and
> I've already fixed this in my set of GRUB patches so it'd also lock me out of
> Libreboot on my actual machine if I did.

Sure.  After rereading it, it seemed obviously correct™ so I pushed it
as 16210486e6bb2e7b81e0208e42584b1eed826cd0.

Thanks!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 05 Apr 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 22 days ago.

Previous Next


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