linux

warning: Creating default object from empty value in /data/web/1/000/027/003/273448/htdocs/panticz.de/modules/taxonomy/taxonomy.pages.inc on line 33.

Install fcpci (AVM Fritz Card PCI kernel module)

#!/bin/bash
 
# install capiutils
apt-get install -y capiutils
sed -i 's|#fcpci|fcpci|g' /etc/isdn/capi.conf
 
# install kernel module for AVM Fritz card PCI or compile: http://www.panticz.de/ubuntu_compile_fcpci
apt-get install wget
wget http://dl.dropbox.com/u/4170695/www/fcpci.tar.bz2 -P /tmp
tar xjf /tmp/fcpci.tar.bz2 -C /tmp/
/tmp/fcpci/install.sh
reboot
 
apt-get install -y asterisk asterisk-chan-capi
# do we need this?

Asterisk DomU

http://www.panticz.de/DomU-Debian-Wheezy
 
# hide your ISDN card in dom0 and reboot dom0
# sed -i 's|tty0|tty0 pciback.hide=(04:02.0)|g' /boot/grub/menu.lst
# reboot
 
# in domU
passwd
 
# install lspci
apt-get install -y pciutils
 
# OPTIONAL: Diva Server 4BRI-8M 2.0 PCI
http://www.panticz.de/node/342
 
 
 
# apt-get install -y linux-headers-$(uname -r) dpkg-dev
 
 
 
 
apt-get source linux-image-$(uname -r)
 
#cd /usr/src/
#tar xzf linux_2.6.24.orig.tar.gz
#ln -s /usr/src/linux-2.6.24.2/ /usr/src/linux
ln -s /usr/src/linux-$(uname -r)/ /usr/src/linux
 
#mv /etc/apt/sources.li

ATI / Medion X10 MD8800 remote controll

# disable ati_remote
echo "blacklist ati_remote" >> /etc/modprobe.d/blacklist

# update lircd config
wget http://lirc.sourceforge.net/remotes/atiusb/lircd.conf.atilibusb -O /usr/share/lirc/remotes/atiusb/lircd.conf.atilibusb

# reconfigure
sudo dpkg-reconfigure lirc
Remote control configuration: ATI/NVidia/X10 RF Remote (userspace)
IR transmitter, if present: None

# xbmc medion x10 double key can by fixed with ~/.xbmc/userdata/advancedsettings.xml

4

Download

Rsync SSH backup script

cat <<EOF> ~/privat/scripts/backup.ssh.sh
#!/bin/bash
 
nice -n 20 rsync -avze ssh --delete --exclude-from=/home/pako/.gvfs /home/pako pako@fs:/mnt/pakonb
EOF

ALSA

umount channels
amixer set Master 75 unmute
amixer set PCM 75 unmute
amixer set IEC958 100 unmute

# save settings
alsactl store

# test
aplay /usr/share/sounds/alsa/Noise.wav

Links
http://wiki.archlinux.org/index.php/ALSA_Einrichten

cpupowerd

#!/bin/bash
 
http://sourceforge.net/projects/cpupowerd
 
# load kernel modules
modprobe msr
modprobe powernow-k8
modprobe cpufreq_userspace
 
# get current cpu state
./cpupowerd -s
 
# create config
cat <<EOF > /etc/cpupowerd.conf
1000 0.8500
1800 1.1500
2000 1.1500
2200 1.2000 
EOF
 
# executable
http://dl.panticz.de/sts/cpupowerd.bz2
 
# test environment
http://dl.panticz.de/sts/cpupowerd_test.tar.bz2
 
# Links
http://aur.archlinux.org/packages/cpupowerd/cpupowerd/cpupowerd
http://www.meisterkuehler.de/forum/linux-unix/20124-cpupowerd-ein-tool-fuers-cpu-undervolten-unte

Init script to disable Asus light sensor

#!/bin/bash
 
cat <<EOF> /etc/init.d/lightsensor
#!/bin/sh
echo 0 > /sys/devices/platform/asus-laptop/ls_switch
exit 0
EOF
 
chmod 755 /etc/init.d/lightsensor
 
sudo update-rc.d lightsensor defaults 90

Ubuntu 14.04 LTS (Trusty Tahr)

Enable root ssh login
sed -i 's|PermitRootLogin without-password|PermitRootLogin yes|g' /etc/ssh/sshd_config
echo "root:t00r" | chpasswd
service ssh restart

Repository
# Ubuntu Trusty updates repository
cat < /etc/apt/sources.list.d/trusty-updates.list
deb http://de.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu trusty-updates main restricted universe multiverse
EOF

apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 3B4FE6ACC0B21F32 40976EAF437D05B5

Fileserver (Samba and DHCP)

#!/bin/bash
 
# set domU name
DOMAIN_NAME=srv
 
# install vm
xen-create-image --hostname=$DOMAIN_NAME --dhcp --mac=00:11:cc:ab:cd:ef \
--lvm=vg01 --dist=jaunty --mirror=http://archive.ubuntu.com/ubuntu/ --size=4Gb --memory=1Gb --swap=1Gb
 
# rename config file
mv /etc/xen/${DOMAIN_NAME}.cfg /etc/xen/${DOMAIN_NAME}
 
# add to autostart
ln -s /etc/xen/${DOMAIN_NAME} /etc/xen/auto
 
# create lvm for home
lvcreate --name ${DOMAIN_NAME}-media --size 200G vg01
mkfs.ext3 /dev/vg01/${DOMAIN_NAME}-media
 
# configure domU
vi /etc/xen/${DOMAIN_NAME}
(add)
'phy:/dev/vg01/srv-media,xvda3,

Update debootstrap

# update debootstrap
wget -q --no-check-certificate https://raw.githubusercontent.com/panticz/xen/master/scripts/update_debootstrap.sh -O - | bash -
 
#
# OLD?
#
# create recipe
cd /usr/lib/xen-tools/
[ ! -f  lucid.d ] && ln -s karmic.d lucid.d
[ ! -f  maverick.d ] && ln -s karmic.d maverick.d
[ ! -f  natty.d ] && ln -s karmic.d natty.d
[ ! -f  oneiric.d ] && ln -s karmic.d oneiric.d
[ ! -f  precise.d ] && ln -s karmic.d precise.d
[ ! -f  quantal.d ] && ln -s karmic.d quantal.d
[ ! -f  raring.d ] && ln -s karmic.d raring.d
[ ! -f  precise.d ] && ln -s karmic.d trusty.d
[ !
Syndicate content