Archive for March, 2007
So I got the new hardware parts, so I figured I might as well document the process. I’ve decided on the name Unicron because it’s the biggest PC I’ve ever owned. I’ve been waiting over a year to really rebuild my servers- since I ran out of ide connectors in Pablo, I knew something had to change.
The new case is MASSIVE- it’s sitting next to jackie’s machine and is a good 6″ longer and 3″ higher. processor went in easy, as did the ram. motherboard went in fine, and the harddrive rails (with rubber footies to prevent vibration noise ) made it a painless job of inserting drives and wiring them up.
The first problem I noticed right away- the Ars Technica review said it came with a power supply, but apparently I didn’t buy it from the same vendor, and hence ran into roadblock #1. I also noticed that, rather carelessly, I didn’t verify there was an onboard video card. Having only PCIe and PCI slots, none of my AGP cards would fit. After a bit of digging, I found an old 8mb Trident card from the late 90’s and popped it in. it won’t run a gui installer, but I don’t need it 🙂
The next real problem was that Ubuntu 6.10 doesn’t recognize sata hardware raid- it’s seeing all 4 drives individually. This is probably going to be the showstopper. I’m pretty sure that once installed, it’ll handle them fine, but it leads me to a chicken and egg scenario. I have a couple of possibilities:
1) I need to figure out which Linux raid driver this chipset uses and load it into the kernel, then re-detect the drives. This seems like the most obvious fix, but the real question is “why didn’t it already do this?” My fear is there is no Linux driver for the hardware raid.
2) throw an IDE drive in, install to it, then run the installer from the fully loaded Ubuntu install rather than the trimmed down install disk. the one flaw with this plan is there is only one IDE chain, meaning the cdrom and IDE HD have to play nicely during the install. So far they haven’t- booting of the install CD gives me errors about hdb not being ready, and then booted every so slowly to the first set of prompts. I had to head to work before I even got to the partitioning section.
I’ll hopefully get a chance to try more this weekend. Updates to follow.
UPDATE: the board is an ASUS M2N-E, so if you know how to get raid5 working in ubuntu, let me know.
UPDATE 20070331: you ever notice how when you look at something for months and it never changes, you forget the details? I noticed (after getting a full night’s sleep) that there WAS a wait to set up software raid in Ubuntu’s installer, I was just blind. So after talking to shaldannon and the trilug guys, I decided to go with the following partition scheme:
200meg (md0), raid 1 (sda1, sdb1)
1gig (md1), raid 1 (sda2, sdb2)
1.5Tb (md2), raid 5 (sda3, sdb3, sdc2, sdc2)
1gig (md3), raid 1 (sdc1, sdd1)
Once that was done, the installation was a breeze. Ubuntu is now installed and I’m slowly but surely re-implementing everything.
Diff is a handy little command used to compare two text files- useful if trying to determine what’s changed in different versions of files, used by subversion to show what files have been changed, and can even create patch files for updating sourcecode. So what are some of the more useful flags?
* -i lets us ignore any capitalization changes
* -b lets us ignore any spacing changes
* -B ignore blank lines
* -w just ignore all white spaces
* -q just say if the files are different
* -y side by side comparison
* -r recursively compare directories
* -d find a smaller set of changes
* -u unified format
I often use the unified format(-u) simply because I find the +/- more intuitive than >/< . The whitespace and capitalization ignoring is great if you change the indentation of a file or fix a comment's capitalization, but don't want to make a big deal of it. Another great use is comparing directories- for example, before upgrading apache, make a backup copy of /etc/apache, run the upgrade, then run diff -rq /etc/apache.bak /etc/apache to see a list of files that were modified. Once you get that list, you can use diff to compare the two versions on a more granular level. Not a great example, but I have been in situations were I needed to compare two directories to see what had changed. So what are some of the more unique uses? You can use the -s flag to confirm two files are the same or exclude files from a recursive compare with -x pattern. You can also use stdin for one of the comparisons with cat foo|grep badstuff | diff - bar or cat foo|grep badstuff | diff bar -. You can even create a patch file with diff -Naur file.old file.new >file.patch.
If you have any other uses for diff, leave them in the comments below.
I was really looking forward to this game- I vaguely remembered playing Metal Slug at a Pizza Hut many years ago, and was looking forward to seeing all the games wrapped up into one package (it even had a new sequel, Metal Slug 6, included). The game is a side scroller shoot-em-up where you get different guns and shoot the bad guys before they shoot you.
When I got it home and started playing it, I found a slight problem- it’s a perfect replica of the arcade game- you die quick and have to put in another quarter- only instead of quarters, you press start. I found myself pressing start every 30 seconds or so, again and again… and I beat Metal Slug 6 (the new one) in about 15-20 minutes.
It was fun as a one time rental, but there was no replayability. I honestly wouldn’t recommend it unless you’re really bored and have rented everything else. You can put this one on the third tier.
This will be a short review; buy it.
What do you need to know about it? It’s a Zelda game, so the standard running around and stabbing things applies. You collect new items, piece together an artifact, and kill the bad guy. I haven’t gotten all the way though the game, but I have put in enough time to realize it’s pretty big.
The controls make good use of the wii remote and nunchuck. They get bonus points for the fishing controls- the remote is the pole and the nunchuck as the reel handle. The remote even makes the reel sound with the little speaker.
Overall the important thing is it’s a fun game, and it’s one every wii owner should get.
ok, I’m gonna start doing reviews for the games I rent for the Wii- the ratings will go something like this:
First Tier Buy: Great game, you should absolutely buy it
Second Tier Buy: Decent- not the best, but still fun.
Third Tier Buy: If you’ve run out of things to try, give it a shot.
Don’t Bother: I won’t even recommend renting it.
This is a list of all the things that make it feel old. I started this while working at a place that ran a lot of FreeBSD machines. I never got around to finishing it because we started implementing linux boxes, but I think the complaints are still valid. The real shame is that I only wrote down 6 out of about 100 different things. Mostly it’s trivial stuff, but trivial stuff should be the easiest to fix- the FreeBSD people had a real fear of painting barns (take that as you will).
- No Color during the install. none at all. even getting syntax highlighting in vim was a pain. Perhaps I’m just recalling the FreeBSD 3.1 installations they had, but it seemed a mess.
- The ASCII art in the install menu. It gives the feel of a 1988 BBS. It didn’t help that there was a keyboard driver bug in 6.0 or 6.1 that prevented me from actually selecting anything at the menu.
- Speaking of the install, I think out of the 30 or so installs I attempted, only 1 or 2 were even remotely close to trouble-free. I tried the easy, medium and advanced installs- perhaps it was just the box I was installing, or maybe bsd just hates me for calling it names.
- The partitioning tool makes cfdisk look futuristic. Does FreeBSD actually listing my 200 Gig hd by block ranges? Let me just say, that’s WAY better than giving info in a useful unit.
- network cards all have different device names- it seems a mess to have 4 Nics and have bge0, sf0, anxl0, and an0. It’s a bad example, but I guess it’s because I prefer the uniformity of eth0, eth1, eth2 in linux (which can be arranged by setting parameters in /etc/modprobe.d/options).
- rc.conf always seemed to be the most cryptic thing ever- not that it was hard to read, you just never knew what you could put in there. Whenever I asked around for any way to tell what options were available for a given package to add them into rc.conf, the answer always turned to “well download the source and check.” I’m not sure if that was [several] someone’s idea of a joke, but it really made me dislike it. compare that to emerge -v package in gentoo, which lists all of the compile option in an easy to read format.
Route is one of these hate-inspiring, jaw droppingly obtuse programs that you always get the syntax wrong on. The purpose is simple enough- show and/or change the routing table. The most common uses are:
- route – shows the current entries
- route add – adds a new entry
- route del – removes an entry
- route flush– removes all entries
Checking out your Routes
The simplest use of route is to simply run route at the command line:
morgajel@p-nut ~ $ /sbin/route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 * 255.255.255.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
You’ll see 3 routes total in this example (which is very simple)- The first route points all 192.168.0.x traffic to the network card(eth0), the second points all loopback traffic (127.x.x.x) back to the local device (lo), and anything that doesn’t fit into either of those categories goes to the network card (eth0). You may wonder why that first route is in there if the default would just catch it anyways- you see, this allows multiple network cards to point traffic to different gateways or routers on the same network.
Take the next example:
morgajel@p-nut ~ $ /sbin/route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.100.0.0 10.100.0.1 255.255.0.0 U 0 0 0 eth1 192.168.7.0 192.168.7.1 255.255.0.0 U 0 0 0 eth0 loopback * 255.0.0.0 U 0 0 0 lo default 192.168.0.1 0.0.0.0 UG 0 0 0 eth0
all of your normal traffic would proceed to 192.168.0.1, but any traffic to 192.168.7.x would go to a different gateway(192.168.7.1) and all traffic to 10.100.x.x would go to a secondary network card(eth1) and be sent to yet another gateway (10.100.0.0). This would be useful if you were using a load balancing device like a Netscalar or F5, or if you had an internal network and a secondary DMZ’d network or something.
Adding and Removing Routes
if you’re manually setting up routes for a static IP, you’ll generally do something like
route add default gw 192.168.0.1
or remove it with
route del default route del -net 192.168.0.0 netmask 255.255.0.0 eth1
Deleting routes is always the pain- the default route you can simply remove like the first example, but anything else needs the netmask specified and the -net flag used. If you want to see some more examples of routes, try
This will show you… uh, I guess the dynamic routes that have been recently used and cached. If you’re unsure about how to remove or add a route, you can run “route add” or “route del” without any addition parameters to see more options- I think the most I’ve used is something like
route add -net 10.100.32.0 netmask 255.255.248.0 gw 10.100.32.1 eth0
One thing that I learned while writing this is that there is an additional parameter called “reject” which you can append to the end of an add line to basically form a crude firewall to that route ( note- it’s not really a firewall, but it will reject packets). And of course, to get rid of any line you’ve added, you can change an add to a del and it’ll probably remove it (you may need to remove some add-specific parameters like reinstate or mss).
The manpage is pretty straightforward and has some decent examples- Looking at it, I’m not sure why I’ve had such problems with route in the past. Overall it seems pretty simple as long as you get the del syntax correct. Overall I think writing this helped me more than it’ll probably help you.
This was one of the articles I never posted for whatever reason…
So I’m switching over to Kubuntu on my main workstation. The following is a list of things I had to tweak to get kubuntu working as I wanted as well as a rage meter displaying how annoying it was to configure.
|Project||Rage level||Time Wasted|
|ldap auth||frothing mouth||1.5 hours|
|nfs mounts||minor annoyance||5 minutes|
|nvidia driver||n/a||1 minute|
Unfortunately I don’t remember what else I changed on it, so overall this is much less than there should be.
I recently wrote a nice little script in ruby for ldapifying new ubuntu servers- all the server needs is a ssh key set up for root, the rest is cake…
jmorg@util3:~/base_configs# ./ldapify -h Usage: ldapify --install hostname [$options] ldapify --check hostname ldapify --uninstall hostname --install hostname hostname to ldapify(foo.pub.local) --uninstall hostname removes ldapification from hostname -a, --access_group access_group access_group that has access to hostname --no_group_dn No access_group limitations- use with caution. -c, --clusters x,y,z clusters in which hostname belongs --aliases x,y,z other aliased hostnames for the host --ignore-home don't mount/unmount home -v, --verbose enable verbosity -q, --quiet silence all unneeded messages -h, --help Show this message jmorg@util3:~/base_configs# ./ldapify --install log1.pub.local -a devboxes backing up sources.list... updating sources.list... updating package list... adding nfs entry to /etc/fstab... Complete. Mounting home, please wait... complete. installing debconf-utils... patching debconf selections... installing libnss-ldap ... symlinking ldap.conf... copy ssl cert and ldap.conf... complete. No Access group was given, using admin_only by default. backup nsswitch.conf and pam.d files... complete. install nsswitch.conf and pam.d files... complete. ldap requires the manager password: please verify the manager password: store manpass... installing sudo-ldap... jmorg@util3:~/base_configs# ./ldapify --uninstall log1.pub.local restore nsswitch.conf and pam.d files... complete. remove ssl cert and ldap.conf... complete. removing nfs entry... complete. unmounting home... complete. removing debconf-utils, libnss-ldap and libpam-ldap ... removing ldap.conf symlinks... removing sudo-ldap, restoring sudo... retore sources.list... updating package list... ldap requires the manager password: please verify the manager password: jmorg@util3:~/base_configs#
So what all does it do?
- Sets up ldap authentication of user accounts
- mounts the nfs-based home directory
- Sets up ldap-based sudo rules
- Creates a host entry in the ldap server
- Adds an entry in the ldap server for the distro’s cluster and ldapified hosts cluster
- Can completely revert back to the original state
This script takes about 2:45 to run (mostly due to the 120 seconds of waiting for the /home dir to mount), and saves roughly half an hours worth of work. It’s not very stable (pre-ldapified boxes cause it to freak out when trying to re-install/remove) , but it will be a lot of help as we move towards ubuntu as our standard distro.