Storage dm_crypt + preserve Always Fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
In Progress
|
Undecided
|
Dan Bungert |
Bug Description
Running via Subiquity
In this case, I'm trying to install Ubuntu Server onto a luks btrfs root.
Given the autoinstall storage config:
```
config:
- id: sda-disk
type: disk
ptable: gpt
preserve: true
path: /dev/sda
- id: efi-partition
type: partition
size: 1072693248
device: sda-disk
flag: boot
preserve: true
- id: boot-partition
type: partition
size: 1G
device: sda-disk
preserve: true
- id: root-partition
type: partition
size: 134216679424
device: sda-disk
preserve: true
- id: root-crypt
type: dm_crypt
dm_name: crypto_root
volume: root-partition
key: password
preserve: true
- id: root-format
type: format
fstype: btrfs
preserve: true
volume: root-crypt
- id: boot-format
type: format
fstype: btrfs
preserve: true
volume: boot-partition
- id: efi-format
type: format
fstype: fat32
preserve: true
volume: efi-partition
- id: boot-mount
type: mount
path: /boot
device: boot-format
- id: efi-mount
type: mount
path: /boot/efi
device: efi-format
- id: root-mount
type: mount
path: /
device: root-format
```
Curtin fails with the following error:
```
Verifying /dev/mapper/
Running command ['dmsetup', 'info', '/dev/mapper/
Verifying /dev/mapper/
An error occured handling 'root-crypt': RuntimeError - Verifying /dev/mapper/
finish: cmd-install/
TIMED BLOCK_META: 1.230
finish: cmd-install/
Traceback (most recent call last):
File "/snap/
ret = args.func(args)
File "/snap/
return log_time("TIMED %s: " % msg, func, *args, **kwargs)
File "/snap/
return func(*args, **kwargs)
File "/snap/
return meta_custom(args)
File "/snap/
handler(
File "/snap/
dm_
File "/snap/
verify_
File "/snap/
raise RuntimeError(msg)
RuntimeError: Verifying /dev/mapper/
Verifying /dev/mapper/
```
Note that the command in the logs returns:
```
# dmsetup info /dev/mapper/
crypto_
```
I'm not sure when this code would succeed given the code: https:/
Which makes me think this is likely a bug.
Changed in curtin: | |
status: | New → Confirmed |
I've got a branch in progress that I think will resolve this.
Mark, are you interested in helping to test? I will strongly recommend backing up your data first though.