+Version control using Mercurial
+
+Setting up a Mercurial project:
+
+% cd project
+% hg init # creates .hg
+% hg add # add all files
+% hg commit # commit all changes, edit changelog entry
+
+Branching and merging:
+
+% hg clone linux linux-work # create a new branch
+% cd linux-work
+<make changes>
+% hg commit
+% cd ../linux
+% hg pull ../linux-work # pull changesets from linux-work
+% hg merge # merge the new tip from linux-work into
+ # (old versions used "hg update -m" instead)
+ # our working directory
+% hg commit # commit the result of the merge
+
+Importing patches:
+
+% cat ../p/patchlist | xargs hg import -p1 -b ../p
+
+Exporting a patch:
+
+(make changes)
+% hg commit
+% hg tip
+1234:af3b5cd57dd5
+% hg export 1234 > foo.patch # export changeset 1234
+
+Export your current repo via HTTP with browsable interface:
+
+% hg serve -n "My repo" -p 80
+
+Pushing changes to a remote repo with SSH:
+
+% hg push ssh://user@example.com/~/hg/
+
+Merge changes from a remote machine:
+
+host1% hg pull http://foo/
+host2% hg merge # merge changes into your working directory
+
+Set up a CGI server on your webserver:
+% cp hgwebdir.cgi ~/public_html/hg/index.cgi
+% $EDITOR ~/public_html/hg/index.cgi # adjust the defaults
+
+Mercurial repositories of grml can be found at http://hg.grml.org/
+--
+Download binary codecs for mplayer:
+
+# /usr/share/mplayer/scripts/win32codecs.sh
+
+or
+
+# /usr/share/mplayer/scripts/binary_codecs.sh install
+
+(depending on the mplayer version you have).
+
+To play encrypted DVDs and if you are living in a country where using
+libdvdcss code is not illegal can install Debian package libdvdread3
+and use the script /usr/share/doc/libdvdread3/install-css.sh.
+--
+Read manpages of uninstalled packages with debman:
+
+% debman -p git-core git
+--
+Test network performance using netperf:
+
+Server:
+# netserver
+
+Client:
+# netperf -t TCP_STREAM -H 192.168.0.41
+--
+Setup Xen within 20 minutes on Debian/grml
+
+Install relevant software und update grub's menu.lst (Xen does not work with
+usual lilo so install grub instead if not done already):
+
+apt-get install linux-image-2.6.18-1-xen-686 xen-hypervisor-3.0.3-1-i386 \
+ xen-utils-3.0.3-1 xen-tools bridge-utils
+update-grub
+
+Example for installation of Debian etch as DomU:
+
+mkdir /mnt/md1/xen
+xen-create-image --debootstrap --dir=/mnt/md1/xen --size=2Gb --memory=512Mb --fs=ext3 \
+ --cache=yes --dist=etch --hostname=xengrml1 --ip 192.168.1.2 --netmask 255.255.255.0 \
+ --gateway 192.168.1.1 --initrd=/boot/initrd.img-2.6.18-1-xen-686 \
+ --kernel=/boot/vmlinuz-2.6.18-1-xen-686 --mirror=http://ftp.at.debian.org/debian/
+
+Start services:
+
+/etc/init.d/xend start
+/etc/init.d/xendomains start
+
+Setup a bridge for network, either manually:
+
+brctl addbr xenintbr
+brctl stp xenintbr off
+brctl sethello xenintbr 0
+brctl setfd xenintbr 0
+ifconfig xenintbr 192.168.1.1 netmask 255.255.255.0 up
+
+or via /etc/network/interfaces (run ifup xenintbr to bring up the device then
+without rebooting):
+
+auto xenintbr
+iface xenintbr inet static
+ pre-up brctl addbr xenintbr
+ post-down brctl delbr xenintbr
+ address 192.168.1.1
+ netmask 255.255.255.0
+ bridge_fd 0
+ bridge_hello 0
+ bridge_stp off
+
+Setup forwarding (adjust $PUBLIC_IP; for permanet setup use /etc/sysctl.conf and
+add the iptables commands to a startup script like /etc/init.d/rc.local):
+
+echo 1 > /proc/sys/net/ipv4/ip_forward
+iptables -t nat -A POSTROUTING -o eth0 -s 192.168.0.0/24 -j SNAT --to $PUBLIC_IP
+iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to $PUBLIC_IP
+
+Adjust network configuration of Xend:
+
+cat >> /etc/xen/xend-config.sxp << EOF
+(network-script network-route)
+(vif-bridge xenintbr)
+(vif-script vif-bridge)
+EOF
+
+List domains, start up a DomU, shutdown later again:
+
+xm create -c /etc/xen/xengrml1.cfg
+xm list
+xm shutdown 1
+
+This HowTo is also available online at http://grml.org/xen/
+--
+Play tetris with zsh:
+
+autoload -U tetris
+zle -N tetris
+bindkey "^Xt" tetris
+
+Now press 'ctrl-x t'.
+--
+Set up a router with grml
+
+Run grml-router script:
+# grml-router
+
+Install dnsmasq if not already present:
+# apt-get update ; apt-get install dnsmasq
+
+Adjust /etc/dnsmasq.conf according to your needs:
+# cat >> /etc/dnsmasq.conf << EOF
+domain-needed
+bogus-priv
+dhcp-range=19.168.0.124,192.168.0.254,1m # dhcp range
+dhcp-option=3,192.168.0.1 # dns server
+dhcp-option=1,255.255.255.0 # netmask
+EOF
+
+Start dnsmasq finally:
+# Restart dnsmasq
+--
+Find out which process(es) cause the disk to spin up:
+
+# echo 1 > /proc/sys/vm/block_dump
+
+The command sets a sysctl to cause the kernel to log all disk
+writes. Please notice that there is a lot of data.
+
+See: $KERNEL-SOURCE/Documentation/laptop-mode.txt
+
+Also take a look at event-viewer(8).
+--
+Display stats about memory allocations performed by a program:
+
+Usage example for 'ls':
+
+% LD_PRELOAD=/lib/libmemusage.so ls > /dev/null
+--
+Use KVM (Kernel-based Virtual Machine for Linux):
+
+Make sure to install the relevant tools:
+# apt-get update ; apt-get install kvm
+# modprobe kvm
+
+Test it with a minimal system like ttylinux:
+# wget http://www.minimalinux.org/ttylinux/packages/bootcd-i386-5.3.iso.gz
+# gzip -d bootcd-i386-5.3.iso.gz
+# kvm -cdrom bootcd-i386-5.3.iso
+--
+EEPROM data decoding for SDRAM DIMM modules:
+
+# modprobe eeprom
+# /usr/share/doc/lm-sensors/examples/eeprom/decode-dimms.pl
+--
+Set up and use DVB:
+
+Make sure your device is supported by Linux and running.
+See http://www.linuxtv.org/ for more details.
+
+If the DVB device works on your system (see 'hwinfo --usb'
+when using a DVB usb device for example), then make sure you
+have the scan util from dvb-utils available:
+
+# aptitude install dvb-utils
+
+Then create a channels.conf configuration file:
+
+% scan /usr/share/doc/dvb-utils/examples/scan/... > ~/.mplayer/channels.conf
+
+You can find some example configuration files on
+your grml system in ~/.channels. Usage example:
+
+% ln -s ~/.mplayer/channels.conf-AT-graz ~/.mplayer/channels.conf
+
+Tip: w_scan (see http://free.pages.at/wirbel4vdr/w_scan/index2.html)
+might be useful if you do not know the initial configuration
+details.
+--
+Get the lastest mercurial snapshot:
+
+Make sure you have the python-dev package available:
+# apt-get update ; apt-get install python-dev
+
+Get and build the source:
+% hg clone http://selenic.com/repo/hg mercurial
+% cd mercurial
+% make local
+% export PYTHONPATH=$(pwd)
+% export PATH=$PATH:$(pwd)
+
+now you should have the newest version of mercurial whenever you execute hg.
+
+To update to the lastest development snapshot, additionally use
+the following commands:
+% hg pull -u http://hg.intevation.org/mercurial/crew
+% make local
+--
+Configure timezone
+==================
+
+Available bootoptions relevant in live-cd mode:
+-----------------------------------------------
+
+* utc: set UTC, if your system clock is set to UTC (GMT)
+* gmt: set UTC, if your system clock is set to UTC (GMT) [like bootoption utc]
+* tz=$option: set timezone to corresponding $option, usage example:
+ tz=Europe/Vienna
+
+Configuration options relevant on harddisk installation:
+--------------------------------------------------------
+
+* Use the tzconfig utility to set the local timezone:
+
+ # tzconfig
+
+ which adjusts /etc/timezone and /etc/localtime according
+ to the provided information.
+
+* /etc/default/rcS: set variable UTC according to your needs,
+ whether your system clock is set to UTC (UTC='yes') or
+ not (UTC='no')
+
+* /etc/localtime: adjust zoneinfo according to your needs:
+
+ # ln -sf /usr/share/zoneinfo/$WHATEVER_YOU_WANT /etc/localtime
+
+ The zoneinfo directory contains the time zone files that were
+ compiled by zic. The files contain information such as rules
+ about DST. They allow the kernel to convert UTC UNIX time into
+ appropriate local dates and times. Use the zdump utility to
+ print current time and date (in the specified time zone).
+
+* /etc/adjtime: This file is used e.g. by the adjtimex function,
+ which can smoothly adjust system time while the system runs
+
+* If you change the time (using 'date --set ...', ntpdate,...)
+ it is worth setting also the hardware clock to the correct time:
+
+ # hwclock --hctosys [--utc]
+
+ Remember to add the --utc -option if the hardware clock is set
+ to UTC!
+
+Still problems?
+---------------
+
+Check your current settings via:
+
+ cat /etc/timezone
+ zdump /etc/localtime
+ echo $TZ
+ hwclock --show
+ grep hwclock /etc/runlevel.conf
+ grep '^UTC' /etc/default/rc
+
+Further information:
+--------------------
+ hwclock(8) tzselect(1) tzconfig(8)
+ http://www.debian.org/doc/manuals/system-administrator/ch-sysadmin-time.html
+ http://wiki.debian.org/TimeZoneChanges
+--