2011-02-08

Acer easyStore H340: Using EON to Fool It Into Being Less of a Piece of Trash

Initially, I planned on using FreeNAS on the H340; I downloaded the images (both the 0.7 and the 0.8 beta) and then tried to piece together enough from the scattered bits of advice on the interwebs to make it work.

I was unsuccessful.

While some very helpful tutorials exist (specifically, HappyBison's) and FreeNAS users tend to be friendly and knowledgeable, it seems there is little interest (from what I was able to see) from the actual developer(s) of FreeNAS in having it used on consumer devices such as the easyStore.

As an example of this, the only post in the FreeNAS forum with instructions specific to actually loading it on the H340 was banished to a final obscure demise in the 'scripts' forum. (Rather than, say, something silly like the "Install" forum, where it was originally posted, and then moved from by an admin.)

Combined with what appears to be a large increase in size of the .08 version, it became apparent to me trying to continue with FreeNAS was likely less than ideal: I guess the company now maintaining it has hardware to sell?  Whatever the case, I did try multiple USB sticks with different versions, blindly, on the H340, with no success. When I was finally able to see output, both releases (stable and beta) were crapping themselves in different places.  Both worked just fine booting in a VM.

Regarding output: In my vanity and do-it-yourself zeal, I had attempted to follow the schematics for building a custom 'debug' cable: I now have a 17" LCD with a sadly frayed pigtail as a lasting testament to my ineptitude at doing so. (It was already somewhat trashed: No, really, it was, before I touched it!) (I also have spare terminals and those little plastic doodads.  Note to self: Software people should stick to software and stay away from the scary electronics stuff.)

Ranting:
After my utter fail at making my own debug cable, I gave in and just bought the Zotac from Newegg: not because it's perfect for the job (it's not) or because it's really very good (it's not), but because it was the cheapest pcie x1 gfx card I could find. Note here: I'm not a fan of the H340. The design is ... lacking in many ways. I realize it's consumer level. I realize the stated audience for it (running Windows Home Server) is unlikely to have much interest in tearing it apart.  I realize if they didn't make it so braindead, people would just enjoy having a small form factor [insert need here] computer, and then they wouldn't buy the more expensive, just as craptastic, Acer products.  Still: even though I got it for under $300 on Black Friday, I regret not having pulled the trigger on the Intel SS2400 instead.  Or, for that matter, hindsight being what it is, just spending a little extra and building a nice NAS with quality parts; any monetary savings on this long ago evaporated with the timesink of it.

Why the need for the video card in the first place?  Because... just taking out the hard drive isn't enough to get it to boot off a usb device.  By the time I got to the point of testing booting off a hard drive with an image, I was sick of screwing with it (I just bought the damn gfx card.) However, it likely would have worked.
H340 with Zotac Card

What didn't work was booting from PXE or off anything usb: floppy, cdrom, or flash.  My educated guess why not: With the default boot order, the internal flash gets first priority, which naturally has the Windows Home Server recovery; only after using the gfx card was I able to watch the WHS "recovery server" defecate all over itself on every boot.

For the brave folks wandering here, and maybe trying to save themselves $65, you can try the following blindly (and let me know if it works for you):
(Note: this is with no hard drives attached, no network cable, and a flash drive hooked up. YMMV.)
Enable debug jumper.
Plug in USB keyboard.
Turn on H340. Wait until numlock on keyboard comes on. Hit F2.
You should now be on the BIOS setup screen - try the following Konami codes:
To change "After Power Failure: [Last State]" to off:
(from Information to Main)
(from Main to Advanced)
 (from Hardware Monitor to Advanced Chipset Control)
 (from Advanced Chipset Control to After Power Failure:)
Enter (select menu - is at Last State)
(select "Stay Off")
Enter
F10 (Save And Exit)
Enter ("Yes" should be selected in the "Do you really want to save and exit?" prompt)
H340 Default Boot Order

Change Boot Order: (This should make your boot order: PCI BEV, USB CDROM, USB Key, USB HDD (this is the SMI)
(Info to Main)
(Main to Advanced)
(Advanced to Boot)
3 ("Loads default boot sequence" Options 1-4)
F10 (Save and Exit)
Enter ("Yes")
F12 Boot Menu

Accessing Boot Menu: Turn on H340. Wait until numlock blinks twice. Hit F12. (see picture...)

So, after setting the BIOS to boot off a thumb drive, EON NAS booted without a hitch to its prompt.  At this point, it should be possible to SSH in, and, here's the really really hard part to get EON installed on the SMI drive:

install.sh

Yup.  Just that.

Backtracking slightly, when FreeNAS wasn't booting (blindly) I looked for another option, and found EON. I hadn't heard anything about it before, but it seemed like what I needed: Small, maintained, with documentation AND the proper driver for the Marvell (yukon) NIC already integrated.  The only drawback being it's Solaris, which was completely alien to me.  After a bit of mucking about with it, thought, I found it's similar enough to linux and bsd that the learning curve for basic usage was quite short.

Unfortunately, I didn't do enough research (R'ingTFM) beforehand, so, note: Get the CIFS version. I got the Samba version.  To me, it seemed like the same thing, and the difference wasn't elaborated on (at least, anywhere I'd seen).  So, what's the difference? CIFS has kernel support and seems to be easier to tie in with ZFS, with perhaps a small performance boost.

