[Top][All Lists]

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

Re: guixsd in lxd container

From: Ludovic Courtès
Subject: Re: guixsd in lxd container
Date: Fri, 09 Jun 2017 23:54:23 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux)

Hi Eddy,

Eddy Pronk <address@hidden> skribis:

> I'm trying to run guixsd in an lxd container.
> My lxd containers run on an Ubuntu server 16.04.
> I took the usb-installer image and imported in as an lxd image.
> When a container start it runs /sbin/init.

You mean LXD expects to run /sbin/init, right?

> In guixsd /proc/1 is shepherd, but a lot of stuff happens before shepherd
> is started.
> I've set a few things in the environment matching values in /proc/1/environ.
> The argument of --load in grub.cfg is a guile program.
> I found some details about the kernel loading guile here:
> To be able to get some logging during startup of guixsd I'm trying to run
> it from a shell script as root.
> ====
> cat /sbin/start
> export HOME=/
> export TERM=linux
> export
> BOOT_IMAGE="/gnu/store/fqc2kg4lq1lz1ymk41080jzb5q90icg0-linux-libre-4.11/bzImage
> --root=gnu-disk-image
> --system=/gnu/store/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system
> --load=/gnu/store/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system/boot"
> export PATH=/gnu/store/crvb68g89b479n4h44r8l42hy39axhg2-shadow-4.4/sbin/
> cd $HOME
> /gnu/store/sa7zrdfqglnb5rvvr11qdj0rspbs292v-profile/bin/ln -s
> /gnu/store/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system /run/current-system
> /gnu/store/zk41gmzbibvpx9dpsm5gs8p0liz8shy0-guile-2.0.14/bin/guile
> --no-auto-compile /gnu/store/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system/boot
> ===
> When I run the start script I get the following output.
> $ lxc exec guixsd --
> /gnu/store/sa7zrdfqglnb5rvvr11qdj0rspbs292v-profile/bin/bash -c
> "/sbin/start 2>&1"
> /gnu/store/sa7zrdfqglnb5rvvr11qdj0rspbs292v-profile/bin/ln: failed to
> create symbolic link
> '/run/current-system/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system': File exists
> making '#f' the current system...


> In ./gnu/build/activation.scm:
>  456: 1 [activate-current-system #f]
> In unknown file:
>    ?: 0 [symlink #f "/run/"]
> ERROR: In procedure symlink:
> ERROR: Wrong type (expecting string): #f

The line that’s printed here comes from (gnu build activation):

As you can see, it takes the value of ‘system’ either from the kernel’s
‘--system’ command-line argument (/proc/cmdline), or from the
‘GUIX_NEW_SYSTEM’ environment variable.

So you’d have to set ‘GUIX_NEW_SYSTEM’ in your case to fix this.

> Service file-system-/tmp has been started.
> failed to start service 'file-systems'  <<== first problem.
> failed to start service 'file-system-/dev/pts'

What ‘guix system container’ 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:


BTW, did you consider using ‘guix system container’ directly instead of
LXC?  It’s not perfect but probably worth a try:


reply via email to

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