You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-24Lines changed: 40 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,22 +58,23 @@ Systemd mount this folder in RAM by default. If you are lucky, you don't have an
58
58
Sys. de fichiers Type Taille Utilisé Dispo Uti% Monté sur
59
59
udev devtmpfs 16G 0 16G 0% /dev
60
60
tmpfs tmpfs 3,2G 9,6M 3,2G 1% /run
61
-
/dev/nvme0n1p6 ext4 183G 5,2G 168G 3% /
61
+
/dev/nvme0n1p6 ext4 183G 5,4G 168G 4% /
62
62
tmpfs tmpfs 16G 0 16G 0% /dev/shm
63
63
tmpfs tmpfs 5,0M 4,0K 5,0M 1% /run/lock
64
64
tmpfs tmpfs 16G 0 16G 0% /sys/fs/cgroup
65
-
tmpfs tmpfs 16G 109M 16G 1% /var/cache
66
-
tmpfs tmpfs 16G 120K 16G 1% /tmp
67
-
tmpfs tmpfs 16G 35M 16G 1% /var/log
65
+
tmpfs tmpfs 16G 44K 16G 1% /tmp
66
+
tmpfs tmpfs 16G 127M 16G 1% /var/cache
67
+
tmpfs tmpfs 16G 38M 16G 1% /var/log
68
68
/dev/nvme0n1p5 ext4 233M 24M 193M 11% /boot
69
69
/dev/nvme0n1p2 vfat 95M 25M 71M 27% /boot/efi
70
70
/dev/nvme0n1p7 ext4 262G 47G 202G 19% /home
71
-
tmpfs tmpfs 16G 406M 16G 3% /home/xinouch/.cache
72
-
/dev/nvme0n1p4 fuseblk 500G 42G 458G 9% /mnt/w10
71
+
tmpfs tmpfs 16G 58M 16G 1% /home/xinouch/.mozilla
72
+
tmpfs tmpfs 16G 434M 16G 3% /home/xinouch/.cache
73
+
/dev/nvme0n1p4 fuseblk 500G 93G 407G 19% /mnt/w10
73
74
/dev/sda2 fuseblk 924G 287G 637G 32% /mnt/data
74
-
/dev/sda3 ext4 7,9G 584M 6,9G 8% /mnt/persistent
75
+
/dev/sda3 ext4 7,9G 691M 6,8G 10% /mnt/persistent
75
76
tmpfs tmpfs 3,2G 0 3,2G 0% /run/user/114
76
-
tmpfs tmpfs 3,2G 16K 3,2G 1% /run/user/1000
77
+
tmpfs tmpfs 3,2G 12K 3,2G 1% /run/user/1000
77
78
```
78
79
79
80
All the lines with a `tmpfs` filesystem are mounted on the RAM. So, if you have the line
@@ -102,7 +103,9 @@ Reboot and voilà!
102
103
Cache in ramdisk
103
104
================
104
105
105
-
You have 2 cache folders: the system one in `/var/cache` and the user one in `/home/$USER/.cache`. We will also take care of the logs in `/var/log`. If you don't want it, check the last subsection of this section.
106
+
You have 2 cache folders: the system one in `/var/cache` and the user one in `/home/$USER/.cache`. We will also take care of the logs in `/var/log` along with the firefox session folder. If you don't want it, check the last subsection of this section.
107
+
108
+
We need to distinguish 2 types of folders here: the system folders and the user folders. The user folders will be mounted later in the boot, while the system folders will be mounted as soon as possible. For me, it takes 1 minute to load user data.
Here, we assume that everything will be saved into a partition mounted in `/mnt/persistent`. You can save it in your home if you want, though you shouldn't store root data in your home... Anyway, be sure that the filesystem for the persistency is NOT `NTFS` but a Linux thing like `ext4`, or you will destroy the permissions... It is also recommended to mount it with the following permissions, as it should be just a backup: `defaults,nodev,noexec,nosuid,noatime,nodiratime`.
@@ -161,15 +170,17 @@ Now that everything is correctly configured, we need to install everything in th
Before rebooting, we need to save the cache (and check everything works :p), so run `ramdisk_cache.sh` as root and check that your persistent folders are filled with the correct data.
@@ -178,7 +189,7 @@ We also need to setup a `cron` so the script is run every X minutes (here every
At the install step, don't copy, link or enable the file `var-log.mount`.
198
209
199
-
### Change the service copycache ###
210
+
### Change the service systemramdisk ###
200
211
201
-
In the section `Unit` of `copycache.service`, change the keys `Before` and `RequiresMountsFor`. If you already installed it, do the changes to the file `/etc/systemd/system/copycache.service`:
212
+
In the section `Unit` of `systemramdisk.service`, change the keys `Before` and `RequiresMountsFor`. If you already installed it, do the changes to the file `/etc/systemd/system/systemramdisk.service`:
202
213
203
214
```
204
215
Before=sysinit.target shutdown.target
205
216
...
206
-
RequiresMountsFor=/var/cache /home/{USER}/.cache
217
+
RequiresMountsFor=/var/cache
207
218
```
208
219
209
220
### Change the script ###
@@ -212,6 +223,11 @@ Remove everything related to logs. If you already did the install, change the fi
212
223
213
224
Finish by executing `systemctl daemon-reload` as root.
214
225
226
+
Change the user ramdisks
227
+
------------------------
228
+
229
+
In the same way, edit the files corresponding to the user ramdisks if you don't want it.
0 commit comments