Samba is just what you're likely used to: a smb.conf file and all the usual Samba options you've become accustomed to. While it was simple setting it up (I just used most of what I already had on my main system) most of the instructions for sharing with OpenSolaris seem to be targetted towards CIFS installs.  While getting a share going with the Samba version is cake, it feels as though the 'right' way would have been to have used the CIFS version.

Regardless, here's how I got to the point of having EON booting on the H340:
Downloaded EON 64-bit x86 Samba ISO Image Version 0.60.0
Mounted in VMware
Booted
Install.sh to usb flash drive in vm.
Move flash drive to H340.
Boot.
Log in.
Run install.sh.
Fin!
Installing EON to SMI flash

Further notes:
Just in case I ever need it (perhaps I'm feeling like hurting myself and don't have anything sharp, so need a dull, blunt pain?):
(Make sure you used a flash drive with plenty of space)
dd if=/dev/dsk/c1t0d0p0 of=/mnt/eon0/WHS_Firwmare_Backup.bin bs=512
This should be done before doing install.sh; now you can abuse the internal flash without quite the same cold dread.

Setting up EON is pretty simple: EON's creator (Andre Lue) has pretty comprehensive documentation on his site.  As an aside, before I broke down and ordered the gfx card, I still thought I was screwing up something with copying the images to my flash drives, and emailed Andre with obviously n00b questions: despite the unorthodox pestering (he seems to usually provide support via his blog and the OSOL forums) I got responses with much helpful advice; most of it already available had I bothered reading his blog in the first place. (For example, dealing with the issue of booting in a VM (-B disable-pcieb=true).  The other reasons notwithstanding, I can wholeheartedly recommend EON simply because of the caliber and character of its creator.

Some random notes/gotchas:
/mnt/eon0/boot/x86.eon is what grub actually uses.  x86.eon.oem is the backup.  If you're sure your current boot works, you can get rid of the .oem one.  To get rid of the e1000g0 driver, if you boot in a VM initially, you'll likely need to remove the net file manually.

smartctl: initially, was causing the crappy WD green drives to get stuck in a spin (and report the temperature at over 450°c, heh!).  I hadn't bothered to process the FAQ, where the proper syntax is listed.  The problem? It needs _12_ byte commands not 16 byte commands.  So, this works fine:
# smartctl -d sat,12 -A /dev/rdsk/c1t0d0
smartctl version 5.38 [i386-pc-solaris2.11] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF READ SMART DATA SECTION ===
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x002f   200   200   051    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   170   154   021    Pre-fail  Always       -       8475
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       43
  5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x002e   100   253   000    Old_age   Always       -       0
  9 Power_On_Hours          0x0032   100   100   000    Old_age   Always       -       26
 10 Spin_Retry_Count        0x0032   100   253   000    Old_age   Always       -       0
 11 Calibration_Retry_Count 0x0032   100   253   000    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       31
192 Power-Off_Retract_Count 0x0032   200   200   000    Old_age   Always       -       25
193 Load_Cycle_Count        0x0032   200   200   000    Old_age   Always       -       122
194 Temperature_Celsius     0x0022   109   105   000    Old_age   Always       -       43
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       4
198 Offline_Uncorrectable   0x0030   200   200   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       165
200 Multi_Zone_Error_Rate   0x0008   200   200   000    Old_age   Offline      -       0

(Output above is the drive that came with the H340.)  I've yet to figure out what (if anything) to do about the lack of TLER support, but I did use wdidle3 /d (via a flash drive boot) to turn off the stupid 8 second head parking; the Load Cycle Count hasn't grown much since. Also, I added the following to my power.conf to compensate (and yes, I could have set wdidle3 /s300, but this way, it's in OSOL's hands and not WDs...):

device-thresholds       /dev/dsk/c1t0d0 5m
device-thresholds       /dev/dsk/c1t1d0 5m
device-thresholds       /dev/dsk/c1t2d0 5m
device-thresholds       /dev/dsk/c1t3d0 5m

Notes about getting the binary kit installed; Andre's instructions are clear for it, but there aren't really any decent instructions on actually making IPS 'do stuff' --- so, attempting to install the man pages for OpenSolaris:
/pool/pkg-toolkit-sunos-i386/pkg/bin/pkg install -v SUNWman
(and SUNWdoc...)
and trying to use /usr/bincatman -w (to create the windex file), never gave me working manpages: Not essential, but somewhat annoying for an OSOL newb. I managed to stop myself just short of trying to get gcc on the h340; at some point, one recognizes it's JUST for sharing files and stops messing with it.

Speaking of sharing, one small hiccup: nmbd isn't enabled by default. (It's installed, just not started.)  So, for folks wanting the H340 to advertise itself, you need this:
http://wikis.sun.com/display/BigAdmin/Enabling+Browsing+with+Samba+in+Solaris+10+Update+4

