Autoinstall with storage layout and swap defined raises error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
subiquity |
New
|
Undecided
|
Unassigned |
Bug Description
I have defined my storage stanzas of the autoinstall.yml file as follows:
storage:
swap:
size: 32GB
layout:
name: lvm
password: password-in-here
I did this as a test, expecting it to either
A) Realise this is an instruction to use the full primary disk, subtracting 32GB for Swap OR
B) Show "this configuration is not permitted"
Instead, when I do this, I get a "this has crashed" whoopsie dialogue, a "sorry we don't know why this has failed" message in the application, and when you look at the log, you get the following message (the full log is attached to the bug):
Running command ['sh', '-c', 'rm -f "$1" && umask 0066 && truncate -s 0 "$1" && { chattr +C "$1" || true; } && fallocate -l "${2}M" "$1" && mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }', 'setup_swap', '/target/
chattr: Operation not supported while setting flags on /target//swap.img
fallocate: fallocate failed: No space left on device
creating swapfile '/swap.img' of 32768MB took 0.096 seconds
failed creating swapfile '/swap.img' of 32768MB
finish: cmd-install/
finish: cmd-install/
Traceback (most recent call last):
File "/snap/
ret = args.func(args)
File "/snap/
File "/snap/
File "/snap/
File "/snap/
File "/snap/
return _subp(*args, **kwargs)
File "/snap/
raise ProcessExecutio
Command: ['sh', '-c', 'rm -f "$1" && umask 0066 && truncate -s 0 "$1" && { chattr +C "$1" || true; } && fallocate -l "${2}M" "$1" && mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }', 'setup_swap', '/target/
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['sh', '-c', 'rm -f "$1" && umask 0066 && truncate -s 0 "$1" && { chattr +C "$1" || true; } && fallocate -l "${2}M" "$1" && mkswap "$1" || { r=$?; rm -f "$1"; exit $r; }', 'setup_swap', '/target/
Exit code: 1
Reason: -
Stdout: ''
Stderr: ''
I should clarify, as I didn't submit this from the VM, this is from a release-day 24.04 Ubuntu Desktop Installer ISO running in Virtualbox on X86-64 hardware with UEFI enabled in both VirtualBox and the host OS.