Adding /etc/mdadm.conf, with the contents supplied at boot.initrd.mdadmConf.

This allows setting a fixed device name per array, thus ensuring that at boot,
the arrays will always be mounted with the same names. I think this allows
solving the problem of grub getting confused about softraid device names
(prefix and root), if the devices always get the same naming at initrd.


svn path=/nixos/trunk/; revision=33033
This commit is contained in:
Lluís Batlle i Rossell 2012-03-13 13:26:21 +00:00
parent b6d43e1aca
commit dd6eb81797

View file

@ -35,6 +35,14 @@ let
'';
};
boot.initrd.mdadmConf = mkOption {
default = "";
type = with types; string;
description = ''
Contents of /etc/mdadm.conf at initrd.
'';
};
boot.initrd.preLVMCommands = mkOption {
default = "";
type = with types; string;
@ -313,6 +321,9 @@ let
[ { object = bootStage1;
symlink = "/init";
}
{ object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
symlink = "/etc/mdadm.conf";
}
] ++ optionals enableSplashScreen
[ { object = extraUtils;
suffix = "/bin/splash_helper";