2012年12月24日 星期一

[debian] disable pc beeper

Just append one line to /etc/modprobe.d/blacklist :


> echo "blacklist pcspkr" >> /etc/modprobe.d/blacklist


> reboot


Ref:

http://arsgeek.hubpages.com/hub/How-to-turn-off-the-annoying-system-beep-in-linux-DebianUbuntu

[debian] How to move /etc into ramfs easily


> vi /etc/init.d/rcS

Add these lines before "exec /etc/init.d/rc S":

echo "* Initialize RAM /etc..."
[ ! -d /etc-model ] && mkdir /etc-model
mount --rbind /etc /etc-model
mount -n -t tmpfs none /etc
cp -a /etc-model/* /etc/

> vi /etc-model/init.d/umountfs

Add "/etc" in the line:
case "$MTPT" in |/proc|/dev/|..........|/etc)


基本上它運作的邏輯是: 開機時, rcS會自動把 /etc 掛成RAM,然後把舊的 /etc (位在/etc-model)copy進來。
所以之後要手動改系統預設的設定,都是要改 /etc-model 底下的。