Dienstag, 9. Juli 2013

How to save a partition via network to a different computer and later restore that partition after formatting the local disc

How to save a partition via network to a different computer and later restore that partition after formatting the local disc? 1) try to unmount the partition if possible 2) dd if=/dev/hda1 bs=1k conv=sync,noerror | gzip -c | ssh -c blowfish user@hostname "dd of=filename.gz bs=1k" 3) format or do whatever you want to do with /dev/hda1 4) go to the remote computer "hostname" and execute following command there: dd if=filename.gz | ssh -c blowfish root@deadhost "gunzip -c | dd of=/dev/hda1 bs=1k" Thanks a lot to http://www.inference.phy.cam.ac.uk/saw27/notes/backup-hard-disk-partitions.html for this and many more useful tips!

Samstag, 6. April 2013

howto enable apple wireless keyboard to send message by pressing cmd-enter

How many key combinations have you tried in order to get the Apple wireless keyboard to send a message instead of inserting a carriage return? 100 as I did? More? Stop trying it because it is not possible without a Cydia tweak. Today I found the answer. Install the free Bluetooth Keyboard Helper from Matthias Ringwald and be happy. It translates the cmd-enter key into a |press 'Send' button" action in the messages.app.

Dienstag, 6. November 2012

enable wireless in suse linux on a macbook pro

If you install linux on a Macbook Pro then the wireless adapter is not automatically working. You need to install the firmware before you can use wireless: sudo zypper install b43-fwcutter sudo /usr/sbin/install_bcm43xx_firmware

Mittwoch, 17. Oktober 2012

debug IDL program that uses a shared library call

If you need to debug a IDL program that uses a shared library c-program then use qt creator! This program works perfect for this job. Just call the program and then choose: Debug -> Start debugging -> Start and Debug external Application Then choose the idl executable and the directory where to run IDL. An xterm will be opened with the IDL command prompt. Run your IDL program there. Open the c-program by file -> open file with... and set your breakpoints as you wish. The program is ready to be debugged! Very easy!!

Freitag, 4. Mai 2012

debug shared library in IDL with DDD

How to debug a c program that was compiled as shared library and that is called by IDL via call_external in GNU DDD debugger? a) compile the shared library without optimization and with debugging information: Example: gcc -fPIC -O0 -ggdb3 -c fw_bw_loop_quick_xp.c && gcc -shared -o fw_bw_loop_quick_xp.so fw_bw_loop_quick_xp.o -lm b) call IDL inside DDD in the path where your data is like: LD_LIBRARY_PATH=/usr/local/rsi/idl/lib:/usr/local/rsi/idl/bin/bin.linux.x86_64 ddd /usr/local/rsi/idl/bin/bin.linux.x86_64/idl c) inside DDD type "run" This will start IDL inside DDD. Now you can restore your software and execute whatever you want. If it enteres the c-program, type CTRL-C or set somehow a breakpoint d) continue normal debugging. Open the source of your c-program by "open->source". Thanks a lot to my friend Fernando Silveira for this tip!!!!!!

Donnerstag, 2. Dezember 2010

edit initrd

If you ever need to edit the initrd file of /boot/ then issue the following commands:

mkdir ~/initrd
zcat boot/initrd-2.6.22.12-0.1-default >~/initrd-2.6.22.12-0.1-default.cpio
cd ~/initrd
cpio -idv <../initrd-2.6.22.12-0.1-default.cpio

The reverse process is doing by this commands:

find . | cpio --quiet -c -o | gzip -9 -n > /boot/imagefile.img

Donnerstag, 23. September 2010

repair cacti database

issue following command as root:
mysqlcheck --auto-repair --databases cacti