all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* QEMU image boots into dmd
@ 2013-09-20 23:09 Ludovic Courtès
  2013-09-21 16:02 ` Andreas Enge
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Ludovic Courtès @ 2013-09-20 23:09 UTC (permalink / raw)
  To: guix-devel

So (gnu system vm) and its friends are now able to build a bootable QEMU
image.  That’s still *very* rough on the edges, but it boots into dmd
(version -0.4 is out BTW, 10 years later ;-)).

To build it, do something like:

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guile
GNU Guile 2.0.9
Copyright (C) 1995-2013 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> ,m (gnu system vm)
scheme@(gnu system vm)> (define s (open-connection ))
scheme@(gnu system vm)> (system-qemu-image s)
$1 = #<derivation /nix/store/yijxfnrwy3c5rv9zc9q474rv4fj91l9f-qemu-image.drv => /nix/store/s9fagmjmqcm14xzzb0j6aviw7nb1j12m-qemu-image 21143c0>
scheme@(gnu system vm)> (build-derivations s (list $1))
$2 = #t
scheme@(gnu system vm)> (derivation->output-path $1)
$3 = "/nix/store/s9fagmjmqcm14xzzb0j6aviw7nb1j12m-qemu-image"
^D

$ cp "/nix/store/s9fagmjmqcm14xzzb0j6aviw7nb1j12m-qemu-image" t.img
$ qemu-system-x86_64 -serial stdio -net nic,model=e1000 -net user,smb=$PWD -hda t.img
--8<---------------cut here---------------end--------------->8---

There are several services that dmd starts [0]: mingetty on tty1-3, and
syslogd.  mingetty runs ‘login’, which uses PAM for authentication [1]
It allows you to log in as ‘root’ with no password.  On tty12 is some
output from syslogd.  Once logged in you can run incredible things such
as ‘/nix/store/*dmd*/bin/deco detailed-status dmd’.

And that’s it!  :-)

We need to at least make a proper profile, put it in $PATH via
/etc/bashrc; we need to have Guix installed in the image, and the
packages already there recognized.  There are many details to fix
(setting a host name, etc.)

Ideally Xorg + slim would be great, not sure how much effort that would
take.

In short, if you feel like helping out, you’re more than welcome!

Thanks,
Ludo’.

PS: The good news is that 90% of this work is directly reusable for a
    “real” system, and not specific to virtual images.

[0] http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/vm.scm#n355
[1] http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/system/linux.scm#n42

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-09-24 21:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 23:09 QEMU image boots into dmd Ludovic Courtès
2013-09-21 16:02 ` Andreas Enge
2013-09-21 20:10   ` Ludovic Courtès
2013-09-21 17:59 ` Mark H Weaver
2013-09-21 19:34   ` Ludovic Courtès
2013-09-24 21:48 ` Ludovic Courtès

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.