Wednesday Apr 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!

Friday Sep 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.

Monday Jun 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.

Wednesday Apr 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.

Thursday Dec 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.

Thursday Dec 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!)

Wednesday Oct 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.

Saturday Oct 13, 2007

pre-OpenSolaris-Summit Santa Cruz Wharf Fishing

Got up early this Saturday morning to head south to attend the OpenSolaris Summit. It's being hosted at the UC Santa Cruz campus during this weekend which is a change over traditional schedules and venues that would eat into normal office time during the work week. Plus, it's a chance for Sun and a number of prominent OpenSolaris community members to talk about a the future of OpenSolaris.

The UCSC campus isn't very far from the Santa Cruz Wharf. One of my proposed sessions was to do some fishing. And this would be open to all participants since there is no license needed on public saltwater piers in California. My target was to get there around 6:30am and then move out along the pier towards the end to wet a line or two until about 8:30am when we'd need to head over to the campus to start the conference.

And from the picture above, it wasn't all skunk. We did catch a large variety of fish - Jack smelt, kingfish, staghorn sculpin, and shiner perch. I'm seriously thinking, as I sit in the conference about more fishing later this evening.

Topics Discussed Today

The Summit will cover today a State of the Nation for OpenSolaris and specifically, the Project called 'Indiana.' This is a proposal to produce a branded Solaris version that is based on Nevada but completely open source and has improved packaging, install, and support for more types of x86/x64 systems.

So far, there hasn't been any all out fighting one might expect in Open Source debate. On the contrary, we've covered a lot of packaging and installation concepts. Some are borrowed from ideas and concepts used in Linux already or other open source. The primary goals are to make packaging more intuitive, higher performance, and easier to use.

I can't say I disagree with any of the ideas. I'm sure they have value. But I also can't help but think that there are major issues with the missing application that clearly hinder adoption more (or lack thereof of those apps hinders adoption). But install/update and packaging are, in general, a lower priority for me. I don't believe that people are constantly updating their OS, especially in Solaris. My impression is that people update OS as security requires and as their IT shops require them to do so. Otherwise, they run oblivious to updates.

And from working with software vendors, many decide on an OS version and stick with it and support it. For us to focus too much on install/update isn't the most optimal use of resources, IMO. But I might be swayed otherwise if a valid argument is made.

I guess I'll learn more as the afternoon goes on.

Lower cost wifi solutions for Solaris x86

Airlink 101 - AWLC 4130 and AWLC3026

I picked up a few cheapy Airlink 101 AWLC 4130 cards recently at Fry's on sale. Cardbus cards for laptops with a PCMCIA slot. They were only $14 each, limit 2 per person. Unfortunately a 1 day sale only.

But these were plug and play with Solaris Nevada. The AWLC4130 is advertised as a "Super G" with Atheros chipset. And indeed, when we plug it in, the PCI DevID confirms it's a AR 5212/5213 series chipset, which has been supported by the Solaris 'ath' driver for quite a while.

I also decided to look in my spare parts bin and pull out some older AWLC3026 pc cards. These are regular 802.11G. Back about a year ago, I picked them up for $9 ea at Fry's as well. But there was no driver for the Marvell/Libertas chipset. But on a whim, I decided to check the OpenSolaris.ORG website and found the 'malo' driver.

It's currently provided as a source distribution only, but it compiled just great, and after just a couple of issues with rebooting correctly a couple of times, I was able to get the driver to load and function quite well and fairly stably.

Most laptops do come with WiFi today, but the chipset may not have any drivers yet, or use an NDIS wrapper type driver that isn't stable. I'm using the AWLC4130 now on my el cheapo Toshiba M115 laptop with still unsupported Atheros 5006 mini-pcie WiFi. Not a bad deal for just $14, or even better, $9 for the regular G version AWLC3026.

I know Airlink 101 makes quite a few regular PCI adapters that turn workstations into wifi workstations. I'm waiting for a sale now to get a few to find out their chipset as well. I've been searching for some low cost cards to refurbish cheap PCs to give away to needy families with kids attending my elementary school who don't have broadband today but would want to leverage free city wide wireless that is now available in our neighbourhood.

Friday Jan 05, 2007

Giving USB the boot - install

A sale on 4 GB USB jumpdrives ended yesterday at Fry's. It wasn't a huge savings, but for $49, there was a USB flash drive from PQI that seemed fairly decent and I bought one. I wasn't sure what I was going to do with it, but I was thinking along the lines of using it to burn Solaris Nevada b55 onto so I could carry it with me always and install other systems that support boot from USB. It's big enough afterall.

There's been lots of news from India about the Belenix folks on the Solaris-runnable Flash archive on the 1GB stick. It's very cool and the person -Anil Gulecha- who did the runnable flash stick image has been getting lots of praise. I thought I'd join in, since I leveraged a lot of things he was doing in his usbdump.sh to create a bootable Solaris Nevada b55 image onto that USB drive (on sale!).

Overview of Steps

Basically, the process is fairly straightforward, except the commands aren't always known or easy to remember.

    1. Format the USB drive and create a UFS filesystem on it.
    2. Copy over the files verbatim from the install DVD
    3. Install GRUB to make it bootable
    4. Boot a System to Install with the USB drive

As I discovered, the contents of the install DVD aren't quite amenable to a straightforward installation. There are definite dependencies for example, the path where the DVD install scripts expect the media to be (i.e. /cdrom). And this doesn't make life easy unless you know the workarounds. But as I discovered, the USB drive installation is about 30% faster than standard DVD install when it all works, and it's a lot quieter than a spinning optical drive. It also works when the system doesn't support PXEboot net-install, or the driver for the network isn't by default in the x86.miniroot for the installation OS. The flash drive, being a disk, makes it easy to include additional software like driver source files, the Studio 11 compiler packages, and optional freeware.

Formatting a USB flash drive for Solaris

