[debian-edu-commits] [Git][debian-edu/debian-edu-config][master] 32 commits: debian-edu-ltsp-initrd: Drop support for creating LTSP image from Main-Server installation.
Mike Gabriel (@sunweaver)
gitlab at salsa.debian.org
Thu Nov 12 08:11:53 GMT 2026
Mike Gabriel pushed to branch master at Debian Edu / debian-edu-config
Commits:
28ef6806 by Mike Gabriel at 2026-11-10T19:34:50+01:00
debian-edu-ltsp-initrd: Drop support for creating LTSP image from Main-Server installation.
- - - - -
ef63f1f0 by Mike Gabriel at 2026-11-10T19:35:41+01:00
debian-edu-ltsp-install: Adjust pretty name of IPXE_DLW_IMG in iPXE boot menu
- - - - -
a7ee613a by Mike Gabriel at 2026-11-10T19:37:19+01:00
debian-edu-ltsp-install: Drop support for creating an LTSP image from the Main-Server's host filesystem
- - - - -
e9b63682 by Mike Gabriel at 2026-11-11T20:02:22+01:00
debian-edu-ltsp-install: Move all logic for creating ltsp.img initrd image to debian-edu-ltsp-initrd script
- - - - -
b4e47bfd by Mike Gabriel at 2026-11-11T20:02:22+01:00
debian-edu-ltsp-install: Unmount BD/DVD/CDrom as soon as possible
- - - - -
e4181827 by Mike Gabriel at 2026-11-11T20:02:22+01:00
debian-edu-ltsp-install: Move 'ltsp kernel' command to the end of the script
- - - - -
6e4c3a9b by Mike Gabriel at 2026-11-11T21:07:36+01:00
debian-edu-{pxeinstall,ltsp-install,ltsp-ipxe}: Move all ltsp.ipxe generation logic into debian-edu-ltsp-ipxe script
(Closes: #1153608).
- - - - -
4592f328 by Mike Gabriel at 2026-11-11T21:07:47+01:00
run-at-firstboot: Default to X2Go's minidesktop thinclient variant on LTSP-Servers.
- - - - -
c6378e01 by Mike Gabriel at 2026-11-11T21:07:47+01:00
sbin/debian-edu-pxeinstall: white-space fixes only
- - - - -
0ac8a4c3 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-*: Update copyright/author notices.
- - - - -
b3150039 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-chroot: Configure resolv.conf when entering an LTSP chroot. (Closes: #1153757).
- - - - -
a94f6ea2 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-chroot: Gracefully mount/unmount Debian Edu BD ISO image into chroot if configured and media is inserted. (Closes: #1153756).
- - - - -
05e77c30 by Mike Gabriel at 2026-11-11T21:07:47+01:00
sbin/debian-edu-ltsp-chroot: white-space fix only
- - - - -
87919a8f by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-initrd: Move entire logic for generating the ltsp.img (containing most of LTSP code and config) into this script.
- - - - -
db28e220 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-initrd: For bare X2Go thinclient variant, use --thinclient option in X2GoClient commandline.
This enables display manager code in X2Go Client and it will amongst
others make the X2Go Client main window stretch across the whole screen.
(Closes: #1153651).
- - - - -
b68f1879 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-install: indentation fixes, add additional line (white-space only)
- - - - -
28095cf2 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-install: Rephrase iPXE boot menu items.
- - - - -
acc55067 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-install: Only create /etc/ltsp/ltsp.conf if not present yet.
- - - - -
7b336af8 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-install: Adopt timezone in LTSP chroots from host. (Closes: #1153741).
- - - - -
17bd7375 by Mike Gabriel at 2026-11-11T21:07:47+01:00
debian-edu-ltsp-install: Fix typo in cmdline option parser. (Closes: #1153762).
- - - - -
81e1f707 by Mike Gabriel at 2026-11-11T21:31:46+01:00
debian-edu-ltsp-install: Move locale generation to the top of the chroot creation process to get rid of Perl's locale complaints.
- - - - -
037481b5 by Mike Gabriel at 2026-11-11T21:31:46+01:00
debian-edu-ltsp-install: Don't over-install LTSP chroots if already created. (Closes: #1153763).
- - - - -
38991bb5 by Mike Gabriel at 2026-11-11T21:31:46+01:00
debian-edu-ltsp-install: Only update kernel of created chroot, don't touch the others.
- - - - -
fbf0cc34 by Mike Gabriel at 2026-11-11T21:31:46+01:00
debian-edu-ltsp-install: Use apt-get instead of apt (no cmdline API guarantee for apt).
Also, stop using -qq. It will hide mistakes which we may want to notice rather.
- - - - -
f0e0f35a by Mike Gabriel at 2026-11-12T08:48:01+01:00
debian-edu-ltsp-install: Stop installing ltsp into the LTSP chroot, not needed.
Instead install the minimal dependencies needed by LTSP's client code:
systemd-sysv, busybox and iproute2.
The whole LTSP client code is injected into the LTSP chroot via the LTSP
initrd file ltsp.img via the kernel cmdline. That said, no matter what
chroot gets booted via PXE, the LTSP client will always use the ltsp
code that is installed on the host.
Further readings: LTSP documentation.
- - - - -
60e86dfb by Mike Gabriel at 2026-11-12T08:48:32+01:00
debian-edu-ltsp-install: Stop installing apt-utils, nowadays replaced by apt.
- - - - -
fbf08be3 by Mike Gabriel at 2026-11-12T08:55:04+01:00
debian-edu-ltsp-install: Run apt-get update && apt-get upgrade to have latest updates
If a BD installation medium is used, debootstrap installs all packages
from that medium. If we are not offline, we want to ensure that security
updates get added to the chroot for those packages that got installed
from the installation medium.
- - - - -
191f0f90 by Mike Gabriel at 2026-11-12T08:55:04+01:00
debian-edu-ltsp-install: Simplify check for when to create a thinclient LTSP chroot.
- - - - -
7e625bc4 by Mike Gabriel at 2026-11-12T08:55:04+01:00
debian-edu-ltsp-install: Add more Debian branding to X2Go thinclients. (Closes: #1153764).
- - - - -
75144cc3 by Mike Gabriel at 2026-11-12T08:55:04+01:00
debian-edu-ltsp-ipxe: Add background image to iPXE boot menu (if the iPXE version supports it). (Closes: #1153755).
- - - - -
e5a74d59 by Mike Gabriel at 2026-11-12T08:55:04+01:00
d/changelog: update from Git history
- - - - -
8f5e2d07 by Mike Gabriel at 2026-11-12T08:55:04+01:00
share/debian-edu-config/squid.conf: Comment out 'dns_v4_first on'
... as it throws verbose obsoletion warnings in the logs (mentioning
that this config will have no effect anymore anyway).
Also, add a FIXME reminder, because we might have to reinvestigate this
deeper.
(Closes: #1153771).
- - - - -
11 changed files:
- Makefile
- debian/changelog
- + etc/debian-edu/thin/x2gothinclient-minidesktop_start
- + etc/debian-edu/thin/x2gothinclient_sessions.in
- sbin/debian-edu-ltsp-chroot
- sbin/debian-edu-ltsp-initrd
- sbin/debian-edu-ltsp-install
- sbin/debian-edu-ltsp-ipxe
- sbin/debian-edu-pxeinstall
- share/debian-edu-config/squid.conf
- share/debian-edu-config/tools/run-at-firstboot
Changes:
=====================================
Makefile
=====================================
@@ -99,6 +99,8 @@ SYSCONFFILES = \
dconf/profile/user \
debian-edu/nightkill.conf \
debian-edu/pxeinstall.conf \
+ debian-edu/thin/x2gothinclient_sessions.in \
+ debian-edu/thin/x2gothinclient-minidesktop_start \
default/munin-node \
default/ldap2zone \
chromium/policies/managed/chromium-networked-prefs \
=====================================
debian/changelog
=====================================
@@ -1,3 +1,61 @@
+debian-edu-config (2.13.10) UNRELEASED; urgency=medium
+
+ * run-at-firstboot: Default to X2Go's minidesktop thinclient variant on
+ - LTSP-Servers.
+ * debian-edu-ltsp-initrd:
+ - Drop support for creating LTSP image from Main-Server installation.
+ - Move entire logic for generating the ltsp.img (containing most of
+ LTSP code and config) into this script.
+ - For bare X2Go thinclient variant, use --thinclient option in X2GoClient
+ commandline. This enables display manager code in X2Go Client and it will
+ amongst others make the X2Go Client main window stretch across the whole
+ screen. (Closes: #1153651).
+ * debian-edu-ltsp-install:
+ - Drop support for creating an LTSP image from the Main-Server's host
+ filesystem.
+ - Move all logic for creating ltsp.img initrd image to debian-edu-ltsp-
+ initrd script
+ - Unmount BD/DVD/CDrom as soon as possible
+ - debian-edu-{pxeinstall,ltsp-install,ltsp-ipxe}: Move all ltsp.ipxe
+ generation logic into debian-edu-ltsp-ipxe script. (Closes: #1153608).
+ - Rephrase iPXE boot menu items.
+ - Only create /etc/ltsp/ltsp.conf if not present yet.
+ - Adopt timezone in LTSP chroots from host. (Closes: #1153741).
+ - Fix typo in cmdline option parser. (Closes: #1153762).
+ - Move locale generation to the top of the chroot creation process to get
+ rid of Perl's locale complaints.
+ - Don't over-install LTSP chroots if already created. (Closes: #1153763).
+ - Only update kernel of created chroot, don't touch the others.
+ - Use apt-get instead of apt (no cmdline API guarantee for apt).
+ Also, stop using -qq. It will hide mistakes which we may want to notice
+ rather.
+ - Stop installing ltsp into the LTSP chroot, not needed. The whole LTSP
+ client code is injected into the LTSP chroot via the LTSP initrd file
+ ltsp.img via the kernel cmdline. That said, no matter what chroot gets
+ booted via PXE, the LTSP client will always use the ltsp code that is
+ installed on the host. Further readings: LTSP documentation.
+ - Run apt-get update && apt-get upgrade to have latest updates.
+ If a BD installation medium is used, debootstrap installs all packages
+ from that medium. If we are not offline, we want to ensure that security
+ updates get added to the chroot for those packages that got installed
+ from the installation medium.
+ - Simplify check for when to create a thinclient LTSP chroot.
+ - Add more Debian branding to X2Go thinclients. (Closes: #1153764).
+ * debian-edu-ltsp-chroot:
+ - Gracefully mount/unmount Debian Edu BD ISO image into chroot if configured
+ and media is inserted. (Closes: #1153756).
+ - Configure resolv.conf when entering an LTSP chroot. (Closes: #1153757).
+ * debian-edu-ltsp-ipxe:
+ - Add background image to iPXE boot menu (if the iPXE version supports it).
+ (Closes: #1153755).
+ * debian-edu-ltsp-*:
+ - Update copyright/author notices.
+ - White-space fixes.
+ - Indentation fixes.
+ - Add additional lines here and there.
+
+ -- Mike Gabriel <sunweaver at debian.org> Wed, 11 Nov 2026 21:09:23 +0100
+
debian-edu-config (2.13.9) unstable; urgency=medium
* run-at-firstboot:
=====================================
etc/debian-edu/thin/x2gothinclient-minidesktop_start
=====================================
@@ -0,0 +1,37 @@
+#!/bin/bash
+
+# Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org
+# Oleksandr Shneyder <o.shneyder at phoca-gmbh.de>
+# Moritz 'Morty' Struebe <Moritz.Struebe at informatik.uni-erlangen.de>
+# Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+
+# X2Go is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# X2Go is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the
+# Free Software Foundation, Inc.,
+# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# make sure pulseaudio can be reached via TCP from the X2Go Server side...
+/usr/bin/pactl 'load-module' 'module-native-protocol-tcp' 'auth-ip-acl=127.0.0.1;::1'
+
+/usr/lib/x2go/x2goclient --no-menu \
+ --maximize \
+ --link=lan \
+ --kbd-type=auto \
+ --set-kbd=1 \
+ --geometry=fullscreen \
+ --background=/usr/share/desktop-base/active-theme/login/background-nologo.svg
+ --read-exports-from=~/export \
+ --no-session-edit \
+ --close-disconnect \
+ --session=X2Go.Example \
+ --add-to-known-hosts
=====================================
etc/debian-edu/thin/x2gothinclient_sessions.in
=====================================
@@ -0,0 +1,46 @@
+[default]
+autologin=false
+clipboard=both
+command=@X2GO_COMMAND@
+defsndport=true
+directrdp=false
+directrdpsettings=
+directxdmcp=false
+directxdmcpsettings=
+display=1
+dpi=96
+export="/usb0:1;"
+fstunnel=true
+fullscreen=true
+height=600
+host=@HOSTNAME@
+icon=/usr/share/icons/hicolor/64x64/apps/x2goclient.png
+iconvfrom=UTF-8
+iconvto=UTF-8
+krbdelegation=false
+krblogin=false
+maxdim=false
+multidisp=false
+name=Debian Edu Terminal Server
+pack=16m-jpeg
+print=true
+published=false
+quality=9
+rootless=false
+setdpi=true
+sndport=4713
+sound=true
+soundsystem=pulse
+soundtunnel=true
+speed=4
+sshport=22
+sshproxyautologin=false
+startsoundsystem=true
+type=auto
+useiconv=false
+usekbd=true
+usesshproxy=false
+width=800
+xdmcpclient=Xnest
+xdmcpserver=localhost
+xinerama=false
=====================================
sbin/debian-edu-ltsp-chroot
=====================================
@@ -4,18 +4,26 @@
# with package 'ltsp-server 5.18.12-3' (Debian Buster).
# Original information about authors and copyright:
-# copyright 2009 Vagrant Cascadian <vagrant at freegeek.org>,
+#
+# 2009 Vagrant Cascadian <vagrant at freegeek.org>,
# 2010 Alkis Georgopoulos <alkisg at gmail.com>,
-# 2011 Wim Muskee <wimmuskee at gmail.com>, distributed under the
-# terms of the GNU General Public License v2 or any later version.
+# 2011 Wim Muskee <wimmuskee at gmail.com>,
+#
+# distributed under the terms of the GNU General Public License v2 or any
+# later version.
# Reduced to the bare minimum and adjusted to be useful for Debian Edu Bullseye.
# Also, integrated everything into one tool to be usable standalone.
+#
# 2021 Wolfgang Schweer <wschweer at arcor.de>, distributed under the
+#
# terms of the GNU General Public License v2 or any later version.
-# first edited: 2020-09-28
+# first edited: 2020-09-28
+#
+# Updated by 2026, Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+# to be released with Debian Edu Trixie.
-version=2023-01-30
+version=2026-11-11
# generic functions
@@ -57,12 +65,33 @@ pre_chroot() {
if boolean_is_true "$MOUNT_PROC"; then
mark_mount -t proc proc "$BASE/proc"
fi
+
+ # If the BD ISO image was used and it is still inserted, ensure that it is mounted.
+ if grep -q BD /etc/apt/sources.list && ! mountpoint -q /media/cdrom ; then
+ if mark_mount -o ro /media/cdrom 2>/dev/null; then
+ bd_iso_was_mounted="yes"
+ fi
+ fi
+
+ # If the BD ISO image is used, make it available inside the chroot, so that as many
+ # packages as possible are obtained from the BD image instead of downloading them.
+ if grep -q BD /etc/apt/sources.list && [ -e /media/cdrom/.disk/cd_type ] ; then
+ mkdir -p "${BASE}/media/cdrom"
+ mark_mount --bind /media/cdrom "${BASE}/media/cdrom"
+ fi
+
+ if [ ! -e "${BASE}/etc/resolv.conf" ]; then
+ RESOLVCONF_NOTFOUND=true
+ cp /etc/resolv.conf "${BASE}/etc/resolv.conf"
+ fi
+
}
post_chroot() {
# Stop trapping
trap - 0 HUP INT QUIT KILL SEGV PIPE TERM
umount_marked
+ cleanup_resolvconf
}
# Next functions are taken from ltsp-server-functions).
@@ -114,7 +143,7 @@ $MARKED_MOUNTS"
fi
if ! mount "$@"; then
MARKED_MOUNTS="$old_marked_mounts"
- die "Could not mount $dir."
+ warn "Could not mount $dir."
fi
}
@@ -138,7 +167,7 @@ umount_marked() {
sync
echo "$MARKED_MOUNTS" | while read -r dir; do
# binfmt_misc might need to be unmounted manually, see LP #534211
- if [ "$dir%/proc}" != "$dir" ] &&
+ if [ "$dir%/proc}" != "$dir" ] &&
[ -d "$dir/sys/fs/binfmt_misc" ] && [ -f "$dir/mounts" ] &&
grep -q "^binfmt_misc $dir/sys/fs/binfmt_misc" "$dir/mounts"; then
if ! umount "$dir/sys/fs/binfmt_misc"; then
@@ -152,6 +181,12 @@ umount_marked() {
unset MARKED_MOUNTS
}
+cleanup_resolvconf() {
+ if boolean_is_true "${RESOLVCONF_NOTFOUND}"; then
+ rm "${BASE}/etc/resolv.conf"
+ fi
+}
+
# The command line parameters override the configuration file settings
if ! args=$(getopt -n "$0" -o +a:b:dhmp -l \
'base:,mount-dev,help,mount-all,mount-proc,version' -- "$@"); then
=====================================
sbin/debian-edu-ltsp-initrd
=====================================
@@ -1,11 +1,12 @@
#!/bin/bash
#
# Debian Edu specific replacement for 'ltsp initrd' command.
-# Author/Copyright: Wolfgang Schweer <wschweer at arcor.de>
+# Author/Copyright: 2021-2023, Wolfgang Schweer <wschweer at arcor.de>
+# Author/Copyright: 2026, Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
# Licence: GPL2+
-# first edited: 2021-11-10
+# first edited: 2021-11-10
-version=2021-11-11
+version=2026-11-11
set -e
@@ -22,21 +23,119 @@ Options:
EOF
}
+thin_prepare() {
+ type="${1}"
+
+ if [ "${type}" = "bare" ]; then
+ # Needed for thin client auto login user.
+ mkdir -p /etc/ltsp/getty at tty1.service.d
+ cat <<EOF > /etc/ltsp/getty at tty1.service.d/override.conf
+[Service]
+ExecStart=
+ExecStart=-/usr/sbin/agetty -a thin --noclear %I $TERM
+RestartSec=10
+EOF
+
+ # Needed for thin client autofs setup (USB mass storage support (rw mode).
+ mkdir -p /etc/ltsp/autofs
+ cat <<EOF > /etc/ltsp/autofs/extra.autofs
+/- /etc/auto.usb0 --mode=0777 --timeout=3
+EOF
+ cat <<EOF > /etc/ltsp/autofs/auto.usb0
+/usb0 -fstype=auto,rw,user,umask=000 :/dev/sda1
+EOF
+
+ # Needed for thin client auto login configuration (startx).
+ mkdir -p /etc/ltsp/skel
+ cat <<EOF > /etc/ltsp/skel/.profile
+while true ; do
+ startx
+done
+EOF
+
+ # Needed for thin client auto login configuration (x2goclient start).
+ cat <<EOF > /etc/ltsp/skel/.xinitrc
+exec x2goclient --no-menu --thinclient --background=/usr/share/desktop-base/active-theme/login/background-nologo.svg --add-to-known-hosts --no-session-edit --close-disconnect
+EOF
+
+ # Needed for thin client x2goclient configuration.
+ mkdir -p /etc/ltsp/skel/.x2goclient
+
+ # Pick up x2go_desktop variabe from debian-edu-ltsp-install script run.
+ if [ -r "/var/lib/debian-edu/debian-edu-ltsp-initrd_x2go-command" ]; then
+ x2go_command="$(head -n1 "/var/lib/debian-edu/debian-edu-ltsp-initrd_x2go-command")"
+ fi
+ if [ -z "${x2go_command}" ]; then
+ # helpless fallback that nearly always works in X2Go
+ x2go_command=TERMINAL
+ fi
+
+ # Needed for thin client (x2goclient preconfigured session).
+ cat /etc/debian-edu/thin/x2gothinclient_sessions.in \
+ | sed -e "s/@HOSTNAME@/$(hostname -s)/g" \
+ -e "s/@X2GO_COMMAND@/${x2go_command}/g" \
+ > /etc/ltsp/skel/.x2goclient/sessions
+
+ # Needed for thin client x2goclient configuration.
+ cat <<EOF > /etc/ltsp/skel/.x2goclient/settings
+[toolbar]
+show=false
+EOF
+
+ # Needed for thin client x2goclient configuration.
+ cat <<EOF > /etc/ltsp/skel/.x2goclient/printing
+[General]
+pdfview=false
+showdialog=true
+
+[CUPS]
+defaultprinter=
+
+[print]
+command=lpr
+ps=false
+startcmd=false
+stdin=false
+
+[view]
+command=xpdf
+open=true
+EOF
+
+ fi
+
+}
+
+thin_cleanup() {
+ type="${1}"
+
+ if [ "${type}" = "bare" ]; then
+ rm -f /etc/ltsp/getty at tty1.service.d/override.conf
+ rmdir /etc/ltsp/getty at tty1.service.d
+ rm -Rf /etc/ltsp/autofs
+ fi
+
+ rm -Rf /etc/ltsp/skel
+}
+
thin() {
- type="$1"
+ type="${1}"
+ arch="${2}"
# Add specific configuration.
- cat <<EOF >> /etc/ltsp/ltsp.conf
+ if [ "${type}" = "bare" ]; then
+ cat <<EOF >> /etc/ltsp/ltsp.conf
POST_INIT_THIN_USER='useradd -G disk -m -d /run/home/thin -k /etc/ltsp/skel -r thin'
POST_INIT_SYSTEMD='mkdir /etc/systemd/system/getty at tty1.service.d && \
cp /etc/ltsp/getty at tty1.service.d/override.conf /etc/systemd/system/getty at tty1.service.d'
POST_INIT_AUTOFS='cp /etc/ltsp/autofs/extra.autofs /etc/auto.master.d && \
cp /etc/ltsp/autofs/auto.* /etc'
EOF
+ fi
# Create the ltsp.img file and move it to the right location.
- echo "Updating LTSP initrd for $type:"
+ echo "Updating LTSP initrd for type: ${type}, arch: ${arch}:"
ltsp initrd
- mv /srv/tftp/ltsp/ltsp.img /srv/tftp/ltsp/"$type"/ltsp.img
- echo "Moved /srv/tftp/ltsp/ltsp.img to /srv/tftp/ltsp/$type/"
+ mv /srv/tftp/ltsp/ltsp.img "/srv/tftp/ltsp/x2go-${type}-${arch}/ltsp.img"
+ echo "Moved /srv/tftp/ltsp/ltsp.img to /srv/tftp/ltsp/x2go-${type}-${arch}/"
# Clean up ltsp.conf from image specific items.
sed -i '/POST_INIT/d' /etc/ltsp/ltsp.conf
@@ -62,23 +161,9 @@ EOF
server() {
# Add specific configuration.
- if echo "$PROFILE" | grep -Eq 'Main-Server' ; then
- # The image is a copy of the main server's fs. On the server, autofs
- # is disabled, but it is needed for diskless workstations.
- # OTOH some services need to be disabled, i.e. 'masked'.
- cat <<EOF >> /etc/ltsp/ltsp.conf
-PRE_INIT_AUTOFS="echo 'LDAPURI=ldap://ldap' >> /etc/default/autofs"
-PRE_INIT_MAIN_SERVER="systemctl enable autofs"
-POST_INIT_USE_FQDN="sed -i '/10.0.2.2/ s/server/tjener.intern tjener/' /etc/hosts"
-POST_INIT_SITESUMMARY="sed -i 's/main-server/ltsp-client/' /etc/sitesummary/hostclass"
-MASK_SYSTEM_SERVICES="apache2 named cups dovecot etckeeper exim4 squid tftpd-hpa \
-icinga2 nmbd slapd smbd systemd-journald xrdp xrdp-sesman krb5-kdc mariadb cfengine3 isc-dhcp-server"
-EOF
- else
- cat <<EOF >> /etc/ltsp/ltsp.conf
+ cat <<EOF >> /etc/ltsp/ltsp.conf
MASK_SYSTEM_SERVICES="etckeeper exim4 tftpd-hpa isc-dhcp-server xrdp xrdp-sesman"
EOF
- fi
# Update the ltsp.img file and move it to the right location.
echo "Updating LTSP initrd for use with the server's filesystem:"
ltsp initrd
@@ -91,8 +176,6 @@ EOF
fi
# Clean up ltsp.conf from specific items.
- sed -i '/PRE_INIT_MAIN/d' /etc/ltsp/ltsp.conf
- sed -i '/PRE_INIT_AUTOFS/d' /etc/ltsp/ltsp.conf
sed -i '/MASK_SYSTEM/d' /etc/ltsp/ltsp.conf
}
@@ -101,6 +184,11 @@ case "$1" in
--version) echo $version ; exit 0 ;;
esac
+if [ ! -r /etc/ltsp/ltsp.conf ]; then
+ echo "NOTE: debian-edu-ltsp-install needs to run first, before using debian-edu-ltsp-initrd makes any sense."
+ exit 0
+fi
+
# Make Debian Edu profile available.
if [ -r /etc/debian-edu/config ] ; then
. /etc/debian-edu/config
@@ -113,10 +201,17 @@ if [ -d "$BASE"/x86_64 ] || [ -d "$BASE"/x86_32 ]; then server ; fi
if [ -d "$BASE"/dlw ] ; then dlw ; fi
# X2Go thin client variants.
-variants="bare-amd64 display-amd64 desktop-amd64 bare-i386 display-i386 desktop-i386"
-
-for i in $variants ; do
- if [ -d $BASE/x2go-"$i" ] ; then thin x2go-"$i" ; fi
+variants="bare display desktop"
+archs="amd64"
+
+for v in ${variants}; do
+ for a in ${archs}; do
+ if [ -d "$BASE/x2go-${v}-${a}" ] ; then
+ thin_prepare "${v}"
+ thin "${v}" "${a}"
+ thin_cleanup "${v}"
+ fi
+ done
done
case "$1" in
=====================================
sbin/debian-edu-ltsp-install
=====================================
@@ -15,38 +15,48 @@
# The modified system provides a separate LTSP client network attached to eth1.
#
# Author/Copyright: Wolfgang Schweer <wschweer at arcor.de>
+# Author/Copyright: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
# Licence: GPL2+
# first edited: 2019-11-21
-version=2023-03-25
+version=2026-11-11
set -e
+get_timezone() {
+ if ! [ -L "$DPKG_ROOT/etc/localtime" ] ; then
+ return
+ fi
+ timezone="$(readlink "$DPKG_ROOT/etc/localtime")"
+ timezone="$(cd "$DPKG_ROOT/etc" && realpath -m -s "$timezone")"
+ echo "${timezone#/usr/share/zoneinfo/}"
+}
+
select_desktop () {
- # select the first found desktop as the default, based on what x2goclient
- # (src/onmainwindow.cpp) and x2goserver (x2goserver/bin/x2goruncommand)
- # support
- if [ -x /usr/bin/startxfce4 ]; then # from xfce4-session
- echo XFCE
- elif [ -x /usr/bin/startplasma-x11 ]; then # from plasma-workspace
- echo KDE
- elif [ -x /usr/bin/gnome-session ]; then # from gnome-session-bin
- echo GNOME
- elif [ -x /usr/bin/mate-session ]; then # from mate-session
- echo MATE
- elif [ -x /usr/bin/startlxde ]; then # from openbox-lxde-session
- echo LXDE
- elif [ -x /usr/bin/startlxqt ]; then # from lxqt-session
- echo LXQT
- elif [ -x /usr/bin/cinnamon-session-cinnamon2d ]; then # from cinnamon
- echo CINNAMON
- elif [ -x /usr/bin/openbox-session ]; then # from openbox
- echo OPENBOX
- elif [ -x /usr/bin/icewm-session ]; then # from icewm
- echo ICEWM
- else
- echo XFCE
- fi
+ # select the first found desktop as the default, based on what x2goclient
+ # (src/onmainwindow.cpp) and x2goserver (x2goserver/bin/x2goruncommand)
+ # support
+ if [ -x /usr/bin/startxfce4 ]; then # from xfce4-session
+ echo XFCE
+ elif [ -x /usr/bin/startplasma-x11 ]; then # from plasma-workspace
+ echo KDE
+ elif [ -x /usr/bin/gnome-session ]; then # from gnome-session-bin
+ echo GNOME
+ elif [ -x /usr/bin/mate-session ]; then # from mate-session
+ echo MATE
+ elif [ -x /usr/bin/startlxde ]; then # from openbox-lxde-session
+ echo LXDE
+ elif [ -x /usr/bin/startlxqt ]; then # from lxqt-session
+ echo LXQT
+ elif [ -x /usr/bin/cinnamon-session-cinnamon2d ]; then # from cinnamon
+ echo CINNAMON
+ elif [ -x /usr/bin/openbox-session ]; then # from openbox
+ echo OPENBOX
+ elif [ -x /usr/bin/icewm-session ]; then # from icewm
+ echo ICEWM
+ else
+ echo XFCE
+ fi
}
# usage
@@ -128,6 +138,7 @@ if grep -q / /etc/debian_version ; then
else
dist=$(lsb_release -sc)
fi
+
# Set default values.
arch="$(dpkg --print-architecture)"
dns_server="10.0.2.2"
@@ -159,7 +170,7 @@ while [ $# -gt 0 ] ; do
--dlw) dlw="$2" ; shift ;;
--img) img="$2" ; shift ;;
--desktop) desktop="$2" ; shift ;;
- --x2go_dektop)
+ --x2go_desktop)
x2go_desktop="$(printf '%s\n' "$2" | tr '[:lower:]' '[:upper:]')"
shift ;;
--version) echo $version; exit 0 ;;
@@ -167,6 +178,10 @@ while [ $# -gt 0 ] ; do
shift
done
+# Hand over the x2go_desktop (either detected automatically or specified via cmdline option)
+# to debian-edu-ltsp-initrd (needed for x2go-bare thinclient variant setup).
+echo "${x2go_desktop}" > "/var/lib/debian-edu/debian-edu-ltsp-initrd_x2go-command"
+
kernel_arch="$arch"
# Special case i386.
@@ -191,7 +206,9 @@ if [ ! -d /etc/ltsp/client ] ; then
# Debian Edu wants a greeter w/o user list, i.e. don't modify existing config.
touch /etc/ltsp/client/init/55-display-manager.sh
+fi
+if [ ! -r /etc/ltsp/ltsp.conf ]; then
# make ipxe menu entries more user friendly.
cat <<EOF > /etc/ltsp/ltsp.conf
# /bin/sh -n
@@ -200,60 +217,60 @@ if [ ! -d /etc/ltsp/client ] ; then
[server]
# Provide a full menu name for x2go-bare-amd64.img
-IPXE_X2GO_BARE_AMD64_IMG="Plain X2Go Thin Client (64-Bit)"
+IPXE_X2GO_BARE_AMD64_IMG="Plain X2Go Thin Client (amd64, SquashFS)"
# Provide a full menu name for x2go-bare-i386.img
-IPXE_X2GO_BARE_I386_IMG="Plain X2Go Thin Client (32-Bit)"
+IPXE_X2GO_BARE_I386_IMG="Plain X2Go Thin Client (i386, SquashFS)"
# Provide a full menu name for x2go-bare-amd64
-IPXE_X2GO_BARE_AMD64="Plain X2Go Thin Client (64-Bit, NFS rootfs)"
+IPXE_X2GO_BARE_AMD64="Plain X2Go Thin Client (amd64, NFS rootfs)"
# Provide a full menu name for x2go-bare-i386
-IPXE_X2GO_BARE_I386="Plain X2Go Thin Client (32-Bit, NFS rootfs)"
+IPXE_X2GO_BARE_I386="Plain X2Go Thin Client (i386, NFS rootfs)"
# Provide a full menu name for x2go-display-amd64.img
-IPXE_X2GO_DISPLAY_AMD64_IMG="Display Mode X2Go Thin Client (64-Bit)"
+IPXE_X2GO_DISPLAY_AMD64_IMG="Display Mode X2Go Thin Client (amd64, SquashFS)"
# Provide a full menu name for x2go-display-i386.img
-IPXE_X2GO_DISPLAY_I386_IMG="Display Mode X2Go Thin Client (32-Bit)"
+IPXE_X2GO_DISPLAY_I386_IMG="Display Mode X2Go Thin Client (i386, SquashFS)"
# Provide a full menu name for x2go-display-amd64
-IPXE_X2GO_DISPLAY_AMD64="Display Mode X2Go Thin Client (64-Bit, NFS rootfs)"
+IPXE_X2GO_DISPLAY_AMD64="Display Mode X2Go Thin Client (amd64, NFS rootfs)"
# Provide a full menu name for x2go-display-i386
-IPXE_X2GO_DISPLAY_I386="Display Mode X2Go Thin Client (32-Bit, NFS rootfs)"
+IPXE_X2GO_DISPLAY_I386="Display Mode X2Go Thin Client (i386, NFS rootfs)"
# Provide a full menu name for x2go-desktop-amd64.img
-IPXE_X2GO_DESKTOP_AMD64_IMG="Desktop Mode X2Go Thin Client (64-Bit)"
+IPXE_X2GO_DESKTOP_AMD64_IMG="Desktop Mode X2Go Thin Client (amd64, SquashFS)"
# Provide a full menu name for thin/desktop-i386.img
-IPXE_X2GO_DESKTOP_I386_IMG="Desktop Mode X2Go Thin Client (32-Bit)"
+IPXE_X2GO_DESKTOP_I386_IMG="Desktop Mode X2Go Thin Client (i386, SquashFS)"
# Provide a full menu name for x2go-desktop-amd64
-IPXE_X2GO_DESKTOP_AMD64="Desktop Mode X2Go Thin Client (64-Bit, NFS rootfs)"
+IPXE_X2GO_DESKTOP_AMD64="Desktop Mode X2Go Thin Client (amd64, NFS rootfs)"
# Provide a full menu name for thin/desktop-i386
-IPXE_X2GO_DESKTOP_I386="Desktop Mode X2Go Thin Client (32-Bit, NFS rootfs)"
+IPXE_X2GO_DESKTOP_I386="Desktop Mode X2Go Thin Client (i386, NFS rootfs)"
# Provide a full menu name for x86_64.img
-IPXE_X86_64_IMG="Diskless Workstation (server's SquashFS image)"
+IPXE_X86_64_IMG="Diskless Workstation (amd64, SquashFS)"
# Provide a full menu name for x86_32.img
-IPXE_X86_32_IMG="Diskless Workstation (32-Bit, server's SquashFS image)"
+IPXE_X86_32_IMG="Diskless Workstation (i386, SquashFS)"
# Provide a full menu name for dlw.img
-IPXE_DLW_IMG="Diskless Workstation (SquashFS image from chroot)"
+IPXE_DLW_IMG="Diskless Workstation (amd64, SquashFS)"
# Provide a full menu name for dlw
-IPXE_DLW="Diskless Workstation (Chroot as NFS rootfs)"
+IPXE_DLW="Diskless Workstation (amd64, NFS rootfs)"
##### Set default boot value ######
# Default value is x86_64 or x86_32 (arch specific, Diskless Workstation)
-# Plain X2Go Thin Client (64-Bit)
+# Plain X2Go Thin Client (amd64)
#DEFAULT_IMAGE="x2go-bare-amd64"
-# Plain X2Go Thin Client (32-Bit)
+# Plain X2Go Thin Client (i386)
#DEFAULT_IMAGE="x2go-bare-i386"
-# Display Mode X2Go Thin Client (64-Bit)
+# Display Mode X2Go Thin Client (amd64)
#DEFAULT_IMAGE="x2go-display-amd64"
-# Desktop Mode X2Go Thin Client (64-Bit)
+# Desktop Mode X2Go Thin Client (amd64)
#DEFAULT_IMAGE="x2go-desktop-amd64"
# Diskless Workstation (Chroot as NFS rootfs)
#DEFAULT_IMAGE="dlw"
-# Install Debian Edu/amd64 (64-Bit)
+# Install Debian Edu/amd64 (amd64)
#DEFAULT_IMAGE="amd64"
-# Install Debian Edu/i386 (32-Bit)
+# Install Debian Edu/i386 (i386)
#DEFAULT_IMAGE="i386"
##### Set default iPXE menu timeout ######
@@ -296,177 +313,6 @@ P910ND_START=1
EOF
fi
-# FIXME: On the main server even more additional excludes might be useful.
-if echo "$PROFILE" | grep -Eq 'Main-Server' ; then
- cat <<EOF >> /etc/ltsp/image-local.excludes
-etc/apache2
-etc/bind
-etc/dbconfig-common
-etc/dovecot
-etc/etckeeper
-etc/gosa
-etc/freeradius
-etc/icinga
-etc/icinga2
-etc/icingaweb2
-etc/krb5kdc
-etc/krb5.keytab.imap
-etc/krb5.keytab.ldap
-etc/krb5.keytab.smtp
-etc/mysql
-etc/nagios
-etc/nagios-plugins
-etc/nagios3
-etc/samba
-etc/slbackup
-etc/slbackup-php
-usr/lib/apache2
-usr/lib/exim4
-usr/lib/icinga
-usr/log/samba/*
-usr/log/squid/*
-var/cache/apache2/*
-var/cache/apt/*
-var/cache/bind/*
-var/cache/debconf/*
-var/cache/etckeeper/*
-var/cache/gosa/*
-var/cache/icinga/*
-var/cache/munin/*
-var/cache/nscd/*
-var/cache/samba/*
-var/lib/apache2/*
-var/lib/cfengine3/*
-var/lib/dbus/*
-var/lib/dhcp/*
-var/lib/dpkg/*
-var/lib/exim4/*
-var/lib/icinga/*
-var/lib/ldap/*
-var/lib/munin/*
-var/lib/munin-node/*
-var/lib/nfs/*
-var/lib/samba/*
-var/log/apache2/*
-var/log/cfengine/*
-var/log/installer/*
-var/log/munin/*
-var/log/samba/*
-var/log/squid/*
-var/mail/*
-var/log/*.gz
-var/spool/squid
-EOF
-fi
-
-# Needed for thin client auto login user.
-mkdir -p /etc/ltsp/getty at tty1.service.d
-cat <<EOF > /etc/ltsp/getty at tty1.service.d/override.conf
-[Service]
-ExecStart=
-ExecStart=-/usr/sbin/agetty -a thin --noclear %I $TERM
-RestartSec=10
-EOF
-
-# Needed for thin client autofs setup (USB mass storage support (rw mode).
-mkdir -p /etc/ltsp/autofs
-cat <<EOF > /etc/ltsp/autofs/extra.autofs
-/- /etc/auto.usb0 --mode=0777 --timeout=3
-EOF
-cat <<EOF > /etc/ltsp/autofs/auto.usb0
-/usb0 -fstype=auto,rw,user,umask=000 :/dev/sda1
-EOF
-
-# Needed for thin client auto login configuration (startx).
-mkdir -p /etc/ltsp/skel
-cat <<EOF > /etc/ltsp/skel/.profile
-while true ; do
- startx
-done
-EOF
-
-# Needed for thin client auto login configuration (x2goclient start).
-cat <<EOF > /etc/ltsp/skel/.xinitrc
-exec x2goclient --no-menu --add-to-known-hosts --no-session-edit --close-disconnect
-EOF
-
-# Needed for thin client x2goclient configuration.
-mkdir -p /etc/ltsp/skel/.x2goclient
-cat <<EOF > /etc/ltsp/skel/.x2goclient/printing
-[General]
-pdfview=false
-showdialog=true
-
-[CUPS]
-defaultprinter=
-
-[print]
-command=lpr
-ps=false
-startcmd=false
-stdin=false
-
-[view]
-command=xpdf
-open=true
-EOF
-
-# Needed for thin client (x2goclient preconfigured session).
-cat <<EOF > /etc/ltsp/skel/.x2goclient/sessions
-[default]
-autologin=false
-clipboard=both
-command=$x2go_desktop
-defsndport=true
-directrdp=false
-directrdpsettings=
-directxdmcp=false
-directxdmcpsettings=
-display=1
-dpi=96
-export="/usb0:1;"
-fstunnel=true
-fullscreen=true
-height=600
-host=$(hostname -s)
-icon=/usr/share/icons/hicolor/64x64/apps/x2goclient.png
-iconvfrom=ISO8859-1
-iconvto=UTF-8
-krbdelegation=false
-krblogin=false
-maxdim=false
-multidisp=false
-name=Debian Edu Thin Client
-pack=16m-jpeg
-print=true
-published=false
-quality=9
-rootless=false
-setdpi=true
-sndport=4713
-sound=true
-soundsystem=pulse
-soundtunnel=true
-speed=4
-sshport=22
-sshproxyautologin=false
-startsoundsystem=true
-type=auto
-useiconv=false
-usekbd=true
-usesshproxy=false
-width=800
-xdmcpclient=Xnest
-xdmcpserver=localhost
-xinerama=false
-EOF
-
-# Needed for thin client x2goclient configuration.
-cat <<EOF > /etc/ltsp/skel/.x2goclient/settings
-[toolbar]
-show=false
-EOF
-
# If the BD ISO image is used, ensure that it is mounted.
if grep -q BD /etc/apt/sources.list && ! mountpoint -q /media/cdrom ; then
bd_iso_was_mounted="yes"
@@ -482,15 +328,40 @@ fi
# Create thin client chroot and generate image.
export DEBIAN_FRONTEND=noninteractive
-if ! [ "" == "$thin_type" ] && [ ! -d /srv/tftp/ltsp/x2go-"$thin_type"-"$arch"/etc/ltsp ] ; then
+if [ "" != "$thin_type" ]; then
+
+ if [ -d "/srv/ltsp/x2go-${thin_type}-${arch}" ]; then
+ echo "ERROR: X2Go thinclient chroot '/srv/ltsp/x2go-${thin_type}-${arch}' already exists."
+ echo " Remove the chroot and re-run this script."
+ exit 1
+ fi
+
mkdir -p /srv/tftp/ltsp/x2go-"$thin_type"-"$arch"
# Install common thin client packages.
- debootstrap --arch="$arch" --no-check-gpg --variant=minbase --include=sitesummary-client,linux-image-"$kernel_arch" \
- "$dist" /srv/ltsp/x2go-"$thin_type"-"$arch" "$mirror"
+ debootstrap --arch="$arch" \
+ --no-check-gpg \
+ --variant=minbase \
+ --include=console-setup,locales,sitesummary-client,linux-image-"${kernel_arch}" \
+ "${dist}" "/srv/ltsp/x2go-${thin_type}-${arch}" "${mirror}"
# Unset temporary directory variables to avoid problems when directory
# is missing inside the chroot. https://bugs.debian.org/765443
unset TMPDIR TEMP TEMPDIR TMP
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt clean
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get clean
+
+ # Configure locale et al.
+ cp /etc/locale.gen /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/
+ cp /etc/default/locale /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/default
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch" locale-gen
+ cp /etc/default/keyboard /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/default
+ cp /etc/default/console-setup /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/default
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch" setupcon -k
+
+ # Set timezone properly.
+ timezone="$(get_timezone)"
+ echo "${timezone}" > "/srv/ltsp/x2go-${thin_type}-${arch}/etc/timezone"
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch" ln -fs "/usr/share/zoneinfo/${timezone}" "/etc/localtime"
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch" dpkg-reconfigure -f noninteractive tzdata
+
# Care for complete sources list (security, also nonfree -- in case firmware is needed).
if [ -e /srv/ltsp/x2go-"$thin_type"-"$arch"/usr/share/doc/apt/examples/sources.list ] ; then
# Up to bookworm
@@ -506,17 +377,22 @@ if ! [ "" == "$thin_type" ] && [ ! -d /srv/tftp/ltsp/x2go-"$thin_type"-"$arch"/e
mount /media/cdrom /srv/ltsp/x2go-"$thin_type"-"$arch"/media/cdrom -o bind
echo "deb [trusted=yes] $mirror $dist main" > /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/apt/sources.list
fi
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt -y -qq install education-thin-client p910nd
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get update
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get -y -q upgrade
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get -y -q install education-thin-client p910nd
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get -y -q install debian-edu-artwork
# Install case specific additional packages.
if [ "display" == "$thin_type" ] ; then
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt -y -qq install x2gothinclient-displaymanager
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get -y -q install x2gothinclient-displaymanager
+ cp /usr/share/desktop-base/active-theme/login/background-nologin.svg /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/x2go/x2gothinclient-displaymanager_background.svg
fi
if [ "desktop" == "$thin_type" ] ; then
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt -y -qq install x2gothinclient-minidesktop \
- x2gothinclient-cdmanager x2gothinclient-usbmount
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get -y -q install x2gothinclient-minidesktop x2gothinclient-cdmanager x2gothinclient-usbmount
if ! [ "en" == "$LANGCODE" ] ; then
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt -y -qq install firefox-esr-l10n-"$LANGCODE"
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ apt-get -y -q install firefox-esr-l10n-"$LANGCODE"
fi
+ # Use Debian Edu version of x2gothinclient-minidesktop_start
+ cp /etc/debian-edu/thin/x2gothinclient-minidesktop_start /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/x2go/
fi
if [ "true" == "$BD_ISO" ] ; then
umount /srv/ltsp/x2go-"$thin_type"-"$arch"/media/cdrom
@@ -527,13 +403,6 @@ if ! [ "" == "$thin_type" ] && [ ! -d /srv/tftp/ltsp/x2go-"$thin_type"-"$arch"/e
rm -rf /srv/ltsp/x2go-"$thin_type"-"$arch"/var/cache/debconf
rm -rf /srv/ltsp/x2go-"$thin_type"-"$arch"/var/cache/man
fi
- # Configure locale et al.
- cp /etc/locale.gen /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/
- cp /etc/default/locale /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/default
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch" locale-gen
- cp /etc/default/keyboard /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/default
- cp /etc/default/console-setup /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/default
- chroot /srv/ltsp/x2go-"$thin_type"-"$arch" setupcon -k
# Configure Sitesummary.
cp -r /etc/sitesummary/config.d/ /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/sitesummary/
cp -f /etc/sitesummary/site /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/sitesummary/
@@ -542,8 +411,16 @@ if ! [ "" == "$thin_type" ] && [ ! -d /srv/tftp/ltsp/x2go-"$thin_type"-"$arch"/e
# Customize X2Go client for Debian Edu use.
if [ "display" == "$thin_type" ] || [ "desktop" == "$thin_type" ] ; then
- cp /etc/ltsp/skel/.x2goclient/sessions /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/x2go/x2gothinclient_sessions
+ cat /etc/debian-edu/thin/x2gothinclient_sessions.in \
+ | sed -e "s/@HOSTNAME@/$(hostname -s)/g" \
+ -e "s/@X2GO_COMMAND@/${x2go_desktop}/g" \
+ > /srv/ltsp/x2go-"$thin_type"-"$arch"/etc/x2go/x2gothinclient_sessions
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ ln -fs /usr/share/images/desktop-base/desktop-background /etc/x2go/x2gothinclient-minidesktop_background.svg
fi
+
+ # This needs to be installed after x2gothinclient-minidesktop installation.
+ chroot /srv/ltsp/x2go-"$thin_type"-"$arch"/ update-alternatives --set desktop-background /usr/share/desktop-base/active-theme/wallpaper/contents/images/1920x1080.svg
+
# Firefox-ESR customization for Debian Edu.
if [ "desktop" == "$thin_type" ] ; then
cp /etc/environment /srv/ltsp/x2go-"$thin_type"-"$arch"/etc
@@ -585,47 +462,19 @@ EOF
ltsp image /srv/ltsp/x2go-"$thin_type"-"$arch"
fi
- # Create a runtime user for x2go login terminal; configure autofs (USB storage support).
- if [ "bare" == "$thin_type" ] ; then
- cat <<EOF >> /etc/ltsp/ltsp.conf
-POST_INIT_THIN_USER='useradd -G disk -m -d /run/home/thin -k /etc/ltsp/skel -r thin'
-
-POST_INIT_SYSTEMD='mkdir /etc/systemd/system/getty at tty1.service.d && \
-cp /etc/ltsp/getty at tty1.service.d/override.conf /etc/systemd/system/getty at tty1.service.d'
-
-POST_INIT_AUTOFS='cp /etc/ltsp/autofs/extra.autofs /etc/auto.master.d && \
-cp /etc/ltsp/autofs/auto.* /etc'
-EOF
- fi
+ # Prepare X2Go thinclient kernel image for PXE booting.
+ ltsp kernel "x2go-${thin_type}-${arch}"
- ALL_IMAGES=1 ltsp kernel
- # Create the ltsp.img file and move it to where it belongs.
- ltsp initrd
- mv /srv/tftp/ltsp/ltsp.img /srv/tftp/ltsp/x2go-"$thin_type"-"$arch"/ltsp.img
-
- # Clean up ltsp.conf from image specific items.
- sed -i '/POST_INIT/d' /etc/ltsp/ltsp.conf
fi
# Generate image for diskless workstation.
if [ "yes" == "$diskless_workstation" ] ; then
+
if echo "$PROFILE" | grep -Eq 'Main-Server' ; then
- # The image is a copy of the main server's fs. On the server, autofs
- # is disabled, but it is needed for diskless workstations.
- # OTOH some services need to be disabled, i.e. 'masked'.
- cat <<EOF >> /etc/ltsp/ltsp.conf
-PRE_INIT_AUTOFS="echo 'LDAPURI=ldap://ldap' >> /etc/default/autofs"
-PRE_INIT_MAIN_SERVER="systemctl enable autofs"
-POST_INIT_USE_FQDN="sed -i '/10.0.2.2/ s/server/tjener.intern tjener/' /etc/hosts"
-POST_INIT_SITESUMMARY="sed -i 's/main-server/ltsp-client/' /etc/sitesummary/hostclass"
-MASK_SYSTEM_SERVICES="apache2 named cups dovecot etckeeper exim4 squid tftpd-hpa \
-icinga2 nmbd slapd smbd systemd-journald xrdp xrdp-sesman krb5-kdc mariadb cfengine3 isc-dhcp-server"
-EOF
- else
- cat <<EOF >> /etc/ltsp/ltsp.conf
-MASK_SYSTEM_SERVICES="etckeeper exim4 tftpd-hpa isc-dhcp-server xrdp xrdp-sesman"
-EOF
+ echo "ERROR: Creating diskless workstations from host OS is not supported in the Main-Server"
+ exit 1
fi
+
# Temporary workaround needed in some cases for configuring the resolver inside
# the SquashFS image.
rm -f /etc/resolv.conf
@@ -640,36 +489,47 @@ EOF
ln -s /run/resolvconf/resolv.conf /etc/resolv.conf
# Revert temporary change to PROFILE in /etc/debian-edu/config
sed -i /etc/debian-edu/config -e "s/^PROFILE=.*/PROFILE=\"${PROFILE}\"/g"
- # next modification avoids ltsp command error if lot of images are available.
- ALL_IMAGES=1 ltsp kernel
- ltsp initrd
- if uname -r | grep -q 686 ; then
- mv /srv/tftp/ltsp/ltsp.img /srv/tftp/ltsp/x86_32/ltsp.img
- else
- mv /srv/tftp/ltsp/ltsp.img /srv/tftp/ltsp/"$(uname -m)"/ltsp.img
- fi
- # Clean up ltsp.conf from specific items.
- sed -i '/PRE_INIT_MAIN/d' /etc/ltsp/ltsp.conf
- sed -i '/PRE_INIT_AUTOFS/d' /etc/ltsp/ltsp.conf
- sed -i '/MASK_SYSTEM/d' /etc/ltsp/ltsp.conf
+
fi
# Generate chroot and SquashFS image (optional) for diskless workstation.
if [ "yes" == "$dlw" ] ; then
+
+ if [ -d "/srv/ltsp/dlw" ]; then
+ echo "ERROR: Diskless Workstation chroot '/srv/ltsp/dlw' already exists."
+ echo " Remove the chroot and re-run this script."
+ exit 1
+ fi
+
# The chroot is basically a workstation installation.
# Petter Reinholdtsen's debian-edu-bless script is used to achieve it.
- cat <<EOF >> /etc/ltsp/ltsp.conf
-LIGHTDM_CONF="greeter-hide-users"
-POST_INIT_USE_FQDN="sed -i '/10.0.2.2/ s/server/tjener.intern tjener/' /etc/hosts"
-EOF
mkdir -p /srv/ltsp/dlw
chmod 755 /srv/ltsp/dlw
# Install base system
- debootstrap --arch="$arch" --no-check-gpg --variant=minbase --include=locales,console-setup,linux-image-"$kernel_arch" "$dist" /srv/ltsp/dlw "$mirror"
+ debootstrap --arch="$arch" \
+ --no-check-gpg \
+ --variant=minbase \
+ --include=locales,console-setup,linux-image-"${kernel_arch}" \
+ "${dist}" /srv/ltsp/dlw "${mirror}"
# Unset temporary directory variables to avoid problems when directory
# is missing inside the chroot. https://bugs.debian.org/765443
unset TMPDIR TEMP TEMPDIR TMP
- chroot /srv/ltsp/dlw/ apt clean
+ chroot /srv/ltsp/dlw/ apt-get clean
+
+ # Care for same locale and keyboard settings in the chroot, also useful to quiet down Perl.
+ cp /etc/locale.gen /srv/ltsp/dlw/etc/
+ cp /etc/default/locale /srv/ltsp/dlw/etc/default
+ chroot /srv/ltsp/dlw locale-gen
+ cp /etc/default/keyboard /srv/ltsp/dlw/etc/default
+ cp /etc/default/console-setup /srv/ltsp/dlw/etc/default
+ chroot /srv/ltsp/dlw setupcon -k
+
+ # Set timezone properly.
+ timezone="$(get_timezone)"
+ echo "${timezone}" > "/srv/ltsp/dlw/etc/timezone"
+ chroot /srv/ltsp/dlw ln -fs "/usr/share/zoneinfo/${timezone}" "/etc/localtime"
+ chroot /srv/ltsp/dlw dpkg-reconfigure -f noninteractive tzdata
+
# Care for complete sources list (security, also nonfree -- in case firmware is needed).
if [ -e /srv/ltsp/dlw/usr/share/doc/apt/examples/sources.list ] ; then
# Up to bookworm
@@ -686,20 +546,15 @@ EOF
echo "deb [trusted=yes] $mirror $dist main" > /srv/ltsp/dlw/etc/apt/sources.list
fi
- # Care for same locale and keyboard settings in the chroot, also useful to quiet down Perl.
- cp /etc/locale.gen /srv/ltsp/dlw/etc/
- cp /etc/default/locale /srv/ltsp/dlw/etc/default
- chroot /srv/ltsp/dlw locale-gen
- cp /etc/default/keyboard /srv/ltsp/dlw/etc/default
- cp /etc/default/console-setup /srv/ltsp/dlw/etc/default
- chroot /srv/ltsp/dlw setupcon -k
-
# Care for special files.
mkdir -p /srv/ltsp/dlw/tmp/user/0/
cp /usr/share/debian-edu-config/tools/debian-edu-bless /srv/ltsp/dlw/sbin
- # Install the mandatory ltsp package (and apt-utils to don't delay package configuration).
- chroot /srv/ltsp/dlw apt-get install -y -qq apt-utils ltsp
+ chroot /srv/ltsp/dlw/ apt-get update
+ chroot /srv/ltsp/dlw/ apt-get -q -y upgrade
+
+ # Dependencies required by LTSP
+ chroot /srv/ltsp/dlw/ apt-get -q -y install busybox iproute2 systemd-sysv
# Turn system into a Debian Edu workstation.
chroot /srv/ltsp/dlw sh -c "PROFILE=Workstation DESKTOP=$desktop /sbin/debian-edu-bless"
@@ -732,20 +587,14 @@ EOF
ltsp image dlw
fi
- # Next modification avoids ltsp command error if lot of images are available.
- ALL_IMAGES=1 ltsp kernel
-
- # Create ltsp initrd (ltsp.img) and move it to the right location.
- ltsp initrd
- mv /srv/tftp/ltsp/ltsp.img /srv/tftp/ltsp/dlw/
+ # Prepare DLW kernel image for PXE booting.
+ ltsp kernel dlw
- # Update iPXE menu and adjust the created file for Debian Edu needs.
- ltsp ipxe
- sed -i 's#ltsp/ltsp.img#ltsp/${img}/ltsp.img#' /srv/tftp/ltsp/ltsp.ipxe
+fi
- # Clean up ltsp.conf from image specific items.
- sed -i '/POST_INIT/d' /etc/ltsp/ltsp.conf
- sed -i '/LIGHTDM_CONF/d' /etc/ltsp/ltsp.conf
+# Unmount the BD image, if it was mounted at the start of this script.
+if [ "yes" == "$bd_iso_was_mounted" ] ; then
+ umount /media/cdrom
fi
# Get rid of additional excludes just in case they exist (main server).
@@ -801,28 +650,9 @@ if [ ! -x /sbin/start-stop-daemon.REAL ] ; then
exportfs -rav
fi
-# Generate the LTSP specific iPXE menu
-ltsp ipxe
-
-# Add PXE installation related entries to iPXE menu.
-if ! grep -q main-server /srv/tftp/ltsp/ltsp.ipxe && \
- [ -f /srv/tftp/debian-installer/amd64/linux ] ; then
- echo "Modifying /srv/tftp/ltsp/ltsp.ipxe"
- sed -i '/^menu.*/ a item\
-item --gap Installation:\
-item --key a amd64 Install Debian Edu/amd64 (64-Bit)\
-item --key i i386 Install Debian Edu/i386 (32-Bit)\
-item\
-' /srv/tftp/ltsp/ltsp.ipxe
- cat /srv/tftp/debian-edu/install.cfg >>/srv/tftp/ltsp/ltsp.ipxe
-fi
-# Make sure /srv/tftp/ltsp/ltsp.ipxe is Debian Edu specific.
-sed -i "s#ltsp/ltsp.img#ltsp/${img}/ltsp.img#" /srv/tftp/ltsp/ltsp.ipxe
-# Add "quiet" and "splash" parameters to hide kernel logs on a boot screen.
-sed -i "s/set cmdline ${cmdline_method} ${cmdline_ltsp} ${cmdline_client}$/set cmdline ${cmdline_method} ${cmdline_ltsp} ${cmdline_client} ${KERNEL_PARAMETERS}/" /srv/tftp/ltsp/ltsp.ipxe
+# Debian Edu diskless machines use different ltsp.img files, so create them separately.
+debian-edu-ltsp-initrd
-# Unmount the BD image, if it was mounted at the start of this script.
-if [ "yes" == "$bd_iso_was_mounted" ] ; then
- umount /media/cdrom
-fi
+# Prepare the best ltsp.ipxe config for this server that we can...
+debian-edu-ltsp-ipxe
=====================================
sbin/debian-edu-ltsp-ipxe
=====================================
@@ -1,26 +1,201 @@
#!/bin/sh
+#
+# Regenerate Debian Edu ltsp.ipxe configuration
+#
+# This needs to take into account:
+# - LTSP images
+# - Debian Installer images
set -e
-# Generate the LTSP specific iPXE menu
-ltsp ipxe 2> /dev/null
-
-# Add PXE installation related entries to iPXE menu.
-if ! grep -q main-server /srv/tftp/ltsp/ltsp.ipxe && \
- [ -f /srv/tftp/debian-installer/amd64/linux ] ; then
- echo "Modifying /srv/tftp/ltsp/ltsp.ipxe"
- sed -i '/^menu.*/ a item\
-item --gap Installation:\
-item --key a amd64 Install Debian Edu/amd64 (64-Bit)\
-item --key i i386 Install Debian Edu/i386 (32-Bit)\
-item\
-' /srv/tftp/ltsp/ltsp.ipxe
- cat /srv/tftp/debian-edu/install.cfg >>/srv/tftp/ltsp/ltsp.ipxe
+# Grab dist value for both testing and stable release cases.
+if grep -q / /etc/debian_version ; then
+ # Likely a Debian testing/unstable system this script is executed on.
+ dist_codename=$(cat /etc/debian_version | cut -d/ -f1)
+ dist_version=${dist_codename}
+else
+ # A stable release of Debian.
+ dist_codename=$(lsb_release -sc)
+ dist_version=$(lsb_release -sr)
+fi
+
+[ "$archs" ] || archs="amd64"
+[ "$theme" ] || theme="$(ls -L /etc/alternatives/desktop-theme/plymouth 2>/dev/null | grep script | cut -d'.' -f 1)"
+
+if [ -f /etc/debian-edu/config ] ; then
+ . /etc/debian-edu/config
+fi
+
+tftpdir=/srv/tftp
+
+# Start from a clean state after any configuration changes have been made.
+if [ -d $tftpdir/ltsp ] ; then
+ rm -rf $tftpdir/debian-edu
+ rm -f $tftpdir/ltsp/ltsp.ipxe
+ # re-generate clean ipxe menu file in case of LTSP client support.
+ # FIXME: also check if chroot folders exist!!!
+ if [ -d /srv/ltsp/images ] ; then
+ ltsp ipxe
+ fi
+fi
+
+[ -d $tftpdir ] || mkdir $tftpdir
+[ -d $tftpdir/debian-edu ] || mkdir $tftpdir/debian-edu
+
+if [ -d "/srv/tftp/debian-installer/${dist_version}" ]; then
+ di_versions_supported="$(cd /srv/tftp/debian-installer/; ls -1 | grep -E '^[0-9]+$' | sort -r -h)"
+else
+ di_versions_supported=""
+fi
+
+menufile=$tftpdir/debian-edu/install.cfg
+echo "Generating $menufile"
+(
+ if [ true = "$graphicdi" ]; then
+ gtkvideo="vga=788"
+ fi
+ for arch in $archs ; do
+ for di_ver in ${di_versions_supported}; do
+ if [ -d "${tftpdir}/debian-installer/${di_ver}/${arch}" ]; then
+ cat <<EOF
+
+# Based upon locale, keymap and desktop values used during main-server installation; auto URL added.
+:${arch}_${di_ver}
+set params auto url=http://www/debian-edu-install.dat hostname=$hostname domain=$domain $installconfig $gtkvideo --- quiet
+kernel /debian-installer/${di_ver}/${arch}/linux initrd=initrd.gz \${params}
+initrd /debian-installer/${di_ver}/${arch}/initrd.gz
+boot || goto failed
+EOF
+ fi
+ done
+ done
+) > $menufile
+
+if [ ! -z "$theme" ] ; then
+ cp /usr/share/pixmaps/$theme-syslinux.png $tftpdir/debian-edu/debian-edu-pxe.png
+fi
+
+# Generate/modify the iPXE menu file
+if [ -n "${di_versions_supported}" ] && [ -f $tftpdir/ltsp/ltsp.ipxe ] ; then
+ # ltsp is installed already, modify existing ipxe menu
+ if ! grep -q main-server $tftpdir/ltsp/ltsp.ipxe ; then
+ echo "Modifying $tftpdir/ltsp/ltsp.ipxe"
+
+ # Configure background picture for iPXE versions that support that.
+ sed -i ${tftpdir}/ltsp/ltsp.ipxe \
+ -e "$(grep -n -E '^# Configure iPXE for LTSP$' ${tftpdir}/ltsp/ltsp.ipxe | tail -1 | cut -f1 -d":") a \\
+\\
+console --picture /debian-edu/debian-edu-pxe.png ||\\
+"
+
+ # Support server OS's version of the Debian Installer, but also earlier / later versions.
+ sed -i ${tftpdir}/ltsp/ltsp.ipxe \
+ -e "$(grep -n -E "^item --key [0-9]+ .*" ${tftpdir}/ltsp/ltsp.ipxe | tail -1 | cut -f1 -d":") a item\\
+item --gap Installation:\\
+item --key i amd64_${dist_version} Install Debian Edu ${dist_version} / amd64\\
+# BEGIN: Debian-Installer other versions\\
+# END: Debian-Installer other versions"
+ cat $menufile >> $tftpdir/ltsp/ltsp.ipxe
+ fi
+elif [ -n "${di_versions_supported}" ]; then
+ # generate ipxe menu on a plain main server for PXE installations
+ mkdir -p $tftpdir/ltsp/
+ cp /usr/lib/ipxe/undionly.kpxe $tftpdir/ltsp/
+ cp /usr/lib/ipxe/snponly.efi $tftpdir/ltsp/
+ cp /boot/memtest86+ia32.bin $tftpdir/ltsp/memtest.0
+ cp /boot/memtest86+x64.efi $tftpdir/ltsp/memtest.efi
+ echo "Generating $tftpdir/ltsp/ltsp.ipxe"
+ cat <<EOF > ${tftpdir}/ltsp/ltsp.ipxe
+#!ipxe
+#
+# Configure iPXE for network installations
+
+console --picture /debian-edu/debian-edu-pxe.png ||
+
+# Set the default image (img) based on arch, or to root-path if it's not empty
+cpuid --ext 29 && set img amd64_${dist_version} || set img i386_${dist_version}
+
+goto start
+
+:start
+# To completely hide the menu, set menu-timeout to -1
+isset \${menu-timeout} || set menu-timeout 5000
+iseq "\${menu-timeout}" "-1" && goto \${img} ||
+menu Debian Edu iPXE boot menu || goto \${img}
+item
+item --gap Debian Edu installation:
+item --key i amd64_${dist_version} Install Debian Edu ${dist_version} / amd64
+item
+# BEGIN: Debian-Installer other versions
+# END: Debian-Installer other versions
+item
+item --gap Other options:
+item --key m memtest Memory test
+item --key c config Enter iPXE configuration
+item --key s shell Drop to iPXE shell
+item --key d disk Boot from the first local disk
+item
+item --key x exit Exit iPXE and continue BIOS boot
+choose --timeout \${menu-timeout} --default \${img} img || goto cancel
+goto \${img}
+
+:memtest
+iseq \${platform} pcbios && kernel memtest.0 || kernel memtest.efi
+# Boot "fails" on normal memtest exit with Esc, so show the menu again
+boot ||
+goto start
+
+:config
+config
+goto start
+
+:shell
+echo Type 'exit' to get back to the menu
+shell
+goto start
+
+:disk
+# Boot the first local HDD
+sanboot --no-describe --drive 0x80 || goto failed
+
+:exit
+exit 1
+
+:cancel
+echo You cancelled the menu, dropping to a shell
+goto shell
+
+:failed
+echo Booting failed, dropping to a shell
+goto shell
+EOF
+ if ! grep -q main-server $tftpdir/ltsp/ltsp.ipxe ; then
+ cat $menufile >> $tftpdir/ltsp/ltsp.ipxe
+ fi
+fi
+
+# Insert other Debian-Installer versions, if any.
+if [ -n "${di_versions_supported}" ] && [ "${dist_version}" != "${di_versions_supported}" ]; then
+ # We have more D-I netboot versions installed, so inject them into the iPXE boot menu
+ for di_ver in ${di_versions_supported}; do
+ for arch in ${archs}; do
+ if [ "${di_ver}" = "${dist_version}" ]; then
+ # we already have this, see above
+ :
+ else
+ if [ -d $tftpdir/debian-installer/${di_ver}/${arch} ]; then
+ sed -i "/^# END: Debian-Installer other versions/i \
+item ${arch}_${di_ver} Install Debian Edu ${di_ver} / ${arch}\
+" ${tftpdir}/ltsp/ltsp.ipxe
+ fi
+ fi
+ done
+ done
+else
+ sed -E -i "${tftpdir}/ltsp/ltsp.ipxe" -e "/# (BEGIN|END): Debian-Installer other versions/d"
fi
# Make sure /srv/tftp/ltsp/ltsp.ipxe is Debian Edu specific.
sed -i 's#ltsp/ltsp.img#ltsp/${img}/ltsp.img#' /srv/tftp/ltsp/ltsp.ipxe
# Add "quiet" and "splash" parameters to hide kernel logs on a boot screen.
sed -i 's/set cmdline ${cmdline_method} ${cmdline_ltsp} ${cmdline_client}$/set cmdline ${cmdline_method} ${cmdline_ltsp} ${cmdline_client} quiet splash/' /srv/tftp/ltsp/ltsp.ipxe
-echo ""
-echo "/srv/tftp/ltsp/ltsp.ipxe has been modified."
=====================================
sbin/debian-edu-pxeinstall
=====================================
@@ -10,8 +10,8 @@ set -e
LC_ALL=C
export LC_ALL
-## FIXME: Why is resolv.conf empty or missing? Because network
-## was started in the chroot (target)?
+## FIXME: Why is resolv.conf empty or missing? Because network
+## was started in the chroot (target)?
## Try to find the DNS from the leases file, if that fails use
## default DNS:
if [ ! -s /etc/resolv.conf ] ; then
@@ -33,8 +33,8 @@ if [ ! -s /etc/resolv.conf ] ; then
echo "info: Create temporary /etc/resolv.conf with DNS: $DNS."
cat >> /etc/resolv.conf <<EOF
## This is a temporary resolv.conf created by $0.
-## If you find it after installation, something went wrong. Try to replace it
-## by a symlink: /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf, i.e.:
+## If you find it after installation, something went wrong. Try to replace it
+## by a symlink: /etc/resolv.conf -> /etc/resolvconf/run/resolv.conf, i.e.:
## rm /etc/resolv.conf; ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf
nameserver $DNS
search intern
@@ -70,7 +70,6 @@ default_mydesktop="xfce"
[ "$mydesktop" ] || mydesktop="${default_mydesktop}"
[ "$graphicdi" ] || graphicdi=false
[ "$dailydi" ] || dailydi=false
-[ "$theme" ] || theme="$(ls -L /etc/alternatives/desktop-theme/plymouth 2>/dev/null | grep script | cut -d'.' -f 1)"
# Not hardcoded to allow PXE installation of a main-server without a
# proxy set
#[ "$http_proxy" ] || http_proxy=http://webcache:3128
@@ -126,19 +125,10 @@ preseedfile=/etc/debian-edu/www/debian-edu-install.dat
# Start from a clean state after any configuration changes have been made.
if [ -d $tftpdir/ltsp ] ; then
- rm -rf $tftpdir/debian-edu
rm -rf $tftpdir/debian-installer
- rm -f $tftpdir/ltsp/ltsp.ipxe
- # re-generate clean ipxe menu file in case of LTSP client support.
- if [ -d /srv/ltsp/images ] ; then
- ltsp ipxe
- # adjust ipxe menue for Debian Edu use.
- sed -i 's#ltsp/ltsp.img#ltsp/${img}/ltsp.img#' /srv/tftp/ltsp/ltsp.ipxe
- fi
fi
[ -d $tftpdir ] || mkdir $tftpdir
-[ -d $tftpdir/debian-edu ] || mkdir $tftpdir/debian-edu
[ -d $tftpdir/debian-installer ] || \
mkdir $tftpdir/debian-installer
@@ -310,145 +300,5 @@ EOF
fi
) > $preseedfile
-menufile=$tftpdir/debian-edu/install.cfg
-echo "Generating $menufile"
-(
- if [ true = "$graphicdi" ]; then
- gtkvideo="vga=788"
- fi
- for arch in $archs ; do
- for di_ver in ${di_versions_supported}; do
- if [ -d "${tftpdir}/debian-installer/${di_ver}/${arch}" ]; then
- cat <<EOF
-
-# Based upon locale, keymap and desktop values used during main-server installation; auto URL added.
-:${arch}_${di_ver}
-set params auto url=http://www/debian-edu-install.dat hostname=$hostname domain=$domain $installconfig $gtkvideo --- quiet
-kernel /debian-installer/${di_ver}/${arch}/linux initrd=initrd.gz \${params}
-initrd /debian-installer/${di_ver}/${arch}/initrd.gz
-boot || goto failed
-EOF
- fi
- done
- done
-) > $menufile
-
-if [ ! -z "$theme" ] ; then
- cp /usr/share/pixmaps/$theme-syslinux.png $tftpdir/debian-edu/debian-edu-pxe.png
-fi
-
-# Generate/modify the iPXE menu file
-if [ -f $tftpdir/ltsp/ltsp.ipxe ] ; then
- # ltsp is installed already, modify existing ipxe menu
- if ! grep -q main-server $tftpdir/ltsp/ltsp.ipxe ; then
- echo "Modifying $tftpdir/ltsp/ltsp.ipxe"
-
- # FIXME: also support other installer versions here, currently only latest version gets
- # integrated into LTSP servers ltsp.ipxe file.
-
- sed -i "/^menu.*/ a item\
-item --gap Installation:\
-item --key a amd64_${dist_version} Install Debian Edu ${dist_version} / amd64 (64-Bit)\
-# BEGIN: Debian-Installer other versions
-# END: Debian-Installer other versions
-item\
-" ${tftpdir}/ltsp/ltsp.ipxe
- cat $menufile >> $tftpdir/ltsp/ltsp.ipxe
- fi
-else
- # generate ipxe menu on a plain main server for PXE installations
- mkdir -p $tftpdir/ltsp/
- cp /usr/lib/ipxe/undionly.kpxe $tftpdir/ltsp/
- cp /usr/lib/ipxe/snponly.efi $tftpdir/ltsp/
- cp /boot/memtest86+ia32.bin $tftpdir/ltsp/memtest.0
- cp /boot/memtest86+x64.efi $tftpdir/ltsp/memtest.efi
- echo "Generating $tftpdir/ltsp/ltsp.ipxe"
- cat <<EOF > ${tftpdir}/ltsp/ltsp.ipxe
-#!ipxe
-#
-# Configure iPXE for network installations
-
-console --picture /debian-edu/debian-edu-pxe.png ||
-
-# Set the default image (img) based on arch, or to root-path if it's not empty
-cpuid --ext 29 && set img amd64_${dist_version} || set img i386_${dist_version}
-
-goto start
-
-:start
-# To completely hide the menu, set menu-timeout to -1
-isset \${menu-timeout} || set menu-timeout 5000
-iseq "\${menu-timeout}" "-1" && goto \${img} ||
-menu Debian Edu iPXE boot menu || goto \${img}
-item
-item --gap Debian Edu installation:
-item --key a amd64_${dist_version} Install Debian Edu ${dist_version} / amd64
-item
-# BEGIN: Debian-Installer other versions
-# END: Debian-Installer other versions
-item
-item --gap Other options:
-item --key m memtest Memory test
-item --key c config Enter iPXE configuration
-item --key s shell Drop to iPXE shell
-item --key d disk Boot from the first local disk
-item
-item --key x exit Exit iPXE and continue BIOS boot
-choose --timeout \${menu-timeout} --default \${img} img || goto cancel
-goto \${img}
-
-:memtest
-iseq \${platform} pcbios && kernel memtest.0 || kernel memtest.efi
-# Boot "fails" on normal memtest exit with Esc, so show the menu again
-boot ||
-goto start
-
-:config
-config
-goto start
-
-:shell
-echo Type 'exit' to get back to the menu
-shell
-goto start
-
-:disk
-# Boot the first local HDD
-sanboot --no-describe --drive 0x80 || goto failed
-
-:exit
-exit 1
-
-:cancel
-echo You cancelled the menu, dropping to a shell
-goto shell
-
-:failed
-echo Booting failed, dropping to a shell
-goto shell
-EOF
- if ! grep -q main-server $tftpdir/ltsp/ltsp.ipxe ; then
- cat $menufile >> $tftpdir/ltsp/ltsp.ipxe
- fi
-fi
-
-# Insert other Debian-Installer versions, if any.
-if [ "${dist_version}" != "${di_versions_supported}" ]; then
- # We have more D-I netboot versions installed, so inject them into the iPXE boot menu
- for di_ver in ${di_versions_supported}; do
- for arch in ${archs}; do
- if [ "${di_ver}" = "${dist_version}" ]; then
- # we already have this, see above
- :
- else
- if [ -d $tftpdir/debian-installer/${di_ver}/${arch} ]; then
- sed -i "/^# END: Debian-Installer other versions/i \
-item ${arch}_${di_ver} Install Debian Edu ${di_ver} / ${arch}\
-" ${tftpdir}/ltsp/ltsp.ipxe
- fi
- fi
- done
- done
-else
- sed -E -i "${tftpdir}/ltsp/ltsp.ipxe" -e "/# (BEGIN|END): Debian-Installer other versions/d"
-fi
+# Prepare the best ltsp.ipxe config for this server that we can...
+debian-edu-ltsp-ipxe
=====================================
share/debian-edu-config/squid.conf
=====================================
@@ -9,7 +9,11 @@ append_domain .intern
# Currently, Debian Edu does not support IPv6 on the internal network
# thus, we should try to use DNSv4 preferrably for the http proxy.
# See https://bugs.debian.org/1006375
-dns_v4_first on
+#
+# FIXME: This option is obsolete in Debian 13's version of squid. Commenting
+# it out for now, but this might need later investigation if IPv4/IPv6 issues
+# return (see above bug URL).
+#dns_v4_first on
# Adjust cache size to fit size of /var/spool/squid, the initial capacity value
# is dynamically updated using
=====================================
share/debian-edu-config/tools/run-at-firstboot
=====================================
@@ -92,11 +92,11 @@ if ! is_ltsp_client; then
fi
# Always create the thin client image for all LTSP-Server variants/combinations.
if echo "$PROFILE" | grep -Eq 'LTSP-Server'; then
- if [ -d /srv/ltsp/x2go-bare-amd64 ] && [ -z "$(find /srv/ltsp/x2go-bare-amd64/ -name "CREATED_SUCCESSFULLY_*")" ]; then
- rm -Rf /srv/ltsp/x2go-bare-amd64/
+ if [ -d /srv/ltsp/x2go-desktop-amd64 ] && [ -z "$(find /srv/ltsp/x2go-desktop-amd64/ -name "CREATED_SUCCESSFULLY_*")" ]; then
+ rm -Rf /srv/ltsp/x2go-desktop-amd64/
fi
- if [ ! -d /srv/ltsp/x2go-bare-amd64 ] || [ -n "$(find /srv/ltsp/x2go-bare-amd64/ -name "CREATED_SUCCESSFULLY_*")" ]; then
- env -i HOME="${HOME}" PATH="${PATH}" TERM="${TERM}" USER="${USER}" LOGNAME="${LOGNAME}" /usr/sbin/debian-edu-ltsp-install --thin_type bare
+ if [ ! -d /srv/ltsp/x2go-desktop-amd64 ] || [ -n "$(find /srv/ltsp/x2go-desktop-amd64/ -name "CREATED_SUCCESSFULLY_*")" ]; then
+ env -i HOME="${HOME}" PATH="${PATH}" TERM="${TERM}" USER="${USER}" LOGNAME="${LOGNAME}" /usr/sbin/debian-edu-ltsp-install --thin_type desktop
fi
fi
fi
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/824549606a34f75f37f9cdbb14ae267bd67952aa...8f5e2d07e46eaed8a3b6473820643a3280ca4bbf
--
View it on GitLab: https://salsa.debian.org/debian-edu/debian-edu-config/-/compare/824549606a34f75f37f9cdbb14ae267bd67952aa...8f5e2d07e46eaed8a3b6473820643a3280ca4bbf
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-edu-commits/attachments/20261112/37f34ee6/attachment-0001.htm>
More information about the debian-edu-commits
mailing list