How to Setup a Zotac ZBOX
Re-installing the Operating System
When first configuring a Zotac device, there will most probably no operating system (OS) be installed. Thus, entering an USB device with an OS will automatically boot and we can start the installation process without any problems.
However, if we want to install a new OS on a ZBOX which already has an OS installed, we need to enter the BIOS and reconfigure some settings. We do the following:
- During startup process we press DEL (or ESC?).
- In the menu we use Forced FDD instead of Auto.
- In the menu we choose to boot from USB before SATA.
SSH Configuration
Setting up the OS again or any other change regarding the SSH server changes the public key of the server. Thus, when connecting from a remote host that added the old SSH public key to its list of known hosts, must delete this key in order to allow connections to the new host. Assume that when connecting to the server we get the message:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ [...] Offending key in /home/username/.ssh/known_hosts:23
We can delete the corresponding key with:
sed -i "23 d" .ssh/known_hosts
Install the nl80211 Driver
We want to use a Zotac ZBOX as an access point. As the driver that is installed by Ubuntu Server 10.04 called rt2860sta does not allow to do so, we have to undertake additional steps. There is heaps of forum entries that may partially solve this problem. As it is non-trivial to separate the useful from the unnecessary entries we looked around further. We found this howto that looks appropriate and may work. As we guessed that not all steps are mandatory, we provide an additional description here. Unfortunately, we had to stop the experiment before we got things working, so if you have a driver that does not support managed mode, the following steps ALONE will not fix your issue.
You have been warned!
When setting up hostapd we may get an error such as invalid/unknown driver 'nl80211' when trying to start hostapd. If this happens we follow the instructions described in the wireless documentation to fix it. Prerequisites for the following steps are that you have some software installed. Let's get the prerequisites straight:
sudo apt-get install gcc sudo apt-get install autoconf sudo apt-get install libssl-dev
Then we start by executing:
wget http://w1.fi/releases/hostapd-0.7.3.tar.gz tar xzvf hostapd-0.7.3.tar.gz cd hostapd-0.7.3/hostapd cp defconfig .config
Now we edit the configuration file to include the nl80211 driver by uncommenting one line.
nano .config
CONFIG_DRIVER_NL80211=y
We have to download also the libnl library.
cd ../.. wget http://libnl.sourcearchive.com/downloads/1.1-6/libnl_1.1.orig.tar.gz tar xzvf libnl_1.1.orig.tar.gz autoconf ./configure --prefix=/usr
Now before compiling we have to fix one thing. We have to include the limits.h before #include <arpa/inet.h> in the include/netlink-local.h
sudo nano include/netlink-local.h
#include <limits.h>
Now we can compile the library and the hostapd:
make && sudo make install cd ../hostapd-0.7.3/hostapd/ make && sudo make install
Assuming that compiling and installing went fine, we want to test the hostapd deamon again:
sudo hostapd /etc/hostapd/hostapd.conf