Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase to 3.20 (tftp) #69

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:3.19
FROM ghcr.io/linuxserver/baseimage-alpine:3.20

# set version label
ARG BUILD_DATE
Expand Down Expand Up @@ -31,6 +31,7 @@ RUN \
echo "**** Permissions ****" && \
chown -R abc:abc \
/config && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
Expand Down
8 changes: 6 additions & 2 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1

FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.19
FROM ghcr.io/linuxserver/baseimage-alpine:arm64v8-3.20

# set version label
ARG BUILD_DATE
Expand All @@ -24,7 +24,11 @@ RUN \
${DOWNURL}/netboot.xyz.efi && \
echo "**** Permissions ****" && \
chown -R abc:abc \
/config
/config && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*

# add local files
COPY /root /
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ pipeline {
CI_PORT='69'
CI_SSL='false'
CI_DELAY='60'
CI_DOCKERENV='TZ=US/Pacific'
CI_AUTH='user:password'
CI_DOCKERENV=''
CI_AUTH=''
CI_WEBPATH=''
}
stages {
Expand Down
35 changes: 32 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ To use this image you need an existing DHCP server where you can set this TFTP s
#### PFSense
Services -> DHCP Server

Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section.
Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section.
* check enable
* Next server- IP used for TFTP Server
* Default BIOS file name- `netboot.xyz.kpxe`
Expand All @@ -76,7 +76,7 @@ Set both the option for \"TFTP Server\" and the options under the Advanced \"Net
#### OPNsense
Services -> DHCP Server

Under the Advanced \"Network Booting\" section.
Under the Advanced \"Network Booting\" section.
* check enable
* Next server- IP of docker host
* Default BIOS file name- `netboot.xyz.kpxe`
Expand Down Expand Up @@ -116,7 +116,7 @@ commit; save

#### Dnsmasq/DD-WRT/Tomato/PIHOLE
Various locations to set Additional/Custom DNSMASQ options in UI or config files
Set the following lines:
Set the following lines:
```
dhcp-match=set:bios,60,PXEClient:Arch:00000
dhcp-boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP
Expand Down Expand Up @@ -176,6 +176,10 @@ services:
netbootxyz:
image: lscr.io/linuxserver/netbootxyz:tftp
container_name: netbootxyz
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
ports:
- 69:69/udp
restart: unless-stopped
Expand All @@ -186,6 +190,9 @@ services:
```bash
docker run -d \
--name=netbootxyz \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-p 69:69/udp \
--restart unless-stopped \
lscr.io/linuxserver/netbootxyz:tftp
Expand All @@ -198,6 +205,9 @@ Containers are configured using parameters passed at runtime (such as those abov
| Parameter | Function |
| :----: | --- |
| `-p 69/udp` | TFTP Port. |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Etc/UTC` | specify a timezone to use, see this [list](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List). |

## Environment variables from files (Docker secrets)

Expand All @@ -216,6 +226,24 @@ Will set the environment variable `MYVAR` based on the contents of the `/run/sec
For all of our images we provide the ability to override the default umask settings for services started within the containers using the optional `-e UMASK=022` setting.
Keep in mind umask is not chmod it subtracts from permissions based on it's value it does not add. Please read up [here](https://en.wikipedia.org/wiki/Umask) before asking for support.

## User / Group Identifiers

When using volumes (`-v` flags), permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.

Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.

In this instance `PUID=1000` and `PGID=1000`, to find yours use `id your_user` as below:

```bash
id your_user
```

Example output:

```text
uid=1000(your_user) gid=1000(your_user) groups=1000(your_user)
```

## Docker Mods

[![Docker Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=netbootxyz&query=%24.mods%5B%27netbootxyz%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=netbootxyz "view available mods for this container.") [![Docker Universal Mods](https://img.shields.io/badge/dynamic/yaml?color=94398d&labelColor=555555&logoColor=ffffff&style=for-the-badge&label=universal&query=%24.mods%5B%27universal%27%5D.mod_count&url=https%3A%2F%2Fraw.githubusercontent.com%2Flinuxserver%2Fdocker-mods%2Fmaster%2Fmod-list.yml)](https://mods.linuxserver.io/?mod=universal "view available universal mods.")
Expand Down Expand Up @@ -342,6 +370,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64

## Versions

* **30.06.24:** - Rebase to Alpine 3.20.
* **08.12.23:** - Rebase tftp branch to Alpine 3.19.
* **17.11.23:** - Rebase tftp branch to Alpine 3.18.
* **01.07.23:** - Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)
Expand Down
4 changes: 2 additions & 2 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ repo_vars:
- CI_PORT='69'
- CI_SSL='false'
- CI_DELAY='60'
- CI_DOCKERENV='TZ=US/Pacific'
- CI_AUTH='user:password'
- CI_DOCKERENV=''
- CI_AUTH=''
- CI_WEBPATH=''
sponsor_links:
- { name: "netboot.xyz", url: "https://opencollective.com/netbootxyz/donate" }
27 changes: 12 additions & 15 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,10 @@ available_architectures:
- {arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- {arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
# container parameters
common_param_env_vars_enabled: false
Roxedus marked this conversation as resolved.
Show resolved Hide resolved
param_container_name: "{{ project_name }}"
param_usage_include_vols: false
param_usage_include_ports: true
param_ports:
- {external_port: "69", internal_port: "69/udp", port_desc: "TFTP Port."}
param_usage_include_env: false
# application setup block
app_setup_block_enabled: true
app_setup_block: |
To use this image you need an existing DHCP server where you can set this TFTP server as your DHCP boot destination. This image does not contain a DHCP server nor do we aim to support one in the future. This is simply a TFTP server hosting the latest IPXE kernel builds from [netboot.xyz]({{ project_url }}). If you are interested in their project and lack the ability to setup a DHCP server to boot this payload they also have USB stick images you can use available on their [downloads page]({{ project_url }}/downloads/).
Expand All @@ -28,7 +24,7 @@ app_setup_block: |
#### PFSense
Services -> DHCP Server

Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section.
Set both the option for \"TFTP Server\" and the options under the Advanced \"Network Booting\" section.
* check enable
* Next server- IP used for TFTP Server
* Default BIOS file name- `netboot.xyz.kpxe`
Expand All @@ -38,7 +34,7 @@ app_setup_block: |
#### OPNsense
Services -> DHCP Server

Under the Advanced \"Network Booting\" section.
Under the Advanced \"Network Booting\" section.
* check enable
* Next server- IP of docker host
* Default BIOS file name- `netboot.xyz.kpxe`
Expand All @@ -55,7 +51,7 @@ app_setup_block: |
EdgeOS (shown below) will fully support netboot.
* For UDM variants, creating a valid dnsmasq config and placing in /run/dnsmasq.conf.d
will load the config, but will not survive reboots or firmware updates [source](https://community.ui.com/questions/PXE-Network-boot-UDM-SE-Serving-files-conditionally-based-on-architecture/1843fcf6-87d5-4305-bc1d-4e55619ebb10).

#### EdgeOS/VyOS
Connect via SSH
```
Expand All @@ -75,10 +71,10 @@ app_setup_block: |
set service dns forwarding options \"dhcp-boot=tag:efi64-2,netboot.xyz.efi,,SERVERIP\"
commit; save
```

#### Dnsmasq/DD-WRT/Tomato/PIHOLE
Various locations to set Additional/Custom DNSMASQ options in UI or config files
Set the following lines:
Set the following lines:
```
dhcp-match=set:bios,60,PXEClient:Arch:00000
dhcp-boot=tag:bios,netboot.xyz.kpxe,,YOURSERVERIP
Expand All @@ -93,7 +89,7 @@ app_setup_block: |
dhcp-match=set:efi64-2,60,PXEClient:Arch:00009
dhcp-boot=tag:efi64-2,netboot.xyz.efi,,YOURSERVERIP
```

#### OpenWRT
```
uci set dhcp.@dnsmasq[0].dhcp_match=set:bios,60,PXEClient:Arch:00000
Expand All @@ -111,23 +107,24 @@ app_setup_block: |
uci commit
/etc/init.d/dnsmasq restart
```

#### Microsoft Server DHCP

* Run the DHCP program
* Under Scope/Scope Options
* check option 066 and enter the FQDN or IP of your TFTP boot server
* check option 067 and enter one of the following bootfile names:
* Default BIOS file name- netboot.xyz.kpxe
* UEFI 32 bit file name- netboot.xyz.efi
* UEFI 64 bit file name- netboot.xyz.efi

Anything else from a router standpoint is a crapshoot for supporting Dnsmasq options or proprietary PXE boot options, check Google for support (try your exact router model number with 'pxe boot') or look into setting up your own DHCP server in Linux.
This image also contains `netboot.xyz.efi` which can be used to boot using UEFI network boot. The UEFI boot and menu will have limited functionality if you choose to use it.

This image also contains `netboot.xyz.efi` which can be used to boot using UEFI network boot. The UEFI boot and menu will have limited functionality if you choose to use it.

# changelog
changelogs:
- {date: "30.06.24:", desc: "Rebase to Alpine 3.20."}
- {date: "08.12.23:", desc: "Rebase tftp branch to Alpine 3.19."}
- {date: "17.11.23:", desc: "Rebase tftp branch to Alpine 3.18."}
- {date: "01.07.23:", desc: "Deprecate armhf. As announced [here](https://www.linuxserver.io/blog/a-farewell-to-arm-hf)"}
Expand Down