From 735f5be8397d30770f070d56b8e990eb754a31ff Mon Sep 17 00:00:00 2001 From: Tim Eertmoed Date: Thu, 12 Dec 2024 23:29:18 +0100 Subject: [PATCH] sbin/overlayRoot.sh aktualisiert --- sbin/overlayRoot.sh | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sbin/overlayRoot.sh b/sbin/overlayRoot.sh index 97150b2..75dee26 100644 --- a/sbin/overlayRoot.sh +++ b/sbin/overlayRoot.sh @@ -1,17 +1,19 @@ #!/bin/bash -# This script will mount the root filesystem read-only and overlay it with a temporary tempfs -# 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. +# Dieses Skript wird das Root-Dateisystem schreibgeschützt einbinden und es mit einem temporären tmpfs-Overlay versehen. # -# Execute the following commands as root: -# sudo dphys-swapfile swapoff -# sudo dphys-swapfile uninstall -# sudo update-rc.d dphys-swapfile remove +# Installation: +# Kopiere dieses Skript nach /sbin/overlayRoot.sh und füge "init=/sbin/overlayRoot.sh" zur cmdline.txt-Datei +# in der Boot-Partition des Raspbian-Images hinzu. # -# To install software, run upgrades and do other changes to the raspberry setup, simply remove the init=/sbin/overlayRoot.sh -# entry from the cmdline.txt file and reboot, make the changes, add the init= entry and reboot once more. +# Führe die folgenden Befehle als root aus: +# sudo dphys-swapfile swapoff +# sudo dphys-swapfile uninstall +# sudo update-rc.d dphys-swapfile remove +# +# Um Software zu installieren, Upgrades durchzuführen und andere Änderungen an der Raspberry-Konfiguration vorzunehmen, +# entferne einfach den Eintrag "init=/sbin/overlayRoot.sh" aus der cmdline.txt-Datei und starte das System neu. +# Nimm die gewünschten Änderungen vor, füge den init= Eintrag wieder hinzu und starte erneut neu. set -e fail() { @@ -49,7 +51,7 @@ mkdir -p /overlay/newroot/overlay/ro /overlay/newroot/overlay/rw grep -v "$rootDev" /overlay/lower/etc/fstab > /overlay/newroot/etc/fstab cat <> /overlay/newroot/etc/fstab # Das originale Root-Dateisystem wurde durch overlayRoot.sh entfernt. -# Diese Änderung ist temporär. Die originale fstab ist in /ro/etc/fstab verfügbar. +# Diese änderung ist temporär. Die originale fstab ist in /overlay/ro/etc/fstab verfügbar. EOF # Root wechseln und alte Root aufräumen