Sunday, December 31, 2006

New PC-BSD

PC-BSD 1.3 is finally officially release - yay! So start you rdownloading engines and go get this shiny new piece of code. You'll be glad you did.



1.3 now available!



Thursday, December 28, 2006

Multiple Dual Personalities

Been quiet here lately, hasn't it? The early part of silence was due to the crush of holiday preparations - shopping, wrapping, visiting, cooking and eating. Once the Christmas crazies were done, it was back to fighting with the hardware, so my online time was sporadic at best.



For Christmas, I got lots of little tech toys. A couple of packs of DVD+RW discs (I have to try and use these more as some temp backup stuff), a bean bag wrist rest (works pretty well), some computer surface wipes, some cool colored thin CD jewel cases, a computer tool set, CD envelopes, and a few other odds and ends. Pretty nice haul, really.



Then it was time to install the new KVM switch from Belkin. I actually had recently just gotten one but then I found out that Belkin also had one that would share dual monitors and I wanted it badly. I also wanted to make the move to a USB KVM switch, as my fancy new G7 mouse wouldn't work with the PS/2 adapter to the KVM switch. So I bought the 4 port F1DH014U SOHO switch and gathered the courage to get it hooked up.



First things first though. One look at the absolute rats nest that was behind my computers made me think it was time to clear that out too. So I unhooked all three computers, pulled them away, and unsnarled the wires back there. It's pretty amazing just how many of them weren't even used any more! I supposed I should have taken some before and after pictures, but the after is still a work in progress and nothing to be proud of already.



I also took the chance to blow the cobwebs out of the cases. My Dell work machine especially had been giving me some problems I was hoping could be attributed to bad circulation. It was running okay, but every time I rebooted or power cycled, the machine would beep at me at first. I'd have to power it down and let it "rest" for a bit. So I used my long ago purchased can of compressed air and blew out all the dust bunnies and buttoned them back up. It seems to have done wonders for the Dell, as it is running much better now.



But the change over to the new KVM switch didn't go very smoothly. To begin with, the "Quick Installation Guide" guide and the main user manual didn't agree on how to get it installed. And neither even made that much sense, as the procedures outlined seemed to require an impossible combination of cables. One talked of rebooting a computer without a display attached and the other talked of leaving the monitors hooked up at the same time you somehow had them hooked up to the KVM switch. And in every case, the switch just insisted on beeping at me, and the keyboard wouldn't work.



I tried to use my new Natural keyboard, using some connector that seemed to allow you to connect a PS2 plug to a USB plug, but that didn't seem to work. So then I tried my new Saitek USB keyboard, and that didn't help either - still beeps. I tried all sorts of installation methods, but still just beeps. I also had a problem that the Dell machine has a dual monitor Nvidia card in it, but both connectors were DVI, so I needed two DVI->VGA adapters for that one and one for my other machine (the ATI has one VGA and one DVI), and I only had two. And the KVM cables are very strange looking. The computer side has two VGA connectors, and off one is a USB cable and off the other are two audio (mic & speaker) wires. And on the KVM side, there's a male and a female VGA connector. Not sure what happens to the audio and the usb - it must magically get transformed via the vga connectors somehow.



Which also means, I think, that all the KVM cables I have laying around, from 10 years or more of KVM use, are worthless. I have a question into Belkin tech support about whether I need the special cable for this KVM switch, but I'm pretty sure I do, which would be too bad, although the cables themselves are only US$25 or so from Provantage. I put in an order for one more today but I probably should've ordered another one too.



The KVM switch also comes with two general USB ports, for sharing other USB devices between computers, which is pretty cool and, as it turns out, a life saver. Anyway, I decided to try one more time this morning to see if I couldn't get the darned KVM switch from beeping at me. I grabbed the only other USB keyboard I have in the house (at least until my boss reminded me that the work Dell came with one that I still had in the box) - a kids keyboard. It's a pretty, tiny, yellow, and sans Window key, scroll lock and key repeat. Well, lo and behold, it stopped beeping at me! Not sure what it didn't like about the Saitek, but with the baby keyboard plugged in, I could finally try it out. And by using one of the shared USB ports, I could use the Saitek keyboard (it worked fine there).



So after I became convinced it would work (and work it did - dual monitors now on two of my machines - woo hoo!), I headed back out to the stores. There I picked up another DVI->VGA adapter (CompUSA wanted US$50 for one, so I got mine at BestBuy for a still outrageous $10), another pair of headphones (I keep breaking mine - the last pair, a wonderful Sennheiser, got the boom mic snapped off), a keyboard and a real PS/2 to USB adapter, which actually has two PS/2 plugs on one side to hook up a mouse and a keyboard. I just couldn't bring myself to splurge on Yet Another expensive keyboard (I really like the Microsoft Natural Ergonomic Keyboard 4000 (phew!) but it was US$65), so I got a Microsoft Comfort Curve 2000 instead (US$24). That's probably a poor trade off, as I shouldn't be compromising on my keyboard, spending as much time at it that I do.



But then I found this PS/2 keyboard/mouse to USB adapter, so I picked that up too. If it actually worked, I could use my newly purchased PS/2 Natural Media Elite keyboard, even if it has that stupid F-Lock key. For those of you too young to recall that dark period in keyboard design, some brilliant mind at Microsoft decided that function keys were too passe, and that turning them into dedicated "extra keys", like Close, Redo or Spell was a good idea. And to make it even better, let's make it be the default! Idiots. So any keyboard made during this short period (I want to say 1998-2002 or so?) had the F-lock key, so you could tell it to go back to using them as good old-fashing function keys. And it's particularly annoying here, because the SOHO series of Belkin KVM switches uses a dumb "double scroll lock" keystroke to switch machines via the keyboard, and that too requires the F-lock to be set.



