Friday October 13, 2006 Well it's been almost a year since my last Solaris@Home report. I've been busy with a lot of other things and that project has languished as a result. When we last left I had OWW and misterhouse installed. Misterhouse was running but OWW was not. OWW wasn't running since I only had a single serial port and misterhouse was using it. I had yet to get my imap server running.
Well I had a power supply failure in my linux server and that got me moving again. The linux machine is so old it uses an AT style power supply. New versions of those supplies are kind of rare now and expensive in comparison to new supplies. Fortunately I have a lot of old computers and was able to salvage a supply. The handwriting was on the wall for that machine though, I needed to get to the point where I could shut it down.
Well getting the imap server wasn't to bad of a deal. I downloaded cyrus via blastwave and within an hour I had it working and new mailboxes. Spamassassin was another matter. I got that from blastwave also but I'm running razor and pyzor and getting that all together took an evening. Really it was about as much work as when I did it originally on linux. If I had only taken better notes (ok any notes) it would have been a bit faster.
So now I have moved all my email to the solaris machine. I also decided it was time to upgrade. I had been running the original release of Solaris 10 with just a few patches. I got a copy of the S10U2 dvd and installed it. I was really nervous about this since U2 has the change to using grub and I wasn't sure how cleanly this was going to go. I was pleasantly surprised to have zero issues. It just worked. Probably the easiest upgrade I've had with either solaris or linux. Now I can try out zfs. I'd really been wanting to do that.
So the next thing was to get OWW moved to solaris. This meant getting another serial port. Well as luck would have it U2 included support for Prolific PL2303 based usb/serial ports and I've had two of these sitting around unused for a few years. I plugged them in and they were instantly recognized and new serial ports appeared.
This was just a trick to make me think it was going to be easy. When I connected the OneWire interface to the serial port and ran OWW it reported it could see the OneWire interface. So now I started to do some debugging. I hooked up a breakout box and looped the serial port back on itself. Using tip I could see that the port was active. All the handshaking signals (dtr/dsr/rts/dcd/cts) were ok and I could see the led's flash for data going in and out. But I never saw any data echo in tip. More experimentation (actually quite a bit) made it clear that I was sending data fine but couldn't receive it. I was mystified.
I googled for issues with usbsprl and found nothing useful. Here's where it paid to be Sun employee I search the bug database and found the engineer (Lin) that did the usb driver and sent him email describing my situation. He sent back the clues. According to the man page for usbsprl the streams modules ldterm and ttcompat are supposed to be automatically pushed. Using strconf I could see that I only had usbsprl. So on the advice of Lin I did the following:
1 Add the following line to /etc/iu.ap file:
usbsprl -1 0 ldterm ttcompat
2 Run the command, ignore the warnings:
#autopush -f /etc/iu.ap
this immediately fixed the problem and now I could receive data. OWW was happy. One less thing left running on my linux machine.
I suspect that because I had upgraded to U2 and not done a clean install that the upgrade neglected to modify iu.ap and caused my headache. Hopefully now that I written this up if someone else has the same problem they'll have more luck with google.
Now all that remains is to move my firewall/nat to the solaris machine. I expect that will be another adventure since my experience with networking configs has never been very pleasant.
Solaris@Home Episode V
It's been quite a while since I updated my progress at switching from
my old linux machine to my new amd64 running solaris. The holiday break
gave me some time to get back to this. One of the first things I
wanted to get running was misterhouse and OWW.
Misterhouse is a home automation system written in perl. It isn't for
the faint-hearted. OWW is a program to monitor weather and temperature
sensors on a One-Wire (tm) network. I have a weather station on my hangar (about 500' from the house) and a bunch of temperature sensors scattered about. I also have a Neptune aquacontroller
that controls my 230 g. reef tank. That controller provides rs-232 data
to misterhouse so I can monitor pH, temperature and redox levels. I
don't actually use misterhouse to control anything, just monitor stuff.
One of these days it'll control something.
Anyway so I needed to get this software up and running on solaris. Well
it was pretty simple although there were a few hiccups. First I did
OWW. I initially tried to configure and build it with the (now free) Sun Studio tools.
This didn't go too well because OWW seems to have a fair number of
portability issues as far as types it was trying to use. So I used gcc
instead. I still had issues but they were all pretty straightforward.
It was pretty clear that OWW hasn't been ported to that many platforms
yet. I fed back those changes so hopefully no one else will have those
issues again. I'll probably try the Sun tools again at some later date.
Then came misterhouse. When I first brought this up on my linux machine
a fews years back it was pretty painful. I had to install lots of
different libraries, upgrade tool chains. When ever I seem to upgrade
software on my linux machines I always seem to have to upgrade lots of
other misc. pieces of software. So I expected similar issues on
solaris. Well I was pleasantly surprised. Almost all the required
libraries were already present and what I didn't have was available on blastwave. This was almost too easy.
Of course it was too easy. I had two issues. On the linux machine I was
running an old version of rrdtool, like 1.0.xx and on solaris it was up
to rev 1.2.xx. Well as it turned out the misterhouse code for producing
graphs of weather sensor data wasn't compatible with the newest rrdtool.
Apparently the new rrdtool actually checks the syntax of the arguments
so several different mistakes in the perl code were being flagged. So I
had to fix the mistakes in that code. Then it worked fine. The graphs
the 1.2 version produces are much clearer than the old ones so this was
a big improvement.
The other problem was using libgd.
The misterhouse code uses it to draw buttons on web pages on the fly.
For some reason the library I got from blastwave didn't work (I'm still
investigating this). So I just got the sources and built and installed
it myself. Then it worked fine.
So in relatively short order I've moved one of my most important
programs off of my linux machine ond onto the new computer. It's a
whole lot nicer on this new fast machine. Previously the http interface
to misterhouse would seem like I was accessing it thru a slow dialup
line. Not any more. It's nice and snappy.
Next up, moving my imap setup...
Nov 28 2005, 03:49:48 PM EST
Permalink
Solaris@Home Episode IV
I've given up trying to come up with meaningful or catchy headlines for
my on going efforts to replace my old linux server with a solaris based
server at home. I'm just not that imaginative so unless I have
something that just stands out I'm switching to a totally generic
boring caption.
I'm actually got to the point I'm actually using the new server (wiz
) daily. It's still along way from being my imap server but it is the
repository for music collection. I'm really late to the iPod
phphenomenabsp; I just finally got a 60gb iPod yesterday. Until
recently all my music was all on CD's in a 300 carousel player. I'm now
in the process of slowly ripping my collection.
I didn't want to go to mp3's as my archival format and I don't
want to use Apple's proprietary lossless format so I'm using flac. I convert the .flacs to mp3's to let iTunes see it and download to the iPod. So as a result of this I'm using cdparanoia to do the ripping to .wav and converting the .wav to .flac. I'm using crip
to control all the various engines. Since cdparanoia doesn't exist on
solaris (they talked about it 4 years ago but that seems dead now) I
started out doing all the work on my old slow linux box with the
data being written onto the solaris box via an nfs mount. This
was slow, really really slow. The ripping by cdparanoia wasn't too bad
and it is constrained to a large degree by the cdrom drive. The
conversion to flac was pathetic though. Some cd's were talking almost
two hours to be converted!
I decided to modify the crip script so that it would run the flac
conversion step remotely via rsh on wiz. So I downloaded all the stuff
I needed to wiz and went to
build flac. Well partly thru the make it blows up during a link step
trying to reference the xmms library in a very strange location. One of
the things I really hate to debug is a bug during a complicated
recursive make process. Yuck. Well after adding a fair amount of debug
code to one of the scripts the configure created and the make was using
I discovered that the xmms library as delivered by the SunFreeWare CD
that seem to be installed incorrectly. Actually a bunch of them seem to
have the same issue. If you look at the .la files in /opt/sfw/lib
you'll see that the .la file for libxmms has a line:
installed=no
Well this causes the build process for flac to think that libxmms is
not installed and that it must have been built as part of building flac
and therefore the library resides in the .../.lib/ directory that the
build process creates. Well since it isn't there the link explodes.
Changing
that line to say;
installed=yes
let the flac build complete normally. Yeah!
So once that was done it was no problem getting crip to run flac on wiz.
That helped immensely. Now runs that were taking nearly 2 hours were
finishing in less than 5 minutes. Now if only I could get cdparanioa to
run on Solaris...
Aug 31 2005, 11:54:25 AM EDT
Permalink
More baby steps
I've been kind of busy lately what with flying to Canada and such so that I haven't done much more on my new home server ( wiz
) running Solaris 10 which I aim to someday replace my old
decrepit linux server. I was going to talk about the problem with
drivers which I'm sure is the biggest impediment anyone attempting the
switch encounters but first a paragraph or two on a different problem.
When I first got wiz running I
needed to download some patches and some new packages as the first
order of business. So I fired up firefox where the display should pop
up on my powerbook. Unfortunately it died almost immediately with an
error from X (BadWindow). So I
tried mozilla, same thing. Well that is disappointing. So then I fired
up a vnc server on the Solaris machine and connected to it with Chicken of the VNC
from my laptop. From there I tried firefox again. Worked fine. Well
that is kind of disappointing but at least I have a workaround. Sure
wanted to fix it though because vnc performance just isn't that good.
Eventually I went about debugging it and I discovered that the error
occurred while querying the Xinerama extension for screen parameters.
So my next workaround was to turn of Xinerama on the macintosh side.
This let me skip using vnc but was still kind of klunky because I had
to start X by hand instead of with the gui. So I investigated further.
In orger to do that I wanted to examine the packets being sent back and
forth from the X server and client. I got a copy of ethereal
and snooped the packets. I couldn't really tell what was going wrong
but at least I expected I could ask someone here at Sun that worked on
the X server if they could tell me if the problem was on the Solaris
side or the mac side.
Working outside of California and being in the Java VM group I didn't
really know anyone in the group supporting X. By a little bit of
investigation I identified someone and sent a long detailed email along
with an attachment that held the decoded packets. In about 1 minute I
get a reply back. "This is:
Bug 6216985 Xsun & Xorg Xinerama protocols are incompatible with each other
Install patch 119060-04 to fix it."
By dumb luck I picked the developer that worked on the bug! How
is that for service. (BTW the patch for sparc is 119059-04).
I installed the patch on wiz and it worked perfectly. Yeah! No need for a workaround.
Aug 23 2005, 01:26:44 PM EDT
Permalink
New Computer continues... On the road to Solaris at home
Well I've made some progress at home in getting my new server running.
I've hit some rough patches too. After my experiments with various OS
installs (FC4, Suse, Solaris) I wiped the disks and started from
scratch. At first I had 4 seagate drives on the motherboard controller
and the dvd/cd on the Promise pci controller. Well I guess not
surprisingly that didn't work. While the install dvd boots once it gets
to the secondary boot it fails because Solaris doesn't have drivers for
the Promise controller. So I re-cable so I have 3 disks and the dvd/cd
on the motherboard controller and one drive on the Promise controller.
I've lost one drive but hopefully I will get it back soon enough. As it
is I have plenty of disk space. After that, the install goes fine
though I sure wish that the Solaris install would pick even a halfway
intelligent set of slice sizes when it goes to partition a disk. The
default selection is beyond lame.
Since I'm not running the hardware 1 update release I had to install an open source driver
for the onboard NIC. That worked fine and the new machine "wiz" (after
a late cat of ours) is connected to the rest of the network in the
house. Now to install a bunch of extras. First on the list is Firefox.
I downloaded pkg-get from blastwave
and with one quick command and many megabytes of downloads I had
firefox (and seemingly every other thing on the blastwave site)
installed. This was really kind of cool. It was in a lot of ways better
than my usual experience with RPMs, more like using CPAN.
There is one thing I don't like about this though. When you install
packages via the blastwave site they go into their own directory
structure so even if the package in one that came with Solaris it
doesn't install it in the same location as Solaris would so you end up
with two copies. So for instance now I have two copies of perl
installed. The hitch will be if I upgrade Solaris and end up with a
package or two that are newer than what is in blastwave you're kind of
stuck getting a proper PATH hierarchy making sure you always get the
newest stuff. It's not like this is a problem unique to Solaris though
I had the same issues with my RH system whenever I added new stuff. I
sure wish it didn't work this way though. By the time I was done with
blastwave I got a lot of the stuff I needed to swap out the RH machine
(spamassassin, razor, etc.)
So now the basic machine is set up. I mirrored the two non-root drives using DiskSuite.
This was pretty straightforward. This mirror is intended to be the safe
storage for all the machines in the house. So the next thing to do is
to make the mirror visible to the macs in the house. I had gotten
advice to use Samba for this but this sort of goes against the grain. I
really wanted to use NFS. I realize NFS will mean I have to do some
uid/gid surgery and that since the mac will allow filenames that NFS
won't (and neither does Samba) it won't be a perfect solution. I think
I can live with it though and if not I expect I'll switch to AFS.
I started with my laptop as its user community is more tolerant :-). So I followed the instruction here and here. Just like most things on the web they were almost correct. If I had used NFSManager
like in the second reference it probably would have worked instantly.
That would have been too easy, I used NetInfo by hand. I found that the
information in the first reference "Automounting via NetInfo" (I'm
running 10.3.9) was close. I found that the "dir" property seems to be
completely ignored. OSX seems to use /automount/...
no matter what I did. I also found that the "type" property had to really be "vfstype". Then it worked fine.
Then I had to convert my login on the Powerbook so that the uid/gid
would match everywhere in the house. This was the scariest part of the
work so far. The mac didn;t have a "users" group so I created one in
NetInfo and added myself to it. Then came the scary part I used NetInfo
to change my uid (I left my gid alone since I had already added myself
to users, being in multiple groups shouldn't hurt) while I was logged
out as me and logged in as a different user. Then I had to run a find
command to change the ownership of all my files on the laptop. When
this completed I went to log in. No luck, my short name didn't appear
and the password was rejected (no I didn't use a uid below 500).
I decided that things probably were just out of sync and that I ought
to just reboot. With finger crossed I rebooted, would I be able to log
back in to the laptop? After reboot I could log in fine and everything
appeared normal. Whew! Now I can start migrating data off my laptop and
onto wiz.
Next up what about the missing drivers...
Aug 11 2005, 09:28:12 AM EDT
Permalink
New computer
I've been planning to put together a new server for home. The intention
is for it to provide mirrored storage for the rest of the machines in
the house (Macs mostly). My wife always accuses me of always getting
new computers. Well the machine I'm looking to replace is a 300mhz K6
running RH9. You decide if I'm always getting new computers...
The new machine is based on a MSI K8N Neo2 Platinum with an Athlon64 3200+.
It has 2gb of DDR333 ECC (don't ask) ram and four 120gb seagate ata drives
and a cdrw/dvd-rw drive. I've got a Promise Ultra 133 TX2 controller in
the box so that I can handle all drive that I have after using up all
the connections the motherboard can handle.
The machine has been put together for about a month or so. I've been
trying to decide what OS to run on it. I've installed Solaris 10,
Fedora Core 4, and SUSE. I've found that they all had quirks in the
install process. After thinking about it I've decided to go with
Solaris. This is not a decision made lightly. I've been running linux
for a long time. My initial linux was kernel 0.97 on a 386 (which I
still have). I think I still have some of those floppies. I don't
remember where I got it but I do remember it being a big improvement when I
got my first "distribution" from the University of Texas site.
Eventually I went with Slackware. The first time I actually paid for a
subscription was the Yggdrasil collections. I ran Slackware
distributions for quite a long time. The system was quite a hodgepodge
when I finally decided to switch to RedHat (6.0). That switch was quite
painful since I had a lot of additions for handling the Macintoshes and
sharing the Apple laser printer hanging off one of the macs. I have to
admit that once I switched to RH I never really liked it but the
thought of doing another switch was just too painful. I continued to use RedHat but I felt
trapped.
Now that I'm making another big leap in thinking about swapping out a
big collection of hardware to a much more compact and powerful box the
decision comes again. When I first installed Solaris 10 on this machine
the on board ethernet controller didn't work. I thought oh well so much
for that experiment. But I looked around and found that there is
actually a community of people producing drivers. This is cool so I
downloaded the driver
and it installed no problem. [Actually I understand the "Hardware-1"
update to S10 already has a driver for the controller on the board.] So
then I thought well if there are people out there producing drivers
maybe this will be doable. It's somewhat like going back in time
because when I was first running linux on the 386 I contributed a
driver to XFree86 for the video card I was using. So my thought was if
someone like me can't get there home system running the way they want
on Solaris then what hope do other people have. So I've decided to take
the plunge and you'll get to read about it here. Can I switch and how
long will it take. Stay tuned...
Aug 04 2005, 11:37:49 AM EDT
Permalink