0

I apologize in advance for the lengthy post, but I wanted to include as much context as I could.

BLUF: I am attempting to automate the installation of Ubuntu 24.04 using a local mirror rather than opening any of the boxes to the internet. I have a private mirror hosted at http://101.101.101.101:81/ubuntu, however, if I configure the APT section of my autoinstall.yaml to point to the private mirror it fails to install Ubuntu and the installer crashes.

I know similar questions to this have been asked previously, however, I have yet to find a solution to the problem I'm experiencing. I have clean installed, without any modification, Ubuntu 24.04 on a test box without issue. Then, I was able to verify that my private mirror was reachable from the test box using ping, curl, etc. Next, I stripped down the autoinstall.yaml to only include the version, source, locale, keyboard, timezone, and identity sections and verified that I could successfully reach the autoinstall.yaml (also hosted on http://101.101.101.101:81/ubuntu) and install Ubuntu 24.04 successfully.

Working, minimum autoinstall:

#cloud-config
autoinstall:
  version: 1
  source:
    id: ubuntu-desktop-minimal
  locale: en_US.UTF-8
  keyboard:
    layout: us
  timezone: UTC
  identity:
    hostname: ubuntu-auto-test
    username: user
    password: <encrypted_password>

The issue comes in when I attempt to add the APT section to point to my private mirror. Keep in mind that my private mirror has the following structure:

http://101.101.101.101:81/ubuntu
|-- noble/
  |-- by-hash/
  |-- main/
  |-- restricted/
  |-- universe/
  |-- InRelease
  |-- Release
  |-- Release.gpg
|-- noble-updates/
  |-- by-hash/
  |-- main/
  |-- restricted/
  |-- universe/
  |-- InRelease
  |-- Release
  |-- Release.gpg
|-- noble-backports/
  |-- by-hash/
  |-- main/
  |-- restricted/
  |-- universe/
  |-- InRelease
  |-- Release
  |-- Release.gpg
|-- noble-security/
  |-- by-hash/
  |-- main/
  |-- restricted/
  |-- universe/
  |-- InRelease
  |-- Release
  |-- Release.gpg

Below is a sample of my current attempt at autoinstall.yaml including the APT section, however, I've tried several different configurations at this point:

#cloud-config
autoinstall:
  version: 1
  source:
    id: ubuntu-desktop-minimal
  locale: en_US.UTF-8
  keyboard:
    layout: us
  timezone: UTC
  identity:
    hostname: ubuntu-auto-test
    username: user
    password: <encrypted_password>

Custom Mirrors

apt: preserve_sources_list: false mirror-selection: primary: - arches: - amd64 uri: http://101.101.101.101:81/ubuntu

Install packages

packages: - vim

When the installer crashes I see some logs stating that it tried to install vim, but couldn't and I find the following logs in /var/crash/.crash:

subiquity.server.controllers.mirror:180 Ign:1 http://101.101.101.101:81/ubuntu noble InRelease
subiquity.server.controllers.mirror:180 Ign:2 http://101.101.101.101:81/ubuntu noble-updates InRelease
subiquity.server.controllers.mirror:180 Ign:3 http://101.101.101.101:81/ubuntu noble-backports InRelease
subiquity.server.controllers.mirror:180 Err:4 http://101.101.101.101:81/ubuntu noble Release
subiquity.server.controllers.mirror:180  404  [IP: 101.101.101.101 81]
subiquity.server.controllers.mirror:180 E: The repository 'http://101.101.101.101:81/ubuntu noble Release' no longer has a Release file.
subiquity.server.controllers.mirror:180 E: The repository 'http://101.101.101.101:81/ubuntu noble-updates Release' no longer has a Release file.
subiquity.server.controllers.mirror:180 E: The repository 'http://101.101.101.101:81/ubuntu noble-backports Release' no longer has a Release file.

Despite the logs showing Ubuntu attempted to install vim (which makes me think that it updated the APT sources to point to the private mirror) I cannot find references to my private mirror in any of the /etc/apt/* files.

Has anyone run into this same problem? How did you fix it? Thank you again for your help.

0 Answers0