This was shamelessly reverse engineered from Anil's usbdump.sh script and it seems to work pretty well. For those that don't want to extract out the relevant shell script lines to make their own script, basically, this is what I did to format my jump drive.

    1. stop volfs on your current Solaris 10 or Nevada box by typing the command: # svcadm disable volfs
    2. plug the USB flash drive in, wait several seconds
    3. run the command # rmformat -l to lists the removable media devices and find the Connected device which says something to the order of a Generic USB flash disk, and note the line which says: Logical Node: /dev/rdsk/c3t0d0p0 or something like that. I'll call the /dev/rdsk/c3t0d0s0 the [usbnode] going forward. You'll need to know yours later.
    4. # fdisk -B [usbnode] (where [usbnode] is from previous step)
    5. # fdisk -W - [usbnode] (need the extra hyphen for stdout - note the output
    6. Now, look at output from previous step and find max MB (MAXSIZE) of usable storage. You do this by multiplying bytes/sector (usually 512 at the top) with num sectors at the bottom of output (in my case, a 4 GB drive had roughly 7.9Million sections or so) divide by (1024\*1024) to yield MB (should be 3900 MB or so for a 4GB flash stick.
    7. setup your partition table file (a text file I'll call slices.txt, just plain white space between words and letters where it appears (remove dashed lines - eval {$MAXSIZE - x} expressions and replace with number with no brackets (e.g. 3897MB)

      slices: 0 = 2MB, {$MAXSIZE-3}MB, "wm", "root" :
               1 = 0, 1MB, "wu", "boot" :
               2 = 0, {$MAXSIZE - 1}MB, "wm", "backup"
      

    8. # rmformat -s ./path/to/slices.txt [usbnode]
    9. now run: # devfsadm; devfsadm -C
    10. Create a UFS on the flash drive by runing: # newfs /dev/rdsk/[usbslice] (slice means replace p0 with s0 in the [usbnode] path)
    11. wait for a minute to write, and now it's done.
    12. You can restart the volfs by running # svcadm enable volfs but you may want to hold if you plan to proceed to the next step immediately.

Loading the Install Media onto Flash drive

For the time it takes to burn a DVD with the Solaris install media, it's almost possible to copy the files onto disk using Solaris' loopback mount filesystem capability. The utility is lofiadm(1M) and is really useful for mounting ISO images already present on the filesystem and saves the hassle of burning media only to insert the finished DVD and remount it. Steps are the following to mount the Solaris install media ISO and copy them to the flash:

    1. # lofiadm -a /absolute/path/to/solarisdvd.iso (this should create a node /dev/lofi/1 which is reported on the command line)
    2. created a directory, e.g. # mkdir /mnt/solmedia and then run # mount -F hsfs -o ro /dev/lofi/1 /mnt/solmedia (you can change directories into /mnt/solmedia and check to see that the media is indeed there.
    3. disable the volfs again by running svcadm disable volfs if you re-enabled it after the prior task of formatting the flash drive.
    4. Insert the USB flash drive then wait a second and run the rmformat -l to list the logical node. You might want to create a directory mount point (e.g. # mkdir /mnt/usbdrive) and then run:
      # mount -o nologging,noatime [usbslice] /mnt/usbdrive
      Remember that the [usbslice] is the same as the logical [usbnode] but we created slice0 on that flash drive so we swat the p0 with s0 (e.g. /dev/dsk/c3t0d0p0 -> /dev/dsk/c3t0d0s0).
    5. now simply change directories to /mnt/solmedia and copy everything over. I've used the command # cd /mnt/solmedia; cp -rP@ .??\* \* /mnt/usbdrive. And once complete, should put all the media onto the USB drive.

Note that with some flash drives, including this PQI, I had data errors. At least if the error occurs, Solaris will usually tell me and then I note the error in the package and try to re-copy it later. What's more insidious is if the drive doesn't report errors initially but then encounters a few errors during the install and fails to install, say some of the Xorg components or fails to run the post-install on the fonts and then your windowing won't be able to come up. More details below.

Booting and Installing with the flash drive

On one IBM/Lenovo laptop we tried, we inserted the jump drive and the system BIOS knew to boot from the USB drive immediately. On an Acer Ferrari 3400, I like others who've reported the same thing, had to go into BIOS and set the boot order to be from a Hard Disk. Not a USB zip, USB floppy, or other USB drive. And on a PCChips V21G system, I pressed F11 to get into the boot menu and then found the Generic USB boot drive under the +Harddisk boot sub-menu.

Once booted, it looks just like the DVD/CDROM install. Only, the install scripts for this media all are expecting the installation content to be mounted under /cdrom. And so the boot will proceed partially, and then exit to a #sh prompt when it can't proceed with the installation. The solution I found was to mount the flash filesystem under /cdrom. But finding the logical [usbslice] to mount is a bit tougher. The rmformat utility isn't in the installers x86.miniroot so that utility isn't available. The next best thing is to look in /dev/usb/ and do a full listing (ls -l mass-storage\*) and observe the path. You should see one or more entries that should point to the physical path in the /devices/ tree. Note the exact path, which can be tedious, but if we back out directories to ../dsk/ and then do a full listing, we should see a similar slice. We want to mount the path for slice0. This usually ends up being /dev/dsk/c1t0d0s0, /dev/dsk/c0t0d0s0 or /dev/dsk/c2t0d0s0. If you aren't sure, just give those 3 entries a try using this command as an example: # mount -o ro /dev/dsk/c1t0d0s0 /cdrom.

To continue with the install, I think folks are recommending /sbin/install-solaris. But since we haven't gotten to the initial questions about hostname, networking, locale, etc., I've been using the /sbin/install-begin script. I hope someone reading this in the install group knows how to kicks this off again, and corrects me if this isn't the preferred way.

Notes

I was able to install on a couple of systems, and they booted, but Xorg failed to come up and I think it had something to do with corruption on a couple of font packages and Xorg drivers. Also, on a triple boot laptop, I was also having some issues getting the installer to go into Upgrade mode. It couldn't see the slice for Solaris, but it worked fine for a double-boot and . There's still bugs I guess, and some may be related to data corruption on these flash drives, which seem buggy. But it's not a bad start to get things to boot and come up. So that's progress. The next step is to look at adding some support into the script for install_media=[a local filesystem path] if someone hasn't done it already, and also to see if I can use a USB portable hard drive to see if this eliminates the data corruption errors.

In addition, the current Solaris install is fragile because it hard codes support (and therefore limits it) to /cdrom and nfs mount paths currently. I guess with access to the x86.miniroot for the installer, anyone might potentially add some support for USB drive mounting and installation off of that media with the right amount of clever scripting. That's probably a project requiring a whole weekend though, unless somebody's already done it.

Gotta run and pickup my new 2007 California fishing license and go fishing. Probably not something to hack this weekend.

Wednesday Dec 06, 2006

Swapping drives between Solaris machines

AMD Geode NX and motherboard combo deals

In the constant search for more low-power, home system deals, another processor I've had good success with is the AMD Geode NX. The Geode is a line of x86-compatible 32-bit processors AMD offers for various embedded applications, usually in extremely low-power, space-constrained applications. I'm not sure what the roots are of the Geode line, but at the higher end of the spectrum is the Geode NX and from what folks are saying on the web, it looks like these have roots from the Athlon XP line and might actually be the cream-of-the-crop CPUs that are down-clocked and can run stably at 1.2V (rather than the usual 1.6V) so as to reduce power. I've only seen Geode NX 1750 1.4 GHz cpus sold on combos with motherboards retail but AMD advertises multiple speed versions of the Geode NX, probably for volume OEMs.

About two months ago, there was a sale at Newegg.com on a particular Geode NX/Motherboard combo. The price on the combo was $69.99. This deal was for a PCChips M863G(v7.0) micro-ATX socket-A board with SiS 741GX/964L chipset and integrated graphics, AC'97 audio and SiS900 fast ethernet. The combo included a factory mounted, Geode NX 1750 idling which supposedly idles at 14 Watts going up to 20 Watts. The combo included a generous heat sink and super loud 70x15mm fan that ate 7.3Watts by itself! (Fan and H/S replaced with much quieter CoolerMaster unit running at 7V and 2200 rpm). Rev 7.0 of this board does support a 1.2V core cpu voltage setting that lets the Geode NX achieve its low power status. Newegg seems to be sold out of this combo, but they get more once in a while. (Picture courtesy of Newegg.com).


Fig. 1. PCChips M863G board with bundled AMD Geode NX 1750 CPU from Newegg.COM
 

Directron.com is also sold-out on a similar combo with a Biostar M7VIG 400 board with all-in-one VIA KM266 Pro chipset. The Biostar board should have been the better board and I actually bought this board first, paying a few bucks more because I knew the chipset better and thought it was well supported. But after buying it, I wasn't fully happy because the board revision and BIOS didn't support the Geode NX's low-voltage mode. So while the cpu could run cooler and with the same clock rate, 1.4V was the lowest voltage it could drop to, so basically, I was sort of running the equivalent of an Athlon XP at 30 - 35 Watts, when the cpu should be able to operate at 14 - 20 Watts. I also had some issues with Xorg on the Unichrome graphics which I was able to work around, but it wasn't a clean install. The Xorg workaround will be explained a little further down.

So with the Biostar-VIA board not being as low-power as I thought, and Newegg having the similar combo with SiS chipset, I didn't hesistate; I bought one. As luck would have it, not 10 days after I received the first board, Newegg had the $10 rebate offer that would save more on the same item, so I had to take advantage of that deal too and get a second combo to score on the rebate. I did this pretty much not having checked if the SiS graphics, network and audio would work - the deal was just too good to pass up.

Sad days; Retirement of two old friends coming soon.

The goal of buying those Geode NX combos was to begin the process of retiring a pair of 8 year old boxes that have served me well over the years. These were proprietary BookPCs I bought back in 1998 with a tiny Super Socket 7 mobo, special 95 Watt power supply, and were short depth. These had the VIA Apollo MVP3 chipset with ECC SDRAM support and I maxed each one out with 512 MB of branded ECC memory and AMD K6-2 450 MHz. These were tough boxes and the weight alone on these small but heavy units was definitely old school manufacturing. They had Davicom 9102 NICs and I only put a disk drive into each, removing optical drive and FDD after the installation for reduced cabling and improved airflow. I've upgraded these boxes over the years. First 6.4GB IDE drives in both, then 40 GB Ultra quiet drives. Today, one runs Linux kernel 2.4 still and the other runs Solaris Nevada. Both have run so long that the power supply and CPU fans have clogged up from dust and seized up and the power supplies (which are very hard to find) have blown. I spent a couple of days back in 2001 relearning basic circuit analysis again and researching power supplies. After a couple of trips to Halted Supply Co. (HSC) near Lawrence Expressway and Central in Santa Clara, I finally got a bag of high frequency switching capacitors in various sizes at about $0.35/each. So for about $1.50 per power supply plus $7 for a new fan, I had some quiet and good-as-new power supplies and was back up. Since 2001, I take the servers down at least every 100 days or more often during Spring and Summer to dust off the systems, replace fans that are noisy, etc. I still have a spare set of capacitors out there for one more repair.

It's amazing how much dust can accumulate inside a server box when you run it at home. With humans shedding skin flakes, pollen and dust from outside in the garden, those servers were actually like air filters for the house. After cleaning, I was shocked at how warm the side of the case was; and then it hit me that the dust build up had been preventing heat from radiating out the sides of the case too, and that sent more heat out the back through the power supply. So almost every 2 to 3 months, the servers get taken down on a Saturday evening, at 1 am or so, and the cases are cracked open and the units go outside to the patio where I try to stay barefoot and grounded and then blow on the boards with some type of compressed air. Some stubborn soot gets caught between pins or in nooks and crannies like on the cpu heat sink and I use a soft tooth brush with Swiffer dust cloths to clean and wipe. The units go back inside and get tested to see if cpu, case and P/S fans are noisy or wobbling after service. I stock 50mm, 60mm and 80mm fans in 10mm and 15mm thickness (and other size fans too) for this purpose. They get swapped if noisy and I usually switch pin order to bias the fans at 7V versus 12V so as to reduce noise. Not all fans and motherboards support this, so you need to make sure the ones you get aren't smoking or failing to start doing this. Then the systems get closed up and put back into service.

It'll be sad retiring these old friends, since they handle email, web, Java servlets and JSPs, firewalling and database for close to 10 domains and do it without any real performance issues so far. But each consumes about 44 Watts in power when I have other servers that are 1.5 times faster at 19 Watts, which could tremendously improve battery life on the two 1500VA UPS units I own and allow me to consolidate all the switches and routers onto a shared UPS rather than adding separate smaller UPS units for those. With newer, even faster chips using about the same or less power, I may even be able to use just one box for all services and consolidate completely and really saving money, power, the environment, and all that good stuff.

Installation Dilemma - Slim Drive or No Drive?

Ever since Sun produced the Netra X1 line of products, I've loved the low 1U, shallow 13 inch depth case. Those boxes sort of epitomize the whole idea what a small, cool looking, but industrial server should look like. I wished someone made an affordable case in a similar form factor that was a bit quieter, and equally attractive. About the closest thing I can find today is a SuperMicro SC513 or SC512 1U chassis. But at close to $180 for the case, it's not cheap. And to add cost, it requires expensive slim optical and floppy drives. It's certainly too rich for my tastes and I've never investigated the acoustics. Those old Netra's though were pretty quiet, if I recall.

A compromise of sorts is to go with a BookPC form factor chassis. The first gen of these cases were like the ones I described above; they came with small proprietary boards and power supplies and actually were the size of a large telephone book. The whole barebones kits could be gotten for under $100 + shipping. A good feature was they did take standard-sized optical and floppy drives, usually over the motherboard, but it got cramped inside pretty fast. Back in the late 1990's, not all DIMMs were low-profile. Some were 1.4 inches tall and too tall to allow sufficient clearance between drive bracket above and cabling that went over the DIMMs situated underneath or partially below the drive bays. Subsequent revisions of BookPC cases have gotten longer and deeper so the board is entirely clear of the drive bays. Prices have also gotten longer and deeper and they start around $60 and go up to $100 or $200 for some sleek all-aluminum cases. (If I'm gonna pay $200 for an all-aluminum case, it better protect the board from EMP from the next nuclear detonation in my neighbourhood! LOL!)

And the peeve I've had with cheaper BookPC cases are they're really noisy due to all the cheap small fans because the makers know that there will be folks out there who think they can save a few bucks and get a small case for that Quad Core/Quad GPU gaming system. So, yes, that's why they have a bunch of fans and they're noisy. And that's why I focus on finding low-power processors and motherboards to reduce volumetric heat generation on these small boxes. (Note: Before video games, kid brothers would watch their 2nd grade sisters use a Hasbro Easy Bake Oven with the 100 Watt light bulb heat source - it bakes -real- cookies. Understanding the heat generated by a little box might be something to bring back into 2nd grade education so big boys don't grow up and try to shove a 200Watt heat source into a small case. Note2: We could educate the manufacturers too... only, most aren't socialized in America with Easy Bake Ovens - they're just putting in noisy fans to cover themselves and their distributors against too many RMAs on melted chasses).

For all my complaining, the compact BookPC size and shape does appeal to my sense of aesthetics, and with some re-wiring and soldering skills, I can usually lower the voltage on case and power supply fans to make them slower and quieter, yet still sufficent to cool a lower-power system. And that's what I did to a couple Enlight 7396AM1 low-pro cases. These have a high quality, sound insulated chassis, front USB, comes with a fairly quiet power supply and Directron.com has them on clearance for $19.99 with $13.99 shipping, which gets cheaper if you buy more than one case. (See figure below - courtesy of Directron.COM):


Fig. 2. Enlight 7396AM1 micro-ATX case for $19.99 + S/H at Directron.COM
 

I bought two of these last month, and then realized that the drive bays take a normal floppy, but -slim- CD/DVD drive. I was sort of in a dilemma. I didn't want to shell out $75 each for 2 slim DVD burners when I had perfectly good regular NEC 3550As in stock. It would sort of defeat the whole idea of buying these cases for $19.99 + shipping. Then I asked myself the question if I really needed an optical drive or even floppy on the box, since the reason for these systems were to replace those two 8-year old AMD K6-2 450 MHz bookpc servers. Neither have any optical or floppy drives in them; they were removed after OS installation, leaving just the hard drive.

Chicken or Egg Solaris Install? How about transplants?

So I don't have slim optical drives to do the Solaris install using the small Enlight cases. In addition, the PCChips M863G with SiS chipset boards support Novell IPX Netware Boot but not PXE, so a DHCP boot of the system isn't going to be easy to implement. And even if the board supported PXE boot, the default Solaris install doesn't have the SiS900 network driver. I guess if we had PXE, I could disassemble the x86miniroot in Jumpstart to add Murayama's sfe driver (Howto provided in a previous Blog) and that would give us an active network interface to complete the Jumpstart install. But the boards don't have PXE, only IPX Netware boot so thinking about PXE boot without a PXE boot capable NIC would be moot. I checked my inventory of Intel and 3COM ethernet cards and none had the optional PXE boot ROM. And the only one with the PXE boot option ROM I have in stock is a PCI-e Intel e1000g. Great. More shopping, but that would take a bit of time and I wanted to install the systems, there and then.

So the best solution I initially thought of was to temporarily attach a standard DVD-ROM drive and have it perched outside the propped-open case and do the install once on each disk. That'd expose the system for just an hour or two and we could then close them up. But that's still an hour or 2 or more. Plus the whole hokey setup with cable/ribbon hanging out and a bare drive setting there spinning loudly for 2 hours while I'm trying to watch a remake of Van Helsing with Hugh Jackman, isn't what I had in mind. And looking over my desk, I had a bunch of IDE Seagate Barracuda IV ST380021A drives, in clear plastic clam shells, just sitting there, recently swapped out of a couple of test boxes with Solaris Nevada b52, which got newer SATA drives.

A conversation with a colleague earlier in the Spring of this year came to mind. We were all sitting outside the Sun Santa Clara Auditorium after a Silicon Valley Open Solaris Users Group (SVOSUG) meeting and a bunch of folks were going over to Denny's or IHOP for a late bite. Dan Price had just given an S10 Next Gen Overview and he covered a lot of things. And our SATA team had given a talk on the new SATA framework. And one of my colleagues who works on x86 boot and ACPI was there. I think we were waiting for a couple of guys still inside and probably cleaning up, and I asked my colleague about why if I switch disks from one box to another, I can't get Solaris to boot, except for Safeboot.

My colleague gave me that funny look, like, "Why would anyone wanna do that?" I explained that from a customer support perspective, it'd be cool to flash a Solaris image to disk, then ship it and let it boot up and do self-config. He countered that, no, this isn't a big feature demand for Solaris and asked rhetorically how many folks would ever use that feature anyway? Well, I wasn't sure. But on Linux, I do this all the time - preflash a disk and when I need to do a quick build, I slap the drive in there, Kudzu kicks in, and voila... system is configured in a couple of minutes. Solaris gets stuck in reboot-hell if we try this. So after some debate, which went nowhere, I brought up the Jerry Seinfeld episode that got me to start watching that sitcom. And this was the first episode I ever chanced upon where Seinfeld has his little comedy clips at the open and close of each episode. He's standing there talking about the black box.

"Ya know, when a plane crashes... the only thing that survives is the BLACK BOX... Ever wonder why they don't just make the WHOLE plane.... out of THE black box???" (laughter).

In all seriousness, we know that Solaris safeboot has the hooks to rebuild the boot-archive and device trees, and the installer figures out the devices and puts a permanent map of that onto the filesystem somewhere. So why can't we put those same hooks into the regular Solaris boot or multi-boot? That's what I asked my colleague.

He gave me that, 'James, you're naive and uninformed about Solaris x86 boot'-look and just told me that it's not a widely used feature, and that's not what multi-boot does, and started down the path of how the GRUB works with multi-boot and the whole secondary boot blah, blah, blah, blah. Which I took as obfuscating the issue with detailed specs that don't matter to end users. Anyways, to make a long story short, I was miffed and decided against Denny's, and went home to eat cold supper made by my wife, who's always been a lot warmer and at least seems more understanding.

Fast forward 9 or 10 months and here, I have two perfectly good disks, almost new, and pre-installed. I searched the web and managed to find a few Sun FAQ/Developer discussion board topics. It was clear that at least a couple other folks wanted to do the exact thing and actually had the gumption to ask us how. One guy got pretty far in the boot but still didn't get it going. Our standard answer was to boot the kernel in debug mode and look at the output. That's fine if you're a Sun Engineer and know how to look at the messages and hex scrolling off the console. But to for most folks, it's nonsense and just shows a lack of empathy on our part.

But within the various tips, I put together the various tips and gave it a try; magically, 5 minutes later, it was all working on the new SiS chipset motherboard. Here are my steps:

  1. Boot into Solaris Safeboot mode. You can get access at the Grub menu, usually the 2nd option.
  2. Mount the found Solaris partition on /a Safeboot will usually find the slice on the disk with Solaris and ask if you want it to mount on /a. Select Yes.
  3. Move /a/dev, /a/devices, and /a/etc/path_to_inst to another name (I just append .orig) and then create new directories, (mkdir) /a/dev and /a/devices, and touch /a/etc/path_to_inst.
  4. Run "devfsadm -r /a" to rebuild the device tree
  5. Edit /a/boot/solaris/bootenv.rc and modify the line with "setprop bootpath '/pci@0,0....' to match the path you'll find mounted for /a (i.e. run a 'df -k' command, and you should see /a mounted from /dev/dsk/c1d0s0 or something, then run 'ls -l /dev/dsk/c1d0s0' or whatever your device listed was, and you should see the actual link point to ../../devices/pci@0,0/...) The path to bootpath you want should be the hard disk which is mounted as /a and you just need to find the expanded /devices/pci@0,0/... path and put that in the bootenv.rc file on the Solaris root filesystem on the hard disk (sans the /devices/ prefix of course).
  6. Now run "bootadm update-archive -v -R /a" to rebuild the boot-archive on /a
  7. run a 'touch /a/reconfigure'
  8. Run "cd /; sync; sync; sync; umount /a"
  9. and finally reboot.

There may still be issues if you have changed the IDE priority (master/slave) of the hard drive or moved it to a different SATA socket. In these cases, you probably will successfully boot but run into problems with mounting filesystems not found, in which case, boot into safeboot again, and edit /a/etc/vfstab to correct.

Once the system boots, it does retain its legacy settings for network and naming service which may be totally bogus, in which case, I check for any missing drivers (like an SiS900 Fast Ethernet module) and either transfer the source/binaries for the modules via CD/DVD media or USB which usually will work. I'll then delete any /etc/hostname.[NIC#] files and run a sys-unconfig on the system, and reboot again.

Yes, not the most elegant of solutions, but it could be scripted and one of my colleagues down the hallway thought we could do our customers right but putting that script into the safeboot and documenting that we put it there. For now, I hope the instructions help others who might be in the same boat. It takes about 5 - 10 minutes to swap the drive and reboot and reconfigure the system if you know what you're doing. That's a lot better than an hour or two re-installing or upgrading and it also means I can keep pre-flashed drives just sitting around to save time on installs and testing.

BTW, Solaris b52 runs well on the PCChips M863G motherboard with AMD Geode NX 1750. The SiS 741GX/964L chipset functions normally, and Xorg even finds and configures the SiS onboard graphics with no work required. The graphics support on the SiS chipset, while supported in Solaris, is really grainy. And the graininess is particularly worse on one of the systems than on the other. I guess I could stick an AGP card into in the slot (and I did try an older ATI Radeon unit and it looked beautiful), but it eats more wattage with the optional graphics card. And since my plan is to mainly run these headless, I really shouldn't care. But this isn't the first time I've had graininess issues with Integrated graphics, especially on these small form factor boards. I suspect it has something to do with the number of layers in the board (usually cheap boards use fewer layers) and the integrity of the analog/vga signal that goes through the motherboard where there may be a lot of RF interference to get to the back I/O plate. I've used the same graphics chip and software driver on different boards and sometimes the image is crystal clear. And of course, with an optional AGP card in the slot, the board is raised and separate from the board and less likely to have interference due to wires too close in proximity. I get similar graininess with the VIA mini-ITX systems, but it's not as bad as on the SIS chipset on this particular board, plus an older celeron system I used to have with an SiS chipset and SiS Mirage graphics looked great, so it isn't the chipset.

The goal is to run them as network servers, so I plan to disable the graphical login and run only in text mode anyway. Next, I compiled and installed the sfe-2.2.0 gldv3-nemo driver from Masayuki Murayama's Free Solaris NIC collection and it just works. Honto ni, arigatou gozaimasu, Murayama-sama! (someone send this guy a case of Sapporo Nama Biru and Pizza Hut vouchers or a free Shinkansen Ticket to Sapporo where he can pig out at the beer factory at the "Ghengis Khan" Mongolian BBQ Tabe/Nomihoudai [all-you-can-eat and drink] !)

Note about Xorg on older Unichrome (not Pro) Graphics

I mentioned above I had an issue with graphics installing Solaris on the VIA Unichrome graphics. This was on the Biostar M7VIG 400 board. Back in Nevada b30-something timeframe, more than a year ago, I was having some graphics issues on my EPIA mini-ITX boxes which only impacted the graphical installer, and the VGA text modes. But Xorg, itself, worked fine. Only, if you selected Text Console as the login option, you'd get a dark and illegible screen or sometimes a pastel screen. But the version of Xorg did work and very stably if you always used the graphics. We had a few talks with some of the VIA folks who tried to reproduce this on newer mini-ITX boards and they didn't see the same problem. The funny thing was we knew this was partly a problem with the Solaris driver and partly in hardware rev, because in going from an older rev of a PCChips M789CG v2 to a newer rev, v3, both with VIA Unichrome graphics, suddenly the problems went away in the same build of Solaris and all the modes: the VGA text, console login and X graphics worked fine - no driver changes. A friend mentioned also that a 1.3 MHz Nehemiah on CN400 chipset with Unichrome worked fine, but I saw weird pastels or garbelled text consoles on my older EPIA ME6000, M10000, and EPIA 800 systems.

Some time around the build 48 time frame, I was going through and upgrading a bunch of my systems when suddenly, all of my VIA Unichrome systems would power-up in blanked out graphics mode (i.e. there was no VGA signal coming from the graphics port and the monitor would blank with a yellow blinking standby-mode light). The behaviour was very peculiar. And nothing was showing up in the logs. I tried to log in, and yes, it was as if X was thinking that it was running because I could see the disk spinning as if I succeeded in logging in, and ssh'ing from another machine showed that I had active Shell processes on the console, even though the console was blanked (like someone turned off graphics or blanked the screen in low-power mode or something like that).

Back in the old XFree86-to-Xorg transition days of Linux, I used to run a bunch of Biostar M6VLR boxes with the old Trident Cyberblade graphics embedded as part of the VIA PLE133T chipset. Fedora Core 1 and 2 had fits with the Trident Cyberblade. And even FC3 still had some issues. A more stable driver binary was available and the trick was to use it to replace the default driver module used by the Xserver. Using the same trick, I loaded a Solaris DVD from a previous build and found the ./Solaris_11/Product/SUNWxorg-graphics-ddx package and copied the ./archive/none.bz2archive to /tmp and unpacked it using:

        # bzcat none.bz2 | cpio -C 512 -idukm

This created /tmp/X11 and inside /tmp/X11/lib/modules/drivers/ was the via_drv.so file.

I copied the old VIA graphics driver in /usr/X11/lib/modules/drivers to via_drv.so.orig and then copied the one unpacked in /tmp/X11/lib over to /usr/X11/lib, clobbering the old version. Because the sizes differ slightly with each build of Solaris, I couldn't tell which was the same or different. So I methodically went back checking each build of Solaris until about build 42 or 43 before I found a version of via_drv.so that worked with the graphics and didn't blank the screen. But it did cause the Biostar board with Geode NX cpu to revert back to bad console text. So at least it seems that the Biostar boards were old versions of the VIA Unichrome hardware (reaffirming my disappointment with that first Geode NX/Biostar combo). But I had a work around to get X graphics working.

I know build 53 put back some big changes to graphics, and improves AGPgart. I don't know if it fixes other graphics issues; but it's worth a try. And b54 just got posted internally. Unfortunately, that Geode NX box is up near Vancouver, Canada right now and in a powered-off state with no LOM (lights-out management). I'll be up there for Christmas in a couple of weeks and then I'll give it a try, unless the weather warms up a bit to let me get out there and go fishing for some winter steelhead. I'm usually more worry free in winter while fishing. The black bears are hibernating and not likely to be up stalking me while fishing. I'll save that for another blog.

Monday Dec 04, 2006

Solaris x86 Desktop Hardware Shopping

I'm not sure if it's the Christmas holiday coming up soon, or if it's just coincidence, but the 3rd person this week emailed me this week asking for recommendations on a Solaris x86 box. Two were asking about low cost laptops for kids that will dual boot, and the other was for a home server. There's also been this interesting internal discussion on small form factor Solaris x86 boxes that's garnered a lot of enthusiasm and suggestions for small appliance systems.

I'm by no means the expert on hardware, especially the high end. I know you can buy that premium stuff online at the Sun shop which has a new look and feel. Surprisingly, I needed to do a double take when I just looked at this site, just now, because while I sometimes have a disdain for big-iron workstations, a dual core Opteron workstation starting at $995 from Sun has to be a printing error, right? It's missing an extra digit somewhere. No, it actually looks like a real price, and it looks like it comes with 1 yr hardware support too. That's pretty hard to believe coming from Sun. We're actually selling them cheap. I'll need to look further into the shop to see what other stuff we sell. But back to the really low-end do-it-urself boxes and shopping for Hardware.

I've been known to have a weakness for big sales (except ones requiring rebates), and I have a hoarding instinct for this computer stuff. Some folks refer to this as a disease. And yes, admittedly, I've got some variation of the illness. But I reassure myself that I'm not the worst. I do have lots of spare parts, but it's all well organized into bins and boxed and bagged properly in anti-static bags. And I tend not to carry anything expensive or power-hungry. For example, the fastest CPU I keep in stock is maybe an Athlon-64 3000+, and I only have one of these. And the biggest graphics card is maybe a 128MB AGP8x unit. The rest is slower, really cheap, but extremely usable and great for fixing computers and great for building Solaris boxes. I'm referring here to my home inventory; not my work, where we get to play sometimes with some bigger, enterprise type systems.

And my stockpile of stuff has come in handy on occasion, like when my nephew's budget "educational software" (i.e. gaming) system died recently due to a bad power supply that then led to a fried motherboard. I had both a compatible micro-ATX motherboard in stock, plus a newer, quiet power supply too and he was back up and running; Or when my Dad's box suffered back-to-back power outages during a recent late summer rain storm that shorted out the power supply, I had a surge protector and new special TFX12V power supply in stock, and still have another in stock just in case. Or if my psychic powers are right, I predict my Bro-in-law will have paging issues with a particular PC game that is memory hog and that extra stick of 512MB DDR333 will be the salvation he will be looking for... just mark my words. I've got it in stock and people will need it!

If you stockpile more than 5 boxed motherboards, or 5 new cases, or more than 5 separate power-supplies, then probably you fall into the class of electronics junky known as a "Hardware 'Ho". The etymology, I'm told, is not from anything related to the "Ho, Ho, Ho..." from a cheerful Santa at Christmas, but from the slang term for "Whore" implying, you'll pay anything to get close to computer hardware. I suffer similar issues with being a Fishing Tackle 'Ho, and I'm also a recovering Bicycle Gear 'Ho. But that said, there are ways to live with being a HW Ho and not break the bank. For example, one way is to focus your energies on low-cost, low-power stuff that works well with Solaris x86. That's how I channel the urge spend all available money on hardware on the biggest, baddest and most power-hungry systems into a contest of who can achieve the best price/power/performance. So, for example, instead of say, blowing $650 on a graphics card to get better frame rates on Quake 4, I simply evaluate 3 integrated graphics motherboards under $50 and experiment with which one has the best graphics performance for the dollar. Another part of my therapy is to go to Fry's for lunch (their small cafe inside the store has surprisingly decent sandwiches) and buy no hardware. The goal is to resist the urge to spend money frivolously while being tempted by a store full of stuff ready to buy. Becoming a discriminating shopper for Solaris-compatible stuff is a good way to curb that urge to waste money, and we'll go more in-depth below.

Step 1: Solaris End-User Requirements

As far as I know, Solaris isn't really an OS for gaming, at least not yet. It's possible to dual boot a Solaris box with Windows so that you can have an awesome PC gaming system, but get real work and do real Solaris development using the same box. But as a home-user, I use it for word processing, spread sheets, some digital photo stuff, email client, web browser client, playing and ripping audio, as a file/web/email server and firewall. I also VPN into work from home using IPSec and I burn a lot of CD and DVD iso images. I find these were most of the things I used to do with Linux, but less and less because on Solaris, the software now performs as well if not better than Linux, and has pretty solid stability even across kernel versions. I can tell that it won't be long before, at least in our household, Linux won't be active, although, I plan to always keep a current copy of a popular free distro around to play with.

More than just software and performance requirements, I also have environmental requirements. My living room and bedroom are places where these systems will stay. People coexist here and must endure the noise. People living in a place also stirs up air and dust too, and the PCs need to behave stably with lots of dust fouling during hot summers and cold winters.

If your requirements are like mine, nothing there really needs a lot of big-honkin' iron processing. Some of the audio ripping and conversion, or editing photo images does take some CPU and memory, but for the most part, any Pentium-3 class machine with more than 600MHz and 512MB of PC133 SDRAM is almost adequate for Solaris. Anything much faster, will be spent idling, or burning more Watts which costs money if folks actually stopped to think of the costs to power and cool a system. In addtion, it could shorten the life of the system because that extra power requirement goes into more fans to suck more air in to cool the system, depositing more dust that can foul and burn out power supplies and overheat capacitors on the motherboard causing failure. Some of my colleagues refer to their home racks as "air filters" for the home, since they suck up so much air and deposit soot inside the case.

This doesn't mean we should just stop buying newer, high speed hardware. In fact, quite the opposite. While the CPU and memory might have achieved performance adequacy 5 years ago for home users, some newer systems may provide even better power economy while running faster, as well as support newer, faster chipsets, graphics and monitors, faster networking and USB peripherals, and are likely to be more available in stores at a lower price, than having to try to find it on some auction site because the original part is no longer made. Sellers rarely make overt offers for low-power, high-value hardware; you need to look for these deals.

Step 2: What works with Solaris x86

To find out the official list of hardware items that work with Solaris, there's an official site called the BigAdmin HCL. On that page, you'll get a list of servers, desktops, motherboards and laptops that are certified or reported to work with official Solaris 10 and Solaris Express. The HCL allows companies and individuals to buy a Support Contract from Sun for an annual fee. Using the OS is still free. Folks can also download the Hardware Compatibility Test Suite (HCTS) from Sun and run this on their hardware and submit their entries. Version 3.0 of HCTS recently went public and it runs for about 12 hours and tests the filesystems, cpu, memory and network pretty intensely during that time. It requires two machines (a system-under-test SUT, and a Test Manager/Server) hooked up back-to-back, or through a seperate switch on a private network to run the fully networked test. The Solaris Marketing folks used to have a Tshirt Give-away for anyone who registered, downloaded the HCTS and tried to run it, then made a Report-To-Work submission or certification. I made a bunch of submissions, but found out later than Sun employees were forbidden to participate in that contest, and anyway, they didn't have 3XLT tshirts to fit me. Bummer.

Unofficially, Solaris x86, especially, the latest build of Open Solaris, supports a lot more hardware. In general, Solaris will run on most major CPUs (AMD, Intel, VIA) and motherboard bridges and north/southbridge chipsets that support Intel's x86 instruction set or the AMD64 instructions (or variant, such as Intel's version - EM64T). This includes standard I/O like IDE/ATAPI interfaces, any SATA interfaces that support IDE legacy mode, systems with PCI, PCI-X, and PCIe bus, older ISA bus support for PS/2 keyboards, mouse, peripherals and Serial and Parallel I/O, most on-board USB, and systems with an AGP slot. Typically, Solaris can be install in console mode on any x86 system with about 128MB of memory, some type of ATAPI optical drive and some type of supported hard disk with at least 5GB of free space. But if you want something usable, 512MB or more RAM is good, and 80 GB disk might be a start. By default Solaris x86 auto-senses 32-bit or 64-bit architecture and boots the OS as appropriate. And yes, the 64-bit version of OS is fully compatible with 32-bit user applications.