But it's a very comfortable keyboard despite the flaws (luckily F-lock only needs to be hit once per reboot) so I figured the adapter would be a good first try. And yup, it does seem to work fine! Although the KVM switch seems to be confused and the keyboard USB plug behaves very strangely and slowly, so I can't use it. I have the Dell plugged into it now, just to keep it from beeping, and I have the Natural plugged into one of the extra USB ports, so it's working well. As I typed this, it occurred to me that perhaps because I had that kids keyboard plugged into it and its lack of key repeat confused either the port or the switch itself? Maybe I'll have to cycle power on it and see what happens.



So I have another cable on order and I'll try to see how it works with the old machine. I'm not sure how well that machine will work without a PS/2 keyboard, as it might not be new enough to deal with a USB keyboard only. We shall see.



Added: Removing power to the KVM switch worked like a charm! I unplugged the power as well as the USB cables and let it sit for a bit. When I plugged it back in, I put the Natural+PS/2 adapter keyboard in the keyboard USB port and voila - a working keyboard! Weird how it "remembers" this sort of stuff...




Sunday, December 24, 2006

Doing The Samba

I was trying to figure out how to get Samba working right on my PC-BSD boxes. While I was impressed with how easily it integrating into my Windows network, the happiness was only in one direction - I could copy files to the Windows machines, but I couldn't write to the PC-BSD from them. This became particularly critical when I moved one of the 160gb machines to the OS beast and needed to get some files from it. I didn't really want to figure out NFS and add Yet Another Server running, so I wanted to get Samba working in both directions.



So I used the Google-fu and found this page and followed the instructions. They're not perfect (they too need a lesson in the usefulness of 'make -p' to make a whole set of directories at once), but it led me down the gold path. I think I was just missing the "writable" flag, as that is different than "read-only" I guess.



I didn't really like the KDE Samba tool. Mainly, I wasn't sure if it restart the Samba daemons once you saved the changes, so I just edited the /usr/local/etc/smb.conf file by hand. I added this part to the Share Definitions and all seemed to work:




#============================ Share Definitions ==============================
[homes]
comment = Home directory for %u on %h
browseable = no
writable = yes
read only = no
path = /home/%u
valid users = %S

# A publicly accessible directory, that can be read from
# or written to by all valid users.
[public]
comment = %h Shared Public Directory
path = /home/samba/public
force directory mode = 0777
force create mode = 0777
force group = nobody
force user = nobody
public = yes
writeable = yes
read only = no


It's a little tricky because it the home folders aren't browseable, but it allowed me to get at the folders on my main PC-BSD machine from my other, test 1.3, PC-BSD machine and copy over a bunch of music and picture files I had on the hard drive that moved. I'm not sure what most of those options do, as the samba config file is probably second only the sendmail for complexity. But it works and I'm happy!



The main reason I did it was to copy over a bunch of digital pictures I had on the other machine, as I bought a Mustek 7in Digital Picture Frame for my mom. It works okay, but the user interface is just horrible. It doesn't find the USB key by default (although the directions imply it should), so you have to go into the setup menu to select it. And it isn't that clear how to get out of it and go back to playing a slide show. And while many of the settings are remembered if you power it off, the fact you are using a USB key (instead of the a SD, MMC, or memory stick) is not. One other important setting isn't remember either. The default is to only play the files on the stick once through, which is insane. So you have to remember to go into the settings menu and select "repeat all" to get it to just keep cycling through. Stupid setup decisions. So I'd hesitate to recommend this player, although I don't have any experience in any other one.




Saturday, December 23, 2006

History Of the Unix Wold

Very excellent chart giving the nearly complete evolution of Unix, from the very first days of UNIX in 1969. Really does a great job of exploring the various offshoots, including Max OS/X and my fav, PC-BSD. Check it out!



UNIX history




Friday, December 22, 2006

History Of Computing

There was a poll on the PC-BSD forums asking how long you've been around(sic) computers which got me thinking about my computer history. It began really when I built an 8008 computer with a friend of mine for a high school project. Cutting edge stuff then (1976 or so). Been dabbling in computers ever since then, and getting paid for it since 1979.



My first paying gig was with a small consulting company called Arcon. They had just gotten the software sub-contract for a big air traffic control system and were looking for computer programmers, or at least someone who knew what a keyboard looked like at least! And that was my main qualification, although I had taken a couple of months to do some FORTRAN programming while at RPI before dropping out in my sophomore year. And when they offered me $12,000 per year, I jumped at the chance to change careers from a roofer to a computer programmer. This was in November of 1979.



Luckily, everyone else was too busy writing proposals, so me and another new guy got complete reign over two of the most advanced mini-computers of the time, one of the first 32 bit computers - a Perkin Elmer 3220 (oh, how easily it still comes back!). So we got to hack around with them for a couple of months and my career was off. And I've been programming computers ever since, on a wide variety of projects, including computer games (too hard), desktop publishing, education, multimedia editing, and now video conferencing.



