Note


OPEN SOURCE AND 
LINUX FUNDAMENTALS

1.1.1 open source technology
Open source technology  = Open source software
 - based on idea that the user cannot only view, but change the source code of an application


1.1.2 History of open source
- in 1983, Richard Stallman launched the GNU Project to write a complete operating system  free from constraints on use of its source code.
- In 1989, the first version of the GNU General Public License was published.A slightly updated version 2 was published in 1991.
- In 1989, some GNU developers formed the company Cygnus Solutions.
- The Linux kernel, started by Linus Torvalds, was released as freely modifiable
source code in 1991.
- The BSD lawsuit was settled out of court in 1993, FreeBSD and NetBSD (both derived from 386BSD). 
- KDE was founded in 1996 by Matthias Ettrich. At the time, he was troubled by the inconsistencies in UNIX applications. 
- In 1997, Eric Raymond published The Cathedral and the Bazaar, a reflective analysis of the hacker community and free software principles. The paper received significant attention in early 1998 and was one factor in motivating Netscape Communications Corporation to release their popular Netscape Communicator Internet suite as free software. This code is today better known as Mozilla Firefox and Thunderbird.
- In August 1999, Sun Microsystems released the StarOffice office suite as free software under the GNU Lesser General Public License. The free software version was renamed OpenOffice.org, and coexists with StarOffice.


1.1.3 CURRENT ISSUES AND TRENDS OF OPEN SOURCE SOFTWARE (OSS)
In May 8, 2007, Sun Microsystems released the Java Development Kit as OpenJDK under the GNU General Public License. Part of the class library (4% of it) could not be released as open source due to them being licensed from other parties and were included as binary plugs. Because of this, in June 2007, Red Hat launched IcedTea to resolve the encumbered components with the equivalents from GNU Classpath implementation. Since the release, most of the encumbrances have been solved, leaving only the audio engine code and colour management system (the latter is to be resolved using LittleCMS).
- In January 2010, Global Graphics completed a survey with 400 Chief Information Officers from organizations with over 1000 employees across the US and the UK that showed three quarters (76 per cent) of large organizations use free software across the enterprise with over half (51 per cent) planning to deploy more free software in 2010.


1.1.4 TYPES OF OSS
Apache web server
Linux operating system kernel
Firefox web browser
Sun's Java programming language and environment
MySQL database system
FreeBSD Unix operating system
Sun's 2 OpenOffice.org office productivity suite
Wireshark network packet sniffer and protocol analyser.


1.1.5 VARIOUS OSS WEB RESOURCE
A.OSS Websites
    http://www.oscc.org.my/
B.OSS Repository
    http://mirror.oscc.org.my
C.Mailing List
    http://www.opensource.org/lists
    http://lists.oscc.org.my/mailman/listinfo
D. Forum
     http://www.linuxforums.org/
E. Usenet Newsgroup
     http://www.linux.org/docs/usenet.html


1.1.6 VARIOUS OSI CERTIFIED OSS LICENSES
A. LGPL(GNU Lesser General Public License)
     is a free software license published by the Free Software Foundation (FSF). It was designed as a compromise between the strong-copyleft GNU General Public License or GPL and permissive licenses such as the BSD licenses and the MIT License.


B. BSD (Berkeley Software Distribute License)
     This is the licence applied to the software distributions of the Computer Science Research Group, of the University of California at Berkeley


C. MIT License
     The MIT License is a free software license originating at the Massachusetts Institute of Technology (MIT), used by the MIT X Consortium.


D. Mozila License
     This is the licence made by Netscape to distribute the code of Mozilla, the new version of it network navigator. It is in many respects similar to the GPL, but perhaps more ``enterprise oriented''. 


