Monday, October 22, 2007

Some essential LINUX network Interface commands

#ifconfig .....command used to display information abt the currently active interface..
The information comprises of :
  • The type of interface like eth0,eth1 n so on
  • The IP address information like inet address 192.168.0.1,Bcast ip:192.168.0.255 Mask :225.255.225.0, RX-TX packets received-dropped-overrun-frames-collision
  • Hardware address HWaddress :00.ad.cc.15.25.22 (6 octate address or 48bytes
  • various other statistics

So therefore to know the inactive interfaces we must run :

# ifconfig -a

To start and stop the interfaces or in other sense bringing up and gringing down the eth0 we can run following commands:

# ifup interfacename

#ifdown interfacename

#service network restart/start/stop

#chkconfig network on/off

#netconfig interfacename .........to set the IP to the interface

The file which get modified is :

/etc/sysconfig/network-scripts/ifcfg-ethx

DEVICE=ethx

BOOPRO=dhcp/static

ONBOOT=yes

IPADDR=XXX.XXX.XXX.XXX

NETMASK=XXX.XXX.XXX.XXX

last two inputs are acceptable only if BOOTPRO is static

Global Network paramaters are available in following file :

/etc/sysconfig/network

NETWORKING=yes/no

HOSTNAME=fqdn by default

GATEWAY=XXX.XXX.XXX.XXX

NISDOMAIN=whatever

/etc/hosts For small LAN it act as a replacement for DNS

127.0.0.1 localhost.localdomain localhost

l'm suffering from some back pain so might come into my pace soon...

by the time this might act an appetiser for you Linux gigs

Thursday, October 11, 2007

The Magical Linux Boot Sequence

Its been a long time,i wrote anything abt Linux itself in detail….
Today I want to suppress my hunger by highlighting the BOOT sequence of Linux OS from scratch…..till the Login promp appears…

1)On a very basic level BIOS(Basic Input/Output System) which is the interface between the Hardware and Software provides the basic set of instruction used by any flavor of OS through CMOS(Complementary Metal Oxide Semiconductor).The CMOS which is about 64 bytes grabs and stores the hardware peripheral configuration permanently powered by a small battery located in Motherboard.
It’s the magic of this battery that CMOS retains the setting like date,time etc.. even when PC is turned off .Thus BIOS Has performed the POST(Power On Self Test) and now it looks for peripherals and a device to BOOT from.
Remember , BIOS reads and execute the first physical sector (about 512 bytes )of the chosen boot device.

2)Now appear the BOOT Loader Components
Boot Loader is responsible for loading and starting Linux or any other OS successfully.

But how is Boot loader invoked... tats the question ?
Answer : Certainly in below two possible ways :

1)BIOS passes the control to IPL(Initial Program Loader) installed within the in MBR(Master Boot Record).
2)BIOS passes the control to another Boot Loader (like ntldr of Xp ,LILO of Suse) ,which passes the control to IPL installed in boot partition ( /boot of abt 514MB ).


Remember IPL must not exceed the space of 446bytes

3)Hence IPL for GRUB is the First stage of Linux whose vital function is to locate and load a SECOND STAGE boot Loader (the blue splash screen)which actually do the most of the work to boot the system…

4)The Grub Boot Screen
A graphical Splash screen can be accessed by pressing enter key when GRUB starts up from First Boot Loader.This screen has got bootable image stanzas which can also be edited temporarily .Here we can also set Grub Password at Grub Command Line.

5) Now GRUB reads the Grub configuration file i.e. /boot/grub/grub.conf….available on the only fs which GRUB can understand i.e ext2/ext3, FAT,minix,FFS and reiserfs.If this file is missing Boot Loader will leave us alone with GRUB command Line which
a)can be used to write temporary boot commands from scratch..
b)View contents of files on fs,
c)perform diagnostic tests
d)experiment with GRUB configurations if file is available…

6)NOW The Kernel(http://kernelcoder.blogspot.com/) initialization files generate some output which scrolls in microseconds…i.e Device drivers compiled into the kernel are called …and locate their corresponding devices. Successful locations of device logs output to the kernel message buffer.(/var/log/dmesg).But essential drivers for ext3 fs, LVM, Software RAID and SCSI controller supports comes in modules and Kernel gets these modules from /lib/modules/$(uname) path. BUT Linux kernel still has to mount the root fs???????????????

Hhhhahahahahahah Big Question ..answer to this will be available in my next BLOG

I will welcome guesses , answers and comments …


7)After all drivers are located and loaded successfully the kernel mount the root fs ro.

