One day I was browsing the internet and I was looking one of my favourite sites Distrowatch where I check out news for upcoming linux distros. That day I came across this article which talked about the Sheevaplug, a new type of computer introduced in a field called, plug computing. To cut the long story short, after reading the whole article it seemed a really good idea getting one these little 'toys' due its low power consumption (almost 8W with an external USB HDD attached)! I was also fascinated by this product of being so small and running linux.
I placed my order from Globalscale Technologies for only 70 euros plus 30 euros shipping. I could have ordered it from the UK but the company that was distributing them was short of components at that period of time.
Unboxing the plug
SheevaPlug is a small computer which consists of:
The first thing that I had to do was to connect the mini-USB in order to get the serial console up and running. I was using Ubuntu so I installed gtkterm which I think is more usable than minicom that some sites where suggesting. Once you get gtkterm, you instruct it to look for the /dev/ttyUSB0 or /dev/ttyUSB1 devices.
Getting inside the serial console, you will see the U-Boot prompt. There is always an option to stop the automatic boot and enter appropriate information in order to boot from the device of your choice. I have done some research beforehand and I have read that there are various ports to the SheevaPlug & the ARM arch, so one can choose according to his/her preferences. As far as I remember, there were Gentoo, Slackware, Debian, Ubuntu (only v9.04, v9.10 supports ARMv6+VFP instructions, not ARMv5 arch, which I believe is a major drawback), Fedora and FreeBSD ports available to choose from and all of them have guides that can be found online. I chose to go with Debian simply enough because it seemed it had less drawbacks in contrast to other ports. For example, in the FreeBSD port the hardware support was limited to the serial console, gigabit ethernet and the USB port.
There are many ways [1], [2] to install Debian on Sheevaplug, but I prefered to go the hard way which uses manual bootstrapping and it was used in the Distrowatch Weekly article. It seemed a really good idea to start from scratch and watch the whole procedure step by step.
So, I bought an external USB HDD (an Apacher 320GB) which is good and in a decent price. I created 3 partitions: 1 for root, 1 for /home (depends on every user) and 1 swap. NOTE: The root partition MUST be formatted as an EXT2 filesystem or else the U-Boot will not recognize it and it will not be able to boot. For the second partition, I used XFS because I wanted to use it primarily as a download server. After googling a little bit, I came up with this article that was comparing a few filesystems. XFS seemed to fit me better due to its lowest CPU usage, HDD capacity and quick operation handling on large files.
Once I had my disk set up, I started with the installation described in the above link. I chose a Debian mirror which was close to me, so that I may have the maximum speed possible and I followed each step of the installation guide. You will have to have some sort of access to a debian system, to perform the bootstrapping procedure. I will not post it here but I will give some insides I did in order to finish the installation. First of all, when editing the options throughout the guide, be sure to adjust it to you needs. For example, set your hostname in line:
into whatever you want. Also, you can edit the etc/network/interfaces beforehand so that when you login, you can have an internet connection. For my network the setup was:
Although etc/fstab could be edited now, I saved it for later when I could log into the system. Everything up to editing the etc/inittab file went smoothly. Don't forget to disable the tty[1-6] when editing the /etc/inittab because they do not exist (I did not notice the comment on the guide!). The tricky part was before executing the command:
For some reason, no login prompt appeared and re-spawning was not taking place. After googling a little bit I found out that the /dev/ttyS0 node needed for the serial console did not exist so I had to create it (after several reboots) by hand BEFORE the execution of init command. So according to this source I entered in the cmd prompt:
and then:
and Voila! the login prompt appeared! Provided that I had already changed the root password, I was able to login and continue with the installation. The last part where the configuration of U-Boot was taking place, I took extra care because messing up or misspelling something could end up catastrophic (meaning starting over).
Once I had my system rebooted, I logged in as root and installed a dozen of packages such as: SSH, Python, iptables, rsync, samba, nfs, portmap, apache, postgresql, php, perl, transmission-daemon, ntp, transmission-cli, cron and some other I cannot recall right now. Also, I updated /etc/fstab with the second partition information, where my downloads will be stored. Don't forget to set the appropriate permissions, or else you will be getting in to trouble and to perform a swapon /dev/sda[NUMBER] to the swap partition to activate it. Also, I created a normal user so that all operations would be carried away be him and not by root. Since I wanted this server to act as a torrent download server, I followed the procedures described in the previous entries of my blog. In addition, I have set up the download directory (mounted inside my home in my user account) to be shared with Samba (for Windows - yes, I use them once in a while) and NFS (for my Linux PCs).
My complete sheevaplug-based torrent download server
One last thing I had to do was to set the time and date appropriately, and disconnect the USB for the serial connection. Once setup, the device can be controlled through SSH. There are some guides on the internet where one can setup a IceWM graphical environment, but for me the pure and plain headless server with only terminal works better!
In conclusion, experimenting with such a component was extremely interesting and I had a lot of fun doing so, although in the beginning I messed up a little bit and I had to do some system recovery. It is a great component which of course consumes really really low power and it is intended to stay on 24/7 without producing any noise (from fans and stuff). As a future work, I am considering attaching a USB hub / bridge where I will attach one USB camera and install zoneminder for security surveillance.
I placed my order from Globalscale Technologies for only 70 euros plus 30 euros shipping. I could have ordered it from the UK but the company that was distributing them was short of components at that period of time.
SheevaPlug is a small computer which consists of:
- 1 GHz ARM processor
- 512 MB of RAM
- 512 MB of Flash memory
- Gigabit Ethernet
- USB host connector & small USB for serial connection
- an SD card slot
The first thing that I had to do was to connect the mini-USB in order to get the serial console up and running. I was using Ubuntu so I installed gtkterm which I think is more usable than minicom that some sites where suggesting. Once you get gtkterm, you instruct it to look for the /dev/ttyUSB0 or /dev/ttyUSB1 devices.
Getting inside the serial console, you will see the U-Boot prompt. There is always an option to stop the automatic boot and enter appropriate information in order to boot from the device of your choice. I have done some research beforehand and I have read that there are various ports to the SheevaPlug & the ARM arch, so one can choose according to his/her preferences. As far as I remember, there were Gentoo, Slackware, Debian, Ubuntu (only v9.04, v9.10 supports ARMv6+VFP instructions, not ARMv5 arch, which I believe is a major drawback), Fedora and FreeBSD ports available to choose from and all of them have guides that can be found online. I chose to go with Debian simply enough because it seemed it had less drawbacks in contrast to other ports. For example, in the FreeBSD port the hardware support was limited to the serial console, gigabit ethernet and the USB port.
There are many ways [1], [2] to install Debian on Sheevaplug, but I prefered to go the hard way which uses manual bootstrapping and it was used in the Distrowatch Weekly article. It seemed a really good idea to start from scratch and watch the whole procedure step by step.
So, I bought an external USB HDD (an Apacher 320GB) which is good and in a decent price. I created 3 partitions: 1 for root, 1 for /home (depends on every user) and 1 swap. NOTE: The root partition MUST be formatted as an EXT2 filesystem or else the U-Boot will not recognize it and it will not be able to boot. For the second partition, I used XFS because I wanted to use it primarily as a download server. After googling a little bit, I came up with this article that was comparing a few filesystems. XFS seemed to fit me better due to its lowest CPU usage, HDD capacity and quick operation handling on large files.
Once I had my disk set up, I started with the installation described in the above link. I chose a Debian mirror which was close to me, so that I may have the maximum speed possible and I followed each step of the installation guide. You will have to have some sort of access to a debian system, to perform the bootstrapping procedure. I will not post it here but I will give some insides I did in order to finish the installation. First of all, when editing the options throughout the guide, be sure to adjust it to you needs. For example, set your hostname in line:
echo bokassa.mi.bofh.it > etc/hostname
into whatever you want. Also, you can edit the etc/network/interfaces beforehand so that when you login, you can have an internet connection. For my network the setup was:
auto eth0
iface eth0 inet static
address 192.168.1.106
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
Although etc/fstab could be edited now, I saved it for later when I could log into the system. Everything up to editing the etc/inittab file went smoothly. Don't forget to disable the tty[1-6] when editing the /etc/inittab because they do not exist (I did not notice the comment on the guide!). The tricky part was before executing the command:
exec /sbin/init
For some reason, no login prompt appeared and re-spawning was not taking place. After googling a little bit I found out that the /dev/ttyS0 node needed for the serial console did not exist so I had to create it (after several reboots) by hand BEFORE the execution of init command. So according to this source I entered in the cmd prompt:
mknod -m 660 /dev/ttyS0 c 4 64
and then:
exec /sbin/init
and Voila! the login prompt appeared! Provided that I had already changed the root password, I was able to login and continue with the installation. The last part where the configuration of U-Boot was taking place, I took extra care because messing up or misspelling something could end up catastrophic (meaning starting over).
Once I had my system rebooted, I logged in as root and installed a dozen of packages such as: SSH, Python, iptables, rsync, samba, nfs, portmap, apache, postgresql, php, perl, transmission-daemon, ntp, transmission-cli, cron and some other I cannot recall right now. Also, I updated /etc/fstab with the second partition information, where my downloads will be stored. Don't forget to set the appropriate permissions, or else you will be getting in to trouble and to perform a swapon /dev/sda[NUMBER] to the swap partition to activate it. Also, I created a normal user so that all operations would be carried away be him and not by root. Since I wanted this server to act as a torrent download server, I followed the procedures described in the previous entries of my blog. In addition, I have set up the download directory (mounted inside my home in my user account) to be shared with Samba (for Windows - yes, I use them once in a while) and NFS (for my Linux PCs).
One last thing I had to do was to set the time and date appropriately, and disconnect the USB for the serial connection. Once setup, the device can be controlled through SSH. There are some guides on the internet where one can setup a IceWM graphical environment, but for me the pure and plain headless server with only terminal works better!
In conclusion, experimenting with such a component was extremely interesting and I had a lot of fun doing so, although in the beginning I messed up a little bit and I had to do some system recovery. It is a great component which of course consumes really really low power and it is intended to stay on 24/7 without producing any noise (from fans and stuff). As a future work, I am considering attaching a USB hub / bridge where I will attach one USB camera and install zoneminder for security surveillance.



0 comments:
Post a Comment