In the mirror screen, if the test fails and the user decides to ignore
the failure, we used to continue the installation normally ; which in
most scenarios resulted in an error at a later stage of the
installation.
Instead, we now revert to an installation without network (i.e., only
packages from the pool are considered for installation) if the user
decides to ignore the failure.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
When the request to v2/systems/enhanced-secureboot-desktop (or
equivalent) fails, Subiquity did not capture the reason. This makes
it difficult to understand why this call sometimes fails. We now log the
response text to understand better what's going on.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Grub provides "quiet splash" for GRUB_CMDLINE_LINUX_DEFAULT out of the
box, but curtin rewrites that value and drops both "quiet" and "splash".
On desktop, retain "quiet splash".
This should be configurable via autoinstall if this change is undesired.
Automated installations and desktop installations will now switch to an
offline installation by default. In this mode, only packages from the
pool will be fetched.
This should allow the installation to proceed when installing from a
private network without external access to the internet.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
On first boot, there appear to be cases where the cc_dpkg_grub module in
cloud-init is not doing the right thing, which are to be sorted out.
But for first boot to happen we have a working boot config, so let's not
perturb that.
LP: #2060695
Partial implementation of LP: #2057837. To create a specific dataset
for /home/$user, this requires moving where and when users are created,
which is not in plan for 24.04.
The /mirror GET and POST endpoints now include a boolean field named
"use_during_installation".
* if set to True, the mirror information will be used during
installation to fetch packages online.
* if set to False, we will only fetch packages from the pool.
In either case, the mirror information will still be used to build the
etc/apt/ directory in the target system.
Currently, the way use_during_installation is implemented is coupled
with the force_offline property of the network model. This means that
Ubuntu Pro and other stuff will be disabled too if we're skipping the
use of the archive.
NOTE: the default value for "use_during_installation" in the POST
endpoint is `null` ; which means that we should not change the current
value of force_offline.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Check for any changed .rst files in the doc/ directory and run
`make spelling` if any changes are detected.
The files directives per hook have to be more restrictive than the
global hook, so this also slightly changes the files match for
the other hooks.
In cda6c54b87, we introduced the accurate
size vs human readable size for the size form fields. Unfortunately, we
also introduced a regression when the size gets capped (when it exceeds
the maximum size defined on the form). Currently, specifying a size that
is beyond the maximum value fails when submitting the form with:
[...]
File "urwid/wimp.py", line 543, in keypress
self._emit('click')
File "urwid/widget.py", line 461, in _emit
signals.emit_signal(self, name, self, *args)
File "urwid/signals.py", line 265, in emit
result |= self._call_callback(callback, user_arg, user_args, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "urwid/signals.py", line 295, in _call_callback
return bool(callback(*args_to_pass))
^^^^^^^^^^^^^^^^^^^^^^^
File "subiquitycore/ui/form.py", line 486, in _click_done
emit_signal(self, "submit", self)
File "urwid/signals.py", line 265, in emit
result |= self._call_callback(callback, user_arg, user_args, args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "urwid/signals.py", line 295, in _call_callback
return bool(callback(*args_to_pass))
^^^^^^^^^^^^^^^^^^^^^^^
File "subiquity/ui/views/filesystem/partition.py", line 636, in done
handler(self.disk, spec, partition=self.partition, gap=self.gap)
File "subiquity/common/filesystem/manipulator.py", line 334, in logical_volume_handler
lv.size = align_up(spec["size"])
^^^^^^^^^^^^^^^^^^^^^^
File "subiquity/models/filesystem.py", line 1382, in align_up
return (size + block_size - 1) & ~(block_size - 1)
~~~~~^~~~~~~~~~~~
TypeError: unsupported operand type(s) for +: 'BoundFormField' and 'int'
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Also deletes a note to users about not needing the autoinstall keyword
in non cloud-config delivery methods. We should keep a hint in the reference
that this is available, but generally let's always suggest to use the
top-level autoinstall keyword.
Users attempting to do autoinstall may incorrectly send autoinstall
directives as cloud-config, which will result in cloud-init
schema validation errors. When loading autoinstall from cloud-config,
we now check to see if there are any cloud-init schema validation errors
and warn the user. Additionally, if the source of the error is from
a known autoinstall error, we inform the user and halt the installation
with a nonreportable AutoinstallError.
When a partition is mounted in the live environment (either by casper or
another process) and is selected for resize, curtin will fail when
running e2fsck (or equivalent) with an error such as:
Resize requested for format ext4
Resizing /dev/sdb4 of type ext4 down to 12546211840
Running command ['e2fsck', '-p', '-f', '/dev/sdb4'] with allowed return codes [0] (capture=False)
/dev/sdb4 is mounted.
e2fsck: Cannot continue, aborting.
An error occured handling 'disk-sdb': ProcessExecutionError - Unexpected error while running command.
Command: ['e2fsck', '-p', '-f', '/dev/sdb4']
Exit code: 8
This is what happens when casper creates a partition on the installer
media to store /var/log and /var/crash. Usually the partition is large
enough to install Ubuntu so a GuidedStorageTargetResize scenario gets
emitted.
This patch prevents the emission of a GuidedStorageTargetResize scenario
if the partition is marked as mounted already.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
To workaround a grub2 bug (LP: #2055294) causing 24.04 installations to
fail, we added a default debconf-selection in Subiquity.
grub2 2.12-1ubuntu4 fixes the issue and migrated to the noble release
pocket on 2024-03-06.
We can now drop the workaround.
https://launchpad.net/ubuntu/+source/grub2/2.12-1ubuntu4
This reverts commit cffce32305.