Where Solaris doesn't work out-of-the-box is for certain on-board and common peripheral devices like new native SATA and RAID controllers, Wireless 802.11, some ethernet chips, some new graphics cards, or and with some types of high-definition (HD) audio devices. Solaris also lacks software and drivers with proprietary peripherals, like Point-of-Sale scanners, printers, card-swipes, kiosks, etc. Many network, audio, and storage controller drivers are available from third parties, and in the open source space and there are companies that sell proprietary drivers solutions that run on Solaris as well. There are a few drivers in the GNU GPL space that Solaris might be better off having, but those are getting fewer as hardware vendors are coming over to Solaris and we apply more engineering resources for porting. For the time being, it still pays to stick with what we know.

Step 2a: Motherboard Selection

With some experience, we find that most chipsets work with Solaris and it isn't really a particular maker or brand that causes incompatibilities, but it's an onboard peripheral bundled with that particular chipset that may not have a supported driver. When that is a native-only storage controller or NIC or Graphics port, then immediately the Solaris install is more difficult. So the trick isn't so much choosing the maker or the chipset, but knowing what peripherals come with a particular board or chipset-bundle. In some cases, the behaviour of a peripheral, like a native SATA controller, can be adjusted to set to use legacy-mode only, in which case, the board works fine with Solaris.