8)INIT ----The first Process with (PID)process ID =1 is then loaded and control is now handed over to INIT .
Init reads /etc/inittab .which defines the default runlevel to pop into.
And further child processes can be run further.

9)But who initializes the intended runlevel ?
Answer ….
The file /etc/rc.d/rc has the responsibility to run or initialize the default runlevel specified in /etc/inittab and also acknowledge to start/stop the services with change in the runlevel.
Moreover, Each runlevel has its own corresponding directory with its scripts to run the daemon programs in background.But /etc/rc.d/rc.sysinit has many countless tasks to perform before any runlevel could be started.
/etc/rc/rcX.d
And then Symbolic links in corresponding run level directories call the /etc/rc.d/init.d scripts with start and stop argument.
Now Custom scripts are always run from /etc/rc.d/rc.local before getting Login Prompt

10)By default , init process respawns the mingetty services defined in /etc/inittab for each 6 VC. And the First VC /dev/tty7 is reserved for X server(gdm).The contents displayed by each VC is defined by expandable content in /etc/issue.
The mingetty and getty services are run for mentioned terminals.They read their configuration file /etc/mingettydefs.

11) As per gettydefs file getty process determines the speed of Terminal and Login Prompt with username appears. As we Login with authentic password…the username and passwd are matched with /etc/passwd and /etc/shadow. If match is successful then ,the init run the process mentioned at the of field of /etc/passwd .And we get the bash shell in Linux and bourne in UNIX ….About Xp Login, I donnt know…..God knows…..or may be U.

That’s it guys hope u might have true eclectic blend of fun, excitement ,anxiety and Mindblowing Power booster capsules.

Do leave your valuable comments and modifications if applicable…….

Thanking You

Nitin (kevin)

Saturday, September 22, 2007

The Magical KARMA


One cannot sit idle in life and expect life to take care of itself.
Karma,
the fulfilment of one's duties is the ultimate objective of all
human
existence and if we fail to fulfil our duties towards life, life
inevitably fails us.
Life is like an unstoppable,unobstructed,uncontrolled infinite river flow.
Breaking rule to go against the flow welcomes resentments,defeat,anger,frustration,Lost possetions and many social evils.Marauding Flow consumes everything that comes its way.Therefore clinging on to any real or Virtual Thing in Life for a long time brings inevitable unfavourable consecuences.Accept the changes,challlenges,reinventions,discoveries,innovations and Flow in direction of River by performing KARMA.

Friday, September 21, 2007

Special Thanks To Special



Sweet Cat= Sweet Pride Loving
Falling Watches = Impecable Timing
Twinkling Stars = Brightest Kohinoor (Face in the crowd not among the Crowd)
Green sheet of grass = Luck in its Court
Strange Eye = Strange Impact (Hypnotises Opposite sex)
Dimple Cheeks = Giant World envy


Thats why CAT rules Night Creatures !!!

Tuesday, September 18, 2007

AJAX !!!



Today, I'm not focusing on AJAX Soccer team but trying to share something about this astonishing Technique known as Asynchronised Javascript and XML.


This Web Development Technique is used for creating interactive Web Applications.Four major benifits of AJAX are INCREASED




  1. Interactivity


  2. Speed


  3. Usability


  4. Functionality


Whats does it comprises of ?


  • XHTML(or HTML) for marking up information.


  • The DOM accessed with a client-side scripting language, such as JavaScript and JScript, to dynamically display and interact with the information presented.


  • The XMLHttpRequest object is used to exchange data asynchronously with the web server. In some Ajax frameworks and in certain situations, an IFrame object is used instead of the XMLHttpRequest object to exchange data with the web server, and in other implementations, dynamically added <script> tags may be used.


  • XML is sometimes used as the format for transferring data between the server and client, although any format will work, including preformatted HTML, plain text and JSON. These files may be created dynamically by some form of server-side scripting

Ajax is asynchronous in the loading and does not interfere with
normal page loading.
JavaScript is the programming
Language in which Ajax function calls are made. Data retrieved using the
technique is commonly formatted using XML, as reflected in the naming of the
XMLHttpRequest object
from which Ajax is
derived.



AJAX is cross platform used on distinct Web browsers,Operating Systems and computer architecture because it uses Open standard like XML and javascript.


This is one of many reasons why Open source utilities provide us the Platform independent benifites.



OPEN Source rocks !!!!!!!!!!!!!!!!!!



Saturday, September 15, 2007

Benifits of Open Source OS

Total Cost of Ownership
Open Source systems are dramatically less expensive than proprietary systems in initial cost. The Open Source OS such as Unix,Linux,Suse,Mendrin are free, easy to install and easy to use. The extra value added by these efforts results in a very low initial cost. There are many open source software applications like OpenOffice which are free or low-cost whose quality equals--and in many cases surpasses--the quality of proprietary software applications.

