# grml-crypt format /mnt/external1/encrypted_file /mnt/test
# cp big_file /mnt/test
-# grml-crypt stop /mnt/test
+# grml-crypt stop /mnt/test
Use:
When running grml:
% most /usr/share/doc/grml-docs/grml-cheatcodes.txt.gz
--
-Report bugs:
+Report bugs to Debian's Bug Tracking System (BTS):
+
+% reportbug --bts debian
-% reportbug
+or adjust /etc/reportbug.conf to your needs.
See:
+
http://grml.org/bugs/
- http://bugs.grml.org/
+ http://www.debian.org/Bugs/
--
Offline documentation:
Or run one of the following commands:
% grml-lang de
-or
+or
# loadkeys i386/qwertz/de-latin1-nodeadkeys.kmap.gz # console
% setxkbmap de # X11
--
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:
% netcat -v -l -p 3333 -e /bin/sh
remote host:
-% netcat 192.168.0.1 3333
+% netcat 192.168.0.1 3333
--
Remove empty directories with zsh:
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
-iface lo inet loopback
+iface lo inet loopback
iface eth0 inet dhcp
auto lo
auto eth0
sysfs /sys sysfs auto 0 0
proc /proc proc defaults 0 0
/dev/sda1 / ext3 defaults,errors=remount-ro 0 1
-/dev/sda2 none swap sw 0 0
+/dev/sda2 none swap sw 0 0
/dev/cdrom /mnt/cdrom0 iso9660 ro,user,noauto 0 0
EOF
passwd # set password of user root
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.17-2-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.17-2-686 root=/dev/sda1 ro
+initrd /boot/initrd.img-2.6.17-2-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)
Notice: if mounting the partition read-write did not work (check syslog!)
try using mount.ntfs-3g instead: mount.ntfs-3g /dev/hda1 /mnt/hda1
-(Be careful with deactivating syskey!)
+(Be careful with deactivating syskey!)
--
glark - replacement for grep written in Ruby:
# tune2fs -O dir_index /dev/iceX
-Now run e2fsck with the -D option to have the directories optimized:
+Now run e2fsck with the -D option to have the directories optimized:
# e2fsck -D /dev/iceX
Mount wikipedia local via fuse:
Adjust configuration:
-% cat ~/.wikipediafs/config.xml
+% cat ~/.wikipediafs/config.xml
<wfs-config>
<general>
<article-cache-time>300</article-cache-time>
Install initrd via yaird for specific kernel:
-# mount /proc
+# mount /proc
# mount /sys
# yaird -o /boot/initrd.img-2.6.15-1-686 2.6.15-1-686
--
Notice: online resizing works as soon as the kernel can re-read the
partition table. So it works for example with LVM and SW-RAID but not with
a plain device (/dev/[sh]d*). The kernel does not re-read the partition
-table if the device is already mounted.
+table if the device is already mounted.
--
Use vim as an outline editor:
# mdadm --grow /dev/md0 --raid-devices=4
Assemble and start all arrays:
-# mdadm --assemble --scan
+# mdadm --assemble --scan
Assemble a specific array:
-# mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1
+# mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 /dev/sdc1
Resync:
# mdadm --assemble --run --force --update=resync /dev/md0 /dev/sda1 /dev/sda2
# mdadm --assemble /dev/md0 --auto --scan --update=summaries --verbose
Monitoring the sw raid
-# nohup mdadm --monitor --mail=root@localhost --delay=300 /dev/md0
+# nohup mdadm --monitor --mail=root@localhost --delay=300 /dev/md0
See also: man mdadm | less -p "^EXAMPLES"
http://www.tldp.org/HOWTO/Software-RAID-HOWTO.html
Create a snapshot of a logical volume:
# lvcreate -L 500M --snapshot -n mysnap /dev/testvg/test_lv
-Deactivate a volume group:
+Deactivate a volume group:
# vgchange -a n my_volume_group
-Actually remove a volume group:
+Actually remove a volume group:
# vgremove my_volume_group
Display information about physical volume:
Measure network performance using ipserf
Server side:
-% iperf -s -V
+% iperf -s -V
Client side:
% iperf -c <server_address> -V
APT_LISTBUGS_FRONTEND=none apt-get ...
--
-Set up a Transparent Debian Proxy
+Set up a Transparent Debian Proxy
-Install of apt-cacher, the default config will do:
+Install of apt-cacher, the default config will do:
# apt-get install apt-cacher
Check out the ip address of debian mirror(s).
-Then add this to your firewall script:
+Then add this to your firewall script:
DEBIAN_MIRRORS="141.76.2.4 213.129.232.18"
for ip in ${DEBIAN_MIRRORS} ; do
Acquire::http::Proxy "http://localhost:3142/";
--
+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
+
+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.
+--
+