My current computers:




  • The main machine (a 2.53ghz Pentium 4, 1gb RAM) with is running PC-BSD 1.2. Made the swap away from Windows 6 months ago and haven't looked back. It does dual boot into WinXP for gaming but that doesn't seem to happen as much as it used to.


  • Main server runs FreeBSD 6.1. It's been running FreeBSD since the 4.x days.


  • 2 computers (around 2ghz AMDs each) running WinXP for my wife to work on and my girls to play games one.


  • WinXP is on my dual CPU work machine, as that is our main target for our software (inSORS - high-end video conferencing). I'd love to stop using it, even if it was to move to Linux (the server end is on Linux), but I don't think I can yet.


  • OS Play machine. Hard to believe that a machine with 400gb of hard drive space is a play machine, but there you go! I use it to test install PC-BSD, Linux distros and other OSes. I'm such a sucker for OS testing!




Wednesday, December 20, 2006

Serve This, Buddy!


Some alternate web servers for you to consider. I'm not sure what they have to offer over Apache. I think most of them promise a lighter, faster, easier to use web server, as Apache can certainly be a beast in oh so many ways! I should probably run one of these on my local machine, as I don't really need all the power and sophistication of Apache for my quicky testing here. These all, of course, have ports and most of them even have PBIs.



Cherokee Web Server :

Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, TLS and SSL encrypted connections, Virtual hosts, Authentication, on the fly encoding, Apache compatible log files, and much more.
The latest news was in October 2006, but the latest release is 0.5.6, done on 15 Dec 2006, so it is an active project. A basic web server.



Lighttpd

Security, speed, compliance, and flexibility--all of these describe LightTPD which is rapidly redefining efficiency of a webserver; as it is designed and optimized for high performance environments. With a small memory footprint compared to other web-servers, effective management of the cpu-load, and advanced feature set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) LightTPD is the perfect solution for every server that is suffering load problems.
Maybe one of the most popular alternate web server. Lots of features and great performance.



Abyss

Abyss Web Server is a compact web server available for Windows, MacOS X, Linux, and FreeBSD operating systems.
Despite its small footprint, it supports HTTP/1.1, dynamic content generation through CGI/FastCGI scripts, ISAPI extensions, native ASP.NET support, Server Side Includes (SSI), custom error pages, password protection, IP address control, anti-leeching, and bandwidth throttling.
From Aprelium Technologies, this seems to be a feature rich server.




Tuesday, December 19, 2006

The Twilight X Zone

