* Allow the root device to be specified by label.
svn path=/nixos/trunk/; revision=7612
This commit is contained in:
parent
7ba1682c05
commit
774a0a397c
1 changed files with 5 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue