Netgear ReadyNAS and Linux

I am now using the NetGear ReadyNAS RN31200 mostly for backup purposes. I have not configured RAID, and for a while I just plan to use this as a replacement for USB hard drives, which means I simply want to sync files on my main Linux machine and the ReadyNAS via rsync.

First, configure ReadyNAS for use normally, following the instruction given by the manufacturer.

Through the ReadyNAS admin interface (i.e., visit https://READYNASHOST with a browser), create a normal user (Accounts -> Users -> New User) and a group (Accounts -> Groups -> New Group). The username and group should be named similarly to the ones used on my Linux host. Look up in /etc/passwd (where each line looks like username:password:uid:gid:info:home_dir:shell for each user on the host) and /etc/group (groupname:password:gid:group_list) and take notes of uid and gid and use the same values on ReadyNAS.

Enable ssh on ReadyNAS (System -> Settings -> Services and enable SSH service).

Log in to the ReadyNAS via ssh. (It is confusing, but the admin password for the ReadyNAS admin interface is the root password for ssh.)


On the NAS, see if the user and group have been properly created:

nas# cat /etc/passwd
nas# cat /etc/group

In order to use rsync as a normal, non-root user, /etc/passwd needs to be edited (vi is installed on the NAS; if another text editor is preferred, install via apt-get), so that the normal user’s shell points to /bin/bash and not /bin/false:


After this, you should be able to ssh into the NAS as the normal user with password.

Now using rsync is done on my main Linux machine as in:

$ rsync -av somelocalfile user@READYNASHOST:/data/someshare

in which where /data/someshare has already been created through the ReadyNAS admin interface.

That’s it!

Note: The ReadyNAS OS seems to be based on a Debian-like OS, so all the normal Linux configuration tips apply, e.g., setting up password-less login with RSA keys.

Posted in Uncategorized | Tagged , , | 1 Comment

Numba on Debian/Jessie

$ sudo pip install enum34
$ sudo pip install numba

If the use of numba complains of llvmlite not being installed, you may need additional packages:

$ sudo aptitude install llvm-dev libedit-dev
$ sudo pip install llvmlite
$ sudo pip install funcsigs
Posted in Uncategorized | Leave a comment

Using DNS Servers in Debian/Jessie

Say you want to use DNS servers and

In /etc/resolve.conf, have the following line:


and make sure there are no dns-nameservers lines in /etc/network/interfaces.

In /etc/dhcp/dhclient.conf, have the following line:

supersede domain-name-servers,;

Restart the networking service:

$ sudo /etc/init.d/networking restart

Check if the DNS server is used:

$ dig
;; SERVER: (should see the DNS server here)
Posted in Uncategorized | 2 Comments

Creating a Debian netinst Bootable USB Stick with Non-Free Firmware

Debian installation can be a hassle when new hardware with non-free firmware support is necessary. A typical workaround is to use a Debian install image which includes non-free drivers.

Typically, such an ISO CD image is located under here.

Choose the installation you need (for now, it is amd64 Jessie RC1), and download an ISO image:

$ wget

Find a USB stick (which you do not mind formatting entirely; all existing contents on the still will be wiped out with this method), connect it to a working box, and find the device pointer to the stick:

$ sudo fdisk -l
Disk /dev/sdb: 16.0 GB, 16008609792 bytes
255 heads, 63 sectors/track, 1946 cylinders, total 31266816 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xb745c02d

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1              32    31266815    15633392    c  W95 FAT32 (LBA)

We see that the USB stick is attached at /dev/sdb in this case.

Then create a bootable installation stick:

$ sudo dd if=firmware-testing-amd64-netinst.iso of=/dev/sdb bs=4M
$ sudo sync
Posted in Uncategorized | Tagged , , | Leave a comment

Install Google Chrome on Debian Jessie

Download a DEB file for the version of Chrome you want from here.


 $ sudo aptitude install gconf-service libgconf-2-4 libnspr4 libnss3 libpango1.0-0 libappindicator1 libcurl3
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
Posted in Uncategorized | Tagged , | 4 Comments

Installing HipChat on Debian Jessie

I simply download HipChat from the official repository and follow the installation instruction there, but when I launch the application, I get the following error:

$ hipchat
libGL error: dlopen /usr/lib/x86_64-linux-gnu/dri/ failed (/usr/local/opt/HipChat/bin/..//lib/ version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/
libGL error: dlopen ${ORIGIN}/dri/ failed (/usr/local/opt/HipChat/bin/..//lib/ version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/
libGL error: dlopen /usr/lib/dri/ failed (/usr/lib/dri/ cannot open shared object file: No such file or directory)
libGL error: unable to load driver:
libGL error: driver pointer missing
libGL error: failed to load driver: radeonsi
libGL error: dlopen /usr/lib/x86_64-linux-gnu/dri/ failed (/usr/local/opt/HipChat/bin/..//lib/ version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/
libGL error: dlopen ${ORIGIN}/dri/ failed (/usr/local/opt/HipChat/bin/..//lib/ version `GLIBCXX_3.4.20' not found (required by /usr/lib/x86_64-linux-gnu/
libGL error: dlopen /usr/lib/dri/ failed (/usr/lib/dri/ cannot open shared object file: No such file or directory)
libGL error: unable to load driver:
libGL error: failed to load driver: swrast

The program gets stuck there until it is killed.

It is not elegant, but HipChat isn’t a very essential application for me, so I simply bandage this by replacing the libstdc++ that comes with HipChat with the one from Debian:

$ cd /opt/HipChat/lib
$ sudo mv
$ sudo mv
$ sudo mv
$ sudo cp /usr/lib/x86_64-linux-gnu/ .

Now HipChat should launch normally.

Posted in Uncategorized | Tagged , | 1 Comment

Installing Hadoop-LZO on Debian Jessie

JDK 1.6 or later is need to be already installed for this to work.

Install a few packages:

$ aptitude install liblzo2-dev maven git

To see where the LZO library is installed, get a list of files installed:

$ dpkg-query -L liblzo2-dev
... list of paths ...

In my box, the include and library paths are /usr/include/lzo and /usr/lib/x86_64-linux-gnu, respectively. (These paths should be recognized without doing anything, but if specifically pointing to them is necessary upon build with mvn later, try:

$ C_INCLUDE_PATH=/usr/include/lzo \
LIBRARY_PATH=/usr/lib/x86_64-linux-gnu \
  mvn clean test

for example.)

Get the source from the Hadoop-LZO github repo:

$ git clone
$ cd hadoop-lzo
$ mvn clean test package

If the build is successful, the JAR should be found under target:

$ ls target/

Typically, the JAR thus created should be installed in $HADOOP_HOME/share/hadoop/common/lib, and the following properties need to be added to configuration files under $HADOOP_HOME/etc/hadoop.

In core-site.xml:


  ... some other properties ...

    <value>                                                                                                                                                                     ,                                                                                                                               ,                                                                                                                                  ,                                                                                                                                 ,                                                                                                                               ,                                                                                                                                ,                                                                                                                                      



In mapred-site.xml:


  ... some other properties ...


Posted in Uncategorized | Tagged , , | Leave a comment

Installing Adobe Reader on Debian/Jessie

Once in a while you need to deal with fancier PDF files which may allow you to type in using forms, but Linux applications like Okular might not be fully capable of handling Adobe’s proprietary features. In such an unfortunate event, you might need to use Adobe Reader.

Go to the FTP download site on Adobe and download the version you wish to install. Here the version 9.x is assumed:

$ wget
$ sudo dpkg --add-architecture i386
$ sudo apt-get update
$ sudo apt-get install libgtk2.0-0:i386 libxml2:i386 libstdc++6:i386
$ sudo dpkg -i AdbeRdr9*.deb

If the installation doesn’t fully complete, you might need to do

$ sudo apt-get -f install

to install the rest of missing packages.

Posted in Uncategorized | Tagged , , | 6 Comments

Using Tor on Debian Jessie

Install the package and start the service:

$ sudo apt-get install tor
$ sudo /etc/init.d/tor start

Check to see if Tor is running:

$ sudo netstat -plant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0*               LISTEN      7766/tor

You should see an entry for Tor.

To simply use this, manually specify SOCKS proxy configuration with localhost:9050. Visit a site like to check what IP address the remote host is seeing; it should be the exit node of Tor and not the IP address of your host.

For a command-line program, use may use torsocks. For example, if you want to use ping with Tor, do:

$ torsocks ping
Posted in Uncategorized | Tagged , , , | Leave a comment

Using NTP Server to Synchronize Time on Debian Jessie

For just one time synchronization, it is easy:

$ sudo aptitude install ntpdate
$ sudo ntpdate

The server to use can be specified from the list given here.

Posted in Uncategorized | Tagged , , | Leave a comment