diff --git a/xubuntu-read-only-filesystem.txt b/xubuntu-read-only-filesystem.txt index 62e3ddf..28981be 100644 --- a/xubuntu-read-only-filesystem.txt +++ b/xubuntu-read-only-filesystem.txt @@ -21,6 +21,14 @@ Xubuntu 16.04 with read only root filesystem for SSD disk * rm -fr /home/* /tmp/* /tmp/.* <-- CAUTION! +* mkdir -p /var/mounts/sda2 ; chmod 0755 /var/mounts/sda2 + +* mkdir -p /var/mounts/mediarw ; chmod 0755 /var/mounts/mediarw + +* mkdir -p /var/mounts/mediaro ; chmod 0755 /var/mounts/mediaro + +* mkdir -p /var/mounts/mediaro/share1 ; chmod 0755 /var/mounts/mediaro/share1 + * /usr/local/bin/readonlyfs #!/bin/bash @@ -42,13 +50,6 @@ Xubuntu 16.04 with read only root filesystem for SSD disk start) echo "Starting read only filesystem." - mkdir -p /var/mounts/sda2 - mkdir -p /var/mounts/mediaro - mkdir -p /var/mounts/mediarw - chmod 755 /var/mounts/sda2 - chmod 755 /var/mounts/mediaro - chmod 755 /var/mounts/mediarw - mount -t tmpfs -o size=1M tmpfs /var/mounts/mediarw mount -t aufs -o br=/var/mounts/mediarw=rw:/var/mounts/mediaro=ro -o udba=reval none /media chmod 0755 /media @@ -74,7 +75,7 @@ Xubuntu 16.04 with read only root filesystem for SSD disk esac exit 0 -* chmod 0744 /usr/local/bin/readonlyfs +* chmod 744 /usr/local/bin/readonlyfs * ln -s /usr/local/bin/readonlyfs /etc/init.d/readonlyfs @@ -85,8 +86,9 @@ Xubuntu 16.04 with read only root filesystem for SSD disk * update-rc.d readonlyfs enable * /etc/fstab - UUID= / ext4 ro,noatime,errors=remount-ro 0 0 - UUID= none swap sw 0 0 + UUID= / ext4 ro,noatime,errors=remount-ro 0 0 + UUID= none swap sw 0 0 + :/path/to/share1 /media/share1 nfs _netdev,rw,noauto,user,users,noexec,nosuid,nolock,noatime,nfsvers=3,sec=sys,udp,rsize=32768,wsize=32768 0 0 * /etc/default/grub GRUB_TIMEOUT=N @@ -102,8 +104,7 @@ Xubuntu 16.04 with read only root filesystem for SSD disk mount -o remount,ro / * Network Manager: wired connection with fixed IP address: - * Create and chmod 600 the file: - "/etc/NetworkManager/system-connections/Wired Connection" + "/etc/NetworkManager/system-connections/Wired Connection" + chmod 600 [ethernet] duplex=full