24 Commits
v0.1 ... v1.0

Author SHA1 Message Date
6a7b26e3ed install.sh aktualisiert 2024-10-16 12:54:58 +02:00
a21ad47b93 boot/firmware/ro-root.sh hinzugefügt 2024-10-16 12:16:59 +02:00
7507e33cd8 install.sh aktualisiert 2024-10-16 12:15:41 +02:00
33ab3e799c install.sh aktualisiert 2024-10-16 12:09:40 +02:00
a7e26b8017 install.sh aktualisiert 2024-10-16 12:05:59 +02:00
44a5ebcc5d install.sh aktualisiert 2024-10-16 11:59:24 +02:00
d4f664d528 README.md aktualisiert 2024-10-16 11:17:25 +02:00
dd4da4fc90 README.md aktualisiert 2024-10-16 11:15:50 +02:00
8a5a333b17 etc/systemd/system/getty@tty1.service.d/override.conf aktualisiert 2024-10-16 11:15:02 +02:00
1247e986b4 etc/systemd/system/chromium-monitor.service aktualisiert 2024-10-16 11:14:42 +02:00
9c543d45b2 etc/systemd/system/watchdog.service aktualisiert 2024-10-16 11:14:33 +02:00
659ccb5738 etc/dhcp/dhclient.conf aktualisiert 2024-10-16 11:14:20 +02:00
30e8ca7353 etc/chromium/policies/managed/disable_password_saving.json aktualisiert 2024-10-16 11:14:02 +02:00
6ee7764bd7 home/loginuser/.xinitrc aktualisiert 2024-10-16 11:13:45 +02:00
8935a49c56 home/loginuser/.bash_profile aktualisiert 2024-10-16 11:13:31 +02:00
30b88204e7 root/.vnc/config.d/vncserver-x11 aktualisiert 2024-10-16 11:13:13 +02:00
634d3d17e8 usr/bin/watchdog aktualisiert 2024-10-16 11:12:26 +02:00
9dd38dbc15 usr/bin/watchdog aktualisiert 2024-10-16 11:11:32 +02:00
fb8ff04041 usr/bin/chromium-monitor aktualisiert 2024-10-16 11:11:16 +02:00
72f87e68f8 usr/bin/watchdog aktualisiert 2024-10-16 11:10:54 +02:00
6a3436aaad usr/bin/chromium-monitor aktualisiert 2024-10-16 11:10:41 +02:00
fa768d5267 install.sh aktualisiert 2024-10-16 11:10:09 +02:00
f119be71db boot/ro-root.sh hinzugefügt 2024-10-16 11:07:31 +02:00
5ef683957f README.md aktualisiert
Signed-off-by: Tim Eertmoed <alientim@noreply.localhost>
2024-10-15 15:30:55 +02:00
14 changed files with 360 additions and 140 deletions

View File

@@ -1,2 +1,10 @@
# RPS-Light-PXE # RPS-Light-PXE
```bash
wget -qO- --header 'Authorization:token 9031f8d227dd83ba601680bf3a9f6c2d26c1a970' https://gitea.int.eertmoed.net/WiS/RPS-Light-PXE/archive/latest.tar.gz| tar xvz ; bash ./rps-light-pxe/install.sh ;
```
```ruby
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.
```

120
boot/firmware/ro-root.sh Normal file
View File

