From 32020223550b7426715f4aff4c8359cd05387ffb Mon Sep 17 00:00:00 2001 From: Michael Raskin <7c6f434c@mail.ru> Date: Wed, 16 Sep 2009 12:31:23 +0000 Subject: [PATCH] Adding an updated iso_minimal version svn path=/nixos/trunk/; revision=17186 --- .../installation-cd-minimal-fresh-kernel.nix | 37 +++++++++++++++++++ modules/installer/cd-dvd/iso-image.nix | 4 +- release.nix | 10 ++++- 3 files changed, 48 insertions(+), 3 deletions(-) create mode 100644 modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix diff --git a/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix b/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix new file mode 100644 index 00000000000..73e83fa2645 --- /dev/null +++ b/modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix @@ -0,0 +1,37 @@ +# This module defines a small NixOS installation CD. It does not +# contain any graphical stuff. + +{config, pkgs, ...}: + +{ + require = [./installation-cd-base.nix]; + + installer.configModule = "./nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; + + # Don't include X libraries. + services.sshd.forwardX11 = false; + services.dbus.enable = false; # depends on libX11 + services.hal.enable = false; # depends on dbus + fonts.enableFontConfig = false; + fonts.enableCoreFonts = false; + + # Use Linux 2.6.31-zen0 (with aufs2). + boot.kernelPackages = pkgs.kernelPackages_2_6_31_zen0; + + # We need squashfs and aufs. Zen Linux Kernel contains kernel side. + boot.initrd.extraUtilsCommands = '' + cp ${config.boot.kernelPackages.aufs2Utils}/sbin/mount.aufs $out/bin + cp ${config.boot.kernelPackages.aufs2Utils}/sbin/umount.aufs $out/bin + mkdir -p $out/var/run/current-system/sw + ln -s /bin "$out/var/run/current-system/sw/sbin" + ''; + + boot.initrd.extraKernelModules = [ + "i8042" "pcips2" "serio" "mousedev" "evdev" "psmouse" "sermouse" + "synaptics_i2c" "unix" "usbhid" "uhci_hcd" "ehci_hcd" "ohci_hcd" + "atkbd" "xtkbd" + # CD part + "iso9660" "loop" "squashfs" + ]; + boot.initrd.allowMissing = true; +} diff --git a/modules/installer/cd-dvd/iso-image.nix b/modules/installer/cd-dvd/iso-image.nix index bd4d39ccdf8..2a0ac4f0e28 100644 --- a/modules/installer/cd-dvd/iso-image.nix +++ b/modules/installer/cd-dvd/iso-image.nix @@ -86,7 +86,9 @@ in # We need squashfs in the initrd to mount the compressed Nix store, # and aufs to make the root filesystem appear writable. - boot.extraModulePackages = [config.boot.kernelPackages.aufs]; + boot.extraModulePackages = (pkgs.lib.optional + (! config.boot.kernelPackages.kernel.features ? aufs) + config.boot.kernelPackages.aufs); boot.initrd.extraKernelModules = ["aufs" "squashfs"]; # Tell stage 1 of the boot to mount a tmpfs on top of the CD using diff --git a/release.nix b/release.nix index a8f07216560..91a83de392c 100644 --- a/release.nix +++ b/release.nix @@ -4,7 +4,7 @@ let makeIso = - { module, description }: + { module, description, maintainers ? ["eelco"]}: { nixosSrc ? {outPath = ./.; rev = 1234;} , officialRelease ? false , system ? "i686-linux" @@ -28,7 +28,7 @@ let runCommand "nixos-iso-${version}" { meta = { description = "NixOS installation CD (${description}) - ISO image for ${system}"; - maintainers = [lib.maintainers.eelco]; + maintainers = map (x: lib.getAttr x lib.maintainers) maintainers; }; } '' @@ -87,6 +87,12 @@ let description = "minimal"; }; + iso_minimal_fresh_kernel = makeIso { + module = ./modules/installer/cd-dvd/installation-cd-minimal-fresh-kernel.nix; + description = "minimal with 2.6.31-zen0"; + maintainers = ["raskin"]; + }; + /* iso_rescue = makeIso { module = ./modules/installer/cd-dvd/installation-cd-rescue.nix;