Eee PC won't run my startup scripts 
Sunday, May 17, 2009, 10:33 AM - Linux, Networking
I set up autofs to automount a Windows share, but it wouldn't work after a reboot because autofs was not running on startup! I couldn't understand why because I saw it linked to by a file in rc2.d/. I even tried calling it from /etc/rc.local but rc.local wasn't getting run on startup either!

Finally, I discovered that my Eee PC runs something called fastinit on startup, not regular init (how do you think it boots so fast?). Fastinit doesn't pay attention to what's in the rc?.d dirs. To get autofs to run on startup the solution is to add autofs to the /ets/fastservices file. I wish I had understood that sooner.

[ add comment ]   |  permalink  |   ( 3 / 41 )
Linux Software RAID 
Wednesday, May 13, 2009, 10:53 PM - Linux
I had trouble getting Debian to install with Linux software raid (mdadm). I was trying to RAID1 the boot partition, and RAID5 the root partition. I was also going to RAID0 for swap but later decided to just have separate swaps but turn them all on and with the same priority.

The main problem was Debian kept adding an extra /dev/md0 to the mdadm.conf. The extra entry had the wrong UUID. During the install process I had fixed mdadm.conf, but had not realized that the initrd also contained an mdadm.conf (with the extra entry). This caused no end of grief because after each reboot it would show only 1 out of 4 components working [U___] and e2fsck would fail. It was trying to add a whole disk (sdd) instead of the partitions (sda3,sdb3,sdc3,sdd4).

Running update-initramfs fixed the problem nicely. I wish I had known about that sooner.

[ add comment ]   |  permalink  |   ( 1.9 / 19 )
Linux kernel 2.6 IPSEC: single tunnel for multiple remote networks 
Saturday, June 23, 2007, 04:07 PM - Linux, Networking
My workplace has a Fortinet IPSEC VPN, which I connect to from my Linux server. There are multiple subnets at work, like 192.168.0.0/21 and 10.2.2.0/24, and this was causing problems.

Everything was working great, except I could only connect to computers on one subnet at a time. If I connected to a computer on the other subnet, the first subnet would stop working, and I would have to restart racoon to make it work again (actually I just had to reset my SAD entries, with setkey -F, and let it re-associate).

To make a long story short, the problem was that Fortinet cannot handle multiple tunnels like that. If you establish a second tunnel, it uses the keys negotiated in that tunnel from then on. It doesn't use the first tunnel. This post explains it a little better.

Well I never wanted two tunnels in the first place. I only want one tunnel even though there are multiple subnets on the remote side. To fix it, I simply had to use require instead of unique on my SPD entries!

I'm using Debian's racoon-tool to create my spd entries (and racoon.conf). With racoon-tool, you simply have to add the level: require option to each of your connections in your racoon-tool.conf.


BTW, my tunnel looks like this:
a.b.c.d/32 => a.b.c.d => x.y.z.w => 192.168.0.0/21

not like this:
192.168.8.0/24 => a.b.c.d => x.y.z.w => 192.168.0.0/21

Since my Linux server performs NAT (MASQUERADE) in iptables, I only need the tunnel to go to my server, not to my whole LAN subnet. Somehow it is smart enough to do NAT and then encrypted on the way out, and decrypt then un-NAT on the way in, or something like that. BTW, it's so smart that even when I was having problems with two tunnels from my server, the computers inside my LAN could connect to both remote subnets with no problem! I believe this is due to a special MASQ table that can dynamically associate SPI values. This page explained it well for me.

[ add comment ]   |  permalink  |   ( 2.7 / 144 )
Source not found in Eclipse 3.2.2 on Ubuntu Feisty Fawn 
Wednesday, May 9, 2007, 02:15 PM - Linux, Programming
When debugging a Java program, breakpoints would cause the program to stop, but instead of showing my source code, it was showing a "source not found" in red. This was working fine before upgrading to feisty.

I tried editing the source lookup path to no avail.

The issue was Eclipse running under the java-gcj VM. I edited my /etc/eclipse/java_home file and placed /usr/lib/jvm/java-1.5.0-sun at the very top and restarted Eclipse. This time it ran under Sun's VM and the problem went away!


[ add comment ]   |  permalink  |   ( 2.3 / 193 )