Building a Linux File Server

I’m rebuilding my old desktop PC to a Linux file server. Lots of time has been sunk so far, probably should have used a more modern distro than Debian Etch, but I’ve made my bed.

Mistakes/Lessons so far:

  • I wasted a few hours trying to solve why my self booting CD I’d downloaded and burnt wasn’t working…..  So I re-burnt it (which requires a blank disk, so I’m not so sure what I did the first time), and it worked.
  • I downloaded the i368 CD, yet the Linux Windows Installer was using the amd64. So wasted lots of time reading about that build target, as my AMD Sempron is the non-64 version, but decided to keep with the i386 target. So not to waste yet more bandwidth (on my limited plan)
  • I installed Gnome UI then, decided to redo it, with no desktop installed. So I’ve had to hero out some issues that there are now UI tools to solve.
  • Spent ages trying to work out why ping’s worked, yet apt-get to ftp.nz.debian.org would resolve as 1.0.0.0. This turns out to be the result of an DNS query with an IPv6 AAAA record present, causing the DNS server to fail. reviewing every /etc/ file I finally found resolve.conf and corrected the DNS servers being used. My simple ADSL route was the problem, and resolve.conf was point to this, as at install time, DCHP worked, so I didn’t get the chance to static setup as I want. Especially as this is a server. So had set the correct DNS servers in the /etc/network/interfaces, but didn’t solve it.
  • Throughout all this having working internet, and the MacBook to read lots of how-to’s was so good!
  • Once I got the Ethernet working, I started on the “how to get the wifi working” game.
  • I mastered apt-get, and git, pulled down the latest Linux Wireless testing branch, and rebuilt with the correct drivers so my wifi NIC should work. Much fluffing around with Debian package build I got my new kernel installed. Hours and hours of wifi configuration fluffing around I found I should be configuring wpa-supplicant, and even more fluffing discovered the my wpa key was being interrupted as a hex number because it was, but it was being used as text. Found the wpa to generate the hex key based on test and SSID. A ifdown/ifup later and it worked!
  • Problem I currently have is that after reboot, the wifi is not working until I ifdown ifup the interface. grrr
  • As I couldn’t get the wifi working, I started on getting the SlimServer working. It all works, except the music won’t play as the SqueezeBox shows the servers other interface as the server address. Grrr, I’ve re-addressed it onto a different LAN network. So here’s hoping it’s solved….

There’s been so much more, but I’m exhausted from typing, so I’ll get to my point.

I love my MacBook, either it works or it doesn’t.  If it works it’s a great user experience.

Windows, it won’t work, but you can download something that will make it work if you can get past the trust problems from software.com or where ever. It might cost.

Linux, it won’t work, and you’ll need to know why to fix it, but there is code, and there are options, and you can make it do anything once you know how to configure it. It’s free, but it costs time.

I still like the extremes of the two (ie not windows), but it’s taking more effort than I had expected.

Back to it then….

Gmail UI updated: I HATE IT!

Gmail have updated the UI, and quite frankly I hate it!

It feels cluttered with the silly boxes in the Labels section
Gmails new UI - Cluttered
But the icing on the cake is the in your face push for chat.  When reading mailing lists, the UI was the good thing about Gmail,  you could click on each item and read things in a nice orderly fashion.  But the new UI now pops up a Chat window on each person. So now you can’t read the first line of the email.
Gmail new UI - Most evil feature

It’s so crap I turned on the keyboard shortcut so I would trigger the UI crap-ness, but that’s got it’s own crap-ness because it jumps around, and it’s disconcerting. I like my scroll wheel.  I like collapsing read emails. I don’t like pop-up UI.

Likely there is an option to revert to the old UI,
Gmail new UI - saving grace

Ahh, the feeling of calmness is returning. If Google switches to the new UI permanently, I’m going to have to leave them, and that’s annoying… because they were good.

Why the big push for chatting via the browser? Where is the setting “I use gtalk, so just piss off with breaking the email application trying to do poor chat” tick box?

#pragma pack()

I have just spent the last hour bashing my head, trying to workout why some new C++ code (to my project) was crashing.

I was constructing one class, and it was building some worker classes and crashing in the std::vector code when the worker class was being destroyed.

It just wasn’t making sense.

Why would code that’s been running for another team for over a year, blow-up when I use it?

I turned to a co-worker, described what was happening and said “it’s like some memory corruption or packing issue

And it was a structure packing alignment issue. The imported project had default packing (8), and my really old solution uses packing (1), so somewhere the default class functions where getting generated with different opinions from where member’s were….

#pragma pack(push)
#pragma pack(4)
#pragma pack(pop)

to the rescue, and low and behold the problems gone. I hate this type of issue. Importing existing C++ projects happens so infrequently that this issue is not on the must check list. Where-as I was convinced I had fluffed up the usage of the new code….