diff options
Diffstat (limited to 'nixos/modules/system/boot/stage-1.nix')
-rw-r--r-- | nixos/modules/system/boot/stage-1.nix | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/nixos/modules/system/boot/stage-1.nix b/nixos/modules/system/boot/stage-1.nix index 6977880fa284..1ec11e70e845 100644 --- a/nixos/modules/system/boot/stage-1.nix +++ b/nixos/modules/system/boot/stage-1.nix @@ -181,6 +181,9 @@ let inherit (config.boot.initrd) checkJournalingFS preLVMCommands postDeviceCommands postMountCommands kernelModules; + resumeDevices = map (sd: if sd ? device then sd.device else "/dev/disk/by-label/${sd.label}") + (filter (sd: sd ? label || hasPrefix "/dev/" sd.device) config.swapDevices); + fsInfo = let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ]; in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems)); @@ -220,13 +223,14 @@ in options = { boot.resumeDevice = mkOption { - type = types.nullOr types.str; - default = null; - example = "8:2"; + type = types.str; + default = ""; + example = "/dev/sda3"; description = '' - Device for manual resume attempt during boot, specified using - the device's major and minor number as - <literal><replaceable>major</replaceable>:<replaceable>minor</replaceable></literal>. + Device for manual resume attempt during boot. This should be used primarily + if you want to resume from file. Specify here the device where the file + resides. You should also use <varname>boot.kernelParams</varname> to specify + <literal><replaceable>resume_offset</replaceable></literal>. ''; }; |