[Bug 1991813] Re: Subiquity crashes when using local apt mirror created with aptly
Bruno Travouillon
1991813 at bugs.launchpad.net
Sat Jun 24 21:39:14 UTC 2023
Looking further, the documentation at
https://ubuntu.com/server/docs/install/autoinstall-reference#apt is not
explicit. One must follow the link to
https://curtin.readthedocs.io/en/latest/topics/apt_source.html where the
configuration of a PGP key is documented.
It is then possible to install 22.04 with an internal repo managed by
Aptly. The only caveat is that the parameter
"Acquire::AllowReleaseInfoChange "true";" must be defined because Aptly
rewrite the Release files when publishing a repo, which indeed crash the
installer. To my understanding this is related to Aptly, not to Ubuntu.
I have been able to complete an unattened install through PXE with the user-data file below:
```
#cloud-config
autoinstall:
apt:
primary:
- arches: [default]
uri: "http://mirror.acme.tld/mirror/ubuntu/"
conf: |
Acquire::AllowReleaseInfoChange "true";
sources:
aptlyrepokey:
key: | # fill key as block
-----BEGIN PGP PUBLIC KEY BLOCK-----
[...redacted for readability...]
-----END PGP PUBLIC KEY BLOCK-----
identity:
hostname: dummy02
password: $1$QuiloverocknrollTs5nMdFgH/
username: ubuntu
[... some other parameters not relevant here...]
version: 1
```
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1991813
Title:
Subiquity crashes when using local apt mirror created with aptly
Status in subiquity:
Triaged
Bug description:
Instead of simply mirroring an apt repository (such as what apt-mirror
does), aptly will download the debs, create its own structure and then
generate new Release/InRelease files and sign them with its own
locally generated gpg-key
If you use subiquity to install a server and points it to a local
mirror created with aptly, there's no way for you to provide the gpg
key and pass apt.conf.d arguments to let it install.
As a consequence, subiquity crashes when attempting to run "apt-get
update" in-target:
2022-10-05 13:50:18,233 ERROR root:39 finish:
subiquity/Install/install/configure_apt: FAIL: Command
'['/snap/subiquity/3119/usr/bin/python3.8', '-m', 'curtin', '--
showtrace', '-vvv', '--set', 'json:reporting={"subiquity": {"type":
"journald", "identifier": "curtin_event.1978.2"}}', 'in-target', '-t',
'/tmp/tmpwpa9zwq_/mount', '--', 'apt-get', 'update']' returned non-
zero exit status 100.
More details:
https://pastebin.ubuntu.com/p/Mb7VDBk2WS/
Crash report:
https://paste.ubuntu.com/p/sWtkbdNsqt/
Attempt to manually run the command (trying to mimic what subiquity
does):
https://pastebin.ubuntu.com/p/PFytv3Ph5r/
Using the following information in a user-data through an automated
install will work:
apt:
primary:
- arches: [amd64, i386, default]
uri: http://192.168.123.237/ubuntu
security:
- arches: [amd64, i386, default]
uri: http://192.168.123.237/ubuntu
geoip: false
disable_suites: [backports, proposed]
disable_components: [restricted, universe, multiverse]
conf: | # APT config
Acquire::Check-Valid-Until "false";
Acquire::AllowInsecureRepositories "true";
Acquire::AllowDowngradeToInsecureRepositories "true";
Acquire::AllowReleaseInfoChange "true";
sources:
additional-repo.list:
source: "deb http://192.168.123.237/ bionic main"
localrepokey:
key: | # full key as block
To manage notifications about this bug go to:
https://bugs.launchpad.net/subiquity/+bug/1991813/+subscriptions
More information about the foundations-bugs
mailing list