Maintenance

Open source software and operating systems can often be easier to maintain over the long run than their proprietary counterparts. With open source software such as the Mozilla,Firefox web browser, a friendly reminder notifies you to download updates. The onscreen instructions are easy to walk through. When you next go online, the updates are installed and operating.
Other types of open source software, such as OpenOffice.org, is very stable, robust, and functional for long periods of time, and there is no need for frequent updates. Open source operating systems can also run stably, robustly, and continuously for long periods without crashing or causing problems, therefore little maintenance is necessary.

Finally, security issues and maintenance issues are connected. For example, there are frequent security flaws discovered in proprietary OS and software, consequently frequent downloads and maintenance for these systems are mandatory. Open source software and OS are inherently more secure. There are far fewer security patches to download and install because the software contains far fewer security flaws.

Licenses

With open source systems, licensing is virtually a non-issue! How is this possible? Because open source software and operating systems are licensed in an entirely different fashion that includes customer rights of distribution. Much open source software and operating systems are distributed under the GNU Public License, which is different than a traditional proprietary license. The GNU Public License gives you as a customer far more freedom and flexibility in how you install, copy, and use the product. Since much open source software is free, you can have as many copies of it as you like! Even open source system licenses you pay for are often far less restrictive than proprietary licenses. Not only does this type of licensing save you money in the initial purchase of an open source system, it often saves you a lot of money in the long run over upgrades, which are often inexpensive or even free. Upgrades for proprietary systems are sometimes almost as expensive as the initial purchase

Reliability

Because Open source systems are inherently more stable, they enjoy considerably greater uptime than proprietary systems. Open source systems simply do not crash or freeze as often as proprietary systems do. This increased uptime means increased consecutive productive work hours combined with a decrease in time spent on crash recovery, document recovery, and troubleshooting.

Tried & Tested

Open source systems are tried and tested by government agencies, universities, and scientific institutions. Increasing numbers of such enterprises are migrating to open source platforms, including organizations for whom reliability and security are paramount concerns.

Legacy Support

Many proprietary system vendors cease supporting older versions of their products because they make more money by selling upgrades and new products. For many organizations, legacy applications must remain for a variety of reasons. Often, business owners are hit twice regarding upgrades, because in order to upgrade an application, the operating system, the hardware, or both must also be upgraded. Open source operating systems can often run on older computers that are too slow for the newest versions of proprietary software or operating systems. The open source community is comprised of people who are dedicated to what works best in a given situation, not necessarily to what's new. You may expect solid and lasting support for legacy applications and systems

Open Source Systems are Safer and More

Open source is the choice of organizations concerned about the safety and security of their data. The vast majority of viruses, worms, and browser hijacks simply do not affect open source systems. One reason why is that they all target Microsoft™ systems. The other reason is that proprietary systems are inherently less secure than open source systems.

It's a Matter of Trust

Proprietary software involves trust in a corporation where decisions are based on marketing and shareholder concerns, rather than the concerns of customers. Open source software involves trusting craftspeople who take pride in their work and their reputation among a community of their peers--the "shareholders" and the "customers" are one and the same.

Understanding Forgiveness (internal peace)

People often misunderstand “forgiveness” as condoning the terrible things someone may have done to them. People are responsible for their own hurtful and painfull actions. Forgiving does not mean we forget the abuse, betrayal or damage others have caused. Anger can both motivate and paralyze us for getting the positive things we hope to deserve in life by hook or by crook.
Hanging on to our deep bitter pain, holding a resentment and not able to achieve peace from our infinite bad past memories are real barriers to our overall well-being.

Sustained prolonged anger and other negative emotions contribute to heart disease. So we must look at forgiveness as a healthy snack, an alternative option to release our anger. Similarly, we must not remain angry, but instead try to know that negative experiences have much to teach us about not being a victim again.

Of course, when we have been severely mistreated or violated by a friend, a sister or brother, a parent or child, we might say, “I’ll never trust her/him again,” or “I’m not going to be stupid again.” You take steps or take a stance to protect ourself
Indeed, making a decree is about “standing in our power with the understanding that all the help we need in life is available to us right now,” or “I am whole; I am strong; and I have strong boundaries to protect myself from negativity;I am more stronger than before,” are examples of expressions of decrees.

Forgiving is about our understanding that we’re not a fool or a victim. Forgiving is about self-healing.
My hope is that everyday somewhere, someone betrayed,abused or misunderstood will find ways to somehow heal and mend by FORGIVING.