Saturday 29 September 2012

incremental and differential backup

INCREMENTAL BACKUP


  • performing an incremental backup ( as opposed to a full backup every time ) is critical to the efficient  , continued operation of a Linux desktop system or a Linux server.
  • it is important to institute a policy of regular backups , preferably with the backed-up data removed to a remote location for storage.


DIFFERENTIAL BACKUP

  • a differential backup saves any changes made since the last full backup of your system.
  • this method works faster than a full backup since it saves only files that have changed since your last full backup.

LINUX shells

DEFINITION

  • Shell is an command language interpreter that executes commands read from the standard input device ( keyboard ) or from a file.
  • Shell is a user program or it's environment provided for user interaction.
  • The shell accepts a user’s entries, interprets them, converts them to system calls, and delivers system messages back to the user.


VARIOUS LINUX SHELL
  1. Bash shell (sh command)
  2. C shell (csh command)
  3. korn shell (ksh command)
  4. tcsh shell
  5. ash shell


Bash shell ( sh )

  • Default shell for most Linux distro.
  • Acronym for Bourne aagain Shell.
  • Includes features originally developed for sh and ksh shells in early UNIX systems , as well as some csh features.

C Shell ( csh )

  • csh shell was created by Bill Joy and used with most Berkeley UNIX systems (such as those produced by Sun Microsystems) as the default shell.
  • Its syntax is modeled after the C programming language.
  • While you can run both csh and tcsh on most Linux systems, both commands actually point to the same executable file. 

Korn shell ( ksh )

  • created by David Korn at AT&T Bell Labs and is the successor to the sh shell.
  • Offers rich scripting capabilities.
  • became the default and most commonly used shell with UNIX System V systems.

tcsh shell


  • open source version of the C shell (csh).
  • Enhanced C shell with file name completion and command line editing.

ash shell

  • lightweight version of the Berkeley UNIX sh shell.
  • It doesn’t include many of the sh shell’s basic features, and is missing such features as command histories. Kenneth Almquist created the ash shell.
  • good shell for embedded systems that have fewer system resources available.





common file system in LINUX

Ext2 : second extended file system

Ext2 file system

  • like a lot of file systems.
  • is built on the premise that the data held in files is kept in data blocks.
  • every file's size is rounded up to an integral number of blocks.
  • defines the file system topology by describing each file in the system with an inode data structure.
  • is described by a single inode and each inode has a single unique number identifying it. The inodes for the file system are all kept together in inode tables.



Ext3 : third extended file system


  • The Ext3 is a journal file system that is commonly used by the Linux kernel.
  • It is the default file system for many popular Linux distributions , including Debian.
  • Its main advantage over ext2 is journaling which improves reliability and eliminates the need to check the file system after an unclean shutdown.
  • Its successor is ext4.
  • Functionality: ext3 cannot be fsck-ed while the file system is mounted for writing. Attempting to check a file system that is already mounted may detect bogus (false) errors where changed data has not reached the disk yet, and corrupt the file system in an attempt to "fix" these errors.
  • Defragmentation: There is no online ext3 defragmentation tool that works on the filesystem level.
  • Recovery: There is no support of deleted file recovery in the file system design.



ReiserFS : perform journaling


  • is a general purpose , journal computer file system designed and implemented by a team at Namesys led by Hans Reiser.
  • is currently supported on Linux ( without quota support )
  • is the default file system on the Elive , Xandros , Linspire , GoboLinux and Yoper Linux distributions.
  • journaling : file system that keeps track of the changes that will be made in a journal.
  • Performance: Compared with ext2 and ext3 in version 2.4 of the Linux kernel, when dealing with files under 4KB and with tail packing enabled, ReiserFS may be faster.




Friday 28 September 2012

boot loaders in LINUX

FUNCTIONS OF BOOT LOADERS :

  • Boot loader is a piece of code that runs before any operating system is running.
  • Boot loader are used to boot other operating systems, usually each operating system has a set of boot loaders specific for it.
  • Boot loaders usually contain several ways to boot the OS kernel and also contain commands for debugging or modifying the kernel environment

GRUB ( Grand Unified Bootloader )

  • GNU GRUB is a very powerful boot loader.
  • features in GRUB : 
  • flexibility
  • GRUB understands file system and kernel executable formats, so user can     load an arbitrary operating system the way they like.
  • User can load the kernel just by specifying its file name and the drive.
LILO ( Linux Loader )
  • Is a generic boot loader for LINUX.
  • It will load the MBR ( master boot record ), into the memory, which tell the system which partition and hard drive to boot.
  • LILO is brought to life at boot time by running a tiny program , called the boot sector.
  • LILO creates a table which lets the boot loader locate the kernel files.
  • LILO is able to boot almost any OS.
