[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20024: grub store is not copied to target system

From: Ludovic Courtès
Subject: bug#20024: grub store is not copied to target system
Date: Mon, 09 Mar 2015 18:00:24 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Tomas Cech <address@hidden> skribis:

> I'm afraid that I don't understand the relation between `guix system init' and
> `guix system reconfigure' you insist on. My understanding was, that `guix
> system init' will create new system in subdirectory as it is described in
> manual (6.1.4 Proceeding with the Installation).

‘guix system init’ initializes a GuixSD root file system.  It is
typically used from the USB installation image.

Conversely, ‘guix system reconfigure’ is used to reconfigure an already
installed GuixSD system, with the untold assumption that the root
partition remains the same (which is reasonable, IMO.)

>>Seriously, I don’t think we’d want it to automagically migrate the
> How does it differ from building new VM image?

‘init’ is similar to building a new VM image; ‘reconfigure’ is not.

Specifically, ‘reconfigure’ changes things to have immediate effect,
such as switching /run/current-system/ to the new (reconfigured) system.
Eventually it will also offer to restart dmd services whose definition
have changed.

>>Maybe it could check whether the root partition in the OS declaration is
>>the same as the one that holds the current store, but I’m not sure if
>>that can be done reliably.  Thoughts?
> Again, I'm afraid we misunderstood each other.
> One thing is that you can expose it to configuration and let user configure it
> correctly. I was already thinking that I'm wasting disk space with two copies
> of /gnu/store on my computer (on Gentoo and on GuixSD).

Oh, I see.  So you had installed Guix atop Gentoo, and from there you
wanted to install GuixSD while (1) keeping Gentoo, and (2) not
rebuilding a new store, right?

The solution to is to run, from your Gentoo system:

  # guix system init config.scm /

The “/” here means that you keep the same root file system, and thus the
same store.

If you want to still be able to boot into Gentoo, you need to specify
GRUB menu entries in config.scm, like

  (define gentoo-entry
     (label "Gentoo")
     (linux "/whatever/bzImage")
     (linux-arguments '("answer=42"))
     (initrd "/something/initrd.gz")))

    ;; ...
    (bootloader (grub-configuration
                 (device "/dev/sda")
                 (menu-entries (list gentoo-entry)))))

But!  Beware that GuixSD wants to own /etc.  So in practice, when you
boot GuixSD, it may override most of the files in there with its own (it
might also bork of some of its assumptions do not hold, like if Gentoo
left files in /etc that it doesn’t expect to see.)  So the next time you
boot into Gentoo, Gentoo will basically be somewhat broken.

IOW, using ‘guix system init’ on the current root should be thought of
as a one-way transition.  It’s not documented because it’s brittle and
it’s most likely not what you want.

Does that better answer your questions?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]