Wednesday, October 28, 2009

Discover /etc/fstab

Many times, after a Linux install Windows partition i.e. NTFS file system becomes inaccessible through Linux. In these cases if you can make appropriate entries on your /etc/fstab you can recover these partitions. Although tools like ntfg-3g and ntfs-config are already there. And these tools are easy to use but knowing the innards never hurts, does it?
The basic syntax of fstab entry is :-
[Device] [Mount Point] [File System Type] [Options] [Dump] [Pass]
 Let us take each term one by one.
  • Device : Here we specify the device we want to mount. For eg. HardDisks are generally named as /dev/hda1 or something similar.
  • Mount Point : This entry tells the OS about the folder on which your partition or device will be mounted. You should keep all your mounted devices in /mount/the_device_name or /mnt/the_device_name. Again, this in convention not compulsion.
  •  File System Type : Here you can tell the OS about the type of file system you are going to mount. If you are not sure of the type then try using auto. This will make an attempt to detect the file system type automatically.
    For NTFS write ntfs-3g. Other popular file system types are ext3 and swap.
  • Options : Fstab supports a lot of options. Some major ones are discussed here.

    1. ro or rw : This stands for read only or read write type of mounting.
    2. exec or noexec : This option enables or disables the execution of binaries present in the specified device.
    3. auto or noauto : If you want the device to get automatically mounted on boot then choose auto otherwise choose noauto.
    4. user or nouser : Choosing user will enable all the users to mount the device while nouser will make sure that device is monted only by root user.
    5. defaults : If you find all of this too confusing :) .

  • Dump and Pass : These options have a little role to play if your computer does not contain important data. Dump tell the OS to backup the device, if it is setted to 1. 0 disables it.
    Pass specifies the order to check file system. Usually 1 is used for root partition and 2 for the other devices. The options are :-
    0 == do not check.
    1 == check this partition first.
    2 == check this partition(s) next 
A typical fstab entry looks like this:-
/dev/hda6       /mount/hda6          ntfs-3g         defaults      0      0

Reblog this post [with Zemanta]

Monday, October 19, 2009

Google Wave is here!!

Google Wave was announced on the second day of google I/O conference. It is an in-browser communication and collaboration tool. Users send waves to commuicate with each other to communicate. A wave can be a conversation, photos, videos or even a document where people can discuss and work together. It supported richly formatted text. Any wave participant can reply anywhere in the message and since it is live other participants can see the message as you type. This results in faster communication. More participants can join the wave at any pooint of time and can play back to see who said what and when. Google Wave also supports the ability to drag and drop attachments from your computer into Google Wave. You can also embedd photos and videos in a wave and it is as simple as right clicking on the browser.

It is written in Java using OpenJDK; its web interface uses the Google Web Toolkit. Instead of sending a message and its entire thread of previous messages or requiring all responses to be stored in each user's inbox for context, waves contain a complete thread of multimedia messages (blips) and are located on a central server.

 You’re going to have to wait a while though: Google Wave will not be available to the public until later this year. Right now it’s only available to a select group of developers, who will be able to create their own Wave servers. It’s also an open-source project with a lot of API integrations, so we can expect a lot of user-driven innovations and extensions for the platform as well.

Thursday, October 15, 2009

Difference between Add-On Domain, Sub Domain and Parked Domain

If you have hosted a website somewhere then you must have faced the three types of domains and wondered what's the difference?
Let us assume that you own and
Usually you will always stick to sub-domain but here is the difference if you wanna know :-

  • Add-On Domain
    Here your two domains act separately from each other. No domain is dependent on other. If one is down other is not effected. Both will have different CNAMES, MX Records etc. Here you paid for the two domains.
  • Sub Domain
    Consider that your domain. Its a blogging site. Now you want to integrate a forum for then one way is to put the pages in directory or you can have by adding directory forum to sub domain. This doesn't costs you anything. You can have as many sub domains as you want (Some hosting services might put up an upper limit)
  • Parked  Domain
    Now consider a scenario where you wanted but have to live with After several years you got but now all of your friends know that your website is hosted at Tough situation. You can add a redirect but parked domain is an intelligent solution. Here you park over Now both of your domains points to the same folder. Here also you paid for both the domains

Tuesday, October 13, 2009

Sneak Peek in Ubuntu 9.10

