unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: David Craven <david@craven.ch>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: How to boot GuixSD in LXD
Date: Mon, 19 Dec 2016 15:24:47 +0100	[thread overview]
Message-ID: <877f6w3sk0.fsf@gnu.org> (raw)
In-Reply-To: <CAL1_imnTMRmydTjQCJA-KjjhLK+=Wn-A=gE2xqOGc5DMNDoFsA@mail.gmail.com> (David Craven's message of "Sun, 18 Dec 2016 20:27:41 +0100")

David Craven <david@craven.ch> skribis:

> The boot script:
> (eval-when (expand load eval) (set! %load-path (cons
> "/gnu/store/gi2zry48hdsr87yvasc3nv7niixab8lw-module-import"
> %load-path)) (set! %load-compiled-path (cons
> "/gnu/store/dz6yx4q81zb3pxvysblfd68lgwrya9a2-module-import-compiled"
> %load-compiled-path)))(begin (begin (use-modules (guix build utils))
> (letrec-syntax ((fail-safe (syntax-rules () ((_ exp rest ...) (begin
> (catch (quote system-error) (lambda () exp) (const #f)) (fail-safe
> rest ...))) ((_) #t)))) (fail-safe (delete-file-recursively "/tmp")
> (delete-file-recursively "/var/run") (mkdir "/tmp") (chmod "/tmp"
> 1023) (mkdir "/var/run") (chmod "/var/run" 493)))) (primitive-load
> "/gnu/store/xs63km6mqdkxdbwqkvbk2ryccaq80971-activate") (begin
> (false-if-exception (delete-file "/run/booted-system")) (symlink
> (readlink "/run/current-system") "/run/booted-system") (let loop ((fd
> 3)) (when (< fd 1024) (false-if-exception (close-fdes fd)) (loop (+ 1
> fd)))) (execl (string-append
> "/gnu/store/qfax650mynyx9x8wm8lq8w7fp82kkfc6-shepherd-0.3.2"
> "/bin/shepherd") "shepherd" "--config"
> "/gnu/store/i5cqh5kx4mmz616aqp9g8qkcq9v7fszg-shepherd.conf")))

Scary, no?  :-)

To understand where this code comes from, you can look at the output of
‘guix system extension-graph’, specifically arrows that flow in the
“boot” service.  This “boot” service corresponds to:

  http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services.scm#n232

… and the main contribution to this boot script is:

  http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/services/shepherd.scm#n67

HTH!

Ludo’.

  reply	other threads:[~2016-12-19 14:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-17 22:49 How to boot GuixSD in LXD David Braun
2016-12-18 19:27 ` David Craven
2016-12-19 14:24   ` Ludovic Courtès [this message]
2016-12-22 22:37     ` David Braun
2016-12-22 22:36   ` David Braun

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=877f6w3sk0.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=david@craven.ch \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).