@@ -0,0 +1,120 @@
#!/bin/sh
# Read-only Root-FS for Raspian using overlayfs
# Version 1.1:
# Changed to use /proc/mounts rathern than /etc/fstab for deriving the root filesystem.
#
# Version 1:
# Created 2017 by Pascal Suter @ DALCO AG, Switzerland to work on Raspian as custom init script
# (raspbian does not use an initramfs on boot)
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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, see
# <http://www.gnu.org/licenses/>.
#
#
# Tested with Raspbian mini, 2017-01-11
#
# This script will mount the root filesystem read-only and overlay it with a temporary tempfs
# which is read-write mounted. This is done using the overlayFS which is part of the linux kernel
# since version 3.18.
# when this script is in use, all changes made to anywhere in the root filesystem mount will be lost
# upon reboot of the system. The SD card will only be accessed as read-only drive, which significantly
# helps to prolong its life and prevent filesystem coruption in environments where the system is usually
# not shut down properly
#
# Install:
# copy this script to /sbin/overlayRoot.sh and add "init=/sbin/overlayRoot.sh" to the cmdline.txt
# file in the raspbian image's boot partition.
# I strongly recommend to disable swapping before using this. it will work with swap but that just does
# not make sens as the swap file will be stored in the tempfs which again resides in the ram.
# run these commands on the booted raspberry pi BEFORE you set the init=/sbin/overlayRoot.sh boot option:
# sudo dphys-swapfile swapoff
# sudo dphys-swapfile uninstall
# sudo update-rc.d dphys-swapfile remove
#
# To install software, run upgrades and do other changes to the raspberry setup, simply remove the init=
# entry from the cmdline.txt file and reboot, make the changes, add the init= entry and reboot once more.
fail(){
echo -e "$1"
/bin/bash
}
# load module
modprobe overlay
if [ $? -ne 0 ]; then
fail "ERROR: missing overlay kernel module"
fi
# mount /proc
mount -t proc proc /proc
# create a writable fs to then create our mountpoints
mount -t tmpfs inittemp /mnt
if [ $? -ne 0 ]; then
fail "ERROR: could not create a temporary filesystem to mount the base filesystems for overlayfs"
fi
mkdir /mnt/lower
mkdir /mnt/rw
mount -t tmpfs root-rw /mnt/rw
if [ $? -ne 0 ]; then
fail "ERROR: could not create tempfs for upper filesystem"
fi
mkdir /mnt/rw/upper
mkdir /mnt/rw/work
mkdir /mnt/newroot
# mount root filesystem readonly
rootDev=`awk '$2 == "/" {print $1}' /proc/mounts`
rootMountOpt=`awk '$2 == "/" {print $4}' /proc/mounts`
rootFsType=`awk '$2 == "/" {print $3}' /proc/mounts`
mount -t ${rootFsType} -o ${rootMountOpt},ro ${rootDev} /mnt/lower
if [ $? -ne 0 ]; then
fail "ERROR: could not ro-mount original root partition"
fi
mount -t overlay -o lowerdir=/mnt/lower,upperdir=/mnt/rw/upper,workdir=/mnt/rw/work overlayfs-root /mnt/newroot
if [ $? -ne 0 ]; then
fail "ERROR: could not mount overlayFS"
fi
# create mountpoints inside the new root filesystem-overlay
mkdir /mnt/newroot/ro
mkdir /mnt/newroot/rw
# remove root mount from fstab (this is already a non-permanent modification)
grep -v "$rootDev" /mnt/lower/etc/fstab > /mnt/newroot/etc/fstab
echo "#the original root mount has been removed by overlayRoot.sh" >> /mnt/newroot/etc/fstab
echo "#this is only a temporary modification, the original fstab" >> /mnt/newroot/etc/fstab
echo "#stored on the disk can be found in /ro/etc/fstab" >> /mnt/newroot/etc/fstab
# change to the new overlay root
cd /mnt/newroot
pivot_root . mnt
exec chroot . sh -c "$(cat <<END
# move ro and rw mounts to the new root
mount --move /mnt/mnt/lower/ /ro
if [ $? -ne 0 ]; then
echo "ERROR: could not move ro-root into newroot"
/bin/bash
fi
mount --move /mnt/mnt/rw /rw
if [ $? -ne 0 ]; then
echo "ERROR: could not move tempfs rw mount into newroot"
/bin/bash
fi
# unmount unneeded mounts so we can unmout the old readonly root
umount /mnt/mnt
umount /mnt/proc
umount -l -f /mnt/dev
umount -l -f /mnt
# continue with regular init
exec /sbin/init
END
)"

120
boot/ro-root.sh Normal file
View File

