* Obsoleted boot.initrd.extraKernelModules (use

boot.initrd.kernelModules instead).

svn path=/nixos/trunk/; revision=18969
This commit is contained in:
Eelco Dolstra 2009-12-15 14:05:01 +00:00
parent b628ca221d
commit a612fd0d5e
15 changed files with 43 additions and 54 deletions

View File

@ -14,9 +14,7 @@
{ {
boot = { boot = {
grubDevice = "/dev/sda"; grubDevice = "/dev/sda";
initrd = { initrd.kernelModules = ["ata_piix"];
extraKernelModules = ["ata_piix"];
};
copyKernels = true; copyKernels = true;
bootMount = "(hd0,0)"; bootMount = "(hd0,0)";
}; };

View File

@ -4,7 +4,7 @@
boot = { boot = {
grubDevice = "/dev/sda"; grubDevice = "/dev/sda";
initrd = { initrd = {
extraKernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd"]; kernelModules = ["usb_storage" "ehci_hcd" "ohci_hcd"];
enableSplashScreen = false; enableSplashScreen = false;
}; };
}; };

View File

@ -177,10 +177,10 @@ $ nixos-hardware-scan > /mnt/etc/nixos/configuration.nix</screen>
xlink:href="https://svn.nixos.org/repos/nix/configurations/trunk/"/>.</para> xlink:href="https://svn.nixos.org/repos/nix/configurations/trunk/"/>.</para>
<note><para>It is very important that you specify in the option <note><para>It is very important that you specify in the option
<option>boot.initrd.extraKernelModules</option> all kernel modules <option>boot.initrd.kernelModules</option> all kernel modules that
that are necessary for mounting the root file system, otherwise are necessary for mounting the root file system, otherwise the
the installed system will not be able to boot. (If this happens, installed system will not be able to boot. (If this happens, boot
boot from CD again, mount the target file system on from CD again, mount the target file system on
<filename>/mnt</filename>, fix <filename>/mnt</filename>, fix
<filename>/mnt/etc/nixos/configuration.nix</filename> and rerun <filename>/mnt/etc/nixos/configuration.nix</filename> and rerun
<filename>nixos-install</filename>.) <filename>nixos-install</filename>.)
@ -279,12 +279,8 @@ $ reboot</screen>
<example xml:id='ex-config'><title>NixOS configuration</title> <example xml:id='ex-config'><title>NixOS configuration</title>
<screen> <screen>
{ {
boot = { boot.initrd.kernelModules = [ "ata_piix" ];
initrd = { boot.grubDevice = "/dev/sda";
extraKernelModules = [ "ata_piix" ];
};
grubDevice = "/dev/sda";
};
fileSystems = [ fileSystems = [
{ mountPoint = "/"; { mountPoint = "/";
@ -296,11 +292,7 @@ $ reboot</screen>
{ label = "swap"; } { label = "swap"; }
]; ];
services = { services.sshd.enable = true;
sshd = {
enable = true;
};
};
}</screen> }</screen>
</example> </example>

View File

@ -13,9 +13,17 @@
</personname> </personname>
</author> </author>
<author>
<personname>
<firstname>Nicolas</firstname>
<surname>Pierron</surname>
</personname>
</author>
<copyright> <copyright>
<year>2007</year> <year>2007</year>
<year>2008</year> <year>2008</year>
<year>2009</year>
<holder>Eelco Dolstra</holder> <holder>Eelco Dolstra</holder>
</copyright> </copyright>

View File

@ -33,8 +33,7 @@ no services have been started.</para>
<literal>safemode</literal> to the kernel command line. This will <literal>safemode</literal> to the kernel command line. This will
disable auto-loading of modules for your PCI devices. However, you disable auto-loading of modules for your PCI devices. However, you
will probably need to explicitly add modules to will probably need to explicitly add modules to
<option>boot.extraKernelModules</option> to get network support <option>boot.kernelModules</option> to get network support etc.</para>
etc.</para>
</section> </section>

View File

@ -114,7 +114,7 @@ in
# The initrd has to contain any module that might be necessary for # The initrd has to contain any module that might be necessary for
# mounting the CD/DVD. # mounting the CD/DVD.
boot.initrd.extraKernelModules = boot.initrd.kernelModules =
[ # SATA/PATA support. [ # SATA/PATA support.
"ahci" "ahci"
@ -158,6 +158,9 @@ in
# Add vfat to enable people to copy the contents of the CD to a # Add vfat to enable people to copy the contents of the CD to a
# bootable USB stick. # bootable USB stick.
"vfat" "vfat"
# And of course we need to be able to mount the CD.
"iso9660" "loop" "squashfs"
]; ];
# nixos-install will do a pull from this channel to speed up the # nixos-install will do a pull from this channel to speed up the

View File

@ -31,7 +31,7 @@ rec {
ln -s /bin "$out/var/run/current-system/sw/sbin" ln -s /bin "$out/var/run/current-system/sw/sbin"
''; '';
boot.initrd.extraKernelModules = [ boot.initrd.kernelModules = [
"iso9660" "loop" "squashfs" "iso9660" "loop" "squashfs"
]; ];
boot.initrd.allowMissing = true; boot.initrd.allowMissing = true;

View File

@ -19,7 +19,7 @@ in
}; };
boot.initrd.extraKernelModules = boot.initrd.kernelModules =
["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"]; ["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"];
environment.systemPackages = [ pkgs.vim_configurable ]; environment.systemPackages = [ pkgs.vim_configurable ];

View File

@ -34,7 +34,7 @@
]; ];
boot.kernelPackages = pkgs.kernelPackages_2_6_31_rc4_old_i686; boot.kernelPackages = pkgs.kernelPackages_2_6_31_rc4_old_i686;
boot.initrd.extraKernelModules = ["evdev" "i8042" "pcips2" "serio" boot.initrd.kernelModules = ["evdev" "i8042" "pcips2" "serio"
"sd_mod" "libata" "unix" "usbhid" "uhci_hcd" "atkbd" "xtkbd" "fbdev" "sd_mod" "libata" "unix" "usbhid" "uhci_hcd" "atkbd" "xtkbd" "fbdev"
"iso9660" "udf" "loop"]; "iso9660" "udf" "loop"];
boot.kernelModules = ["fbcon" "radeonfb" "intelfb" "sisfb" "nvidiafb" boot.kernelModules = ["fbcon" "radeonfb" "intelfb" "sisfb" "nvidiafb"

View File

@ -123,10 +123,12 @@ in
# We need squashfs in the initrd to mount the compressed Nix store, # We need squashfs in the initrd to mount the compressed Nix store,
# and aufs to make the root filesystem appear writable. # and aufs to make the root filesystem appear writable.
boot.extraModulePackages = (optional boot.extraModulePackages =
(! config.boot.kernelPackages.kernel.features ? aufs) optional
config.boot.kernelPackages.aufs); (! config.boot.kernelPackages.kernel.features ? aufs)
boot.initrd.extraKernelModules = ["aufs" "squashfs"]; config.boot.kernelPackages.aufs;
boot.initrd.kernelModules = ["aufs" "squashfs"];
# Tell stage 1 of the boot to mount a tmpfs on top of the CD using # Tell stage 1 of the boot to mount a tmpfs on top of the CD using
# AUFS. !!! It would be nicer to make the stage 1 init pluggable # AUFS. !!! It would be nicer to make the stage 1 init pluggable

View File

@ -216,7 +216,7 @@ print <<EOF ;
# This is a generated file. Do not modify! # This is a generated file. Do not modify!
# Make changes to /etc/nixos/configuration.nix instead. # Make changes to /etc/nixos/configuration.nix instead.
{ {
boot.initrd.extraKernelModules = [ $initrdKernelModules ]; boot.initrd.kernelModules = [ $initrdKernelModules ];
boot.kernelModules = [ $kernelModules ]; boot.kernelModules = [ $kernelModules ];
nix.maxJobs = $cpus; nix.maxJobs = $cpus;

View File

@ -71,6 +71,8 @@ in zipModules ([]
++ rename obsolete "boot.bootMount" to "boot.loader.grub.bootDevice" ++ rename obsolete "boot.bootMount" to "boot.loader.grub.bootDevice"
++ rename obsolete "boot.grubSplashImage" to "boot.loader.grub.splashImage" ++ rename obsolete "boot.grubSplashImage" to "boot.loader.grub.splashImage"
++ rename obsolete "boot.initrd.extraKernelModules" to "boot.initrd.kernelModules"
# X11 # X11
++ rename obsolete "services.xserver.startSSHAgent" to "services.xserver.startOpenSSHAgent" ++ rename obsolete "services.xserver.startSSHAgent" to "services.xserver.startOpenSSHAgent"

View File

@ -61,13 +61,12 @@ let
kernelModules = mkOption { kernelModules = mkOption {
default = []; default = [];
description = " description = ''
The set of kernel modules to be loaded in the second stage of The set of kernel modules to be loaded in the second stage of
the boot process. That is, these modules are not included in the boot process. Note that modules that are needed to
the initial ramdisk, so they'd better not be required for mount the root file system should be added to
mounting the root file system. Add them to <option>boot.initrd.kernelModules</option>.
<option>boot.initrd.extraKernelModules</option> if they are. '';
";
}; };
initrd = { initrd = {
@ -122,19 +121,7 @@ let
system (e.g., ext3). The set specified here is automatically system (e.g., ext3). The set specified here is automatically
closed under the module dependency relation, i.e., all closed under the module dependency relation, i.e., all
dependencies of the modules list here are included dependencies of the modules list here are included
automatically. If you want to add additional automatically.
modules, it's best to set
<option>boot.initrd.extraKernelModules</option>.
";
};
extraKernelModules = mkOption {
default = [];
description = "
Additional kernel modules for the initial ramdisk. These are
loaded before the modules listed in
<option>boot.initrd.kernelModules</option>, so they take
precedence.
"; ";
}; };

View File

@ -110,9 +110,7 @@ let
# Determine the set of modules that we need to mount the root FS. # Determine the set of modules that we need to mount the root FS.
modulesClosure = pkgs.makeModulesClosure { modulesClosure = pkgs.makeModulesClosure {
rootModules = rootModules = config.boot.initrd.kernelModules;
config.boot.initrd.extraKernelModules ++
config.boot.initrd.kernelModules;
kernel = modulesTree; kernel = modulesTree;
allowMissing = config.boot.initrd.allowMissing; allowMissing = config.boot.initrd.allowMissing;
}; };

View File

@ -7,7 +7,7 @@
# the VM in the host. On the other hand, the root filesystem is a # the VM in the host. On the other hand, the root filesystem is a
# read/writable disk image persistent across VM reboots. # read/writable disk image persistent across VM reboots.
{config, pkgs, ...}: { config, pkgs, ... }:
with pkgs.lib; with pkgs.lib;
@ -71,7 +71,7 @@ in
# All the modules the initrd needs to mount the host filesystem via # All the modules the initrd needs to mount the host filesystem via
# CIFS. Also use paravirtualised network and block devices for # CIFS. Also use paravirtualised network and block devices for
# performance. # performance.
boot.initrd.extraKernelModules = boot.initrd.kernelModules =
["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"]; ["cifs" "virtio_net" "virtio_pci" "virtio_blk" "virtio_balloon" "nls_utf8"];
boot.initrd.extraUtilsCommands = boot.initrd.extraUtilsCommands =