Sunday, December 21, 2008

Linux Hard Disk Issue - Excessive Load_Cycle_Count

Prologue: My 2 year old laptop's harddisk had died a few weeks ago, and I replaced it with a Seagate Momentus 5400.3 160GB SATA Drive. I have been running only Linux for a long time on my laptop. (Running Ubuntu Intrepid at present)

While trying to ascertain the cause of this premature death, I came to notice the abnormally high Load_Cycle_Count. This can be checked using smartmontools by issuing the command

sudo smartctl -n standby -a /dev/sda
where /dev/sda has to be replaced with the appropriate disk name. The option -n ensures that if the disk is already in standby, smartctl doesn't wake it up. A little bit of Googling returned quite a lot of stuffs about this issue. Laptop Harddisks, in order to improve power efficiency while on battery, have quite aggressive power management features by default. Now this is not really bad. When the disk is not accessed for sometime it spins down itself. So far so good, the disk stops spinning unnecessarily thereby cutting down power consumption. However no sooner than the disk stops spinning, something causes it to spin up again. This not only defeats the whole purpose of spindown, but also causes unnecessary wear and tear of the disk components. Most modern HDDs have a mechanism which parks the head (loads it up a ramp) when the disk spins down. The head is unloaded back over the platter, once the disk spins up again. However each load and unload cycle causes wear of the loading and unloading mechanism. Seagate HDDs (most others as well) have specifications of maximum of 60,000 load unload cycles. This is quite high. But what I found in my case was, the Load_Cycle_Count was increasing at the rate of about 5-6 per min. That meant the head was parking and unparking every 10sec on avarage. This was quite alarming.
To stop such insane behavior, I set the Advanced Power Management to 254 using hdparm. A value of 254 meant least aggressive power management. By default Ubuntu sets it at 128. This did stop the Load_Cycle_Count from increasing increasing insanely. But the disk now stopped spinning down, and its temperature was shooting up. Within a hour it went up above 60degC (room temp was around 20degC). Now that is even more alarming than the increasing load cycle count. The rated maximum operating temperature for my drive is 60degC. Operating at high temperature severely shortens the life of the disk. At a power management value of 180, the temperature settled at around 55degC. This was better, but not quite good, the disk was 35degC above ambient temperature. During peak summer, the ambient temperature at Kolkata hovers around 40degC. So my disk will get fried up in the summer if I use my laptop in a room without airconditioning.
So preventing the disk from spinning down is not a solution. It has to be ensured that once the disk spins down, it stays like that as long as possible, without spinning up.
I needed to find out who was accessing the disk so frequently. iotop is a nice utility for this. wpa-supplicant was at the top of the list. I am using a wireless connection, and wpa-supplicant frequently logs something. Next was gconf-d, followed by gnome-do and console-kit-daemon. As soon as the disk spins down, one of this will try to do a read/write causing the disk to spin up again. On top of that, every time the disk is accessed, kjournald will write the filesystem journals, update the atime, ctime and mtime of file inodes. All these together keep the disk always busy and wakes it up as soon as it tries to catch a nap.

However there is a utility called laptop-mode-tools which performs some tweaks and tries to keep the hard disk in standby mode as long as possible.
To enable it, first install laptop-mode-tools.

sudo apt-get install laptop-mode-tools
Then it has to be enabled in /etc/default/acpi-support by changing the line
ENABLE_LAPTOP_MODE=false
to
ENABLE_LAPTOP_MODE=true
I changed the configuration file a bit, so as to optimize things as far as possible.
The configuration is there at /etc/laptop-mode/laptop-mode.conf
###### Config file for laptop-mode-tools
## Verbose output on
VERBOSE_OUTPUT=1
## Laptop mode enabled always
ENABLE_LAPTOP_MODE_ON_BATTERY=1
ENABLE_LAPTOP_MODE_ON_AC=1
ENABLE_LAPTOP_MODE_WHEN_LID_CLOSED=1

# When to enable data loss sensitive features
# -------------------------------------------
#
# When data loss sensitive features are disabled, laptop mode tools acts as if
# laptop mode were disabled, for those features only.
#
# Data loss sensitive features include:
# - laptop_mode (i.e., delayed writes)
# - hard drive write cache
#
# All of the options that follow can be set to 0 in order to prevent laptop
# mode tools from using them to stop data loss sensitive features. Use this
# when you have a battery that reports the wrong information, that confuses
# laptop mode tools.
#
# Disabling data loss sensitive features is ACPI-ONLY.
# Disable all data loss sensitive features when the battery level (in % of the
# battery capacity) reaches this value.
#
MINIMUM_BATTERY_CHARGE_PERCENT=3
# Disable data loss sensitive features when the battery reports its state
# as "critical".
#
DISABLE_LAPTOP_MODE_ON_CRITICAL_BATTERY_LEVEL=1

# The drives that laptop mode controls.
# Separate them by a space, e.g. HD="/dev/hda /dev/hdb". The default is a
# wildcard, which will get you all your IDE and SCSI/SATA drives.
#
HD="/dev/[hs]d[abcdefgh]"
# The partitions (or mount points) that laptop mode controls.
# Separate the values by spaces. Use "auto" to indicate all partitions on drives
# listed in HD. You can add things to "auto", e.g. "auto /dev/hdc3". You can
# also specify mount points, e.g. "/mnt/data".
#
PARTITIONS="auto /dev/mapper/*"
ASSUME_SCSI_IS_SATA=1

# Maximum time, in seconds, of work that you are prepared to lose when your
# system crashes or power runs out. This is the maximum time that Laptop Mode
# will keep unsaved data waiting in memory before spinning up your hard drive.
#
LM_BATT_MAX_LOST_WORK_SECONDS=900
LM_AC_MAX_LOST_WORK_SECONDS=600


#
# Should laptop mode tools control readahead?
#
CONTROL_READAHEAD=1
# 10MB readahead in laptop mode
LM_READAHEAD=10240
NOLM_READAHEAD=128

# Disks will be mounted with noatime in laptop mode, atime updates to file inodes will be 
# stopped.
CONTROL_NOATIME=1
# Don't use relatime instead of noatime
USE_RELATIME=0

# set hdd timeout
CONTROL_HD_IDLE_TIMEOUT=1
LM_AC_HD_IDLE_TIMEOUT_SECONDS=60
LM_BATT_HD_IDLE_TIMEOUT_SECONDS=30
NOLM_HD_IDLE_TIMEOUT_SECONDS=7200

