Pages

Monday, July 16, 2012

Automounting Network partitions

If you have network drives that you would like to be auto-mounted on startup on your Linux box, then the obvious way to do this seems to be to put the appropriate line in /etc/fstab. (Note that for Windows shares, the appropriate packages have to be installed - samba and smbfs).

However, if the fstab is executed before the network comes up, you have a problem - the mount will fail. The workaround is to either
  1. not do auto-mount, OR
  2. delay the mount till the network is up OR
  3. to use a program written specifically for this situation - Autofs. 

Friday, July 13, 2012

From J. N. Tata to Swami Vivekananda


Dear Swami Vivekanand,

I trust you remember me as a fellow-traveller in your voyage from Japan to Chicago [in 1893]. I very much recall at this moment your views on the growth of the ascetic spirit in India and the duty, not of destroying, but of diverting it into useful channels. I recall these ideas in connection with my scheme of a Research Institute for India, of which you have doubtless heard or read.

Compiling ngSPICE on Ubuntu 12.04

Wanting to install the latest version of ngSPICE on the new Ubuntu 12.04 box, i ran into a little trouble. The first is that ngSPICE is a very powerful interactive software, but the plain vanilla command line is really painful to use because it does not support backspace and arrow keys. The fix for this is to use the GNU readline library. Unfortunately, without the correct X packages installed, you will end up with a functioning installation of ngSPICE that cannot plot data, complaining that it "Cannot open viewport". The fix for this is to install the following packages:

Install autoconf and libtool  if you are running autogen.sh


Install bison, else configure will not run.

For GNU Readline support, install libreadline6, libreadline6-dev
For Plotting, install: libxaw7, libxaw7-dev, libx11-6, libx11-dev

Then run ./configure --with-readline

Then make and then [sudo] make install...

Thursday, July 12, 2012

Backing Up with Rsync

There's always a moment of butterflies when your machine hangs, or doesn't  boot up, or shows some cryptic message and dies. In the few minutes following my last such catastrophe, I berated myself for not taking regular backups on an external drive. Then I started to look at trying to recover the data using a live CD. When I finally got the new OS going I decided the first thing to do was to set up a system to silently backup the system every once in a while, either to a USB hard drive or to a network drive. So I wrote a script to do this using rsync. The script is as follows, with explanations for each line...