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 000000000000..73e83fa26455 --- /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 bd4d39ccdf82..2a0ac4f0e289 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 a8f072165600..91a83de392c2 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;