summary refs log tree commit diff
path: root/nixos/modules/system/boot/grow-partition.nix
diff options
context:
space:
mode:
authorIhor Antonov <ngortheone@gmail.com>2018-05-09 10:15:16 -0400
committerTuomas Tynkkynen <tuomas.tynkkynen@iki.fi>2018-05-12 02:55:33 +0300
commit08ebd830a559692f9b34a1619cca44b1888468a0 (patch)
tree8630368f698780704a48f434a158c81827202220 /nixos/modules/system/boot/grow-partition.nix
parente4777ae2d84c5f38740b744fe85e305f1a2f0209 (diff)
downloadnixlib-08ebd830a559692f9b34a1619cca44b1888468a0.tar
nixlib-08ebd830a559692f9b34a1619cca44b1888468a0.tar.gz
nixlib-08ebd830a559692f9b34a1619cca44b1888468a0.tar.bz2
nixlib-08ebd830a559692f9b34a1619cca44b1888468a0.tar.lz
nixlib-08ebd830a559692f9b34a1619cca44b1888468a0.tar.xz
nixlib-08ebd830a559692f9b34a1619cca44b1888468a0.tar.zst
nixlib-08ebd830a559692f9b34a1619cca44b1888468a0.zip
Fix kernel crash caused by absent root device
Diffstat (limited to 'nixos/modules/system/boot/grow-partition.nix')
-rw-r--r--nixos/modules/system/boot/grow-partition.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/system/boot/grow-partition.nix b/nixos/modules/system/boot/grow-partition.nix
index 1e6f9e442b67..8c9b1502558a 100644
--- a/nixos/modules/system/boot/grow-partition.nix
+++ b/nixos/modules/system/boot/grow-partition.nix
@@ -30,7 +30,7 @@ with lib;
 
     boot.initrd.postDeviceCommands = ''
       rootDevice="${config.fileSystems."/".device}"
-      if [ -e "$rootDevice" ]; then
+      if waitDevice "$rootDevice"; then
         rootDevice="$(readlink -f "$rootDevice")"
         parentDevice="$rootDevice"
         while [ "''${parentDevice%[0-9]}" != "''${parentDevice}" ]; do