mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-21 20:58:41 +03:00
* 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;
|
||||
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 New Issue
Block a user