sbin/overlayRoot.sh aktualisiert
This commit is contained in:
@@ -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 <<EOF >> /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
|
||||
|
||||
Reference in New Issue
Block a user