LOADLIN
  • Is a Linux boot loader that runs under DOS or MICROSOFT WINDOWS ( 95,98 Me only ).
  • It allows the Linux system to load and replace the running DOS / Windows without altering existing DOS / Windows system files.
  • It loads the Linux kernel into memory from a file.It also places various configuration parameters into memory , and transfers control to the kernel.
  • The kernels reads these parameters , initializes and runs , replacing DOS / Windows completely.
SYSLINUX
  • Is a boot loader for the Linux operating system which runs on MS-DOS / WINDOWS FAT file system.
  • It is intended to simplify first-time installation of Linux , and for creation of rescue and other special purpose boot disks.
  • SYSLINUX presents a simple text interface that cam be used to select between canned configurations defined in the configuration file and can be used to add parameters to the kernel.


method to partition

AUTOMATICALLY PARTITION

  • allows you to perform an installation without having to partition your drives yourself.
  • user do not have to do the partition.
MANUAL PARTITION USING GUI ( EG: DISK DRUID )
  • Disk Druid partition is a program that partitions your hard drive for you.
  • Disk Druid can handle the partitioning requirements for a typical LINUX installation
example of partition using GUI ( disk druid )
FDISK UTILITY
  • Is a menu driven program for creation and manipulation of partition tables and create partition using command prompt.
example of partitioning using fdisk

example of partioning using fdisk

GNU PARTED
  • A graphical partition editor for creating, reorganizing, and deleting disk partitions.
  • This is useful for creating space for new operating system, reorganizing hard disk usage,copying data between hard disks and disk imaging.
example of partitioning using GNU parted 





why we need disk partition ?


BACKUP
  • In some cases, you need more than one partitions within your operating systems. It is depends on your necessity why do you want more than one partitions. Mostly people make it for backups. If you want to restore that partition later, you can simply copy it back (bit by bit) to a hard disk. With smaller partitions, this approach can be done fairly efficiently.


DIFFERENCE FILE SYSTEMS
  • some people who are install multiple operating system to their computers wants to do partitions that compatible with operating systems installed in their computers.
  • for example if a computer is installed with Linux and Windows XP, they must partition their hard disk with Ext2 file system for Linux and NTFS file system for XP. 

EASY TO MANAGE
    SECURITY
      VIRUS / DATA CRASH

      LINUX kernel

      KERNEL
      kernel is a piece of software that constitutes the central core of a computer operating system.  
      It has complete control over everything that occurs in the system . 

      There are 2 types of kernel :
      •  monolithic kernel
      • microkernel
      monolithic kernel
      monolithic kernel

      -> Monolithic kernel got simple design and it is a single large processes running entirely in a single address space and in the kernel space.

      -> All kernel services exist and execute in kernel address space.
      -> The example of monolithic kernel based on OSS are LINUX and UNIX

      microkernel

      microkernel

      -> The kernel is broken down into separate processes , known as servers.

      -> Some of the servers run in kernel space and some run in user-space.
      -> All servers are kept separate and run in different address spaces.

      Monday 24 September 2012

      BENEFITS OF LINUX


      RELIABILITY

      • The majority of Linux variant and versions are reliable.
      • Can often run for months and years without needing to rebooted.
      SCALABILITY
      • Linux is to be very accommodative of increasing needs of servers. 
      • Its scalability along from its cost makes Linux a most profitable option.
      SECURITY
      • Linux operating system has been managed to stay secure in the widespread viruses, spyware and adware.
      • There would be hundreds of patches released either by ordinary people or by the distribution maintainers.
      FLEXIBILITY
      • LINUX can be used for high performance server applications, desktop applications and embedded systems.
      • can save disk space by only installing the components needed for a particular use.

      EXAMPLE OF OPEN STANDARDS

      System

      • World Wide Web architecture specified by W3C
      File format
      • Hypertext Markup Language (HTML), Extensible HTML (XHTML)
      • Portable Document Format (PDF) (a specification by Adobe Systems Incorporated for formatted documents, later approved by ISO as ISO 15930-1:2001
      Protocols
      • Internet Protocol (IP) a specification for transmitting packets of data on a network
      Programming Language
      • C# - a general-purpose programming language

      THE PRINCIPLE OF OPEN STANDARD

      Definition lists a set of principles that must be met by an open standard:

      Availability

      • Open Standards are available for all to read and implement.
      Maximize End - User Choice

      • Open Standards create a fair, competitive market for implementations of the standard. 
      • They do not lock the customer in to a particular vendor or group.
      No Royalty
      •  Open Standards are free for all to implement, with no royalty or fee. 
       No Discrimination
      • Open Standards and the organizations that administer them do not favor one implementor over another for any reason other than the technical standards compliance of a vendor's implementation.
      Extension or Subset
      • Implementations of Open Standards may be extended, or offered in subset form. However, certification organizations may decline to certify subset implementations, and may place requirements upon extensions (see Predatory Practices).
      Predatory Practices
      • open Standards may employ license terms that protect against subversion of the standard.

      DEFINE OPEN STANDARD

      Is a standard that is publicly available and has various rights to use associated with it, and may also have various properties of how it was designed.