I like the low-end and all-in-one chipsets because this category provides excellent price/performance and low-cost to buy and own. Counter to what others tell me, I actually think the cheapest and most mass market motherboards are some of the most abused and tested board on the market, and therefore, manufacturers tend to make them more robust to human abuse than on server boards that cost 10 times as much, but have a much smaller marketshare. Certainly, the margins are much greater on server hardware (yeah, we at Sun should talk... we're in that business). But the whole ideal of achieving volume Solaris for the Proletariat means (a) making it cheap to get the OS, and (b) having it install and run well on a damn cheap box!

Rather than go through each chipset and what works, it's probably easier to say what is not likely to work. Since most CPUs, bridges, buses, and standard I/O controllers to memory and disk have to be somewhat compatible with Windows/x86 instructions and memory flow, for the most part, Solaris just works and recognizes and uses that hardware like any other x86 operating system. Standard drivers are in place for the usual ISA legacy devices like serial, parallel, ps/2 mouse and keyboard. Also supported for the most part and standard USB devices and USB storage, and ATAPI drives like IDE disks and CD/DVD ROM and Burner drives and any SATA drives that are running in Legacy IDE mode.

Step 2b: Graphics Selection

What might NOT be fully supported in the install media are the graphics, NICs, audio devices, and WiFi networking chips. These don't necessarily mean that all is hopeless. Some drivers can be downloaded from the web if another system is available and networked and you have something, like a USB jump drive to copy drivers after the initial install for configuration. In other cases, there may be no support for the onboard device, but you might be able to install an add-on card that works with the board you have. Graphics is a good example. Up until build 53 of Solaris Nevada, the AGPgart driver didn't support the onboard VIA Unichrome Pro graphics on any of my newer VIA systems. But those systems all had optional AGP4x/8x slot or PCIe and it was possible to buy a very inexpensive ($15 - $20 online) ATI- or nVidia-based AGP card from a previous chipset line (e.g. ATI Radeon 7000 or nVidia MX-4000). Laptops are different story when it comes to graphics - pretty much, you're stuck with what you get. In these cases, Solaris supports the slightly higher end embedded graphics chips like the ATI Radeon Xpress 200M or the nVidia GeForce 6100/6150. Solaris has lots of issues with Intel embedded graphics, even among chipset variants and vendor implementations that should be supported by the Xorg Intel embedded graphics drivers. I often have the same graphics non-compliance issues with Linux, and luckily, it's been getting less frequent with both Linux and Solaris, as it should since both leverage the Xorg source. But I try to avoid embedded Intel graphics on a system for running Solaris graphics mode. But ATI and nVidia seem like well support brands these days. We even support the newer nVidia Quadro line in Solaris.

Step 2c: NIC selection

With NICs, the problem is less difficult. There are many free drivers out there for Solaris. Murayama-san puts out a bunch of open source, free Solaris NIC drivers. So the installation may not find any drivers for the ethernet devices onboard, but if you have a VIA, SiS, Tulip, Davicom, or other mass market embedded NIC, then most likely, there's a driver for it. What folks may want to avoid are the newer embedded PCI-Express GigE NICs. The drivers may actually use the same core logic, but the PCIe bus signals and handles interrupts differently over PCI. We do support most high-end PCIe server NICs, but each has a specific initialization and so this is device specific and our driver requires some amount of code to correctly initialize each variant of that MAC. So it isn't as easy as trying to stick that vendor/device ID into the /etc/driver_aliases file and run devfsadm to initialize one of these PCIe embedded NICs. It may work, but usually not. Luckily, if you need a NIC and this isn't some laptop where you have no choice, then you can get a Realtek 8139-based Fast 10/100BT PCI card for about $0.99 on sale (sometimes $0.49), and I've purchased 3 Realtek 8169 10/100/1000 GigE PCI cards which I paid $4.99 for each. This is brand new. Not used.

Step 2d: Audio Selection

Solaris 10 and later supports most Intel Spec AC'97 audio, VIA 823x Audio, and some legacy Sound Blaster stuff. That covers about half of all the audio on most boards these days. There are still a few boards with AC'97 audio which the Solaris included install media won't recognize, and there is the new class of High Definition or HD Audio chips. For folks with an unknown AC'97 type of audio controller/codec combination (read your spec sheet or prtconf -pv and find the PCI vendor and device ID and web search that device to find out what it supports), most likely, you have a good chance if you download Jurgen Keil's audio drivers and install them. Jurgen supplies his own versions of VIA and AC97 Intel audio drivers. These have different module names and will not clobber the existing drivers, and his installation package does a good job of pruning and transferring PCI vendor and device IDs to his driver control where both the Sun drivers collide with his drivers. Jurgen's drivers are especially useful with some AC97 codecs that have a non-standard sample rate conversion hardware. Where the Sun audio810 driver fails, or takes a huge performance hit going with a software sample rate converter (am_src module), Jurgen's driver allows one to compute the proper sample rate and set it as a configurable in the /platform/i86pc/kernel/drv/audioi810.conf which usually gets the driver to play audio at the proper speed. The information on how to do this is actually in the .conf file itself and has come in handy on a Compaq motherboard with Intel 815 chipset and AC97 audio. Jurgen's VIA drivers eat a bit more memory for buffer space, but lower the interrupt rate dramatically, eliminating almost any hiccups on some very slow first-gen EPIA 500 fanless C3 mini-ITX systems and allow those to play flawless audio.

As of Nevada build 44, Minskey Guo and the Beijing team did a put back of a quick High Definition compatible audiohd driver implementation. Minskey says he was "helping" me, but actually, he did most of the heavy lifting on the all-nighter coding and testing. I ought to send this guy a case of quality beer and certificates for Pizza Hut in Beijing. I wonder if they deliver like in Tokyo?

HD audio comes from a 2004 Intel spec and is pretty much different and not meant to be compatible with AC97. First of all, the spec which is available from Intel's site separates the combined AC97 controller/codec into separate HD audio controller interface and compliant codec. Capabilities are for much higher bit rate (upto 192kbps for 8 channel - 7.1 audio) versus the old AC97 (48kbps for 6 channel - 5.1 audio). This allows motherboard vendors more performance and choice in selecting the codec and implementing rich audio support for multiple devices, playing different streams simultaneously. At the same time, if the driver is implemented with good support for codec discovery, it's possible to implement a universal audio driver that can ideally parse and initialize any codec. All communications between audio applications to the device are through the controller and through defined kernel DMA structures. This eliminates applications ever needing to hold onto pesky base address register values once the memory segments, driver and codec initialization are complete. The only problem is that support for codec discovery isn't trivial and can take time to test and properly debug. Also, we learn in the hardware business that every codec isn't quite the same and there's always some errata on either the controller or the analog pinouts the codec is hooked up to, such that the discovery may not provide correct information. It's quite a bit easier and faster if the register specs are available to simply check for codec device and do the initialization in the driver code or to use an external configuration file that enumerates name=value pairs of properties that specify where the standard pins for that codec are. It makes it easy for vendors to ship audio codec initialization files too as properties. But that all depends on if vendors are willing to give out the specs on their codecs. Which is really the crux of the problem, since that's been somewhat hard to get except for the Realtek, which have just been excellent Solaris partners. So far, the Nevada audiohd driver can support most Realtek HD audio codes like the 260, 880, 883, and 885 and others. And this supports stereo audio playback and recording. But the number of tested HD Audio controllers isn't great. But if you have a Realtek codec or think you may have one, you may still be able to get the driver to work by editing the /etc/driver_aliases file, and searching for "audiohd". Then add an entry in the same format for a new device. For example, on my MSI K8NGM2 motherboard system with MCP51 chipset and HD Audio controller, the PCI device node blocks me from seeing the codec directly, but a "prtconf -pv" shows the controller as "pci10de,26c" which I added to the list, then ran devfsadm -i audiohd, reboot and suddenly, the audiohd driver works great. The driver may work for quite a few other audiohd controllers that are back-ended using Realtek HD Audio codecs. But we didn't have too many systems at this point to play around with, although a number of laptops are now coming out with HD Audio standard. Many don't use a Realtek HD audio codec, but some other brand, like a SigmaTel.

Support is unlikely until we get specs, or if we have time to work out a really good parsing algorithm for codec discovery. But for the time being, you're not all shot on Solaris if you have HD Audio. In fact, there may be a version of OSS (Open Sound System) from 4Front Technologies that works on Solaris x86. 4Front has been doing high quality commercial audio drivers for UNIX for years. And their latest stuff is free for personal use and has a 6 month license that is renewable for free every 6 months, or can be purchased perpetually for just $49 to end the hassle of re-submitting for that license key. I've tried the OSS stuff and it does work with the ATI SB450 HD Audio controller and codec underneath on my new bargain Toshiba M115-S1064 laptop. The audio worked fine out of the box, but had some issues with standard Solaris audio support devices (like the Gnome volume control) not responding on the laptop (since there is a manual dial for audio volume), but otherwise it sounded good. I have some poorly ripped Enrique Iglesias and Led Zepplin tracks that had lots of Cymbals and high pitch audio that got a bit over saturated and tinny in this driver. But I peeked at the hdaudio.conf driver (no collisions in the name space again) and I downgraded the quality of the input audio stream the driver was expecting to medium (instead of the default - high) and suddenly, the tinniness went away and I was hearing great audio again. It pays to try different settings in the driver if it has a .conf file. Hopefully, between the existing drivers, Jurgen's drivers, and OSS drivers, most audio chips will just work with Solaris.

Step 2e: WiFi Selection

I used to think selecting a WiFi chip was specific to laptops. But recently, in Sunnyvale, the Mtn.View based company: MetroFi Wireless, has installed a bunch of WiFi base stations. These are advertising supported services, but it's changed my outlook on how to help the families of kids at my local elementary get online using broadband. Instead of deploying a donated and refurbished Linux Box with some semi-expensive and rare controller-based modem for a cheap dialup service, the PTA might be able to collect donations and get some cheap PCI WiFi cards, install them into these systems, and then use wifi to get on the network with no monthly or annual dialup fees. We wouldn't be limited to Linux and its LinModem support, which is mercurial at best with the plethora of Host-signal processing (i.e. controller-less) modems. We could go stock 802.11g and with the right booster antennas, users should could get good WiFi signal.

That's motivated me to look more closely at WiFi support and not just on laptops, but at built-in, cardbus, and PCI card WiFi NICs. A big list of WiFi drivers recently got into build 53 of Nevada. These support PCI, mini-PCI and cardbus versions of popular 802.11b/g chipsets including the Intel Pro Wireless 2100 and 2200bg/2915abg, the Prism/Orinoco chipsets, the Atheros 52xx series, the Ralink Technologies RT2500 series chipsets, the Realtek 802.11b wireless chipset and the Cisco Airnet chipsets. The Atheros driver works with most of the previous mini-PCI laptop ABG cards. It doesn't quite work yet with the newer AR5006 PCI express line which is starting to become more prominent with laptops. The same story goes for the Intel ipw3945 which is also a PCIe device showing up in lots of laptops, and latestly, the Broadcom BCM4306 line of WiFi chips fills in the remainder. So none of the newer Wifi chips are supported... yet. But my bet is on the AR5006 since it's already available in the MADwifi driver on Linux so it shouldn't be too long. I don't have too much public news about the ipw3945 or the bcm4306 except that we don't have the specs to write the driver, but some reports claim that the NDIS wrapper can provide a usable and stable driver for either device on most laptops.

But besides laptops, what's interesting is the availability of WPA on top of a lot of PCI-bus WiFi-BG cards. To my surprise, a lot of the cheapest (e.g. Airlink 101) PCI WiFi cards are based either on the Atheros (Super g) 5212 chip, or the RaLink RT2500 chipset (regular G). These are cards that show up frequently on sale for under $20 at stores like Fry's. And the RT2500 version have been down as low as $7 for the card (limit 2 per customer) which is why I have two at home. For folks that don't want to rewire their homes with Cat 5e/6 cabling, and have noise already on the PowerLine and can't get more than 6Mbps/sec throughput on PowerLine accessories, then 54 Mbps is a refreshing increase and it only takes switching to wireless. So Solaris users can simply go out and get a cheap card for their desktops too and enable WiFi without shelling out a lot of money to go wireless. Not bad at all, I'd say.

Step 3: Where to buy this stuff?

I shop for most of my stuff at these sites:

  1. www.newegg.com - probably where I spend the most money. Awesome website, great customer product reviews, and awesome prices. Once you New Egg...
  2. www.ewiz.com - less selection than newegg, 5% cheaper on boards than newegg in a lot of cases and a local Bay Area company with insanely fast service - order it and get it in 24 hours!
  3. San Jose Mercury News - click on the [Newspaper Ads Online] link and see daily Fry's ads. If I see something cheap, a quick trip at lunch with 3 other colleagues in a carpool is the usual menu/venue. And you can order a decent lunch at good prices at the Fry's coffee shop inside the store.
  4. www.directron.com Another low cost online retailer. Houston, Texas-based. No sales tax to CA and good service. I get a lot of quiet-PC gear, adapter, fans, and cases from them.
  5. Starmicro.Net A Bay Area company with fast service and some really cheap prices on older memory and cpu.
  6. www.compuvest.com A Washington-state based company with a long history of low prices and good mail order service. They carry a large variety of older technology and new stuff at competitive prices and out-of-state means no sales tax either.

This is by no means an exhaustive list. Sometimes TigerDirect.COM has a good deal if you're into waiting for Rebates (I'm not), or SurplusComputers.COM will have some good deals too which are online-only and not available if you go to the store for pick-up, which is a bummer, since I live pretty close to those guys. There's also www.axiontech.com, another Texas-based company that caries some good motherboard prices, just to name a few.

