From 61049e850a369cf4fa693394a2f9239d1f5275b4 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 2 Oct 2025 11:22:55 +0200 Subject: [PATCH 1/9] feat: Allow custom startup script --- src/entry.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/src/entry.sh b/src/entry.sh index 17b2147..b7f9e0a 100644 --- a/src/entry.sh +++ b/src/entry.sh @@ -8,6 +8,7 @@ set -Eeuo pipefail cd /run +. start.sh # Placeholder . utils.sh # Load functions . reset.sh # Initialize system . define.sh # Define versions From e2c323ff4375d6fd97b9575fb192fb0933561f9f Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 2 Oct 2025 11:42:40 +0200 Subject: [PATCH 2/9] build: Update QEMU base image to v7.20 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f28ad59..c23ef18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG VERSION_ARG="latest" FROM scratch AS build-amd64 -COPY --from=qemux/qemu:7.19 / / +COPY --from=qemux/qemu:7.20 / / ARG TARGETARCH ARG DEBCONF_NOWARNINGS="yes" From 70380d8cfc1e0f8c9ab4617d3257fd36ca366ccd Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 2 Oct 2025 17:00:46 +0200 Subject: [PATCH 3/9] fix: Refactor filename function --- src/install.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index 084bbd2..c3fa8ef 100644 --- a/src/install.sh +++ b/src/install.sh @@ -127,8 +127,9 @@ startInstall() { if [[ "${VERSION,,}" == "http"* ]]; then file=$(basename "${VERSION%%\?*}") - : "${file//+/ }"; printf -v file '%b' "${_//%/\\x}" - file=$(echo "$file" | sed -e 's/[^A-Za-z0-9._-]/_/g') + file="${file//+/ }" + printf -v file '%b' "${file//%/\\x}" + file="${file//[!A-Za-z0-9._-]/_}" else From a63ca73ba2305d4c7f638216351c406e7ec7ef81 Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 2 Oct 2025 17:44:15 +0200 Subject: [PATCH 4/9] fix: Remove obsolete debug message --- src/mido.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/mido.sh b/src/mido.sh index 2f35442..cc5b251 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -171,8 +171,6 @@ download_windows() { return 1 fi - [[ "$DEBUG" == [Yy1]* ]] && echo "Found download link: $iso_download_link" - MIDO_URL="$iso_download_link" return 0 } @@ -309,17 +307,19 @@ download_windows_eval() { return $? } - [[ "$DEBUG" == [Yy1]* ]] && echo "Found download link: $iso_download_link" - case "${PLATFORM,,}" in "x64" ) if [[ "${iso_download_link,,}" != *"x64"* ]]; then - error "Download link is for the wrong platform? Please report this at $SUPPORT/issues" + echo "Found download link: $iso_download_link" + error "Download link is for the wrong platform? Please report this at $SUPPORT/issues" return 1 fi ;; "arm64" ) if [[ "${iso_download_link,,}" != *"a64"* && "${iso_download_link,,}" != *"arm64"* ]]; then - [[ "$DEBUG" == [Yy1]* ]] && echo "Link for ARM platform currently not available!" + if [[ "$DEBUG" == [Yy1]* ]]; then + echo "Found download link: $iso_download_link" + echo "Link for ARM platform currently not available!" + fi return 1 fi ;; esac From eeb34252115515aef9077b2d5183ee88081bfd8a Mon Sep 17 00:00:00 2001 From: Kroese Date: Thu, 2 Oct 2025 20:04:15 +0200 Subject: [PATCH 5/9] feat: Enhanced Samba debugging (#1444) --- src/samba.sh | 42 +++++++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/src/samba.sh b/src/samba.sh index ca54266..b35307b 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -Eeuo pipefail -: "${SAMBA:="Y"}" +: "${SAMBA:="Y"}" # Enable Samba +: "${SAMBA_DEBUG:="N"}" # Disable debug +: "${SAMBA_LEVEL:="1"}" # Debug log level [[ "$SAMBA" == [Nn]* ]] && return 0 [[ "$NETWORK" == [Nn]* ]] && return 0 @@ -18,7 +20,7 @@ if [[ "${NETWORK,,}" == "user"* ]]; then interface="127.0.0.1" fi -html "Starting file sharing services..." +html "Initializing shared folder..." [[ "$DEBUG" == [Yy1]* ]] && echo "Starting Samba daemon..." addShare() { @@ -119,22 +121,44 @@ done [ -d /var/log/samba/cores ] && chmod -R 0700 /var/log/samba/cores 2>/dev/null || : [ -d /var/cache/samba/msg.lock ] && chmod -R 0755 /var/cache/samba/msg.lock 2>/dev/null || : -if ! smbd; then - error "Samba daemon failed to start!" - smbd -i --debug-stdout || true +if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then + if ! smbd; then + SAMBA_DEBUG="Y" + error "Samba daemon failed to start!" + fi +fi + +if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then + smbd -i -d "$SAMBA_LEVEL" --debug-stdout & fi if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then + # Enable NetBIOS on Windows 7 and lower [[ "$DEBUG" == [Yy1]* ]] && echo "Starting NetBIOS daemon..." - if ! nmbd; then - error "NetBIOS daemon failed to start!" - nmbd -i --debug-stdout || true + + if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then + if ! nmbd; then + SAMBA_DEBUG="Y" + error "NetBIOS daemon failed to start!" + fi fi + + if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then + nmbd -i -d "$SAMBA_LEVEL" --debug-stdout & + fi + else + # Enable Web Service Discovery on Vista and up [[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..." - wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid >/dev/null & + + if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then + wsddn -i "$interface" -H "$hostname" --unixd --pid-file=/var/run/wsdd.pid + else + wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid & + fi + fi return 0 From ae185de31406b1c2d2760251ddb0d6c291a2d30c Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 Oct 2025 00:00:08 +0200 Subject: [PATCH 6/9] build: Update QEMU base image to v7.20 (#1446) --- Dockerfile | 2 +- src/entry.sh | 1 + src/install.sh | 5 +++-- src/mido.sh | 12 ++++++------ 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index f28ad59..c23ef18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ ARG VERSION_ARG="latest" FROM scratch AS build-amd64 -COPY --from=qemux/qemu:7.19 / / +COPY --from=qemux/qemu:7.20 / / ARG TARGETARCH ARG DEBCONF_NOWARNINGS="yes" diff --git a/src/entry.sh b/src/entry.sh index 17b2147..b7f9e0a 100644 --- a/src/entry.sh +++ b/src/entry.sh @@ -8,6 +8,7 @@ set -Eeuo pipefail cd /run +. start.sh # Placeholder . utils.sh # Load functions . reset.sh # Initialize system . define.sh # Define versions diff --git a/src/install.sh b/src/install.sh index 084bbd2..c3fa8ef 100644 --- a/src/install.sh +++ b/src/install.sh @@ -127,8 +127,9 @@ startInstall() { if [[ "${VERSION,,}" == "http"* ]]; then file=$(basename "${VERSION%%\?*}") - : "${file//+/ }"; printf -v file '%b' "${_//%/\\x}" - file=$(echo "$file" | sed -e 's/[^A-Za-z0-9._-]/_/g') + file="${file//+/ }" + printf -v file '%b' "${file//%/\\x}" + file="${file//[!A-Za-z0-9._-]/_}" else diff --git a/src/mido.sh b/src/mido.sh index 2f35442..cc5b251 100644 --- a/src/mido.sh +++ b/src/mido.sh @@ -171,8 +171,6 @@ download_windows() { return 1 fi - [[ "$DEBUG" == [Yy1]* ]] && echo "Found download link: $iso_download_link" - MIDO_URL="$iso_download_link" return 0 } @@ -309,17 +307,19 @@ download_windows_eval() { return $? } - [[ "$DEBUG" == [Yy1]* ]] && echo "Found download link: $iso_download_link" - case "${PLATFORM,,}" in "x64" ) if [[ "${iso_download_link,,}" != *"x64"* ]]; then - error "Download link is for the wrong platform? Please report this at $SUPPORT/issues" + echo "Found download link: $iso_download_link" + error "Download link is for the wrong platform? Please report this at $SUPPORT/issues" return 1 fi ;; "arm64" ) if [[ "${iso_download_link,,}" != *"a64"* && "${iso_download_link,,}" != *"arm64"* ]]; then - [[ "$DEBUG" == [Yy1]* ]] && echo "Link for ARM platform currently not available!" + if [[ "$DEBUG" == [Yy1]* ]]; then + echo "Found download link: $iso_download_link" + echo "Link for ARM platform currently not available!" + fi return 1 fi ;; esac From 4871a1e61b3be01700d73ad7bc2ef8857eeaba2d Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 Oct 2025 00:02:03 +0200 Subject: [PATCH 7/9] feat: Create desktop shortcut to shared folder (#1447) --- assets/win10x64-enterprise-eval.xml | 5 +++++ assets/win10x64-enterprise.xml | 5 +++++ assets/win10x64-iot.xml | 5 +++++ assets/win10x64-ltsc.xml | 5 +++++ assets/win10x64.xml | 5 +++++ assets/win11x64-enterprise-eval.xml | 5 +++++ assets/win11x64-enterprise.xml | 5 +++++ assets/win11x64-iot.xml | 5 +++++ assets/win11x64-ltsc.xml | 5 +++++ assets/win11x64.xml | 5 +++++ assets/win2008r2-eval.xml | 5 +++++ assets/win2008r2.xml | 5 +++++ assets/win2012r2-eval.xml | 5 +++++ assets/win2012r2.xml | 5 +++++ assets/win2016-eval.xml | 6 ++++++ assets/win2016.xml | 6 ++++++ assets/win2019-eval.xml | 6 ++++++ assets/win2019-hv.xml | 6 ++++++ assets/win2019.xml | 5 +++++ assets/win2022-eval.xml | 6 ++++++ assets/win2022.xml | 6 ++++++ assets/win2025-eval.xml | 6 ++++++ assets/win2025.xml | 5 +++++ assets/win7x64-enterprise-eval.xml | 5 +++++ assets/win7x64-enterprise.xml | 5 +++++ assets/win7x64-ultimate.xml | 5 +++++ assets/win7x64.xml | 5 +++++ assets/win7x86-enterprise.xml | 5 +++++ assets/win7x86-ultimate.xml | 5 +++++ assets/win7x86.xml | 5 +++++ assets/win81x64-enterprise-eval.xml | 6 ++++++ assets/win81x64-enterprise.xml | 5 +++++ assets/win81x64.xml | 5 +++++ assets/winvistax64-enterprise.xml | 5 +++++ assets/winvistax64-ultimate.xml | 6 ++++++ assets/winvistax64.xml | 6 ++++++ assets/winvistax86-enterprise.xml | 6 ++++++ assets/winvistax86-ultimate.xml | 5 +++++ assets/winvistax86.xml | 6 ++++++ 39 files changed, 207 insertions(+) diff --git a/assets/win10x64-enterprise-eval.xml b/assets/win10x64-enterprise-eval.xml index 05a0437..7ea00ef 100644 --- a/assets/win10x64-enterprise-eval.xml +++ b/assets/win10x64-enterprise-eval.xml @@ -420,6 +420,11 @@ 22 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64-enterprise.xml b/assets/win10x64-enterprise.xml index 742a6d9..733d1ec 100644 --- a/assets/win10x64-enterprise.xml +++ b/assets/win10x64-enterprise.xml @@ -423,6 +423,11 @@ 22 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64-iot.xml b/assets/win10x64-iot.xml index 05ffaf5..01534bb 100644 --- a/assets/win10x64-iot.xml +++ b/assets/win10x64-iot.xml @@ -429,6 +429,11 @@ 22 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64-ltsc.xml b/assets/win10x64-ltsc.xml index 8700e26..e0e6c98 100644 --- a/assets/win10x64-ltsc.xml +++ b/assets/win10x64-ltsc.xml @@ -426,6 +426,11 @@ 22 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win10x64.xml b/assets/win10x64.xml index d863512..08e8c79 100644 --- a/assets/win10x64.xml +++ b/assets/win10x64.xml @@ -423,6 +423,11 @@ 22 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 23 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-enterprise-eval.xml b/assets/win11x64-enterprise-eval.xml index ea321ad..ae3384a 100644 --- a/assets/win11x64-enterprise-eval.xml +++ b/assets/win11x64-enterprise-eval.xml @@ -458,6 +458,11 @@ 25 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 26 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-enterprise.xml b/assets/win11x64-enterprise.xml index e76caad..a9a192b 100644 --- a/assets/win11x64-enterprise.xml +++ b/assets/win11x64-enterprise.xml @@ -461,6 +461,11 @@ 25 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 26 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-iot.xml b/assets/win11x64-iot.xml index ae4282d..5a1b8ae 100644 --- a/assets/win11x64-iot.xml +++ b/assets/win11x64-iot.xml @@ -461,6 +461,11 @@ 25 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 26 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64-ltsc.xml b/assets/win11x64-ltsc.xml index bc27ec0..8e4a969 100644 --- a/assets/win11x64-ltsc.xml +++ b/assets/win11x64-ltsc.xml @@ -461,6 +461,11 @@ 25 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 26 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win11x64.xml b/assets/win11x64.xml index 53e73bb..76e7a79 100644 --- a/assets/win11x64.xml +++ b/assets/win11x64.xml @@ -461,6 +461,11 @@ 25 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 26 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2008r2-eval.xml b/assets/win2008r2-eval.xml index 84467bd..f946b41 100644 --- a/assets/win2008r2-eval.xml +++ b/assets/win2008r2-eval.xml @@ -290,6 +290,11 @@ 20 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2008r2.xml b/assets/win2008r2.xml index 9ab119f..df194be 100644 --- a/assets/win2008r2.xml +++ b/assets/win2008r2.xml @@ -293,6 +293,11 @@ 20 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 21 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2012r2-eval.xml b/assets/win2012r2-eval.xml index 84bf8be..f2f85ab 100644 --- a/assets/win2012r2-eval.xml +++ b/assets/win2012r2-eval.xml @@ -308,6 +308,11 @@ 17 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2012r2.xml b/assets/win2012r2.xml index 5eef789..a6560aa 100644 --- a/assets/win2012r2.xml +++ b/assets/win2012r2.xml @@ -311,6 +311,11 @@ 17 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2016-eval.xml b/assets/win2016-eval.xml index 45c1d82..ddaf919 100644 --- a/assets/win2016-eval.xml +++ b/assets/win2016-eval.xml @@ -328,6 +328,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -335,3 +340,4 @@ + diff --git a/assets/win2016.xml b/assets/win2016.xml index 019cd1c..398763c 100644 --- a/assets/win2016.xml +++ b/assets/win2016.xml @@ -331,6 +331,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -338,3 +343,4 @@ + diff --git a/assets/win2019-eval.xml b/assets/win2019-eval.xml index e6db2d9..c518e92 100644 --- a/assets/win2019-eval.xml +++ b/assets/win2019-eval.xml @@ -332,6 +332,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -339,3 +344,4 @@ + diff --git a/assets/win2019-hv.xml b/assets/win2019-hv.xml index bb87975..68c10cf 100644 --- a/assets/win2019-hv.xml +++ b/assets/win2019-hv.xml @@ -337,6 +337,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -344,3 +349,4 @@ + diff --git a/assets/win2019.xml b/assets/win2019.xml index 5051f9f..0e7faea 100644 --- a/assets/win2019.xml +++ b/assets/win2019.xml @@ -335,6 +335,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win2022-eval.xml b/assets/win2022-eval.xml index a4ed208..e29daef 100644 --- a/assets/win2022-eval.xml +++ b/assets/win2022-eval.xml @@ -332,6 +332,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -339,3 +344,4 @@ + diff --git a/assets/win2022.xml b/assets/win2022.xml index 71c07c9..cb54e5f 100644 --- a/assets/win2022.xml +++ b/assets/win2022.xml @@ -335,6 +335,11 @@ 21 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 22 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -342,3 +347,4 @@ + diff --git a/assets/win2025-eval.xml b/assets/win2025-eval.xml index ff7f7fa..083812e 100644 --- a/assets/win2025-eval.xml +++ b/assets/win2025-eval.xml @@ -347,6 +347,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -354,3 +359,4 @@ + diff --git a/assets/win2025.xml b/assets/win2025.xml index c67965f..bbee67f 100644 --- a/assets/win2025.xml +++ b/assets/win2025.xml @@ -350,6 +350,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-enterprise-eval.xml b/assets/win7x64-enterprise-eval.xml index 85b69e4..69ef032 100644 --- a/assets/win7x64-enterprise-eval.xml +++ b/assets/win7x64-enterprise-eval.xml @@ -274,6 +274,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-enterprise.xml b/assets/win7x64-enterprise.xml index 84c873e..ef5873d 100644 --- a/assets/win7x64-enterprise.xml +++ b/assets/win7x64-enterprise.xml @@ -278,6 +278,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64-ultimate.xml b/assets/win7x64-ultimate.xml index f17fb0e..679811f 100644 --- a/assets/win7x64-ultimate.xml +++ b/assets/win7x64-ultimate.xml @@ -278,6 +278,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x64.xml b/assets/win7x64.xml index be1f3a8..db6a87f 100644 --- a/assets/win7x64.xml +++ b/assets/win7x64.xml @@ -278,6 +278,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86-enterprise.xml b/assets/win7x86-enterprise.xml index e96e5a7..e7660ec 100644 --- a/assets/win7x86-enterprise.xml +++ b/assets/win7x86-enterprise.xml @@ -278,6 +278,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86-ultimate.xml b/assets/win7x86-ultimate.xml index ce81d12..f9486b5 100644 --- a/assets/win7x86-ultimate.xml +++ b/assets/win7x86-ultimate.xml @@ -278,6 +278,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win7x86.xml b/assets/win7x86.xml index 314c2ee..890d18d 100644 --- a/assets/win7x86.xml +++ b/assets/win7x86.xml @@ -278,6 +278,11 @@ 18 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 19 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win81x64-enterprise-eval.xml b/assets/win81x64-enterprise-eval.xml index f3a61e9..498e332 100644 --- a/assets/win81x64-enterprise-eval.xml +++ b/assets/win81x64-enterprise-eval.xml @@ -293,6 +293,11 @@ 17 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -300,3 +305,4 @@ + diff --git a/assets/win81x64-enterprise.xml b/assets/win81x64-enterprise.xml index bf927cc..cebab90 100644 --- a/assets/win81x64-enterprise.xml +++ b/assets/win81x64-enterprise.xml @@ -296,6 +296,11 @@ 17 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/win81x64.xml b/assets/win81x64.xml index 290e923..eb764dd 100644 --- a/assets/win81x64.xml +++ b/assets/win81x64.xml @@ -303,6 +303,11 @@ 17 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 18 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/winvistax64-enterprise.xml b/assets/winvistax64-enterprise.xml index 1e3709c..67e02fc 100644 --- a/assets/winvistax64-enterprise.xml +++ b/assets/winvistax64-enterprise.xml @@ -252,6 +252,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/winvistax64-ultimate.xml b/assets/winvistax64-ultimate.xml index cb1d1c1..cdd73eb 100644 --- a/assets/winvistax64-ultimate.xml +++ b/assets/winvistax64-ultimate.xml @@ -252,6 +252,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -259,3 +264,4 @@ + diff --git a/assets/winvistax64.xml b/assets/winvistax64.xml index 729e568..f2dc848 100644 --- a/assets/winvistax64.xml +++ b/assets/winvistax64.xml @@ -252,6 +252,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -259,3 +264,4 @@ + diff --git a/assets/winvistax86-enterprise.xml b/assets/winvistax86-enterprise.xml index 66efdf3..2e8b3b3 100644 --- a/assets/winvistax86-enterprise.xml +++ b/assets/winvistax86-enterprise.xml @@ -252,6 +252,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -259,3 +264,4 @@ + diff --git a/assets/winvistax86-ultimate.xml b/assets/winvistax86-ultimate.xml index 5231d50..0cb6857 100644 --- a/assets/winvistax86-ultimate.xml +++ b/assets/winvistax86-ultimate.xml @@ -252,6 +252,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists diff --git a/assets/winvistax86.xml b/assets/winvistax86.xml index ef0ed47..c3a2302 100644 --- a/assets/winvistax86.xml +++ b/assets/winvistax86.xml @@ -252,6 +252,11 @@ 23 + cmd /C mklink /d %userprofile%\Desktop\Shared \\host.lan\Data + Create desktop shortcut to shared folder + + + 24 cmd /C if exist "C:\OEM\install.bat" start "Install" "cmd /C C:\OEM\install.bat" Execute custom script from the OEM folder if exists @@ -259,3 +264,4 @@ + From f29208af3f0a7d5fddc45f79b752bbf11f814484 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 Oct 2025 02:50:59 +0200 Subject: [PATCH 8/9] feat: Improved Samba logging (#1448) --- src/define.sh | 11 +++++++++-- src/samba.sh | 51 +++++++++++++++++++++++++++++---------------------- 2 files changed, 38 insertions(+), 24 deletions(-) diff --git a/src/define.sh b/src/define.sh index f14e330..6edc4bd 100644 --- a/src/define.sh +++ b/src/define.sh @@ -1777,11 +1777,18 @@ prepareInstall() { echo " Set oFile = Nothing" echo "End With" echo "" - } | unix2dos > "$dir/\$OEM\$/admin.vbs" + echo "Set oLink = WshShell.CreateShortcut(WshShell.ExpandEnvironmentStrings(\"%userprofile%\\Desktop\\Shared.lnk\"))" + echo "With oLink" + echo " .TargetPath = \"\\\\host.lan\\Data\"" + echo " .Save" + echo "End With" + echo "Set oLink = Nothing" + echo "" + } | unix2dos > "$dir/\$OEM\$/install.vbs" { echo "[COMMANDS]" echo "\"REGEDIT /s install.reg\"" - echo "\"Wscript admin.vbs\"" + echo "\"Wscript install.vbs\"" echo "" } | unix2dos > "$dir/\$OEM\$/cmdlines.txt" diff --git a/src/samba.sh b/src/samba.sh index b35307b..af68071 100644 --- a/src/samba.sh +++ b/src/samba.sh @@ -5,6 +5,8 @@ set -Eeuo pipefail : "${SAMBA_DEBUG:="N"}" # Disable debug : "${SAMBA_LEVEL:="1"}" # Debug log level +rm -rf /var/run/wsdd.pid + [[ "$SAMBA" == [Nn]* ]] && return 0 [[ "$NETWORK" == [Nn]* ]] && return 0 @@ -40,18 +42,18 @@ addShare() { echo " For support visit $SUPPORT" echo "--------------------------------------------------------" echo "" - echo "Using this folder you can share files with the host machine." + echo "Using this folder you can exchange files with the host machine." echo "" - echo "To change its location, include the following bind mount in your compose file:" + echo "To select the folder you want to share, include the following bind mount in your compose file:" echo "" echo " volumes:" - echo " - \"/home/example:/${name,,}\"" + echo " - \"./example:/${name,,}\"" echo "" echo "Or in your run command:" echo "" - echo " -v \"/home/example:/${name,,}\"" + echo " -v \"\${PWD:-.}/example:/${name,,}\"" echo "" - echo "Replace the example path /home/example with the desired shared folder." + echo "Replace the example path ./example with your desired shared folder." echo "" } | unix2dos > "$dir/readme.txt" @@ -116,20 +118,20 @@ for dir in "${dirs[@]}"; do addShare "$dir" "$dir_name" "Shared $dir_name" || error "Failed to create shared folder for $dir!" done -# Try to fix Samba permissions +# Try to repair Samba permissions [ -d /run/samba/msg.lock ] && chmod -R 0755 /run/samba/msg.lock 2>/dev/null || : [ -d /var/log/samba/cores ] && chmod -R 0700 /var/log/samba/cores 2>/dev/null || : [ -d /var/cache/samba/msg.lock ] && chmod -R 0755 /var/cache/samba/msg.lock 2>/dev/null || : -if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then - if ! smbd; then - SAMBA_DEBUG="Y" - error "Samba daemon failed to start!" - fi +rm -f /var/log/samba/log.smbd + +if ! smbd -l /var/log/samba; then + SAMBA_DEBUG="Y" + error "Failed to start Samba daemon!" fi if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then - smbd -i -d "$SAMBA_LEVEL" --debug-stdout & + tail -fn +0 /var/log/samba/log.smbd & fi if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then @@ -137,15 +139,15 @@ if [[ "${BOOT_MODE:-}" == "windows_legacy" ]]; then # Enable NetBIOS on Windows 7 and lower [[ "$DEBUG" == [Yy1]* ]] && echo "Starting NetBIOS daemon..." - if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then - if ! nmbd; then - SAMBA_DEBUG="Y" - error "NetBIOS daemon failed to start!" - fi + rm -f /var/log/samba/log.nmbd + + if ! nmbd -l /var/log/samba; then + SAMBA_DEBUG="Y" + error "Failed to start NetBIOS daemon!" fi if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then - nmbd -i -d "$SAMBA_LEVEL" --debug-stdout & + tail -fn +0 /var/log/samba/log.nmbd & fi else @@ -153,10 +155,15 @@ else # Enable Web Service Discovery on Vista and up [[ "$DEBUG" == [Yy1]* ]] && echo "Starting Web Service Discovery daemon..." - if [[ "$SAMBA_DEBUG" != [Yy1]* ]]; then - wsddn -i "$interface" -H "$hostname" --unixd --pid-file=/var/run/wsdd.pid - else - wsddn -i "$interface" -H "$hostname" --pid-file=/var/run/wsdd.pid & + rm -f /var/log/wsddn.log + + if ! wsddn -i "$interface" -H "$hostname" --unixd --log-file=/var/log/wsddn.log --pid-file=/var/run/wsdd.pid; then + SAMBA_DEBUG="Y" + error "Failed to start WSDDN daemon!" + fi + + if [[ "$SAMBA_DEBUG" == [Yy1]* ]]; then + tail -fn +0 /var/log/wsddn.log & fi fi From 4cd2a9c70b351f512db5d93ae415411cbc8a3ae0 Mon Sep 17 00:00:00 2001 From: Kroese Date: Fri, 3 Oct 2025 03:13:12 +0200 Subject: [PATCH 9/9] docs: Document new file sharing method (#1449) --- readme.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index ede4afa..50a66b4 100644 --- a/readme.md +++ b/readme.md @@ -143,19 +143,16 @@ kubectl apply -f https://raw.githubusercontent.com/dockur/windows/refs/heads/mas ### How do I share files with the host? - Open 'File Explorer' and click on the 'Network' section, you will see a computer called `host.lan`. + After installation there will be a folder called `Shared` on your desktop, which can be used to exchange files with the host machine. - Double-click it and it will show a folder called `Data`, which can be bound to any folder on your host via the compose file: + To select a folder on the host for this purpose, include the following bind mount in your compose file: ```yaml volumes: - - ./example:/data + - ./example:/shared ``` - The example folder `./example` will be available as ` \\host.lan\Data`. - -> [!TIP] -> You can map this path to a drive letter in Windows, for easier access. + Replace the example path `./example` with your desired shared folder, which then will become visible as `Shared`. ### How do I change the amount of CPU or RAM?