# set HDD power management
CONTROL_HD_POWERMGMT=1
BATT_HD_POWERMGMT=1
LM_AC_HD_POWERMGMT=127
NOLM_AC_HD_POWERMGMT=254


# enable write cache
CONTROL_HD_WRITECACHE=1

NOLM_AC_HD_WRITECACHE=1
NOLM_BATT_HD_WRITECACHE=0
LM_HD_WRITECACHE=1

CONTROL_MOUNT_OPTIONS=1


#
# Dirty synchronous ratio.  At this percentage of dirty pages the process
# which calls write() does its own writeback.
# At 80percent of dirty pages disk write is performed. This holds up things in memory and
# prevents frequent disk writes
LM_DIRTY_RATIO=80
NOLM_DIRTY_RATIO=40


#
# Allowed dirty background ratio, in percent.  Once DIRTY_RATIO has been
# exceeded, the kernel will wake pdflush which will then reduce the amount
# of dirty memory to dirty_background_ratio.
# Once writeout has commenced write as much as possible to disk, without keeping back anything.
# So this has been set to 1 percent
LM_DIRTY_BACKGROUND_RATIO=1
NOLM_DIRTY_BACKGROUND_RATIO=10


#
# kernel default settings -- don't touch these unless you know what you're 
# doing.
#
DEF_UPDATE=5
DEF_XFS_AGE_BUFFER=15
DEF_XFS_SYNC_INTERVAL=30
DEF_XFS_BUFD_INTERVAL=1
DEF_MAX_AGE=30


#
# This must be adjusted manually to the value of HZ in the running kernel
# on 2.4, until the XFS people change their 2.4 external interfaces to work in
# centisecs. This can be automated, but it's a work in progress that still
# needs some fixes. On 2.6 kernels, XFS uses USER_HZ instead of HZ for
# external interfaces, and that is currently always set to 100. So you don't
# need to change this on 2.6.
#
XFS_HZ=100


#
# Seconds laptop mode has to to wait after the disk goes idle before doing
# a sync.
#
LM_SECONDS_BEFORE_SYNC=2

After enabling laptop-mode, the hdd is being able to sleep peacefully for quite sometime in between spinups. Also the operating temperature is rarely exceeding 50degC now. The load cycle count is still increasing but at a much slower rate. Hopefully this HDD is going to last longer than the previous one.

Saturday, December 6, 2008

Evolution Of A Linux User

