mirror of
https://bitbucket.org/mangelo/snippets.git
synced 2024-11-21 18:31:00 +02:00
Xubuntu readonly filesystem.
This commit is contained in:
parent
b55f36bab9
commit
c3cef713be
@ -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=<UUID_/dev/sdc1> / ext4 ro,noatime,errors=remount-ro 0 0
|
||||
UUID=<UUID_/dev/sda3> none swap sw 0 0
|
||||
UUID=<UUID_/dev/sdc1> / ext4 ro,noatime,errors=remount-ro 0 0
|
||||
UUID=<UUID_/dev/sda3> none swap sw 0 0
|
||||
<NFSSERVER>:/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
|
||||
|
Loading…
Reference in New Issue
Block a user