Archive for December, 2005

GNU/Linux Users vs Rest of the world :)

i was satisfied to some extent with my internet connection but was never too happy about it. i had always thought that it could have been better. so when i got a chance to test out  another provider, i latched up the oppurtunity with both hands. but there was a glitch in it – they had a bizarre assumption about their users that all of them would be using the windows os. you need a client to first login into your account to be able to access the internet; and the client was available only for windows. in short: no windows, no internet.

i had already paid the the amount in advance and so was in a complete mess now. i spend more than 90% of my time in gnu/linux and can’t do without internet there. the sales person assured me that he will find out what he can do about my situation and get back to me, but ever since, i had been having a tough time finding him.

i could have fought to get my advance payment back but my gut feeling was that there should be a way out of my problem. i found out that the client for windows is 24Online Client used with the Cyberoam servers. i knew the open source versions of these clients are available both for windows and gnu/linux, so i downloaded the gnu/linux version of it and tried to login using it. unfortunately, there was no success here.

i thought i can always open the source code and see what exactly is not working, but already being neck-deep in other works, i postponed it to some other day and got back to my earlier internet connection. few days after that, my brother came to me  describing about another open source client for the same cyberoam network, and how it claims to handle all the versions of its protocols. it took some time for me before i could understand it all – there is a program called ‘linc’ which is a gnu/linux client for cyberoam. i downloaded it, built it, edited its configuration file and finally gave it a go. it just connected me to the internet right away, no fuss at all!
what more, i can ask it to send any MAC address of my choice in the request, which enables me to connect to the internet from any machine at my home, circumventing the restriction that i should connect only through the computer which was configured by the sales person. what a ridiculous resriction that was! but not for the gnu/linux users 🙂

the hero of the story resides here:  and its written in beautiful C++ code, making the entire source code very readable.


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)