April 30, 2008

Ubuntu 8.04 upgrade == not so painless

I took the leap into Ubuntu 8.04 today on my HP nx9420. In typical fashion I didn't really think about it before I did it. That was probably an error in judgment on my part. Fortunately, things didn't go badly for me. I would say that they did NOT go smoothly -- I would expect that a Linux user of less experience would've been fighting these issues for days instead of a couple of hours. Briefly, I had four issues: 1) I dorked-up and let debconf over-right my grub.conf, 2) my video resolution in X was AWFUL, 3) the wireless driver would not associate with any wireless access-points and 4) video didn't resume after suspend.

The whole issue with debconf and my grub menu.lst boils down to the fact that I have a lot of different kernels sitting in /boot and it didn't pick the "right one" and what's more it picked one that didn't have an initrd. SO, on reboot I got a lovely kernel panic. After booting to a Debian 4.0 CD I had laying around, I was able to determine the problem and resolve it without too much issue. Stupid. Teach me to leave unused kernels about my file-system!

The video resolution with laptops and nVidia gfx cards always seems to be an issue. Fortunately, the ONE file I did back-up before the install took-off in full-swing, was my xorg.conf file. I simply copied it back to /etc/X11 and all was well. Incidentally, this was also the source of my woes in regards to video resuming after suspend.

Wireless on this thing really blew me away. Not that it was that hard to fix, but figuring it out wasn't so trivial. The basic problem is that there's a bug in the 2.6.24-16 kernel that comes with 8.04 by default, that affects anyone who uses an Intel wireless chipset (i.e. the iwl3945 or the iwl4965). This can only be resolved by either rebuilding your kernel or installing the Linux Wireless compatibility drivers from the Linux Wireless Project. Fortunately, installing the wireless compatibility drivers is virtually trivial. There are thorough instructions on the LWP homepage. I suggest you follow-them.

On a side-note, I did have to go through /etc/default/acpi-support and make the changes I noted on the Ubunto Laptop Testing Team wiki. Had I not previously applied Stephane Grabber's HP resume patch, I would've had to do that as well.

Gmail advanced search features

If you use Gmail, you may not be aware of the phenomenally powerful searching features that are available to you. Google has a really cool list of search operators you can use. I don't have anything spiffy to add to this, I'm just pointing it out for those who might not be aware of it.

April 22, 2008

"Yahoo! + Microsoft" or "Developing v. Delivering"

I'm not a business analyst and am barely even conversant in the mysterious ways of the "markets", but I do know that if I were a Yahoo! share-holder that I'd be voting to approve the proxy-bid for YAHO stock by MSFT. The reason is simple: Yahoo! and MSN have focused on DEVELOPING content while Google has focused on DELIVERING content. The "War of the Web" boils down to who can drive the most traffic through their site(s). Despite the fact that developing content will draw people, it cannot necessarily beat the delivery mechanism which allows content developed by anyone to be distributed to everyone -- its a marketing problem, at its most fundamental level.

Developing content is a complicated and costly business. I won't even try to act like I know what it takes when you're talking about the scale that Yahoo! and MSN do it, but even from my layman's perspective its rife with pitfalls: targeting the right audience, maintaining relevancy, factual accuracy, staffing, multi-media, etc... its a staggering number of hurdles, all of which have to come together in just the right way to make any real significant impact on an already crowded space.

Conversely, Google is simply a platform upon which others develop content (think here search rankings, news aggregation, etc.) and then the masses decide which of it is really worth having. Its very probably just as complex as developing content, but in a different, more achievable way, and it is proving to be dramatically less costly (compare the head-count of a combined MSFT & YAHO vs. GOOG... staggering!)

Google, in effect, has an army of content developers who are all eager to get their content out through the Google Machine, to generate their own revenue. YaMSN can't compete with that. Its like ants against grass-hoppers: sure grass-hoppers are bigger, but there are a billion ants to every grasshopper.

April 21, 2008

Ubuntu: WebDAV + DAVfs2 + FUSE == Thunar Goodness

