WMV:
-% mencoder file1.wmv -ovc lavc -oac lavc -ofps 25 -srate 48000 -o file1.avi
-% mencoder file2.wmv -ovc lavc -oac lavc -ofps 25 -srate 48000 -o file2.avi
+% mencoder file1.wmv -ovc lavc -oac lavc -ofps 25 -srate 48000 -mc 0 -noskip -forceidx -o file1.avi
+% mencoder file2.wmv -ovc lavc -oac lavc -ofps 25 -srate 48000 -mc 0 -noskip -forceidx -o file2.avi
% avimerge -i file1.avi file2.avi -o blub.avi
--
Display MS-Word file:
Develop, test and use exploit code with the Metasploit Framework:
cd /tmp
-unp /usr/share/grml-sectools/tools/metasploit_framework*.tar.gz
+wget http://www.metasploit.com/tools/framework-2.7-snapshot.tar.gz
+unp framework-2.7-snapshot.tar.gz
cd framework*
./msfcli
--
umount /mnt/test && reboot # unmount partition and reboot...
See also: http://www.debian.org/releases/stable/i386/apcs04.html.en
+Avoid all of the above steps - use grml-debootstrap(8) instead!
--
Install (plain) Debian (etch release) via grml
apt-get install vim most zsh screen less initrd-tools file grub \
usbutils pciutils bzip2 sysfsutils dhcp3-client resolvconf \
strace lsof w3m # install useful software
-apt-get install linux-headers-2.6-686 linux-image-2.6.15-1-686 # install current kernel
+apt-get install linux-headers-2.6-686 linux-image-686 # install current kernel
echo "127.0.0.1 localhost" > /etc/hosts # adjust /etc/hosts and network:
cat >> /etc/network/interfaces << EOF
mkdir /boot/grub # setup grub
cp /usr/share/doc/grub/examples/menu.lst /boot/grub
cat >> /boot/grub/menu.lst << EOF
-title Debian Etch, kernel 2.6.15-1-686 (on /dev/sda1)
+title Debian Etch, kernel 2.6.18-3-686 (on /dev/sda1)
root (hd0,0)
-kernel /boot/vmlinuz-2.6.15-1-686 root=/dev/sda1 ro
-initrd /boot/initrd.img-2.6.15-1-686
+kernel /boot/vmlinuz-2.6.18-3-686 root=/dev/sda1 ro
+initrd /boot/initrd.img-2.6.18-3-686
EOF
vim /boot/grub/menu.lst # adjust grub configuration to your needs
cd /dev && MAKEDEV generic # create default devices
-cp -i /lib/grub/i386-pc/* /boot/grub/ # copy stage-files to /boot/grub/
+cp -i /usr/lib/grub/i386-pc/* /boot/grub/ # copy stage-files to /boot/grub/
grub install # now install grub, run in grub-cmdline following commands:
> root (hd0,0)
> setup (hd0)
map=/boot/map
vga=normal
-image=/boot/vmlinuz-2.6.17-grml
- label="2.6.17-grml"
+image=/boot/vmlinuz-2.6.18-grml
+ label="2.6.18-grml"
#append="...."
read-only
- initrd=/boot/initrd.img-2.6.17-grml
+ initrd=/boot/initrd.img-2.6.18-grml
EOF
See also: http://www.debian.org/releases/stable/i386/apcs04.html.en
+Avoid all of the above steps - use grml-debootstrap(8) instead!
--
Convert files from Unicode / UTF to ISO:
Host *
RemoteForward 1234 127.0.0.1:1234
ForwardAgent yes
+
+Notice: if you get 'ABORT: Requested font not found' make sure the
+requested font is available, running 'LANG=C LC_ALL=C osd_server.py...'
+might help as well.
--
Avoid automatical startup of init scripts via invoke-rc.d:
--
Setup an HTTPS website:
-create a certificate:
+Create a certificate:
-/usr/sbin/apache2-ssl-certificate -days 365
+# make-ssl-cert
Create a virtual host on port 443:
--
Install initrd via initramfs-tools for currently running kernel:
-# update-initramfs -u -t -k $(uname -r)
+# update-initramfs -c -t -k $(uname -r)
--
Install initrd via yaird for currently running kernel:
Stop and rebuild:
# mdadm --stop --scan
-# mdadm --assemble /dev/md0 --auto --scan --update=summaries --verbose
+
+Scan for and setup arrays automatically:
+# mdadm --assemble --scan --auto=yes --verbose
+
+Notice: If the above does not work make sure /etc/mdadm/mdadm.conf contains:
+DEVICE partitions
+CREATE owner=root group=disk mode=0660 auto=yes
+HOMEHOST <system>
+MAILADDR root
+
+Running
+# /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
+might help as well.
Monitoring the sw raid
# nohup mdadm --monitor --mail=root@localhost --delay=300 /dev/md0
+Producing /etc/mdadm/mdadm.conf:
+# mdadm --detail --scan > /etc/mdadm/mdadm.conf
+
See also: man mdadm | less -p "^EXAMPLES"
http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html
--
Sometimes you have lots of packages .deb that you would like to use APT to
install so that the dependencies would be automatically solved. Solution:
-mkdir ~debs
+mkdir debs
dpkg-scanpackages debs /dev/null | gzip > debs/Packages.gz
echo " deb file:/root debs/" >> /etc/apt/sources.list
dpkg-scansources debs | gzip > debs/Sources.gz
Mercurial repositories of grml can be found at http://hg.grml.org/
--
+Download binary codecs for mplayer:
+
+# /usr/share/mplayer/scripts/win32codecs.sh
+
+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/
+--
+