A message taken from Kulua mailing list.
From - Tue Dec 14 13:22:38 1999
Received: from kuhub.cc.ku.edu by lark.cc.ku.edu (8.8.7/1.1.8.2/12Jan95-0207PM)
id PAA0000031643; Mon, 13 Dec 1999 15:07:29 -0600 (CST)
Received: from DIRECTORY-DAEMON by KUHUB.CC.KU.EDU (PMDF V5.2-32 #39821)
id <01JJGH1JNK6800TMXQ@KUHUB.CC.KU.EDU>; Mon,
13 Dec 1999 15:07:27 CST (UTC -06:00)
Received: from violet.jayhawks.net
("port 1826"@violet.jayhawks.net [24.124.24.226])
by KUHUB.CC.KU.EDU (PMDF V5.2-32 #39821)
with ESMTP id <01JJGH1G9GT400TIKN@KUHUB.CC.KU.EDU>; Mon,
13 Dec 1999 15:07:23 -0600 (UTC -06:00)
Received: (from listserv@localhost) by violet.jayhawks.net (8.9.3/8.9.3)
id PAA19912; Mon, 13 Dec 1999 15:06:33 -0600
Resent-date: Mon, 13 Dec 1999 15:06:33 -0600
Date: Mon, 13 Dec 1999 15:06:20 -0600 (CST)
Resent-from: kulua-l@kulua.org
From: Jeffrey Watts 
Subject: Evolution Of A Linux User [LONG]
Resent-sender: kulua-l-request@kulua.org
To: KULUA List 
Reply-to: kulua-l@kulua.org
Resent-message-id: <7T62ND.A.52E.M_VV4@violet.jayhawks.net>
Message-id: 
MIME-version: 1.0
Content-type: TEXT/PLAIN; charset=US-ASCII
Precedence: list
X-Loop: kulua-l@kulua.org
X-Authentication-warning: violet.jayhawks.net: listserv set sender to
kulua-l-request@kulua.org using -f
X-Mailing-List:  archive/latest/8103

---------- Forwarded message ----------
Subject: Evolution Of A Linux User

Evolution Of A Linux User
November 28, 1999

During the past year, the scientists in Humorix's Vast Research Lab Of
Doom have studied the behavior and attitude of the typical Windows and
Linux user. They have found that the average Linux user goes through ten
stages of development from a "Microserf" to an "Enlightened Linux User".
An eleventh stage, "Getting A Life", has also been observed, but only on
extremely rare occasions.

The 11 stages of evolution are summarized below.  Note, however, that this
life cycle is not universal.  Many pundits, Microsoft stock holders, and
PHBs never advance beyond Stage 0 ("Microserf"). Moreover, many extreme
Slashdot addicts are stuck between Stages 6 and 7 ("Linux Zealot") and
never evolve to Stage 9 ("Enlightened Linux User").  And, unfortunately,
far too many people are unable to leave Stage 8 ("Back to Reality") and
achieve Geek Self-Actualization due to problems outside of their control.

STAGE 0. MICROSERF

You are the number one member of the Bill Gates fan club.  Your life
revolves around x86 computers running the latest version of Microsoft
solutions: Windows, Office, Internet Explorer, Visual Basic, and even Bob.
You have nothing but hate for those eccentric Mac weenies with their
click-n-drool interfaces and those stone-age Unix oldtimers with their
archaic command lines.

You frequently send angry letters to your elected representative about
Microsoft's "freedom to innovative".  You think lawyers are evil (unless
they are defending innovative companies like Microsoft). You own an
autographed copy of a book that was ghostwritten by Bill Gates.  Your
blood boils when somebody forwards you a so-called Microsoft "joke" by
email.

In short, you are a Microserf.

STAGE 1. FEAR, UNCERTAINTY, DOUBT... ABOUT MICROSOFT

Your world-view begins to sour as you encounter a growing number of
annoyances with Microsoft products.  The number of Blue Screens increases,
however you ascribe the problem (at first) to conflicts with poorly
written drivers that came with your peripherals.  Icons keep jumping
around the desktop unpredicatably.  You spend 30 minutes one day idly
searching for an obscure configuration option in the Control Panel.

Slowly but surely, you begin to have doubts about the quality of Microsoft
software.  Then, the Microsoft Network, to which you have dutifully
subscribed since 1995, begins to double bill your credit card.  You
attempt to rectify the problem, but are stymied by the burgeoning
bureaucracy of Microsoft's Customer Support Department.  Fear sets in...
will you get your money back?

Meanwhile, something called "Linux" appears on the fringe of your radar.
You immediately dismiss the idea of a viable and quality Microsoft
alternative (Linux is Unix-based and therefore must suck, you conclude).
Nevertheless, you wish something could be done for some of the annoyances
in Windows.  But you do nothing about it.

STAGE 2. FEAR, UNCERTAINTY, DOUBT... ABOUT LINUX

You keep hearing about this Linux thing, and Open Source, and Apache, and
FreeBSD as well.  One of your friends installs Linux and says, "It's cool,
dude!" You discover that the selection of Windows books at your local
bookstore has remained constant while the Linux and Unix books are
multiplying like rabbits. You argue, "Well, this just means Linux sucks...
if there was such a large demand for it, there wouldn't be many books on
shelves."

Nevertheless, as time wears on and Windows becomes more fragile, the
temptation to give Linux a try becomes more and more irresistable. While
at your local SuperMegaOfficeSupplyStore, you pick up a boxed version of
Red Hat on impulse.

With much hubris, you completely ignore the documentation and attempt to
install the OS by the seat of your pants.  The installation is a failure;
Linux simply cannot work with the WinModem, WinSoundCard,
WinIDEController, WinPrinter, WinMonitor, and WinDRAM that came with your
"Windows 98 Ready" machine from CompUSSR.  You don't realize this however,
since you didn't read the FAQs and HOWTOs.  You immediately blame the
problems on Linux and give up.  You ditch your Red Hat copy by selling it
on eBay.

After the installation fiasco, you leave fearful, uncertain, and doubtful
about this "alternative" operating system.  Windows may have its problems,
but Microsoft will fix them in the next upgrade, you reckon.

STAGE 3. BORN-AGAIN MICROSERF

"Linux sucks" is your new attitude towards life.  Windows, all things
considered, ain't so bad.  You resolve to become a better Microsoft
customer by participating in the Microsoft Developer Network and the Site
Builder Network.  You buy a bunch of "study guides" to pass the MCSE
examination.

You launch a Windows advocacy site on some dinky free webpage provider,
utilizing the latest innovations in VBScript, ActiveX, and other
IE-specific features.  Instead of lurking, you now actively participate
in Linux and Macintosh bashing on various Usenet groups.  Upon discovering
Slashdot for the first time, you assume the role of the Bastard Anonymous
Coward From Hell by posting countless flamebait posts about how cool
Microsoft is and how much "Linsux" (as you call it) is a crappy OS.

You proudly wear an "All Hail Chairman Bill" T-shirt and display numerous
pro-Microsoft bumper stickers ("Honk if you hate anti-trust laws") on your
car.  You never leave home without your Windows CE-based palmtop computer.
You make a pilgrimage to Redmond to marvel at the glory that is the
Microsoft Campus.

STAGE 4. DISGRUNTLED USER

Your Microserf ways come to an abrupt end when everything goes wrong. You
lose a vital work-related document to a Windows crash.  You lose your job
as an indirect result.  You find that applying for jobs is difficult...
everyone wants your resume in the latest version of Word, but you have an
older version that has an incompatible file format.

You waste more and more time tinkering with Windows and other Microsoft
programs to keep them in working order.  You encounter serious problems
with Windows, but your calls to technical support only yield the dreaded
response, "re-install the OS".

After much grief you finally land another job at a software company, only
to find out a month later that Microsoft has announced a competing product
to be "integrated" with the next version of Windows.  You soon lose your
job.

You can't take it much longer.  You are now an official Disgruntled User,
and are ready for a way to escape from the depths of Microsoft Hell.  You
are ready for anything at all... even a primitive, archaic,
hard-to-install, grief-laden alternative like Linux.

STAGE 5. A RELIGIOUS EXPERIENCE

You resolve to install Linux now, for real.  Your friends say "It's about
time", and tell you to RTFM this time.  After losing yourself in the
documentation for several days, you figure out why your previous encounter
with Linux was a disaster: you need real hardware, not WinCrap.

With a new computer at your desk, and a Red Hat CD-ROM in hand, you embark
on a voyage of discovery to the land of Linux.  Your life is changed
forever; words cannot describe the rush you feel when you first log in as
"root" after the successful installation.  You stare blankly at the screen
in awe; you are unable to utter a word, unable to think of anything else
except "HOLY SHIT THIS IS SO DAMN COOL!!!!"

You spend hours, and then days, exploring the depths of the Linux system:
a filesystem layout that actually makes sense (no "My Documents" crap),
a command line so powerful it makes MS-DOS look like the Stone Age
technology that it is... and best of all, no Blue Screen!

"Why have I wasted my life with Microsoft?  I'm never going back!" you
exclaim wildly.  You have thrown off the yoke of Redmond Oppression.

STAGE 6. LINUX CONVERT

You still keep a copy of Windows around, but you find yourself booting
into Linux more and more.  The meager amount of diskspace you set aside
for your first Linux install dwindles; you decide to buy a second hard
drive exclusively for Linux.

You re-install everything, including the kitchen sink (Emacs).  Once you
finally get PPP working (it was a nasty challenge, but you're so enamored
with Linux that you hardly notice), you go on a Freshmeat Binge:
downloading and installing every piece of Free Software you come across.

STAGE 7. LINUX ZEALOT

Your enthusiasm for Linux is unbounded.  You do anything and everything
to advocate Linux and spite your old master, Microsoft.  Usenet, Slashdot,
and LinuxToday are your hangouts.  You have a strong opinion about the
GNU GPL and you're not afraid to share it.

Linux World Domination is your new life's ambition; you put career,
wealth, and dating on the back burner.  You participate in flamefests
against those braindead Windows lusers (stuck in Stage 3) that inhabit
Usenet and ZDNet.  You purchase all kinds of tacky made-in-Taiwan Linux
merchandise (T-shirt, mouse pads, stuffed penguins, etc.) to show your
support.

You rearrange books in a bookstore so that the Linux tomes are displayed
more prominently.  You get in trouble with your boss because you spend
all your time surfing Slashdot at work.  You  petition your local
government to migrate their computer systems to free software.  You move
to another residence just so you can say you live on Apache Street.

Instead of a novel, you read the Linux kernel source for pleasure.   You
establish your own regional Linux User Group in the hope that you can
invite a guest speaker in the future and get their autograph.  You learn
Perl with the goal of automating common tasks, but you spend more time
tinkering with "just one more perl script" than actually getting stuff
done.

STAGE 8. BACK TO REALITY

Your zealotry subsides as you are forced to re-enter the Real World. Your
boss demands that you submit documents in the latest Word format, nothing
else will do.  Some of your favorite websites become harder to use because
they keep incorporating features enhanced for Windows and IE.  The new
peripherals you bought from BigEvilProprietaryCo don't work with Linux
and probably never will.

Your ISP is acquired by another company, a very Microsoft-friendly
company, to be exact.  They "upgrade" the system; however, the only change
you can notice is that Linux and PPP no longer work without extensive
hacking.  Then, citing "customer-driven demand", your ISP makes more
"enhancements", and Linux no longer works at all.  Calling their tech
support is an exercise in futility, they simply say, "Linux?  What is
that?  Whatever it is we don't support it, and never will.  Go use Windows
like everybody else."

Reality sets in: you are forced to use Windows more and more.   Your blood
pressure rises, you have more headaches, you waste hours and hours due to
Windows "issues", but you have no choice.

STAGE 9. ENLIGHTENED LINUX USER

Then you have an inspiration: you do have a choice, you can hack your own
drivers for your hardware, you can find another ISP, you can get another
job.  Everything comes into focus, you have become a Linux Guru.

You kludge together drivers for your "Windows-compatible" hardware.  You
finally (after much searching) locate a local ISP that's actually run by
competent geeks, not MCSEs and PHBs. You find a new, better job at a
Linux-friendly company.

In your spare time, you work on various Open Source projects. You build
up a reputation and receive "The Letter" to participate in the IPO of a
Linux business.  You join the bandwagon and create your own Linux portal
website.

You're at the pinnacle of evolution for a Linux user.  With much joy, you
become 100% Microsoft free.  You ditch your Windows partition and burn
all of the Windows disks and manuals that you own.

STAGE 10. GET A LIFE

You become bored with Linux, and computers in general.  You're still a
hardcore geek, of course, but you wonder if there isn't something better
you could be doing.  You've been told to "get a life" countless times
during your existence on Earth, but now you wonder if maybe you should
have heeded that advice.

Unexpectedly, a media conglomerate (i.e. Andover, Ziff-Davis,
Internet.com, etc.) offers to buy your Linux portal website and domain
name for an obscene price that contains a significant number of digits.
Without hesistation you accept; this windfall, combined with your earnings
from Linux stocks, is enough to retire on.

And that's exactly what you do.  You move off to a small tropical island,
and get a life.



-------------------------------------------------------------------------- 
* Please read the FAQ:   http://kulua.org/index.phtml?body=Info/FAQ.phtml
* To unsubscribe:  Send an email to  with the 
following in the body: "unsubscribe " 

Saturday, November 29, 2008

Mumbai Nov 2008 Terror Attacks

"Terror attack on Mumbai" -- this is the headline on every news channel, be it Indian or foreign since the last few days. People seem to have got accustomed to indiscriminate killings and bombings every now and then, terror attacks have become almost a part of our daily life. Some discussion about the need to combat terror after every attack, some blame-game and finally everything settles down. Everything returns back to normal, until another attack kills a few hundred more. The cycle then repeats. People blames the Govt. for being ineffective, state Govt. will blame center, center will put the blame on state, both will then blame neighboring countries. The drama soon gets over, people forget the incident, Govt. forgets the culprits and things move on.
Go to a mall, restaurant, railway station or board a train, you never know the next moment you might be blown up in several pieces or reduced to ashes. We just hope we are lucky enough not to meet that fate. Each time a massacre happens we thank God, that someone else but not myself was killed.
After every attack, the media talks about the audacity of the terrorists, how a few of them can kill so many. Frankly speaking, it doesn't take much to cause a widespread massacre. Blowing up a mall or hotel or train full of hundreds of people doesn't require much resources neither does it take much effort to spray bullets on unarmed people on the streets.
The persons responsible claim to be waging a "holy" war to eliminate the "unholy", to protect their faith. So deep is their "respect" for their religion, that human life seems too insignificant for them. Islamic jihadis will try to establish their supremacy, Hindu extremists will try to establish "Hindutva", some other religion will try to establish their domination and curb down the power of others.
The simple reason: Each one holds their religion and religious ideas supreme.
The consequence: Ordinary men, who are least interested in any of the extremists' dreams of world domination has to pay with their lives.
The only net thing that religious fanaticism has taught us, since the history of mankind is intolerance and hatred. No matter how much any particular religion bluffs about harmony and unity, deep down it builds up a sense of self supremacy over other religions and the moment one starts valuing religious ideals over humanity, it leads to one and only one consequence - disrespect of humanity and loss of innocent lives. "Terrorists" are like the rest of us, only difference - they have been brought up to hold their so called "religious ideals" over and above everything, even above human lives both of their own as well as that of others.
Given the current state of affairs there is very little reason to be optimistic. All each one of us can do is hope, that the next bullet or bomb does not hit any of us.

Saturday, November 22, 2008

Setting up local Ubuntu & Debian mirror using apt-mirror

Prologue: Our institute was moving to it's new campus. For a central Govt. run research institute, the huge land requirements forced it to be located quite far off from the city. It is a remote place around 50km from Kolkata, WB, India. Leased line internet connectivity is there in the Institute, but there was a "rumour" that internet connectivity will not be provided in the student's hostel. There is a large number of Ubuntu and Debian GNU/Linux users among the students. Whether the rumour was true or not, I could not have taken any chance. I had a spare 60GB Seagate USB HDD. It was big enough to hold the main, universe, multiverse and restricted packages for Intrepid and the main, contrib and non-free packages for Lenny. In addition to that I also mirrored a few other extra stuffs. We had a about a month to go, before we left for the new campus, so I set out for finishing the job before that. Ofcourse the biggest hurdle was bandwidth. We had a 2Mbit/s ADSL link in the hostel. So I knew it was going to take a few days to finish the download.
There are several ways to make a offline copy of ubuntu or debian repo. I found apt-mirror most easiest to use. I have documented the steps here, just in case someone else finds it useful.
i) The first job is ofcourse to install apt-mirror, it is there in the repo, so this step is trivial
sudo apt-get install apt-mirror

