From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eddy Pronk Subject: Re: guixsd in lxd container Date: Sat, 10 Jun 2017 14:53:24 +1000 Message-ID: References: <87h8zo3jzk.fsf@gnu.org> 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]:59488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dJYOx-0002vo-6w for guix-devel@gnu.org; Sat, 10 Jun 2017 00:53:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dJYOu-0000xZ-4K for guix-devel@gnu.org; Sat, 10 Jun 2017 00:53:31 -0400 Received: from mail-ot0-x232.google.com ([2607:f8b0:4003:c0f::232]:36504) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dJYOt-0000tP-TM for guix-devel@gnu.org; Sat, 10 Jun 2017 00:53:28 -0400 Received: by mail-ot0-x232.google.com with SMTP id i31so47403794ota.3 for ; Fri, 09 Jun 2017 21:53:26 -0700 (PDT) In-Reply-To: <87h8zo3jzk.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Cc: guix-devel@gnu.org On Sat, Jun 10, 2017 at 7:54 AM, Ludovic Court=C3=A8s wrote: >> When a container start it runs /sbin/init. > > You mean LXD expects to run /sbin/init, right? Yes, and the LXD container can be configured to run any other program inste= ad. > The line that=E2=80=99s printed here comes from (gnu build activation): > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/build/activation.sc= m#n442 > > As you can see, it takes the value of =E2=80=98system=E2=80=99 either fro= m the kernel=E2=80=99s > =E2=80=98--system=E2=80=99 command-line argument (/proc/cmdline), or from= the > =E2=80=98GUIX_NEW_SYSTEM=E2=80=99 environment variable. > > So you=E2=80=99d have to set =E2=80=98GUIX_NEW_SYSTEM=E2=80=99 in your ca= se to fix this. Added this to my start script: export GUIX_NEW_SYSTEM=3D/gnu/store/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system Great. That works. This got me 2 steps further. I had to comment out some snippets from activation.scm: ;; activate-modprobe ;; activate-firmware ;; activate-ptrace-attach (I actually edited the 1 line snippets that get generated somehow.) Now the boot script starts shepherd. >> Service file-system-/tmp has been started. >> failed to start service 'file-systems' <<=3D=3D first problem. >> failed to start service 'file-system-/dev/pts' > > What =E2=80=98guix system container=E2=80=99 does to work around this is = to try to mount > only file systems that can really be mounted inside a container, with > the right options: > > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/linux-contai= ner.scm#n37 > https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/file-systems= .scm#n325 I'd like to get some logging out of the "failed to start service 'file-systems'". When /sbin/init starts the usb-install image is already mounted on '/'. What I see as pstree is: ---shepherd-+-udevd `-{shepherd} failed to start service 'term-tty1' is the last thing I see. Can someone post a full log of the shepherd startup? > BTW, did you consider using =E2=80=98guix system container=E2=80=99 direc= tly instead of > LXC? It=E2=80=99s not perfect but probably worth a try: I'll give that a try. Maybe just to learn how it does it. For Ubuntu users (or others distros with LXD) it would be a nice managed way of trying out GuixSD if I get this to work. Cheers, Eddy