Skip to content

Commit

Permalink
Fix postboot command for ZFS installation.
Browse files Browse the repository at this point in the history
This fix resolves SSRCSP-5296.

Signed-off-by: Ivan Nikolaenko <[email protected]>
  • Loading branch information
unbel13ver authored and brianmcgillion committed Oct 1, 2024
1 parent 7aa87a1 commit 110a2ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/disko/disko-zfs-postboot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
# Extract the partition number using regex
if [[ "$P_DEVPATH" =~ [0-9]+$ ]]; then
PARTNUM=$(echo "$P_DEVPATH" | ${pkgs.gnugrep}/bin/grep -o '[0-9]*$')
PARENT_DISK=$(echo "$P_DEVPATH" | ${pkgs.gnused}/bin/sed 's/[0-9]*$//')
PARENT_DISK=/dev/$(${pkgs.util-linux}/bin/lsblk -no pkname "$P_DEVPATH")
else
echo "No partition number found in device path: $P_DEVPATH"
fi
Expand All @@ -34,5 +34,8 @@ let
'';
in
{
# To debug postBootCommands, one may run
# journalctl -u initrd-nixos-activation.service
# inside the running Ghaf host.
boot.postBootCommands = postBootCmds;
}

0 comments on commit 110a2ad

Please sign in to comment.