ii) The next step is to tell apt-mirror, whats stuffs to mirror. The configuration files for apt-mirror is in /etc/apt/ubumirror.list and /etc/apt/debmirror.list
Here are the two files:

ubumirror.list
### ubumirror.list
############# config ##################
#
set base_path /home/sambit/stjet/mirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch
set nthreads 20
set _tilde 0
#
############# end config ##############
#Packages
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid main restricted universe multiverse
#Updates
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-updates main restricted universe multiverse
#Security updates
deb http://security.ubuntu.com/ubuntu/ intrepid-security universe main multiverse restricted
#Proposed
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-proposed restricted main multiverse universe
#Backports
deb http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-backports restricted main multiverse universe
#Openoffice3
deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main
#Partner repo
deb http://archive.canonical.com/ubuntu intrepid partner
#Medibuntu packages
deb http://packages.medibuntu.org/ intrepid free non-free
clean http://ftp.twaren.net/Linux/Ubuntu/ubuntu/


debmirror.list

### debmirror.list
############# config ##################
#
set base_path /home/sambit/stjet/mirror/debmirror
#
# if you change the base path you must create the directories below with write privlages
#
# set mirror_path $base_path/mirror
# set skel_path $base_path/skel
# set var_path $base_path/var
# set cleanscript $var_path/clean.sh
# set defaultarch
set nthreads 20
set _tilde 0
#
############# end config ##############
deb http://ftp.twaren.net/debian/ lenny main contrib non-free
deb http://ftp.twaren.net/debian/ lenny-proposed-updates main contrib non-free
clean http://ftp.twaren.net/debian


