Turning back to harddisk sleep vs. write access of OS subsystems: Here is my 
'todays workout' for the smart OS.

On most of my machines (no online servers) i did not need the last weeks of 
logs, for years. The only reason would be intrusion detection, but hey, i'm 
talking about laptops and office PCs with nothing worth to break the router. 
So, to stop the continuous harddisk access, i just de-installed rsyslog daemon.

Then, i made /var/log a tmpfs and out of curiosity, just to see if ot works, 
reinstalled rsyslog again. As expceted, after each boot, the standard logs get 
created at syslog start (which is in desktop runlevel rc2, in debian) and so 
far noone is barfing. 
Anyway, it can be easily reverted, only one '#' in /etc/fstab, and reboot.

Here is what happened (tm Monk):

(1) Booted into 'single' mode (runlevel 1) because here, no syslog should be 
running (that is, per debian default; if your system is different then issue 
'/etc/init.d/*syslog stop' to shutdown the log daemon)

(2) Edited /etc/fstab with mcedit (package 'mc' - else you could use nano or vi 
or whatever) and added this line:

tmpfs        /var/log       tmpfs   
noatime,nodiratime,uid=0,gid=4,mode=755,size=50M  0   0

Please note:

a.   If you mount /var as separate partition (which i always do) then the new 
entry has to be AFTER the /var one, because /var/log can only be mounted after 
/var. (The line order in fstab equals time order)

b.   'uid' for root, gid for 'adm', permissions 755 are 'rwx r-x r-x'. I may 
have lost the original permissions of /var/log some year ago when i fiddled 
with tiger; correct me if 755 is wrong.


(3) I copied /var/log to /var/log-BAK, just in case. It can be deleted after 
some days, if you're sure anything is fine.

(4) Afterward, i deleted all content of  /var/log, with mc. You may use 
commandline 'rm -rf' but be very careful with this.You can as well leave the 
old /var/log/* since it will be mounted-over. I just felt like cleaning the 
disk up. This steps generally leaves /var/log as mountpoint with original 
permissions, in case you'd revert the thing some day.

(5) Rebooted.


By the way, i also de-installed much desktop/server/network stuff that i never 
really needed on my 'office' machines. Namely exim4, the highly active 
avahi-daemon, ssh-server, network-manager (i use plain ifup), ntp (i use rdate 
on all my machines). Other candidates for office - depending on your needs - 
could be bluetooth, wireless, samba, nfs. It also turned out that i can live 
without 'hal'.
In total, it was a huge amount of packages which i got rid of. Finally, my 
smart desktop boots a lot faster too.

There is some argument that sometimes you suddenly need an ssh-server, or 
samba, and what if the internet is down and you can't install. So, 
alternatively, one could only switch the init scripts off. Lookup the 
/etc/rc2.d README for the debian way.

However, it's real funny to walk around and mark 'deinstall' anything you don't 
know what it's good for, and look which packages get broken, and if those can't 
be just deinstalled too (which was the case for avahi-daemon, only required by 
llibreoffice java on my desktops, which i never ever needed anyway.)

Maybe one should start with the package manager anyway, and configure it not to 
install 'recommendet' packages automaticly. That would free most systems of 
several hundred packages and lots of unneeded stuff.


-- 
To UNSUBSCRIBE, email to debian-laptop-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20130416065226.1bfeb...@mirrors.kernel.org

Reply via email to