# grml-network
--
-Boot grml via network:
-
-# grml-terminalserver
-
-See: man grml-terminalserver + http://grml.org/terminalserver/
---
Deactivate error correction of zsh:
% NOCOR=1 zsh
--
Transfer your SSH public key to another host:
-% ssh-copy-id -i ~/.ssh/id_dsa.pub user@remote-system
+% ssh-keygen # ssh-keygen / ssh-key-gen: if you don't have a key yet
+[...]
+% ssh-copy-id -i ~/.ssh/id_rsa.pub user@remote-system
or
% cat $HOME/.ssh/id_rsa.pub | ssh user@remote-system 'cat >> .ssh/authorized_keys'
--
--
Convert files from Unicode / UTF-8 to ISO:
-% iconv -f utf8 -t iso-8859-15 < utffile > isofile
+% iconv -c -f utf8 -t iso-8859-15 < utffile > isofile
and vice versa:
Use a Vodafone 3G Datacard (UMTS) with Linux:
Plug in your vodafone card and check in syslog whether the appropriate
-(probably /dev/ttyUSB0 or /dev/noz0 when using newer vodafone cards) has
-been created. If so run:
+(probably /dev/ttyUSB0 or /dev/noz0) has been created. If so run:
# gcom -d $DEVICE
# wvdial --config /etc/wvdial.conf.umts $PROFILE
# gcom -d /dev/noz0
# wvdial --config /etc/wvdial.conf.umts dreiusb
-Notice: newer vodafone cards require the nozomi driver. Run 'modprobe nozomi' on
-your grml system.
+If you receive invalid DNS nameservers when connecting, like:
+
+[...]
+--> primary DNS address 10.11.12.13
+--> secondary DNS address 10.11.12.14
+
+just provide a working nameserver to resolvconf via:
+
+# echo "nameserver 80.120.17.70" | resolvconf -a ppp0
+
+Notice: some vodafone cards require the nozomi driver (run 'modprobe nozomi' on
+your grml system), some other ones require the sierra driver (run
+'modprobe sierra').
+
+If your device isn't supported by usbserial yet, manually provide vendor and
+product ID when loading the usbserial module. Usage example:
+
+% lsusb
+[...]
+Bus 004 Device 008: ID 1199:6813 Sierra Wireless, Inc.
+
+# modprobe usbserial vendor=0x1199 product=0x6813
--
hdparm - get/set hard disk parameters
Then booting your client(s) via PXE should work without
any further work.
+
+See: man grml-terminalserver + http://grml.org/terminalserver/
--
Debugging SSL communications:
% gs -q -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=output.pdf input.pdf -c quit
--
+Record sound:
+
+% rec test.aiff
+
+This will record a AIFF audio file.
+--
+Change passphrase / password of an existing SSH key:
+
+% ssh-keygen -p
+--
+Enable syntax highlighting in nano:
+
+Just uncomment the include directives for your respective
+language at the bottom of the file /etc/nanorc
+--
+Create netboot package for grml-terminalserver:
+
+# sh /usr/share/doc/grml-terminalserver/examples/create-netboot
+--
+To boot grml via network (PXE) check out grml-terminalserver:
+
+# grml-terminalserver
+
+See http://grml.org/terminalserver/ for more details.
+--
+Rotate pictures:
+
+Using the 'Orientation' tag of the Exif header, rotate
+the image so that it is upright:
+% jhead -autorot *.jpg
+
+Manually rotate a picture:
+% convert -rotate 270 input.jpg output.jpg
+--
+Rename files based on the information inside their exif header:
+
+% jhead -n%Y-%m-%d_%Hh%M_%f *.jpg
+
+This will rename a file named img_2071.jpg to something like:
+
+2007-08-17_10h38_img_2071.jpg
+
+if it was shot at 10:38 o'clock on 2007-08-17 (according to
+the information inside the exif header).
+--
+Calculate network / netmask:
+
+Usage examples:
+% ipcalc 10.0.0.28 255.255.255.0
+% ipcalc 10.0.0.0/24
+--
+Blacklist a kernel module:
+
+# blacklist <name_of_kernel_module>
+
+-> running 'blacklist hostap_cs' for example will generate an
+entry like this in /etc/modprobe.d/grml:
+
+blacklist hostap_cs
+alias hostap_cs off
+
+To remove the module from the blacklist again just invoke:
+
+# unblacklist <name_of_kernel_module>
+
+or manually remove the entry from /etc/modprobe.d/grml.
+--
+Create a Debian package of a perl module:
+
+% dh-make-perl --cpan Acme::Smirch --build
+--
+The Magic SysRq Keys (SysReq or Sys Req, short for System Request):
+
+To reboot your system using the SysRq keys just hold down the Alt and
+SysRq (Print Screen) key while pressing the keys REISUB ("Raising
+Elephants Is So Utterly Boring").
+
+R = take the keyboard out of raw mode
+E = terminates all processes (except init)
+I = kills all processes (except init)
+S = synchronizes the disk(s)
+U = remounts all filesystems read-only
+B = reboot the system
+
+Notice: use O instead of B for poweroff.
+
+Or write the sequence to /proc/sysrq-trigger instead:
+
+# for i in r e i s u b ; do echo $i > /proc/sysrq-trigger ; done
+
+To enable or disable SysRq calls:
+
+# echo 0 > /proc/sys/kernel/sysrq
+# echo 1 > /proc/sys/kernel/sysrq
+
+See http://en.wikipedia.org/wiki/Magic_SysRq_key for more details.
+--
+Memtest / memcheck:
+
+Just boot your grml Live-CD with "memtest" to execute a memcheck/memtest
+with Memtest86+.
+--