NAS space getting low

Alas after 3 running for 3 years the space on my home NAS is running low.

Filesystem            Size  Used Avail Use% Mounted on
/dev/md0              915G  905G  9.9G  99% /
So it's time to upgrade however due to budget constraints and the fact I need 2 for raid it will only be to 2TB drives.
Now comes the question of which disks to use. Currently I use 1TB Samsung HD103SJ drives and to be honest they've served me well in a 24/7 environment running for 3 years. 
Go with cheaper Toshiba drives for £60 each http://www.amazon.co.uk/Toshiba-DT01ACA200-7200rpm-Internal-Drive/dp/B009CPDI62/ref=cm_cr_pr_product_top however i'm a little cautious as I haven't used Tosh drives much. 
Or for £77.96 each I can have the quality Western Digital "RED" drives http://www.amazon.co.uk/gp/product/B008JJLZ7G/ref=nosim but reading the reviews on amazon there seems to be an issue with warranty being 'out of region' which means they will not honour the warranty in the UK meaning you would only get the 1 year warranty from amazon and not the full 3 year WD one. It also appears the seller is shipping the 3 platter version instead of the 2 platter one which perform better with less noise.http://rml527.blogspot.ca/2010/10/hdd-platter-database-western-digital-35_9792.html
After some research and reading of reviews i've decided to stick with the samsungs and found them slightly cheaper here http://www.cclonline.com/product/72739/ST2000DM001/Hard-Drives/Seagate-Barracuda-7200-14-2TB-Hard-Drive-7200rpm-SATA-64MB-Internal-/HDD1317/
Continue Reading

Add Wireless To The Raspberry Pi

I had bit of a nightmare getting wireless to work properly so I put together this howto hoping it will help others. This was done on a raspberry pi running raspbian (wheezy).

sudo apt-get install wireless-tools wpasupplicant

get your psk using the following command where yourssid is your SSID’s name ie HOME and where passphrase is your wireless password ie PASSWORD123 wpa_passphrase yourssid yourpassphrase

Using my examples above this should output the following

network={
ssid="HOME"
#psk="PASSWORD123"
psk=57d9fbb3d0e8eed3bd17d76a61805e2c4b73a81d1686debeaf44559d8bc15800 }

From this copy the psk string then

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

and insert it onto the psk line and edit the SSID name, save and exit.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid=”HOME”
scan_ssid=1
psk=57d9fbb3d0e8eed3bd17d76a61805e2c4b73a81d1686debeaf44559d8bc15800
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}
sudo nano /etc/network/interfaces and add the following (obviously adjust it to your network setup ie static etc), save and exit
auto lo
iface lo inet loopback
iface eth0 inet dhcpallow-hotplug wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dwext -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B
Now I had a problem whereby wirless was only bougth up when the wired conneciton was plugged, obviously this defeats the whole object of wireless so I managed to come up with this fix
sudo nano /etc/default/ifplugd and add the following
# This file may be changed either manually or by running dpkg-reconfigure.
#
# N.B.: dpkg-reconfigure deletes everything from this file except for
# the assignments to variables INTERFACES, HOTPLUG_INTERFACES, ARGS and
# SUSPEND_ACTION. When run it uses the current values of those variables
# as their default values, thus preserving the administrator's changes.
#
# This file is sourced by both the init script /etc/init.d/ifplugd and
# the udev script /lib/udev/ifplugd.agent to give default values.
# The init script starts ifplugd for all interfaces listed in
# INTERFACES, and the udev script starts ifplugd for all interfaces
# listed in HOTPLUG_INTERFACES. The special value all starts one
# ifplugd for all interfaces being present.
INTERFACES=""
HOTPLUG_INTERFACES="wlan0 eth0"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"

Save and exit then reboot and hopefully your wireless interface will be bought up and connect successfully.

Continue Reading

Thecus Woes

Well I have battled long and hard with my Thecus N2100 and basically i've had enough of it. 