Unresolved stuff:

  • - The stupid blinking 'i'; possible to fix by using the freebsd driver posted in the WHS forums and porting to OSOL? Not a huge issue, since it's in a closet.
  • - Temperature: drives run _hot_.  Is this just WD braindeadedness, or the crappy design of the H340? (Samsungs in a ReadyNAS stay around 32°C-35°C with load...4x 2TB WD Caviar Greens idle at 44°C-49°C). 
  • - Upgrading version of ZFS... comes with version 22, current is 31?
Jumbo Frames:
vi /kernel/drv/yukonx.conf and uncomment JumboFrames_Inst0="On";
Add /kernel/drv/yukonx.conf to /mnt/eon0/.backup

References and Resources:
EON ZFS Storage
Home Fileserver: ZFS File Systems
Solaris ZFS Administration Guide
ZFS Cheatsheet
Oracle Solaris 10 Docs
Solaris Service Management Facility Quickstart Guide
OpenSolaris New User FAQ
How Solaris Disk Device Names Work
Searchable Solaris Manpages
Blog post about WDTLER
WD's craptastic page on parking issue
Linux LED driver for H340
Configuring Jumbo Frames
Yukonx Reference (Settings)

6 comments:

  1. How did you get the video card to work? I noticed on some websites that you had to disable the onboard viedo.

    ReplyDelete
  2. Nothing, beyond setting and leaving the debug jumper enabled, which might be required; I didn't think to try without it.

    Also, I think the sites saying to disable the onboard video is for WHS; you need to disable WHS' driver, if you want to use the H340 as a desktop system and boot up with keyboard and video.

    For my part, I just dropped the card in, and initially (before getting it booting off USB) was treated to WHS's restore, using the Zotac.

    Do note, though, I had to take the card out before closing everything back up, because it's 'too big' to stay in. Unless you fancy leaving the case open, this is something to consider.

    ReplyDelete
  3. great article. thanks. I was able to install eon on my 340, but for some reason it doesn't have the network driver. i downloaded this file
    EON 64-bit x86 CIFS ISO image version 1.0b (NO HTTPD)

    ReplyDelete
  4. I'm not sure where you'd snag it easily... it was built into the ISO I snagged, if I recall... here're the relevant bits from my messages, in case it'll help you. (I haven't had to change anything at all since posting this; everything's just worked, so, I've forgotten most of the Solaris stuff ;-) )

    X pcieb: [ID 586369 kern.info] PCIE-device: pci1025,183@0, yukonx0
    X genunix: [ID 936769 kern.info] yukonx0 is /pci@0,0/pci8086,27e0@1c,4/pci1025,183@0
    X yukonx: [ID 801593 kern.notice] yukonx0: Marvell Yukon 88E8071 Gigabit Ethernet Controller
    X yukonx: [ID 200860 kern.notice] PreferredPort: A
    X yukonx: [ID 834597 kern.notice] Dual Net Support: No
    X yukonx: [ID 389192 kern.notice] RLMT Mode: CLS
    X yukonx: [ID 573059 kern.notice] Jumbo Frame Support: Off
    X yukonx: [ID 772773 kern.notice] Copy Threshold: 1500
    X yukonx: [ID 477694 kern.notice] VLAN Support: No
    X yukonx: [ID 571159 kern.notice] Interrupt Moderation: On
    X yukonx: [ID 100000 kern.notice]
    X mac: [ID 469746 kern.info] NOTICE: softmac1000 registered
    X yukonx: [ID 418734 kern.notice] yukonx0: Network connection up on port A
    X yukonx: [ID 249518 kern.notice] Link Speed: 1000 Mbps
    X yukonx: [ID 966250 kern.notice] Autonegotiation: Yes
    X yukonx: [ID 676895 kern.notice] Duplex Mode: Full
    X yukonx: [ID 825410 kern.notice] Flow Control: Symmetric
    X yukonx: [ID 512437 kern.notice] Role: Slave

    ReplyDelete
  5. There aren't alot of x4 video cards available that will fit in an H340. You can make an x8 or x16 card fit.

    a) cut the unused pins off the video card (no thanks)

    or

    b) cut the back of the PCIe x4 slot open on the H340 mainboard. (much preferred)..

    To make an x8 or x16 low profile card fit, use a Dremel and cut the back of the PCIe x4 slot off (just the plastic bit). Then any 8x or 16x low profile card will work.

    The only pins required on the video card to work in this x4 slot are the 11 pins before the keyslot, then the next 21 pins. Cover the rest with electrical tape, if you want to be extra careful.

    ReplyDelete
  6. I built a cable, though sadly it didn't work. My issue (I think) is that it's booting up on the recovery USB chip, which is blank, and hanging.

    I tried blindly booting using the BIOS menu, but not much luck.

    Does anyone know if something like this would work if you have an x16 video card laying around?

    http://www.amazon.com/Micro-SATA-Cables-PCI-E-Riser/dp/B005G4SADY

    ReplyDelete