Viridis Commands
This page summarizes commonly-used commands for our Calxeda / Boston Limited Viridis server.
Controlling Host
The computer controlling the Viridis system is Iraq. All connections to the Viridis system, including SSH, SOL, and IPMI connections, must be initiated from Iraq.
Iraq also supplies DHCP data to the Viridis system, handles DNS queries, and NATs communication with the outside world.
AC Power Control
AC to the Viridis chassis is controlled by the Raspberry Pi plugged into the network.
- Log into the Raspberry Pi from Iraq:
ssh raspi
- Issue the appropriate "power" command:
- Get the AC power status:
power status
- Turn the AC power on:
power on
- Turn the AC power off:
power off
- Power-cycle the AC (turn off, pause, turn on):
power reset
- Get the AC power status:
IP Addresses of Nodes
The Viridis nodes each have three IP addresses, configured via DHCP from Iraq. The first two interfaces are used by the application processor (Linux) on each node, and the third interface is used by the Energy Core Management Engine (ECME). These are recorded in the /etc/hosts file on Iraq as:
- senecaX - first interface (Linux)
- senecaXa - second interface (Linux)
- senecaXb - third interface (ECME)
X currently ranges from 0 to 11.
ipmitool
The ipmitool program is used to send IPMI commands to a single host. This is a standard tool, but Calxeda-specific patches are required for some functionality. As of 2013-09-17 the Calxeda-modified version is on course for inclusion in a successive version of Fedora.
Common options:
-U user # IPMI username -P pass # IPMI password -H host # ECME hostname or IP address -I lanplus # use the lanplus (encrypted) interface - Required for some commands (e.g., 'sol')
cxmanage
The cxmanage script allows multiple nodes to be controlled with a single command. Basically, it's a smart wrapper around ipmitool. This is a Calxeda-specific tool; as of 2013-09-17 it is in package review in Fedora.
Common options:
-u user # IPMI username -p pass # IPMI password -a # process command for all nodes on the fabric
The last argument to cxmanage is the hostname or IP address of a ECME. If the -a option is not given, then only the specified node is affected by the cxmanage command; if -a is given, all nodes on the fabric are affected.
Serial-over-LAN (SOL)
Serial-over-LAN capability (SOL) is the equivalent of accessing serial output from a development board such as a PandaBoard, Rapsberry Pi, or TrimSlice. It is used to control pre-boot software (uBoot) and to view boot messages as well as Anaconda installer messages. It is also possible to login through this connection (though SSH is recommended/preferred).
To activate a SOL session:
sudo ipmitool -I lanplus -H host -U user -P pass sol activate
You can exit from the session by typing "~." -- note that if you're connected to Iraq via SSH, this will actually disconnect your SSH session instead, so use "~~." to disconnect the SOL session.
If another user/terminal has a SOL session active and you want to connect to the same node, deactivate the existing SOL session:
sudo ipmitool -I lanplus -H host -U user -P pass sol deactivate
Node Power Control
To control power for one node with ipmitool:
ipmitool -H senecaXb -U user -P pass chassis power status # check status ipmitool -H senecaXb -U user -P pass chassis power on # turn on ipmitool -H senecaXb -U user -P pass chassis power off # turn off ipmitool -H senecaXb -U user -P pass chassis power reset # reset application processor
To control power for one node with cxmanage:
cxmanage -u user -p pass power status senecaXb # check status cxmanage -u user -p pass power on senecaXb # turn on cxmanage -u user -p pass power off senecaXb # turn off cxmanage -u user -p pass power reset senecaXb # check status
To control power for all nodes with cxmanage:
cxmanage -u user -p pass -a power status senecaXb # check status cxmanage -u user -p pass -a power on senecaXb # turn on cxmanage -u user -p pass -a power off senecaXb # turn off cxmanage -u user -p pass -a power reset senecaXb # check status
Node Information
You can get information about each node using the cxmanage command:
cxmanage -u user -p pass request senecaXb -a
Where request is one of:
- info - display hardware, firmare, ECME, A9boot, Uboot, DTB, and other version numbers
- macaddrs - display mac addresses
- ipinfo - display ECME IP addresses
- sensor - display node temperatures, voltages, and currents
Node Boot Source
The default boot source is "disk". It can be set to pxe or disk using ipmitool:
ipmitool -H senecaXb -U user -P pass chassis bootdev pxe # configure PXE for next boot ipmitool -H senecaXb -U user -P pass chassis bootdev disk # configure disk for next boot
Installation
To install a node:
- (Optional) Activate a SOL session so you can observe the installation.
- Specify a PXE boot for the node.
- Power the node ON.
The node will start a PXE/kickstart installation using the parameters in the Iraq dhcpd and pxeboot configuration files.
To change the installation parameters, edit the /var/lib/tftpboot/pxelinux.cfg/default
file on Iraq, or create a file specifically for a particular MAC address. These are the current (2013-09-17) parameters:
menu title F18 HighBank Boot Options default Highbank-Install prompt 1 timeout 100 label Highbank-Install kernel f18-highbank/vmlinuz-highbank initrd f18-highbank/initrd-highbank.img append console=ttyAMA0 ip=eth0:dhcp ks=http://192.168.1.254/f18-highbank/F18-highbank.ks rd.shell
Note that you can list multiple installations in here for interactive selection (via SOL).
The current (2013-09-17) kickstart file looks like this:
# Perform a basic Fedora 18 ARM Hard-FP install for # Calxeda EnergyCore ECX-1000 - HighBank lang en_US.UTF-8 keyboard us timezone --utc US/Eastern auth --useshadow --enablemd5 selinux --enforcing firewall --enabled --service=mdns,ssh network --bootproto=dhcp --device=eth0 --onboot=on --activate --hostname=localhost.localdomain services --enabled=NetworkManager,sshd,chronyd --disabled=network # Only use this with Anaconda for serial console installs, not with livemedia-creator. #cmdline text # no GUI on this one skipx # Set a default root password for Fedora rootpw --plaintext fedora # Repositories # apparently we must use 'url' for the install repo for livemedia-creator url --url="http://dl.fedoraproject.org/pub/fedora-secondary/releases/18/Fedora/armhfp/os/" repo --name=fedora --baseurl="http://dl.fedoraproject.org/pub/fedora-secondary/releases/18/Everything/armhfp/os/" # # Define how large you want your rootfs to be # bootloader --location=partition zerombr clearpart --all part /boot --size 500 --fstype ext3 --label=boot part swap --size 4000 --label=swap part / --size 2000 --fstype ext4 --label=rootfs --grow # Reboot after the installation is complete. reboot # # Add all the packages after the base packages # %packages @standard # apparently none of the groups sets the clock. chrony # and ifconfig would be nice. net-tools %end # more configuration %post --erroronfail # Install U-Boot boot.scr pushd /boot # get the root device from fstab, typically UUID=<string> ROOTDEV=`grep -w / /etc/fstab | cut -d ' ' -f1` # setup boot.scr cat <<EOL > boot.cmd setenv bootargs console=ttyAMA0 root=$ROOTDEV ro rootwait ext2load scsi 0:1 \${ramdisk_addr_r} uInitrd ext2load scsi 0:1 \${kernel_addr_r} uImage bootm \${kernel_addr_r} \${ramdisk_addr_r} \${fdt_addr} EOL /usr/bin/mkimage -A arm -O linux -T script -C none -a 0 -e 0 -n "HighBank F18" -d boot.cmd boot.scr popd %end
Firmware Update
To update the firmware, download the appropriate firmware package from Calxeda, and issue this cxmanage command:
cxmanage -a update package ECX-1000_update-production-VERSION.tar.gz seneca0b
Additional Commands and Options
There are additional ipmitool and cxmanage commands.
Refer to the appropriate documentation:
- manpage for ipmitool
- manpage for cxmanage
- The Boston Limited and Calxeda wikis