I installed the debian firmware image via the stock gui and rebooted. I was able to login into the installer via SSH. After setting up the disk partitions the next step was to format them. Now what would happen was it would get up to 33% and and not go any further (depending on the size of the disk it can can a long amount of time for the progress bar to go beyond 33% and this is normal) however a ping I would have running would fail to respond after a couple of minutes and the SSH connection would finally drop. I tried this numerous times raid/no raid etc and always the same result. 
Faulty hardware I though so bought another with different disks etc and guess what? yep same problem. 
Next step was a serial connection so after a lot of messing around 9took days) with different cables/connectors etc I finally got one working. 
Now i'm left with one I managed to return to sotck and another which is bricked and says 'No network devices found' the top NIC doesn't even light up when plugging into it so either the chip or ports are toast.
Continue Reading

Debian on Thecus N2100 NAS

I bought a Thecus N2100 NAS a while ago with the view of putting debian on it however what I found was that no matter what combination of disks and hardware I used the process always failed during partition formatting. The progress bar would go up to 33% and after a minute or so all hard disk activity would stop and a few minutes later the ssh connection would drop and the IP being un pingable. 

Now it's common for the progress not to go above 33% for what can be hours depending on your hard disk size however the dropping of the connection is fishy indeed so today i'm going to install a serial header and see what that tells me.
Continue Reading

Linksys WRT54G Hacking Part 4 – Changing The Firmware

When my linksys arrived it was already running a non stock firmware Tomato Version 1.27vpn3.6.4b664ba6 now as a previous user of dd-wrt I decided I would go back to that. First off it's a bad idea to go from one non stock f/w to another, stock to non stock gives you the best chance of an upgrade without bricking. 

So I followed this procedure

Hard Reset (aka 30/30/30 reset):

The following procedure will clear out the NVRAM and set dd-wrt back to default values:

  • With the unit powered on, press and hold the reset button on back of unit for 30 seconds
  • Without releasing the reset button, unplug the unit and hold reset for another 30 seconds
  • Plug the unit back in STILL holding the reset button a final 30 seconds

I downgraded back to stock WRT54GSv3_4.71.4.001_fw did the 30/30/30 again then upgraded to dd-wrt.v24_mini_generic however I found it didn't had support for SD cards in it which is a future mod I have planned so again I did a 30/30/30 and downgraded back to stock before reupgrading to dd-wrt.v24_std_generic

One of the first things I did was enable SSHD via the 'services' tab however when I clicked apply setting my browser was forwarded to a blank white screen @ http://192.168.1.1/applyuser.cgi I tried the same again in a different browser and it worked fine, it may have been a remnants of an old session cookie or something.

 

Continue Reading

Linksys WRT54G Hacking Part 2 – Adding Serial Ports

Requirements
Soldering/de soldering equipment
1x 10 way header ie from ebay or single a strip and cut your own from maplin

The WRT54G has two serial ports you can access via the 10 pin JP1 header which is found near the front of the router board next to the lights. I ordered some 2×5 10 way headers from ebay.

Here is a picture of where JP2 is, it's the 10 way one on the right the one on the left is a 12 way port used for JTAG which i'll cover later.

The holes in mine weren't pre soldered but i've seen others that have been so if they are you'll need to remove it first. It's then a case of inserting the header with the shortest pins exiting the bottom of the board and then soldering each one.

and how it looks from the top

Continue Reading

Linksys WRT54G Hacking Part 1 – Opening The Case

Now i've been fortunate enough to have previously opened a fair few of these using the widely published method of having the router upside down with the back towards you and pushing the the front two feet away from you. Now on more than one occasion I've managed to break or bend plastic and clips so came up with my own way of doing it and not had any breakages yet.

Place the router on it's side on a flat surface and put the palm of your hand and thumb in between the the legs and gently push until a small gap is created between the blue facia and black casing.

Next insert a small flat head screwdriver between the facia and body

Next gently move the handle of the screwdriver towards the rear of the router which will open the gap all the way down

Then simply 'unhinge' the facia away from the body

Continue Reading