Archive for General

Moved To A New Location

I have moved this blog to a new location powered by the same WordPress software from the website. Had to toil a bit to move the posts, comments and all that and get everything start working again. I will share my experiences, and the reasons for moving from here in the first place, at the new location:

Please update your bookmarks!

(I do plan to keep posting here for some more time, not frequently though, just to test out any new features introduced by 


Comments (1)

Direct Server to Server Copy using FXP

FTP is still the best way to upload or download the files/folders from a website. I use gFTP to upload the files to my webspace, and its quite efficient at the job. even if the connection gets interrupted in the middle of a transfer, it automatically reconnects and completes the job. it has many other useful features too. one feature that i thought was lacking in it, is the ability to move a folder from one location to the other, within the same server. other people had complained for its lack of abilitiy to move a file from one server to another server without involving the local machine in the process. though many FTP clients support such a feature(including gFTP, as i discovered later on), i started searching for a dedicated FXP client. but what is FXP? from wikipedia:

File eXchange Protocol (FXP) is a method of data transfer which uses the FTP protocol to transfer data from one remote server to another without routing this data through the client’s connection.

note that FXP transfers need relevant support on the server side too(they must support PASV mode and PORT commands) – otherwise the FXP client can’t do anything about it. to install a FXP client on Gentoo:

  1. Add the following line to the file /etc/portage/package.keywords :
    >=net-ftp/gtkfxp-0.5 ~x86
  2. Emerge the package and run it:
    $ emerge gtkfxp
    $ gtkfxp

click the “Connect” button on the left side and fill the settings of the first server in the popped up dialog box, then click the “Connect” button on the right side and fill out the settings of the second server. you can now start transferring the files in between these two servers without involving your local machine. you can enter the information about the same server in both the dialog boxes if you want to transfer the files within the same server. note that this software is buggy and very crash prone. gFTP too supports FXP transfers but it is seriously lacking in the documentation.

Leave a Comment

Another system rescue story, using Ubuntu LiveCD

Adding to what i had written in one of my earlier posts about the rescue act using a gnu/linux live cd , here is a related story posted on the ubuntu-users mailing list:
(this is a trimmed version, full story here)

A horror story with a potentially happy ending.

So, I use PartitionMagic 8.0 to move a few things around for the
ever-expanding Ubuntu portion of my hard disk. Then the god-awful happens: in the middle of applying my changes, Partition magic gives one of its ever-helpful error messages (“Error #705 applying changes.”) and stops.
Now since I am primarily a Windows user (and all my software and work sits under Windows as a result), my natural reflex was to pull out my Windows recovery disk to see what I could do. What a damned joke. Apparently, to Sony, “recovery” means “erase everything on the whole disk and put back in the vanilla install”. There was no option of any kind to try and restore the MBR or any such thing. Just a snide “it is advised to back up your critical data before proceeding”-style message. Bastards!

Luckily I have Ubuntu. And, more specifically, I have my Ubuntu LiveCD. Which I booted and fired up GParted in. To see that I have…. nopartitions. Time to go hunting.

Having a fully-functional system despite not having a functional hard drive has its advantages. Sure it may be slow as all Hell on a CD, but it works. And it lets me surf the net to find possible solutions before giving up and losing literally years of data. Ordinarily I’d have to go to another computer (say in my classroom) to research solutions and download things and even mess with the hard drive (after removing it), but the Ubuntu LiveCD rendered that unnecessary. On the same crippled machine I could do whatever I needed to do.
So here’s where things stand now. GRUB is saved. Ubuntu works (with a few annoying glitches — I may just reinstall the system and restore my /home, taking the opportunity afforded to modify my partitioning scheme […]
‘ll do Sony’s version of “recovery”, restore my vital data (which is sitting on that handy external disk — the partition can’t be booted, but it reads just fine!), and then uninstall everything under Windows but for the few applications left which don’t have a suitable Linux alternative. (That list shrinks regularly and consists now of mostly games.) I’ll wind up with 5-10GB devoted to Windows and 30GB devoted to Linux. And Linux — Ubuntu — will be the OS I use most of the time now.

Ubuntu Live CD can be downloaded here.
You can also get it shipped to anywhere around the world, free of cost, from here.

Leave a Comment

System rescue act using GNU/Linux Live CD

It happened like this: i once rebooted my machine and got back a grub call-whatever-you-like error at the boot prompt, with the consequence of no gnu/linuxes and no windows for the time being. i had so many operating systems installed on my computer, but i cannot boot into atleast one of them, as the boot loader itself had deserted me. what to do? reinstall all the operating systems again? reinstall one gnu/linux os and recover the others through it? or recover the entire hard disk from the backup drives? the last option looks like the most sensible one, provided that i had taken such a backup in the first place.
i keep the Live CD of Knoppix OS just for such occassions. it conveniently allows me to boot into the gnu/linux environment right from the CD, without having anything to do with the hard disk(s) present on my computer. once there, i could connect to the internet and ask for help. but i had my recipe to recover from such situations, written safely in a corner of my mind and i decided to make use of it on this occassion. i opened the terminal emulator and got on with the job:

#fdisk -l

this listed all my disks and their partitions, inducing a sigh of relief in me, and i started mumbling to myself “Everything is fine mate, everything is fine!”
then it was time to see if i had lost any data.

#mkdir /mnt/tmp && mount -t ext3 /dev/hda9 /mnt/tmp

i panicked for a moment as the mount failed with an error. i knew i need to run ‘fsck’ now, so headed straight to that step:

#fsck /dev/hda9

and accepted all the suggestions from it(pressed ‘yes’ to all the questions). my filesystem was ‘apparently’ fixed, but i wanted to confirm it. i tried to mount it again:

#mount /dev/hda9 /mnt/tmp

celebration time! the partition was successfully mounted, and i could browse through all the data in it. i happily repeated the procedure with other gnu/linuxes and then turned my attention to the boot loader.

i quickly chroot‘ed to the root partition of the Ubuntu OS(whose boot loader was installed on my MBR) and entered the following commands at the command shell:

#chroot /mnt/tmp
#grub-install /dev/hda

That’s it! my system was back to its normal state, with the familiar grub bootloader greeting me with all the operating systems that were installed on my computer.

in related but different situations, there are variations of the above procedure which i had to follow to get my system working again. after a hard disk failure, for example, ‘fsck’ refused to work with my filesystem, and i had to first run ‘badblocks’ to scan for any possible bad blocks on the disk, and then run e2fsck with an alternate block number, as the main super-block was corrupted.

#badblocks -svn /dev/hda9
#dumpe2fs /dev/hda8
(use a partition here whose super-block is not corrupted)
#e2fsck -b alternate-super-block-from-above-command> /dev/hda9

if there is currently no partition that has a valid super-block, then the trick is to make a new file with an equal number of blocks as the corrupted partition, and then finding an alternate super block by applying the above procedure to this newly created file.

Anyway, there is atleast one way to get out of the trouble if you have one GNU/Linux Live CD handy with you. If you don’t have one already, go and grab it right now.

A list of popular gnu/linux live cd’s is here.

Comments (1)

Which is my favourite OS?

suddenly people have started to publish their favourite operating systems in their blogs and i thought i too should have some fun by doing the same. currently i have these operating systems installed on my computer:

  • Ubuntu (Debian based)
  • Zenwalk (Slackware based)
  • Fedora
  • Microsoft Windows XP

my favourite, as must be evident by the above list, is Debian. because i use Debian OS as the main server for my network, i thought i should install a different flavour of it on my pc. i may try Mepis os the next time.

the best thing i like about Debian based distros is its package manager called ‘apt.’ also there is a huge repository of packages ready to be downloaded and installed for debian. two dvd full of software can be kept handy by those who need to install them on multiple systems or have a slow internet connection. two step installation process of debian, where you can install only the base system in the first tier and then continue with the additional packages once the first part is successfully installed, gives lot of flexibility to the user. debian is also very secure and stable, more than any other gnu/linux distribution. this is also the reason why latest versions of many softwares are not available in debian but the tradeoff has been utilised by the ubuntu os and you get the latest, cutting-edge versions of all the software by sacrificing a bit on security and stability in ubuntu. because ubuntu is generally meant to be used on desktop only(all kinds of server applications can be installed on it, but you don’t use it as a public server machine), the security issue is not critical. but ubuntu comes with a single dvd worth of software and additionaly packages have to be installed from the internet. for KDE users, there is Kubuntu.

Slackware is another interesting distribution that is best known for its simpilicity and efficiency. the operating system, as well as its packages, get installed in real quick time. its package manager is also extremely simple to use but the repository of packages for slackware is not as big as debian’s. because i use it for development purposes, it suits me perfectly and i have found it as the fastest of all the popular gnu/linux distros. Zenwalk is a flavour of Slackware and installs only one software per every category – one browser, one word processor, one email client only saving a lot of disk space for me. its default desktop XFCE is also sleek and stylish. though the first thing that i installed on Zenwalk was the KDE package, which took less than one minute, i still spend most of my time in xfce.

i installed Fedora to check out the Core 4 version of it, but i am already thinking about installing PCLinuxOS or some thing else over it.

i use Windows XP primarily for development on .NET platform, and then for heavy printing jobs. i also keep most of my partitions meant for storing data under windows file system and manage them from windows xp because its easy to access windows partitions from gnu/linux than the other way round. my testbed machine contains 6-8 operating systems at once and the list keeps changing every 3-4 days. my brother is fond of Gentoo OS.
Final word? Debian as a server, Ubuntu for most of the desktop jobs(multimedia, internet etc), Zenwalk for development work and Windows XP for .NET and data storage.

Comments (3)