From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#20024: grub store is not copied to target system Date: Mon, 09 Mar 2015 18:00:24 +0100 Message-ID: <877fuqkswn.fsf@gnu.org> References: <20150307000159.GA1292@venom> <87lhj7nor2.fsf@gnu.org> <20150308215719.GB22135@venom> <8761aatx2m.fsf@gnu.org> <20150309103424.GB30937@crashnator.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52822) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV139-0002iN-Eb for bug-guix@gnu.org; Mon, 09 Mar 2015 13:01:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YV138-00087t-9k for bug-guix@gnu.org; Mon, 09 Mar 2015 13:01:03 -0400 Received: from debbugs.gnu.org ([140.186.70.43]:42319) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YV138-00087T-6K for bug-guix@gnu.org; Mon, 09 Mar 2015 13:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YV137-0007Hs-MZ for bug-guix@gnu.org; Mon, 09 Mar 2015 13:01:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <20150309103424.GB30937@crashnator.suse.cz> (Tomas Cech's message of "Mon, 9 Mar 2015 11:34:24 +0100") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Tomas Cech Cc: 20024@debbugs.gnu.org Tomas Cech 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). =E2=80=98guix system init=E2=80=99 initializes a GuixSD root file system. = It is typically used from the USB installation image. Conversely, =E2=80=98guix system reconfigure=E2=80=99 is used to reconfigur= e an already installed GuixSD system, with the untold assumption that the root partition remains the same (which is reasonable, IMO.) >>Seriously, I don=E2=80=99t think we=E2=80=99d want it to automagically mi= grate the >>store. > > How does it differ from building new VM image? =E2=80=98init=E2=80=99 is similar to building a new VM image; =E2=80=98reco= nfigure=E2=80=99 is not. Specifically, =E2=80=98reconfigure=E2=80=99 changes things to have immediat= e 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=E2=80=99m not sur= e 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 configu= re it > correctly. I was already thinking that I'm wasting disk space with two co= pies > 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 =E2=80=9C/=E2=80=9D 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 (menu-entry (label "Gentoo") (linux "/whatever/bzImage") (linux-arguments '("answer=3D42")) (initrd "/something/initrd.gz"))) (operating-system ;; ... (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=E2=80=99t expect to see.) So the next tim= e you boot into Gentoo, Gentoo will basically be somewhat broken. IOW, using =E2=80=98guix system init=E2=80=99 on the current root should be= thought of as a one-way transition. It=E2=80=99s not documented because it=E2=80=99s = brittle and it=E2=80=99s most likely not what you want. Does that better answer your questions? Thanks, Ludo=E2=80=99.