[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Preseeding the crypto password



Hi,

Sean M <seanmottles@gmail.com> (2016-09-21):
> Hi all,
> 
> I have a script that does the following:
> 
> -------------------------------------------------------------------------------
> #!/bin/sh
> 
> set -e
> 
> . /usr/share/debconf/confmodule
> 
> PASS="xxxxx"
> 
> db_set partman-crypto/passphrase $PASS
> db_set partman-crypto/passphrase-again $PASS
> db_go
> -------------------------------------------------------------------------------
> 
> It is called here in the preseed:
> 
> d-i partman/early_command
> 
> I would do it in d-i preseed/early_command, but partman-crypto/passphrase
> doesn't seem to be available that early?

Why go through a script when you can just set the parameters through tha
command line, or through a preseed file (since version 77 in Debian)?

> Unfortunately, after it runs this script (successfully) I still get
> prompted to enter the encryption password. How would I get this question to
> stick? Here's the relevant portion of the logs:
> 
> Sep 20 23:01:33 log-output: + PASS=xxxxxxxxx
> Sep 20 23:01:33 log-output: + db_set partman-crypto/passphrase xxxxxxxxx
> Sep 20 23:01:33 log-output: + _db_cmd SET partman-crypto/passphrase xxxxxxxxx
> Sep 20 23:01:33 log-output: + IFS=  printf %s\n SET
> partman-crypto/passphrase xxxxxxxxx
> Sep 20 23:01:33 log-output: + IFS=
> Sep 20 23:01:33 log-output:  read -r _db_internal_line
> Sep 20 23:01:33 log-output: + RET=value set
> Sep 20 23:01:33 log-output: + return 0
> Sep 20 23:01:33 log-output: + db_set partman-crypto/passphrase-again xxxxxxxxx
> Sep 20 23:01:33 log-output: + _db_cmd SET
> partman-crypto/passphrase-again xxxxxxxxx
> Sep 20 23:01:33 log-output: + IFS=  printf %s\n SET
> partman-crypto/passphrase-again xxxxxxxxx
> 
> Sep 20 23:01:33 log-output: + IFS=
> Sep 20 23:01:33 log-output:  read -r _db_internal_line
> Sep 20 23:01:33 log-output: + RET=value set
> Sep 20 23:01:33 log-output: + return 0
> Sep 20 23:01:33 log-output: + db_go
> Sep 20 23:01:33 log-output: + _db_cmd GO
> Sep 20 23:01:33 log-output: + IFS=  printf %s\n GO
> Sep 20 23:01:33 log-output: + IFS=
> Sep 20 23:01:33 log-output:  read -r _db_internal_line
> Sep 20 23:01:33 log-output: + RET=ok
> Sep 20 23:01:33 log-output: + return 0
> Sep 20 23:01:33 kernel: [   48.500059] Btrfs loaded
> Sep 20 23:01:33 kernel: [   48.515474] JFS: nTxBlock = 8192, nTxLock = 65536
> Sep 20 23:01:33 kernel: [   48.528375] SGI XFS with ACLs, security
> attributes, realtime, no debug enabled
> Sep 20 23:01:33 md-devices: mdadm: No arrays found in config file or
> automatically
> Sep 20 23:01:33 partman:   No matching physical volumes found
> Sep 20 23:01:33 partman:   Reading all physical volumes.  This may
> take a while...
> Sep 20 23:01:35 anna-install: Installing cdebconf-newt-entropy
> Sep 20 23:01:35 anna[11775]: DEBUG: resolver (libnewt0.52): package
> doesn't exist (ignored)
> Sep 20 23:01:35 anna[11775]: DEBUG: retrieving cdebconf-newt-entropy 0.33
> Sep 20 23:01:35 anna[11775]: 2016-09-20 23:01:35
> URL:http://mirrors.kernel.org/ubuntu/pool/main/c/cdebconf-entropy/cdebconf-newt-entropy_0.33_amd64.udeb
> [18752/18752] ->
> "/var/cache/anna/cdebconf-newt-entropy_0.33_amd64.udeb" [1]
> Sep 20 23:01:35 anna[11775]: DEBUG: retrieving
> libdebian-installer4-udeb 0.102ubuntu1.1
> Sep 20 23:01:35 anna[11775]: 2016-09-20 23:01:35
> URL:http://mirrors.kernel.org/ubuntu/pool/main/libd/libdebian-installer/libdebian-installer4-udeb_0.102ubuntu1.1_amd64.udeb
> [18734/18734] ->
> "/var/cache/anna/libdebian-installer4-udeb_0.102ubuntu1.1_amd64.udeb"
> [1]
> Sep 20 23:01:35 anna[11775]: DEBUG: retrieving libslang2-udeb 2.3.0-2ubuntu1
> Sep 20 23:01:35 anna[11775]: 2016-09-20 23:01:35
> URL:http://mirrors.kernel.org/ubuntu/pool/main/s/slang2/libslang2-udeb_2.3.0-2ubuntu1_amd64.udeb
> [255104/255104] ->
> "/var/cache/anna/libslang2-udeb_2.3.0-2ubuntu1_amd64.udeb" [1]
> Sep 20 23:01:35 anna-install: Installing partman-crypto-dm
> Sep 20 23:01:35 partman: mke2fs 1.42.13 (17-May-2015)
> Sep 20 23:01:35 partman-crypto: kernel entropy_avail: 126 bits

If you're installing Ubuntu, you should be asking on Ubuntu support
channels.


KiBi.

Attachment: signature.asc
Description: Digital signature


Reply to: