Thursday, December 01, 2005

Linux and FOSS in 10 minutes

Ten reasons to discard this document

I do not have 10 minutes to spare
Linux?? FOSS ???whats this ,not of my use..
There is no problem with my PC .
Linux is tooooo hard to understand and work with
Linux does not help me with my professional work
Linux is for servers not for desktop PC
I will have to pay to get support on Linux
I am afraid to explore new avenues/ideas.
I am happy to use pirated software
I do not prefer free advice.

.....add up your reasons if they are different from these


This might tend to be a spam in your mail,but you can always spare 10
minutes out of your busy schedule to know about something about the
technology you have not explored yet and why the people all over the
world are going mad over this.
have a look at http://foss.in to see what we are up to in India.FOSS
stands for "Free and Open Source software"

If this gets you interested ,pl keep on reading.
Please forward this to your freinds if you like forwarding it.

We will start with the basics now.

Basics of Operating System (O.S),Kernel,Linux,Free Software,Open Source Software

Operating system: In computing, an operating system (OS) is the system
software responsible for the direct control and management of hardware
and basic system operations. Additionally, it provides a foundation
upon which to run application software such as word processing
programs, web browsers and others.

Example of Operating systems: Windows Xp.windows 2000, windows 98
Suse Linux , Redhat linux,Debain linux,mandrake Linux etc etc


Kernel: In computer engineering, the kernel is the core of an
operating system. It is a piece of software responsible for providing
secure access to the machine's hardware and to various computer
processes (a process is a computer program in a state of execution).
Since there are many programs, and hardware access is limited, the
kernel also decides when and how long a program should be able to make
use of a piece of hardware, which is called scheduling.

Coming to Linux....

Linux: In the narrowest sense, the term Linux refers to the Linux
kernel, but it is commonly used to describe entire Unix-like operating
systems (also known as GNU/Linux) that are based on the Linux kernel
combined with libraries and tools from the GNU Project and other
sources. Most broadly, a Linux distribution bundles large quantities
of application software with the core system, and provides more
user-friendly installation and upgrades. The Linux Kernel was written
by Linus Torvalds

GNU : GNU is a free software operating system. Its name is a recursive
acronym for "GNU's Not Unix", which was chosen because its design is
Unix-like, but it contains no actual UNIX code. The GNU system,
combined with a third-party kernel called Linux, is one of the most
widely used operating systems in the world, commonly known as either
"GNU/Linux" or often simply "Linux"
GNU project was started by Richard Stallman.

Free Software :
``Free software'' is a matter of liberty, not price. To understand the
concept, you should think of ``free'' as in ``free speech,'' not as in
``free beer.''

Free software is a matter of the users' freedom to run, copy,
distribute, study, change and improve the software. More precisely, it
refers to four kinds of freedom, for the users of the software:

* The freedom to run the program, for any purpose (freedom 0).
* The freedom to study how the program works, and adapt it to your
needs (freedom 1). Access to the source code is a precondition for
this.
* The freedom to redistribute copies so you can help your neighbor (freedom 2).
* The freedom to improve the program, and release your improvements
to the public, so that the whole community benefits (freedom 3).
Access to the source code is a precondition for this.

Open Source Software:
The basic idea behind open source is very simple: When programmers can
read, redistribute, and modify the source code for a piece of
software, the software evolves. People improve it, people adapt it,
people fix bugs. And this can happen at a speed that, if one is used
to the slow pace of conventional software development, seems
astonishing.

There is absolutely no problem with your PC, but your PC can be used
to give much better performance if you could try different operating
systems or different software on different O.S. Everything you could
try is new and difficult at the beginning. You need to devote some
energy and time into this so that you Can learn from it and benefit
from it Linux as it has evolved nowadays is increasingly used for
Desktop PCs as well so there is no dearth of applications in Linux for
desktop users.
In fact you will find usage of Linux/Foss in some areas where no other
OS can match its capabilities .Like graphics,multimedia,UTF-8 encoding
support etc etc.

To get a feel of free software on your present OS, you can download a
copy of FireFox browser and use it as an alternative to Internet
explorer .It won't take much of your time to realize why FireFox is
now used by millions of users on all platforms.

Keeping in true spirit of the community , you Can always get a free
tip or advice related to Linux or free software from some very good
forums like
www.linuxquestions.org
or any
Linux User groups.
to start with using Linux you can download or ask some of your friends
using Linux for a free copy of Live CD based Linux
these do not require to be installed in your Hard disk
They run directly from the CD some of the popular ones are
knoppix, Puppy Linux,Ubuntu Live

why i am giving away free advice and spamming your account?

I do not Spam any email accounts but I just make a try once in couple
of months so as to encourage people to learn more about Linux and Foss
so that they can also benefit from it.this is my way to
contributing/supporting to the Linux/Foss community.
apart from this you can have a look to past articles at my website
http://www.gnulinuxclub.org

Any word of encouragement from your side will be boost for me to
continue over this

More On this
http://en.wikipedia.org/wiki/Linux
http://en.wikipedia.org/wiki/GNU
http://www.gnulinuxclub.org

Sunday, November 06, 2005

How to help Free/Open Source Projects

How to help Free/Open Source Projects

I am writing this article after I took into account if i was doing
something for promoting Open/Free Source Projects .

How many times has that rescue CD we use has saved Us?

How many times has the free/Open source software that comes bundled
with some Gnu/Linux Distro proved a lot to us or that Live Gnu/Linux
Cd helped us and we have felt proud of possessing that
Software/Distro?

How many times we have been able to stand up against pirated software
with our help high along with the Free/Open Source software that works
along with other copyrighted Platforms as well ?

How many times have we been helped by some expert on any forum?

I hope not many of us can take into account the above in pure numeric terms .

What Have we done to promote Free/Open source related projects?

Very few of these projects have the support of sponsors(maybe 2%-5% of
these projects)These projects do require some encouragement and some
monetary encouragement also to survive with the resources required to
keep them running.
Good projects receive some donations in form of Money or resources
such as Internet Bandwidth (Mirror for downloading software),Computer
Hardware for their development or Server . I do not know about any
team that has been making big profits from the donations they receive
. These just suffice them to keep their projects alive and kicking.

Helping these projects is necessary as they provide this premium
collection of software for free .Else they will also start charging
for the premium version or to sign up for some help forum.Already some
Distros and Software Vendors have started following this
strategy.After all they too need to upgrade themselves to survive.

These projects can e helped in some way or the other
some of them that i could think of

Donate some Money directly to these Organizations.
A good way can be through affero.net ,from where you can choose
various organizations who will benefit from any money you donate.(the
minimum amount you can donate is 5$)

Buy the Free Cds that are available for download, directly from these
Organizations ,that way also you can help them and you can get some
more premium service.

Many of these Organization carry ads of their sponsors, these can
fetch some some money(although meagre) for the User Clicks they
generate.Visiting their sponsors can also help them.

Help them while offering a Download Mirror for their Software/Distro,
this wil reduce the Bandwidth Cost for such Organizations.In india
there is dearth of such download mirrors.Corporates/Educational
Institutes can get involved here if they provide the required
bandwidth for non-office hours only.

There are many other ways for helping these organizations. I do not
know how many of us might have helped such Organizations but i think a
sum of 5$-20$ can be donated on a yearly basis to any such
Organization.

gaurav masand
linux4all[at]gmail.com

Friday, June 24, 2005

Windows beats Linux. Really????

This is the recent article published at india infoline

http://www.indiainfoline.com/news/news.asp?dat=61173

Comments:
Not going in the technical aspects there are some points to ponder on

It talks not of deployment but only of "updating Microsoft and open source software"
The articlementions that the study is of one of the factors of TCO so no comment should be made on Linux Vs Microsoft by the website that
Windows beats Linux