My 60GB SeagateHDD inside Transcend StoreJet USB enclosure was mounted at /home/sambit/stjet , so the base path was /home/sambit/stjet/mirror , which meant all the stuffs would be downloaded to the mirror directory inside the disk.
The deb lines tells apt-mirror what to mirror. I had selected main restricted universe multiverse for intrepid, as well all the updates including security, proposed and backports. A few additional repos were also selected. ftp.twaren.net is located in Taiwan, and from my experience I have seen it gives the best download speed in my location. Unfortuntely in India bandwidth is sitll not as easily available as it is in other countries. The official ubuntu mirror in India is at the Indian Institute of Technology, Madras, but the download speed from it is quite slow compared to the Taiwanese mirror.
The last line clean http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ and clean http://ftp.twaren.net/debian tells which directory to check for cleaning up disk space if possible.
iii) To start mirroring type

sudo apt-mirror /etc/apt/ubumirror.list

and
sudo apt-mirror /etc/apt/debmirror.list

It will show how many GBs have to be downloaded. In my case it was around 25GB for the ubuntu mirror and around 20GB for the Debian mirror. That would have required a couple of days with the 2Mbit/s connection. I used screen for the purpose. The advantage is that the virtual console can be detached after running the command so that the download goes on in the background. I could connect to the detached console any time later using screen -R, to view the progress.
iv) The packages are to be served over http. So a webserver is required for this. Use either the mighty Apache2 or the lighty Lighttpd. Apache2 was already installed in one of my old PIV. So I didn't have to do anything extra for this. All I need was to create symlinks in the /var/www/ubuntu and /var/www/debian directory, so that it points to the packages.

ln -s /home/sambit/stjet/mirror/mirror/ftp.twaren.net/Linux/Ubuntu/ubuntu /var/www/ubuntu/ubuntu
ln -s /home/sambit/stjet/mirror/mirror/packages.medibuntu.org /var/www/ubuntu/medibuntu
ln -s /home/sambit/stjet/mirror/mirror/ppa.launchpad.net/openoffice-pkgs/ubuntu /var/www/ubuntu/ubuoofficeppa
ln -s /home/sambit/stjet/mirror/mirror/archive.canonical.com/ubuntu /var/www/ubuntu/ubupartner
ln -s /home/sambit/stjet/mirror/mirror/security.ubuntu.com/ubuntu/ /var/www/ubuntu/ubusec
ln -s /home/sambit/stjet/mirror/debmirror/mirror/ftp.twaren.net/debian/ /var/www/debian

v)The hostname for the machine is mars.iiserk.net (don't try to access it, it is behind a firewall and not accessible from the internet). I now have my own Ubuntu Intrepid mirror at http://mars.iiserk.net/ubuntu
vi) The last step is to modify the /etc/apt/sources.list for the client machines, so that they pull down packages from mars.iiserk.net.
Here is my copy for my laptop running Ubuntu Intrepid:

##Local Mirror##
##Stuffs##
deb http://mars.iiserk.net/ubuntu/ubuntu/ intrepid main restricted universe multiverse
deb http://mars.iiserk.net/ubuntu/ubupartner/ intrepid partner
deb http://mars.iiserk.net/ubuntu/ubuoofficeppa intrepid main
deb http://mars.iiserk.net/ubuntu/medibuntu intrepid free non-free
##Updates##
deb http://mars.iiserk.net/ubuntu/ubuntu/ intrepid-updates main restricted universe multiverse
deb http://mars.iiserk.net/ubuntu/ubuntu/ intrepid-proposed restricted main multiverse universe
deb http://mars.iiserk.net/ubuntu/ubuntu/ intrepid-backports restricted main multiverse universe
deb http://mars.iiserk.net/ubuntu/ubusec/ intrepid-security main universe multiverse restricted
####################################################
##Internet##
##Sources##
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid main restricted universe multiverse
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-updates main restricted universe multiverse
deb-src http://archive.canonical.com/ubuntu intrepid partner
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-security main restricted
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-security universe
deb-src http://ftp.twaren.net/Linux/Ubuntu/ubuntu/ intrepid-security multiverse
##Others##
#deb http://www.remastersys.klikit-linux.com/repository remastersys/

