mikrotik_snippets/xubuntu-read-only-filesystem.txt

84 lines
3.1 KiB
Plaintext
Raw Normal View History

2016-05-16 20:31:33 +03:00
XUbuntu 16.04 with read only filesystem for use with SSD disk
---------------------------------------------------------------
2016-05-16 02:55:04 +03:00
* Example:
2016-05-22 02:45:45 +03:00
/dev/sda: HDD disk (mechanical disk)
/dev/sdc: SSD disk (solid state disk)
2016-05-16 02:55:04 +03:00
/dev/sdc1: /
2016-05-16 20:31:33 +03:00
/dev/sda2: /home /tmp /var/tmp
2016-05-16 02:55:04 +03:00
/dev/sda3: swap
2016-05-16 20:31:33 +03:00
* Install XUbuntu 16.04 in /dev/sdc1.
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* mkdir /hddsda2
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* mount /dev/sda2 /hddsda2
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* mkdir /hddsda2/tmp
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* chmod 1777 /hddsda2/tmp
2016-05-16 02:55:04 +03:00
2016-05-22 02:45:45 +03:00
* mkdir -p /hddsda2/home/username
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* rsync -av /home/username/ /hddsda2/home/username/
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* chmod 0700 /hddsda2/home/username
2016-05-16 02:55:04 +03:00
2016-05-22 00:10:56 +03:00
* chown -R username.username /hddsda2/home/username
2016-05-16 02:55:04 +03:00
2016-05-16 20:31:33 +03:00
* blkid
2016-05-16 02:55:04 +03:00
/dev/sda1: UUID="D4EA43ACEA438A26" TYPE="ntfs"
/dev/sda2: UUID="c1a48592-1d54-4b61-822b-e02ce0c8094d" TYPE="ext4"
/dev/sda3: UUID="7af9d5db-eac4-49f1-aafd-3cb82f08c9df" TYPE="swap"
/dev/sdc1: UUID="9d0a8f06-d686-4a6d-97d5-2320598335fb" TYPE="ext4"
* /etc/fstab
UUID=9d0a8f06-d686-4a6d-97d5-2320598335fb / ext4 ro,noatime,errors=remount-ro 0 1
2016-05-22 00:10:56 +03:00
UUID=c1a48592-1d54-4b61-822b-e02ce0c8094d /hddsda2 ext4 rw,noatime,errors=remount-ro 0 1
2016-05-16 02:55:04 +03:00
UUID=7af9d5db-eac4-49f1-aafd-3cb82f08c9df none swap sw 0 0
tmpfs /var/lib/lightdm tmpfs nosuid,nodev,mode=0750,rw,size=32M,uid=lightdm,gid=lightdm 0 0
2016-05-22 00:10:56 +03:00
tmpfs /var/log tmpfs nosuid,nodev,mode=0777,rw,size=32M,uid=root,gid=syslog 0 0
/hddsda2/home /home none bind 0 0
/hddsda2/tmp /tmp none bind 0 0
/hddsda2/tmp /var/tmp none bind 0 0
/var/log /media none bind 0 0
2016-05-16 02:55:04 +03:00
/var/log /var/spool none bind 0 0
/var/log /var/lib/blueman none bind 0 0
2016-05-22 00:10:56 +03:00
/var/lib/lightdm /var/lib/lightdm-data none bind 0 0
2016-05-16 02:55:04 +03:00
* /usr/local/bin/remountrw
mount -o remount,rw /
* /usr/local/bin/remountro
sync
sleep 1
mount -o remount,ro /
2016-05-16 20:31:33 +03:00
* Issues:
* The guest session not work: /etc/password and /etc/shadow are read only.
2016-05-19 19:18:31 +03:00
* Lightdm can not remember the last user logged.
* Network Manager: wired connection with fixed IP address:
* Create and chmod 600 the file:
"/etc/NetworkManager/system-connections/Wired Connection"
[ethernet]
duplex=full
mac-address=xx:xx:xx:xx:xx:xx
[connection]
id=Wired Connection
uuid=66b010e7-d2b0-4e5a-a2d8-f1d8191a241d
type=ethernet
timestamp=1440124541
[ipv6]
method=auto
ip6-privacy=0
[ipv4]
method=manual
dns=<IP_ADDRESS>;
address1=<IP_ADDRESS>/<MASK 0-30>,<DEFAULT_GATEWAY>
may-fail=false