It is not right to compare Microsoft with Linux ,but it should have been compared with a specific distribution that also has technical support with it like Redhat Enterprise because these organizations provide support/patches to its customers same as the way Microsoft does.

And this line concludes it study "The study concludes that even when a greater number of patches are deployed for Windows, the costs are lower because it takes about half as much effort per patch to complete the task."
Well what can be said about this ?

Also what type of report can we expect when a company is funded by Microsoft to carry on this study

I do not object to the such studies but the manner in which they are carried out to suit the results they want.

Wednesday, May 04, 2005

FOSS in India

FOSS in INDIA

The Open source initiative (http://opensource.org/) defines Opensource as : Open source doesn't just mean access to the source code. The distribution terms of open-source software must comply with the following criteria:
-->Free Redistribution
-->Source Code
-->Derived Works
-->Integrity of The Author's Source Code
-->No Discrimination Against Persons or Groups
-->No Discrimination Against Fields of Endeavor
-->Distribution of License
-->License Must Not Be Specific to a Product
-->License Must Not Restrict Other Software
-->License Must Be Technology-Neutral

The basic idea behind open source is very simple: When programmers can read, redistribute, and modify the source code for a piece of software, the software evolves. People learn from it ,improve it, adapt it and fix bugs. And this can happen at a speed that, if one is used to the slow pace of conventional software development, seems astonishing.
India is slowly and steadily started believing in Open source and its philosophy there is lack of awareness amongst the general public regarding GNU.Opensource and FOSS. But this won't take much time to change.

As far as policies by the Indian government are concerned ,they are not framed overnight. Also, adoption of technology is one thing, while mandating it is not as simple. Especially when you are talking open source software. FOSS can help government save money, communicate better and reduce conflicts. However, adopting FOSS could mean having to make some investments, scout for trained people and recharge the bureaucracy.
The following intiatives by the government ,state the changing policy of the government
The project Indix, http://rohini.ncst.ernet.in/indix/, is funded by the Ministry of Communication and Information Technology and has been running for two years. It is being done by the National Centre for Software Technology (NCST), a government of India body.


C-DAC, the Indian government-run Centre for the Development of Advanced computing has announced in October 2004 the launch of the launch of its "janabhaaratii" project for localization of FLOSS.

The National Informatics Center (NIC) of India has contracted IBM to deliver open solutions . NIC is a premiere consulting organization in the field of Informatics Services and Information Technology applications.

The state government have started implementation of Gnu/Linux based soluton at their own level.The southern state of kerala being the most active in this regard. The Akshaya project (http://www.akshaya.net/) is the flagship project of these initiatives.

Piracy in India is rampant, checking this will draw a lot of attention to other alternatives like FOSS/Opensource products..Taking the first step in this direction, the government has started a hotline to report piracy and individuals reporting such cases will be rewarded.

The learning curve for FOSS/Opensource is steep ,which prevents people to to use it ,but the price advantage and he usefulness of FOSS are making it a viable institutions
Starting from educational institutions, to banks, government institutions and to corporate sector all sectors stand to benefit from this revolution which is gaining momentum in India.

Sunday, May 01, 2005

Recover Linux boot loader

Recover Linux Boot loader
This is to be done when you need to recover the Linux boot loader after another OS has erased the previous boot loader

most of the Linux distros have rescue mode
lookout for that option when you boot from the 1st Cd of that distro.
you will end up at some shell prompt with some directions about your current system image
you can follow those instructions to recover the Linux loader

this document will help you to recover the Linux loader for any distro and any version

boot from a Linux rescue CD or any Live CD
when you are at the shell prompt

run this

#fdisk -l

you will get some entry like this

Device Boot Start End Blocks Id System
/dev/hda1 * 1 510 4096543+ b W95 FAT32
/dev/hda2 511 1096 4707045 83 Linux
/dev/hda3 1097 1797 5630782+ 83 Linux
/dev/hda4 1798 4865 24643710 f W95 Ext'd (LBA)
/dev/hda5 1798 2243 3582463+ 7 HPFS/NTFS
/dev/hda6 2244 2753 4096543+ b W95 FAT32
/dev/hda7 2754 4347 12803773+ b W95 FAT32
/dev/hda8 4348 4865 4160803+ 83 Linux

since i have multiple Linux FS partitions so i have more than one entry here,
this may not be the case for you ,or if it is then you need to identify your root (/) partition

Bow i know that my root(/) for my Linux installation is /dev/hda3

so i will make a dir in anywhere ,say in the /tmp directory

# mkdir /tmp/mnt

then mount your Linux installation there

# mount /dev/hda3 /tmp/mnt/

then chroot to that partition

if everything is right then you will end up here

# chroot /tmp/mnt/
root@gaurav/ #

most Linux rescue modes will leave you to this stage ,so the below directions are common for all distros.

then if you had grub installed earlier the go for re-installing grub as

# grub-install /dev/hda

or if you have lilo installed
you can check lilo installation by

# lilo -v

this will only check if the lilo boot loader will be installed without any errors and will not install lilo.

and to install lilo
run

#lilo

after this u can exit from the Linux rescue mode and go for a reboot .

Saturday, April 23, 2005

Getting help in Linux/Unix

Getting Help

1. man

man (short for “manual”) is a traditional form of online documentation in Unix and Linux operating systems. Specially formatted files, “man pages”, are written for most commands and distributed with the software. Running man somecommand will display the man page for (naturally) the command or program somecommand.

Because there are so many of them, man pages are grouped into enumerated sections. This system has been around so long that you will often see commands, programs, and even programming library functions referred to with their man section number. For instance, you might see man(1). This tells you that man is documented in section 1 (user commands); you can specify that you want the section 1 man page for “man” with the command

#man 1 man

or

#man - S 1 man

Specifying the section that man should look in is useful in the case of multiple items with the same name.

Man Page Sections

Section Contents
Section 1 user commands (intro only)
Section 2 system calls
Section 3 C library calls
Section 4 devices (e.g., hd, sd)
Section 5 file formats and protocols (e.g., wtmp, /etc/passwd, nfs)
Section 6 games (intro only)
Section 7 conventions, macro packages, etc. (e.g., nroff, ascii)
Section 8 system administration (intro only)

so man page for

killpg (2)

is different from

killpg (3)

again to access ther different man pages we will go as

#man - S 2 killpg

#man - S 3 killpg

In addition to man(1), there are the commands whatis(1) and apropos(1), whose shared purpose is to make it easier to find information in the man system. whatis gives a very brief description of system commands, somewhat in the style of a pocket command reference. apropos is used to search for a man page containing a given keyword

to look for a man page of your choice run

apropos

like

this is what i get when i run

# apropos utmp
endutent [getutent] (3) - access utmp file entries
getutent (3) - access utmp file entries
getutid [getutent] (3) - access utmp file entries
getutline [getutent] (3) - access utmp file entries
pututline [getutent] (3) - access utmp file entries
setutent [getutent] (3) - access utmp file entries
utmp (5) - login records
utmpname [getutent] (3) - access utmp file entries
wtmp [utmp] (5) - login records
endutent [getutent] (3) - access utmp file entries
getutent (3) - access utmp file entries
getutid [getutent] (3) - access utmp file entries

so it will give all those listings that have "utmp" in its description or name

2. HOWTOs and mini-HOWTOs

Get the full list of HOWTO's from www.tldp.org.
These files are well worth reading whenever you're not quite sure how to proceed with something. An amazing range of topics are covered in sometimes surprising detail.


3. Online Forums
There are many online forums.
the best among them is Linuxquestions.org

All Linux queries can be posted at linuxquestions.org.

If you are not a member , register at linuxquestions.org.



References:
http://slackware.com

Saturday, April 09, 2005

Mounting drives in Linux

This is a small tutorial on mouting drives in linux
I had written this document some time back for my linuxuser group
now i am re-writing this document with some changes

There is no substitute to man pages in linux. there is an exhaustive collection of information over there.

To start with, first of all you need to see which partition you want to mount

YOU can see that by running the following command at bash# prompt


#fdisk -l


If your hard disk is use

Primary master hda

Primary slave hdb

Secondary master hdc

Secondary slave hdd


If you use wrong device then you may get error message such as

"Cannot open device hdc"

If command is successful you get


[root@gaurav qmail]# fdisk /dev/hda


The number of cylinders for this disk is set to 4865.

There is nothing wrong with that, but this is larger than 1024,

And could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help):


At this prompt run ‘p’ single character to see your partition table


Here is the result of my partition table


Command (m for help): p

Disk /dev/hda: 40.0 GB, 40020664320 bytes

255 heads, 63 sectors/track, 4865 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes


Device Boot Start End Blocks Id System

/dev/hda1 * 1 561 4506201 b Win95 FAT32

/dev/hda2 562 3939 27133785 f Win95 Ext'd (LBA)

/dev/hda3 3940 4385 3582495 a5 FreeBSD

/dev/hda4 4386 4865 3855600 83 Linux

/dev/hda5 562 1096 4297356 7 HPFS/NTFS

/dev/hda6 1097 1606 4096543+ b Win95 FAT32

/dev/hda7 1607 3008 11261533+ b Win95 FAT32

/dev/hda8 3009 3872 6940048+ b Win95 FAT32

/dev/hda9 3873 3939 538146 b Win95 FAT32



You can easily recognize which drive you want to mount

Here I have my windows partitions as

devices Windows Partitions

/dev/hda1 C

/dev/hda5 D

/dev/hda6 E

/dev/hda7 F

/dev/hda8 G

/dev/hda9 H


Do not confuse with /dev/hda2

It is my extended partition you cannot mount that whole partition but you can only mount the logical drives in this partition


Here say if I want mount my E drive in Linux

I need to have an empty folder somewhere to mount.

We can make a folder anywhere but as going by the convention we make all the folders and mount them in

/mnt folder

So, go to the mnt folder under root directory

Make a new folder in mnt directory say win_e


If you want to mount it temporarily (till the system is running)

You can mount it by the following command


#mount /dev/hda6 /mnt/win_e


The syntax of the command is easy to interpret

/dev/hda6 gives the device you want to mount

/mnt/win_e gives the path of folder you want to mount

to mount a device with some other options ,for example i can mount my cdrom in two styles


#mount /dev/cdrom /mnt/cdrom

this will mount the cdrom as a filesystemn as define in /etc/ftab which is generally iso9660
if i want to mount this CDrom with the
cdfs filesystem then i need to do this as

#mount -t cdfs /dev/cdrom /mnt/cdrom


Now if you want to mount your partitions your drives permanently you can do that by making an entry in /etc/fstab file

This file is read each time the system boots.

And so it mounts the partitions listed in this drive

You can add an entry to this file as under corresponding headings


/dev/hda9 /mnt/win_h auto defaults 0 0



the above line refers to

/dev/hda9: gives the device

/mnt/win_h: gives the path of the folder

auto: tells to detect the filesystem automatically

defaults, 0 0 : these two basically deal with the type of mounting we are performing and where we want to dump the partiton


Lines of caution

1. Do not delete any existing entries of /etc/fstab file, it will be good if you take a backup of the fstab file and then

Perform any changes.

If something goes wrong in that file the system may not boot up (in the worst case)


2. While using the fdisk command

Be careful and do not try other options other than the p command


Command (m for help): p


If you r not sure of what you r doing.


3. After updating the fstab file if during startup you get error of some sorts that e.g.

/mnt/win_g not found, mounting failed

Then check if you have made a folder in the given path and no spelling mistakes are there in your fstab file.


Comments are Welcome.