1.2.1 the origin of linux
Linux was created as a solution to a simple need by Linus TorvaldsLinux’s author and principal maintainer, called Minix.
- Minix is a simple, Unix-like, operating system widely used as a teaching aid.
- Progress was quick and Linux offered his efforts to other students via the emerging Internet, then mainly used by the academic community.
- Soon, other programmers saw the software and started contributing. Much of this new software was itself the solution to problems that the contributors had.
- Before long, Linux had become an operating system. Based on published Posix standards, Linux itself contains no Unix code.
- Linux is built with and uses much of the GNU - (9 software produced by the Free Software Foundation.
- Linux is a multi-threaded; multi-user, Unix-like operating system.
- It functions equally as well (in a relative sense) on 16-bit, 32-bit, an architectures.
- Linux requires no license to operate, is freely available, and there is no required registration process for using or distributing it.
- Linux excels at a number of tasks, as both server and workstation, including file and print serving, intranet and Internet management (news, web, mail) and protocol routing, and general system administration.DSC 


1.2.2 linux standard
- The Linux Standard Base, or LSB, is a joint project by several Linux distributions under the organizational structure of the Linux Foundation
The goal = is to develop and promote a set of open standards that will increase compatibility among Linux distributions and enable software applications to run on any compliant system even in binary form.
- In addition, the LSB will help coordinate efforts to recruit software vendors to port and write products for Linux Operating System. base (lsb)


1.2.3 the linux features
a. No Constant Rebooting
      The only time a system requires a reboot is when there is a major hardware upgrade (or failure) or kernel upgrade. If these don’t occur, it’s common for the system to be up for years.


b. Portable Software
    Use the software as they wish, for whatever they wish, on as many computers as they wishin any technically appropriate situation
Have the software at their disposal to fit it to their needs. Of course, this includes improving it, fixing its bugs, augmenting its functionality, and studying its operation.
Redistribute the software to other users, who could themselves use it according to their own needs. This redistribution can be done for free, or at a charge, not fixed beforehand.
c. Downloadable Applications
       Linux is free download applications on internet. 


d.No Settings hidden in code or Registries
     Linux and many Linux applications are distributed in source form. This makes it possible for you and others to modify or improve them. You're not free to do this with most operating systems, which are distributed in binary form. For example, you can't make changes to Microsoft Windows or Microsoft Word - only Microsoft can do that.


eMature Desktop (X Window System)
    The X Window System is a Graphical User Interface (GUI) developed at the Massachusetts Institute of Technology (MIT). In some ways one can compare the X Window System with early versions of Microsoft Windows. Just as Microsoft Windows was an application that ran on top of MS-DOS, X Window is a graphical environment that runs on Unix and Unix-like operating systems. The X Window system, however, is simply a program that draws graphics to the display environments take care of the look and feel of the desktop, aid provide a wide range of configuration options and functionality.


e. Freedom
    Nobody should be restricted by the software they use. There are four freedoms that every user should have:
                 : the freedom to use the software for any purpose,
                 : the freedom to change the software to suit your needs,
                 : the freedom to share the software with your friends and neighbors, and
                 : the freedom to share the changes you make.
    When a program offers users all of these freedoms, we call it free software (free not refer to price but freedom).


1.2.4 the compoent of make up the linux kernel
a. Processor
    : 386 PC, runs on many different CPUs, not just Intel.


b. Memory
    : has memory protection between processes, so that one program can't bring the whole system down.


c. Devices
     : Linux are now available for such computer models as the Apple PowerPC, the DEC Alpha, the Motorola 68k, the Sun SPARC, the Mips, and many others.


d. File Systems
     : One of the most important features of Linux is its support for many different file systems. This makes it very flexible and well able to coexist with many other operating systems. At the time of writing, Linux supports 15 file systems; ext, ext2, xiaminixumsdosmsdosvfat, proc, smbncp, iso9660, sysvhpfsaffs and ufs, and no doubt, over time more will be added.


e. Securit
      Security is one of the largest problems facing the IT sector today. All Operating systems are vulnerable, however, Linux provides a level of security that some say transcends other mainstream Operating Systems. The Open Source model allows for expert auditing and “self” policing of code prior to release. If problems do occur, fixes are normally developed and tested by the “group” of worldwide programmers. In addition, viruses and “worms” are often of little concern if you are running a Linux machine. Tools such as Open SSH, Kerberos, Ipchains etc. are just a few examples of programs dedicated toward system security.


1.2.5 linux packages


Linux package formats are the different file formats used to package software for various Linux distributions. These are the principal kinds of package:
        i.Binary packages
        ii.Source packages 


1.2.6 linux distribution


a.Fedora Core
   which is a community distribution sponsored by Red Hat


b. KNOPPIX
    The first Live CD distribution to run completely from removable media without installation to a hard disk. Derived from Debian


c. Debian
    a non-commercial distribution maintained by a volunteer developer community with a strong commitment to free software principles


d. SUSE
     originally derived from Slackware, sponsored by the company Novell . 


e. Ubuntu
     a popular desktop distribution derived from Debian, maintained by Canonical


f. Mandrake
    - runs on all Intel and compatibles architectures (486, Pentium, Pentium Pro, Pentium MMX, Pentium II, III, IV, Itanium, and a ll clones).
    - combines the power of Unix-based systems with the flexibility of a very powerful Graphical Desktop.


g. Slackware
    - is a popular distribution for the more advanced user. Desktop workstation, router, server from the lowly 386 to the very latest hardware.


h.Gentoo
    - a distribution targeted at power users, known for its FreeBSD Ports-like automated system for compiling applications from source code


i. Red Hat
   - is the most popular distributor in North America and is aimed more towards novices.
   - which is a derivative of Fedora maintained and commercially supported by Red Hat 


1.2.7 LINUX DEVELOPED & PACKAGED
Linux refers to the family of Unix-like computer operating systems that use the Linux kernel. Their development is one of the most prominent examples of free and open source software collaboration; typically all the underlying source code can be used, freely modified, and redistributed, both commercially and non-commercially, by anyone under licenses such as the GNU General Public License.
- Typically Linux is packaged in a format known as a Linux distribution for desktop and server use. Linux distributions include the Linux kernel and all of the supporting software required to run a complete system, such as utilities and libraries, the X Window System, the GNOME and KDE desktop environments, and the Apache HTTP Server. Commonly used applications with desktop Linux systems include the Mozilla Firefox web-browser, the OpenOffice.org office application suite and the GIMP image editor


1.2.8 ADMINISTRATIVE COMMANDS & APPLICATIONS ADDED TO LINUX KERNEL
.
a.GUI
   - FBUI, or FrameBufferUI in-kernel graphical user interface for Linux. It permits you to put windows in each framebuffer-based virtual console to read keyboard input and track the mouse pointer


b. Administrative Utilities
   - Linux allows administrator to remotely handle system administration and maintenance tasks, via a network with a command line interface or GUI.
   - They are many utilities remote administration available for MS-Windows, however these are often third party applications that only allow a subset of administration tasks. Since all system administration on a Linux system can be performed at the command line, a system administrator has complete control of a Linux server from any text-based connection. For those more comfortable with a GUI interface, there are several utilities that allow remote administration in a graphical environment.


c.Applications
   StarOffice (word processing, spreadsheets, graphics and presentation software).
   •Applixware (word processing, spreadsheets, graphics, presentation software, and data component)
   •Database managers (ADABAS, DB2, Informix, Ingres, Oracle, and Sybase)
   •Desktop managers (K Desktop Environment (KDE) and GNU Object Model Environment (GNOME) — both freely available) 
    •Software Emulators (MS-DOS: dosemu, MS-Windows: WINE, and VMware virtual machine)
     •Games (Tribes 2, Rune, Descent 3, Unreal Toumament, and more!)
     •MP3 players (xmms) and MP3 rippers (grip)
     •Graphics programs (GIMP)


d.Programming Tools
   The list of languages include:
•C++
•FORTRAN
•Java
•Pascal
•Perl
•Python
•Tcl/Tk
  There are many more supported languages than what is listed above.


e. Server Features
Reduce costs - Its simplified maintenance and upgrades save hours and the lack of licence. And by accessing a world of best-in-class open-source applications you can make your IT budget go further.
Administration - Operations like start-up, shut-down and package management are simplified with single commands. Deploy pre-configured and secured services in seconds. Set up industry-standard mail, web, DNS, file, Java application, cloud infrastructure or database servers in minutes. With Landscape you can manage a server farm as easily as a single server.
Security - Uncomplicated firewall technology makes access secure yet simple, while a home and private directory encryption service adds another layer of security.





Hardware Requirement
  •  For Installing Linux Server/ Desktop Operating System, it need a specific configuration of  hardware  platform.
  Processor Requirements
  •     Intel
  •  AMD
  •     Cyrix
  •      VIA processor are used for Linux
  Minimum Requirement for 32-bit version.
  Intel Pentium or better processor, and is optimized for Pentium 4 and later processors.

  Processor Requirements
  Recommended for text-mode:
   -200 MHz Pentium-class or better
  Recommended for graphical:
   -400 MHz Pentium II or better

  Memory Requirements
  Minimum RAM for text-mode: 128MB
  Minimum RAM for graphical: 192MB
  Recommended RAM for graphical: 256MB

  Hard Disk Space Requirement
  Minimum space required at the initial stage at the time of installation is 90 MB
   which required some additional space of 175 MB.
  total disk covers 9 GB space after the installation of all the packages includingJava, Apache, Eclipse and Java Applications software.

  Minimum Requirement for 64-bit version.
  Minimum RAM for text-mode: 128MB
  Minimum RAM for graphical: 256MB
  Recommended RAM for graphical: 512MB

  PowerPC Hardware Requirements
  Recommended for text-mode:
   233 MHz G3 or better, 128MiB RAM.
  Recommended for graphical:
   400 MHz G3 or better, 256MiB RAM.

Various Method Of Installing Linux
 —  FTP server across the network  The File Transfer Protocol (FTP) is used as one of the most common means of copying files between servers over the Internet.
  • By default, the VSFTPD package allows regular Linux users to copy files to and from their home directories with an FTP client using their Linux
  •   VSFTPD - Very Secure FTP Daemon  is an FTP server for Unix-like systems, including Linux. It is licensed under the GNU General Public License. It supports IPv6 and SSL.
                        Hypertext Transfer Protocol (HTTP)
  HTTP web server across the network
  Installer request from HTTP server.
  The server, which stores content (or resources) such as HTML files and images (installer OS
Linux).

  Network File System (NFS)
  Network file system protocol originally developed by Sun Microsystems
  NFS is often used with Unix operating systems such as Solaris, AIX, HP-UX  and Unix-like
operating systems (such as Linux).
  The server implements NFS daemon processes (running by default as nfsd) in order to make its
data generically available to clients.

  Server Message Block (SMB)
  mainly used to provide shared access to files, printers, serial ports, and miscellaneous
communications between nodes on a network.
  Installer for Linux OS can request from server use SMB.

  HDD (Hard Disk Drive)
  Use installer that contains in HDD.
  User copy file OS for Linux CD.

  Installation from one or more CD-ROMs
  Use live CD for installation.

Multiple Partitions

  Benefits of multiple partitions
  Separation of the operating system and program files, from user files
  Having an area for operating system virtual memory swapping/paging.
  Keeping frequently used programs and data near each other.
  Use of multi booting setups, which allow users to have more than one operating system on a
single computer.
 Raising overall computer performance on systems where smaller file systems are more efficient

PC partition types
  Primary partition
  A primary partition contains one file system.
  Though a Linux operating system may recognize a number of different file systems (ext2,
ext3, ReiserFS, etc.).
  Extended partition
  primary partition which contains secondary partition(s).

Reason Create Multiple Partition
  •   A partition with all data necessary to boot the machine
  • A partition with configuration data and server programs
  • One or more partitions containing the server data such as database tables, user mails, an ftp archive etc.
  •  A partition with user programs and applications
  • One or more partitions for the user specific files (home directories)
  • One or more swap partitions (virtual memory)
Partitions In Linux
  Data partition
  Normal Linux system data, including the root partition containing all the data to start up and
run the system; and
  Swap partition
  Expansion of the computer's physical memory, extra memory on hard disk.
  Most systems contain a root partition, one or more data partitions and one or more 
swappartitions.

Root Directory


  The root directory
  •     The directory on Unix-like operating systems that contains all other directories.
  •      Contains files on the system and which is designated by a forward slash ( / ).
  •      The word root, when used by itself, refers to the root user or root account
  •       The directory /root is a standard first tier directory in the root directory
  •        It is referred to as the root user's home directory
Amount of Physical Memory in The Form of Swap Space
  An example on a system with 512 MB of RAM:
  1st possibility: one swap partition of 1 GB
  2nd possibility: two swap partitions of 512 MB
  3rd possibility: with two hard disks: 1 partition of 512 MB on each disk.

Common Linux File System
  /boot
  The startup files and the kernel, vmlinuz. In some recent distributions also grub data. Grub
(GRand Unified Boot loader and) is an attempt to get rid of the many different boot-loaders we
know today.
  /home
  Home directories of the common users.
  /usr
  Programs, libraries, documentation etc. for all user-related programs.
  /opt
  Typically contains extra and third party software.
  /root
  The administrative user's home directory. Mind the difference between /, the root directory and
/root, the home directory of the root user.
  /tmp
  Temporary space for use by the system, cleaned upon reboot, so don't use this for saving any
work!
  /var
  Storage for all variable files and temporary files created by users, such as log files, the mail
queue, the print spooler area, space for temporary storage of files downloaded from the Internet,
or to keep an image of a CD before burning it.

Partitions Method

  Automatically Partition
  There not partitions, there mount points for your floppy and CDROM drives.
  Manual Partitioning(Graphical partitioning tool)
  This will guide user deciding which partitions to mount.
  Use fdisk utility
  Is a menu driven program for creation and manipulation of partition tables & create partition use
command prompt.
  GNU Parted
  A graphical partition editor for creating, reorganizing, and deleting disk partitions.

Install and Start Linux

Dedicated Machine
  Full installation.
Ø  Installation that will erase all data in user hdd.
Ø  User want to remove other type of OS like windows.
       Computer  with Microsoft Windows Partition
       Dual-boot
Ø  Shrinking user Windows partition, and installing package commonly-used in Linux
partitions.
Ø  User can select bootloader either want Linux or Windows OS.

Boot With Bootable Linux
  • User need the Ultimate Boot CD to boot Linux OS.
  • Ultimate Boot CD need if user want to:
   —  Run floppy-based diagnostic tools from CDROM drives.
             Method of choice user need to resize/rescue partitions, access NTFS file systems or work  
               with USB storage devices.
              Consolidate as many diagnostic tools as possible into one bootable CD.
              Run Ultimate Boot CD from your USB memory stick.
                Helps improve the chances that UBCD will boot on any particular machine.

Boot With USB
  •  Install favorite Linux operating system on a flash drive or USB key no larger than thumb (ThumbDrive).
  •   Portable Linux operating system can be run from any computer  that can boot from a USB flashdevice.
  •   Allowing user to bring entire operating system with them.
  •  It’s user own personal operating system user can carry in their pocket
Boot Loaders in Linux

  Function of boot loader
  •     Responsible for configuring the CPU and other core logic
  •     Highly hardware-dependent routine
  •      Examples when implementing to use existing BSP code for standard development boards (SDBs) that use the same CPU or processor.
  •   First function that is run following a CPU reset.
 Task for boot loader


—   Put the CPU into the correct run mode.
—   Disable or mask interrupts at the CPU level.
—   Ensure that the memory management unit (MMU) and translation look-aside buffers (TLBs) are off.
         Invalidate caches and write buffers.
  • Initialize the memory controller.
  •   Initialize other necessary on-chip devices like clocks.
GRUB
What is GRUB?
        GNU GRUB is a very powerful boot loader.
 —  GRUB is designed to address the complexity of booting a personal computer:
    — both the program and this manual are tightly bound to that computer platform. porting to other platforms may be addressed in the future.


Features in GRUB
        One of the important features in GRUB is flexibility.
        GRUB understands file systems 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.
  To let GRUB know the drive and the file name:
           User can either type in them manually via the command-line interface or use the nice menu interface.

GRUB features

  Recognize multiple executable formats
    —  Support many of the a.out variants plus ELF. Symbol tables are also loaded.


  Support non-Multiboot kernels
           Support many of the various free 32-bit kernels that lack Multiboot compliance.


  Load multiples modules
          Fully support the Multiboot feature of loading multiple modules.


  Load a configuration file
          Support a human-readable text configuration file with preset boot commands.


  Provide a menu interfac
   —  A menu interface listing the preset boot commands, with a programmable timeout.


  Have a flexible command-line interface
          A fairly flexible command-line interface, accessible from the menu.


  Support multiple filesystem types
         Support multiple filesystem types transparently, plus a useful explicit blocklist notation.


  Support network booting
          GRUB basically a disk-based boot loader but also has network support.
     You can load OS images from a network by using the TFTP protocol.

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.

LILO features
  • To set a default partition to boot.
  •   To set the time-out value.
  •   Determine which choices should appear in a menu.
  •  To set kernel parameters.
  •   To determine which partition to mount as the root partition.
  •   Determine whether or not to initially load a RAM disk.