I tend not to shop eBay that much. There used to be deals in the past, but most sellers have jacked up the price on shipping and handling to the point where the prices are ridiculous. Often, with computer gear, the shipping and handling are more expensive than the item. Who in modern history would pay $25 per disk for a -USED- IDE 40GB drive? But that's exactly what it comes to with these online auctions and the bidding wars in the last few minutes of every auction close. The going rate for disk storage is about $0.40 per Gig and that's out-the-door prices after tax and shipping on a -NEW- disk drive retail. I usually wait for a sale on some Seagate 5 year warranty SATA or IDE drives and get storage at close to $0.25/Gig. Folks are paying upwards of $0.60/Gig for used stuff and that's just stupid and buying from some kid with a 97.9% rating. For that amount of shipping and handling, I'd expect a 110% rating if it existed. But again, eBay does serve its purpose for those desparate and in search of something the other vendors don't carry any longer. I picked up a couple of Intel D815EEA boards for $16/each with shipping recently to build a couple more Solaris boxes to go with a couple of Intel PIII 733 MHz cpus I bought for $8 each at Compuvest.

My Top Pick for Solaris System Right Now

Clearly, there are a lot of choices that anyone could make right now about what parts to throw into a Solaris box for home use. And it's a lot of fun to build and install systems, especially if in the end, they go to help families get low-cost broadband. But I do have a favourite box for at least I think this is the best deal and the one, right now, I wish I had in my home. It appeals to all my personal criteria for the right blend of a) price, b) performance, c) quietness, d) power consumption, e) Solaris support and f) aesthetics. It starts with the PCChips V21G flex-ATX motherboard with soldered-on VIA c7 processor at 1.5GHz. It has a new CN700 chipset that supports IDE and SATA and has integrated VIA Unichrome Pro graphics, VIA rhine Fast Ethernet, and DDR2 support. The motherboard and cpu all-in-one is just $68 at ewiz.com and installs Build 53 of Nevada without any real issues. I'd stick a 120GB Maxtor SATA drive with 8MB buffer which was on sale at Fry's for $49 recently, and then a 1GB stick of DDR2-533 Kingston memory for $95, and put that inside an Antec Minuet 300 Case w/ 300 Watt P/S for $79 with a silver bezel NEC 3550A or 7170A-0S DVD burner for $30 and a Multi-format, Silver bezel USB 2.0 flash reader for floppy drive bay install for $14. Total cost would run upwards of $380 when all shipping and handling was done. Not the cheapest build possible, but a very usable system that's small and relatively quiet. If I were going for a true budget server system and forego a DVD burner and get a cheap case, I'd probably use an Enlight 7396AM1 BookPC case with 180W P/S and save $50 on the case, $44 on optical drive and flash reader. I'd also get a stick of 512MB DDR2 for half the price and save $50 since most of the time, I would run this without X. That'd save a considerable amount of memory more than ample for a simple httpd/j2ee server and mail server. That'd make a box for about $250 that could serve up a lot of services.