I didn't mirror the sources, so they were to be pulled directly from the internet, when required. The other packages would be fetched from the my local mirror.
It took me around 5 days to fetch 45GB of data.
To keep the mirror updated, I added to to lines to crontab

2 2 * * * /usr/bin/apt-mirror /etc/apt/debmirror.list >> /var/spool/apt-mirror/var/cron.log
55 2 * * * /usr/bin/apt-mirror /etc/apt/ubumirror.list >> /var/spool/apt-mirror/var/cron.log

These will check for updates every night at 0202 hrs for debian mirror and 0255hrs for ubuntu mirror.

Monday, October 27, 2008

Some more fun with SSH port forwarding and socks proxy

Few days ago I made the following post:

Prologue: Our Institute has several nice Dual Core Machines deployed for the students. Unfortunately the machines are behind a NAT with no port forwarded for external SSH access. Student's hostel is a bit far off from the computational centre. As such if someone felt the need of accessing the machines during non-office hours, it was a wee bit difficult. The sysadmin would not have agreed to forward any ports. Something had to be done....

SSH has a very useful feature - Remote and Local Port Forwarding. We have an old rickety PIII running Ubuntu 8.04.1 in the Hostel, it is connected to the net and is accessible via SSH from the internet. Using a tiny little shell script running on one of the machines in the Institute, I managed to make the old PIII an intermediate gateway for gaining SSH access to the Institute's machines from anywhere in the internet. The script is of few lines, but nevertheless powerful enough to serve our purpose.

#!/bin/bash
while [ 1 ]; do
ssh -C -o ServerAliveInterval=30 -R 4321:localhost:22 serververhostname
echo Retrying
done

Let us analyse what this code does.
First of all serververhostname is the hostname of the PIII server. For example if www.example.com resolves to the public ip of the PIII server, then www.example.com would have been used instead of serververhostname.
The -C option requests compression of all data, to improve data transfer speed over slow connections.
The -o ServerAliveInterval=30 makes the SSH client send a keepalive packet at the application layer every 30s, this is to prevent a timeout, in case the connection is idle.
-R 4321:localhost:22 is the most important part. There is a SSH server running in the Institute's workstation, listening on port 22. "-R 4321:localhost:22" specifies that port 22 of localhost, i.e. of the institute's workstation is to be forwarded to port 4321 of the PIII, such that whenever a connection is made to the PIII on port 4321, the connection gets forwarded over the secure channel to port 22 of the Institute's Workstation.
The while loop ensures that the connection gets re-established if it breaks. You need to use a passphraseless RSA or DSA key for authentication instead of a password, otherwise the ssh client will wait for a password input.
Now suppose in the midst of the night I feel an urge to log in to the machine in my college, but I am (say even a few hundred or thousand miles :D) away from the computational centre, all I need to do is log in to the PIII server in the hostel using ssh from anywhere in the internet. Once I am in there, I issue the command: "ssh -l username localhost -p 4321". Though I am ssh-ing into port 4321 of localhost, effectively the connection is made to port 22 of the Institute's workstation, thanks to the previous ssh port forwarding. No need for persuading the sysadmin to make changes to the NAT or Institute's firewall
.


This time I will talk a bit more on the same stuff.
Several websites are hosted in the Institute's network, which are accessible from the Institute's LAN only. Most of these are web pages by the faculty, meant to provide class notes and assignments. As such it gets difficult to access the stuffs from our hostel. One way is to connect to any of the Institute's workstations through ssh using the former tunnel and then fetch the required page or file using wget and scp. But I didn't like the idea of manually logging in every time I needed to access any file. Possessed by an unusual craving for automation, I set out fixing this itchy problem. Initially I used to set up a ssh SOCKS proxy by using ssh -l username -D *:9090 localhost -p 4321 . This sets up SOCKS proxy on Oak which listens on port 9090. Firefox can be configured to use SOCKS proxy directly. I could browse websites located in the Instiute's LAN, now using this proxy. Anyway this involved the "trouble" of reconfiguring Firefox's proxy settings every now and then. For sometime I was using the Firefox extension Foxyproxy to manage my proxy settings automatically. It recognizes URLs and can be configured to use different proxy settings for different sites. Still I was not completely happy with this solution. I craved for something more.


I had an old PIV named Mars lying around, being used as a torrent downloader. I decided to put it to some good use. My aim was to set up a cgi based proxy server on Mars, so that using a web browser I would get to the cgi proxy and be able to surf any website within the Institute's LAN using the CGI Proxy. For this purpose I set up Privoxy on Mars and made it forward connections to the SOCKS proxy listening on port 9090 on Oak. Apache was already running on Mars. I installed the CGIProxy 2.1beta18 CGI script from James Marshall's Home Page. It gives a nice web interface. Just enter the URL, and it loads the page by relaying the connection through whatever proxy it has been configured to use. In my case it was using Privoxy.
So in effect this is what was happening-

The CGIProxy 2.1beta18 CGI script was relaying connections through Privoxy, which relayed them through the ssh SOCKS proxy, which in turn was going through the encrypted secure tunnel established right at the beginning by the ssh session initiated by the workstation at the Institute. So far so good.

But life is never smooth sailing, there were quite a few more hurdles to overcome. Oak doesn't have 24x7 internet connectivity, it is connected to the net only for 12hours from 1530 UTC to 0330 UTC which corresponds to 2100 IST to 0900 IST. On top of that the connection is an unreliable ADSL connection, which breaks quite often. The script at the Institute's Workstation tries to connect to Oak whenever Oak is online. If unfortunately the ADSL link of Oak, suddenly breaks, the ssh client gets disconnected, but the ghost session persists in Oak. Next when the ADSL link gets re-established, the ssh client in the Institute's Workstation tries to reconnect back to Oak. However due to the previous ghost session, the client is now unable to forward the required port, since the same port is already reserved. So it was necessary to detect and exorcise these ghosts.

The following script ensures that all ghosts are killed and a successful connection has been established from the Institute's Workstation. Only then does it creates the ssh SOCKS proxy server.

