Skip the second entry of the password by writing a key file
This commit is contained in:
parent
56bd4083bf
commit
39345d9b99
@ -381,9 +381,17 @@ def main():
|
|||||||
fh.write('GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX cryptdevice=UUID=' +cryptPartitionUUID+ ' root=UUID=' +installPartitionUUID+ '"\n')
|
fh.write('GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX cryptdevice=UUID=' +cryptPartitionUUID+ ' root=UUID=' +installPartitionUUID+ '"\n')
|
||||||
fh.close()
|
fh.close()
|
||||||
|
|
||||||
|
print("Writing luks auto-key ...")
|
||||||
|
key = callString(["xxd","-l","64","-c","0","-ps","/dev/random"])
|
||||||
|
fh = open(ipth(".luks-key"),"w")
|
||||||
|
fh.write(key)
|
||||||
|
fh.close()
|
||||||
|
os.chmod(ipth(".luks-key"),600)
|
||||||
|
call(["cryptosetup","luksAddKey",cryptPartition,ipth(".luks-key")])
|
||||||
|
|
||||||
print("Writing crypttab ...")
|
print("Writing crypttab ...")
|
||||||
fh = open(ipth("etc/crypttab"),"w")
|
fh = open(ipth("etc/crypttab"),"w")
|
||||||
fh.write('system UUID=' +cryptPartitionUUID+ ' none luks\n')
|
fh.write('system UUID=' +cryptPartitionUUID+ ' /.luks-key luks\n')
|
||||||
fh.close()
|
fh.close()
|
||||||
|
|
||||||
print("Writing fstab ...")
|
print("Writing fstab ...")
|
||||||
|
Loading…
Reference in New Issue
Block a user