all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eddy Pronk <epronk@muftor.com>
To: guix-devel@gnu.org
Subject: guixsd in lxd container
Date: Wed, 7 Jun 2017 23:08:29 +1000	[thread overview]
Message-ID: <CAErGuQguW9qJGBeAn1QjiUYdakON2gSzhqZQYL4Eis6TNgy20g@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 4847 bytes --]

Hello guix!

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.
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:
https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00704.html

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...
Backtrace:
In ice-9/boot-9.scm:
 160: 13 [catch #t #<catch-closure 938020> ...]
In unknown file:
   ?: 12 [apply-smob/1 #<catch-closure 938020>]
In ice-9/boot-9.scm:
  66: 11 [call-with-prompt prompt0 ...]
In ice-9/eval.scm:
 432: 10 [eval # #]
In ice-9/boot-9.scm:
2412: 9 [save-module-excursion #<procedure 95c900 at
ice-9/boot-9.scm:4084:3 ()>]
4089: 8 [#<procedure 95c900 at ice-9/boot-9.scm:4084:3 ()>]
1734: 7 [%start-stack load-stack #<procedure 9663a0 at
ice-9/boot-9.scm:4080:10 ()>]
1739: 6 [#<procedure 96ebd0 ()>]
In unknown file:
   ?: 5 [primitive-load
"/gnu/store/kq71yhydfgc0nksvmmn66cbvbj5a3mvf-system/boot"]
In ice-9/eval.scm:
 432: 4 [eval # ()]
In unknown file:
   ?: 3 [primitive-load
"/gnu/store/9j944zjslsihhsgipa7gz7x046fkcjm7-activate"]
In ice-9/eval.scm:
 432: 2 [eval # ()]
In ./gnu/build/activation.scm:
 456: 1 [activate-current-system #f]
In unknown file:
   ?: 0 [symlink #f "/run/current-system.new"]

ERROR: In procedure symlink:
ERROR: Wrong type (expecting string): #f
===

Ignoring the errors above I'll now try to start shepherd, to see how far I
get.

jenkins@ubuntu16041:~/guixsd$ lxc exec guixsd --
/gnu/store/sa7zrdfqglnb5rvvr11qdj0rspbs292v-profile/bin/bash -c
"/gnu/store/q49si29djfcrpzibqg6cg8k6xixxvd2f-shepherd-0.3.2/bin/shepherd
--config /gnu/store/df56ad2rw1ayjyhs1kqadskf5zsmsc5l-shepherd.conf 2>&1"
Service root has been started.
starting services...
Service root-file-system has been started.
Service user-file-systems has been started.
Service file-system-/tmp has been started.
failed to start service 'file-systems'  <<== first problem.
failed to start service 'file-system-/dev/pts'
Service file-system-/dev/shm has been started.
failed to start service 'file-system-/gnu/store'
failed to start service 'user-processes'
Service host-name has been started.
failed to start service 'user-homes'
failed to start service 'nscd'
failed to start service 'ssh-daemon'
waiting for udevd...
waiting for udevd...
waiting for udevd...
waiting for udevd...
Service udev has been started.
Service gpm could not be started.
failed to start service 'console-font-tty1'
failed to start service 'console-font-tty2'
failed to start service 'console-font-tty3'
failed to start service 'console-font-tty4'
failed to start service 'console-font-tty5'
failed to start service 'console-font-tty6'
failed to start service 'guix-daemon'
failed to start service 'syslogd'
failed to start service 'term-tty6'
failed to start service 'term-tty5'
failed to start service 'term-tty4'
failed to start service 'term-tty3'
failed to start service 'term-tty2'
failed to start service 'term-tty1'


  C-c C-c^CExiting shepherd...
unmounting '/dev'...
failed to unmount '/dev': Device or resource busy
unmounting '/dev/null'...
failed to unmount '/dev/null': Device or resource busy
Service user-file-systems has been stopped.
Service host-name has been stopped.
Service file-system-/dev/shm has been stopped.
Service file-system-/tmp has been stopped.
Service udev has been stopped.
closing log
===

See also:
https://lists.gnu.org/archive/html/guix-devel/2016-12/msg00733.html

I would like to get some help to solve this puzzle.



Cheers,
Eddy

[-- Attachment #2: Type: text/html, Size: 6038 bytes --]

             reply	other threads:[~2017-06-07 13:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-07 13:08 Eddy Pronk [this message]
2017-06-09 21:54 ` guixsd in lxd container Ludovic Courtès
2017-06-10  4:53   ` Eddy Pronk
2017-06-10  5:30     ` Jan Nieuwenhuizen
2017-06-11 20:26     ` Ludovic Courtès
2017-06-16 12:21       ` Eddy Pronk
2017-06-19 11:41         ` Ludovic Courtès
2017-06-20 12:35           ` Eddy Pronk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAErGuQguW9qJGBeAn1QjiUYdakON2gSzhqZQYL4Eis6TNgy20g@mail.gmail.com \
    --to=epronk@muftor.com \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.