sbin/overlayRoot.sh aktualisiert
This commit is contained in:
@@ -1,17 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# This script will mount the root filesystem read-only and overlay it with a temporary tempfs
|
# Dieses Skript wird das Root-Dateisystem schreibgeschützt einbinden und es mit einem temporären tmpfs-Overlay versehen.
|
||||||
# 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.
|
|
||||||
#
|
#
|
||||||
# Execute the following commands as root:
|
# Installation:
|
||||||
# sudo dphys-swapfile swapoff
|
# Kopiere dieses Skript nach /sbin/overlayRoot.sh und füge "init=/sbin/overlayRoot.sh" zur cmdline.txt-Datei
|
||||||
# sudo dphys-swapfile uninstall
|
# in der Boot-Partition des Raspbian-Images hinzu.
|
||||||
# sudo update-rc.d dphys-swapfile remove
|
|
||||||
#
|
#
|
||||||
# To install software, run upgrades and do other changes to the raspberry setup, simply remove the init=/sbin/overlayRoot.sh
|
# Führe die folgenden Befehle als root aus:
|
||||||
# entry from the cmdline.txt file and reboot, make the changes, add the init= entry and reboot once more.
|
# 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
|
set -e
|
||||||
fail() {
|
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
|
grep -v "$rootDev" /overlay/lower/etc/fstab > /overlay/newroot/etc/fstab
|
||||||
cat <<EOF >> /overlay/newroot/etc/fstab
|
cat <<EOF >> /overlay/newroot/etc/fstab
|
||||||
# Das originale Root-Dateisystem wurde durch overlayRoot.sh entfernt.
|
# 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
|
EOF
|
||||||
|
|
||||||
# Root wechseln und alte Root aufräumen
|
# Root wechseln und alte Root aufräumen
|
||||||
|
|||||||
Reference in New Issue
Block a user