Archive for the ‘gentoo’ Category

Gentoo, ebda is big kernel setup stack overlaps lilo

Monday, June 25th, 2007

environment gentoo

problem error message on boot ebda is big kernel setup stack overlaps lilo

solution mount using gentoo live cd, mount proc, mount root, mount boot, chroot, /sbin/lilo *done*

Gentoo, fail2ban and ssh – no OOTB experience

Wednesday, June 13th, 2007

environment gentoo, fail2ban >0.8

problem drop ip packets from host that failed to authenticate via ssh


1. emerge fail2ban
2. edit /etc/fail2ban/jail.conf

Look for [ssh-iptables] and fix:

enabled = true
logpath = /var/log/messages

If you want emails, fix 'dest='.


Nice summary

/usr/bin/fail2ban-client status ssh-iptables

screen + irssi = freeze/hanging

Monday, May 7th, 2007

environment Gentoo, screen, irssi and putty

problem Sometimes my irssi freezes :(

solution Kill all human (hmmm... sshd sessions).

OpenVPN Server on Gentoo, Vista Client and ISA 2006

Sunday, May 6th, 2007

environment OpenVPN Server on Gentoo, Windows Vista Client, ISA 2006

problem Establish VPN tunnel from Vista to Gentoo


Server Install

  • emerge openvpn and read the output about /etc/init.d
  • Make sure you got CONFIG_TUN (details)
  • Create keys and /etc/openvpn/hostname.conf files. A sample can be found here.

Vista Client Install

  • Install at least OpenPVN 2.1_rc2 download because of this
  • copy client.crt, client.key, ca.crt and optionally ta.key from your server /usr/share/openvpn/easy-rsa/keys/
  • create hostname.ovpn in C:\\Program Files\\OpenVPN\\config and make sure to run the editor as administrator due to UAC. A sample can be found here.

actual problem I'd like to publish OpenVPN with a "Web Publishing Rule" on ISA 2006 and have ISA 2006 forward to the right machine
based on the domain. It sniffed the traffic and OpenVPN doesn't send a SSL "Client Hello" message at the beginning, but some other message tagged as "SSL Continuation" in Wireshark.

After thinking a little more, the scenario I'd like to implement wont be possible anyway, because ISA 2006 gets the domain from the HTTP traffic (details) and not from the SSL/TLS layer. Maybe a something similar to Apache/OpenVPN port sharing would be possible with a custom filter in ISA...

Gentoo, Tomcat 6.0, Apache, mod_jk

Monday, April 30th, 2007

Edit /etc/apache2/modules.d/88_mod_jk.conf at the end

jkAutoAlias /var/lib/tomcat-6/webapps/
# jkMount // ajp13
jkMount /fooApp/someServlet ajp13

Virtual Machine running Gentoo on Virtual Server 2005 R2

Monday, April 9th, 2007

Environment Windows Server 2003 R2, ISA Server 2005, Virtual Server 2005 R2, Network access through Loopback Adapters

Problem Creation/Installation of a virtual machine running Gentoo


  1. Create Virtual Machine - configure disks
  2. Under General Properties
    • Select Run virtual machine under the following user account and provide username and password
    • Make sure it got access to the .vhd and .vnc files (e.g. C:\Documents and Settings\All Users\Documents\Shared Virtual Networks) (details).

      If you I got the following error message in the EventLog (Virtual Server): The virtual machine "foo" cannot connect virtual network adapter 1 because either the virtual network is invalid or access was denied. This virtual network adapter will be left disconnected.

      The reason were missing privileges of the user on .vnc files.

  3. Mount the Gentoo ISO image
  4. Start the VM and follow Gentoo Installation
  5. Edit make.conf. For my Core2 Duo E6600 Iuse
    CFLAGS="-O3 -march=nocona -pipe -fomit-frame-pointer"
  6.  ln -s /usr/portage/profiles/default-linux/x86/2006.1 make.profile 
  7. If you got an existing VM
    • copy /etc/kernels/kernel-config-*
    •  genkernel --kernel-config=/etc/kernels/kernel-config-* all 
  8. Kernel options to avoid clock skew (details)
  9. emerge -u logwatch chkrootkit apache netpbm ffmpeg imagemagick ntp gallery virtual/mysql awstats logrotate
  10. configure rsync mirror server

Apache, Tomcat, Gentoo, SpringFramework, c3p0, jdbc-mysql

Sunday, April 8th, 2007

Environment Gentoo, Apache-2.0.59, Tomcat-6

Problem Need to configure Tomcat-6 behind Apache and custom applications (stadtplan and Mobile Geizhals) depend on some libraries.


Add c3p0 to USEFLAGS.

emerge c3p0 mod_jk jdbc-mysql

Edit /etc/conf.d/tomcat-6 CLASSPATH=${CATALINA_LIBDIR}:`java-config -p commons-logging,c3p0,jdbc-mysql`

I could not find the SpringFramework in the portage tree. But adding it to the classpath is a bad idea anyway. I received the following error message

Unable to load class for JSP

Just place the spring.jar into WEB-INF/lib of your application. Any tips on the web like, putting tools.jar into /usr/share/tomcat-6/lib/ don't help.

You need to put a proper .xml file into /etc/tomcat-6/Catalina/localhost/.xml. Just copy an existing one there.


cat /var/log/tomcat-6/catalina.*.log
cat /var/log/tomcat-6/localhost.*.log

java-config -l

StatWiki – R Extension frickel

Monday, March 26th, 2007

R extensions for MediaWiki are pretty cool

If you run into an error starting with /invalidfont in findfont.

Reason ghostscript-gnu installed

Solution ghostscript-gnu uninstalled, ghoscript-gpl installed

If you want to use output="display" make sure you but a pdf(rpdf) into your R block (this tells R to write the pdf to the appropriate place)

Gentoo package unmasking

Sunday, March 25th, 2007

Want to install a masked package?

Add =net-mail/hotwayd-0.8 to /etc/portage/package.unmask

Why isn’t ‘su’ working on gentoo?

Sunday, March 25th, 2007

Because your user needs to be part of the "wheel" group.

usermod -G wheel