[Nix-dev] New ISO image expression and automated testing.
Michael Raskin
7c6f434c at mail.ru
Sun Jun 8 16:53:19 CEST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello.
Speaking of generating install optical disk, we have discussed
different goals. I hope that significant part of them is achieved in
rescue-cd-configurable.nix; also it is a good idea to recollect the
goals to compile a local roadmap.
Goals I remember explicitly named or tried to achieve during any part
of development:
1) Separate configuring inevitable things from customization.
2) Provide an X.org-enabled LiveDVD.
3) Automatically verify that the disk installs the system correctly
after some updates.
4) Be able to use the disk to install NixOS while offline. Or at least
while nixos.org is offline.
5) Have better networking support, like PPP/PPPoE support.
6) Provide multiple configurations.
7) Be able to use Live DVD as a package storage.
How to achieve these goals (where at all possible) with
rescue-cd-configurable.nix expression:
1) You can call it with the parameters you like.
2) live-dvd-X-no-soft.nix is a small example of how it is done. Nix
stores all packages once and shares among different system profiles -
except for differing configuration files. So X drivers are selected from
boot menu. It is feasible to ask user on first root login and do a
nixos-rebuild test, though. I will require - now unincluded -
configuration.nix to be included or generated for every configuration on
~ disk.
3) It is done in my recent commit. The structure is as follows:
a) user runs install-test.sh, say, in tmp.
b) it builds qemu and socat in store and creates corresponding
symlinks. Also it builds the DVD itself. It is a well suitable for
normal installation DVD, except that root has a known (on the original
system) private key and there i a special effort to connect to 10.0.2.2
(Qemu host connection address for guest) and to tunnel SSH through that
connection. Note: Qemu allows an easier way, but I prefered a bit more
generic way.
c) using the SSH tunnel established by socat, the script uploads
installation commands to Qemu and launches them. The installation script
reboots Qemu when finished. Qemu is launched with -no-reboot, so it
terminates.
d) Qemu is booted without DVD, just with installed HDD. The
installation is a basic system (even with sshd), but it connects to
10.0.2.2 and reports successful installed. It also asks if the Qemu
should be rebooted (gets answer "reboot" and shuts it down thanks to
- -no-reboot). The fact of its report is recorded.
That way, if the test script terminates without error, it means that
installation process works. If not, it may hang, but I see no way to
exclude that. It will not do much in that case, though, so a timeout can
be with some safety margin.
4) One option in generator includes every dependency of all packages on
DVD. So you can get sources, and you can always build a slightly
modified system - all tools are there.
5) Big red mark - ! TODO !
I ask everyone interested to share all the knowledge - what packages are
needed, what are the traps while building them.. Also testing will be
needed - I can check that the packages mentioned in list are compiled.
With mentioned dependencies (and whatever will be reported by package)
and mentioned flags. But actually checking everything works is another
issue..
6) Done, look at live-dvd-X-ni-soft.nix for example.
7) Was from the beginning. Manifest on disk mentions where you have to
symlink store from mounted disk to use substitutions.
Comments? Additional goals? Data on PPP configuration?
Raskin
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQEcBAEBAgAGBQJIS/JdAAoJEE6tnN0aWvw38w8H/2oYZDoNymh7wQlV/FwLHlu3
bGHZQ+VYV2tUHteP4MWGhpQFojjQ3hyyJ59rng557R8qKCgNyo+0P92JTZPNUuiF
BuqLr9QpeZtfajYirYN7a/grH9wsA39NUwJotJ2PIKmVAckCefpDdJB/MOrRzFkW
VeDihJlKQC+Sr8WfCfLrRv+9patRptnSqysmMo3mOHmeq0UixoigZwZoBGSolFs3
sGnZ3qZAHO+ctgERmwpkcvJ+0eysWJbME+imlfOXx+44Q/cgJWDhwMVAeaK2Wc9c
AxeQNeBYvO9zreO228NX8R/qxJsLtefm5yJp3W09ejKsDUoPteVZhqXiEj7+t5I=
=Jiqv
-----END PGP SIGNATURE-----
More information about the nix-dev
mailing list