Potsticker Guru Header Image

James C. Liu's Weblog

All | scifi | setenv | techbiz
[Illustrated Hand Made Potsticker Recipe]
20090602 Tuesday June 02, 2009

JavaOne/CommunityONne OpenSolaris 2009-06 Install

I'm blogging from the OpenSolaris install booth at CommunityOne/Javaone 2009 at Moscone Center, San Francisco. This must be the 10th show I've actively participated in. Prior years, I was a Java guy setting up talks, doing BOFs and sessions of my own or with a team, but in recently years, since moving over the C-side of Solaris drivers, that hasn't been the case. And in a way, it was a protest against policy on giving away bags to the Sun speakers, which I have a great collection of in the early years. LOL!

Of course, from an internal standpoint, my colleagues and I in the driver team always have a lot of fun doing bring up of systems on earlier versions of OpenSolaris. Some versions die horrible deaths and take hardware with it. But as part of the Instal-Booth staff at the show, I gave a final test run of the bits yesterday, and after a little bit of fiddling last night, I've now got 3 laptops installed with the June 2009 bits of OpenSolaris. BTW, we announced them yesterday.

Overall, the experience was pretty good. I've really gotten fond of USB-stick install, and so I carry around at least a few 1GB sticks. The image is about 800MB on the USB stick. The CD image is just under 700 MB. The USB stick seems to average just 18 minutes on my dual core laptop, and over 31 minutes from a USB CDROM drive. Most of the folks have some trepidation about install because currently, we're not bundling a partition utility. But colleague Mark Logan recently checked GNU parted ported to Solaris into the build tree, so it should be coming soon, at least on Nevada. It may take a bit of time to appear on formal install media, but what that means hopefully is that folks will be able to boot the runnable image, then upload via USB bits as a separate wad of stuff, and then unpack and run it. It includes NTFS support and I've gotten it to work on most disks and laptops and systems for dual-boot.

But just in case we have issues with some disks and VTOCs that don't quite follow a standard, I carry a Knoppix 6.0.1 bootable USB jumpdrive which seems to deal with partitioning a little bit better than Solaris due to a broader support for standard and non-standard VTOCs disks. Speaking of disks and VTOCs, some of the really cheap 2GB and 4GB USB sticks don't seem to follow VTOC standards either and while those sticks are flashable and bootable for OpenSolaris, for some reason, we can't install from them due to a particular read and mount issue. Most higher-end Sandisk USB sticks have worked great, and the higher quality sticks usually have been great. But the low-end 2GB+ ones have been problematic.

Armed with the right tools, OpenSolaris 2009-06, at least for me, installed fine, didn't kill my Windows slice, and most everything works. HD Audio, graphics, networking. I was even surprised when my Realtek USB wifi came up automatically with NWAM. That's impressive. Even my webcam works on both the Acer which has a built-in unit, and my el-cheapo A4Tech 720MJ $25 usb cam.

community one webcam image

Above is a picture of a developer session I sat in at Community One while playing with my webcam. I was video conferencing with another colleague via Ekiga.net. The A4Tech camera is fairly inexpensive but follows the USB Video Class standard and works fine with Solaris. It's been problematic in the past with OpenSolaris finding a cheap USB Video Class webcam because of cost. It seems like a lot of vendors either claim support but don't quite follow the standard, or use one of two other protocols. But with Microsoft demanding vendors to follow the USB VC standard for 2009 and later cams to have Vista certification, hopefully, more cheaper cameras will arrive on the market for under $25. I will testify that the on-board webcams for many netbooks and laptops, like the Toshiba M10 and R600 and for the Acer 8.9 and 10 inch netbooks, the Toshiba NB200 network, etc. all seem to have working USB webcams that run fine with OpenSolaris. One thing with the software on GNOME is that it's still a bit fresh and so the streaming images have streaks. I haven't looked at the source yet, but it may be that double buffering or lack there of is leading to streaking, or maybe some USB interrupt architecture that unnecessarily impacts streaming video is causing streaking on OpenSolaris. But the picture is still very usable.

Signing off for now. More conference to attend.

I did find out the latest Mozilla Firefox has some better security, but I used to set my forms to prefill name and email address for me, but those settings are lost. I have to figure that out June 02, 2009 11:24 AM PDT Permalink

20090416 Thursday April 16, 2009

Cub Scouts - Pinewood Derby with Solaris - It's Possible

I've been meaning to blog about using Solaris for Scouting since February, when I became the primary organizer for group's Pinewood Derby. For folks not familiar with this tradition, it's been going on for years. Basically, it's a contest between various Cub Scouts (Grades 1 - 5) who are supposed to carve a small car out of a block of pine wood, then attach wheels, and then race them on a gravity driven track to see who's got the fastest car.

I'm the Pack Committee Chair for my son's Pack 499 of the Cub Scouts, Polaris District, Santa Clara County Council of the Boy Scouts of America. That's sort of like saying, I'm supposed to be the lead paper-pusher for our band of kids, but being a new pack in our district and trying to reach critical mass means each one of our Parent "Akela" Volunteers needs to take some leadership role. Never having been a boy scout myself during my youth, I had a lot of learn to earn my "Trained" badge which I wear proudly on the left sleeve of my Class A uniform.

Getting back to the Pinewood Derby (PWD for short), I found out that each Pack in a District runs their own derby. Some have their own track, some borrow a track from another pack. The top 3 finishers in each category make it to District races. A small pack might have just one category that is based on fastest finish time. The others might have "Best Looking" or "Best Paint/Finish" and other sub categories and each of these can be submitted to the District. The top finishers at District go on to compete at Council and State levels. Being our first year as a chartered Pack, we were very fortunate to receive a used, 3-lane track with electronic timer from a neighbouring group, the Pack 457. I still owe them a formal plaque and thank you for the gracious ceremony at their February Pack meeting when their Cub Master handed over the timer from their old track to me, as acting Chair and representative of our P499. Because of P457's hard work raising money during the year, they bought a new aluminum track which they debuted this year when they hosted the District races. I only hope in the next few years we can grow to that level of involvement with parents and kids.

pinewood derby

While the PWD is a great event and I applaud all the work everyone puts in to helping their boys carve, sand, finish and tune their cars, the majority of the experience that most of the track hosts have shared amongst themselves, has been with Windows systems hooked up to the timer. That had me a little worried when I took possession of the generously donated track, since I don't personally have a spare Windows machine setting around and I wasn't sure where to source a cheap license. But what a serendipity to find out that the timing mechanism was a stock RS-232 unit that could use a simple tip(1) line configured to 9600,8,n,1 to the /dev/ttya port. Then the times for each lane would simply appear in order after each run.

For our first race, I brought my WiFi capable Shuttle K45 xpc running Opensolaris 2008-11. I have a cheap Atheros 52xx PCI board in the slot which is supported, and I used the local school WiFi which, as PTA webmaster, I have access to. This let me record the data for each race, then cut/paste to OpenOffice, and also sync up remotely to my home server about a 1/2 mile away so I had backup if something broke. I manually set up the heats, ran the races, and applied the standard rules determine the fastest average time to determine the winners. But I think all the kids were winners, and OpenSolaris was a champ.

Connecting and configuring solaris was trivial. I simply connected the RS-232 cable to the timer, edited the /etc/remote file to configure the "hardwire" entry to point to 'ttya' and then ran the "tip hardwire" command. At home, I had no glitches, but at the race, I couldn't see the output from some test races. After thinking for a moment, one of the parents asked me if I needed to "reboot" the computer, after all, that what they do in Windows. Then another parent, suggested we reboot the Timer. And that was the trick. At home, I had tried run the tip command first, then powered up the Timer, and output automatically appeared in the console. But I had reversed that procedure during track setup. A few seconds later, we were up and racing.

It was so painless to run the race, and with just a handful of scouts participating in our new pack, it took only 15 minutes to finish all the heats. But I hope we grow and to scale up the track to handle more kids, I plan to try to write some of my own Java software to help automate the race next year. I want to have the software automatically schedule the races to efficiently get all cars on all tracks run, to automatically grab the scores off the serial port, and to keep running side tabs of the fastest average cars posted. Having a nice GUI might help too. But this would allow the software to be portable on all platforms, even if I'm biased in favour of Solaris.

April 16, 2009 12:30 PM PDT Permalink

20090401 Wednesday April 01, 2009

Acer Aspire One AOA-150 Netbook Dual Boot with Solaris

I'm certain that with the plethora of April Fools postings, that it may be hard to write a serious how-to document on dual boot installation on the Acer Aspire One netbook. But I just picked up one last night from Fry's Electronics for just $299, new, and I've managed to get it to dual boot with Solaris withOUT blowing away the WinXP that comes pre-installed. My bro-in-law, who just picked up one of the last few from his local Costco for the same price was looking for online docs about how to do this, but there were few details, and thought he'd either come over to my place and have me do it, or read my blog for instructions.

Acer Aspire One 150 - Need the 8.9 inch Model

There were a few reasons why I went out and bought the Acer AOA-150. This is the model offered last year with 8.9 inch LCD, an Intel Atom 1.6GHz/120GB HD/1GB RAM platform. Around Christmas 2008, it was in stores for around $349, and just a few months later, it's now $299 for the same system, only with 160GB HD. There's also an Acer AOA-110 model which has an 8GB or 16GB SSD (Solid State Drive) which comes with a Linpus/Linux distro that supposedly runs well, but firstly, I'm not a big fan yet of SSD. Most of the low-end stuff is either way too slow on sustained I/O and/or way too unreliable. There's a lot of hype about SSD and auto-leveling. But that's the theory. How manufactures make SSD (at least the cheap ones for these devices) and how it deals with swapping and partitioning while auto-leveling, well, that, for me, it's not there yet, no matter how many senior article writers, analysts and Marketing pundits say so. Except for the best and most expensive flash with the best performing auto-leveling algorithms and error checking, most the flash aren't very fast or very reliable yet. And they're too darn small to dual boot and have any real working space anyway. So disk capacity was pretty important, and with these models having 160GB of hard disk, that was plenty.

Another reason for chosing the AOA-150 was Solaris compatibility. I've been hanging out at various Costcos and Fry's Electronics stores and playing with netbooks and opening up the Windows->Control Panel-> System->Hardware Devices panels. For the stores that haven't locked out that feature, it's provided me valuable info on what chips the makers are actually using inside. Of course, this is no guarantee Solaris will work until you get home and actually try it, but it gives me more confidence that Solaris will actually boot up and connect to the network if it's a device that's been reported on Sun's Big Admin HCL or by other users elsewhere online. Note that makers in this volume space often rev a system with different components without changing the model number, so you really need to check and have a store that will honour its return policy.

The 8.9 inch LCD Aspire seems to have most chips on my compatibility checklist. My main concerns are bootability, graphics, ethernet, WiFi and Audio. I would like to get the onboard camera working, but that's for later hacking. Maybe someone already got it working under Solaris and I just need to find it. For the most part, both AOA-110 and AOA-150 have a Realtek 8101E/8102E fast ethernet networking port. That's supported by the latest Solaris rge(7D) driver. The WiFi is Atheros AR5007E/AR5008E a.k.a AR242X-type of PCI-express adapter onboard, and that should be supported by the recent ath(7D) driver. Graphics is Intel onboard 945GMA Integrated graphics which works with our Xorg fairly well. And finally, the audio controller is standard Intel HD Audio spec compliant with what looks like a Realtek ALC HD Audio Codec. The latest SXCE audiohd(7D) driver has a parser that should be able to discover the codec capabilities and activate the sound properly.

Acer AOA-150 Blue

Note that Acer is now shipping a newer, 10.1 inch LCD model (AOD-150) which has the same resolution (1024x600) but bigger pixels. It's selling for $349 and I do notice more folks looking at it and not squinting as much, but the hard wired ethernet is now Atheros-based and probably an adaptation of the Attansic NIC which they acquired a year or two ago. There are opensourced BSD drivers for the Attansic NIC and I think even Murayama's Solaris Driver collection may have a sample Attansic driver, but I haven't tried it yet, and didn't want to risk it. Plus, it's $50 more. Maybe when it gets cheaper, like in a few months, I'll splurge and get another netbook and test the driver.

Steps for Dual Booting

As with most PCs, to dual boot a pre-installed WinXP/Vista box, requires the following steps:

  1. Resize the existing WinXP (either FAT32 or NTFS) disk partition to make room for Solaris.
  2. Create a Solaris2 type partition sufficient for your needs.
  3. Install the Solaris on the slice, and GRUB for the boot-loader

Assuming all goes as planned, the GRUB install finds all the other bootable slices and enumerates those too. The challenge with the Acer Netbook is doing any of those tasks without an Optical drive. Typically, it's not possible to resize the boot disk, so we try to boot from optical drive and then resize. Similarly, installing onto the boot device isn't possible either.

For the Acer, we can boot USB, and that means if you have an external USB DVD drive, then it's possible to install via CD and DVD media. There is another option and that's to install via USB flash drive. Opensolaris is about 700MB in base size and is a bootable CD-image. It can be converted to USB flash boot image by using the Mercurial tools. This can fit on just about any single 1GB USB flash drive which you can buy at Fry's or online for around $6 each. I recommend buying 2 of these as the extra one will come in handy for resizing the partition.

1. Resize the WinXP NTFS slice

Before partitioning WinXP NTFS, I highly recommend running the Windows disk defragment utility. It's in the Accessories under System Tools I think. This will compact most files into a contiguous near the front end of the cylinders on that slice and save a lot of time or anxiety over having the partitioning utility doing it on the fly. De-Fragging can take hours if you've put a lot of files onto the disk.

There are commercial packages like System/Partition Commander and Partition Magic that can do this. You'll need to source a USB external optical drive. I found the close-out XBOX360 HD-DVD USB player attachment device for $40 at Fry's Electronics. It plays both DVDs and HD-DVDs for XBOX360, but fronts as vanilla DVD/HD-DVD USB drive for any PC system. That's one option. If you neither want to buy an extra external optical drive, nor spend money on software, then you can try the Knoppix Rescue 5.1.1 or later and the QTParted utility that ships with the distro. Knoppix is a Debian Linux variant used widely for rescue disks. It's downloadable off many mirror sites on the Internet, and there is a free Windows executable that takes the ISO image and will flash a bootable USB stick with it. Since Knoppix 5.1.x is about 700MB, you'll need an extra 1 GB flash stick or larger. Since the Acer comes with WinXP already, it's easy enough to follow these Knoppix USB install instructions to create the bootable USB stick on the Acer itself. This takes about 10 minutes plus time to download the ISO image. Once the Knoppix USB stick has been created, reboot the Acer and hit 'F12' to select the USB stick as the boot device and proceed. Hit return on the first prompt for line/scan rate and when the GUI comes up, either open a terminal and run:

   $ su - root
   # qtparted

or follow the KDE menu and open the QTParted w/ root exec privileges (usually there are two QTParted entries in the KDE menu - the first on top is the one to click). This should bring up lots of slices. Scroll down until you see a number of sdaX entries. Select the first and this should show the internal disk drive. It should have a 6GB slice up front that is FAT32 and the remaining 150GB is formatted NTFS. Using the GUI and mouse, drag the tail of the second slice (NTFS) to reduce the size. To actually resize, you need to go to the main menu for the QTParted and select "commit." I have a new Acer that hasn't really been used. Its disk was negligibly fragmented and I didn't put any files onto it. So defrag'ging and resizing only took a few minutes. I ended up allocating around 40GB for XP and the remaining 110GB for Solaris.

2. Create a Solaris2 Partition

My older Knoppix 5.1.1 rescue image didn't know about Solaris type partitions. I haven't checked if the newer ones recognize it yet. But typically, Linux fdisk utilities have often confused Solaris partition types with Linux Swap types. The Solaris fdisk utility understands Solaris partition types, and supports Solaris2 types which are distinct and not confused with Linux Swap. Since I was planning to install OpenSolaris or SXCE onto the Acer, and fdisk is bundled, I decided to take a second USB flash drive and put OpenSolaris 2009-06 b110 on it. Since a lot of driver development has resulted in fixes since 2008-11, I recommend trying out a candidate 2009-06 build of OpenSolaris. Currently, that's b110 and the USB flash image is available a http://genunix.org/. To actually copy the image to USB stick and make it bootable, you will need the usbcopy utility. This is downloadable via Mercurial tools repository and assumes you have hg(1) on your system, which seems to been in solaris Nevada for quite some time now. If you don't have those tools, please read Dave Miner's blog on OpenSolaris on USB sticks and get the tools to simplify making bootable USB sticks.

With OpenSolaris flashed onto a bootable USB stick, simply reboot the Acer with the USB stick inserted, and hit 'F12' to select the boot device, and boot the first entry. There may be a problem with the SD card reader driver - sdhost(7D) - which may cause the kernel to lock up later. There is a supposed fix for that and Dave Clack talks about it and has links to software on his blog. Save this for later. For now, we need simply need to edit GRUB when the USB stick boots, and hit 'e' twice and edit the kernel line to append a -B disable-sdhost=true and hit return, then 'b' to boot with that added parameter. This disables the sdhost driver.

After a minute, OpenSolaris will come up into a default "jack" session. I open a terminal window and run:

   $ pfexec bash
   # fdisk /dev/rdsk/c8d0p0

and then I follow the help (?) menus to create a new fdisk partition of SOLARIS2 type. Your device may vary if you use a USB DVD drive. The raw disk could have designation c1d0p0. Another way to find out is to run the format(1M) command. It will print out a list of available disks. When you've identified the target disk, hit Ctrl-C or type quit out of the format utility, and then run fdisk on the /dev/rdsk/[device] where [device] is the available disk selection you found for your Acer, (e.g. c8d0) with a p0 appended (e.g. c8d0p0). This can still be complicated for some, so Clay Baenziger has a Kshell script that provides an easy resize capability. I haven't tried it yet, but looking at the script, it looks like it does what I described manually. I like the manual way because I've had some issues with fdisk(1M) occasionally not setting the correct start cylinder so it clobbers the partition map with overlapping slices and that can lead to loss of data. So I just like to verify things manually before committing. I divided up my disk and preserved the 6GB Acer slice (actually a FAT32 diagnostic WinXP partition with recovery media on that slice (don't blow it away! - contains recovery media!), allowed WinXP about 40GB, and the remaining 107GB, I used for Solaris.

Install the Solaris

Both OpenSolaris 2009-06 b110 and Nevada SXCE b111 have networking and WiFi and Audio all taken care of. I've tried installing both and ended up sticking with Nevada SXCE because I had a USB DVD drive because I was at the end of a slow network connection at home and didn't want to eat bandwidth download latest and greatest packages through a remote repository. But if you don't want to download a huge wad of developer tools, and have the bootable OpenSolaris USB flash drive, I'd say that's a quick way to get Solaris up and installed.

Note on the Solaris SXCE b111 install, you should choose option 4 Console Text install if having issues with Default option 1 interactive Graphical install.

When the install is done, GRUB boot-loader gets written to the disk and it seems to find not only Solaris, but the WinXP partition as well as the diagnostic partition, which are all bootable. If things went well, hopefully, you've preserved your WinXP and diag slices and now have a dual boot Acer.

Acer with Open
Solaris Logo

One last finishing touch of course is to put the sticker on it!

April 01, 2009 03:53 PM PDT Permalink

20090224 Tuesday February 24, 2009

Fast Gumbo recipe for Mardi Gras Party

Fat Tuesday Blog:

We have a party today in the building. Solaris and Clustering software folks host an annual float building contest. Hosted by the infallible Roma and Keith who simply rock when in comes to group morale and good mixed drinks! I'm in the IHV Team, which is sort of part of core Solaris team since we deal with those 3rd party hardware device drivers. Our excuse annually has been, "... we're too busy to build a float, not that we'd even be competitive."

My idea initially was to build a Network Interface Card Express Module. These are NICs that fit inside our Network Expansion Chassis atop our blade servers. We sell a 4 port x 1GbE EM based on the Intel Ophir 82571 controller. We also offer a Sun-built Neptune-Atlas chip 10GbE fibre EM with dual ports. And recently, we started offering the Intel Oplin 82598EB based 10GbE in dual port EM as well. Here's a picture of one of our express modules:

PCI Express Module
Fig. 1. Network PCI Express Module for blades.

 

I was thinking of building the EM and mounting it on its side on a cart. The outer chassis with two large planks of plywood would be drilled hole arrays to simulate air vents, and have the two halves hinged at the base so it would open up and show the PCI express card inside with MAC chipset and PHY and circuitry. Inside would be green PCB with gold contacts and wire leads (multiple layers of course!). And the outside would be spray painted silver. Nice idea. But I ran out of time this weekend, so again, the IHV team has no float submission.

But instead of a float, each year, colleagues expect me to bring the hot food. And last year it was spiked Jambalaya with a good dose of whiskey and white wine mixed in and simmered. It didn't last long. This year, it's Gumbo, and spicey beef stew. The stew isn't much of a secret. Just take a massive 20 lb. big slab of ribeye roast, cut out steaks from the middle choice sections with best marbling and vacuum pack for a BBQ later, (I buy the ribeye slab at Costco on sale for about $4.50/lb and cut my own steaks.). The rest of the meat, which is about half or 10 lbs of meat, I cube into big chunks, like 4 cm characteristic dimension and use for stew meat. This stuff is much more marbled and tender than tough stew meat so it's a much higher performance and faster cooking dish. And it only costs about twice the cost of tough sinewy stew scraps and tastes way better. I figure my stews are worth it. Some carrots, some celery, 1/2 a bottle of cabernet or merlot, a small can of tomato paste, salt, pepper, cayenne, a couple of bay leaves, about 5 oz. dried, sliced mushroom mix (shitake, chantrelles, portabellos, oyster, morelles, etc.), and 1 onion. I use a big 8 qt. dutch oven or massive fry pan w/ lid and do it all in one pot, from browning meat, to adding wine, seasonings, simmering, then adding veggies about half way through, and 3 hours later, you've got awesome stew.

This year's Gumbo was something I thought I'd try to do quick in the morning before heading into work. And maybe have my wife load and drop it off in the afternoon when the party starts. She's great about that, being the PTA party/hospitality mom for the kids' elementary school. But my goal was to accelerate the gumbo making process. I started my search last night for a few recipes to find something in common, which always starts with the Roux - not French for street (Rue), but the goopy flour and oil mix that's simmered until the flour/oil turns a near burnt brown. It imparts a nutty flavour to the whole Gumbo which is what makes it distinctive. Once you have Roux, the rest can go quickly.


Fig. 2. Food Network's Alton Brown's easy Gumbo

 

Alton Brown's recipe takes 90 minutes in the oven just to make the roux. Not fast enough. A faster recipe at EatingWell.com seemed to take just 1 hr. That's more my liking. It takes more hands-on time, but can make Gumbo that ain't shabby in just an hour. I decided on the faster receipe and looked around in the freezer for anything appropriate to throw in. Gumbo is basically a stew/soup that is poured over rice. I opted to make a shrimp, chicken, and lousiana hot link gumbo with okra and other veggies.

I've scaled down the recipe for a smaller group (like 6 - 10 people). Ingredients are as follows:

  1. 1/4 cup flour
  2. 1/4 cup butter
  3. 1 cup diced celery
  4. 1 cup diced carrots
  5. 1 cup diced bell pepper
  6. 1 1/2 lbs slice hot links
  7. 3/4 lb peeled deveined shrimp 31-40
  8. 1 lb cubed chicken breast skinless/boneless
  9. 2 - 14 oz cans of chicken broth
  10. 1/2 lb chopped okra
  11. salt, pepper, garlic powder, cayenne, thyme, bay leaf

Basically, you start with the butter and melt in the pot and reduce to medium high heat and throw in the flour and stir for 7 - 10 minutes until dark brown. Lots of people call it "dark golden brown." There ain't nothing golden about the colour. It's like motor oil sludge and about the same consistency. Careful about burning the roux. It can happen quickly. If you're less confident manning the pot, turn down the heat and take your time. But roux can be made in just 10 minutes if you're very attentive and can adjust the heat to keep the flour cooking. Once done, add carrots and celery into the roux and it will fry them a little. Once they start to sweat, add two cans of chicken broth quickly, stir, and you will have a thick slurry. Add in bay leaf, thyme, hot links, chicken, and keep stirring every few minutes. When the pot comes back up to a boil, turn down the heat and add the okra, bell pepper and onion. Slurry should be pretty thick at this point and the okra makes it thick and slimy. But within a few minutes, the viscosity should decrease as water leaves the veggies. I simmer with lid on for about 5 more minutes, then add the shrimp, and simmer another 5 minutes, then stir in salt, pepper, garlic powder and cayenne to taste. Remember that . Some recipes require some tartness. You can add some tobasco sauce or lemon juice. I find that if I substitute 1/4 of the chicken broth with 1 cup white wine, it imparts a rich sweet/sour flavour. Cayenne is important. You need to add about 1 tspn to leave enough kick. I put the lid on and let stand and cool for about 15 minutes and it's ready to serve.

This pours over rice. I find that I can make a simple "dirty" rice by mixing brown rice with Texas long grain or Jasmine rice in 1:3 ratios. I steam it in a standard large rice cooker. 1 cup for every 3 servings of stew or gumbo.

The challenge with a big party is survivability of the veggies in the gumbo and the shrimp. Add them in too early and the water all comes out and they go mushy (the veggies) and the shrimp shrinks. Add them in too late, well, you really can't. The key is to do Just-In-Time manufacturing. That's always hard since the building doesn't have a usable kitchen, and the logistics of bringing a massive array of hot plates isn't so good for the circuit breakers when everyone else is bringing hot dishes. Having hot delivery is a great idea, and here, the real winner is my wife.

February 24, 2009 12:09 PM PST Permalink

20090210 Tuesday February 10, 2009

DIY MP3 car stereo for just $49

With the 2008 election over, my venerable car cassette deck in my old beater Toyota P/U was relegated back to playing music instead of listening to talk-radio. The only problem being that in the past couple of years, the old LED display has pretty much died so I can't tell actually what radio station I'm tuned to. And to make matters worse, recently, I wanted to clean the engine and maintain my battery (like how retro is that? maintaining a battery? - you know the truck is old). So I disconnected the battery terminals and took it out, then hosed down my engine compartment.

Cleaning My Engine compartment

For those of you who bother to clean the dirt, dust and grime off your engines, you probably do what I do. That's to spray a light coat of mild degreaser around on a warm engine (not hot engine - so you don't crack any thing that might crack due to sudden temperature differentials). Wait a few minutes and then spray water gently over the engine to remove the dirt. Some folks will then spray a thin coat of water displacement compound or anti-corrosion spray like Corrosion-X or something and then wipe off the excess. I like doing this with a warm engine because the mild heat aids evapouration. The result is usually a clean engine to work with that looks new and well maintained. If you're wondering if I do both the top and bottom, the answer is yes. But underneath the car usually requires full strength degreaser and removal of some plastic splash guards.

Cleaning My Car Battery

As for the battery, I take a cloth, spray a bit of lubricant on the cloth, and wipe the battery surface down, clean the terminals, and replace worn felt washers at the base of the terminals with some vinyl rubber gasket material. I buy bulk soft garden hose washers and stretch them to fit over the battery terminals and find they work great and last a long time. My factory battery has a small coloured bubble. Red is bad, Blue/Green is good, and clear means needs to be charged. It's quite old. But still starts the car and holds a decent charge and the bubble is still blue/green. But I think it's around 7 years old now and I don't know why I replaced it with a factory battery, when I could have gotten a one for 1/2 the price from Costco. The battery is maintenance free, but I do get some corrosion and white deposits on it over time, and leaves and other bugs end up in the tray below, as well as water when I drive in rainy weather. So getting it all clean feels good for the car, even if it's all cosmetic and has no functional value.

Car Stereo Memory and Power

The problem I forgot by doing all this service on the engine and battery was that the car radio loses its memory. Typically, most car stereos require at least 2 power leads. One comes from the line that has an ignition key activation and is the main power. There's usually a 12 - 15 amp fuse in-line on that wire. There's also a direct line to the battery that has a 3 amp fuse for am/fm station memory and possibly a power eject for the cassette deck. Many new car radios add a 3rd power line that gets power from head-light activation/dash dimmer. This powers the face-plate lights and LEDs when the headlights or parking lights are on and allows the dimmer dial/knob on the dash to adjust the face plate brightness. Needless to say, without power, my truck stereo lost memory and without LEDs functioning on the front, I had no clue how to set time or station pre-sets, not that I would be able to tell unless I actually listened to the broadcast long enough to confirm the station call name.

Cheap MP3 Audio support for the Car

Clarion DB185MP

So imagine the surprise it was when one day, while having a lunch run to Fry's Electronics, I saw a Clarion DB-185MP car audio deck for just $49 on sale (one-day-only!). It's not a pricey deck, regularly $80 - $100 in many places, but here's a car deck that plays CD, MP3, WMA, has 4 x 50Watts per channel, and includes an AUX port and has very good radio sensitivity. Compare that to my colleague's 2001 Lexus 300is. No AUX port. No MP3 support. And his is one of those built-in deals that takes a double-DIN and has a custom dash bezel. Needless to say, it's a proprietary deck that costs an arm and leg to service/support. He plays MP3s through an elaborate cassette adapter, but it hisses a bit every 3 seconds due to some motor running around in the deck thinking the cassette adapter is really a cassette, and once the MP3 player is off, the deck ejects the adapter thinking it got no signal and the tape has wound to the end. What he'd die for to get an aux port or USB port. Clarion makes the DB-285MP that is the same as above only it includes a USB port.

For me, the idea of having a CD/MP3 player for my venerable truck was a great idea long overdue. I'd only been procrastinating because I had installed my stereo 16 years ago and recall it wasn't pleasant because I didn't have repair manuals then and took a long time for me just to figure out how to pull the dash off to install. But time heals many fears and for some reason, I had this idea that I did it once, so I'd be able to do it again, even if my memory was kinda fuzzy. So it was an impulse buy. And out the door I went, thinking I had a great deal. It was only after that I got on-line and did some research on whether this deck fit or not. Crutchfield.com is a great resource. They have lots of information on whether a stereo fits your car or not. And if you buy from them, they include wiring harness, mounting brackets, and instructions. I paid a higher price 16 years ago and bought from them, but this time, my impulsiveness got the better of me. Checking online said the stereo did NOT fit my dash.

But not to be discouraged, I tried that evening after work to install my stereo. I measured the opening and found it should be wide enough and deep enough. Not sure why Crutchfield said it didn't fit. Perhaps that was their assessment with the provide bezel/frame which doesn't fit my dash, but I didn't think I needed it, since it was only cosmetic, and the dash provides a surrounding trim/frame. The built in screw holes on the deck do mount in the car's original bracket, only the screws I had were too long and penetrated the metal housing on the deck. Thankfully, instructions listed metric M8 screws x 6mm deep as recommended screws and luckily, my local Home Depot had them in stock. After a quick run before they closed, I had the deck mounted in the dash and called it a night.

I resumed early the next morning and only in daylight realized how much a mess it was in my truck with the dash still off. And in my haste the night before to install the deck to check for fit, I ripped off the wiring harness and pulled the wires I had inserted into the connector block. Leave it to Toyota to have a propriety connector for just their stereos and I'm certain that I would have thrown away the installation manual years ago. So I sat there with the ground connector on the new deck fixed to the car body, and a stripped end of the wire inserted into various holes in the connector block. After a few minutes, I found the battery terminal line that is always on. This powers the eject and the radio station preset memory. Then repeating with the car ignition turned to ACC, I found the main power line. I couldn't find the LED lighted panel light so I decided to twist this all together with the main power line activated by the ignition switch.

One Thing Leads to Another

I put old JVC 4 inch mount 120Watt/40Watt RMS speakers into the dash mounts a long time ago, and after plugging in the speaker wires, and cranking up the volume, the right side vibrated a lot. I thought maybe I had inverted the polarity. So flipped the wires. Then the speaker really made a lot lower volume with more hissing. So I removed that speaker, and found two small tears in the surround. So I got online and went to Parts-Express.com and bought a sale pair of 4 inch speakers with 150Watt max/40 Watt RMS and installed those a few days later. These new speakers sounded great - but so good in fact, that I realized I really wanted to upgrade and pump out more bass. Not enough to make the neighbours down the street hate me, but enough so music would sound more real.

With four channels x 50Watts each, I decided first to order a cheap Walmart Roadmaster Bass Blaster. Youtube has a bunch of videos of kids taking this cheap $20 subwoofer and hooking up to an 800Watt amp and blasting the speaker to oblivion, even catching fire. For any real audio lovers, a 6.5 inch bass tube isn't going to really pump or thump like a 4 x 33 inch MTX Jackhammers sucking 8000 Watts. But I still want my hearing, so hooking this up to the right rear channel on my stock clarion head unit worked just fine. After reading the manual for the deck, I found out more about tuning the custom bass/treble and Q factors and Frequency response than most people should know. But the result was decent sound and richer bass without feeling like I was driving in a machine gun designed to fire slugs of potato.

But there was no place to put that bass tube in my little 2 seater truck. It's resting on the floor where the passenger sits and for the time being, I'm happy with it but passengers aren't. It's gotta go eventually, so I ordered some low-profile small subwoofers, a pair of low-pass inline crossovers, and bought a big slab of MDF panel. The plan is to make a couple of subwoofers for under or behind my seats that are only 4 inches thick and can do the job of filling in the base from 80 - 500 Hz or so. Those woofers were on sale for just $10/each, and the cross overs were just $8 each and buyers gave them great reviews. Can't wait until I get those hooked up and tested.

It's kind of a fun DIY project that hasn't cost that much and now makes me love my truck more than ever. In fact, I love my truck so much that I last weekend, I purchased the premium serpentine belts to service my truck - yeah the one's with 3 yr warranty. I was thinking of going cheap since I was going to EOL my truck and sell it on account we just got another minivan (used Sienna - a great buy in these tough economic times) so I can haul all the kids. I've been fixing that van up too to my quality specs and learned some things about dealer service that were unexpected. But that's for my next blog. February 10, 2009 04:42 PM PST Permalink

Hacking nevada audiohd parser for S10 update 6

I received a phone call from a partner asking about running a demo on a new workstation/desktop platform at a tradeshow soon. He needed to get audio working on a number of systems to play simple clips, maybe some online YouTube stuff. He knew the Solaris audiohd driver was working great in latest Nevada SXCE but he hasn't been able to get the same support for audiohd drive on Solaris 10 update releases.

Just last week, a colleague mentioned the same problem on a new hardware platform also going through bring up with Solaris 10 update. So I got around to finally trying to back-port the latest audiohd codec parser to S10 from the Nevada source. Luckily the work was trivial. I just needed to remove a single function symbol in a struct and comment out a couple other lines for audiohd_quiesce() and rebuild on S10. The code needs to compile using Sun studio compilers 11 or later or a full complement of GCC compiler tools with C99 support. On solaris 10, just 15 minutes and I have audiohd working with a number of new platforms. The codec capabilities parser is sure great.

I don't know if there are plans in place to back-port the parser formally to S10 update. Audio is still considered a secondary function, and likely, that's the priority where it'll remain. But I know for users like myself, audio is clearly a top priority to get working on any solaris system. Plus, I've been getting re-acquainted with all that 80's synth band music which I hadn't heard in a while, like Depeche Mode, Electronic, and New Order. I just bought the best-of collections for all 3 bands and listen to them on my test S10 lab boxes. Kinda cool and nostalgic at the same time.

I've put together a src tar-ball and uploaded it to http://blogs.sun.com/PotstickerGuru/resource/audiohd-solx86-4.tar.gz. Hopefully, some folks can get some use out of it if they plan to stick with S10 update only. February 10, 2009 02:11 PM PST Permalink

20080919 Friday September 19, 2008

Solaris running on Intel Atom D945GCLF mini ITX

Mini ITX low-power systems just keep getting better

Ever since Intel introduced their Little Valley and Little Valley 2 systems into the low-power, mini-ITX consumer space, they've been a hit. Both from the power savings standpoint, and from the price-performance view. During this summer, they introduced a new board, the Little Falls, or the D945GCLF, which has a new 1.6GHz hyperthreaded 64-bit processor, and Intel ICH7 chipset with GMA 950 integrated graphics. The cost of this board on popular retail web sites have ranged from $65 - $79 for this board - an awesome price. Solaris Community Edition does run on this board, and fairly well, although there were some quirks that need to be to overcome.

Little Falls Retail Box

Booting into 64-bit

The Intel Atom processor is supposed to be a recent 64-bit hyperthreaded core, and this is true of this system. But up through Solaris Community Edition build 98 and OpenSolaris, we find that Solaris will default boot into 32-bit. A bug in the way the Solaris version of grub boots, mistakens the CPU ID for one that cannot support 64-bit, so it switches and boots into 32-bit by default. With the help of several Atom enthusiasts inside Sun and in the community reporting, a fix for this hopefully should arrive in the next few weeks as we roll out build 99 of Solaris Community Edition and it should show up on the next OpenSolaris 2008 later next quarter. For those who can't wait, a little digging into the kernel shows no potential issues running the 64-bit kernel and so we can force grub to boot the 64-bit kernel simply by editing the /boot/grub/menu.lst file and adding an entry at the top of the list like the following:

#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
title Solaris Express Community Edition snv_96 X86 64-bit explicit
findroot (rootfs0,0,a)
kernel /platform/i86pc/kernel/amd64/unix
module /platform/i86pc/amd64/boot_archive
#---------------------END BOOTADM--------------------

If this is the first entry on the grub menu.lst then the default grub boot priority should boot 64-bit going forward. If you added this as the last entry, you may need to also modify the default near the top of the menu.lst to look like:

# default menu entry to boot
default 3

Change the number '3' to the placement of your explicit 64-bit boot entry.

NIC Interface - Realtek RTL8101E/RTL8102EL

A lot of Linux mail-lists and discussion groups have all had issues with the new version of Realtek NIC that Intel decided to use for this board. And a lot of folks have asked, if Intel makes it's own NICs, like the Intel Pro/1000, why they don't simply put one of their only NICs? Or include a default MAC on the southbridge and just hook up a compatible PHY. The short answer is cost. It's cheaper for makers, even like Intel, to buy a whole MAC/PHY chipset than to bring out a chipset MAC and pay separately for a compatible PHY. That was the case here.