@@ -0,0 +1,120 @@
#!/bin/sh
# Read-only Root-FS for Raspian using overlayfs
# Version 1.1:
# Changed to use /proc/mounts rathern than /etc/fstab for deriving the root filesystem.
#
# Version 1:
# Created 2017 by Pascal Suter @ DALCO AG, Switzerland to work on Raspian as custom init script
# (raspbian does not use an initramfs on boot)
#
# This program 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 3 of the License, or
# (at your option) any later version.
#
# This program 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, see
# <http://www.gnu.org/licenses/>.
#
#
# Tested with Raspbian mini, 2017-01-11
#
# This script will mount the root filesystem read-only and overlay it with a temporary tempfs
# which is read-write mounted. This is done using the overlayFS which is part of the linux kernel
# since version 3.18.
# when this script is in use, all changes made to anywhere in the root filesystem mount will be lost
# upon reboot of the system. The SD card will only be accessed as read-only drive, which significantly
# helps to prolong its life and prevent filesystem coruption in environments where the system is usually
# not shut down properly
#
# Install:
# copy this script to /sbin/overlayRoot.sh and add "init=/sbin/overlayRoot.sh" to the cmdline.txt
# file in the raspbian image's boot partition.
# I strongly recommend to disable swapping before using this. it will work with swap but that just does
# not make sens as the swap file will be stored in the tempfs which again resides in the ram.
# run these commands on the booted raspberry pi BEFORE you set the init=/sbin/overlayRoot.sh boot option:
# sudo dphys-swapfile swapoff
# sudo dphys-swapfile uninstall
# sudo update-rc.d dphys-swapfile remove
#
# To install software, run upgrades and do other changes to the raspberry setup, simply remove the init=
# entry from the cmdline.txt file and reboot, make the changes, add the init= entry and reboot once more.
fail(){
echo -e "$1"
/bin/bash
}
# load module
modprobe overlay
if [ $? -ne 0 ]; then
fail "ERROR: missing overlay kernel module"
fi
# mount /proc
mount -t proc proc /proc
# create a writable fs to then create our mountpoints
mount -t tmpfs inittemp /mnt
if [ $? -ne 0 ]; then
fail "ERROR: could not create a temporary filesystem to mount the base filesystems for overlayfs"
fi
mkdir /mnt/lower
mkdir /mnt/rw
mount -t tmpfs root-rw /mnt/rw
if [ $? -ne 0 ]; then
fail "ERROR: could not create tempfs for upper filesystem"
fi
mkdir /mnt/rw/upper
mkdir /mnt/rw/work
mkdir /mnt/newroot
# mount root filesystem readonly
rootDev=`awk '$2 == "/" {print $1}' /proc/mounts`
rootMountOpt=`awk '$2 == "/" {print $4}' /proc/mounts`
rootFsType=`awk '$2 == "/" {print $3}' /proc/mounts`
mount -t ${rootFsType} -o ${rootMountOpt},ro ${rootDev} /mnt/lower
if [ $? -ne 0 ]; then
fail "ERROR: could not ro-mount original root partition"
fi
mount -t overlay -o lowerdir=/mnt/lower,upperdir=/mnt/rw/upper,workdir=/mnt/rw/work overlayfs-root /mnt/newroot
if [ $? -ne 0 ]; then
fail "ERROR: could not mount overlayFS"
fi
# create mountpoints inside the new root filesystem-overlay
mkdir /mnt/newroot/ro
mkdir /mnt/newroot/rw
# remove root mount from fstab (this is already a non-permanent modification)
grep -v "$rootDev" /mnt/lower/etc/fstab > /mnt/newroot/etc/fstab
echo "#the original root mount has been removed by overlayRoot.sh" >> /mnt/newroot/etc/fstab
echo "#this is only a temporary modification, the original fstab" >> /mnt/newroot/etc/fstab
echo "#stored on the disk can be found in /ro/etc/fstab" >> /mnt/newroot/etc/fstab
# change to the new overlay root
cd /mnt/newroot
pivot_root . mnt
exec chroot . sh -c "$(cat <<END
# move ro and rw mounts to the new root
mount --move /mnt/mnt/lower/ /ro
if [ $? -ne 0 ]; then
echo "ERROR: could not move ro-root into newroot"
/bin/bash
fi
mount --move /mnt/mnt/rw /rw
if [ $? -ne 0 ]; then
echo "ERROR: could not move tempfs rw mount into newroot"
/bin/bash
fi
# unmount unneeded mounts so we can unmout the old readonly root
umount /mnt/mnt
umount /mnt/proc
umount -l -f /mnt/dev
umount -l -f /mnt
# continue with regular init
exec /sbin/init
END
)"

View File