#!/bin/bash
while [ 1 ]; do
echo talkback started.
if [ `/usr/bin/w | /bin/grep -wc IPaddress` == "0" ]
then
echo talkback: Sleeping...
sleep 120
elif [ `/usr/bin/w | /bin/grep -wc IPaddress` == "1" ]
then
if [ `/bin/ps aux | /bin/grep ssh | /bin/grep -wc localhost` == "0" ]
then
echo "talkback: logging in..."
/usr/bin/ssh -N -l students -D *:9878 localhost -p 4321 -i $HOME/id_rsa &
else
echo talkback: already logged in.
sleep 60
fi
else
echo talkback: already logged in. shall kill ssh session :D
/usr/bin/skill -KILL username
fi
echo talkback: sleeping...
sleep 60
done
exit 0

IPaddress is replaced by the IP address from which the connection is being made. If no connections exists, which is the generally the case during 0900IST to 2100IST, the script sleeps for 2min and checks again. If there is a connection, then the script checks whether Oak has already logged in to the Institute's workstation or not. If not it logs in and creates the ssh SOCKS proxy listening on port 9878. If more than one connection were made from the Institute's workstation to Oak and the previous sessions didn't get timed out, then the script kills all the sessions of "username", reruns and waits for a new connection to be made to Oak from the Institute's workstation.
P.S. This post has slightly technical stuff and my way of explaining things is somewhat ugly. Leave a comment if something is not clear.

XHTML 1.0 Standards - who cares?

It has been quite a few days, since I started Blogging. On the source code of my blog, it was proudly proclaimed <!DOCTYPE html PUBLIC "-⁄⁄W3C⁄⁄DTD XHTML 1.0 Strict⁄⁄EN" "http:⁄⁄www.w3.org⁄TR⁄xhtml1⁄DTD⁄xhtml1-strict.dtd">
I rushed off to W3C Markup Validator . The fist run showed up 437 errors! Quite high a number it was. Most of them were petty errors like unencoded ampersands in URLs, improper comments and the like. It is true, the extremely demanding XHTML 1.0 Strict standards sometimes becomes too much for web designers, but no one forces a designer to declare <!DOCTYPE html PUBLIC "-⁄⁄W3C⁄⁄DTD XHTML 1.0 Strict⁄⁄EN" "http:⁄⁄www.w3.org⁄TR⁄xhtml1⁄DTD⁄xhtml1-strict.dtd"> either. If Google Blogger is so keen to show off its "XHTML 1.0 Strict" compliance, then it should take up the responsibility that it remains true to its words. Simply asserting some compliance and then relying on the browser to do the rest of the hard work is something that one doesn't expect from Google.

Sunday, October 26, 2008

Snapshots of my room in IISERK Hostel

... Neat and tidy .. isn't it ?
At the bottom of the rack (in the first pic) you can see Oak - our unofficial webserver, fileserver and network router for the hostel. On the table lies Mars - my Torrent Downloader and Music Player. It doubles up as a local mirror for some websites of our Institute's LAN. On the table also lies Pluto my almost always-on Compaq Presario V3018TU. All of them runs some flavor or the other of Ubuntu GNU/Linux. Oak and Mars runs Hardy Heron 8.04.1 LTS while Pluto runs Intrepid Ibex 8.10.

Tuesday, October 14, 2008

Fun with SSH Remote Port Forwarding

Prologue: Our Institute has several nice Dual Core Machines deployed for the students. Unfortunately the machines are behind a NAT with no port forwarded for external SSH access. Student's hostel is a bit far off from the computational centre. As such if someone felt the need of accessing the machines during non-office hours, it was a wee bit difficult. The sysadmin would not have agreed to forward any ports. Something had to be done....

SSH has a very useful feature - Remote and Local Port Forwarding. We have an old rickety PIII running Ubuntu 8.04.1 in the Hostel, it is connected to the net and is accessible via SSH from the internet. Using a tiny little shell script running on one of the machines in the Institute, I managed to make the old PIII an intermediate gateway for gaining SSH access to the Institute's machines from anywhere in the internet. The script is of few lines, but nevertheless powerful enough to serve our purpose.

#!/bin/bash
while [ 1 ]; do
ssh -C -o ServerAliveInterval=30 -R 4321:localhost:22 serververhostname
echo Retrying
done

Let us analyse what this code does.
First of all serververhostname is the hostname of the PIII server. For example if www.example.com resolves to the public ip of the PIII server, then www.example.com would have been used instead of serververhostname.
The -C option requests compression of all data, to improve data transfer speed over slow connections.
The -o ServerAliveInterval=30 makes the SSH client send a keepalive packet at the application layer every 30s, this is to prevent a timeout, in case the connection is idle.
-R 4321:localhost:22 is the most important part. There is a SSH server running in the Institute's workstation, listening on port 22. "-R 4321:localhost:22" specifies that port 22 of localhost, i.e. of the institute's workstation is to be forwarded to port 4321 of the PIII, such that whenever a connection is made to the PIII on port 4321, the connection gets forwarded over the secure channel to port 22 of the Institute's Workstation.
The while loop ensures that the connection gets re-established if it breaks. You need to use a passphraseless RSA or DSA key for authentication instead of a password, otherwise the ssh client will wait for a password input.
Now suppose in the midst of the night I feel an urge to log in to the machine in my college, but I am (say even a few hundred or thousand miles :D) away from the computational centre, all I need to do is log in to the PIII server in the hostel using ssh from anywhere in the internet. Once I am in there, I issue the command: "ssh -l username localhost -p 4321". Though I am ssh-ing into port 4321 of localhost, effectively the connection is made to port 22 of the Institute's workstation, thanks to the previous ssh port forwarding. No need for persuading the sysadmin to make changes to the NAT or Institute's firewall.

Monday, October 13, 2008

Changing the favicon for your blog