How would you install a box without a working network interface (yet) or an Optical drive?

I'll talk about options for that in the next blog.

Thursday Nov 16, 2006

What? Solaris Life Style?

Fishing Vacation Recap

Okay, so I haven't had time to blog in a while. Or fish for that matter. The exception was a short vacation back not too long ago to Vancouver to install a couple of new workstations in the vacation home up there, put in a second security camera and to figure out what was eating and extra 2kW-hrs/day in electricity besides the frige. I did manage to get some fishing in there, and a little scientific method of observing when the fish arrive relative to the tide, yielded big results. Here's a 10+kg salmon caught from shore just outside the house. Yeah, that's me in the picture. Took me 20 minutes to land the fish and two boats anchored just off shore to watch me bring it in. I wish I had a net with me, but I rarely bring one for fear of "Murphy's" Corollary - which states: If you bring a big net, you won't need it. But the fish looks like a Chinook on the outside. Black mouth, massive size, fiesty. And I got a kick cleaning it in the driveway. More than several of my neighbours (who own boats) drove by, hit the brakes, then backed up and lowered their passenger side power windows. "Ooooooh. N-I-C-E fish!" they all said, licking their chops. Amazingly, this salmon had no pink flesh. It's known as a "White Chinook" or "Ivory King." And up in B.C., there appear to be anywhere from 1% to several percent of the Chinook population that have the same genetic mutation where they lack the enzyme to breakdown and absorb beta-carotene. Hence, their flesh isn't pink. The flavour also is very sweet and mild, like a trout or char, and hardly like regular salmon. A delicacy in my book, for sure.

The two workstations I installed up there were systems for each bedroom. I found this killer store in Richmond, B.C., just off Bridgeport Rd., not to far west of the Home Depot/IKEA. It's called CanComputer and they have some good prices that compare well with the US. I may have mentioned some series of shops along the Bridgeport ICBC row (the section of Road where lots of auto-body repair shops are). Most are hole-in-the-wall shops with small store fronts, little retail display space, but large back rooms with inventory. CanComputer is like one of those shops, just a little fancier and cleaner. But they're all more mail order fulfillment businesses as opposed to Best Buy (which moved in last year, next door to the Future Shop at Landesdown Mall), which is over-priced anyway. Plus, the folks at CanComputer seem to know there specs a bit better on parts than the Future Shop or BestBuy folks. At least I was impressed that a sales person at CanComputer actually knew the difference in form factor for a x16 lane PCI-express slot versus AGP slot on an AMD socket 939 board and quiet power supplies with 20+4 versus 24+4 pins power rails. But neither BestBuy nor Future shop sell many computer parts - rather, they sell whole finished systems, so they aren't the kind of shops you'd expect true geeks/nerds to frequent.

I also had the privilege to bump into Nick Harrison at the Richmond, B.C. Costco. I was doing a run for DVD videos and on the lookout for Season 9 of Stargate SG-1, and met a semi-tall, medium build guy in the same video section looking at Sci-Fi serials. For folks who don't know, Nick Harrison is the guy who plays the Dark Knight in some of the Arthurian episode in last year's Stargate SG-1. He played roles as Jaffa in previous seasons as well. But it's just a kick to meet up with folks from popular Sci-Fi shows who are nice people and approachable. And with all the movies and TV shows they make up in Vancouver, that's another bonus for going up there. BTW, Season 9 of SG1 is out on DVD now. In the US, it's $32 at Costco.

Solaris Life Style?

So what's to do during those lazy late summer/early fall evenings in the great North? Well, for one thing, you can sit around and rip CD audio into mp3s to stuff them on a new, cheap, no-name MP3 player. I picked one up for fishing and roadtrips in California for around $50. It's a Truly MP310 in lime green with FM radio, colour display and 512MB of flash memory. I saw a recent sale at Fry's down in California on the same unit for about the same base price but $35 after rebate (curse short profanity to self...should've waited!) My sister always recommends waiting for these cheap electronic gizmos. "They'll get so cheap, you'll get 'em free with a Happy Meal in a year," she says.

Usually, I carry a trusty laptop with Linux on it, but as you all know, upgrading is a crap shoot, and sometimes, in the middle of an upgrade to a new kernel version, the Linux ABI story ain't the best and something go wrong. So my triple boot laptop has been booting Solaris x86-only in recent weeks/months. And it'll stay that way until I find some time to fix the install without hosing all my data on the existing slice. Well, I thought it was a bummer that I didn't have Linux with me, since, for things like CD-ripping and burning, it's been very handy and relatively easy to use. In fact, I believe the ability to rip and burn audio and mp3 CDs (as well as hook up digital cameras and other device support), has been critical to Linux's success. Without those utilities, there wouldn't have been the widespread adoption of Linux in the enterprise. In essence, Linux offered the Geeks something other Unices couldn't - LIFESTYLE.

Getting the powers-that-be who direct Solaris to view Multi-media support on Solaris, has been a long struggle for a lot of folks inside, and for many years. Senior/Upper management got the need for an Office Suite pretty quick. And Open Office/Star Office is just an awesome product. But office productivity doesn't equate to LIFESTYLE. A word processor isn't fun. You use it when a paper is due and you gotta get the darn thing out. You use a presentation package when customers are gonna show up the next day and you need to make something look pretty to sell them on some product or idea. And a spreadsheet... well, it's useful when creating PTA invoices to submit for reimbursement.

I thought Solaris was a long way from offering any Lifestyle, but I was wrong.

Stuck without operational Linux, I gave Solaris a try. And reading the man page on the cdrw(1) command, I quickly found out that it's possible to rip audio tracks and quite easily. For example, if you want to rip the 7th audio track off of any audio CD to a .wav file, then just do this:

    % /bin/cdrw -x -T wav 7 myaudiotrack.wav

So imagine what any shell scripter or Java programmer could do with a command line this simple... well, yes, it was easy enough to script this and rip and re-title every single song off of a CD and it's pretty fast too - probably less than 4 minutes to rip an hour of music into .wav format.

Once in .wav format, to convert it to .mp3, we can use any program. My preference is for Lame. And getting any version 3.9.x or later compiles cleanly and easily on Solaris x86 and runs fairly quickly, ripping at close to 6x playing speed for 128kbps bitrate. Usage is also straightforward. My ears aren't finicky so I don't need a higher bit rate. And if your cheap mp3 player is only 512 MB, the files are smaller than ripping using a higher bitrate.

  % /usr/local/bin/lame -h -b 128 --ta "Artist" --tt "Title" myaudiotrack.wav myaudiotrack.mp3

You may want to keep the .wav files around if you ever plan to burn a backup of your CD. But I usually delete them and just keep the .mp3 files. Some folks don't like the fact that .mp3s are lossy and noticeably lossy at 128kbps, so you can rip at a higher rate and store them which is still much smaller than the .wav files. I convert the .mp3 back to .wav files using mpg123 which is available freeware, and included on the Solaris 10 update 1 companion software distribution. If you've installed the companion software, then you'll find it in /opt/sfw/bin/mpg123. The command to convert songs back to .wav is:

    % /opt/sfw/bin/mpg123 --wav myaudiotrack.wav myaudiotrack.mp3

When you have all the tracks you want in .wav format, burning the audio CD is straightforward. Just use:

   % cdrw -a [track1.wav] track2.wav ....] trackN.wav]

So all this playing around with audio clips made me reconsider if Solaris can yield some semblance of LIFESTYLE. Yes. I think it can. The real question though is whether it could load songs onto the el cheapo MP3 player which is supposedly a usb-storage device. Funny thing is that the manufacturer claims that one can use Linux 2.2 and later with this player. But some users have had issues with kernel 2.6 and the usb port with this device. I had some issues with Fedora Core 3 at home, which has been upgraded a few times. There appeared to be an "Error USB Port 1" on Linux in the log files. I didn't expect much on Open Solaris Nevada build 48 if Linux couldn't even see this.

So on to Solaris. And as expected, nothing happened. Well there was some output in the /var/adm/message file on Solaris, but the usb-storage didn't mount. Yes, I was a little disappointed, until I got an idea to contact some of our Beijing driver folks working on USB. I got my hands on an early version of USB driver and after installing, I tried plugging the device in and, WOW! The device mounted and was found in /media. I found out that the MP3 player only supports USB 1.1, so it's a slow dog to upload songs. But after a couple of hours of chugging along, I managed to load up some oldies and goodies for my exceptional entertainment-on-the-go. I've checked recently with build 51 of Solaris Nevada, and yes, the new USB is in there, so soak up the Lifestyle folks. And if you have some cool scripts or Java GUI front end for the command line utils to rip and process audio clips, let me know. I would upload mine to Java.NET, except they're pretty embarrassing right now. Maybe later after code clean-up.

