Visit Jeremy's Blog.
Go Back > Blogs > linux-related notes
User Name


Just annotations of little "how to's", so I know I can find how to do something I've already done when I need to do it again, in case I don't remember anymore, which is not unlikely. Hopefully they can be useful to others, but I can't guarantee that it will work, or that it won't even make things worse.
Rate this Entry

Miscellaneous links and things that helped me on this new install, with SSD issues, systemd, and removable JFS hdd issues, and whatever else

Posted 10-25-2020 at 09:15 AM by the dsc
Updated 10-27-2020 at 11:56 PM by the dsc (addition)

"rc.local" doesn't run by default anymore, so:

Which in turn may be useful or necessary to have /var/cache/apt/archives as a tmpfs, with this:

mkdir -p /var/cache/apt/partial 
mkdir -p /var/cache/apt/archives 
mkdir -p /var/cache/apt/archives/partial 

chown -R _apt /var/cache/apt

touch /dev/shm/rc-local-run
Since apparently apt-p2p isn't a thing anymore, and for a long time already, and I don't often reinstall things once they're installed, I don't see much of a reason to still have the apt archives, which are nevertheless set to be cleaned up after use with this apt.conf:

APT::Clean "always";
APT::Clean-Installed "on";
Better do that on tmpfs than on ssd, I guess.

Other things that can be set to be on tmpfs:
(I never tried to plagiarize this blog's name)

What I actually have so far:

tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
tmpfs /var/lock tmpfs defaults,noatime,mode=0755 0 0
tmpfs /var/log tmpfs defaults,noatime,mode=0755 0 0

tmpfs /var/cache/apt/archives/ tmpfs defaults  0 0
I never know what these mode differences mean, I just copied from somewhere assuming whoever put it there knows what they're doing, but the fact I'm myself posting it around suggests I should perhaps be more skeptical.

One of these blogs says /var/log can be "risky" to have as tmpfs, some old scripts may complain or something. I'll take the chance and hope for the best, hopefully it can be fixed by un-tmpfs-ing it if anything happens.

I've also added ~/.cache as a tmpfs. Doing so it may be interesting to change the configs of some applications to use a different, permanent cache folder, such as for rofi's history. Unfortunately the way I thought it could work isn't really functional, it would be exportinga different XDG config home, but then things rofi iself execute would inherit it, unfortunately. The proper solution works with current Debian testing's version of rofi, 1.5.4-1, the "-cache-dir" option. It probably can be set up in a proper config file, but it also work in a script/command line. No equal sign between the option and the cache-dir, but space.

Lastly, for whatever reason, an old hdd that's on an external USB dock thing was suddenly giving an IO error, and refusing to be mounted by Dolphin, which is what I used to mount it, as I'm trying to have things more in the default way this time around. Luckily, it apparently was all a matter of issuing as root "jfs_fsck /dev/sd##", which said the filesystems were "clean," and then I could mount normally. There's a slim chance that adding those partitions on fstab and mounting them that way somehow "helped," but probably it did nothing other than just mount in another way than Dolphin's way, whatever is its "backend" to do that.

I've also set up TRIM on the sdd. The command to do that was:
systemctl enable fstrim.timer
As root. I'm not sure where I found that immediately. Anyway, this other thread has some more stuff related with both "trim" and tmpfs, that I should read and maybe apply additionally:

Zswap added to grub and checked:

"cat /sys/module/zswap/parameters/enabled" gives an "Y"

Swappiness set to "10":

sysctl vm.swappiness=10
and on /etc/sysctl.conf:

Posted in Uncategorized
Views 1522 Comments 0
« Prev     Main     Next »
Total Comments 0




All times are GMT -5. The time now is 02:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration