From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Chrooting into GuixSD Date: Sat, 16 Jun 2018 17:43:37 +0200 Message-ID: <87a7rupwie.fsf@gnu.org> References: <8FCA4777-D0E1-4379-AF97-FD0785D26585@riseup.net> <5e600d9e-b123-17c0-302f-3f3cd6626e26@crazy-compilers.com> <20180613081346.jhkzdorwjp6albqx@abyayala> <877en0t7oh.fsf@gnu.org> <911b3265-dd96-7223-9825-f46cc8615a09@freenet.de> 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]:36675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fUDMb-0007kk-08 for guix-devel@gnu.org; Sat, 16 Jun 2018 11:43:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fUDMa-0000E7-4w for guix-devel@gnu.org; Sat, 16 Jun 2018 11:43:41 -0400 In-Reply-To: <911b3265-dd96-7223-9825-f46cc8615a09@freenet.de> (Thorsten Wilms's message of "Fri, 15 Jun 2018 20:20:01 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Thorsten Wilms Cc: Guix-devel Hi! Thorsten Wilms skribis: > Well, I tried: > > cd /path/to/guixsd > chroot . /run/current-system/profile/bin/bash > source /etc/profile > guile /run/current-system/boot [...] > In ./gnu/build/linux-boot.scm: > 90:3 2 (linux-command-line) > In ice-9/ports.scm: > 439:11 1 (call-with-input-file "/proc/cmdline" # ?) > In unknown file: > 0 (open-file "/proc/cmdline" "r" #:encoding #f # #f) > > ERROR: In procedure open-file: > In procedure open-file: No such file or directory: "/proc/cmdline" > --- > > I _guess_ if I'd bind proc, I would then find out dev and sys has to > be taken care of, too, leading back to what I had already. Indeed. This is normally taken care of by the =E2=80=98init=E2=80=99 scrip= t that=E2=80=99s in the initrd. A crude way to do that would be: guile --no-auto-compile \ $(guix build $(guix gc -R $(guix gc --derivers $(readlink -f /run/curre= nt-system/))|grep -e '-init\.drv$')) The =E2=80=98guix=E2=80=99 commands won=E2=80=99t work initially in the chr= oot though. Alternately, you could extract the initrd somewhere: gunzip -c /target/run/current-system/initrd | cpio -iv and run: guile --no-auto-compile ./init Then again we could also just arrange for =E2=80=98guix system build=E2=80= =99 to include an =E2=80=98enter=E2=80=99 script that would do everything needed to chroot= into the system. Food for thought=E2=80=A6 Ludo=E2=80=99.