[disclaimer: Please use information here only to create -legal- archives of music you own. Don't be a spoil-sport and steal music. Support your favourite musicians and their labels].

Tuesday Mar 28, 2006

Adding a pxeboot driver to Solaris 10 01/06 x86

So a partner came in last month with a network driver for a blade system. They developed it using a whitebox PC running Solaris with a reference PCI card. But they never officially tested it on the blade system the driver was intended for because they couldn't get the driver on the blade... at least not conveniently. The problem is that while they could power the blade inside a special case, without a full chassis with optional shared optical drives, it was pretty tough installing the OS because the only way to install it on the blade was to do a network install. But since this was a new network driver, it wasn't in the installation OS.

The BIOS and the NIC supported PXE boot and while Solaris could begin the installation, it would stop and exit to a shell prompt the moment the PXE handed control over to the Solaris installer. Mind you, we're talking about new boot in the Solaris 10 Update 1 (aka Solaris 10 01/06) which now uses grub bootloader. But this was a classic example of the Chicken versus Egg problem.

The partner had a good working knowledge of PXE boot and they followed the docs.sun.com document and others they found on the net. When PXE booting a PC, the install client receives a number of options from the DHCP server that direct it to fetch a runnable ramdisk image which then bootstraps the rest of the system.

In the case of Solars 10 1/06, the boot client receives DHCP option entries that tell it where to download what a Solaris x86.miniroot root image, which is about a 50+MB bootable ramdisk image. The PXE BIOS handles the entire network transfer from the server, then unpacks the image and boots it. Control of the network is then handed over by PXE to the Solaris miniroot.

Now, if a necessary network driver isn't in the Solaris x86 miniroot at this point, well, the installation stops, prints an error and exits to a shell prompt. This was pretty frustrating for our partner who knew they needed to get their driver into the installer image but didn't know how. Solaris 10 x86 update 1 came to the rescue. The new boot architecture has added several commands that simplify the packing and unpacking of x86 miniroots. To add a driver, one simply unpacks the miniroot, adds the driver and repacks it.

To do the first step, unpacking the miniroot, a user can run the root_archive(1M) command on the install server (presumably it's running Solaris 10 x86 1/06 - update 1 - since older versions and SPARC do not have this utility):

  # /boot/solaris/bin/root_archive unpack [pxeserverpath]/boot/x86.miniroot [path-to-unpacked-dir]

Once the miniroot is unpacked, one copies the 32-bit driver binary and driver .conf file to the [path-to-unpacked-dir]/kernel/drv directory, and then runs the /usr/sbin/add_drv command with the right PCI IDs and the right permissions against the unpacked miniroot directory. E.g.

  # add_drv -b [path-to-unpacked-dir] -n -v -m '\* 0600 root sys' -i "[device ids]" [mydrivername]

where, [mydrivername] is the name of the binary just copied to the unpacked miniroot ./kernel/drv directory, and the [device ids] is a string list of PCI device IDs that might look like:

  '"pci1a44,9043" "pci1a44,9065" "pci1a44,9106" "pci1a44,9053"'

Note that the -b flag allows you to set the root path where to apply the driver add operation, which is pointing to the unpacked miniroot. Note also that the x86.miniroot is 32-bit and only supports 32-bit drivers.

The last thing to do is to repack the miniroot using the same command, but specifying "pack" as the keyword. But before we do that, I like to make a copy of the original x86.miniroot in the same boot directory, and then run the root_archive(1M) command:

  # /boot/solaris/bin/root_archive pack [pxeserverpath]/boot/x86.miniroot [path-to-unpacked-dir]

If the PXE boot server was working before, the client should be able to boot and load the x86.miniroot and complete a normal Solaris 10 1/06 installation. The installation will bring up a menu of install choices; the default is to perform an interactive install. When doing an interactive install, the installer offers a choice of auto-reboot, or manual reboot. Choose the manual reboot, because while the above steps get the driver into the miniroot, they don't do anything to install the missing network driver onto the final client system. So we select manual reboot, to give ourselves a chance to copy over the drivers and run the add_drv command on the final client disk image before rebooting. Otherwise, the newly installed system, still won't have a network driver.

So where do we put the driver binaries so the install client can copy then over? One way is to copy the one from the miniroot's /kernel/drv that's already there. This works if the system is only 32-bit and will only run in this mode. However, if the system is x64 capable, we didn't copy the 64-bit driver binary into the miniroot's /kernel/drv/amd64 directory and that's because the miniroot is only 32-bit and doesn't have a ./kernel/drv/amd64 directory. We could have created that directory in earlier steps, but that's not necessary. In fact, during the Solaris PXE boot installation, the client mounts the install server directories via NFS. Thus it's easy enough, before rebooting, to simply just put the driver files in the install server's exported PXE boot directory, especially inside the jumpstart directory where the client already mounts them during the install. I usually just put a ./jumpstart/drv subdirectory inside the server's exported directories. This will be mounted on the install client as /tmp/install_config usually. If you can't find it, use the df(1M) command to see a list of filesystems and their mount points.

So now we can persist the drivers to the install client. The installer miniroot mounts the client's hard drive usually at /a. So it should be straightforward to copy the binaries and .conf over to /a/kernel/drv and /a/kernel/drv/amd64. (Note: there's usually just one .conf file for the driver that goes in the /a/kernel/drv - which is used by both 32- and 64-bit binaries.) The we run the add_drv(1M) command again, but for the -b option, we point to the /a directory.

If this is a custom, hands-off jumpstart installation, it's possible to modify the post-installation finish script to copy the driver (both 32- and 64-bit binaries and .conf) over to the final system disk and also run the add_drv(1M) command so all systems of the same type get the same new network driver without manual intervention.

Our partner with the driver problem was pretty pleased that this worked, and surprised that it wasn't all that hard to do. We're hoping to make it even easier in future versions to add drivers into the installer and even create bootable CDs and DVDs and burn them all in Solaris.

Tuesday Mar 21, 2006

The cheap Solaris 64-bit box pending rebates

I was on a quest 6 weeks ago to see how cheaply I could build a 64-bit Solaris 10 box that I could use in the office, and gave myself a 2 week period to hunt for deals. The quest wasn't all that hard, and what I've ended up with wasn't all that bad of a system for office use.

At the core is an ECS K8M800-M2 motherboard and AMD Sempron-64 cpu. I got this on sale for just $69 together at Fry's on a one-day sale. I had to be careful that they didn't switch a 32-bit BABOX processor on me, so I insisted they honour their ad for a 32- or 64-bit mode cpu which they did, and I got a 2600+ 64-bit BXBOX retail cpu (the box actually has 64-bit on the lower right front corner). It's socket 754 which is probably going out of date soon, but for a functional system that I don't plan to upgrade, it'll get the job done and hold its own for a few years. The board has on-board LAN, Audio, and Graphics, so hopefully, this would make a pretty cheap system. And best of all, no rebates required.

Next was the case. I found the Antec 1650B black case w 350W power-supply on sale for $59.99 with $30 rebate. I'm not fond of rebates, but if I see a good deal and the rebate is from the manufacturer, like Antec, I usually go for it. Plus, this is a fairly quiet case, with easy-install and tool-less takedown. I have an identical white case in the office which ran my old ECS K7VTA3 mobo, and it was pretty reliable and quiet.

A few days after I found the case, I saw an ad for 200 GB WD SATA drive retail kit with cable for just $49.99 after a $30 + $20 dual rebate. And about the same time, I also found a dual stick 1GB of OCZ DDR400 (2 x 512MB) for just $75 with $25 rebate which ain't bad for branded memory. And for optical drive, I found a black retail NEC 3550A 16x DVD burner online for $39 w/ free 3day shipping.

A few days later, I put the box together, and installed Solaris 10 1/06 on the system. First boot wasn't very cheerful. The installer graphics couldn't recognize the onboard Unichrome Pro graphics, and defaulted to text console install, which did complete, but still couldn't get the Xorg to recognize the Unichrome Pro. The SATA controller for the mobo apparently runs the disks in IDE legacy mode so boot and install were transparent. I didn't have to turn on any switches in BIOS even. But I was stuck with no X-graphics with the Unichrome Pro, so I exercised the AGP option, since the micro-ATX board DOES include an AGP 4x/8x slot.

I found a refurbed Diamond S60 board for sale at a local surplus. It has AGP 2x/4x I think and the ATI Radeon 7000 chipset, which is well supported on Solaris. It was a 32MB card and cost $19. I knew I could get 64 MB cards these days for that much brand-new, but in a pinch it worked and I had a working system. Plus, with the newer cards sucking so much power and competing with the CPU, the older card with slower GPU seemed like a wise choice for the 350W power supply.

I added extra USB 12-in-1 flash reader for $7.99 later, and an $8 floppy drive a bit later with a $3.99 round 10" IDE floppy cable for better airflow. I also bought a $3.99 12" IDE ATAPI cable for the DVD burner as well.

Altogether, the cost for this system will come to about $300 after tax and if all the rebates come through. It's not great, but another decent deal for a 1GB sytem with 200 GB disk, universal usb reader and floppy, network, and audio.

Getting Solaris up and running with graphics wasn't hard, especially with the extra AGP graphics card plugged in, but the on-board NIC requires a 3rd party VIA Rhine-III driver. Luckily Murayama's got free Solaris drivers on his site and so I was able to download and compile the driver and install it. A new version 2.0.1 of the rh driver is available and runs well on a number of my systems. It's based on the new Solaris GLD framework (generic lan driver). If folks haven't compiled drivers on Solaris 10 Update 1 (i.e. 01/06 release), there's a slight bug on line 206 of the /usr/include/sys/ddi_implfuncs.h header file. Just comment that line out and if you make clean, then make; make install in the driver build directory, it should just work. Murayama also includes pre-built binaries as part of his distro so a make; make install doesn't actually rebuild the objects unless you 'make clean' first.

In booting this system, a psrinfo -pv reports the CPU is AMD Hammer Family processor - Model Unknown and isainfo reports that the system by default boots into 64-bit mode. I've had the system up for close to a month now with no unscheduled downtime. It's been a real champ for an office workstation and even for development. With home directories mounted remotely and most of the building switches defaulting still to 100Base-T, the system was more than capable of working well and quickly, even with compiles. I'd like to see a Unichrome Pro graphics driver for Solaris x86/Xorg soon. If that happens and works stably at 1600 x 1200 pixels on the 21" LCD flat panel display, then I can probably pull the AGP card out and save a few watts and just keep working.

About

PotstickerGuru

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today