How very very very very strange! I hooked up my new 17in LCD monitor after zapping my last one (nope, I still haven't picked up any fabric softener!) and hoped against hope I could do a dual screen display with both monitors at 1280x1024 (my previous 15in LCD only went to 1024x768). But just like before, X fought me tooth and nail. This time it was even worse, as no sooner would a window begin to paint on my new monitor than the whole system would hang, requiring the ol' reset button.



As a side note, I really hate new computers without a reset button. My work DELL just has a "power" button, but even that is more of a suggestion to Windows that it is time to shutdown. As a developer, who tends to put their machines through hell and back, it can be a real drag. I keep having to pull the power plug on it, as it just won't shutdown! But the boxes I build myself will always have a real power on/off and a reset button.



I tweaked and tweaked and tweaked my /etc/X11/xorg.conf file, to no avail. I settled in on the same old 1024x768 dual setup, but that was just so annoying. So I used even more Google-fu, and found a very nice entry here, in the Gentoo wiki. This lead me to a very comprehensive xorg.conf file here.



Of course, none of this really helped exactly. It's all Linux, and not quite the same video card, etc etc. So back to more tweaking. And somehow, miracle of miracles, I even ended up with a working dual 1280x1024 setup! And to be honest, I have no idea what I did to get it to work. I took out some stuff, especially the Virtual keyword, and let X figure out what it needed and I think that really helped. Either that or going to 16 bit color mode. But as I don't do any real graphics intensive stuff on my PC-BSD machine (no movies or games, and very little photo editing), I'm perfectly satisfied with 16 bit color. I may try to go back to 24 bit and see if that was the problem, but let me savor my victory for a few days before I do that, okay?-)



Anyway, here is my currently working xorg.conf. This is using Xorg, v6.9 on an ATI x850 dual head card with 128mb RAM. I have the DVI connector hooked to my 17in Envision LCD monitor (via a VGA adapter) and the VGA hooked up to my Samsung SyncMaster 997DF monitor. And it works even! Well, the DRI stuff doesn't work, so I'll have to look into that.




Section "ServerLayout"
Identifier "Radeon Dual Monitor"
Screen 0 "Screen0" 0 0
Screen "Screen1" LeftOf "Screen0"
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection

Section "Files"
RgbPath "/usr/X11R6/lib/X11/rgb"
ModulePath "/usr/X11R6/lib/modules"
FontPath "/usr/X11R6/lib/X11/fonts/75dpi"
FontPath "/usr/X11R6/lib/X11/fonts/100dpi"
FontPath "/usr/X11R6/lib/X11/fonts/TTF"
FontPath "/usr/X11R6/lib/X11/fonts/TrueType"
FontPath "/usr/X11R6/lib/X11/fonts/bitstream-vera"
FontPath "/usr/X11R6/lib/X11/fonts/dejavu"
FontPath "/usr/X11R6/lib/X11/fonts/freefonts"
FontPath "/usr/X11R6/lib/X11/fonts/local"
FontPath "/usr/X11R6/lib/X11/fonts/misc"
FontPath "/usr/X11R6/lib/X11/fonts/omega"
FontPath "/usr/X11R6/lib/X11/fonts/urw"
FontPath "/usr/X11R6/lib/X11/fonts/webfonts"
EndSection


Section "Module"
Load "extmod"
Load "glx"
Load "dri"
Load "dbe"
Load "type1"
Load "freetype"
EndSection

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection

Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/sysmouse"
Option "Buttons" "5"
Option "ZAxisMapping" "4 5 6 7"
EndSection

Section "Monitor"
#DisplaySize 310 230 # mm
Identifier "LCD-Mon"
VendorName "EPI"
ModelName "EN7410e"
### Comment all HorizSync and VertSync values to use DDC:
# HorizSync 31.0 - 83.0
# VertRefresh 56.0 - 75.0
Option "DPMS"
EndSection

Section "Monitor"
#DisplaySize 350 260 # mm
Identifier "CRT-Mon"
VendorName "SAM"
ModelName "SyncMaster"
### Comment all HorizSync and VertSync values to use DDC:
# HorizSync 30.0 - 96.0
# VertRefresh 50.0 - 160.0
Option "DPMS"
EndSection

Section "Device"
Identifier "ATI Port 1"
Driver "ati"
VendorName "ATI Technologies Inc"
BoardName "R480 [Radeon X850Pro]"
BusID "PCI:1:0:0"

# MergedFB options
Option "MergedFB" "True"
Option "CRT2Position" "RightOf"
Option "MetaModes" "1280x1024-1280x1024"
Option "RenderAccel" "True" # []
Option "DMAForXv" "True" # []
Option "MergedXineramaCRT2IsScreen0" "True"

Option "VideoOverlay" "on"
Option "OpenGLOverlay" "off"
Option "MergedXinerama" "True"
EndSection

Section "Device"
Identifier "ATI Port 2"
Driver "ati"
VendorName "ATI Technologies Inc"
BoardName "R480 [Radeon X850Pro]"
BusID "PCI:1:0:1"
EndSection

Section "Screen"
Identifier "Screen0"
Device "ATI Port 2"
Monitor "CRT-Mon"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection

Section "Screen"
Identifier "Screen1"
Device "ATI Port 1"
Monitor "LCD-Mon"
DefaultDepth 16
SubSection "Display"
Depth 16
Modes "1280x1024" "1024x768" "800x600"
EndSubSection
EndSection

# Make it so other users can use DRI
Section "DRI"
Mode 0666
EndSection


Sunday, December 17, 2006

Separate Partitions

I finally got my beast machine set up and running. As you may recall, I was having quite the battle with it, as it ferociously fought my attempts to use hard drives with a capacity greater than 137gb. I returned the generic CompUSA RAID ATA133 controller card for a name brand (Belkin) plain ol' ATA133 card. It cost US$50, which seems a little excessive. I could have picked up something similar online for less, but it sure is nice to just return or exchange something if it doesn't work, rather than wait for the mail to do its thing. And it only came with one "Ultra ATA" cable, instead of the two that came with the CompUSA card, so it was lucky I had a couple of them hanging around here.



But at least this installation went exactly as planned - plug the card in, plug each drive into the controller card, turn on the computer and see three different hard drives, two of which have 160gb capacity. Yay! So I split one of them up into 4 40gb partitions, so I can play with various installations. I installed the latest and greatest PC-BSD (1.3 RC1) on one partition and it went off without a hitch.



I then tried to install Ubuntu on the next partition and while the installation went fine, the default setup overwrote my BootIT NG boot loader. So I had to re-install that and now I had the problem where it wouldn't boot the Ubuntu partition. I thought the Ubuntu installer was also a little finicky when it came to picking a partition to install into. Unlike the new PC-BSD installer, you couldn't just pick a partition and say install into that. You had to set it up correctly yourself. And Linux needs two partitions at least (one for / and one for swap), so if you already have the max 4 primary partitions, it gets kinda tricky. BootIT NG actually has an option to allow more than four primary partitions, but as it ties you to committing to BootIT NG to handle all the partition work, I haven't dared experiment with it.



So that means you have to know enough to set up an extended partition with two volumes. But even after I did that, the final installation screen wasn't very clear about where it want to install the GRUB loader, with just a subtle "GRUB: (hd0)" prompt in the middle of the page. What I should have done, I think, is to change the (hd0) to be (hd2,4), which says to install it on the third (0,1,2) hard drive, first extended partition (I guess GRUB starts at 4 for all extended partitions). But I didn't know that until recently, thanks to some expert Knowledge Base articles on the Terabyte Unlimited web site: Knowledge Base: Linux



So after I re-installed BootIT NG, I had to figure out how to get the GRUB loader installed into the new Ubuntu partitions. Here's how I had it set up:




  1. 20gb boot hard drive

  2. 160gb hard drive, with two NTFS 80gb primary partitions



    1. 40gb PC-BSD partition (actually, a "slice" in BSD parlance)

    2. Extended partition with:

      1. 38gb Linux

      2. 2gb Linux Swap



    3. 40gb empty partitions

    4. 40gb empty partitions





So, using the BootIT NG advice, I booted the Ubuntu installation CD (which, luckily, doubles as a Live CD), opened a terminal window and the partition editor. The partition editor showed me that my 3rd hard drive, 2nd partition was called "hdg5" (sic). So, in the console window:




$ sudo mount /dev/hdg5 /mnt

$ sudo grub-install --root-directory=/mnt /dev/hdg5



This might not be the most efficient way of doing it, but it worked. I couldn't get grub-install to work if I just said grub-install /dev/hdg5, as it complained about not being accessible. I guess it can't write to it directly, but rather needs to get at the /boot folder. After doing this, I could finally select the logical partition in BootIT and I can now boot Ubuntu and play with GNOME. I like how it asks if you want to update stuff at boot time. I think that is an important next step for PC-BSD to take.




Wallpaper Bingo

Nice collection of big, bigger and biggest wallpapers. Lots and lots of different pictures, including fractal ones. Go ahead, I dare you to pick just one!



mandolux





Saturday, December 16, 2006

Bad Vista, Bad!

FSF has started a campaign to educate the public about the evils of Microsoft's upcoming OS, Vista.  Vista is an incredibly invasive upgrade, with digital locks all over the place.  Microsoft is really getting into bed with big media with this release, and I'm glad I'm a Windows-free shop here (well, my wife is still on WinXP, but I need to ween her from it).  BadVista.org will highlight the bad news about Vista, and be a central rallying point for this noxious OS "upgrade". Cool!

BadVista.org: FSF launches campaign against Microsoft Vista — BadVista

powered by performancing firefox



Thursday, December 14, 2006

Instant Domination

Cool little site that uses the magic of AJAX to tell you right away if a domain name is already taken. I love searching for new domain names, and this is as instant gratification as you can get!



Instant Domain Search



Edited: Proving that great minds think alike, nixCraft just posted about another AJAX site that lets you do all kinds of web things, like whois and live nds: ajaxdns.com.





Wednesday, December 13, 2006

Be Nice To Your Commandline

Good article showing you 10 things to avoid when using the command line. To wit:



  1. Make directory trees in a single swipe.


  2. Change the path; do not move the archive.

  3. Combine your commands with control operators.

  4. Quote variables with caution.

  5. Use escape sequences to manage long input.

  6. Group your commands together in a list.


  7. Use xargs outside of find.

  8. Know when grep should do the counting -- and when it
    should step aside
    .

  9. Match certain fields in output, not just lines.


  10. Stop piping cats.



Learn 10 good UNIX usage habits



Yet another shoutout to nixCraft for the pointer!






Static Zing

Well, I had a very bad day at the computers yesterday. Needless to say, things didn't go as smoothly as I had hoped in my attempt to upgrade the beast to successfully noticed hard drives bigger than 137gb. The ATA card I picked up from CompUSA didn't work as expected, I think because it is a RAID card and not just an ATA133 I/O card. All my tools (most especially BootIT NG were confused when I added a second hard drive to it. I put the new 200gb hard drive in my main machine, but unfortunately I don't have any free mounts for another hard drive, so I had to move one out. I moved out the 160gb Deskstar drive that had 2 big NTFS partitions from my days on WinXP.



After putting the CompUSA card in my beast, it worked pretty well with the 160gb hard drive that was in there. But I wasn't happy enough with that, so I tried to put the 160gb hard drive from the PC-BSD machine in it and that confused the daylights out of everything. BootIT NG and the tools found on the UBCD noticed the first 80gb hard drive fine (on the normal IDE controller), and one of the 160gb hard drives. But, while all the tools saw a third hard drive, they all showed it as the 80gb hard drive for some reason. Which is a drag. And just having it in there seemed to make BootIT NG get too confused to even work.



So I think I'm going to return the card and get a more narrowly defined, ATA133 PCI card, rather than one that can be a RAID card. That looks like it will work okay, as I have one in the main machine that I transferred over to test.



But that wasn't the worst of it. I've been having a real problem with static electricity. I've rebooted my PC-BSD machine a couple of times when I've gotten too close to the power button on the front of the case and felt a ZAP of static. And with all those big hard drives, it takes forever and a day to reboot PC-BSD, as it has to run fsck on all of them. Luckily, I haven't seemed to lose anything yet, but it is only a matter of time.



Then, this morning, I got a jolt when reaching behind my cheap-o 15in LCD monitor and, sure enough, I completely fried it. So all my hard work trying to get my dual monitor set up running was all for naught. But at least I get my 1280x1024 display back on my main monitor, which is a relief. So I ordered up a 17in LCD from CompUSA - an Envision EN7410e, which is only $130 after rebates, and it includes free shipping. It only has a 60hz refresh rate, but at least it goes to 1280x1024, so I can finally use 2560x1024 as my dual monitor desktop.



Here's a good tip from Microsoft, of all places, on how to minimize static electricity:



Static electricity can cause problems for your computer, ranging from unexplained crashes to permanent damage. If you have carpeting that is causing static electricity problems, you can purchase anti-static sprays designed specifically for this problem, but they can be expensive: $4 US or more for a 16-ounce spray bottle.



You can solve the problem for a lot less with a single trip to your local grocery store. Buy an empty spray bottle and a bottle of standard laundry fabric softener - pick one with a scent that you like. Then dilute the fabric softener with water at about a 1:10 ratio and put it in the spray bottle. Spray the carpet lightly, especially around computer work areas. This should reduce or eliminate the static build-up. Reapply as needed, though you should be able to go at least a week or two between applications.



So that's what I'm going to do. It should also hasten the office move downstairs, where there is a tiled floor.




Monday, December 11, 2006

Hard Drive Hiccups

PC-BSD 1.3RC1 has been released and I'm looking forward to giving it a try. The beta 2 was one of the smoothest installs I've ever had on my Frankenstein machine and I'm anxious to begin to really test it out.



Unfortunately, I ran into a few problems with the monster. I have a 160gb Seagate on the HPT66 onboard controller. It has 2 "normal" IDE drives and this ABIT BE6 was one of the very first boards to have a UDMA66 controller in addition (yup, that's how old it is). That's been a real sticking point for many operating system installs. Up until WinXP, I had to add a driver special for it at install time in order for it to be found. I eventually sort of gave up on using it, as it was so painful to get working.



But for the most part, PC-BSD worked just fine with it. I used the 1.2 installer to partition the hard drive into 4 40gb or so primary partitions, and use the various partitions to test install various versions of PC-BSD, usually with good luck. The fourth partition, however, was giving me some problems. It did not seem to want to boot anything off of it.



So I tried to install Ubuntu 6.10, just because I'm a glutton for punishment. Not like I don't have a million other things to do, but I figured I try this popular Linux distro, just to see how the other half lives, and to play with a GNOME system, as PC-BSD uses KDE as its primary window system. So I downloaded the ISO, burned the CD and booted it.



It's pretty cool, as the install CD doubles as a Live CD, which is nice. I don't like the brown color scheme, but I guess it is supposed to be suggestive of the African safari, which is where the name comes from. So I did the install and found some goods things and some bad things. It's easy to do, but some screens are still way too geekish, asking for you to pick (hd0) to install the loader. But the install went smoothly and so I rebooted.



But my boot manager couldn't find Ubuntu. This was strange, as I hadn't had this problem in the past. BootIT NG is a pretty solid piece of work and I couldn't figure out why it didn't see the new installation. So I started looking at the hard drive using the builtin partition tool, and it was insisting it was a 130gb hard drive, and not a 160gb hard drive. I used the UBCD to check out a few tools, and they too alll insisted it was a 130gb hard drive. Now I was really confused, as I don't keep meticulous records as to exactly what hardware is where, but I was still pretty sure it was a 160gb hard drive.



So I rebooted the PC-BSD install CD and it said it was a 160gb hard drive. Now I was really confused. So I went to the ABIT web sit, after I finally figured out it was an ABIT motherboard. I have 5 computers here and 3 or 4 old ones in the garage, all with different motherboards. I should keep better track of what is in what, but I don't. But this motherboard is so old, ABIT stopped updating the BIOS in 2000, and there was even a FAQ about the HPT card not seeing a hard drive as bigger than 137gb. So I think I figured out the mystery - the onboard UDMA66 controller was too old to properly recognize a 160gb hard drive and it was only through the magic of FreeBSD that it saw the correct drive.



So I started looking into building a new, fast computer and retiring this 900mhz beast. But by the time you put in a nice video card (US$350), motherboard (US$150), CPU (US$400) and memory (US$250), the cost was already over US$1000, and, needless to say, at this time of year I just don't have that kind of cash lying around looking to pump up my computer collection! And the 200gb hard drive I bought a few weeks ago is still sitting on my desk looking for a spot, and I'd be damned if I was going to put it into this thing that would only recognize 137gb of it!



So I checked in at the CompUSA web site and they have a very nice sounding ATA 133 card. It even does RAID, but I won't go that route right now. So I picked this US$30 card up. I'll probably try throwing it into my main machine, as it currently is using a slightly older IDE card for a couple extra hard drives. But maybe I'll first try it in the beast and see how it works. Hook up the 200gb drive to it too and see how it flies.



Windows often has problems with these IDE cards, but I've yet to have a problem with a BSD or Linux distro. They just pick it up and go with it, which is a nice change. Perhaps I can finally dedicate this machine to its originally envisioned purpose - as a Bacula server for the rest of my network. With 360gb of storage, it should be enough. Actually, there's a little more than that even, as it still has the 10gb(!) and the 20gb old fashioned IDE drives on it! Told you it was old.





Sunday, December 10, 2006

Mapping the Internet

Cool "map" of IP addresses and who owns them and where they are. xkcd.com strikes again!






Thursday, December 7, 2006

Timely Intervention

I was replying to a post on the PC-BSD Forums about updating the ports tree, and it seemed to tie into a lot of things I've been looking on lately, so I decided to expand it a bit and explain how to do it.



The FreeBSD ports tree is an amazing piece of work. At the time of this writing, there are over 16,000 pieces of software in it, and it is just incredible how well most of them work. One of the most tedious things to do in a non-Windows environment is to install software from source (which is often how they are delivered). This is especially true in the development world, where support libraries and the like usually require a bunch of configuration, and careful building. When I was trying to get wxWidgets to install on Linux, it took forever to get it set up and installed right. Under FreeBSD, I simply did:



# cd /usr/ports/x11-toolkits/wxgtk28
# make all && make install && make clean


I like to do the port build in three separate steps, rather than the more common # make install clean. It just seems to isolate problems better, and does a better job of building things without problems. Of course, these days I would just do # portmanager x11-toolkits/wxgtk28 -l and let portmanager do all the heavy lifting.



But in order for this process to work well, you have to be a stickler for keeping the ports tree up to date. It isn't surprising to realize that with over 16,000 ports, there are changes happening to it all the time. So you want to get a good system for keeping it up to date. I've written before about the much improved over cvsup way of doing it using portsnap, so that's what I'm going to talk about.



First, you need to get a crontab job set up to grab the updates. Many places out there still tell you to just go ahead and edit /etc/crontab as root. But that's just not the way to do it any more. Like virtually everything in /etc, the crontab file should be left alone, so that future updates can just overwrite it. About the only file that should get edited in there is rc.conf, and even for that I hear there's move afoot to create a custom version in /usr/local/etc which is where it belongs. So you don't want to just edit the system-wide /etc/crontab file, but rather you want to add a crontab job to root's personal crontab. You do it this way:



# setenv EDITOR ee
# crontab -e


Notice I set the EDITOR environment variable. In typical BSD fashion, the EDITOR variable tells crontab (and many system other config tools) what editor to use. The default editor is vi and, while I don't want to get into an editor war, I think I can safely say there isn't a more difficult editor for a newbie to use! I can use it enough to get some stuff done, and if you are going to be working in BSD land for long, I advise you to get minimally proficient as well. But if you set the EDITOR variable to your favorite editor, or at least 'ee' (easy editor), you'll find things much clearer. 'ee' is a very easy to use editor, and has lots of prompts. If your root shell isn't the default csh, you'll need to use the appropriate syntax to set the EDITOR variable (bash users would use # export EDITOR=ee, for instance).



After you type in the crontab -e command, you'll be dropped into your editor with a blank screen and a strange filename, like 'crontab.qNqprVSSlN'. Not much help really. What has happened is that it created a temporary crontab file and wants to you enter in, one line at a time, what to have it periodically do. The crontab(5) man page describes the format of this very picky file. There are 6 "fields" in the files, separated by white space. The first 5 fields tell it the date and time of when to run the 6th field, which is the command to run (the system /etc/crontab has a 'user' field before the command field, but because we're editing the user specific crontab, it isn't needed here). Read the man page for all the various ways to specify date and time, as it is incredibly flexible. We're going to use a shortcut, as here's what our crontab will look like:



@midnight /usr/sbin/portsnap cron


There's a bunch of special shorthand '@' specifiers you can use in the crontab which I only recently learned about. Here's the full list:




string meaning
------ -------
@reboot Run once, at startup.
@yearly Run once a year, "0 0 1 1 *".
@annually (same as @yearly)
@monthly Run once a month, "0 0 1 * *".
@weekly Run once a week, "0 0 * * 0".
@daily Run once a day, "0 0 * * *".
@midnight (same as @daily)
@hourly Run once an hour, "0 * * * *".


So instead of the 5 date/time fields, you can use one of these special strings, which is a nice shorthand for a particular date/time set of fields (I can never remember the order of them!). Another thing to be careful with is the command you want to run (which is all the rest of the line after the last date/time specifier). The environment it runs in is pretty bare, so it is safer to specify the full path to command and assume almost no other environment variables are set (the crontab(5) man page tells more).



In this case, we are going to run portsnap's special 'cron' command. This tells portsnap to sleep for some random amount of time (up to 6 minutes) before actually doing the 'fetch' command and getting the updates. This is so all the lazy people like ourselves who insist on specifying a "simple" time like this don't bury the server every night precisely at midnight! At some point, you could probably change the time to be something like 13 3 * * *, to run it a 3:13am, a somewhat off time. But this will work for now.



So now, every night around midnight, portsnap will fetch all the /usr/port changes. But it won't actually update the port tree. It isn't really a good idea to run the 'update' command from a cron job, because terribly bad things would happen if you were in the middle of building a port when it suddenly got updated by a hidden cron job. I don't know what would happen; maybe the Earth would implode or the Yankees would win the World Series, but something too terrible to contemplate, so don't do it:-)



So before I build a port for the first time in a day, I do the update command:



# portsnap update
# portmanager security/sudo -l


It doesn't hurt to do the update too many times, but you only need to do it once after the 'fetch' command has been done. I'll bet I could even script something that could figure out if an update had been done since the fetch and run it automagically before doing the portmanager build. I'll have to look into that.



So there you have it. The only thing you have to remember to do is to run the portsnap update command before installing a new port, which isn't so hard. And you are left with a nicely updated /usr/ports tree.



X Window Games

Oh oh, I'm in trouble! Dru Lavigne has just posted a new article showing all kinds of cool looking X tricks, include:




  • How to get DRI working

  • Nesting X displays - great for working with multiple window managers

  • Distributed Multihead - display one machine's desktop on my second monitor



Oh man, I could play for hours with these things! I ... don't ... have ... the ... time.



ONLamp.com -- Fun with X.org



Wednesday, December 6, 2006

Extending The Fox

Lifehacker has asked the important question "How many Firefox extensions do you have?", so I figured I'd list them here, along with a small explanation.




  1. Adblock Plus : I hadn't bothered with an ad blocker for quite some time, but now that I've been running linux-firefox, which enables Flash, I just had to add it. I find blinking, flashing, jumping ads to be far too invasive for me, and this seems to do the job and kills them good.

  2. Auto Copy : this extension automatically adds selected text to the clipboard. Every now and then it can be a nuisance, but given that 95% of the time the reason you are selecting text is so that you can hit Ctrl-C to copy it, it just Makes Sense.

  3. Colorful Tabs : for some primary reason, this is my favorite extension. It merely gives each tab its own color. Very nice eyecandy.

  4. Copy Plain Text : Gives you the option to not bring along any formatting when you copy text. You can even tell Auto Copy to use it.

  5. CustomizeGoogle : Adds lots of cool filtering features to Google searches, including most especially removing all the annoying ads. But there's lots of other little tweaks it does that make it worthwhile too, like adding links to other search sites. Not as important with Adblock, but still a useful extension.

  6. DOM Inspector : A tool to inspect the layout and objects on a web page.

  7. Download Statusbar : A small tool that adds a panel to the bottom of your page when you are downloading something, instead of the download window. I can't say as I've been wildly impressed with this. I don't like the fact you can't make it go away, and it tends to get stuck showing 99% done. I've removed it from some of my Firefox installations and will probably do so here too.

  8. Fasterfox : An extension that speeds web page downloads. I haven't done any extensive testing to see if it really does, but it seems to work okay.

  9. FireFTP : A tool that adds a pretty reasonable drag 'n' drop FTP client right in Firefox. It can be a little slow building lists of 100s of files, but it does a pretty good job nonetheless.

  10. Google Notebook : A priceless extension that adds a place to pull together bookmarks and notes on mostly temporary projects. Sometimes you're researching something and you don't necessarily want to clutter up your permanent bookmarks (like maybe a hotel in a city or something). This is a great place to put these things, and add notes as well. I just need to remember to use it more!

  11. Google Toolbar : With Firefox 2.0 having spellchecking builtin, I'm not sure I need this so much any more. It has a very nice spellchecker, and a bunch of quick ways to search Google, but I'm not sure it is worth the screen real estate any more.

  12. Googlepedia : Another favorite extension, this one splits Google search pages into two vertical windows. The Google search results are on the left and the nearest appropriate Wikipedia page is on the right. I'd say in about 75% of the searches, the correct Wikipedia page shows up. It's nice to be reminded to search in that treasure trove of information, as I would often forget.

  13. SiteAdvisor : Adds a little icon to Google search links to say whether it is okay or a den of spyware.

  14. Plain Text to Link : Highlight those pesky URLs that don't have links in them, right click and jump to them.

  15. Web Developer : Adds a whole host of useful web developing tools to a menu.

  16. Zotero : A Firefox 2.0 only extension, it adds a window at the bottom of the browser to help with Real Research, for things like citations and the like. Haven't used it much, but I intend to.



So that's what I have right now. Sixteen! I wonder just how slow they all make FF? I'm sure startup must be affected, but because I do it at login and hardly ever after that, it's not a real problem. And I'm noticing I don't have Performancing, which is a very nice blog editing extension, so I think I'll install it now.



How about you?



Recover lost root password

I've written abou this before, but nixCraft has a nice post on how to reset your root password if you forget it, using the new FreeBSD boot screen. Of course, if you done the tweak I point out here, to disable single user boot, you are, I think, pretty screwed. I believe I've read somewhere you can use a partition editor to get or reset the password, maybe by hand tweaking /etc/passwd, but don't hold my feet to the fire for that!



FreeBSD reset or recover root password




Through Sickness and Health

It's been awhile since I've posted. Been battling some kind of flu-like illness, which has laid me up for about five days. I have barely felt good enough to sit up, never mind actually type at the computer. But I haven't been completely inactive, tech-wise, since I last wrote.



I got a new keyboard. US$21 for an old-fashioned, PS2-connector, Microsoft Natural Multimedia keyboard. My KVM switch, a Belkin Omniview SOHO, uses PS2 connections for the mouse and keyboard. My boss tried to talk me into the USB-only version, but I'm a bit of a traditionalist when it comes to connectors, so I stuck with the PS2 connectors. I think it may have been a mistake, because my fancy Logitech G7 Laser mouse doesn't work with a USB->PS2 adapter, so I haven't been using it either :-( I didn't like the Saitek for normal work, as I've become far too accustomed to the nice feel of the "natural" keyboard, with its wide keys and contoured layout. This is working very nicely, even if it has the lame "Fkey lock" that I guess has finally gone away after a brief spurt of popularity. I have to see if there are ways to activate the many special keys in FreeBSD.



I also installed and played with the Win4BSD PBI for PC-BSD. I had been holding off on installation, because it seemed to be a pretty involved process, but the PBI promised an easy one-click installation (yes, sometimes PBIs make sense) and so I gave it a whirl. The first installation didn't "take", as the /usr/local/win4bsd folder wasn't created for some reason. But just doing it again seemed to work just fine, so I installed WinXP in it. It took forever but it did finally install, boot up and run just fine. I did have one BSOD having to do with the TCPIP.SYS driver, and a couple of other seemingly network related oddities, but nothing too outrageous.



And, *very* strangely enough, after using it a bit, all of a sudden /usr/local/win4bsd disappeared again and I had to re-run the PBI again. My virtual machine was okay, but that folder disappeared. Very strange.



I thought Win4BSD worked pretty well. At boot time, there was a request for an option to be added to /boot/loader.conf, for me to set debug_mpsafenet="0". I'm not sure what that was all about, but I set it and the warning went away. Win4BSD is a commercial app, and the PBI gives you a 10 or 14 day trial. The cost is pretty trivial though - currently only US$49 for a license.



But actually, I don't think I'm going to use it. I just have found zero need for any Windows apps on my personal PC. While it is still required for work, it helps me to separate out my work and personal PC time even more. I just KVM over to my work machine, do my best to hold my nose while using Windows (without Cygwin I would be lost), and get stuff done there. The only thing I was really missing was Quicken, so I installed it in the virtual machine and it worked pretty well. But then I decided I could live with kMyMoney, as I had been playing with it a bit (there's a good review here). My bank charges me US$10 a month to use the automatic Quicken download, so I can cancel that finally. I sure wish it had check printing though.



The only other thing I do in Windows any more is to play games. I've read some places where you can supposedly play pretty intensive games on WINE, and I wonder how good Win4BSD is at it, but it just doesn't seem worth it to me. I'll play my dosbox games on PC-BSD and just dual boot into a vanilla XP to run other games that I play. This actually keeps me away from their addictive game play by making me think twice before rebooting to play!



By the way, if any of your are into Day Of Defeat, the Half-Life mod (we don't play much of DoD:Source yet), be sure to check out my clan, 95th Rifles. We run a good server with lots of excellent game play. I haven't actually played much lately, due to the aforementioned illness, but you can look for [95th]Cpl.HeadwoundHarry to be around sometimes!