People who are not happy with the Orange and White Blogger favicon, can use their own instead. First create a 48 X 48 px image using Gimp or whatever software you prefer. Save the image as a .ico file, say myicon.ico. Upload the image to some webhost like Google Pages or Geocities (Picasa WebAlbum doesn't accept .ico files).
Next go to your Blogger DashBoard --> Layout --> Edit HTML.
Locate the line <head>
After the line insert the code-
<link href="http://imagelocation/myicon.ico" rel="icon">.
Replace http://imagelocation with your webhost's address. Save the template. The job is done. Refresh your Blog page, your own icon will appear instead of Blogger's.

Saturday, October 11, 2008

Adding Social Bookmarking links like Digg, Delicious etc. in Blogger

With a little tinkering of the HTML code of the Blogger template, it is very easy to insert social bookmarking links like Digg, Delicious, Technorati etc. so that readers can directly bookmark the Blog post.
To add these links:
Go to your Blogger Dashboard, Click Layout --> Edit HTML. Then check - Expand Widget Templates
Search for the line: post-footer-line
Just after the line, add the following code:
<p/>Add to: <a expr:href='"http://digg.com/submit?phase=2&url=" + data:post.url + "&title=" + data:post.title' target='_blank'><img HEIGHT='20' WIDTH='50' src='http://lh4.ggpht.com/sambitbikaspal/SPAyI0pMJYI/AAAAAAAAAm0/THLvsaJKvJo/s144/digg-logo.gif'/></a> <a expr:href='"http://del.icio.us/post?url=" + data:post.url + "&title=" + data:post.title' target='_blank'><img HEIGHT='20' WIDTH='75' src='http://lh6.ggpht.com/sambitbikaspal/SPAyIYm0_YI/AAAAAAAAAms/WCVRbA5dBto/s144/delicious_logo.jpg'/></a> <a expr:href='"http://technorati.com/faves?add=" + data:post.url + "&title=" + data:post.title' target='_blank'><img HEIGHT='20' WIDTH='75' src='http://lh3.ggpht.com/sambitbikaspal/SPAyI6EDxdI/AAAAAAAAAm8/foKy9hP8qe4/s144/technorati_logo.jpg'/></a>
<p/>

The links- http://lh6.ggpht.com/sambitbikaspal/SPAyIYm0_YI/AAAAAAAAAms/WCVRbA5dBto/s144/delicious_logo.jpg and the likes correspond to the logos for the respective sites, stored in my Picasa WebAlbum. Alternatively if you want you can upload the logos to some other free image host and change the links accordingly.The net effect of this will be, the social bookmarking links will get added below each of your posts.
Kindly Digg the story if you liked it!

Thursday, October 9, 2008

Rendering LaTeX in Blogger.

Rendering LaTeX in Blogger is pretty easy thanks to the JavaScript LaTeX equation render engine from http://www.yourequations.com.
To enable LaTeX rendering go to the Blogger Dashboard --> Layout --> Edit HTML . Then add the line
<script> type="text/javascript" src="http://tex.yourequations.com/"></script>
<script type="text/javascript" src="http://tex.yourequations.com/"></script>
just before <body/>
. Half the job is now done.
Then, for example to render:
\int_{0}^{\pi}\frac{x^{4}\left(1-x\right)^{4}}{1+x^{2}}dx =\frac{22}{7}-\pi
Use the code:
<pre lang="eq.latex">
\int_{0}^{1}\frac{x^{4}\left(1-x\right)^{4}}{1+x^{2}}dx
=\frac{22}{7}-\pi
</pre>

The LaTeX code will now be displayed as:
\int_{0}^{1}\frac{x^{4}\left(1-x\right)^{4}}{1+x^{2}}dx=\frac{22}{7}-\pi

Ofcourse Javascript needs to be enabled in the Browser for the renderer to work.

Durga Puja 2008



Photographs taken with Sony DSC W130 DigiCam, during the Durga Puja 2008 at Kharagpur.
Durga Puja is an autumn festival celebrated widely, mainly in the states of WestBengal and Tripura in India in honour of the Hindu Goddess Maa Durga.


Some snippets about Verisign's Personal Identity Portal

Recently I stumbled upon Verisign's Personal Identity Portal - pip.verisignlabs.com. Though still in Beta, I found it immensely impressive as an all-in-one Personal Identity Management Service.
It has a cool feature named One-Click Sign In, which allows signing in to a host of websites including Google, Yahoo, Flickr, Youtube among many others. The login credentials for the respective sites are required to be submitted. These will be encrypted using the users passkey. The only caveat for this excellent service is that one has to take Verisign's word for it, when it comes to security and privacy of the login credentials. Having trusted Verisign fully with one's secrets, all that is required is Bookmarking the One-Click sign-in link provided after submission of the credentials. Clicking on the bookmark leads to a list of the added sites, clicking on any of the sites directly signs the user in, ofcourse one has to be signed in to pip.verisignlabs.com prior to that.
Another feature is the ability to create a Personal Identity Page with a unique pip url, where one can publish personal details like name, address, email, date of birth etc. that one wants to share publicly.
The pip url also acts as an OpenID for quick sign in to any website supporting openid.
Since pip.verisignlabs.com starts acting as a one stop shop for personal identity, it becomes important to protect the PIP account, as any compromise of the PIP account leads to compromise of all the accounts listed under One-Click sign-in, as well as compromise of the OpenID. As an extra security measure, Verisign provides an optional browser authentication certificate. Even if the username and password are compromised, unless the illegitimate user has the browser authentication certificate, it is impossible to gain access to the account.
If this is still not enough for some paranoids, then Verisign provides an added layer of security by providing an optional hardware security token for a nominal fee. It generates a secret key every 30sec which is required during every login. This should be more than enough to provide considerable peace of mind to the most paranoid person on this planet.

Why the name - Bot Cyborg ?

The name of the blog followed the name of the domain I had registered. I was interested in the domain hack - cyb.org . Unfortunately it was already registered by someone. Looking for an alternative I registered botcyb.org . As one of my friends has correctly said, the domain name sounds as if it belongs to some spam bot :D . The blog was named just after the domain name.

Why blog?

A few days ago I was caught up in a discussion on this topic with one of my friends. Personally I was ( and still am ) somewhat against the idea of writing blogs. Naturally when I have set out writing my first blog, I've got to justify atleast myself why I am doing so.
Prologue:
I had been maintaining a tiny personal website on Googlepages. Coming to know about Google's decision to phase out their Googlepages service and replacing it with Google Sites, I started looking out for some other reliable but free host. I didn't find Google Sites very appealing. It doesn't allow hosting of custom HTML pages. Being a student shelling out bucks for paid hosting would have hurt my pocket a lot. Unfortunately most free webhosts will litter the page with crappy and tasteless ads. Yahoo! Geocities' free hosting was a good compromise.
Temporarily I moved my site to http://www.geocities.com/sammy_pal123 but was not very happy (somewhat happy to speak the truth) with it either as it didn't allow me to use my own domain.

It was at this time when the idea of using Blogger as a replacement for a personal website occurred to me. It was not too bad an idea, atleast experimenting with it won't hurt much. With this thought in mind I gave myself a big - GO AHEAD !