pfuender.net

Rockin' tech news…
  • Contact
RSS

Archive

  • April 2013 (1)
  • March 2013 (1)
  • December 2012 (1)
  • November 2012 (1)
  • May 2012 (1)
  • April 2012 (1)
  • February 2012 (1)
  • October 2011 (2)
  • July 2011 (1)
  • May 2011 (1)
  • April 2011 (2)
  • March 2011 (1)
  • January 2011 (2)
  • December 2010 (3)
  • October 2010 (4)
  • September 2010 (2)
  • August 2010 (2)
  • July 2010 (2)
  • June 2010 (4)

Tag Cloud

active directory android apt-cyg archlinux awk barebone bash batch bluetooth cflags chroot compile cygwin data recovery dd email exchange 07 find firefox firewall gcc kernel linux mail microsoft mpd multithreading music network NTFS optimize parallel perl powershell qnap raid ripping script sonicwall ssl troubleshooting tune virtualization windows xargs

Friends

  • körnlipicker
  • querstrasse.ch
  • xig.ch

Microblog

  • fix non-behaving NTP clients My accesspoint decided to not use the NTP server that I enter.. Time to fix this via IPtables and redirect him to the one I want... iptables -t nat -A PREROUTING -p udp --dport 123 ! -d 129.132.2.21 -j DNAT --to-destination 129.132.2.21:123 ×0

Firefox 20 – skip the SSL/TLS certificate error

Apr10
by raphi on 2013/04/10 at 14:57
Posted In: tech

As of Firefox version 20, the addon Skip-Cert-Error (which is a rewrite of ‘MitM Me’) doesn’t work anymore. In fact there were some changes made in ffox in regards to the private-browsing-mode, which made the current 0.3.3 version incompatible.
Luckily the developer also has its own GIT-repository at github, and there was also a change recently (commit 7ee2458033819b1a3f0e74c1afadbc3e3922a898) which fixes this incompatibility. Strange indeed, that there’s not a newer version on addons.mozilla.org yet.

Anyway, I cloned the git-repository, compiled the code, installed in firefox, and voilà, everything back to normal, the plugin works again!
Here are the steps needed to compile it from GIT:

cd /tmp
git clone git://github.com/foudfou/skipCertError.git
cd /tmp/skipCertError/src
make build
ls -lah ../build/skipcerterror@foudil.fr-0.3.4.xpi

or you can quickly download my precompiled ‘binary’ here (skipcerterror@foudil.fr-0.3.4.xpi).

Thanks to foudfou who coded this valuable plugin!

Cheers

└ Tags: compile, firefox, git, linux, ssl, tls
 Comment 

Split mbox into single files

Mar13
by raphi on 2013/03/13 at 15:23
Posted In: tech

Just had an issue with a mailbox on a server, and it seemed pretty OK checking it with vim. I tried to remove the newest 1-2 messages, but that didn’t help either.
As there were quite a few messages in it, i wanted to isolate the culprit; split the mailbox into single mails, try to open them with a mailclient and then put all the other (working) messages back together. A quick search pointed me to the ‘csplit‘.
You can use it as follows:

csplit -n 2 -k mbox-file '/^From /' '{*}'

Credits to the guys over here:
http://board.issociate.de/..

Cheers,
Raphi

└ Tags: bash, linux, mbox
 Comment 

RocketRaid 2720 + Debian 7

Dec21
by raphi on 2012/12/21 at 12:37
Posted In: tech

Hi There,

Just a quick step by step manual on how to compile the kernelmodule for the Highpoint Rocketraid Controller 2720 under Debian 7.

  • wget “http://www.highpoint-tech.com/BIOS_Driver/rr272x_1x/Linux/RR272x_1x-Linux-Src-v1.4-120424-1752.tar.gz”
  • tar xfz “RR272x_1x-Linux-Src-v1.4-120424-1752.tar.gz”
  • cd product/rr272x/linux
  • make
  • copy rr272x_1x.ko to /lib/modules/$(uname -r)/kernel/drivers/scsi
  • depmod -a
  • blacklist mvsas via /etc/modprobe.d/mvsas-blacklist.conf, see below
  • $ cat /etc/modprobe.d/mvsas-blacklist.conf
    # This file blacklists the mvsas raid controller modules, conflicts with proprietary r272x from rocketraid/highpoint
    blacklist mvsas
  • update-initramfs -d 3.2.0-4-amd64
  • update-initramfs -c -v 3.2.0-4-amd64

The important thing here is, that the original native kernel module ‘mvsas’ gets loaded before the r272x, which we just compiled. This will cause to show the single disks as /dev/sda..g instead of just a single RAID device. That’s why we blacklist the file via /etc/modprobe.d/.

Let me know if you have any questions.

Cheers,
Raphi

└ Tags: compile, debian, kernel, kernelmodule, linux, raid
 Comment 

Extract kernel config from vmlinuz

Nov06
by raphi on 2012/11/06 at 17:31
Posted In: tech

Hola!

I just wanted to check the configuration of a kernel for a pre-built system. But because I just had the plain kernel image (/boot/vmlinuz) and I was too lazy to boot it up, I had to find another way to get the configuration.
Luckily in the kernel sources (kernel.org) there’s a script called
extract-ikconfig
, which does exactly that. The procedure is straight forward:

$ ./linux/scripts/extract-ikconfig -h
Usage: extract-ikconfig <kernel-image>

$ ./linux/scripts/extract-ikconfig vmlinux >kernel_config
$ wc -l kernel_config
1381 kernel_config

And there we go, we have now the needed configuration ‘template’ and we can start read / modify the configuration and maybe rebuild the kernel we want..

I’m not 100% certain, which option in the original kernel configuration is needed, but I guess the ‘CONFIG_IKCONFIG’ is the only one needed. In my case, both of the values below were enabled, so I can’t tell for sure.
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y

Cheers,
Raphi

└ Tags: bash, compile, kernel, linux, reversing
 Comment 

sort files before compressing

May10
by raphi on 2012/05/10 at 16:03
Posted In: tech

Was just looking for quick and easy way to sort the files, which should be compressed/archived using tar and bzip/gz/xz etc. As another guy already figured out before I did, it’s rather important in which order the files are stored in an archive. I don’t have a specific example handy, but he claims that the difference in size between a sorted and an unsorted tar.xz is about 20% (source).
Now of just sorting the files by path/name, which I think is not the most effective way, I sort it by the file’s suffix (eg. 01_music.mp3 -> ‘mp3′ will be used as the criteria) instead, which should be even more effective.

So next time you compress some huge amount of data, just use the lines below to save some space:

$ find /media/backup_xxx | awk -F '.' ' { print $NF"---"$0 } ' | sort | awk -F'---' ' { print $2}' >filelist-sorted.txt
$ tar -cv --no-recursion -T filelist-sorted.txt | xz -9 >backup_xxx.tar.xz

Cheers
Raphi

└ Tags: awk, bash, compress, linux, optimize, tar, xz
 Comment 
  • Page 1 of 7
  • 1
  • 2
  • 3
  • 4
  • 5
  • »
  • Last »

©2010-2013 pfuender.net | Powered by WordPress with Easel | Subscribe: RSS | Back to Top ↑