@@ -2,3 +2,6 @@
"PasswordManagerEnabled": false, "PasswordManagerEnabled": false,
"PasswordManagerAllowShowPasswords": false "PasswordManagerAllowShowPasswords": false
} }
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -11,3 +11,6 @@ request subnet-mask, broadcast-address, time-offset, routers,
dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers, dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
netbios-name-servers, netbios-scope, interface-mtu, netbios-name-servers, netbios-scope, interface-mtu,
rfc3442-classless-static-routes, ntp-servers, url, monitor, watchdog, screen; rfc3442-classless-static-routes, ntp-servers, url, monitor, watchdog, screen;
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -12,3 +12,6 @@ ExecStart=/usr/bin/chromium-monitor
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -1,3 +1,6 @@
[Service] [Service]
ExecStart= ExecStart=
ExecStart=-/sbin/agetty --autologin loginuser --noclear %I $TERM ExecStart=-/sbin/agetty --autologin loginuser --noclear %I $TERM
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -10,3 +10,6 @@ Restart=on-failure
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -4,3 +4,6 @@ then
exit exit
sudo reboot sudo reboot
fi fi
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -47,3 +47,6 @@ chromium-browser $WBS \
--user-data-dir=/tmp/chromium-profile --user-data-dir=/tmp/chromium-profile
exit exit
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -1,26 +1,25 @@
#!/bin/bash
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
clear clear
echo "Starte Systemupdate..."
sudo apt update && sudo apt upgrade -y && sudo apt dist-upgrade -y && sudo apt autoremove -y && sudo apt clean -y echo -e "${RED}${NC} Starting System Update..."
echo "Starte Systemupdate..." sudo apt update >/dev/null 2>&1 && sudo apt upgrade -y >/dev/null 2>&1 && sudo apt dist-upgrade -y >/dev/null 2>&1 && sudo apt autoremove -y >/dev/null 2>&1 && sudo apt clean -y >/dev/null 2>&1
echo "Systemupdate erfolgreich..." echo -e "${GREEN}${NC} System Update Completed..."
echo "Installierse benötigte Pakete..."
sudo apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit chromium-browser fonts-noto-color-emoji nfs-common watchdog xdotool rsync -y echo -e "${RED}${NC} Installing required packages..."
clear sudo apt install --no-install-recommends xserver-xorg x11-xserver-utils xinit chromium-browser fonts-noto-color-emoji nfs-common watchdog xdotool rsync -y >/dev/null 2>&1
echo "Starte Systemupdate..." echo -e "${GREEN}${NC} Required packages installed..."
echo "Systemupdate erfolgreich..."
echo "Installierse benötigte Pakete..." echo -e "${RED}${NC} Creating user 'loginuser'..."
echo "Alle Pakete wurden installiert..." sudo adduser --disabled-password --gecos "" loginuser >/dev/null 2>&1
echo "Lege den Benutzer \"loginuser\" an..." echo -e "${GREEN}${NC} User 'loginuser' created..."
sudo adduser --disabled-password --gecos "" loginuser
clear echo -e "${RED}${NC} Setting permissions for 'loginuser'..."
echo "Starte Systemupdate..." sudo tee /etc/sudoers.d/loginuser >/dev/null << 'EOF'
echo "Systemupdate erfolgreich..."
echo "Installierse benötigte Pakete..."
echo "Alle Pakete wurden installiert..."
echo "Lege den Benutzer \"loginuser\" an..."
echo "Loginuser angelegt..."
echo "Setze Rechte für \"loginuser\""
sudo tee /etc/sudoers.d/loginuser > /dev/null << 'EOF'
loginuser ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart watchdog loginuser ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart watchdog
loginuser ALL=(ALL) NOPASSWD: /usr/bin/echo loginuser ALL=(ALL) NOPASSWD: /usr/bin/echo
loginuser ALL=(ALL) NOPASSWD: /usr/bin/cp loginuser ALL=(ALL) NOPASSWD: /usr/bin/cp
@@ -30,114 +29,57 @@ loginuser ALL=(ALL) NOPASSWD: /usr/sbin/dhclient eth0
loginuser ALL=(ALL) NOPASSWD: /usr/bin/fbset loginuser ALL=(ALL) NOPASSWD: /usr/bin/fbset
loginuser ALL=(ALL) NOPASSWD: /usr/bin/cat /var/lib/dhcp/* loginuser ALL=(ALL) NOPASSWD: /usr/bin/cat /var/lib/dhcp/*
EOF EOF
sudo usermod -aG video loginuser sudo usermod -aG video loginuser >/dev/null 2>&1
clear echo -e "${GREEN}${NC} Permissions for 'loginuser' set..."
echo "Starte Systemupdate..."
echo "Systemupdate erfolgreich..." echo -e "${RED}${NC} Disabling root login..."
echo "Installierse benötigte Pakete..." sudo tee /etc/ssh/sshd_config >/dev/null << 'EOF'
echo "Alle Pakete wurden installiert..."
echo "Lege den Benutzer \"loginuser\" an..."
echo "Loginuser angelegt..."
echo "Setze Rechte für \"loginuser\""
echo "Rechte gesetzt..."
echo "Verbiete login für ROOT..."
sudo tee /etc/ssh/sshd_config >> /dev/null << 'EOF'
PermitRootLogin no PermitRootLogin no
EOF EOF
sudo passwd -l root sudo passwd -l root >/dev/null 2>&1
clear echo -e "${GREEN}${NC} Root login disabled..."
echo "Starte Systemupdate..."
echo "Systemupdate erfolgreich..." echo -e "${RED}${NC} Copying required files..."
echo "Installierse benötigte Pakete..." sudo rm ./rps-light-pxe/.gitignore ./rps-light-pxe/LICENSE ./rps-light-pxe/README.md >/dev/null 2>&1
echo "Alle Pakete wurden installiert..." sudo cp -r ./rps-light-pxe/ / >/dev/null 2>&1
echo "Lege den Benutzer \"loginuser\" an..." echo -e "${GREEN}${NC} Required files copied..."
echo "Loginuser angelegt..."
echo "Setze Rechte für \"loginuser\"" echo -e "${RED}${NC} Setting file permissions..."
echo "Rechte gesetzt..." sudo chown loginuser:loginuser /home/loginuser/.xinitrc >/dev/null 2>&1
echo "Deaktiviere login für ROOT..." sudo chown loginuser:loginuser /home/loginuser/.bash_profile >/dev/null 2>&1
echo "ROOT login deaktiviert..." sudo chmod +x /root/remove_unused_kernel.sh >/dev/null 2>&1
echo "Kopiere erfoderliche Dateie..." sudo chmod +x /usr/bin/watchdog >/dev/null 2>&1
rm ./rps-light-pxe/.gitignore ./rps-light-pxe/LICENSE ./rps-light-pxe/README.md sudo chmod +x /usr/bin/chromium-monitor >/dev/null 2>&1
cp -r ./rps-light-pxe/ / echo -e "${GREEN}${NC} File permissions set..."
clear
echo "Starte Systemupdate..." echo -e "${RED}${NC} Enabling services..."
echo "Systemupdate erfolgreich..." sudo systemctl daemon-reload >/dev/null 2>&1
echo "Installierse benötigte Pakete..." sudo systemctl enable watchdog >/dev/null 2>&1
echo "Alle Pakete wurden installiert..." sudo systemctl enable chromium-monitor >/dev/null 2>&1
echo "Lege den Benutzer \"loginuser\" an..." sudo systemctl enable getty@tty1 >/dev/null 2>&1
echo "Loginuser angelegt..." echo -e "${GREEN}${NC} Services enabled..."
echo "Setze Rechte für \"loginuser\""
echo "Rechte gesetzt..." echo -e "${RED}${NC} Cleaning up old kernels..."
echo "Deaktiviere login für ROOT..." sudo bash /root/remove_unused_kernel.sh -u -e >/dev/null 2>&1
echo "ROOT login deaktiviert..." sudo rm /root/remove_unused_kernel.sh >/dev/null 2>&1
echo "Spiele erforderliche Daten ein..." echo -e "${GREEN}${NC} Old kernels cleaned up..."
echo "Alle Daten wurden eingespielt..."
echo "Setze alle Dateiberechtigungen..." echo -e "${RED}${NC} Cleaning up installer..."
sudo chown loginuser:loginuser /home/loginuser/.xinitrc sudo rm -rf ./rps-light-pxe >/dev/null 2>&1
sudo chown loginuser:loginuser /home/loginuser/.bash_profile echo -e "${GREEN}${NC} Installer cleaned up..."
sudo chmod +x /root/remove_unused_kernel.sh
sudo chmod +x /usr/bin/watchdog echo -e "${GREEN}${NC} Installation complete. Press any key to reboot."
sudo chmod +x /usr/bin/chromium-monitor
clear
echo "Starte Systemupdate..."
echo "Systemupdate erfolgreich..."
echo "Installierse benötigte Pakete..."
echo "Alle Pakete wurden installiert..."
echo "Lege den Benutzer \"loginuser\" an..."
echo "Loginuser angelegt..."
echo "Setze Rechte für \"loginuser\""
echo "Rechte gesetzt..."
echo "Deaktiviere login für ROOT..."
echo "ROOT login deaktiviert..."
echo "Spiele erforderliche Daten ein..."
echo "Alle Daten wurden eingespielt..."
echo "Setze alle Dateiberechtigungen..."
echo "Alle Berechtigungen wurden gesetzt..."
echo "Aktiviere benötigte Services..."
sudo systemctl daemon-reload
sudo systemctl enable watchdog
sudo systemctl enable chromium-monitor
sudo systemctl enable getty@tty1
clear
echo "Starte Systemupdate..."
echo "Systemupdate erfolgreich..."
echo "Installierse benötigte Pakete..."
echo "Alle Pakete wurden installiert..."
echo "Lege den Benutzer \"loginuser\" an..."
echo "Loginuser angelegt..."
echo "Setze Rechte für \"loginuser\""
echo "Rechte gesetzt..."
echo "Deaktiviere login für ROOT..."
echo "ROOT login deaktiviert..."
echo "Spiele erforderliche Daten ein..."
echo "Alle Daten wurden eingespielt..."
echo "Setze alle Dateiberechtigungen..."
echo "Alle Berechtigungen wurden gesetzt..."
echo "Aktiviere benötigte Services..."
echo "Watchdog, Chromium und AutoLogin wurden aktiviert..."
echo "Lösche nicht mehr benötigte Kernel..."
sudo bash /root/remove_unused_kernel.sh -u -e
rm /root/remove_unused_kernel.sh
clear
echo "Starte Systemupdate..."
echo "Systemupdate erfolgreich..."
echo "Installierse benötigte Pakete..."
echo "Alle Pakete wurden installiert..."
echo "Lege den Benutzer \"loginuser\" an..."
echo "Loginuser angelegt..."
echo "Setze Rechte für \"loginuser\""
echo "Rechte gesetzt..."
echo "Deaktiviere login für ROOT..."
echo "ROOT login deaktiviert..."
echo "Spiele erforderliche Daten ein..."
echo "Alle Daten wurden eingespielt..."
echo "Setze alle Dateiberechtigungen..."
echo "Alle Berechtigungen wurden gesetzt..."
echo "Aktiviere benötigte Services..."
echo "Watchdog, Chromium und AutoLogin wurden aktiviert..."
echo "Lösche nicht mehr benötigte Kernel..."
echo "Alte Kernel gelöscht..."
echo "Installation komplett..."
echo "Zum Neustarten bitte eine beliebige Taste drücken..."
read -n 1 -s read -n 1 -s
sudo mkdir -p /etc/systemd/system/getty@tty1.service.d
sudo tee /etc/systemd/system/getty@tty1.service.d/override.conf > /dev/null << 'EOF'
[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin loginuser --noclear %I $TERM
EOF
sudo systemctl daemon-reload
sudo systemctl restart getty@tty1
sudo systemctl enable getty@tty1
sudo reboot sudo reboot
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -1 +1,4 @@
Authentication=None Authentication=None
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -31,3 +31,6 @@ while true; do
fi fi
sleep 5s sleep 5s
done done
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.

View File

@@ -17,3 +17,6 @@ else
done done
fi fi
sudo systemctl restart watchdog sudo systemctl restart watchdog
# Version 1.0:
# Created 2024 by Tim Eertmoed, Christian Hampp @ WiS IT-Solutions GmbH, Germany to work on Raspian as custom pxe init script.