Just 15 days left for the release of Ubuntu 9.10. This release will see some major changes in applications as well as looks. Here are some of the features which you will see in new Ubuntu 9.10.

  1. Ubuntu has migrated to Upstart. It is expexted that boot time will reduced considerably because of this.
  2. Our old "Add/Remove is no more there, instead "ubuntu software centre" will be there to do the same tasks and a bit more in new Ubuntu 9.10.
  3. Empathy will now be the default IM client in Ubuntu leaving Pidgin behind.
  4. Ubuntu will come loaded with "Quickly" which enables developers to build software and share them easily using .deb or personal package archive.
  5. This version will have ext4 as the default file system. A high performance and disk utilization is expected.
  6. Ubuntu 9.10 will also introduce GRUB2 as the default bootloader replacing legacy GRUB. The older bootloaders will be updated automatically.
This is just a  glimpse. The monster is yet to be unleashed, so hold your breath!

Saturday, October 10, 2009

Firefox 3.5 vs Internet Explorer 8

I am a Linux user from core of my heart but every now and then I have to work on Windows and I always look for firefox to do my browsing. Sometime back I was chatting about browser security and vulnerabilities with some of my geek friends. This post is a summary of that chat and a few additional things.

IE has a lot of security features that can be configured and tweaked. Microsoft defines security “zones” such as “Internet,” “Local intranet,” “Trusted sites,” and “Restricted sites.” These categories can be customized to suit the user’s needs.
 Firefox's option are less and simple. If something is turned off for a website it is turned off for every site. While this may look as a bad choice to some people, in a way it is good too as you don't have to put every site in a category or other. Too many categories tend to confuse the beginners.

Both Firefox and IE exploit user info for some of their features. IE send your browsing history to Microsoft for the Suggested sites feature. This history is processed there and then a link in Favorites Bar suggests you sites you might find interesting. According to Windows Help and Support even items deleted from your history "will be retained by Microsoft for a period of time to help improve our products and services." Firefox, on the other hand does not sends any history but it does send your ip address to google through an encrypted SSL connection so that you can find better search reasults.

IE has a "easy to bypass" content advisor feature which lets you define the type of website users shouldn't visit. Firefox provides a blacklisting service, each newly visited site is compared against a blacklist of known defaulters and appropriate action is taken accordingly. It is too bypassable but takes a bit more determination.

Security Plugins is an area where IE stands no chance against Firefox. A lot of plugins are available to suit need of every user from scripts blocking addons to anti-malware tools. Personaaly I use web developers toolbar for removal of java scripts and other cool features.

In terms of speed face the facts IE people, Firefox beats you. IE speed sucks with java scripts and image rendering.

Now lets talk about the product. As always IE being a Microsoft product is closed sourced and imposed on you to have it, doesn't matter you like it or not, yoou cannot remove it. Firefox comes as an addon, install it, try it, keep it if you like. And its a really cool place for young developers to contribute.
Finally I think Firefox beats IE in most of the aspects. Its just a matter of time when firefox will rule the Web world. Be a part of it!

Friday, October 2, 2009

How to create a Fedora or Ubuntu repository

First of all let me tell you why you should create a local repository.

It happens many times that we need some software for our Linux OS but internet connection is too crappy or inaccessible at times. A local repo comes handy in these cases. Also install speed increases considerably because of rapid download.
Organizations using linux can save a lot of money and bandwidth by creating a local repository since packages are downloaded once into the repository server and all the computers can get the packages directly from the local repo server at a much high speed.
Following are the steps to create Fedora repo. Ubuntu repo is also created similarly.

  1. We will create this repository in such a way that it is available using http. If you are creating this repo for your personal use and not on a server then you can skip this step. Since we are creating this on a server it is safe to assume that apache is already installed. If apache is not installed then type yum install httpd as root (Ubuntu users should type sudo apt-get install apache2). After the install start apache by using /etc/init.d/httpd start. The default document root is /var/www/html, so we'll create the repo in /var/www/html/repo.
  2. To create a repo we need a tool called createrepo which is available in fedora repository. Typs yum install createrepo to get this tool. Now create two folder in this way :-
    mkdir -p /var/www/html/repo/base/11/i386
    mkdir -p /var/www/html/repo/updates/11/i386

  3. Now we have to to populate these folders with packages. There are two ways of doing so. Either start by copying the packages present in fedora install dvd then use the rsync protocol to populate the rest of the packages or start by rsync only. To use rsync type rsync -avrt rsync:// /var/www/html/repo/base/11/i386.
    rsync -avrt rsync:// --exclude=debug/ /var/www/html/repo/updates/11/i386
    These are indicative addresses only to show the method. A complete list of rsync mirrors can be found at fedora website.
  4. Now run createrepo /var/www/html/yum/base/8/i386 to get the repo ready.