* Allow the root device to be specified by label.
svn path=/nixos/trunk/; revision=7612
This commit is contained in:
parent
7ba1682c05
commit
774a0a397c
@ -71,9 +71,11 @@ rec {
|
|||||||
inherit extraUtils;
|
inherit extraUtils;
|
||||||
autoDetectRootDevice = config.get ["boot" "autoDetectRootDevice"];
|
autoDetectRootDevice = config.get ["boot" "autoDetectRootDevice"];
|
||||||
rootDevice =
|
rootDevice =
|
||||||
(pkgs.library.findSingle (fs: fs.mountPoint == "/")
|
let rootFS =
|
||||||
(abort "No root mount point declared.")
|
(pkgs.library.findSingle (fs: fs.mountPoint == "/")
|
||||||
(config.get ["fileSystems"])).device;
|
(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"];
|
rootLabel = config.get ["boot" "rootLabel"];
|
||||||
inherit stage2Init;
|
inherit stage2Init;
|
||||||
modulesDir = modulesClosure;
|
modulesDir = modulesClosure;
|
||||||
|
Loading…
Reference in New Issue
Block a user