The main problem a lot of folks in BSD, Linux and the Solaris communities ran into however, was that this wasn't your run of the mill Realtek rtls NIC that was rtl-8100/8139 compatible. Starting with the 8101E line, the chips started to use a PCI-express lane off the south bridge and they had MAC interfaces and registers that looked a lot more like the RGE or RTL-8169 (gigabit) series of NICs, only with a fast 10/100 PHY. And while the hardware PCI registers (either lspci or prtconf or /usr/X11/bin/scanpci) all indicate that this version of NIC was RTL8101E, the smbios Intel provides with this board shows that the NIC is actually an 8102EL - a slightly modified version of the 8101E. For all intents and purposes, the chips are the same, except for Hardware Checksum support. The old initialization support for hwcksum isn't the same register, and was either removed (because it's a slow NIC) or changed. I've made contact with Realtek and after explaining the issues, their engineer knew exactly what the problem was and forwarded me a couple of pages torn out of their datasheet. Some minor changes are going to be required and until we get the go-ahead that this is okay to open source, which should be soon, we can't quite export them to the community. However, a quick workaround for HW Checksum is easily done and gets the NIC working just fine, and that is to disable the Hardware checksum for the NIC. The easiest way to do that permanently is to edit the /etc/system file and put:

set ip:dohwcksum=0

then save and exit, and reboot the system. For most Solaris community edition post build 82 or later, I think, we should have the PCI ID already listed in /etc/driver_aliases. If you run prtconf -pv and or /usr/X11/bin/scanpci and the device ID for the NIC doesn't match anything in /etc/driver_aliases, then in the section for rge devices, add an entry for the vendor/device ID following the same format and then either run reboot -- -r or run update_drv rge then devfsadm. A reboot is still required if you haven't done so after editing /etc/system to turn off hardware IP checksum.

Getting the HD Audio Working

The ICH7 chipset supports Intel HD-Audio. However, the Solaris audiohd driver may try to attach but fail to initialize the codec, which looks like a Realtek ALC662. Fortunately, there's been a project underway lead by Garrett D'Amore and the Sun China Audio team to put a parser into an OpenSolaris audiohd driver that can discover and plumb the codec capabilities automatically. It's not perfect by any means, but for the vendors that hook in the codec correctly and publish the correct node-IDs and capabilities to the controller will mostly work, which is about 70+% of most motherboards today. Try downloading the latest August 25th version and try that. I've had good success without the need to go in and hack a hard coded codec into the controller like before. Thanks much Minskey, Garrett and China Audio team!

The rest just works as normal

What's kind of cool is that the rest just seems to work, like the Intel integrated graphics, the SATA and IDE ports, and the performance isn't bad. The old Little Valley boards were SiS Mirage graphics based and the chips had a quirk that really got "snowy" under the Xorg SiS driver. The solution was to use the VESA driver instead, but that limited usage of 4:3 monitors to a maximum, I think of 1600x1200 pixels. With lots of widescreen LCDs available today, that wasn't really preferrable. The new Intel GMA950 is sharp and bright with all the screen resolutions.

I could end this with a sharp criticism on the power consumption for the Little Falls. The 1.6 Ghz Atom has a TDP of only 4Watts. But the overall board with a cheap ICH7 desktop chipset (not mobile) makes to total system power draw at the wall closer to 26 Watts idle, 41Watts peak depending on the type and efficiency of the power supply used. My box has a DC-DC converter Pico PSU 120 with brick and I use a 2.5 inch SATA hard disk, 2GB DDR2 800 and slim DVD burner. With a 3.5 inch SATA drive and a full sized DVD optical drive (spinning) the peak power draw can hit 59Watts! Admittedly, Intel have said that this board was targeting cost more than power. Other vendors produce palm tops and embedded systems with far lower total power using more expensive mobile chipsets.

Still, the board is very economical and a decent power miser. The system is also fairly quiet, although the irony of this board is the northbridge/gma graphics has a fairly noticeable heatsink and fan, while the Atom cpu has just a half-height block heat sink. At first glance, folks may think the Atom has the h/s fan. I haven't run perf comparisons, but based on boot-up times and running some multimedia apps, this feels like a faster board and CPU. Whether that's because of the faster 1.6GHz clock compared to the previous Conroe-L 1.2 GHz Celeron 220 core or it's the hyperthreading allowing fewer hiccups while multi-tasking needs verification. At just $65 though, I couldn't help myself and bought 3 of them for tinkering around.

What will Intel come up with next? Looking forward to it.

September 19, 2008 02:39 PM PDT Permalink

20080602 Monday June 02, 2008

Notes about Solaris Nevada/OpenSolaris Sendmail Configuration

About maybe a month ago, I started seeing hard drive DMA errors reported in the logs on one of my venerable servers that's been receiving most of my family's email since 1999. It originally had a whopping 15GB drive which was posh for 1999, but that drive died suddenly with a shorted out power supply unit, which prompted a self-repair of the PSU (my first attempt a soldering new high frequency switch caps into a PSU) in 2001. I swapped that out with a new 40GB Seagate ST3004xx something drive that was the rage back then. The first, I think, with the fluid dynamic bearings or something like that and ultra quiet. Fast forward to last month and the PSU is still working great but the disk drive, now on its 7th year, had started to go bad.

At first it was just a couple error messages on the console per week. But as the weeks progressed, the errors were becoming more frequent, to the point where I was seeing 23 errors in less than 30 minutes a couple weeks ago. I decided to swap out and upgrade that venerable box to new smaller, cooler, lower-power hardware. I had been dreading this task because I remembered the pains it took to configure the sendmail daemon back then. But with my final backup of email taking over 15 minutes for an incremental 6.8 MB of data, I managed to probably avert data loss by the thinnest of margins.

The new box - an older system

I'm not one to throw away perfectly good hardware, even if it is past its prime. And with hardware rev'ving every quarter, just about any box over a year old is past its prime. I decided to base my new mail server on a first generation EPIA 800 from VIA. It's a mini-ITX board with 800MHz VIA c3 cpu that chugs along and sips power. The first generation boards were shipped in quantity starting in 2002, and I picked up a couple back in 2003, so these are 5 years old. A real slow poke, but for a headless mail server box, it's perhaps perfect. It isn't like I can afford a fat OC3 pipe to my house anyway, so for normal broadband type speeds, this is perfect. Plus, at 14Watts idle, and 17Watts when small chunks of email come in, the system works just fine. I enclosed this system with a very small Morex/Cubid 2699 style case with AC adapter power supply, and included a 60 GB IDE notebook drive and slim optical DVD drive. I originally debated whether to keep the optical drive in the case because of fear that the standby power might be quite high. But as it turns out, it's only about 1Watt in standby mode. When burning, the drive can cost an extra 10 Watts. The motherboard has onboard audio, video and LAN. I have 1 GB (2 x 512MB PC133 SDRAM) in the box.

OS Install and Systems Admin

For a mail server, I went into BIOS and pretty much disabled the audio, the serial ports, and configured the system to reboot to its original power state if there is a sudden loss of power. Solaris Nevada b90 was the latest available and it installs fine on this 32-bit system, only the old Unichrome graphics isn't well supported. But for a box that is running headless, it was easy enough to avoid the SXDE installer and use the old style express installer in text console mode. After booting for the first time, I logged in and disabled cde-login:

    # svcadm disable cde-login

I then used a USB stick to transfer Murayama's vfe2.6.2a driver source code and the GLDv3 headers required to compile the driver (mac.h, mac_ethers.h, dld.h) to compile and install the network driver.

Once booted and up on the network, I quickly enable tcp_wrappers and ipfilter. A mail server is going to sit on the public internet and get probed many thousands of times per day, so it's not for the faint of heart. It really requires hardening the the network configuration. Some folks opt for a hardware firewall, but I've seen attackes against those, too that can corrupt firmware or take over the firewall box. But it's not too difficult to quickly shut things down.

TCP services can be firewalled immediately by creating a file called /etc/hosts.deny and having:

    ALL:    ALL

inside that file. And conversely, an /etc/hosts.allow file which has specific hosts and services listed. I basically open up everything to my localhost, SSH for my internal private network, and sendmail and imapd to the world.

    ALL:   localhost
    ALL:   127.0.0.1
    sshd:  192.168.100.0/24
    sshd:  .sun.com
    imapd: ALL
    sendmail:  ALL

To start TCPwrappers, just issue the commands:

    # inetd -M tcp_wrappers=true; svcadm refresh inetd

I also shutdown any RPC communications with TCPwrappers by using the command:

    # svccfg -s rpc/bind setprop config/enable_tcpwrappers=true; svcadm refresh rpc/bind

There should be some great articles hosted on Sun's BigAdmin website on TCPwrappers configuration that folks can use their favourite search engine and find.

To configure IP Filters, I edit the file /etc/ipf/ipf.conf and put something like:

#
# IP Filter rules to be loaded during startup
#
# See ipf(4) manpage for more information on
#
# IP Filter rules syntax.
# IP Filter config file - James Liu, 2005-Jan-19
# -----------------------------------------------------
# let all loopback traffic flow freely
pass in quick on lo0 all
pass out quick on lo0 all
# -----------------------------------------------------
# default rule set - block all incoming packets but let in
# certain protocols and keep state 

# Nasty short packets which are fragmented too short to be real.
block in log quick all with short

# start by blocking and logging everything on vfe0 by default
block in log on vfe0 all
block out log on vfe0 all

# block and drop network spoof packets (these are reserved) and
# any packets that should only be on loopback only for vfe0
pass in quick on vfe0 proto tcp from 129.146.104.0/23 to any keep state
block in quick on vfe0 from 192.168.0.0/16 to any
block in quick on vfe0 from 172.16.0.0/12 to any
block in quick on vfe0 from 10.0.0.0/8 to any
block in quick on vfe0 from 127.0.0.0/8 to any
block in quick on vfe0 from 0.0.0.0/8 to any
block in quick on vfe0 from 169.254.0.0/16 to any
block in quick on vfe0 from 192.0.2.0/24 to any
block in quick on vfe0 from 224.0.0.0/3 to any

# log any attempts to route to reserved network or broadcast addrs
block in log quick on vfe0 from any to 129.146.104.0/32
block in log quick on vfe0 from any to 129.146.105.255/32

#------------------------------------------------------------------
# Any tcp, udp from this interface outbound, pass out
# Any icmp from this interface outbound, pass out
pass out quick on vfe0 proto tcp/udp from 129.146.203.235/32 to any keep state
pass out quick on vfe0 proto icmp from 129.146.203.235/32 to any keep state
#-------------------- web service -----------------------
pass in quick on vfe0 proto tcp from any to 129.146.104.80/32 port = 80 flags S keep state
pass in quick on vfe0 proto tcp from any to 129.146.104.80/32 port = 443 flags S keep state
#-------------------- ssh service -----------------------
pass in quick on vfe0 proto tcp from any to 129.146.104.80/32 port = 22 flags S keep state
#-------------------- sendmail service -----------------------
pass in quick on vfe0 proto tcp from any to 129.146.104.80/32 port = 25 flags S keep state
pass in quick on vfe0 proto tcp from any to 129.146.104.80/32 port = 587 flags S keep state
#-------------------- secure imaps service -----------------------
pass in quick on vfe0 proto tcp from any to 129.146.104.80/32 port = 993 flags S keep state

Basically, you'll need to change IP addresses for your network. But as you can see, I open up HTTP and HTTPS ports on 80 and 443 just in case I want to run some web-email-proxy software like Squirrel Mail so folks can get their email via a web browser, like Yahoo! or GMail. I run Apache and it's a standalone server process not using TCPwrappers, but the SSHd daemon and sendmail are compiled to use libwrap, so hence we have entries for them in the /etc/hosts.allow file. I need to be able to SSH to the box to manage it so I open up port 22. Sendmail and sendmail's mail submission program listen on ports 25 (smtp) and 587 (submission) respectively. The port 587 was specified because many ISPs block port 25 traffic inside their DHCP networks to reduce spam. The switchs and routers only permit SMTP traffic to their own mail servers where they have control of who's routing the email to whom. Port 587 is configurable and allows folks to workaround the port 25 blockage and route email outside to a different SMTP server the user knows is available. Lastly, since I run secure IMAP with SSL, I open up port 993 which is the default for most imaps clients.

Once the network is relatively secured, I streamline the server by removing or moving out most of the legacy services in /etc/rc3.d and /etc/rc2.d. I also disabled a lot more services like webconsole, wbem, smserver, some of the rpc/cde stuff, the font/fc-cache, basicreg, ndp, installupdates, print/ppd-xxx, autofs, uucp, and stuff that a mail server isn't going to need.

Sendmail Server Configuration

The default distribution of Nevada or OpenSolaris has a fairly vanilla configuration that's basically the same as Berkeley Sendmail. It supports almost all of the features you'd find in 8.14.2 and if you telnet localhost 25 on the box, that's what the HELO/EHLO ESTMP reponse comes back with. But what's missing still are some default configurations that allow a user to take OpenSolaris and start up a real, external facing mail server. But if you've done this before on another box, even a Linux box, you can usually take the sendmail.mc (m4 macro file) and move it over, and if the configuration is for a relatively recent version of sendmail, it should just compile and generate a working sendmail.cf.

Nevada and OpenSolaris keep the sendmail cf/mc files in /usr/lib/mail/cf. There's a handy Makefile inside that directory that can help you create a custom sendmail.cf easily. I have a standing .mc file from a few years back that seems to work okay. I leverage some of the Berkeley anti-spam features as well as setup a mail relay based on a limited number of known hosts. My mail server has to host a number of email domains, so I need to provide features to receive email for multiple domains, for virtual users, and to control access. My .mc file looks like the one below, and is really a mish-mash of stuff I cut/paste from looking at other sendmail configs:

VERSIONID(`@(#)jamesliu-sendmail.mc    1.00 (Potsticker Guru) 2008/05/30')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-antispam')dnl
define(`confDONT_PROBE_INTERFACES',true)dnl
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`confSMTP_LOGIN_MSG',`$j Sendmail $v/$Z; $b; C=US ST=CA - NO UCE WANTED - NO UBE WANTED - NO SPAM WANTED')dnl
define(`confDOUBLE_BOUNCE_ADDRESS',`nobody')dnl
FEATURE(`virtusertable')dnl
FEATURE(`dnsbl',`dnsbl.sorbs.net',`"550 Rejected because " $&{client_addr} " was blacklisted.  Please see http://www.au.sorbs.net"',`t')dnl
FEATURE(`dnsbl',`sbl-xbl.spamhaus.org',`"550 Rejected because " $&{client_addr} " was blacklisted.  Please see http://www.spamhaus.org/sbl"',`t')dnl
FEATURE(`access_db')dnl
FEATURE(`smrsh',`/usr/lib/smrsh')dnl
FEATURE(`mailertable')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`relay_hosts_only')dnl
FEATURE(`nouucp',`reject')dnl

EXPOSED_USER(`root')dnl
MAILER(`smtp')dnl
MAILER(`local')dnl

Note the use of DNS Blacklisting which relies on SORBS and SPAMHaus. These services are free to small/low-volume users, like my home system and they save a HUGE amount of spam. Without them, I would get about 2000+ spam emails per day, and probably just 10 legit emails. To generate the .cf file, I simply cd into /usr/lib/mail/cf/ and run:

    # make jamesliu-sendmail.cf

The Makefile searches for a corresponding .mc file with the same prefix name and generates the .cf file. I then copy it over to /etc/mail and replace the regular sendmail.cf with mine.

By default, the sendmail daemon in Solaris Nevada, since quite a few years ago, only allowed the MTA to connect to localhost. We want to open it up and so we need to configure Sendmail's SMF setting using:

    # svccfg -s sendmail setprop config/local_only=false

To activate the sendmail daemon for wide area network access, this particular configuration isn't like other SMF services. Restarting, or svcadm disable/enable, or even rebooting doesn't pick up the new configuration. You MUST run:

    # svcadm refresh sendmail; svcadm restart sendmail

I'm not sure why, but that seems to do the trick.

We're almost done, but not quite. The sendmail daemon requires that a bunch of files and binary database versions of those files exist in /etc/mail. With the above .mc configuration file, the daemon will expect to see:

    /etc/mail/access.db
    /etc/mail/aliases.db
    /etc/mail/domaintable.db
    /etc/mail/mailertable.db
    /etc/mail/virtusertable.db
    /etc/mail/local-host-names
    /etc/mail/helpfile

The access, aliases, domaintable, mailertable and virtusertable .db files are all binary compiled from text files with name-value pairs of descriptors. The names of the files are /etc/mail/access, /etc/mail/aliases, /etc/mail/mailertable, /etc/mail/domaintable, /etc/mail/virtusertable and after hashing them into a binary format, each file is appended with the suffix ".db". You can learn more about the formats by going to www.sendmail.org and reading up on documentation. One is for access control, one is to define mail aliases, mail group aliases, one is to define domain translation rules, one is to define mail address rewriting rules, and the last is to define virtual user email addresses. Some features overlap like the virtusertable and the aliases file. To create the databases, I create text files without the .db suffix corresponding to each .db file. I have a lot of entries in access.db for anti-spam, and I manage quite a few aliases and virtual users. My local-host-names are many as well, one for each domain I host. But domaintable and mailertable are pretty much left null. But I found that I need them present because sendmail is checking for their presence to verify legitimacy of inbound emails destined for virtual users listed in the virtusertable for some reason. I don't understand why, but the email address translation directives in virtusertable are ignored when the inbound email address differs in final domainname of the recipient that is mapped in the virtusertable - but only when mailertable and domaintable .db files are NOT present. Sounds like I need to file a bug against the Berkeley sendmail daemon. Maybe later. But for now, just having them there, even empty files gets makes the virtusertable work, so I keep it there.

To generate the .db files, I created a simple Makefile, shamelessly copied from an old Linux distribution. Basically, it looks like:


    all:  virtusertable.db access.db domaintable.db mailertable.db

    %.db : %
        @makemap hash $@ < $<

    clean:
        rm -f *.db *~

Put the Makefile into /etc/mail and run it each time you modify any of the above files. The aliases.db is created when the "newaliases" command is run, which is just a call sym-linked to the sendmail binary. Now you can svcadm restart sendmail and you should be able to have a working mail server.

Clearly, there are no guarantees that this will work for you. You need to make sure your mail server is properly configured as a DNS client on the network (i.e. it points to the right DNS and you've config'd /etc/nsswitch.conf and /etc/resolv.conf) is properly configured for your mail server and you have the right DNS MX records entries provided and hosted by your DNS registration provider.

If you've done everything right, you should be able to go to a free mail provider (e.g. Yahoo! or GMail) and send yourself some email. You should be able to watch the mail logs as the email comes in at /var/log/syslog. And if you do a ps -ef | grep sendmail, you should clearly see that the sendmail -bd -q15 has no trailing -C local.cf anymore.

If you plan to read/access your server through IMAP and or SquirrelMail, you can do an internet search for those packages and install them. www.sunfreeware.com may have all the packages pre-compiled for you as well. You may need to follow the directions also to generate PEM certificates for your IMAP server so it can run SSL. The command I use to create a self-signed PEM certificate is

# /usr/sfw/bin/openssl req -new -x509 -nodes -out imapd.pem -keyout imapd.pem -days 3650

This cert must be put at the destination: /usr/local/ssl/certs/imapd.pem.

One funny thing I encountered in IMAP server 2006e with SSL is that it claims that it doesn't work correctly with TCP wrappers on most UNIX/Linux distros. But I like running IMAP from the inetd because it kicks off the imapd server only when needed and is not present otherwise. So I had to attempt to see if it still worked, despite the warning. It's not so straightforward like the old days to configure the inetd daemon by editing the /etc/inetd.conf and restarting by pkill -HUP inetd. But I was able to everything working. First, I edited /etc/services and added 993 as a service port for imaps, then I added this line to the /etc/inetd.conf (legacy file - only active line):

imaps   stream  tcp     nowait  root    /usr/sbin/tcpd  /usr/local/sbin/imapd

and then ran the inetconv(1M) command which then puts this service into SMF and under the inetd process. A restart of the inetd daemon and everything just worked.

June 02, 2008 05:40 PM PDT Permalink

20080410 Thursday April 10, 2008

A head case over 2 Antec cases

"Too many cases." That's what I thought when I walked into my garage. But I'd like to get more of the right cases.

My latest case obsessions

Last Friday, Fry's had a sale on the new Antec Minuet 350. Regularly, $90, they had them on sale for $70. I already went and checked out the Sunnyvale store. Only the older minuet 300 left. Maybe more coming. But Palo Alto store had two left and I bought them both. This is my new favourite case; this new Minuet 350 now includes a 80+ certified power-supply with active PFC. While efficiency isn't 80+% down below 60 Watts, it's still quite a bit better than lots of cheap power supplies bundled with a case. Plus, because of the efficiency, less waste heat means quieter and cooler PC. It's a low-profile desktop case that only takes low-pro add-on cards, and micro-ATX motherboards, but that's perfect for me, since I've got a lot of microATX and mini-ITX boards.

The sale on the minuet 350 looks like it ended Tuesday, but I would expect it to happen again in the next couple of months and I'm ready to buy a couple more. When I do the calculation on savings over just 1 year for a system I leave on all the time, a good rule is to price it at $2/Watt saved per year. I've put the same board into a cheap case/PSU before and typically have been surprised that the total system eats 75 watts. But in an efficient case/PSU, the total draw is just 50 watts. If I save 25Watts on average, that's $50/yr!. That pays for the difference in just one year over a cheaper case. Makes lots of economic sense to me.

For the folks who want a bigger box to hold full sized/full height option cards, a sale I'd look out for would be the Antel NSK-4480 and NSK-4480B. (Latter one is a black version of the same case). Both are quiet cases and come with an earthwatts 380 PSU, also 80+ certified. And I picked up 2 of these at Fry's in the last few months for just $49.99. Regularly, they're around $89.99, still a great deal, because you'll save money as well and enjoy lower noise.

What to do with the old cases?

I have quite a few cool-n-quiet cases still new-in-box and for a hoarder like me, it's a great feeling. But computer cases are a lot bigger than fishing tackle, so the shelf space they're occupying is very conspicuous and running out. As a volunteer teacher for a Grade 3 - 5 PC building class, I'm actually seriously thinking about giving away the computers at the end of the class. Only, while I do stock a lot of parts, I don't quite have 15 - 20 systems to give away twice a year. But the kids do always ask on the first day if they get to keep the computers. I'm just not sure what a 3rd grader is going to do with a Solaris box. Anyone out there want to help write a bunch of educational software or port EDU software to Solaris? April 10, 2008 10:25 AM PDT Permalink

20080409 Wednesday April 09, 2008

Solaris on $50 ECS 945GCT-M Combo Special

An Awesome Combo If It's On Sale

A few months back, I saw a Fry's sale on a Motherboard/CPU combo that listed the ECS 945GCT-M motherboard with Celeron 430 retail processor for $59.99, limit 1 per person. I thought it was an awesome buy and so at lunch time, 2 of my colleagues and I headed out to Fry's and I convinced them to each purchase one and so I had 3 combos sitting in my office. The next week, the same ad appeared in the San Jose Mercury News, but this time the price on the combo was $49.99, so I couldn't help myself and my 2 buddies and I headed over again, and I got another 3 boards. Not only do the motherboards provide Intel ICH7 chipsets with LGA775 sockets and support Core2-Duo processors, the ad on the 2nd week, offered version 3 of the motherboard which have 1333 MHz Front Side Buses.

The Celeron 430 is also a great price/performer. At 35 Watts average TDP, it's got a Conroe-L based core and supports 64-bit processing. Plus at 1.8GHz, it's fairly speedy. The way I guage roughly how fast the system is going to behave is to watch the first bootup after a Solaris install, when the SMF plumbs the first 191 services. And in less time than I can walk over to the frige and grab a cold beverage, the system is at the login prompt.

All Devices Almost Hunky-Dory

We've been running Solaris Nevada on this since build 79 or so. At that time, the onboard Realtek 8101E NIC didn't work properly. And the HD audio codec wasn't recognized. But the onboard Intel 945GZ integrated graphics controller works just fine with Xorg. Plus the SATA and IDE ports work as expected. And the board offers 2 PCI-express x1 lane slots and a single PCI-express x16 slot. Gen1 of course. But what would you expect for $50 - including the CPU!

Recently, I installed Nevada b86 on the system. And behold, the Realtek 8101E NIC is now supported. Surprisingly, it's not supported under the Solaris rtls driver, even though this is a Fast Ethernet (10/100 Mbps) port. Instead, it's supported under the rge driver, which has traditionally supported the Realtek 8169 Gigabit PCI device. Thanks to Miles Xu in Beijing for notifying me about this. This new Realtek 8101E is connected off the PCI-express bus, and register-wise, looking at the BSD source code, it looks much more like the 8169 NIC than the older 8139-series.

At first, I suffered some hardware difficulties with one of these ECS motherboards I had loaned out to some colleagues, and so the NIC would not work properly. But with 5 spares, I was easily able to replace it and try it again. I'm not sure what caused the failure, but secretly, we're using this as test systems for PCI-express HBAs and GigE NICs during development. The thinking is that if it will run on a dirt cheap system, it should have fewer issues running on a premium box.

Adding HD Audio Support to the Solaris audiohd Driver

The only device not yet supported was the audio codec. The Solaris audiohd driver attempts to attach() but fails when it encounters the codec. I decided to see if I could hack support into the driver by simply adding the PCI vendor/devID into the driver. The first step is to identify the codec. The easiest way on Solaris is to simply run:

  # dmesg | grep audiohd 

You should see some error message such like:

  Apr 8 18:02:14 gyoza audiosup: [ID 579887 kern.warning] WARNING: audiohd0: uns
upported HD codec vid=0x83847682, sid=0x00000000, rev=0x0010360

This tells us that the codec vendor (0x8384) is SigmaTel, and the DevID=0x7682, according to a web search, seems to indicate this is a type of STAC92XX type of codec.

Source and header files for the Solaris audiohd driver can be found at www.opensolaris.org. You need to download the ./usr/src/uts/common/io/audio/sada/drv/audiohd/audiohd.c as well as most of the headers in ./usr/src/uts/common/sys/audio/ and ./usr/src/uts/common/sys/audio/impl/. You will need to structure your headers into a directory relative to the audiohd.c such as ./include/sys/audio/ and use a CFLAG during compile like -I./include/sys/audio . I put an audiohd tarball together which you can click and download which should make life easier without having to download the whole kernel and build it to just get this driver.

After identifying the codec, I edited the ./include/sys/audio/impl/audiohd_impl.h header file (in the ./include/sys/ subdirectory of the tarball linked above) and added an entry for the new codec. For example, I found the entry like this for the SigmaTel STAC9200 codec:

   #define AUDIOHD_VID_STAC9200    0x83847690 

On my ECS945GCT-M system, have an 0x83847682 device which the web indicated was a type of STAC92xx codec and so I added a new define like:

  # define AUDIOHD_VID_STAC9200X   0x83847682 

and then editing the audiohd.c file and everywhere I found STAC9200, I added a similar line for STAC9200X, then ran:

  # make; make install

I ended up with an i386/audiohd and amd64/audiohd (32- and 64-bit) driver binaries which work.

To update and test the driver, I did the following:

  # update_drv audiohd
  # modload ./amd64/audiohd
  # devfsadm

After looking inside the /dev/ filesystem and seeing if ./audio and ./audioctl were created:

  # ls /dev/au* 

I was able to play a few audio clips from /usr/demo/SOUND/sounds/.

When I get a non-working audio driver working, often the the Gnome desktop audio icon is still appear blanked out. The easiest way to cure this is to logout, and then login again without rebooting.

There are plans underway to improve audiohd and maybe integrate that with more popular audio technologies in the future. So hopefully, I won't need to do this every time. But it's not too hard or too big of a hassle since the Solaris source code is out there and easily available. And it was worth the small effort since I now have an excellent value system that plays video and music just fine.

April 09, 2008 05:32 PM PDT Permalink

20080327 Thursday March 27, 2008

OpenSolaris Community Innovation Awards Program

What? A chance to win big bucks

No, not some silly hunt big whitetail deer like you'd see on Outdoor Channel, but serious Moula - aka beaucoup deneiro - for slinging some code the runs on Solaris. It's the OpenSolaris Community Innovation Awards Contest.

I got sucked in by Jesse, Jim, Teresa, and Alta into this community advocacy project a few weeks back. Alta was the real culprit, though. She's reviewing this device driver white paper (part 1 of 3) that's going on Sun's BigAdmin someday soon, and then suddenly, with 80% of the HTML formatted she said there was this big pot of money and Sun was giving away $1Million. Now, if you're in the EU, or any other foreign country, you're probably yawning and mumbling..."WTF... no biggee, what's a $1Million USD worth these days anyway..."

But to make a long story short... Alta hinted this was a big project... aka...double speak meaning that she's probably holding my whitepaper hostage until we deploy. So I got interested and checked in on the conf call and got pulled into helping drive this contest; anything to speed this up, so eventually she'll get around to finishing the review and edits and putting it up on the web.

In short, the contest is only 1 part in 6 smaller contests. Each part, whether OpenSolaris, NetBeans, OpenOffice, or HPC, or Java, gets around $175K. Added together it's over $1M USD. Each group consults its own community and makes up the rules. Sun insists only primarily on contestants being individuals or teams of individuals (not companies) and that everyone signs the Sun's Contributor Agreement which binds all contributions to the CDDL open source licensing. Beyond that, each group makes up their own schemes for judging and payout. Sun's legal kicks in resources just to make sure the rules are legal and can be fulfilled in all the participating countries that are eligible.

For OpenSolaris, the Contest is seeking code and non-code entries that run on OpenSolaris, play on OpenSolaris, that advocate and help others use OpenSolaris... just about anything that's goodness earth-mother-apple-pie kinda stuff related to OpenSolaris. The prizes aren't bad. The team decided to break things up. $100K for the contest and $75K for undergrad university research. For the contest, top prize is around $30K I think, with 3 x $15K second level prizes, and 25 x $1K prizes. Which means if anyone is one of 29 contestants that actually submit anything, they could win some money. On the University Grant side, (which is opening soon), the prizes are anywhere from $1K - $5K and designed to fund a small research project or augment something bigger. The prizes are given out for proposals, and not actually the results, although winners who take money are obligated to give a final summary (short one) on their results.

The registration process

Due to shortage of web resources, I got picked to offer my time on nights and weekends to building the registration. We managed, after quite some hassle to obtain a solaris zone inside Sun's firewall, and stage the pages there. Eventually, Sun's IT team would assign the "Awards.OpenSolaris.org" domain to the Zone and we'd be live. Jim Grizansio gives me some credit for putting up the site. It was simply a bunch of jsps and servlets I've had for about 5 years which I developed for my school's PTA website nimitzpta.org. I created a simply flat file database which stores entries encrypted in separate files. That way, if the ISP isn't all that safe, at least the data is pretty useless to the hacker unless they have a strong Math and decompiler background and can figure out my storage system (which stripes part of the key remotely and is fetched at server startup). Anyway, I hope the interface isn't to geeky. The real designer for the UI, I found out, was Derek Cicero and possibly others. They helped with all the standard CSS stuff that would take me forever to format in stock HTML. Coding is easy. UI is hard.

Hopefully people won't balk at the UI. I apologize in advance. But give the contest a try. Registration isn't too difficult. I hope it's logical. Steps are the following:

  1. Go to awards.opensolaris.org and register on that system. It's separate from the main OpenSolaris.org site for a number of reasons which I won't explain here. But just register as a user.
  2. Next, if you have an idea for a contest entry, you can submit it and it will be stored along with your profile.
  3. You have a few options to select if you want others to see your private information or not, or if others can join or not. But as a community effort, even if you don't publish your name and contact info, the title and brief description of your submission are posted on the list.
  4. When you're ready, you can upload your wad. We support upto 10MB as wad of stuff. Standard tarballs are accepted (e.g. .zip, .tgz, .tar, etc.). If it's bigger than that, then you can submit a URL to us.
The system will allow you to edit, clobber and refine your submission, entry, registration data up until the deadline for submitting the actual contest entry. So you can visit early and tweak often. Hopefully, if you have the initiative and are one of the favoured 29, you'll win some money.

March 27, 2008 07:06 PM PDT Permalink

20071227 Thursday December 27, 2007

Part 2 - running Solaris on those new Intel Little Valley Motherboards

So Christmas was pretty cool. I ended up ordering myself a tonne of electronics gear on sale and it all arrived in the mail. But I've been spending most of my first few days running and testing the Intel Little Valley and Little Valley 2 systems and playing around with things like a 2GB CF Flash IDE drive and making a tiny server out of it and so on. I also answered a few questions posted by some readers.

Heat

Colleagues and some net folks found my email and asked if there was any concern with heat and using the various enclosures. My results can't be conclusive because this must be the darned coldest winter we've had in California in a while, so it isn't the middle of summer when it's supposed to be hot. Where's Global Warming when you need it?

My CPUs stay toasty at 45C on average for the D201GLY (vers 1) board and 47C on average for the D201GLY2. That's after prolonged running of some stress tests such as HCTS and the like and some of my own home grown ones. And I also have been running these systems for a week now and when I get back briefly during a reboot into BIOS, the health status reports consistent temps.

What might be worrisome is the temp of the Northbridge heat sink. That is a finger-burner (i.e. it's too hot to touch) and this appears to be true for both vers 1 and 2 of the boards, but I took a meat thermometer to the north bridge and it reached about 130F which is too hot to touch for most folks. But that's only about 54C, which is the surface. I figure the junction temp for the Northbridge is probably around 65 - 70C which is within operating limits of the system. And I haven't seen any instabilities in the systems after 3 days of stress and uptime for 14 days. The NB heatsink is -smaller- on the vers 1 board so the temp reported previously is the hottest I measured. I don't have long term failure data, but so far, it seems that with just one or two small case fans, there's enough movement of air to keep things cool, at least during winter.

Noise

Yes, I had questions about noise. The Casetronic Morex 2699R is louder because of the dual 40mm exhaust fans out the back. And for some reason, due to the bare metal shape of the Casetronic case, it acts somewhat as an echo chamber and amplifies the sound of the small 40mm fan on the vers 1 Little Valley board. Hence, for the price differential currently of the $66 retail boxed fanless Lil Valley 2 and the $60 retail boxed (w/ fan) Lil Valley 1, I'd go with the fanless vers 2 of the board.

As far as cases go, the iStar Storm S3 case is so quiet, I can barely hear it next to my head while lying down. The case fan control on the motherboard is quite effective and after running for many days, the none of the systems have thermal issues. Couple that with the fanless board and it may cost about $36 more for the system, but that's worth the quietness to me. Your mileage may vary. But my guess is that my fanless vers 2 plus iStar case comes in at idle at under 22 or 23 dB which is as quiet as the disk drive inside with a fluid dynamic bearing.

Power Usage

And here I though that the new Conroe-L core Celeron 220 on the Lil Valley 2 with reported 19 Watts TDP would really lower my power consumption. But Intel must be lying or it must be eaten up elsewhere in the chipset like for the two new SATA ports on the board that the first version didn't have. But in head to head tests, I was still using 28 - 37 Watts with a peak at startup and during some stress tests upto 45 Watts. Both systems were the same, and I swapped SATA for IDE and back. The IDE only saves like 1 Watt over SATA. In addition, I swapped out SATA for an IDE CF 2GB drive. It was the cheapest and slowest CF card I think Fry's had to offer ($14 no rebate - Adata 60x - at least reported as 60x). I maybe got 2 MB/sec out of that card on a large block read/1MB block write. But that A-Data card really bogged down on large numbers of small writes to the point where it took 1hr 50 minutes (most of Aliens vs. Predator movie on FX channel) to just load the first 106 limited boot services on my hacked-down 1GB opensolaris router flash archive image. That is -really- s-l-o-w.

Does the slot support 2GB DDR2 sticks?

Well, here's the prtconf output corroborated by the BIOS:

System Configuration:  Sun Microsystems  i86pc
Memory size: 2014 Megabytes
System Peripherals (Software Nodes):

i86pc
    scsi_vhci, instance #0
    ib, instance #0 (driver not attached)
    isa, instance #0
        i8042, instance #0
        ...

I also ran a number of apps and many apps going all at the same time. Well over 1 GB and it wasn't paging, so the SiS662 chipset must recognize the 2GB stick. And it was a cheap stick too. I bought it at eWiz.com for just $34 plus shipping and tax. They delivered it in just 1 day. Insane fulfillment. Don't these guys take a vacation? Not that I'm complaining. But you know how some folks swear by NewEgg? Well, once you eWiz... and BTW, they started carrying the Little Valley 2 retail box board too! And it's $1 cheaper than NewEgg! Anyway, memory link is here: http://www.ewiz.com/detail.php?name=T6UB2GC5 and the motherboard link is here: http://www.ewiz.com/detail.php?name=MB-201GLY2

Performance Benchmarks

I ran 3 types of typical CPU tests. Not graphics but just standard stuff I use my low power system. These were an MD5 checksum of a large file, LAME encoding of a bunch of WAV audio into MP3s, and using Java to auto-rescale a bunch of dig. pics I took in 7 mpixel for posting onto the web. I made sure I ran large enough problems to exceed 8MB of hard disk cache and used the same config where possible to replicate component I/O performance. I ran the Celeron 220 (vers 2) in 2 modes - 64-bit and 32-bit, the vers 1 board in just 32-bit (since that's all it's capable of, and then compared this to old Socket A generation of an AMD Geode NX1750 with DDR memory. Results are below.

AMD = 32-bit Solaris on 32-bit AMD Geode NX 1750 1.4GHz
C220 = 64-bit Solaris on 64-bit Celeron 220 1.2GHz
C215 = 32-bit Solaris on 32-bit Celeron 215 1.3GHz
C220-32 = 32-bit Solaris on 64-bit Celeron 220 1.2GHz

md5sum of 352MB file
--------------------
timex md5sum s10_u1_x86_cd1.iso
09791c116eb2189a708f9a698e5e413d  s10_u1_x86_cd1.iso

run1    AMD     C220    C215    C220-32
----------------------------------------
real    6.56    5.40    4.96    4.95
user    2.01    2.12    2.00    2.10
sys     2.01    0.88    1.49    1.04

run2    AMD     C220    C215    C220-32
----------------------------------------
real    6.45    5.47    4.51    4.96
user    2.01    2.12    2.00    2.10
sys     2.00    0.89    1.34    1.04

run2    AMD     C220    C215    C220-32
----------------------------------------
real    6.44    5.47    4.65    4.93
user    2.01    2.12    2.00    2.10
sys     2.00    0.89    1.35    1.04


lame -h encoding to MP3 of 59MB WAV file
----------------------------------------
timex lame -h test.wav test.mp3

run1    AMD     C220    C215    C220-32
----------------------------------------
real    34.23   30.79   29.90   30.78
user    30.93   29.79   29.14   29.85
sys      0.75    0.33    0.51    0.52

run2    AMD     C220    C215    C220-32
----------------------------------------
real    34.60   30.45   29.91   30.59
user    30.86   29.77   29.16   29.85
sys      0.72    0.33    0.51    0.51

run3    AMD     C220    C215    C220-32
----------------------------------------
real    33.61   30.67   29.94   30.58
user    30.77   29.79   29.19   29.84
sys      0.72    0.33    0.52    0.52


Rescaling 15 5.1MPixel Images to 1024x768
-----------------------------------------
timex java ScaleImages test 1024 IMG_00*.JPG

run1    AMD     C220    C215    C220-32
----------------------------------------
real    17.47   10.51   10.66   11.21
user    14.62    9.47    9.76    9.33
sys     1.07     0.53    0.59    0.66

run2    AMD     C220    C215    C220-32
----------------------------------------
real    17.80   10.38   10.62   10.35
user    14.54    9.47    9.73    9.46
sys      1.02    0.53    0.58    0.62

run3    AMD     C220    C215    C220-32
----------------------------------------
real    17.90   10.31   10.59   10.32
user    14.59    9.47    9.74    9.45
sys      1.02    0.52    0.59    0.62

==========================================================================

The interesting thing is that in most cases, the total wall clock time seems dominated by I/O which seems worse on the Lil Valley 2 with SATA ports. But the new Celeron 220 w/Conroe-L core on the vers 2 board has much lower system time and comparable user time with the Celeron 215. The 64-bit mode, while I would expect a slight degradation in performance due to pushing more memory I/O, actually does okay and holds it's own against the 32-bit results and actually has lower system time where the Solaris kernel routines are involved. These results clearly show that the new Celeron 220 is a pretty kicking core, but how that impacts the disk I/O to slow down overall wall clock time (since I wasn't running anything else) is baffling. It's the same chipset isn't it? But the old AMD Geode NX1750 that had comparable power characteristics just can't keep up and gets left in the dust.

Other Thoughts

Funny thing about running in 64-bit was that the SiS Xorg graphics driver is extra sharp! Yes, no need to run Vesa module in Xorg like on the old vers 1. of the board.

And as for booting and running off CF flash memory, tried all sorts of settings on UFS - noatime, nologging, etc. It was slow. Boot time was well over 2 minutes reading from the A-Data "Speedy" CF from Fry's. I even turned off swap. For large files like a 5MB mp3, it could fly and write at a good 1 MB/sec. But writing lots of little files and updating SMF xml files by the hundreds took literally all night. Unless other CF cards have 1000X faster performance, I'll stick with a disk drive. I know there are some new Solid State Disks (SSDs) out there now. These have better durability against writes, but $3K for 64 - 128GB is a bit excessive. When they bundle 32GB of SSD with a Happy Meal at the drive thru, maybe I'll buy some. I also know there are folks like the Indiana Project at OpenSolaris.ORG that have bootable ROM images that run out of RAM. That might be something to look into for flash only boot, but I was hoping to able to at least cache my files locally without needing to run NFS all the time and just get old ATA/UDMA-33 performance.

December 27, 2007 06:39 PM PST Permalink

20071213 Thursday December 13, 2007

A holiday motherboard Special

Just in case folks wanted to go green for the holidays in terms of our computing desktop, here's a -fanless- low-powered Intel "Little Valley 2" motherboard that started selling on Monday at NewEgg. Hopefully the link is still good - last time, they ran out in less than 3 days on the Lil' Valley 1 version of the board. I also noticed they posted a Retail Kit version for $2 more.

http://www.newegg.com/Product/Product.aspx?Item=N82E16813121326

The form factor is actually mini-ITX which is micro-ATX compatible but the whole mobo with soldered on CPU, graphics, networking, audio, is just 6.7 inches square. Price is just $65 and it listed today at newegg. This is $10 cheaper than the next closest competitor with stock on this item (mini-box.com).

Last time they had a sale, newegg sold out in 3 days or less on the Little Valley 1. This new board features a new Conroe-L-based Celeron 220 cpu that's even lower-power but supposedly faster than the version 1 of the board. Plus the new board has 2 SATA ports. Rest of the features include 1 IDE port, 1 DIMM slot (1GB DDR2 max), two sets USB pin headers + 2 usb onboard in the back, front panel audio header pins, PS/2 keyboard and mouse ports, 1 parallel, 1 serial port, and 1 PCI slot.

I purchased a new iStar storm 3 mini ITX tiny tower case with 80W high efficiency power supply. Newegg also has highly rated Wintec AMPO memory, 1GB DDR2 5300 dimms for $19 (w/ heat spreader!!!) and you may want to get the Samsung slim DVD burner which I've verified is truly ATAPI compliant. (not like that $38 cheapy APOS DW-ISD081 Dual Layer for $38 at pcdirect.com which didn't work properly for ATAPI compatibility, even with th pin 45/47 jumper hack).

URLs for case, dimm, and burner are:

http://www.newegg.com/Product/Product.aspx?Item=N82E16811165041
http://www.newegg.com/Product/Product.aspx?Item=N82E16820161675
http://www.newegg.com/Product/Product.aspx?Item=N82E16827151135

The case comes with adapters for small notebook disk drives. I'll be using a toshiba 120GB MK1246GSX notebook SATA disk, which is also on special.

http://www.newegg.com/Product/Product.aspx?Item=N82E16822149068

I have 2 systems running with the previous Lil' Valley 1 board w SXDE 1/08 b79 and swapped out the 40mm cpu fan with newer, quieter mini-Kaze 40mm fans. They each have 94+% efficiency DC power supply systems (like the one that comes with the iStar case). They run at 25 - 32 Watts on average. I'm hoping to shave a few more watts off the power envelope, get quieter and run faster.

Happy system building this holiday (while supplies last!)

December 13, 2007 01:43 PM PST Permalink

20071102 Friday November 02, 2007

Rear brakes on my venerable truck

Thought I'd do a car blog to celebrate the near passing of my truck at the 200k mile mark. Here's a saga about my last brake job...

I took my venerable truck (1992 Toyota w/ 22RE engine) a couple months ago to the mechanics shop locally to do my rear brakes. Usually, I get my ASE certified buddy to work on my truck. But he had the week off so they let a newbie do the work.

I wanted the near 200K mile car to get new bearing seals along with the rear brakes, which were now shot due to all the grease that had oozed out from the seals which had failed like 5k miles ago. I left the truck overnight, and after a number of days without it due to mailordering the parts and scheduling the work with a machine shop to press the new bearings and seals into the axle tube, I was able to pick up my truck.

The first thing I noticed when I got home was that the rear hand brake was loose. I parked on a slight incline and it was too loose to hold the truck. I hate having to go back to the shop to get them to fix something that we know they screwed up on. So I tried to adjust the tension in the cable under the car but still it was no good. I then talked to a fellow tech guy I have lunch with often at work. He's a pro who does all his own work at home. He explained that the drums on the rear have automatic tensioners. If I keep pulling the brake lever up and down, it auto-tightens and sets the tension. Just give it time and usage, he told me.

I waited 3 more days and spent time yanking the hand brake lever 20 times extra at every chance to park. It didn't tighten. It only loosened. I finally got fed up and jacked up the car myself and pulled the wheel and drum cover off. I disassembled the brake and nearly took my knuckles with it trying to free the main tension spring holding the shoes together. It was a lot harder than I recall when I did my first rear brake job on this truck almost 10 years ago. Either I was a lot weaker in the arms or something was different.

There was a star-cam screw that is about 5 inches long and sits in the saddle between the two shoes. On the outside, the tension spring holds the shoes together. On the inside, between the shoes, this screws acts like a yoke with a star cog that turns to adjust the yoke width and therefore spreads the shoes so they just press up, but not quite to the inside of the drum. After looking at the rotation of the screw (it was right hand thread on the driver side rear wheel), I realized that this couldn't be the correct yoke. For it to auto-tighten, this would have to be a left-hand thread.

I went over to the passenger side and disassembled that brake, and nearly broke my wrists trying to remove the tension spring. I finally got it off, and removed the star-screw-yoke and as predicted, it was left-hand-threaded. So I swapped the yokes, AND also, after looking at the position of the spring hooks, I swapped those as well.

Re-assembly was now MUCH easier. The springs went right back on with much better alignment and less tension. And I hopped into the driver's seat and with just a half-dozen pulls, the rear brake tightened up auto-magically.

I called the shop and told them about this to report their errors. I also emailed corporate offices for this chain with feedback. I got a canned thank you.

Lesson learned. Emersonian self-reliance wins out again. November 02, 2007 11:52 AM PDT Permalink

20071024 Wednesday October 24, 2007

Tried version 0.6 of the ath wifi driver?

I was playing around with installing Nevada b75a last night on my Toshiba Satellite M115-S1064. Yepp, that's the $449 Fry's laptop I got sometime around last Christmas which I mentioned has funky wireless last week in my blog about the lower cost wifi cards.

Most everything works on this laptop, and at 6lbs and wide screen, it's not the lightest, but it one of the cheapest and gets the job done. A problem since the summit that had been bugging me was to check for the latest and greatest atheros wifi drivers. I was checking the MadWifi website recently and swore I saw a table that said the new PCIe Atheros 5006 wifi chip was now working fine on Linux. I was wondering if that update had trickled in during the last few months in a beta driver on the OpenSolaris.org site. I was still running an older b70b Nevada on the M115 so I last night, I finally got around to kicking off a fresh install which completed, but struck out on the wifi. But I recalled something one of the Beijing engineers said in an email recently, which mentioned that the OpenSolaris site gets driver updates much more frequently than Nevada or Solaris 10. So I went and checked. And since the end of August, almost 2 months ago, the Sun China Wifi team contributed ath v0.6. And after uninstalling (pkgrm SUNWatheros) on my b75a, I pkgadd'ed the new SUNWatheros v0.6 and magically, the new chip is recognized, plumbs, and hooks up with WEP onto my home 802.11 network. Thanks guys/gals!

So those drivers in the formal distros might be bundled months after the actual beta driver has been posted and downloadable from OpenSolaris.ORG. I'm not sure how Project Indiana will merge the conflicts between beta drivers that give early access, and the formal distros that meet higher quality standards. And to make things worse, if you run "strings ath | grep -i ver" on the atheros driver binary, the formal one that ships with Nevada b75a said version 1.3. But if you run the same command on the OpenSolaris contributed and unbundled driver, you get version 0.6.

But I'm certain there's quite a lot of overlap in the QA/Testing suites for drivers that get contributed to OpenSolaris versus the ones that get bundled into Nevada and later S10. But clearly, even the contributed beta drivers seem to have been tested with many of the same suites that the official versions go through. So it's worth a try to keep checking.

But kudos again the Sun China wifi driver team. Wow! It's working beautifully. I'm hooked in now and writing this blog from that laptop using my home wifi net complete with WEP key support.

Also the Toshiba M115-S1064 had issues with strange noises coming from the HD audio codec. I'm not sure, but maybe they this was due to some host signal processing or "soft codec" being used with the ATI SB450 chipset. It does have a compliant Intel HD Audio "azalea" controller. I tried hacking around the opensolaris audiohd source, but only made the noise worse and louder when playing anything.

But Open Sound System (OSS) came to the rescue again. I'll mention it again that OSS is from 4front Technologies (www.opensound.com) and they've been doing cross Platform audio on UNIX for years. In fact, Dev Mazumdar, the head of OSS attended the Open Solaris summit in Santa Cruz. And he was in Menlo Park yesteday at Sun. I thought he lived in SoCal. Maybe he's finding shelter from the brutal fires and smoke down there. (Hope folks are breathing okay down there - this is always a bad time of year down in SoCal when the Santa Ana winds kick up and the dry summer has turned all the spring growth into kindling).

But I digress. The OSS download for Solaris is free and just requires renewal every 6 months. And it plays nice audio as well for this laptop where the shipping audiohd driver doesn't play properly.

October 24, 2007 09:27 AM PDT Permalink