Installing Debian on Intel Terastations
Introduction
The Intel based Terastations are essentially just compact 64-bit x86 PCs with some extra hardware to support the headless NAS functionality (Hotswap bays/LCD display/etc). As a result it's fairly easy to install any operating system that you want using a usb keyboard, VGA monitor and USB installation media. Fortunately, all of the essential hardware (sata controller, ethernet controller, integrated graphics etc) are well supported by the Linux kernel and work in a typical Debian install (I've been using them this way as backup/media servers for over a year).
Tools
The "custom" Terastation hardware requires a few tweaks to get working. I've created a collection of scripts/tools to enable the additional hardware and have provided examples demonstrating their use. see: https://github.com/1000001101000/Debian_on_Intel_Terastations for details.
A summary of what this hardware does and how the scripts/tools enable them are listed below.
Hardware Details
Intel ICH9 GPIO Controller
Used for
- Detect position of the rear boot switch
- Detect the device model by reading 3 hardwired jumpers on the motherboard
- Detect which hotswap bays have drives installed
- Enable/Disable hotswap bays
How to Enable
This chip is fully supported by the "gpio-ich" kernel module though it isn't included with Debian's Kernel. It can be enabled by either:
- Compiling a custom kernel and setting the "CONFIG_GPIO_ICH" option.
- Compiling the module "out of tree", see https://github.com/1000001101000/Debian_Module_Builder for an easy way to do that.
- Use the installer listed in the tools section which will set it up for you.
ITE IT8721 SuperIO Controller
Fan Control
This chip controls the speed of the fans and reports back their current speed. For the TS5000 series the fans are available as FAN1 and FAN2, both fans work perfectly by enabling the it87 driver. The TS-6VHL/8VHL have fans which show up as FAN3 and FAN4 but for some reason for some reason the default driver doesn't detect FAN4, I've included a patch that allows it to be detected. Also, for the TS-WVHL/QVHL/6VHL/8VHL the PWM control only changes the fan speed by about 1%. I'm still looking into how to address that.
GPIO
This chip also provides access to the "Display" and "Function" buttons on the front panel of the device. The default gpio-it87 driver doesn't support the IT8721 but I've included a patch which enables it.
How to Enable
- add lines for it87 and gpio-it87 to /etc/modules
- apply the patches for the it87 and gpio-it87 modules and build them (use the provided script to automate that process)
- Install fan-control and use pwmconfig to configure the fan settings
- see my "input_example.sh" script for examples of using the buttons.
NEC d78f0513 Microcontroller
Most Terastation models have a separate microcontroller connected to their motherboard which is used to control most of the devices hardware. The Intel based models use it for less that the older ARM based models but it still controls a number of useful components including:
- The LCD screen and its RGB backlight
- All the LEDs on the front panel (including those around the buttons)
- All the SATA LEDs (red and green)
- The buzzer/speaker
- The internal timer used to display the time on the LCD panel
The microcontroller is accessible via a serial connection on the motherboard and can be controlled by sending binary data directly to that port.
I've begun working on documenting the protocol used to send commands to the microcontroller, that page can be found at: https://buffalonas.miraheze.org/wiki/Terastation_Microcontroller_Interface
I'm also working on creating a Python library along with some usage examples, I'll post a link once I get that far.