+<a name="265"></a><hr />
+<pre>
+Configure a MadWifi device for adhoc mode:
+
+Disable the autocreation of athX devices:
+# echo "options ath_pci autocreate=none" > /etc/modprobe.d/madwifi
+
+Remove the autocreated device for now:
+# wlanconfig ath0 destroy
+
+Configuration in /etc/network/interfaces:
+
+iface ath0 inet static
+ madwifi-base wifi0
+ madwifi-mode adhoc
+ ...
+
+Hints:
+ - Do not use interface names without ending 0 (otherwise startup fails).
+ - Only chooss unique names for interfaces.
+</pre>
+<a name="266"></a><hr />
+<pre>
+Find dangling symlinks using zsh:
+
+% ls **/*(-@)
+</pre>
+<a name="267"></a><hr />
+<pre>
+Use approx with runit supervision
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+Install the packages:
+# apt-get install approx runit
+
+Add user approxlog for the logging daemon:
+# adduser --system --home /nonexistent --no-create-home approxlog
+
+Create config directory:
+# mkdir /etc/sv/approx
+
+Use /var/run/sv.approx as supervise directory:
+# ln -s /var/run/sv.approx /etc/sv/approx/supervise
+
+# cat > /etc/sv/approx/run << EOF
+#!/bin/sh
+echo 'approx starting'
+exec approx -f 2>&1
+EOF
+
+You normally do not need a logging service for approx because it logs
+to syslog too. So just for completion:
+# mkdir -p /etc/sv/approx/log
+# ln -s /var/run/sv.approx.log /etc/sv/approx/log/supervise
+# cat > /etc/sv/approx/log/run << EOF
+#!/bin/sh
+set -e
+LOG="/var/log/approx"
+test -d "$LOG" || mkdir -p -m2750 "$LOG" && chown approxlog:adm "$LOG"
+exec chpst -uapproxlog svlogd -tt -v "$LOG"
+EOF
+
+Now activate the new approx service (will be started within 5s):
+# ln -s /etc/sv/approx/ /var/service/
+
+Make approx managed via runit available via init-script interface:
+# dpkg-divert --local --rename /etc/init.d/approx
+# ln -s /usr/bin/sv /etc/init.d/approx
+</pre>
+<a name="268"></a><hr />
+<pre>
+Remote-reboot a grml system using SysRQ via /proc (execute as root):
+
+eject &>/dev/null
+umount -l /cdrom
+eject /dev/cdrom
+echo b > /proc/sysrq-trigger
+
+Tags: reboot, howto, grml, network
+</pre>
+<a name="269"></a><hr />
+<pre>
+Show what happens on /dev/sda0:
+
+# mount the debugfs to relay kernel info to userspace
+mount -t debugfs none /sys/kernel/debug
+
+# is a convenient wrapper arround blktrace and blkparse
+btrace /dev/sda0
+
+Tags: debug, block, partition, trace
+</pre>
+<a name="270"></a><hr />
+<pre>
+Convert Flash to Avi:
+
+% ffmpeg -i input.flv output.avi
+
+Extract MP3 from Flash file:
+
+% for i in *.flv; do ffmpeg -i $i -acodec copy ${i%.flv}.mp3 ; done
+</pre>
+<a name="271"></a><hr />
+<pre>
+Usage example for cryptsetup / -luks encrypted partition on LVM:
+
+volume group name: x61
+logical volume name: home
+
+echo "grml-crypt_home /dev/mapper/x61-home none luks" >> /etc/crypttab
+Start cryptdisks
+mount /dev/mapper/grml-crypt_home /mnt/test
+</pre>
+<a name="272"></a><hr />
+<pre>
+fdisk/parted/... complains with something like
+'unable to open /dev/sda - unrecognised disk label'?!
+
+See http://grml.org/faq/#fdisk =>
+
+* use /sbin/fdisk.distrib from util-linux
+* switch to sfdisk, cfdisk,...
+* use parted's mklabel command (but please read the
+ parted manual before executing this command)
+</pre>
+<a name="273"></a><hr />
+<pre>
+dmraid - support for SW-RAID / FakeRAID controllers
+like Highpoint HPT and Promise FastTrack
+
+Activate all software RAID sets discovered:
+# dmraid -ay
+
+Deactivates all active software RAID sets:
+# dmraid -an
+
+Discover all software RAID devices supported on the system:
+# dmraid -r
+</pre>
+<a name="274"></a><hr />
+<pre>
+Extract winmail.dat:
+
+List content:
+% ytnef winmail.dat
+
+Extract files to current directory:
+% ytnef -f . winmail.dat
+</pre>
+<a name="275"></a><hr />
+<pre>
+Approx - Debian package proxy/cacher howto
+
+% apt-get install approx
+% echo 'debian http://ftp.de.debian.org/debian' >>/etc/approx/approx.conf
+% Restart approx
+
+Add your new approx to sources.list
+
+eg.
+deb http://localhost:9999/debian unstable main contrib non-free
+
+use approx in grml-debootstrap like:
+% grml-debootstrap -r lenny -t /dev/sda1 -m http://127.0.0.1:9999/debian
+</pre>
+<a name="276"></a><hr />
+<pre>
+Simple webserver with python:
+
+% python -m SimpleHTTPServer
+</pre>
+<a name="277"></a><hr />
+<pre>
+Upgrade only packages from the grml-stable Debian repository:
+
+echo 'deb http://deb.grml.org/ grml-stable main' > /etc/apt/grml-stable.list
+apt-get -o Dir::Etc::sourcelist=/etc/apt/grml-stable.list -o Dir::Etc::sourceparts=/doesnotexist update
+apt-get upgrade
+</pre>
+<a name="278"></a><hr />
+<pre>
+Install Centos into a directory:
+
+% febootstrap centos-5 directory http://mirror.centos.org/centos-5/5.3/os/i386/
+</pre>
+<a name="279"></a><hr />
+<pre>
+Install Fedora into a directory:
+
+% febootstrap fedora-11 target_directory
+</pre>
+<a name="280"></a><hr />
+<pre>
+Use Nessus / OpenVAS (remote network security auditor):
+
+Install software packages:
+# apt-get update
+# apt-get install openvas-client openvas-server openvas-plugins-base openvas-plugins-dfsg
+
+Add a user:
+# openvas-adduser
+
+Start openvas server (takes a while):
+# Start openvas-server
+
+Invoke client as user:
+% OpenVAS-Client
+</pre>
+<a name="281"></a><hr />
+<pre>
+Find packages not available from any active apt repository:
+
+% apt-show-versions | awk '/No available version in archive/{print $1}'
+</pre>
+<a name="282"></a><hr />
+<pre>
+Simple mailserver with python:
+
+% python -m smtpd -n -c DebuggingServer localhost:1025
+</pre>
+<a name="283"></a><hr />
+<pre>
+finger via netcat:
+
+echo $USER | nc $HOST 79
+</pre>
+<a name="284"></a><hr />
+<pre>
+Install Archlinux using Grml:
+
+https://wiki.archlinux.org/index.php/Install_from_Existing_Linux
+or
+wget http://tokland.googlecode.com/svn/trunk/archlinux/arch-bootstrap.sh
+</pre>
+<a name="285"></a><hr />
+<pre>
+Export blockdevices via AoE (ATA over Ethernet):
+
+% vblade -m 11:22:33:44:55:66 160 2 eth0 /dev/sdb1
+
+Allow the host with the mac address 11:22:33:44:55:66 to access /dev/sdb1
+via eth0, using the shelf and slot numbers 160 and 2. These numbers are
+arbitrary but should be unique within the network.
+
+A word of warning: AoE is prone to all kind of nasty ethernet attacks,
+especially arp spoofing. Do not use in hostile networks.
+
+Tags: aoe, blockdevice, export, server
+</pre>
+<a name="286"></a><hr />
+<pre>
+Access blockdevices via AoE (ATA over Ethernet):
+
+% sudo aoe-discover
+
+and the device should show up under /dev/etherd/. If your shelf and
+slot numbers re 160 and 2 the device will be /dev/etherd/e160.2
+
+A word of warning: AoE is prone to all kind of nasty ethernet attacks,
+especially arp spoofing. Do not use in hostile networks.
+
+Tags: aoe, blockdevice, export, client
+</pre>
+<a name="287"></a><hr />