Monday, April 29, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 3307  / 3 Years ago, sun, july 11, 2021, 11:54:12

Since I'll have to deal with Ubuntu clients mass deployments in the future, I was searching for methods to achieve an unattended setup. My current idea is to use something like kickstart or https://ubuntu.com/server/docs/install/autoinstall and to use ansible after the initial deployment.


One key requirement would be to encrypt the root partition during the setup.


Since autoinstallation seems to be the new standard for 20.04 and I didn't find anything concerning LUKS in the reference, I wanted to ask if someone knows whether LUKS can be used with autoinstallation?


If not: would kickstart be the way to go?


More From » 20.04

 Answers
6

Creating an answer - thanks @Kulfy for your remark.


Solved by going through the interactive installer. After that, the yaml was available under /var/log/installer:


As far as the storage section is concerned, the file contained the following lines:


storage:
config:
- {ptable: gpt, serial: LITEONIT_LCS-128M6S_2.5_7mm_128GB_TW032GYJ550854163694,
path: /dev/sdb, wipe: superblock, preserve: false, name: '', grub_device: false,
type: disk, id: disk-sdb}
- {device: disk-sdb, size: 536870912, wipe: superblock, flag: boot, number: 1,
preserve: false, grub_device: true, type: partition, id: partition-0}
- {fstype: fat32, volume: partition-0, preserve: false, type: format, id: format-0}
- {device: disk-sdb, size: 1073741824, wipe: superblock, flag: '', number: 2,
preserve: false, type: partition, id: partition-1}
- {fstype: ext4, volume: partition-1, preserve: false, type: format, id: format-1}
- {device: disk-sdb, size: 126422614016, wipe: superblock, flag: '', number: 3,
preserve: false, type: partition, id: partition-2}
- {volume: partition-2, key: 'safekey', preserve: false, type: dm_crypt, id: dm_crypt-0}
- name: ubuntu-vg
devices: [dm_crypt-0]
preserve: false
type: lvm_volgroup
id: lvm_volgroup-0
- {name: ubuntu-lv, volgroup: lvm_volgroup-0, size: 4294967296B, preserve: false,
type: lvm_partition, id: lvm_partition-0}
- {fstype: ext4, volume: lvm_partition-0, preserve: false, type: format, id: format-2}
- {device: format-2, path: /, type: mount, id: mount-2}
- {device: format-1, path: /boot, type: mount, id: mount-1}
- {device: format-0, path: /boot/efi, type: mount, id: mount-0}

I've also successfully used the generated lines in an unattended setup.


[#3083] Monday, July 12, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
utschang

Total Points: 357
Total Questions: 120
Total Answers: 119

Location: Croatia
Member since Sat, May 2, 2020
4 Years ago
utschang questions
Mon, Aug 30, 21, 14:09, 3 Years ago
Tue, May 17, 22, 20:44, 2 Years ago
Tue, Sep 7, 21, 04:23, 3 Years ago
;