diff options
author | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2012-03-13 13:26:21 +0000 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@vicerveza.homeunix.net> | 2012-03-13 13:26:21 +0000 |
commit | dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b (patch) | |
tree | dce791159f76d1571c3163dcde4c0e3264e371bc /modules/system/boot/stage-1.nix | |
parent | b6d43e1acad12a573d08d9c35ecc51ff327f415b (diff) | |
download | nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.tar nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.tar.gz nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.tar.bz2 nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.tar.lz nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.tar.xz nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.tar.zst nixpkgs-dd6eb81797c987c5438a04dac7ce0c5b5dea3b7b.zip |
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
Diffstat (limited to 'modules/system/boot/stage-1.nix')
-rw-r--r-- | modules/system/boot/stage-1.nix | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index 1932599193e..9ad86312290 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -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"; |