Compare commits

...
21 Commits
Author SHA1 Message Date
pi-farm 44836d75a7 add media to .gitignore 2026-10-01 20:55:26 +02:00
Pi-Farm 31986500d5 Merge pull request #6 from pi-farm/test2
merge (#5)
2026-10-01 19:12:51 +02:00
Pi-Farm e72424264c merge (#5)
* Create a shim for systemctl in container

Implement a shim for systemctl to handle service actions in a container environment, with a critical fix to ignore 'samba-ad-dc' to prevent RPC conflicts.

* Add permissions and symlink for systemctl

Added executable permissions to systemctl and created a symlink.

* Add script to start PXE-related services

* Add script to start PXE services on initialization

This script starts essential PXE services using systemctl.

* Rename root/etc/cont-init.d/99-start-pxe-services.sh to root/cont-init.d/99-start-pxe-services.sh

* Rename root/cont-init.d/99-start-pxe-services.sh to root/etc/cont-init.d/99-start-pxe-services.sh

* Fix rpcbind by creating missing directory

Create missing directory for rpcbind service.

* Update and rename root/etc/s6-overlay/s6-rc.d/cont-init.d/99-start-pxe-services.sh to 0

* Rename root/etc/s6-overlay/s6-rc.d/user/contents.d/init-pxe-boot-config to 1

* Rename root/etc/s6-overlay/s6-rc.d/init-pxe-boot-config/up to 2

* Rename root/etc/s6-overlay/s6-rc.d/init-pxe-boot-config/type to 3

* Rename root/etc/s6-overlay/s6-rc.d/init-pxe-boot-config/run to 4

* Rename root/etc/s6-overlay/.DS_Store to 5

* Rename root/etc/.DS_Store to 6

* delete old files

* ignore
2026-10-01 19:11:48 +02:00
pi-farm b4c1866925 Merge-conflict in 99-start-pxe-services.sh resolved 2026-10-01 18:51:16 +02:00
pi-farm 43f90f907a switch to debian:12-slim as baseimage 2026-10-01 16:33:39 +02:00
Pi-Farm d1e6da9930 ignore 2026-06-08 13:38:21 +02:00
Pi-Farm 7c07bbf9b0 delete old files 2026-06-08 13:36:57 +02:00
Pi-Farm 9c5ef65444 Rename root/etc/.DS_Store to 6 2026-06-08 13:26:43 +02:00
Pi-Farm 81fcde4a7e Rename root/etc/s6-overlay/.DS_Store to 5 2026-06-08 13:26:28 +02:00
Pi-Farm 8f2f69d7ab Rename root/etc/s6-overlay/s6-rc.d/init-pxe-boot-config/run to 4 2026-06-08 13:25:44 +02:00
Pi-Farm f884a4c955 Rename root/etc/s6-overlay/s6-rc.d/init-pxe-boot-config/type to 3 2026-06-08 13:25:30 +02:00
Pi-Farm 50f7712b2c Rename root/etc/s6-overlay/s6-rc.d/init-pxe-boot-config/up to 2 2026-06-08 13:25:12 +02:00
Pi-Farm 2d7b50a51e Rename root/etc/s6-overlay/s6-rc.d/user/contents.d/init-pxe-boot-config to 1 2026-06-08 13:24:40 +02:00
Pi-Farm e089021092 Update and rename root/etc/s6-overlay/s6-rc.d/cont-init.d/99-start-pxe-services.sh to 0 2026-06-08 13:23:16 +02:00
Pi-Farm 3ad711cf1e Fix rpcbind by creating missing directory
Create missing directory for rpcbind service.
2026-06-08 13:01:55 +02:00
Pi-Farm bd585216ea Rename root/cont-init.d/99-start-pxe-services.sh to root/etc/cont-init.d/99-start-pxe-services.sh 2026-06-08 12:43:32 +02:00
Pi-Farm 1821912e3e Rename root/etc/cont-init.d/99-start-pxe-services.sh to root/cont-init.d/99-start-pxe-services.sh 2026-06-08 12:40:14 +02:00
Pi-Farm 5afd01feca Add script to start PXE services on initialization
This script starts essential PXE services using systemctl.
2026-06-08 12:16:26 +02:00
Pi-Farm 6b803e71cd Add script to start PXE-related services 2026-06-08 12:12:44 +02:00
Pi-Farm 7e61613ad1 Add permissions and symlink for systemctl
Added executable permissions to systemctl and created a symlink.
2026-06-08 11:30:38 +02:00
Pi-Farm 808d83f9a5 Create a shim for systemctl in container
Implement a shim for systemctl to handle service actions in a container environment, with a critical fix to ignore 'samba-ad-dc' to prevent RPC conflicts.
2026-06-08 11:29:42 +02:00
6 changed files with 37 additions and 9 deletions

No files matched your search

+2 -1
View File
@@ -1,5 +1,6 @@
media/
srv/ srv/
RPi-PXE-Server RPi-PXE-Server
notes notes
samba/ samba/
.DS_Store .DS_Store
+1
View File
@@ -14,6 +14,7 @@ services:
- ${PWD}/media:/media/ - ${PWD}/media:/media/
- /boot:/boot - /boot:/boot
- /var/lib/nfs:/var/lib/nfs - /var/lib/nfs:/var/lib/nfs
- /run/rpcbind:/run/rpcbind
container_name: pxe-container container_name: pxe-container
image: pxe-image image: pxe-image
+4 -3
View File
@@ -1,5 +1,5 @@
FROM debian:11-slim FROM debian:12-slim
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y && apt-get install unzip fdisk util-linux nano xz-utils wget systemctl sudo git tcpdump zstd -y RUN apt-get update && apt-get install unzip fdisk util-linux nano xz-utils wget systemctl sudo git tcpdump zstd nfs-kernel-server nfs-common rpcbind -y
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.0/s6-overlay-noarch.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.0/s6-overlay-noarch.tar.xz /tmp
ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.0/s6-overlay-aarch64.tar.xz /tmp ADD https://github.com/just-containers/s6-overlay/releases/download/v3.1.6.0/s6-overlay-aarch64.tar.xz /tmp
RUN tar -C / -Jxpf /tmp/s6-overlay-aarch64.tar.xz && tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && mkdir /app && mkdir /app/RPi-PXE-Server RUN tar -C / -Jxpf /tmp/s6-overlay-aarch64.tar.xz && tar -C / -Jxpf /tmp/s6-overlay-noarch.tar.xz && mkdir /app && mkdir /app/RPi-PXE-Server
@@ -9,6 +9,7 @@ VOLUME /app/RPi-PXE-Server
VOLUME /srv VOLUME /srv
VOLUME /etc/samba VOLUME /etc/samba
VOLUME /boot VOLUME /boot
RUN rm -rf /temp/* && rm -rf /var/lib/apt/lists/* RUN rm -rf /temp/* && rm -rf /var/lib/apt/lists/* && mkdir -p /run/rpcbind /run/sendsigs.omit.d/
RUN rm -rf /run/* /var/run/*
WORKDIR /app/RPi-PXE-Server WORKDIR /app/RPi-PXE-Server
ENTRYPOINT [ "/init" ] ENTRYPOINT [ "/init" ]
+18 -3
View File
@@ -1,5 +1,20 @@
#!/bin/bash #!/bin/bash
#systemctl start chrony dnsmasq lighttpd nfs-mountd nfs-server nfs-kernel-server nmbd rsync samba-ad-dc smbd
##systemctl stop rpcbind
#systemctl start rpcbind && systemctl start nfs-kernel-server && rpc.mountd
#systemctl status chrony dnsmasq lighttpd nfs-mountd nfs-server nfs-kernel-server nmbd rsync samba-ad-dc smbd
# 1. Zuerst zwingend rpcbind starten
systemctl start rpcbind
# Kurze Pause, damit der Portmapper-Dienst fully up & running ist
sleep 1
# 2. Erst danach NFS-Dienste und den Rest starten
systemctl start chrony dnsmasq lighttpd nfs-mountd nfs-server nfs-kernel-server nmbd rsync samba-ad-dc smbd systemctl start chrony dnsmasq lighttpd nfs-mountd nfs-server nfs-kernel-server nmbd rsync samba-ad-dc smbd
#systemctl stop rpcbind
systemctl start rpcbind && systemctl start nfs-kernel-server && rpc.mountd # 3. Optional: Falls rpc.mountd separat benötigt wird
systemctl status chrony dnsmasq lighttpd nfs-mountd nfs-server nfs-kernel-server nmbd rsync samba-ad-dc smbd rpc.mountd 2>/dev/null || true
# 4. Status aller Dienste prüfen
systemctl status rpcbind chrony dnsmasq lighttpd nfs-mountd nfs-server nfs-kernel-server nmbd rsync samba-ad-dc smbd
BIN
View File
Binary file not shown.
+12 -2
View File
@@ -5,8 +5,18 @@ echo "Starte PXE-relevante Dienste via systemctl-shim..."
# Fix für rpcbind: Fehlendes Verzeichnis erstellen # Fix für rpcbind: Fehlendes Verzeichnis erstellen
mkdir -p /run/sendsigs.omit.d mkdir -p /run/sendsigs.omit.d
systemctl start rpcbind # rpcbind läuft auf dem Host (network_mode: host)
systemctl start nfs-kernel-server #systemctl start rpcbind
# NFS:
# Das Debian-Init-Skript verweigert den Start, weil es den
# hostseitigen rpcbind-Prozess im Container nicht erkennen kann.
# nfsd daher direkt starten.
echo "Starte NFS kernel daemon..."
exportfs -ra
rpc.nfsd 8
echo "Starte PXE-Dienste..."
systemctl start dnsmasq systemctl start dnsmasq
systemctl start lighttpd systemctl start lighttpd
systemctl start smbd systemctl start smbd