* Instructions on testing the installer without having to make an ISO

/ burn a CD, namely by making a loopback target file system.
* Installer: continue if the MANIFEST on the CD is missing (useful if
  we're not actually installing from a CD).

svn path=/nixos/trunk/; revision=7843
This commit is contained in:
Eelco Dolstra 2007-02-05 15:12:47 +00:00
parent 6fcd79d2ce
commit 4b7e9b5401
4 changed files with 13 additions and 2 deletions

8
README
View file

@ -128,3 +128,11 @@ To get out of maintenance mode:
-A ATTR
where ATTR is an attribute in system/system.nix (e.g., bootStage1).
- Testing the installer:
$ dd if=/dev/zero of=diskimage seek=2G count=0 bs=1
$ yes | mke2fs -j diskimage
$ mount -o loop diskimage /mnt
$ nixos-installer /mnt /etc/nixos/nixos/ /etc/nixos/configuration.nix

View file

@ -10,7 +10,7 @@ XSLTPROC = xsltproc --catalogs \
docbookxsl = $(HOME)/.nix-profile/xml/xsl/docbook
manual.html: manual.xml options-db.xml
manual.html: *.xml options-db.xml
$(XSLTPROC) --nonet --xinclude --output $@ \
$(docbookxsl)/html/docbook.xsl manual.xml

View file

@ -5,6 +5,7 @@
}:
substituteAll {
name = "nixos-installer";
src = ./nixos-installer.sh;
dir = "bin";
isExecutable = true;

View file

@ -117,7 +117,9 @@ cp /etc/resolv.conf $mountPoint/etc/
# the CD can be copied directly.
echo "registering substitutes to speed up builds..."
chroot $mountPoint @nix@/bin/nix-store --clear-substitutes
chroot $mountPoint @nix@/bin/nix-pull file:///mnt/MANIFEST
if test -e /mnt/MANIFEST; then
chroot $mountPoint @nix@/bin/nix-pull file:///mnt/MANIFEST
fi
rm -f $mountPoint/tmp/inst-store
ln -s /mnt/nix/store $mountPoint/tmp/inst-store