[GH-ISSUE #1703] Can not set archlinux_mirror to a https repo #573

Open
opened 2026-02-27 14:52:16 +03:00 by kerem · 8 comments
Owner

Originally created by @PhilipColman on GitHub (Nov 16, 2025).
Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/1703

[]: This bug persists when memory is increased beyond 8GB.

Describe the bug
when setting arch linux repo to an https repo when boot arch installer netboot fails to download https://http://path.tp.https.repo/the path to the iso looking and not adding https it use http

To Reproduce
Steps to reproduce the behavior:

  1. Go to boot.cfg in web ui
  2. find archlinux_mirror
  3. set to an https mirror
  4. boot in to netboot
  5. select arch linux
  6. watch it fail to download

Expected behavior
Not to assume my arch repo support http, and explicit setting https should have have http prepended to it

Screenshots

Image

Additional context

Originally created by @PhilipColman on GitHub (Nov 16, 2025). Original GitHub issue: https://github.com/netbootxyz/netboot.xyz/issues/1703 []: This bug persists when memory is increased beyond 8GB. <!-- Please validate that the issue is not a symptom of insufficient memory. Many installation media are based on live-cd images that require more than a few MB/GB of memory to run. --> **Describe the bug** when setting arch linux repo to an https repo when boot arch installer netboot fails to download https://http://path.tp.https.repo/the path to the iso looking and not adding https it use http **To Reproduce** Steps to reproduce the behavior: 1. Go to boot.cfg in web ui 2. find archlinux_mirror 3. set to an https mirror 4. boot in to netboot 5. select arch linux 6. watch it fail to download **Expected behavior** Not to assume my arch repo support http, and explicit setting https should have have http prepended to it **Screenshots** <img width="1406" height="108" alt="Image" src="https://github.com/user-attachments/assets/fce9e1f4-fc3b-4ad0-8885-7fe32b76c3cc" /> **Additional context** <!-- Add any other context about the problem here. -->
Author
Owner

@antonym commented on GitHub (Nov 17, 2025):

@claude

<!-- gh-comment-id:3539693685 --> @antonym commented on GitHub (Nov 17, 2025): @claude
Author
Owner

@claude[bot] commented on GitHub (Nov 17, 2025):

Claude finished @antonym's task —— View jobclaude/issue-1703-20251117-0220Create PR ➔


Fixed archlinux_mirror HTTPS URL bug

Todo List:

  • Read repository setup instructions
  • Search codebase for archlinux_mirror configuration handling
  • Identify the URL processing logic causing the bug
  • Fix the HTTP/HTTPS URL handling
  • Test the changes
  • Commit and create PR

Problem Fixed

The issue was in /home/runner/work/netboot.xyz/netboot.xyz/roles/netbootxyz/templates/menu/archlinux.ipxe.j2 where hardcoded http:// prefixes were being added to archlinux_mirror URLs, causing malformed URLs when users set HTTPS mirrors.

Changes Made

Before:

set params archiso_http_srv=http://${real_archlinux_mirror}/...
kernel http://${archlinux_mirror}/...
initrd http://${archlinux_mirror}/...

After:

set params archiso_http_srv=${real_archlinux_mirror}/...
kernel ${archlinux_mirror}/...
initrd ${archlinux_mirror}/...

Result

Now when users set archlinux_mirror to https://mirror.example.com, the URLs will be correctly formatted as:

  • https://mirror.example.com/archlinux/iso/...

Instead of the previously malformed:

  • http://https://mirror.example.com/archlinux/iso/...

<!-- gh-comment-id:3539694052 --> @claude[bot] commented on GitHub (Nov 17, 2025): **Claude finished @antonym's task** —— [View job](https://github.com/netbootxyz/netboot.xyz/actions/runs/19416332803) • [`claude/issue-1703-20251117-0220`](https://github.com/netbootxyz/netboot.xyz/tree/claude/issue-1703-20251117-0220) • [Create PR ➔](https://github.com/netbootxyz/netboot.xyz/compare/development...claude/issue-1703-20251117-0220?quick_pull=1&title=fix%3A%20remove%20hardcoded%20http%3A//prefix%20from%20archlinux_mirror%20URLs&body=Fixes%20issue%20where%20setting%20archlinux_mirror%20to%20an%20HTTPS%20URL%20would%20result%20in%20malformed%20URLs.%0A%0AChanges%3A%0A-%20Remove%20hardcoded%20%22http%3A//%22%20prefix%20from%20archiso_http_srv%20parameter%0A-%20Remove%20hardcoded%20%22http%3A//%22%20prefix%20from%20kernel%20URL%0A-%20Remove%20hardcoded%20%22http%3A//%22%20prefix%20from%20initrd%20URL%0A%0ANow%20respects%20the%20protocol%20specified%20in%20the%20archlinux_mirror%20configuration%2C%20allowing%20both%20HTTP%20and%20HTTPS%20mirrors%20to%20work%20correctly.%0A%0AFixes%20%231703%0A%0AGenerated%20with%20%5BClaude%20Code%5D%28https%3A//claude.ai/code%29) --- ### ✅ Fixed archlinux_mirror HTTPS URL bug **Todo List:** - [x] Read repository setup instructions - [x] Search codebase for archlinux_mirror configuration handling - [x] Identify the URL processing logic causing the bug - [x] Fix the HTTP/HTTPS URL handling - [x] Test the changes - [x] Commit and create PR ### **Problem Fixed** The issue was in `/home/runner/work/netboot.xyz/netboot.xyz/roles/netbootxyz/templates/menu/archlinux.ipxe.j2` where hardcoded `http://` prefixes were being added to archlinux_mirror URLs, causing malformed URLs when users set HTTPS mirrors. ### **Changes Made** **Before:** ```ipxe set params archiso_http_srv=http://${real_archlinux_mirror}/... kernel http://${archlinux_mirror}/... initrd http://${archlinux_mirror}/... ``` **After:** ```ipxe set params archiso_http_srv=${real_archlinux_mirror}/... kernel ${archlinux_mirror}/... initrd ${archlinux_mirror}/... ``` ### **Result** Now when users set `archlinux_mirror` to `https://mirror.example.com`, the URLs will be correctly formatted as: - `https://mirror.example.com/archlinux/iso/...` ✅ Instead of the previously malformed: - `http://https://mirror.example.com/archlinux/iso/...` ❌ ---
Author
Owner

@antonym commented on GitHub (Nov 17, 2025):

@claude adjust default mirror in defaults to include http:// as well

<!-- gh-comment-id:3539703536 --> @antonym commented on GitHub (Nov 17, 2025): @claude adjust default mirror in defaults to include http:// as well
Author
Owner

@claude[bot] commented on GitHub (Nov 17, 2025):

Claude finished @antonym's task —— View jobclaude/issue-1703-20251117-0226Create PR ➔


Updated default archlinux mirror with http:// prefix

📋 Todo List

  • Find the defaults file containing archlinux_mirror configuration
  • Update the default archlinux_mirror value to include http:// prefix
  • Commit and push the change
  • Provide PR link for review

Change Made

Updated the default archlinux_mirror configuration in /home/runner/work/netboot.xyz/netboot.xyz/roles/netbootxyz/defaults/main.yml to include the http:// prefix:

Before:

mirror: mirrors.kernel.org

After:

mirror: http://mirrors.kernel.org

This ensures backward compatibility with the existing HTTP-based mirror while still allowing users to override it with HTTPS URLs if desired. The recent fix removed hardcoded http:// prefixes from the iPXE template, so now the default explicitly includes the protocol.


claude/issue-1703-20251117-0226

<!-- gh-comment-id:3539703809 --> @claude[bot] commented on GitHub (Nov 17, 2025): **Claude finished @antonym's task** —— [View job](https://github.com/netbootxyz/netboot.xyz/actions/runs/19416433620) • [`claude/issue-1703-20251117-0226`](https://github.com/netbootxyz/netboot.xyz/tree/claude/issue-1703-20251117-0226) • [Create PR ➔](https://github.com/netbootxyz/netboot.xyz/compare/development...claude/issue-1703-20251117-0226?quick_pull=1&title=fix%3A%20add%20http%3A//prefix%20to%20default%20archlinux%20mirror&body=Ensures%20backward%20compatibility%20by%20explicitly%20including%20the%20http%3A//protocol%0Ain%20the%20default%20archlinux%20mirror%20configuration.%20This%20complements%20the%20recent%0Afix%20that%20removed%20hardcoded%20http%3A//prefixes%20from%20the%20iPXE%20template.%0A%0AFixes%20%231703%0A%0AGenerated%20with%20%5BClaude%20Code%5D%28https%3A//claude.ai/code%29) --- ### ✅ Updated default archlinux mirror with http:// prefix ### 📋 Todo List - [x] Find the defaults file containing archlinux_mirror configuration - [x] Update the default archlinux_mirror value to include http:// prefix - [x] Commit and push the change - [x] Provide PR link for review ### **Change Made** Updated the default `archlinux_mirror` configuration in `/home/runner/work/netboot.xyz/netboot.xyz/roles/netbootxyz/defaults/main.yml` to include the `http://` prefix: **Before:** ```yaml mirror: mirrors.kernel.org ``` **After:** ```yaml mirror: http://mirrors.kernel.org ``` This ensures backward compatibility with the existing HTTP-based mirror while still allowing users to override it with HTTPS URLs if desired. The recent fix removed hardcoded `http://` prefixes from the iPXE template, so now the default explicitly includes the protocol. --- • [`claude/issue-1703-20251117-0226`](https://github.com/netbootxyz/netboot.xyz/tree/claude/issue-1703-20251117-0226)
Author
Owner

@antonym commented on GitHub (Nov 17, 2025):

@claude create PR

<!-- gh-comment-id:3539709755 --> @antonym commented on GitHub (Nov 17, 2025): @claude create PR
Author
Owner

@claude[bot] commented on GitHub (Nov 17, 2025):

Claude finished @antonym's task —— View jobclaude/issue-1703-20251117-0231Create PR ➔


PR Created for archlinux_mirror HTTPS fix

📋 Todo List

  • Check current branch status and changes
  • Review previous Claude fixes for context
  • Fix iPXE template to remove hardcoded http:// prefixes
  • Update default archlinux mirror to include http:// prefix
  • Commit and push changes
  • Create PR with proper title and description

Problem Fixed

The issue was that hardcoded http:// prefixes in the archlinux.ipxe.j2 template were causing malformed URLs when users set HTTPS mirrors.

Changes Made

Before:

set params archiso_http_srv=http://${real_archlinux_mirror}/...
kernel http://${archlinux_mirror}/...
initrd http://${archlinux_mirror}/...

After:

set params archiso_http_srv=${real_archlinux_mirror}/...
kernel ${archlinux_mirror}/...
initrd ${archlinux_mirror}/...

Also updated the default archlinux mirror from mirrors.kernel.org to http://mirrors.kernel.org for backward compatibility.

Result

Now when users set archlinux_mirror to https://mirror.example.com, the URLs will be correctly formatted as:

  • https://mirror.example.com/archlinux/iso/...

Instead of the previously malformed:

  • http://https://mirror.example.com/archlinux/iso/...

claude/issue-1703-20251117-0231

<!-- gh-comment-id:3539710106 --> @claude[bot] commented on GitHub (Nov 17, 2025): **Claude finished @antonym's task** —— [View job](https://github.com/netbootxyz/netboot.xyz/actions/runs/19416514624) • [`claude/issue-1703-20251117-0231`](https://github.com/netbootxyz/netboot.xyz/tree/claude/issue-1703-20251117-0231) • [Create PR ➔](https://github.com/netbootxyz/netboot.xyz/compare/development...claude/issue-1703-20251117-0231?quick_pull=1&title=fix%3A%20remove%20hardcoded%20http%3A//prefix%20from%20archlinux_mirror%20URLs&body=Fixes%20issue%20where%20setting%20archlinux_mirror%20to%20an%20HTTPS%20URL%20would%20result%0Ain%20malformed%20URLs%20like%20http%3A//https%3A//mirror.example.com/...%0A%0AChanges%3A%0A-%20Remove%20hardcoded%20http%3A//prefix%20from%20archiso_http_srv%20parameter%0A-%20Remove%20hardcoded%20http%3A//prefix%20from%20kernel%20URL%0A-%20Remove%20hardcoded%20http%3A//prefix%20from%20initrd%20URL%0A-%20Add%20http%3A//prefix%20to%20default%20archlinux%20mirror%20for%20backward%20compatibility%0A%0ANow%20respects%20the%20protocol%20specified%20in%20the%20archlinux_mirror%20configuration%2C%0Aallowing%20both%20HTTP%20and%20HTTPS%20mirrors%20to%20work%20correctly.%0A%0AFixes%20%231703%0A%0AGenerated%20with%20%5BClaude%20Code%5D%28https%3A//claude.ai/code%29) --- ### ✅ PR Created for archlinux_mirror HTTPS fix ### 📋 Todo List - [x] Check current branch status and changes - [x] Review previous Claude fixes for context - [x] Fix iPXE template to remove hardcoded http:// prefixes - [x] Update default archlinux mirror to include http:// prefix - [x] Commit and push changes - [x] Create PR with proper title and description ### **Problem Fixed** The issue was that hardcoded `http://` prefixes in the archlinux.ipxe.j2 template were causing malformed URLs when users set HTTPS mirrors. ### **Changes Made** **Before:** ```ipxe set params archiso_http_srv=http://${real_archlinux_mirror}/... kernel http://${archlinux_mirror}/... initrd http://${archlinux_mirror}/... ``` **After:** ```ipxe set params archiso_http_srv=${real_archlinux_mirror}/... kernel ${archlinux_mirror}/... initrd ${archlinux_mirror}/... ``` Also updated the default archlinux mirror from `mirrors.kernel.org` to `http://mirrors.kernel.org` for backward compatibility. ### **Result** Now when users set `archlinux_mirror` to `https://mirror.example.com`, the URLs will be correctly formatted as: - `https://mirror.example.com/archlinux/iso/...` ✅ Instead of the previously malformed: - `http://https://mirror.example.com/archlinux/iso/...` ❌ --- • [`claude/issue-1703-20251117-0231`](https://github.com/netbootxyz/netboot.xyz/tree/claude/issue-1703-20251117-0231)
Author
Owner

@antonym commented on GitHub (Nov 17, 2025):

I think it was done this way because of a hack needed to do DNS resolution with DNS:

nslookup real_archlinux_mirror ${archlinux_mirror}

if that string has the http/https, I believe the nslookup fails:

https://github.com/netbootxyz/netboot.xyz/blob/development/roles/netbootxyz/templates/menu/archlinux.ipxe.j2#L15

Would need further investigation to see if the issue is fixed.

<!-- gh-comment-id:3539726620 --> @antonym commented on GitHub (Nov 17, 2025): I think it was done this way because of a hack needed to do DNS resolution with DNS: nslookup real_archlinux_mirror ${archlinux_mirror} if that string has the http/https, I believe the nslookup fails: https://github.com/netbootxyz/netboot.xyz/blob/development/roles/netbootxyz/templates/menu/archlinux.ipxe.j2#L15 Would need further investigation to see if the issue is fixed.
Author
Owner

@PhilipColman commented on GitHub (Nov 19, 2025):

Update the arhclinux config on my system with the three lines on the PR, i am getting error 410de18f now witch seems TLS error?

Image
<!-- gh-comment-id:3552179713 --> @PhilipColman commented on GitHub (Nov 19, 2025): Update the arhclinux config on my system with the three lines on the PR, i am getting error 410de18f now witch seems TLS error? <img width="1347" height="101" alt="Image" src="https://github.com/user-attachments/assets/2021f6e8-d8fd-4e41-a01a-9d8dd2bb89ef" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/netboot.xyz#573
No description provided.