mirror of
https://bitbucket.org/mangelo/snippets.git
synced 2024-11-24 03:40:59 +02:00
Xubuntu readonly filesystem.
This commit is contained in:
parent
7e9c859e60
commit
b55f36bab9
@ -11,12 +11,6 @@ Xubuntu 16.04 with read only root filesystem for SSD disk
|
|||||||
|
|
||||||
* install xubuntu 16.04 in /dev/sdc1.
|
* install xubuntu 16.04 in /dev/sdc1.
|
||||||
|
|
||||||
* mkdir -p /var/mounts/sda2 ; chmod 755 /var/mounts/sda2
|
|
||||||
|
|
||||||
* mkdir -p /var/mounts/ro ; chmod 755 /var/mounts/ro
|
|
||||||
|
|
||||||
* mkdir -p /var/mounts/rw ; chmod 755 /var/mounts/rw
|
|
||||||
|
|
||||||
* mount /dev/sda2 /mnt
|
* mount /dev/sda2 /mnt
|
||||||
|
|
||||||
* mkdir /mnt/tmp ; chmod 1777 /mnt/tmp
|
* mkdir /mnt/tmp ; chmod 1777 /mnt/tmp
|
||||||
@ -48,8 +42,15 @@ Xubuntu 16.04 with read only root filesystem for SSD disk
|
|||||||
start)
|
start)
|
||||||
echo "Starting read only filesystem."
|
echo "Starting read only filesystem."
|
||||||
|
|
||||||
mount -t tmpfs -o size=1M tmpfs /var/mounts/rw
|
mkdir -p /var/mounts/sda2
|
||||||
mount -t aufs -o br=/var/mounts/rw=rw:/var/mounts/ro=ro -o udba=reval none /media
|
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
|
chmod 0755 /media
|
||||||
|
|
||||||
mount -o noatime /dev/sda2 /var/mounts/sda2
|
mount -o noatime /dev/sda2 /var/mounts/sda2
|
||||||
|
Loading…
Reference in New Issue
Block a user