Archives

Blogroll

I usually install Debian machines with software RAID and LVM, until today I have not needed to recover one disk from outside the the system. It is a little bit trick, I decide to make this post for my own interest and help others.

I have been always an amateur sciencist person, I like a lot Carl Sagan, astronomy, maths and computers. One devices that fascinated me a lot are sundials, I have combined it with my computer knowledge, and this is my contribution to the 2.0 sundial technology. 🙂 This post explain what I have done 🙂

I have designed is about paper sundials, sundials are tools that tells you the time, only with the shadow of the sun, to design a sundial you need to know exactly, where are you going to put it, you need to know the longitude, the latitude and the orientation of the wall with respect to North.
I have designed a web page, integrated with Google Maps, that helps you to find easily all the parameters needed, and finally produce a printable page, with a sundial paper cut, that can be cut and folded and give you a vertical Sundial.
This page allows you to make your own Cut Out Paper Vertical Sundial customized to your place on earth and the declination of the wall you are going to put it.

You will obtain a paper sundial like this:

the webpage gives you a printabel PDF, that you only need to cut and fold, this is a sample:

On this post I will explain howto install samba on Voyage Linux 0.5 version. Voyage Linux is the distribution I have installed on the minimotherboard Alix.

As you should know the systme doesn’t use a hard disk, It uses a Compact Flash memory card, that makes the hard disk functionality, I have a 8Gb compact Flash memory card where I have all teh space that I need.

the main disavantage of Compact Flash media, is that they are not writable every times you need, They have a nunmber of times you can rewrite, this number is high, between 300 thousand to million, that is the reason taht all the system, the voyage Linux distribution, is mounted read-only. you have two scripts, “remountrw”, to mount the filesystem with write permissions, and “remountro” to remount read only.
Moreover we have to take this into account on all the applications that need to write on disk.

RAM writable directories

Due that a lot of apps need to write in order to run, Voyage Linux, have a memory mounted partition where you can write, that is space is small (memory space), and is not permanent, you lost it where the system is rebooted.
The trick is that exists a directory called /ro where is all the information that will be copied to teh volatile directory on boot-time, the script taht makes that copy is on /etc/init.d/mountall the last line makes the copy using tar , tar -C /ro -cf - . | tar -C /rw -xf - > /dev/null 2>&1

And then when you need a writable directory yo make a link to the /rw directory, we can see an example with the var directory.

One interesting function our embedded is file sharing, we can share flash contents and contects mounted on usb ports.

This are the way to have it working:

#remountrw
#apt-get install samba
#remountro

since this point, It would be a normal samba installation on Debian, but if you try to boot samba it complans about file write permissions on the files located on /var/lib/samba, however samba works perfectly with remountrw, moreover we have to “convert” that files in writable ones.

As I explain on previous posts, I adquired a cheap two SATA bays home NAS, called Netgear Stora. After the disappointing privacy a features unfunctionalities the manufacturer give to us, the community again have achieved to develop an alternative way to open and use the software for this device, It is now achieved!! you can run an standard ARM Linux distribution on it!!

Every year I assist to Benaguasil party and colabotate with the organization on technical issues, mainly Internet access, each year we have a different scenario, the sponsors one year give us an ADSL, other year a Cable modem, even a wifi access. We always have a Linux server that deals with the connection and give access to the LAN-party doing NAT,or proxy.

This year (2005) we had four Cable Modems each one with 4MB download rate. The exact equipment were four cable modems with one Ethernet port with DHCP assignement (with no configuration options and no NAT option only single mode). We have a Linux server with five ethernet adapters.

And we want to give this download thougput (4Mb x 4) to the LAN party.

Aproaches

We made a brainstorming thinking about how to use all four connections, some ideas, only one of them developed (Are all other posibles?).

-We thought to use a comercial solution, like linkproof from radware, probably we could obtain one borrowed, but we have no clear experience about that product with four ethernets with dhcp on each port. But more important we want to make it work with free software 🙂 only with the Linux server.

-SQUID: A network of squid caches, each one connected to a different Cable modem. Is posible to one squid on a multihomed host to balance connections? All questions unknow.

-To distribute the hosts on LAN, giving each group of hosts a different default gateway. The problem was that we need four host to NAT, due that Modem Cable don’t allow NAT, single IP for each one. We had only one PC, to do everything, with for Pcs, or NAT capable routers this aproach could be achieved, but we didn’t try due to lack of PCs.

-To statically NAT and route routing each group of client host for a specific gateway. This is very similar to the case before, but done with only on Pc, with source routing and NAT. I thought it is posible to do, buy we didn’t make it works.

-To statically NAT and route routing each group of protocols for a specific gateway. This is basically the same, but making policiy routing works giving each protocol a routing gateway thought different cable modem, this solutions have an special characteristic, you could assign web trafic a Cable modem, P2P other Cable modem, having some QOS a service control.

-To dynamicaly balance route and NAT. Better that do assignments of clients or protocols, we try this aproach that balance dinamically each line. This is what we are going to explain how we did it 🙂

Choosing distribution

I am a Debian fan, and then don’t try to install any other distribution. Then we install Debian sarge, however this tutorial have no very specific distribution issues, and I think it could work on any distribution with iptables toools, etc..

The setup

We have five ethernet interfaces, one of them is the internal LAN interface with a static IP, all others have dhcp ip assigned by the cable modem Operator Ono, our /etc/network/interfaces was:

The default factory software is very impressive, but can tell about it too bad and too good things, It have amazing features, some arbitrary limits and some scary features with serious privacy and loos of control concerns.

The main arbitrary limits are:

-RAID 1 as only posible setup of disk, if you want to have two disk wituot mirror you can’t.

-Limit the number of user to 3 (this limit and others must be eliminated paying a subscription!! 🙁 ).

-Lacks some services and protocols like rsync, nfs, or console access.

The device is capable of serving your content on local LAN with SAMBA (windows shares), and is capable to serve the content with via web with http, you can access your content from your LAN, and even from any point of Internet, you can access your photos, your videos, your documents from any point of Internet, the device is able to modify your router setup, (via Upnp), and give access to external access. It have amazing features, via web you can listen your MP3, see your videos, amazing for a non expert user.

The concerns came when you realize that to access as a administrator of your device, you have to access throught the Netgear portal, your NAS is not administrable without Internet acess (and Netgear server availability), once the NAs is setup it can server contents on LAN, buy you can’t do any administration task witout Internet. What happen if Netgear have availability problems? And you Internet provider avalability? And What happen if Netgear have security problems? All your private files would be available for everyone?

With that drawbacks, I was seriosly thinking about returning the device, but I thought, What if could run a fully controled Linux version where we can add all the features we need, less commercial and user-friendly but with all the control?? Thinking about the same I have with the linksys router, Siemens Gigaset, etc.

Due to the device is new in the market, there are still no alternative firmwares, the developer community (hacker community as a good term), still have no time to develop, buy they discover they could obtain root, and in short term It will be possible to install all you wish, It will be possible to install Debian, Then I have decide to wait to that 🙂

If you are interested on developments to free the device, visit http://hardwarehackersunite.com/ you will find people working on that, There will be advances soon..