Remote disk unlocking: Difference between revisions

34j (talk | contribs)
Revise the summary
34j (talk | contribs)
Setup: Support ZFS in postCommands
Line 26: Line 26:
     };
     };
     postCommands = ''
     postCommands = ''
       # Automatically ask for the password on SSH login
       # unlock LUKS encrypted partitions
       echo 'cryptsetup-askpass || echo "Unlock was successful; exiting SSH session" && exit 1'</nowiki> >> <nowiki>/root/.profile
       echo 'cryptsetup-askpass' >> /root/.profile
      # unlock ZFS encrypted partitions (NOTE: boot.initrd.supportedFilesystems.zfs must be true for zfs, zpool to be available here)
      # zpool import -a;
      # echo 'zfs load-key -a' >> /root/.profile
      # exit SSH
      echo 'exit' >> /root/.profile
     '';
     '';
   };
   };