* Allow the root device to be specified by label.

svn path=/nixos/trunk/; revision=7612
This commit is contained in:
Eelco Dolstra 2007-01-10 14:07:10 +00:00
parent 7ba1682c05
commit 774a0a397c

View File

@ -71,9 +71,11 @@ rec {
inherit extraUtils;
autoDetectRootDevice = config.get ["boot" "autoDetectRootDevice"];
rootDevice =
(pkgs.library.findSingle (fs: fs.mountPoint == "/")
(abort "No root mount point declared.")
(config.get ["fileSystems"])).device;
let rootFS =
(pkgs.library.findSingle (fs: fs.mountPoint == "/")
(abort "No root mount point declared.")
(config.get ["fileSystems"]));
in if rootFS ? device then rootFS.device else "LABEL=" + rootFS.label;
rootLabel = config.get ["boot" "rootLabel"];
inherit stage2Init;
modulesDir = modulesClosure;