guix-devel
[Top][All Lists]
Advanced

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

Re: How to boot GuixSD in LXD


From: Ludovic Courtès
Subject: Re: How to boot GuixSD in LXD
Date: Mon, 19 Dec 2016 15:24:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

David Craven <address@hidden> 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 via email to

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