One of the corner-stones of any *nix utility is that it should do a simple job and do it well. Every piece of software that I can think of that defies that basic principle is junk (e.g .emacs). Thats why Thunar totally kicks ass as a file-manager: it is a file manager, and ONLY a file manager. It doesn't even bother to handle things like mounting non-local file-systems for you, its JUST a file manager. And a fine one at that.

...back-up... a few months ago I got into a lease on a server that has ridiculous amounts of storage and obscene amounts of data transfer, and I wanted to figure out how to harness this box as a potential on-line backup of all the data I am responsible for creating and maintaining. I had used WebDAV for such endevours in the past, but couldn't quite find the time to piece together the different bits needed to make it work in my present environment (which is XFCE4 + GNOME). Tonight, I made the time.

Since my provider's cpanel install handled all of the muckety-muck of getting WebDAV setup, I'm not going to go into that detail. I will however explain what I did to get the WebDAV mounting to my workstation and visible in Thunar so I could transfer files up to it easily.

First, make sure you have FUSE and davfs2 installed. In Ubuntu, fuse comes pre-compiled and davfs2 is available via `apt-get install davfs2`. Once you have davfs2 installed you can test your davfs functionality by doing something like:

`mount -t davfs https://yourwebdavserver.com/webdavshare /tmp/networkdrive` (provided /tmp/networkdrive exists.)

It should prompt you for things like a username, password, and whether or not you want to accept the certificate being offered. If your `mount` completes successfully, verify that you can see what you expect to see in /tmp/networkdrive. If you can, you're golden. Next-up: automating it.

DavFS supports a file that feeds your authentication credentials to mount, automagically. This magical file is /etc/davfs/secrets. You need to create an entry for your new webdrive in the secrets file. The format is simple: There are ample examples in the secrets file too, for reference.

Once you have your secrets file created, simply make an entry in /etc/fstab for the new filesystem... this should look like:

davfs http://yourwebdavserver.com/webdavshare /tmp/networkdrive uid=USERID,gid=GROUPID,user 0 0
Once this is complete, you should be able to type `mount /tmp/networkdrive` and get the webdav drive to mount without having to provide a password or username. In some instances, yuou may still have to accept the certificate, but that's trivial. The nice thing is, if you've properly populated the USERID and GROUPID fields, you should be able to access those files without incident as your normal user.

Hooray! You should be done.

April 20, 2008

EEE PC: minimizing disk writes by relocating browser cache

I got my ASUS EEE PC 4G Surf on Friday. It took me all of ten minutes to decide that that default OS is pretty-much junk for a long-time Linux geek like me. SO, on Friday evening I installed EeeXubuntu. I rather fancy it. Seems like they've got the big issues worked-out, there are some asthetic issues that need to be overcome, but that's another post.

This post is dedicated to reducing disk IO on the EEE. SO, there have been others who've written about hacking /etc/fstab with mount options like 'noatime' and the like, and that is all well and fine, but here's my addition...

The overwhelming creation of temp files on my system comes from web-surfing. Therefore, I decided to make my Firefox Cache a ramdisk. This is pretty trivial, simply find your cache (usually in ~/.mozilla/firefox/SOMETHING/Cache where SOMETHING is a bunch of garbage text) and make an entry in /etc/fstab for it as follows:

tmpfs /home/USERNAME/.mozilla/firefox/SOMETHING/Cache uid=USERNAME,gid=USERGROUP 0 0

Next step is to close Firefox, delete everything in your Cache, and reboot (or do a `mount -a -t tmpfs -o remount`) and DISCO! your web browsing will all be cached.

This configuration has a couple of interesting security ramifications that I had not previously considered until I wrote-this-up... that is: 1) the forensic evidence of malicious web activity will not be stored on any disk, therefore there is virtually no forensicly sound information recoverable from the device unless it is taken "hot", and 2) since all cached data is destroyed after each boot, chances are that any malicious activity done TO YOU (i.e. malware from websites, etc.) won't be traceable either.

All of that aside, I still think for the purpose of cutting down on writes to the flash drive, this setup has merit... and it won't change my intentions of running this way.

April 15, 2008

MLB.tv -- no more condensed games!?!?

