Score:0

Full disk encryption with 'fire and forget' autoinstall in 20.04+?

rs flag

I have a small problem. I'm trying to do a 'fire-and-forget' install of Ubuntu 20.04 with full disk encryption. And I keep getting prompted for the disk password during the process. (I believe this is happening as it's trying to mount the newly encrypted volume.)

The relevant fragment of my autoinstall storage section looks like this: '''

    - id LVM_part
      device: /dev/sda  
      size: -1
      wipe: superblock
      flag: lvm
      number: 3
      preserve: false
      type: partition
    - id: LVM_crypt
      type: dm_crypt
      volume: LVM_part
      preserve: false
      key: 'password'
    - name: hostname-vg
      id: lvm_volgroup-0
      devices: [LVM_crypt]
      preserve: false
      type: lvm_volgroup

'''

Obviously, "password" and "hostname" are placeholders, but I do know them when I'm generating the autoinstall user-data file. (And this form results in the prompt.)

Now if I look at the generated autoinstall-user-data file from a successful manual install, instead of using "key: .....", it uses "keyfile: .....". The problem here is the filepath is of the form "/tmp/[autogenerated tmp dirname]/[autogenerate tmp filename]", which I (for obvious reasons) don't have access to before install starts.

Complicating things, I'm using a static install media, and putting the autoinstall config on an external media. I thought I could place the keyfile on the configuration media, but that (apparently) is accessed just long enough to copy the config file over to the ramfs. Which is why I'm using "key" instead of "keyfile". I believe that Subiquity generates a temporary keyfile during the process, and was hoping to piggy-back off of that behavior, but no such luck.

Oh, and as a final clarification all of these are virtual machines (and media), not physical ones.

Questions? Suggestions? Help, please!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.