diff options
author | Ihor Antonov <ngortheone@gmail.com> | 2018-05-09 10:15:16 -0400 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi> | 2018-05-12 02:55:33 +0300 |
commit | 08ebd830a559692f9b34a1619cca44b1888468a0 (patch) | |
tree | 8630368f698780704a48f434a158c81827202220 /nixos/modules/system/boot/grow-partition.nix | |
parent | e4777ae2d84c5f38740b744fe85e305f1a2f0209 (diff) | |
download | nixlib-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.nix | 2 |
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 |