Alright, I understand the MLB has a fascist agenda, but do they have to be so explicit about it? I mean, honestly? SO, last year MLB.tv had two features that I thought absolutely kicked-ass:
1) it worked in Linux (which is of INFINITELY less import than the next feature, which was...)
2) it had so-called "condensed games", which were inning-by-inning wraps of each game played lastnight.

This year, some jackass at MLB decided that instead of "condensed games", they'd give us "Rewinds", which are basically the MLB's own sports desk doing highlights... THAT IS NOT what "condensed games" were! Garg!

I've submitted a request that they cancel my MLB.tv subscription and that they refund my money. Monsters.

Asus EEE 4G

I'd been thinking about it for quite a while, and I finally dove into the muddy waters of the sub-compact laptop market -- I bought an Asus EEE PC 4G in "Galaxy Black"... it should be here Friday. w00t! I'm most interested in this thing for my travel days. E.g. my upcoming trip to Vegas for the HP Tech Forum... it'd rock to be able to just have that dainty little thing instead of lugging my monster HP around!

At this time, my plans are to run XUbuntu on it, but I'm probably going to explore loading other desktops too... but only after I jack-up the RAM in that bad-boy... 512MB? I haven't had that little ram in eight years!!! Wow.

HP Tech Forum 2008, here I come!

I'm officially registered for HP's Technology Forum 2008 in Vegas. I'm actually really looking forward to it because they have an awesome mix of infosec, linux and networking sessions! I'm stoked. If you're going to be there, let me know!

April 11, 2008

that blasted Alero blew another motor...and this time, it wasn't my fault.

Over the past six months, I estimate I've sunk very close to $2k into my car... and its not even paid for. $2k!!!! How? Well, $400 for snow tiers, $300 for summer tires, $500 for a new motor, and another $500 for ANOTHER new motor. Come to find out that the "quad four" that comes in the Alero is perhaps the world's worst motor. I'm so pissed.

April 08, 2008

TRENDnet TK-207K 2-Port USB KVM Switch

If you have a TRENDnet TK-207K KVM, which is a two-port KVM that only supports USB keyboard and mouse... you may have discovered that the SCRLK+SCRLK+UP key combination doesn't switch between workstations. I asked TRENDnet about this and they told me two key things: 1) that they don't support wireless keyboards, and 2) that if SCRLK doesn't work, to try NUMLK.

NUMLK worked. It is glorious.

April 05, 2008

FIERCE is re-born.

SAVAGE, and VENGENCE, my WinXP and Linux Laptop, have been joined by FIERCE, their Linux brother. FIERCE is a 1.7Ghz Athlon with a gig of RAM and 80GB of disk running Ubuntu 7.10.

FIERCE used to be the heart-and-soul of my on-line presence -- it had been a Red Hat-based box for seven years. My recent relocation to BlueHost for my web-hosting has meant I'm free to do whatever I want with the old server (a.k.a. PROFESSOR). I still don't know what I'm going to do.

April 01, 2008

Killing `fsck` on boot

Being a laptop Linux user, I turn my box off more than the average user (or, more accurately, it hangs coming out of suspend so I have to reboot)... the result is that my laptop decides to `fsck` the drives after so many reboots. This really really sucks because invariably it happens at the least opportune time. I've been raging about this, privately, for quite some time and today finally decided to do something about it. Enter `tune2fs`.

`tune2fs` is a utility that allows you to tune the file system parameters of ext2 and ext3 file-systems. There are two switches of particular import: -c and -i. -c controls how many mounts the volume can go through before having to go through a `fsck`, while -i controls how long between `fsck` intervals (in days, weeks, months, etc.)

From my experience, I know its a bad idea to disable `fsck` altogether on account of the slight yet horrible possibility that you could end-up with file-system corruption. That said, I also don't want it to happen except with the rarest of frequencies. SO, I disabled the mount counter and set the `fsck` interval to 3 months. I figure I can handle a reality in which I have to sit through a full-fledged `fsck` of my disks four times a year. Here's the actual command and its output.

cjsteele@vengence:~$ sudo tune2fs -c -1 -i 3m /dev/sda1
tune2fs 1.40.2 (12-Jul-2007)
Setting maximal mount count to -1
Setting interval between checks to 7776000 second
cjsteele@vengence:~$