UPDATE: Photos are back online! Thanks to Gabi from Romania for the copyright free photos!
Gira has a made beautifull Homeserver and FacilityServer. Unfortunatelly it’s quite expensive (about €2400,- for their Homeserver3 and the Facilityserver is even more). Is this device made of gold ?
The opposite is true, the Homeserver 3 exists of:
The Homeserver Hardware
- A cheap Mini-ITX VIA Epia ML6000EAG Mainboard with onboard 667Mhz CPU (or similiar, buy here)
- 128MB DDR 266Mhz RAM (or 512MB for the Facility Server)
- 64MB Flash (or 256MB for the Facility Server)
- A Linux Kernel 2.4.3 (ELinOS with Busybox, however the Gira software itself will run on any Centos or Redhat 2.6.x, even x64 releases!)
- A ISDN adapter (We don’t use that anymore in 2009, everybody is calling VOIP;) )
- Some Gira proprietary Software (hs_trans and hs_main executables)
The drive layout
After some research I also found the following:
A Flash drive is connected as a Master on the second IDE ATA controller (which means it is /dev/hdc) and exists of 4 partitions:
- /dev/hdc1 (2MB) – Boot partition with vmlinux (kernel) and loadlin
- /dev/hdc2 (20MB) – Linux/Operating System, mountpoint: /
- /dev/hdc3 (21MB) – (used to store the project?)
- /dev/hdc4 (21MB) – (for upgrades?)
The boot process and hs_trans and hs_main programs
When starting the homeserver, the vmlinuz from the Boot partition is loaded (via loadlin / DOS) and it boots the system into a Linux kernel, then a /etc/inittab startup script calls the /hs/bin/start/start.sh script.
The start.sh script does actually two things:
– It starts the hs_trans (Gira propriatary software) which automatically ends after a few seconds.
– Then it starts the hs_main (also Gira propriatary software) which is the main program.
Q. Why does is starts (and ends) the hs_trans program ?
A. This is to load the initial project on the Homeserver via a Serial Connection. When you buy a Homeserver or when you screwed up things, you need to connect it via a Serial connection to load a project. In a project you set the IP address and admin username/password, this information is needed to load later projects via the Network. Projects are configured (made) and loaded via the “Gira Expert” software.
After the first (serial) reload, it will end the hs_trans program and (as set by the start.sh script) load the hs_main program which is the ‘HomeServer software’.
Building your own Homeserver
So yes,.. in theory it would be possible to build your own Homeserver when you buy an Via Epia board with onboard processor (see above), two flash modules (I suggest 2048MB) and at least 256MB RAM or even make a Virtual Machine (VM) in VMware or XenServer of it.
Offcourse you are not allowed to run the propriatary hs_main and hs_trans executables or to use the Gira Expert software! I do not encourage or support illegal things, this is just for educational purposes. The following steps are just Theory (draft). You need a license or approval from Gira to do this stuff in practice.
10 Steps to build a home-made Home server
- Install your favorite Linux (this can be in a VM as well).
- Add a 2GB disk and connect it to the third IDE controller (or in VMWare/Xenserver choose the ‘third’ disk position’, this way it will be hdc or xvdc (in XenServer)
- Partition the 2GB disk as below, using ‘fdisk /dev/hdc’ (Or /dev/xvdc for XenServer)
Create 4 new Primary partitions (using the ‘n’ key)
– The first (size): +2048K
– The second (size): +xxxxM (whatever you want, but at least 22MB smaller then the total disk space!)
– The third (size): +10240K (if all works, you can experiment making this larger)
– The fourth (size): +10240K (if all works, you can experiment making this larger)Then set the correct Type for the partitions (using the ‘t’ key)
– The first, type: 1 (FAT12)
– The second, type: 83 (ext3) (or make it any other type, as long as you can install your prefered Linux on it)
– The third, type: 4 (FAT16 <32MB)
– The fourth, type: 4 (FAT16 <32MB)
Now press the ‘w’ key to write the partition table.
- Download and install the Gira Expert Software. After installing it on a Windows PC you will see a file named: FIRMWARE.DAT in the directory: C:\Program Files\Gira\HS+FS\exp232\EN\firmware. Unzip that file (it is a zip file with a .DAT extension).
- Copy the HSERVER2.TGZ file to your newly installed Linux server (using WinSCP or another tool) and untar it to /root/ using:
tar xvzf HSERVER2.TGZCopy the extracted “hs” directory to /
cp -r hs /
- Set firewalling and SELINUX off:
chkconfig --level 12345 iptables off
vi /etc/selinux/config AND SET SELINUX=disabled
- Because this would be your Home server and you want some flexibility, install the following system tools, libraries and compile tools (using yum or any other tool):
yum install lrzsz.i386 setserial.i386 unzip.i386 zip.i386 joe.i386 nc.i386 telnet.i386 busybox.i386 mlocate setuptoolyum install libjpeg.i386 libpng.i386 libpng-devel.i386 giflib.i386 giflib-devel.i386
yum install make.i386 gcc gcc-c++ kernel-xen-devel.i686 perl
- If you are on XenServer (which means the devicename of the 2GB drive is /dev/xvdc) or the devicename of the 2GB harddisk is not /dev/hdc, then edit the following file:
and put the following lines at the end:
(Make symlinks to fake the hdc device. Link it to your XenServer xvdc device or if you have another device, link it to the proper name)
/bin/ln -s /dev/xvdc /dev/hdc
/bin/ln -s /dev/xvdc1 /dev/hdc1
/bin/ln -s /dev/xvdc2 /dev/hdc2
/bin/ln -s /dev/xvdc3 /dev/hdc3
/bin/ln -s /dev/xvdc4 /dev/hdc4
- The Gira license is based on the MAC address of the Network Adapter. All MAC addresses/ranges of all Homeservers are hard-coded in the firmware. I noticed this because new homeservers would not allow to load old Firmware (because their MAC address is not yet coded in the firmware). When you have a virtual server it is not a problem to fake a MAC address, however on physical servers it could be harder.
The real thing is that the Homeserver does not read the MAC address from the hardware, but from the ‘ifconfig’ tool. So if you make a fake ‘ifconfig’ tool/file, it will just continue:
mv /sbin/ifconfig /sbin/ifconfig_original (Rename the ifconfig file in case we need it later)
and insert the following lines to it:
echo "eth0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX:XX "Replace XX:XX:XX:XX:XX:XX with a licensed MAC address. It’s not hard to get a Gira Homeserver MAC address when you know Gira is using Via mainboards and VIA claimed some “00:40:xx” MAC range. (Search query: +Gira +Homeserver +00:40:).
echo "inet addr:192.168.X.X Bcast:192.168.0.255 Mask:255.255.255.0"
echo "inet6 addr: fe80::3c1b:d9ff:fe30:c59c/64 Scope:Link"
echo "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
echo "RX packets:41502 errors:0 dropped:0 overruns:0 frame:0"
echo "TX packets:33355 errors:0 dropped:0 overruns:0 carrier:0"
echo "collisions:0 txqueuelen:1000 "
echo "RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)"
echo "loLink encap:Local Loopback "
echo "inet addr:127.0.0.1 Mask:255.0.0.0"
echo "inet6 addr: ::1/128 Scope:Host"
echo "UP LOOPBACK RUNNING MTU:16436 Metric:1"
echo "RX packets:0 errors:0 dropped:0 overruns:0 frame:0"
echo "TX packets:0 errors:0 dropped:0 overruns:0 carrier:0"
echo "collisions:0 txqueuelen:0 "
echo "RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)"
Replace the 192.168.X.X with the IP address of your Homeserver.
Try if it will load the hs_main program:
Unfortunatelly there is no easy way to quit the hs_main program. You can login using a new SSH session and type “killall hs_main” or just hard-reboot the server.
If it does load, you can automatically load the program when booting:
and add the line: "/hs/bin/hs_main" to the end of the file.
- The following is only needed for virtual machines since they do not have a serial port (ttyS1). A serial port is needed for the hs_trans program to load the initial project.
In VMWare you can add a serial port, however in XenServer that is not possible. You have three options:VMWare (only works with VMWare Workstation, not VMWare Player)
– Add two serial ports in to your Linux VM. Since it don’t works to map those ports to your local Windows PC, you have to create a new WindowsXP VM and also add one serial port to that VM.
Then you could connect the serial port of the Linux VM to the serial port of the Windows VM.
These two screenshots are the settings of the Linux VM
Below are the settings of the WindowsXP VM
Now boot both the VMs, install the Expert software on the Windows VM and load the initial project via Serial Port 1 (while running the hs_trans on the Linux VM).
XenServer (options are limited)
– Use a virtual COM port driver on your Homeserver (Linux) and connect it via the network to your Windows virtual COM port (you need a Windows virtual COM port driver here). I didn’t tested this and don’t have any clue which software to use.
– When you buy a Console switch you can connect the Homeserver to a port on the console switch (virtual drivers are mosly included). You can then connect (hard-wire) your Windows PC to that same port on the Console switch. I have a Aten SN0116 Console Switch and use this technique quite often. It should work with other console switches too, but please check if they have Virtual COM port drivers for Linux!
If none of the above is working, this is your option
– The easiest: Copy the 3rd and 4th partition (hdc3 and hdc4) from someone else. The initial project which you normally load via a Serial cable is hold on these partitions, so if you copy that.. you skip the serial part. Use ‘dd’ or Acronis or Ghost tools to do the job.
Note: Create a new -empty- project in the Gira Expert software and only configure the following settings: IP information, admin password and EIB&iETS (ip) settings. Make sure to disable the interface/QuadClient under interface uncheck “Use QuadClient”.
Now you have a very small ‘initial’ project to load over the unstable Serial interface. Large projects will get many CRC errors and timeouts and finally the Expert software will tell you a weird error about ‘Project too Large’.
After you loaded the inital project, you can load all further projects via IP.
If you did all the above steps, in theory, it should be possible to create your own Homeserver.
Update 14-november-2009:In the ‘old’ 10 steps, I suggested to install Linux on the /dev/hdc drive. That brings several problems because the hs_main program seems to rewrite the partition table of the /dev/hdc which also corrupts your second partition on which you installed Linux (even when removing “sfdisk”). This behaviour happens when loading via the network, not when loading via Serial.
So I changed the previous steps because it’s much easier to install Linux on a separate drive and ‘add’ a /dev/hdc drive so the software still uses the /dev/hdc to store projects in it’s own format and it can do with the partition table of the /dev/hdc drive what it wants, without corrupting the your Linux installation (which is on /dev/hda or another drive).