Linux™ Basic Overview

  • Upload
    rejnan

  • View
    221

  • Download
    0

Embed Size (px)

Citation preview

  • 7/29/2019 Linux Basic Overview

    1/37

    Linux Basic Overview for CES CFE

    CES TOI for Level 1/2 Support Engineers.Best viewed as PDF format.

    Jimmy Andriambao, EMEA RSD Systems engineer

    Sun Microsystems June 2006

    http://www.sun.com/support

    Sun Microsystems IBERIACalle Serrano Galvache 56

    MADRID 28033SPAIN (EUROPA)

    Revision 2.4-GA, 06/19/06Edition: June 2006

    Linux BASIC Overview for CES CFE Page 1/37

    http://www.sun.com/supporthttp://www.sun.com/support
  • 7/29/2019 Linux Basic Overview

    2/37

    Sun Microsystems, Inc. has intellectual property rights relating to technology that is described inthis document. In particular, and without limitation, these intellectual property rights may includeone or more of the U.S. patents listed at http://www.sun.com/patents and one or more additionalpatents or pending patent applications in the U.S. and in other countries.

    This document and the product to which it pertains are distributed under licenses restricting theiruse, copying, distribution, and decompilation. No part of the product or of this document may bereproduced in any form by any means without prior written authorization of Sun and its licensors, ifany.

    Third-party software, including font technology, is copyrighted and licensed from Sun suppliers.

    Parts of the product may be derived from Berkeley BSD systems, licensed from the University ofCalifornia. UNIX is a registered trademark in the U.S. and in other countries, exclusively licensedthrough X/Open Company, Ltd.

    Sun, Sun Microsystems, the Sun logo, AnswerBook2, docs.sun.com, Solaris, and Solaris OperatingEnvironment are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and inother countries.

    The OPEN LOOK and Sun Graphical User Interface was developed by Sun Microsystems, Inc. for itsusers and licensees. Sun acknowledges the pioneering efforts of Xerox in researching and developingthe concept of visual or graphical user interfaces for the computer industry. Sun holds a non-exclusive license from Xerox to the Xerox Graphical User Interface, which license also covers Sunslicensees who implement OPEN LOOK GUIs and otherwise comply with Suns written license agreements.

    U.S. Government RightsCommercial use. Government users are subject to the Sun Microsystems, Inc.standard license agreement and applicable provisions of the FAR and its supplements.DOCUMENTATION IS PROVIDED "AS IS" AND ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS ANDWARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ORNON-INFRINGEMENT, ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT SUCH DISCLAIMERS ARE HELD TO BE LEGALLYINVALID.

    Copyright 2003 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, California 95054, Etats-

    Unis. Tous droits rservs.

    Linux is Copyright Linus Benedict Torvalds and is under

    the GNU public licence. (http://www.gnu.org)

    Please Recycle !!!

    Linux BASIC Overview for CES CFE Page 2/37

  • 7/29/2019 Linux Basic Overview

    3/37

    Linux BASIC Overview for CES CFE (Solaris Skilled engineers)

    This article provides an introduction (transfert of information) to the LinuxOperating Environment and compares and contrasts it with the Solaris OperatingEnvironment (Solaris OE). This document is adapted to the CES CFE (Customer

    Facing Engineer).

    The purpose of this article is to quickly familiarize the CES CFE with the LinuxOE and to provide a reference for Linux Support. It is for readers who havealready done Solaris System Admin 1 and 2 Trainings on SPARC hardware.

    The Linux information in this article is based on Redhat Linux RHEL 3.0 and 4.0running on X86 architecture system. Because the core of all Linux distributionsis essentially the same, most of the material here can be applied to anydistributions. Note that Novell SUSE Linux also does use RPM (Redhat PackageManager) as its package installer.

    Although there are some references to Solaris x86 version 9 and 10, another pre-

    requisite is to have participed to the X86 and X64 TOI CES Trainings.

    This article contains the following topics:

    Page 04 Linux OriginsPage 06 SoftwarePage 12 HardwarePage 14 KernelPage 19 NetworkingPage 21 System

    Page 29 CFE TROUBLESHOOTINGPage 34 Small LexicalPage 35 About the AuthorPage 36 Related ResourcesPage 37 Accessing Sun Documentation Online

    Linux BASIC Overview for CES CFE Page 3/37

  • 7/29/2019 Linux Basic Overview

    4/37

    Linux Origins

    Linux is considered a UNIX like operating system, primarily because no part of

    it was derived from the source tree of either AT&T or BSD UNIX. It originated asa project in 1991 by Linus Torvalds who was college student at the University ofHelsinki in Finland.

    Linus name is not pronounced Ly-nus, but rather Lee-nus. Consequently,Linux is pronounced Lee-nucks, but in the U.S., its more commonly pronouncedLinnucks, with a short i sound. Note that Ly-nucks is generally consideredan incorrect pronunciation.

    Here is the URL to the mail sent by Linus on the 08/25/1991 to what we now callthe open source community :http://groups.google.com/group/comp.os.minix/msg/b813d52cbc5a044b

    Hello everybody out there using minix -

    I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) for 386(486) ATclones. This has been brewing since april, and is starting to get ready. I'd like any feedback on things peoplelike/dislike in minix, as my OS resembles it somewhat (same physical layout of the file-system (due topractical reasons) among other things).

    Linus wrote his kernel from scratch, usingMinix as the initial environment todevelop his kernel. Minix is a free operating system used primarily as aneducational tool to teach about operating systems. Linus soon expanded the

    kernel, posting the source code to the Internet and, before long, others beganto add support for file systems and hardware.

    Today, Linux has the same features as those found in other modern UNIX operatingsystems features such as priority scheduling, virtual memory, and multithreadedprocessing. It runs on 16 different architectures, including Intel, SPARC, andPowerPC. It has support for over 30 file system types, and has drivers for over2000 hardware components. It uses software from the open-source GNU project asits operating environment. In the developement of Solaris 10 we can see featureswhich come from Linux.

    On the next page you can see where stands Linux within the UNIX world and itsorigins.

    Linux BASIC Overview for CES CFE Page 4/37

    http://groups.google.com/group/comp.os.minix/msg/b813d52cbc5a044bhttp://groups.google.com/group/comp.os.minix/msg/b813d52cbc5a044b
  • 7/29/2019 Linux Basic Overview

    5/37

    Linux BASIC Overview for CES CFE Page 5/37

  • 7/29/2019 Linux Basic Overview

    6/37

    Software

    This section describes the GNU/Linux OE and compares it to the Solaris OE.

    This section contains the following topics:

    GNU SoftwareDistribution MethodsSystem InstallationCommandsLibrariesDocumentation

    GNU Software

    GNU (pronounced guh-new) is the name of a project started in 1984 by RichardStallman of MIT to develop open-source software and an operating system to runit on. The name itself is a programmers joke and recursively stands for GNUs

    Not Unix. Most GNU software can be compiled and installed on a variety ofoperating systems, including virtually all versions of UNIX. The GNU softwareactually covers a large part of what we call Linux today.

    Linux itself really only refers to the kernel.

    For more information on GNU, refer to the GNU Web site at :

    http://www.gnu.org

    Linux BASIC Overview for CES CFE Page 6/37

    http://www.gnu.org/http://www.gnu.org/
  • 7/29/2019 Linux Basic Overview

    7/37

    Distribution Methods

    As mentioned in the previous section, most of the software that runs in Linuxenvironment comes from the GNU project and is open source.

    Open source means that the software is distributed in the form of source codeand that the source code is freely available to everyone. However, for thesoftware to be useful, it must be compiledinto machine code. It would be veryhard to go about compiling all of the software required tobuild a Linux system.

    From the ls command to the C compiler itself (gcc, make), all the software mustbe built from the source code.

    This is why there are numerous Linux distributions.

    A Linux distribution is released in the form of binaries and scripts merged intoa CDROM that makes easy the installation onto a computer.

    For Redhat, Mandriva (ex Mandrake), Novell Suse and Sun JDS, the distributionmethod is rpm package files.

    RPM means Redhat Package Manager. The rpm package format is similar infunctionality to a Solaris package and uses the rpm commandto install orremove a package. Like pkgadd and pkgrm in Solaris, the rpm command is capableof checking dependencies; running pre-install, post-install, and removeroutines.

    Extensive information about the functionalities of rpm is available on therpm(8) manual page. Further information are at http://www.rpm.org andhttp://www.redhat.com websites.

    See Sunsolve Infodoc : 70394 How to install a Package Under Redhat, Suse...

    REDHAT RHEL stands for Red Hat Enterprise Linux

    SUSE SLES stands for Suse Linux Enterprise Server

    Mandriva Linux (ex-Mandrake) is based on a previous version of REDHAT

    SUN Java Desktop System is based on a previous version of SUSE Linux

    SUSE Linux is based on a previous version of Slackware Linux.

    Linux BASIC Overview for CES CFE Page 7/37

    http://www.rpm.org/http://www.redhat.com/http://www.rpm.org/http://www.redhat.com/
  • 7/29/2019 Linux Basic Overview

    8/37

    System Installation

    The installation process for most distributions is very simple and GUI driven.

    The basic steps for installing Linux are similar to those for installing theSolaris OE :_ Identify the system, select the disk_ Create partitions_ Network configuration_ Choose which locales and software packages_ Setting the configuration for your keyboard, video card, and mouse etc...

    Now these tasks are fairly simple because the installation program is usuallycapable of probing the hardware to figure out what drivers it needs. All that isusually required from a user is to decide what resolution and color depth to runat and if you want your machine to run as a server or a desktop.

    The installation program will also prompts for how to install the boot loader:LInux LOader (LILO) or GRand Unified Bootloader (GRUB).

    Commands

    In Solaris OE, /bin is symbolically linked to /usr/bin. In Linux, thesedirectories are separate and a distinction is made between the system binaries

    that go in /bin and application binaries that go in /usr/bin. In Solaris OE,application binaries typically get installed in /opt or /usr/local. Bothoperating environments have administrative commands in /sbin and /usr/sbin.

    The path /lib (/lib64 for a 64bits OE) will contain the system librairies and

    /etc will store system configuration files. As usual for a UNIX system /var and/tmp will have the same usage as for Solaris.

    Most of the standard UNIX commands in Linux share a commonality with BerkeleyStandard Distribution (BSD) rather than AT&T System V Release 4 (SVR4). Thecommand-line arguments are taken mostly from BSD. Other commands are completely

    unique to Linux, but have similar counterparts in Solaris.

    Linux BASIC Overview for CES CFE Page 8/37

  • 7/29/2019 Linux Basic Overview

    9/37

    Now we'll see some commonly used commands in Solaris, with their counterparts inLinux. This list is not comprehensive. If you have access to a Linux OE, feelfree to try them and check their unix manuals.

    To read the ls manual, from a Linux shell ;# man ls

    To search for a command manual :# man -k keyword_of_the_command_you_are_searching

    Small list of common Solaris Commands Mapped to Linux Commands :

    Solaris : Linux :

    df -k df -k or df -h(df List file systems in allocation units of Kbytes)

    nawk/grep awk/gawk/grep(Pattern scanning and processing language)ps -fea ps ax(List process status for all processes running)

    pkgadd rpm -iv(Add a software package to the system)

    pkgrm rpm -e(Remove a software package)

    gzcat YOURFILE | tar -xvf - tar -xzvf YOURFILE(Uncompress YOURFILE compressed tar file)

    cc gcc(C compiler)xterm/dtterm xterm/konsole/gnome-terminal(GUI shell/terminal/console program)

    lpsched lpd (can be cupsdfrom CUPS)(Printer daemon)tip minicom

    (Serial port access program)snoop tcpdump(Network packet sniffer)

    patchadd rpm -U(Install/Upgrade a software but under Linuxwe do not patch the commands)

    priocntl -e nice(Start a process with a given priority)

    priocntl -s renice(Change the priority of a running process)

    Linux BASIC Overview for CES CFE Page 9/37

  • 7/29/2019 Linux Basic Overview

    10/37

    Small list of common Solaris Commands Mapped to Linux Commands :(Continued)

    Solaris : Linux :

    prstat top

    (Actively report process statistics)

    useradd adduser(Add a user account)

    /sbin/swapadd /sbin/swapon(Enable swap devices)

    format fdisk/cfdisk/diskdruid(Manipulate disk and partition tables)

    find / -print | grep PATERN find (the same syntax)(Find a file)

    mount -F type /dev/c0t0d0 /mnt/ mount -t type /dev/hda1 /mnt/(Mount a file system of type : ntfs, ext2, ext3, ufs)inetd xinetd(Internet daemon)installboot lilo/grub-install(Install boot/bootloader program)

    swap -l /sbin/swapon -s (or 'free' command)(Display swap information)

    who -r runlevel(Show run level)

    truss strace (lsof)(Trace a process)

    dmesg dmesg(show kernel message outputs)

    /var/adm/messages /var/log/messages(where is saved kernel messages and deamons outputs)

    fdisk parted (fdisk is buggy)

    For a comprehensive list, consult Bruce Hamiltons UNIX Rosetta Stone Web siteat http://bhami.com/rosetta.html

    Linux BASIC Overview for CES CFE Page 10/37

    http://bhami.com/rosetta.htmlhttp://bhami.com/rosetta.html
  • 7/29/2019 Linux Basic Overview

    11/37

    Libraries

    As with binaries, there is a distinction between system libraries andapplication libraries in Linux. The system libraries are contained in /lib andthe application libraries are contained in /usr/lib.Solaris does not make this distinction, because /lib is just a symbolic link to/usr/lib. (see 'man ln' to understand what is a symbolic link)

    Both Solaris and Linux have a runtime linker responsible for linking executablesto their shared library dependencies. The mechanism works very much the same wayin both operating environments, as shown :

    Linking Executables to Shared Libraries

    Solaris : Linux :

    /usr/lib/ld.so.1 /lib/ld-linux.so.1(Runtime linker)/var/ld/ld.config (32-bit) /etc/ld.so.conf/var/ld/64/ld.config (64-bit) /etc/ld.so.conf (see 'man -k ld')(Linker configuration file)

    crle ldconfig(Configure runtime linker)

    ldd YOURBINARY ldd YOURBINARY

    (Show library dependencies)

    Documentation

    In Solaris, virtually all software is documented in manual pages. For Linux mostof the basic UNIX commands, system calls, libraries, and system configurationfiles are documented in manual pages, other commands and software are documentedin HOWTO and README files, and on the Internet (http://www.tldp.org website).

    Additionally, many rpm packages install the source code documentation under/usr/doc and /usr/share/doc. These locations are a good place to find pointersto additional documentation on the Internet, because these locations usuallycontain references to web pages of the software components.

    Linux BASIC Overview for CES CFE Page 11/37

    http://www.tldp.org/http://www.tldp.org/
  • 7/29/2019 Linux Basic Overview

    12/37

    Hardware

    This section describes the Linux hardware support. This section contains thefollowing topics:

    SupportDevice Nodes

    Support

    A vast number of hardware components are supported in Linux. However, supportfor newer hardware is not usually provided for some time. Some constructors donot want to share the source code and specifications of their product to theopen-source community. They just considere the hardware has been designed onlyfor Microsoft Windows OE.

    Unless the hardware vendor has written a Linux driver for their hardware,someone with programming skills must actually obtain the hardware and write adriver for it.

    prtconf under linux ? no... but..

    CFE Support Engineer who needs to get an overview of what is inside the computershould ask for the following Linux commands :

    dmidecodelspci

    But also can check manually the /proc content (see our File Systems part):

    /proc/pci (file)

    /proc/ioports

    /proc/interrupts

    /proc/cpuinfo

    Linux BASIC Overview for CES CFE Page 12/37

  • 7/29/2019 Linux Basic Overview

    13/37

    Device Nodes

    Most versions of UNIX provide a mechanism to access hardware within the virtualfile systemstructure. This access is normally achieved by creating device nodeson file systems that are linked to their corresponding drivers via major andminor numbers. Both Solaris and Linux use this mechanism, but they havedifferent approaches to it.Most Solaris device nodes are under a device path hierarchy in the /devicesdirectory. These device nodes are then symbolically linked to the /dev directoryso that somewhat meaningful names can be associated with them.

    Linux uses only a /dev directory and does not employ a device hierarchy. Most ofthe entries in /dev in Linux are actual device nodes. The symbolic links that doexist in /dev just point to real device nodes in /dev.

    When you initially install Solaris, a package named SUNWcsdgets installed. Thispackage contains the core Solaris device nodes in /devices and symbolic links in/dev required for the initial boot of Solaris after installation.

    Beyond this, any device nodes and symbolic links that are required get createdvia devfsadm, which is run every time aboot -r is done (or a /reconfigure filehas been detected while booting).Device nodes in Solaris are created with the major number mapped to theappropriate driver in the file /etc/name_to_major. The driver is initiallyassigned its major number when add_drv is run for it.

    On older Redhat Linux version it has a package that contains device nodes (dev-3.3.x.x-x package on my RHEL AS 3.0 machine), but this package contains the

    device nodes for all the hardware supported in the latest version of the kernel.Previously the device nodes and their associated major and minor numbers inLinux were maintained as a fixed list registered at the following website :http://www.lanana.org/docs/device-list and any updates to the list requiredregistering them with the lists owner.

    On may 2006 has been updated the kernel 2.6 device nodes reference :http://www.lanana.org/docs/device-list/devices-2.6+.txt

    This fixed-list mechanism in Linux is in the process of being phased out.A new mechanism for maintaining the /dev directory in Linux uses a new virtual

    file system type called udev (or devfs, depending your kernel version). The useof udev allows for hierarchical device trees and dynamically created devicenodes, without the need to have a device node for every possible piece ofhardware that might exist on a Linux machine. Also, it has the ability todynamically assign major and minor numbers so that they dont have to be hardcoded in the driver (or the list).

    For Linux installations prior to kernel version 2.5, support for devfs must becompiled into the kernel and a user-space daemon must be downloaded andcompiled to take advantage of it (devfsd). With kernel 2.6 devfs has beendepreciated and now all the famous distributions do use udev and hotplugscripts.Hotplug is a set of scripts and deamons that will update and manage the devicenodes and automaticaly load to the memory the relevant kernel module (eg.Driver) on boot or when you plug a new hardware to the host.

    Linux BASIC Overview for CES CFE Page 13/37

    http://www.lanana.org/docs/device-list/http://www.lanana.org/docs/device-list/devices-2.6+.txthttp://www.lanana.org/docs/device-list/http://www.lanana.org/docs/device-list/devices-2.6+.txt
  • 7/29/2019 Linux Basic Overview

    14/37

    Kernel

    This section describes the kernel and includes reference tables for kernel-related parallels between Linux and Solaris and file system types. It containsthe following topics :

    VersionsConfiguring and CompilingModules and DriversFile SystemsSwap

    Versions

    Kernel versions in Linux follow a scheme of x.y.z, where x is the major releasenumber, y is the minor release number, and z is the feature or bug fix releaselevel. The major release level is currently 2.x

    Example: 2.0, 2.2, and 2.4 and 2.6 are stable production kernels, whereas 2.1,2.3, and 2.5 are development kernels.

    When a development kernel reaches a critical mass in new features, a newproduction version is released. Some of the 2.6 new features may be backportedto 2.4 branch when it can fix bugs or performance issues.

    The z number is analogous to a Solaris kernel update patch (KUP) revisionnumber. It represents the feature release level for development kernels, and thebug fix level for stable kernels.

    The standard way to update your kernel in Redhat Linux is to use rpm(8) toinstall a new binary release of it. If you have a custom kernel, you can updateit by applying a source-code patch, in which case you will need to recompile thekernel and will use the 'patch' command over the kernel source code.

    REDHAT RHEL 3.0 is provided with kernel branch 2.4 by default. RHEL 4.0 usesbranch 2.6 (SUSE SLES 9.0 will use 2.6 branch. Previous versions use 2.4 branch)

    The kernel source and patches are available from http://www.kernel.org

    Linux BASIC Overview for CES CFE Page 14/37

    http://www.kernel.org/http://www.kernel.org/
  • 7/29/2019 Linux Basic Overview

    15/37

    Configuring and Compiling

    You may know that Microsoft Windows is Plug'n'Play BIOS compliant. Since you

    have plugged a new hardware peripheral it will be detected and installedautomatically.

    With Solaris version 9 and 10 OEs, just plugging in a new hardware component maybe all that is required to install it. More commonly, a pkgadd and reboot isdone. It all depends on whether the driver is native in Solaris, and whether thehardware can be physically installed without bringing the system down.

    The stock kernel installed by default in Redhat Linux can recognize and loaddrivers for a wide array of hardware, so it may be sufficient for most purposes.If either your hardware requirements go beyond what is in the stock kernel, oryou want to remove unneeded drivers built into the kernel, a kernel rebuildisrequired.

    The details of the process are beyond the scope of this article, but the generalsteps are as follows:

    1. Install the kernel source tree in /usr/src/.

    2. Build the configuration in /usr/src/linux viamake menuconfig, ormakexconfig.

    3. Build the kernel itself viamake all.

    4. Build all components you designated to run as modules in step 2 via makemodules. (make all in step 3 has already compiled the modules)

    5. Make a backup copy of your current kernel, and put a corresponding entry forit in /etc/lilo.conf or /boot/grub/grub.conf. (or usually /boot/grub/menu.lst)

    6. Install the kernel via make install (installs the kernel into /boot and runsLILO). (usuallymake install will try to do step 5 for you automatically)

    7. Install your modules via make install_modules (installs modules into /lib/modules/uname -r). (usuallymake install will also try to install the modules)

    8. Reboot using the new kernel.

    By the way, for SUN and its Linux products : as CFE Support engineers we do not

    support customized kernel. REDHAT and SUSE backline support also always refuseescalations of cases which have a rebuild of the kernel in the customer OE.

    Linux BASIC Overview for CES CFE Page 15/37

  • 7/29/2019 Linux Basic Overview

    16/37

    Modules and Drivers

    The Solaris kernel is entirely modular. The kernel itself performs a corefunctionality with anything beyond that requiring it to dynamically load a chunkof code to perform the task. These chunks of code are in the form of dynamicallylinked loadable modules. The Linux kernel can be modular in this fashion, if itis built that way from source. Most drivers have the option of being modules, orbeing compiled into the kernel itself. However, if a driver is needed as acomponent required to access the root file system, then compiling it as a modulerequires you to use an initial RAM disk (initrd) as part of the boot process.The initrd allows you to have a root file system accessible, complete with/lib/modules directory, before the real root file system is mounted.

    In previous Solaris version this situation was avoided by using afile-system-aware boot loader (ufsboot) that is capable of finding the requiredmodules within a UNIX file system (UFS) before the root file system is actuallymounted.

    In Solaris 10 x86 it has now a miniroot which looks like what is initrdforLinux.

    By default, the Solaris kernel searches for modules from the following fourdirectories in this order:

    /platform/uname -i/kernel/platform/uname -m/kernel/kernel/usr/kernel

    If you add a new module, you can load it into the kernel immediately by

    installing it into one of these directories, running add_drv to assign it amajor number, and running devfsadm to create the device nodes needed to accessthe new hardware or protocol.

    Linux modules are located in /lib/modules/uname -r. To add a moduledynamically into a running kernel, compile it and install it into/lib/modules/uname -r. Then use the depmod -a command to map out anydependencies for the module. If depmod comes up with unresolved dependencies,its possible that you need to recompile the kernel to resolve the dependencies.

    After running depmod successfully, usemodprobe or insmodto load the module.The modprobe command checks the dependencies mapped out by depmod andautomatically loads any modules deemed as dependencies.

    For example, if you have sunrpc and nfsd compiled as kernel modules and modprobeloads the nfsd module, the sunrpc module is automatically loaded first, becausethe networked file system (NFS) needs remote procedure call (RPC) to operate.The insmodcommand is the same as modprobe, except that it does not check fordependencies.

    If there is a dependency that is not satisfied, insmod fails and displays anerror message about unresolved dependencies.

    Note : if you want some modules to be loaded on boot, you must insert moduleentries in the file /etc/modules for kernel 2.4 or /etc/modprobe.conf for 2.6

    Linux BASIC Overview for CES CFE Page 16/37

  • 7/29/2019 Linux Basic Overview

    17/37

    The module interface in Linux has a configuration file called /etc/modules.conf.In this file, you can create module aliases, set driver options, and executecommands to run before or after a module is loaded. This is also what does/etc/systemfile under Solaris (or-and /kernel/drv/.conf file).

    Starting recent distributions of Linux you may have /etc/modules or/etc/modprobe.conf files which will have the same purposes.

    Both themodprobe and depmodcommands reference these files.

    Possible driver parameters for a module can be listed via modinfo -p. If the module supports it, you can also set parameters via theproc file systeminterface (/proc/), or the sysctl command, which uses the procfile system interface. Retrieving and setting module parameters using the procinterface is generally accomplished by manipulating the contents of fileslocated in the /proc/ directory.

    Common Solaris kernel Commands Mapped to Linux Commands :Solaris : Linux :

    modinfo lsmod(List loaded modules)

    modload modprobe/insmod(Load a module)

    modunload rmmod(Unload a module)

    add_drv depmod -a(Install a new module or check its dependencies)

    ndd -get modinfo -p (or have a look to /proc/)(Get module parameters)

    /etc/system or kernel/drv/.conf /etc/modules.conf(Configurations for modules to be loaded on boot)

    Linux BASIC Overview for CES CFE Page 17/37

  • 7/29/2019 Linux Basic Overview

    18/37

    File Systems

    One of the advantages to an open-source operating environment like Linux is thatwhen you want to get something to work, somebody has probably already written adriver for it. Linux does support for more than 30 F/S from other operatingsystems.

    Here is small list that you may know already :

    nfs, ufs, ntfs, vfat, ext2, ext3, xfs etc...

    An installation of Linux initially boots to an environment that has differentfile system types mounted.

    Mounted On//boot/proc/dev/pts/dev/shm

    File System: Type: Purpose:ext2/ext3 Standard Linux file system.ext2/ext3 Standard Linux file system.

    proc Virtual

    The proc file systems Containsprocess information mapped out so that it canbe accessed within a virtual file system framework. In Linux /proc also providesan access mechanism to data containedwithin the kernel and kernel modules. Thisaccess mechanism is analogous to the ndd command in Solaris.

    The devpts Interface used to allocate pseudo tty devices.The tmpfs is the interface for shared memory. It works the same as it does inSolaris. The difference here is that the tmpfs is mounted on /dev/shm. Thisrequirement is for glibc 2.2 and newer.

    With kernel 2.6 sysfs now complements the /proc file system.Sysfs is a virtual file system provided by the 2.6 Linux kernel. Sysfs exportsinformation about devices and drivers from the kernel device model to userspace,and is also used for configuration. See our Lexical page.

    Swap

    Swap space can be allocated as a file or a partition in Linux. Before swap spaceis used, it must be formatted viamkswap. Under Linux it is common to recommendon its creation to set a size equivalent to the double size of the physicalmemory.

    Caution Be aware that Solaris x86 and Linux swap have the same partition typesand running mkswap on a Solaris x86 partition destroys it.See Partition Tables section of this document.

    As in Solaris, any swap partitions defined in the file system table (/etc/fstabin Linux) are activated at boot time. In Linux, /sbin/swapon-a is the mechanismfor doing this. You can remove a swap file or partition from use by the kernel

    with swapoff. Like Solaris, Linux does not require the use of swap.

    Linux BASIC Overview for CES CFE Page 18/37

    http://en.wikipedia.org/wiki/Virtual_file_systemhttp://en.wikipedia.org/wiki/Linux_kernelhttp://en.wikipedia.org/wiki/Virtual_file_systemhttp://en.wikipedia.org/wiki/Linux_kernel
  • 7/29/2019 Linux Basic Overview

    19/37

    Networking

    This section describes Linux networking. It contains the following topics:

    Interface ConfigurationStartup ScriptsTroubleshooting

    Interface Configuration

    Configuration of an interface from the command line is accomplished the same asin Solaris with the ifconfig command. If the network card is compiled as amodule, then the module needs to be aliased to a standard interface name in/etc/modules.conf (previously called /etc/modules file) or /etc/modprobe.conffile. Standard Ethernet interface names in Linux are eth0, eth1, wlan0, etc.

    For example, a 3Com 3C905B 10/100 NIC that uses the 3c59x driver in Linuxwould have the following entry in the /etc/modules.conf or /etc/modprobe.conffile.

    alias eth0 3c59x

    This entry assigns this card as interface eth0 when the 3c59x driver (which is akernel module) is loaded, then it is possible to up the interface via ifconfig.

    Imagine you don't know the kernel module name for you card...so you're completely stuck and desparate, one trick that might help :

    lspci (will show you the PCI devices and might show you some know chipsets)

    then :modprobe -t net \*(it will try to load all network card drivers in turn and see which matchs)

    As in Solaris, ifconfig adds a route to the kernel routing table based on the IPaddress and subnet mask used on the command line. To add a route manually inLinux, use the route command. The command-line options are slightly differentthan those in Solaris. The following are examples of adding a default route inSolaris versus adding the same default route in Linux.

    Solaris example:

    route add default 192.168.0.1

    Linux example:

    route add -net default gw 192.168.0.1

    By default Linux will try to use and set autoneg mode for its interfaces.

    Linux BASIC Overview for CES CFE Page 19/37

  • 7/29/2019 Linux Basic Overview

    20/37

    Startup Scripts

    The rc scripts to bring up networking are entirely different in Solaris andLinux, but they achieve similar results.

    Solaris uses /etc/init.d/network and /etc/init.d/inetinit to bring up thenecessary interfaces, routes, and protocols. Linux uses /etc/init.d/network to bring up the necessary interfaces, routes,and protocols, but this script calls other scripts from the directory/etc/sysconfig/network-scripts .

    The actual network configuration for a Linux machine is defined in the file/etc/sysconfig/network as a series of environmental variables. This file issourced from all the network configuration scripts. It can be manipulatedmanually, but the Redhat CLI program netconfig is normally used to makemodifications to it. The GUI version is named : redhat-config-network

    Troubleshooting

    The process of network troubleshooting in Linux is not much different than inSolaris. The netstat, rpcinfo, and nfsstat commands all do essentially thesame thing. The major difference is that instead of snoop, the tool to use forpacket sniffing is called tcpdump. The tcpdump command gives similar informationas snoop, but with different command-line options and output formats. Forexample, the equivalent to snoop -d would be tcpdump -i .

    The full list of command-line options for tcpdump(8) can be found in the manualpage. For the latest version and documentation, tcpdump is maintained at thefollowing Web site: http://www.tcpdump.org

    Linux BASIC Overview for CES CFE Page 20/37

    http://www.tcpdump.org/http://www.tcpdump.org/
  • 7/29/2019 Linux Basic Overview

    21/37

    System

    This section describes and compares the Linux system components with Solaris OE.It includes reference tables for standard file system types, boot processes,init run levels, and system files.

    This section contains the following topics:

    Partition TablesBoot Loader ProgramsStandard File SystemsBoot ProcessinitUser EnvironmentSystem and Log Files

    Partition Tables

    On Intel machines, disks are divided into units called sectors.(1 sector = 512 bytes)

    Solaris uses the term block, but the size is the same.(1 block = 512 bytes)

    The first sector of the disk on an Intel (or X86) machine is called the Master

    Boot Record (MBR).The first block of a Solaris disk is called the Volume Table of Contents(VTOC). Both contain similar informations : the partition table for the disk.

    However, the X86MBRcontains a 446-byte area at the beginning for actualbootcode, whereas the first block on a Solaris disk is used only for theVTOC.What is referred to as the boot block in Solaris starts immediately after theVTOC and occupies blocks 1-15 of the disk.

    The Solaris VTOC has certain tags that you can apply to a partition. These tagsrefer to a partitions function within Solaris, such as root, swap or /var. Adisk with a fdisk disklabel on it has tags to identify the partitions, but theyusually refer to the type of operating system that resides on that partition.

    The tag is 1 byte in the partition table and is called the partition type.A 32 bits Windows FAT file system using LBA, an NTFS file system, and a Linuxext2file system have partition types of 0x0c, 0x07 and 0x83 respectively.

    For a full list, run fdisk in a Linux shell and type l. (fdisk can format also)

    Be aware that there was never a standards body or entity to assign specificvalues to partition types. This lack of standardization has led to someconflicts. Most notably, the conflict between a Solaris x86 partition and aLinux swap partition. Both of these have a value of 0x82. This situation becomesproblematic when you want both of these operating systems to reside on the samemachine. If the Linux installation program formats a Solaris x86 partition foruse as swap space, the Solaris partition is completely destroyed.

    See Sunsolve Infodoc 85804 : How to create a Linux partition properly

    Linux BASIC Overview for CES CFE Page 21/37

  • 7/29/2019 Linux Basic Overview

    22/37

    Boot Loader Programs

    As previously mentioned, the fdisk MBR has a 446-byte area for some boot code.On a normal Windows system, this area contains the DOS boot sector.When Linux is installed, there is an option to load a program called LInuxLOader (LILO) or GRUB in this area. GRUB or LILO can load more than just LinuxOE. It can be configured to boot other operating systems that you can loadonto an X86 machine.

    The Solaris SPARC version of LILO is named SILO. Starting Solaris X86 10 kernelversion 27 the NEWBOOT architecture does use GRUB.

    But why do we need this program ?

    The x86 machines have a BIOS Basic Input Output System (eg PROM) that is notcapable of recognizing the partition structure of a disk. BIOS cannot boot offof anything other than theMBR(which does follow theMSDOS standards) at thebeginning of the primary disk. By comparison, OBP on SPARC machines has theability to specify partitions and disks to boot from, as well as set hardwarealiases and boot parameters, and save them to NVRAM.

    A new boot loader called the GRand Unified Bootloader (GRUB) came out withRedHat Linux 7.3. The GRUB is a file-system-aware bootloader that is morefeature rich than LILO. Both LILO and GRUB use configuration files that exist ona file system somewhere to identify bootable partitions and give you a commandline or menu to boot them from.

    For LILO, the configuration file is /etc/lilo.conf.

    For GRUB, it will /boot/grub/grub.conf or /boot/grub/menu.lst or

    (/etc/grub.conf).

    Linux BASIC Overview for CES CFE Page 22/37

  • 7/29/2019 Linux Basic Overview

    23/37

    Standard File Systems

    In Solaris, UFS is used as the predominant file system type. In Linux, itseither ext2 or the journaling version, ext3. UFS grew out of the Berkeley fast-fat file system developed for BSD UNIX by Kirk McCusick. The ext2 file systemwas the second version of the extfile system, which was created from scratchspecifically for Linux.

    Even though it was created independently from UFS, most of the concepts withinext2 are the same.

    Two tunable parameters that you might want to modify after creating an ext2 orext3 file system are the maximal mount count and the check interval. The maximalmount count is a predetermined number of times an ext2 or ext3 file system canbe mounted before a check is forced on it. The check interval is a predeterminedtime period before a check is forced on an ext2 or ext3 file system.

    By default Linux will run fsck on an ext2 file system while booting if it hasnot been unmounted (hard reset, panic). The effect is that clean file systemsget checked periodically. Because an fsck can add a lot of time to the bootprocess, the value of fsck might be negligible. To disable this behavior, usetune2fs linux command on the partition that contains your file system orconsider to use ext3 journalized file system.

    Linux BASIC Overview for CES CFE Page 23/37

  • 7/29/2019 Linux Basic Overview

    24/37

    Boot Process

    Linux has a /boot directory that contains files (including the kernel binaryitself) needed to boot. On pre-1999 Intel machines, it was necessary to have thekernel inside an 8 gigabyte boundary at the beginning of the disk. One of theways to accomplish this configuration was by making a separate /boot file systemand physically locating it at the beginning of the disk, or at least before the8 gigabyte boundary. Because of a feature in LILO called 32-bit logicalblockaddressing (lba32) that takes advantage of BIOS functionality found in newermachines, this configuration is no longer necessary.

    Summary of the Linux Files used to boot a System :

    File : Purpose :

    boot.xxyy Backup/Copy of the boot sector that LILO makes the first timeit runs. Used if LILO is uninstalled via lilo -u.

    boot.b Second stage boot loader. Loads the chain loader, kernel, orpartition boot sector of a foreign OS.

    chain.b Chain loader required to boot a partition that is not on theprimary disk.

    map File created by LILO that contains the names and physicallocations of all the kernels and foreign operating systems that it can boot (asdefined in /etc/lilo.conf).

    vmlinuz Compressedkernel.

    System.map The text version of the kernel-symbol table generated byrunning /usr/bin/nm against the uncompressed kernel image during the kernelbuild process. The Solaris equivalent would be to run /usr/ccs/bin/nm against/dev/ksyms or unix.0 from a kernel core dump.System.map is used by some programs, such as klogdandps, that provide moreuseful output with symbol names rather than with addresses.

    Initrd Initial RAM disk. The initrd allows you to use a temporarilyRAM disk as the root file system. This mecanism gives the ability to load kernel

    modules required to access a real root file system and to avoid to build thesemodules into the kernel itself (so the kernel file will be smaller). After thereal root file system is mounted, the context is switched via the Linux systemcallpivot_root(2).

    LILO README: /usr/share/doc/lilo-x.y.z/READMEGRUB README: /usr/share/doc/grub-x.x.x/README

    Linux BASIC Overview for CES CFE Page 24/37

  • 7/29/2019 Linux Basic Overview

    25/37

    Like Solaris the boot process in Linux goes through several stages.

    Solaris :

    OBP selects defined boot device and reads the boot block (sectors 1-15) of thispartition. Program read in from boot block loads secondary boot loader(ufsboot). Then ufsboot finds, loads, then executes the kernel.

    Kernel mounts root file system, loads modules, and starts init.

    init starts the appropriate run level script(s).

    Linux :

    The BIOS will search for its BIOS boot device then will read theMBRand loadsfirst-stageboot loader.

    First-stage boot loader finds second-stage boot loader (/boot/boot.b) andexecutes it.

    /boot/boot.b reads in descriptor table from /boot/map. The map file contains theboot sector of the kernel to be loaded. The second-stage boot loader then loadsthe kernel.

    Kernel mounts root file system, loads modules and starts init.

    Then init starts /etc/rc.d/rc.sysinit, then starts the appropriate run levelscript.

    Linux BASIC Overview for CES CFE Page 25/37

  • 7/29/2019 Linux Basic Overview

    26/37

    init

    Linux init works essentially the same as it does in Solaris, although the runlevels and scripts are somewhat different. In Solaris, the scripts in

    /etc/rcS.dare always run initially, regardless of what run level the system is booting.Linux does not have a /etc/rcS.d directory, but it has a script,/etc/rc.d/rc.sysinit, that accomplishes the same purpose. The run level scriptdirectories in Linux are in /etc/rc.d, but the directories contained there inare symbolically linkedto /etc, so their location is effectively the same as inSolaris. One other difference is that run level scripts in Linux aresymbolically linked from /etc/init.d to the run level directories, whereas theyare typically hard linked in Solaris.

    One thing to note for both Solaris and Linux is the distinction between runlevel Sand run level 1. Both operating environments handle them similarly :

    Run level S is more of a run level to initially boot to, rather than issue aninit command to take you to it.

    Run level 1 is more appropriate to use if you are already at a higher runlevel and want to bring the machine down to amaintenance state. This is mainlybecause kill scripts tend to get installed in /etc/rc1.drather than /etc/rcS.d.

    To boot single-user mode in Solaris for SPARC, issue aboot -s command from theOBP ok prompt. For Solaris X86 on the old version of the X86 bootloader it willbe a b -s at the menu prompt.

    For the Solaris 10 X86 and the NEWBOOT architecture which implements GRUB asdefaultboot loader you can follow Infodoc: 85072 How to boot single user modefrom the Grub boot loader in Solaris 10.

    In Linux, boot single-user mode by entering a : Linux single command from theLILO prompt or add theparameter single at the end of the kernel line in theGRUB configuration or on-boot CLI. (see and translate infodoc: 85072)

    If the graphical login option is chosen during the installation process, thedefault run level is 5. Otherwise, it is set to 3.

    Run Levels for Solaris and Linux :

    Function Solaris Run Level Linux Run LevelShutdown 0 0*Single user/Maintenance mode S/1 S/1Multi-user mode, no NFS 2 2Multi-user mode 3 3Multi-user mode with GUI 3 5Shutdown with power off 5 0*Reboot 6 6

    * init 0 does perform a power off in runlevel 0 if the kernel is configured forpower management.

    Linux BASIC Overview for CES CFE Page 26/37

  • 7/29/2019 Linux Basic Overview

    27/37

    User Environment

    After Linux completes the boot process, either a character terminal console(runlevel 3) or graphical login screen (runlevel 5) appears. In the character-terminal environment, by default there are six virtual consoles that can beused.

    From the GUI X Window mode, the virtual consoles can be accessed by pressingCTRL+Alt-F1 through Alt-F6 on a keyboard.

    From the console mode you can swith between the virtual consoles using Alt+F1 toF6 key. Usually F6 is the last terminal and Alt+F7 does jump back to the GUI (ifGUI was launched in the background).

    By default, the root account uses the SHELL bash as its default shell and/root as its default home directory. Yes, as you can see the superuser rootshell value $HOME will point to /root. The adduser command will also create thehome directory automaticaly for any new normal user account in the path /home/.

    About the Graphic User Interface :

    Under Linux the GUI Window System will be managed either by XOrg or Xfree86.

    The X Window System(commonly X11 or X) provides windowing for bitmap displays.It provides the standard toolkit and protocol to build graphical user interfaces

    (GUI) on Unix, Unix-likeoperating systems - almost all modern operating systemssupport it.X provides the basic framework for a GUI environment: drawing and moving windowson the screen and interacting with a mouse and keyboard. X does not mandate theuser interface individual client programs handle this. As such, the visualstyling of X-based environments varies greatly; different programs may presentradically different interfaces.

    Two main graphical environments exist in most current versions of Linux :KDE and GNOME. The use of either is a personal preference by the user. Both aresimilar in functionality. If you are a Solaris JDS user you will be happy to useGNOME.

    GNOME or KDE will run on top of the X Window System.

    If the GUI does not start automaticaly you can launch it using the startxcommand from the console.

    References :

    http://www.x.orghttp://www.xfree86.org

    Linux BASIC Overview for CES CFE Page 27/37

    http://en.wikipedia.org/wiki/Windowing_systemhttp://en.wikipedia.org/wiki/Raster_graphicshttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Unixhttp://en.wikipedia.org/wiki/Unix-likehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Window_(computing)http://en.wikipedia.org/wiki/Display_devicehttp://en.wikipedia.org/wiki/Computer_mousehttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/User_interfacehttp://www.x.org/http://www.xfree86.org/http://en.wikipedia.org/wiki/Windowing_systemhttp://en.wikipedia.org/wiki/Raster_graphicshttp://en.wikipedia.org/wiki/Graphical_user_interfacehttp://en.wikipedia.org/wiki/Unixhttp://en.wikipedia.org/wiki/Unix-likehttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Window_(computing)http://en.wikipedia.org/wiki/Display_devicehttp://en.wikipedia.org/wiki/Computer_mousehttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/User_interfacehttp://www.x.org/http://www.xfree86.org/
  • 7/29/2019 Linux Basic Overview

    28/37

    System and Log Files

    Many UNIX-like system configuration and log files have the same names and usesas in Solaris and Linux.

    The following TABLE lists some that are not the same. This list is not all-inclusive. The functionality between the files listed is similar, but the syntaxand structure can be different. In some cases, a directory of configurationfiles is used in Linux where only a single file is used in Solaris. For a moreextensive list, refer to this amazing Web site http://bhami.com/rosetta.html.

    Differing System and Log Files in Solaris and Linux :

    Solaris : Linux : Purpose :

    /etc/dfs/dfstab /etc/exports NFS server configuration

    /etc/auto_master /etc/auto.master/etc/auto_home /etc/auto.home automounter configuration

    /var/spool/cron/crontabs/root /etc/crontab CRON (crontab*)

    /etc/vfstab /etc/fstab File System table/etc/mnttab /etc/mtab Kernel list of mounted F/S

    /etc/inetd.conf /etc/xinetd.conf Internet daemon

    /etc/xinetd.d (folder) configuration files

    /etc/defaultdomain YP (NIS) domain/var/yp/binding/domainname/ypservers /etc/yp.conf YP configuration

    /var/adm/messages /var/log/messages Sytem log file

    /etc/system /etc/sysctl.conf Kernel configuration/etc/modules

    /etc/pam.conf /etc/pam.d (directory) PAM *

    *PAM : PluggableAuthenticationModules*CRONTAB : used to schedule commands to be executed periodically

    Linux BASIC Overview for CES CFE Page 28/37

    http://en.wikipedia.org/wiki/Commandhttp://en.wikipedia.org/wiki/Command
  • 7/29/2019 Linux Basic Overview

    29/37

    CFE TROUBLESHOOTING

    This article will introduce a small description of what should try a Support CFEfor a Linux case.

    A For which SUN hardware ?B LINUX Operating System - Which version ?C Gather informationsD What is out of support ?E Vendor official support websites

    You got a Linux call okay but....

    First thing you should be able to identify which hardware product :

    A ) For which SUN hardware ?

    (better should be a SUN X86/X64 computer reported in the HCL)

    The up to date support matrix (Hardware Compatibility List) is located at thisURL :

    http://www.sun.com/bigadmin/hcl/linux/support_matrix.html

    Servers :

    EOL : Sun Fire V20z Server Sun Fire V40z Server Sun Fire X2100 Server Sun Fire X4100 Server Sun Fire X4200 Server Sun Fire X4600 Server EOL : Cobalt / LX50 / V60x / V65x

    Workstations :

    Sun Ultra 20 Workstation EOL : Sun Java Workstation W1100z Sun Java Workstation W2100z

    Sun Grid Solutions :

    V60x/V65x or X64 servers with the SUN RACK 900

    Be sure the machine is under support contract or warranty.

    Note : SUN provides some drivers for its platforms so the customer shouldinstall all of them. It is always recommended. Eg. : for the V20z we provide amonitoring handy deamon for each OS versions (POCI).

    Linux BASIC Overview for CES CFE Page 29/37

    http://www.sun.com/bigadmin/hcl/linux/support_matrix.htmlhttp://www.sun.com/bigadmin/hcl/linux/support_matrix.html
  • 7/29/2019 Linux Basic Overview

    30/37

    B ) LINUX Operating System - Which version ?

    The CAS (ex-CCC) Hotline center is in charge of checking with the customer if hehas a Redhat or Suse Licence sold by SUN. Anyway some customers can open a

    warranty or HW case. In such case if the customer has no licence or did not getthe licence from SUN you should not provide Software Support. The customershould own a licence which should have been provided already (otherwise a SunComercial Contact should provide it. BTW it should be on the cover of the CDROMBundle).

    1)which LINUX DISTRIBUTIONS we can sell and support ?

    #cat /etc/*release" command will help you to avoid any customer to false you andthe support services. Also you can check which OS update has been installed.

    Here is the list of SUN Linux-Products :

    Linux SUSE "SLES" on X86 and X64 machines is supported by SUN CFELinux REDHAT "RHEL" on X86 and X64 machines is supported by SUN CFELinux UBUNTU LTS (Long Term Support) for SPARC CPU is not supportedby SUNCFE

    2)List of what is available from the SUN online Shop (June 2006) :

    REDHAT : (AS - ES - WS)

    Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 3 AMD64

    SUSE NOVELL :

    SUSE Linux Enterprise Server 9

    CANONICAL LTD :

    UBUNTU LTS 6.06

    Do not forget to check the System Handbook to get the full list of supported OEand versions for each servers as you might have to provide support to a productwhich is not available anymore.

    3) Everything online about what we do support here :

    SUN LINUX PRODUCT : http://sun.com/linux

    Our Sun Store will show you exactly what we do really support and what we canprovide to our customer :

    SUN SHOP for LINUX PRODUCT : http://www.sun.com/software/linux/get.xml

    It is also a good idea to double check the System Handbook for each machine. Ithas a list of Supported OS.

    Linux BASIC Overview for CES CFE Page 30/37

    http://www.sun.com/linuxhttp://www.sun.com/software/linux/get.xmlhttp://www.sun.com/linuxhttp://www.sun.com/software/linux/get.xml
  • 7/29/2019 Linux Basic Overview

    31/37

    C ) Gather informations

    1) Ask for the kernel version :

    #uname -a

    Warning : we do not support any customized and compiled KERNEL !Please check the /etc/grub.conf BOOTLOADER configuration to find which kernelimage has been loaded. That will help you to find it out.

    Special tips : you may a have panic ? you have a strange bug ?

    Try to use the following links to check the SRDB and known issues :

    For SUSE :[http://support.novell.com/search/kb_index.jsp?sourceidint=suplnav5_kb]

    For REDHAT :[https://bugzilla.redhat.com/bugzilla/index.cgi]

    Also check the name of the package with this command : rpm -qa | grep kernelThe version should match to the current running kernel (from uname -a output)

    SMP kernel is for more than 1 CPU configuration.

    2)Ask for the messages file which is located under the following path :

    /var/log/messages

    Also ask for a "dmesg". This is always handy.

    We have no official supported Explorer program for Linux BUT the recommended wayare :

    For SUSE SLES : you can ask for a "siga"

    for REDHAT RHEL : you can ask for a "sysreport"

    ** If these tools are not available you can ask your customer to install the

    packages :

    For REDHAT : "up2date sysreport" (in a shell or try the redhat-config-package

    GUI tool)

    For SUSE : use "yast" interface and select the siga package to install

    For UBUNTU : the UBUNTU Linux Support is not provided by SUN engineers

    Both output files are supported and recommended by the OS vendors. It is alsothe recommended way to submit datas in case of any escalations to higher supportlevel : RSD TSC/REDHAT/SUSE backlines.

    Linux BASIC Overview for CES CFE Page 31/37

    http://support.novell.com/search/kb_index.jsp?sourceidint=suplnav5_kbhttps://bugzilla.redhat.com/bugzilla/index.cgihttp://support.novell.com/search/kb_index.jsp?sourceidint=suplnav5_kbhttps://bugzilla.redhat.com/bugzilla/index.cgi
  • 7/29/2019 Linux Basic Overview

    32/37

    3) PANIC under Linux ?

    ** you can ask to your customer to install : netdump or diskdump to save it

    Note : netdump will require another machine as a netdump server. Your panicedmachine will act as a client and will send the panic informations to the netdumpserver. Then your customer should compress the file and send it to the CFE (youor a skilled panic kernel analyst).

    Since REDHAT 3.0u5 you can use diskdump which will act like our so good Solaris"savecore" localy.

    Both methods are also possible for SUSE Linux and Ubuntu Linux for SPARC.

    To gather informations on an "always-panic" machine :

    Ask your customer to boot a different kernel. Following the possible anddifferent upgrades the OS should have already many available kernels that arebootable.Customer can also try to boot the install cdrom using the "rescue mode" or theSingle user mode.

    4)How do we boot a Linux Machine to init 1 stage ? eg. SINGLE USER mode

    You may have LILO or GRUBbootloader installed to the main diskMBR.

    For LILO :

    once you see the boot loader menu, hit any key on the keyboard. Then look at thename of the default kernel (which is the kernel image name).

    The default kernel is almost named "Linux"

    So you just have to enter :

    Linux single

    From the CDROM you can try it or just enter Linux rescue *

    For GRUB :

    Grub has its own shell. It allows you to customize the boot device and more...

    Hit any keys once you see the Grub first screen. Select the default Kernel

    and... Hit "e" key.

    You are in the editor : select the vmlinuz kernel image and add at the end ofits line the word "single" Then hit the RETURN key

    Now you can hit the "b" key to boot this kernel. On next reboot it willdisapear.

    * It is common to have a Linux rescue possible command to enter or to selectat the boot menu prompt to start the CDROM into rescue mode. The rescue modewill try to mount your Linux OE from the detected hard drive or give you shellcommands to recover your system.

    Linux BASIC Overview for CES CFE Page 32/37

  • 7/29/2019 Linux Basic Overview

    33/37

    D ) What is out of support ?

    Here is a sample of questions and cases which are out of the support realm.

    Customer is asking for :

    how can I remove the webserver deamon ? how can I configure this service to do thing like this and stop this otherdeamon to work ? can't install my third party product, or can't install Linux, please help my non-SUNpci card has no driver, can you provide me a driver ?

    This is very important to understand you may have some customers who do not knowhow does work the SUN support service. Some non-skilled or very Linux skilledcustomer might open a call for such questions and you will have to explain themas CFE thatwe only provide support to the following issues :

    Server is offline the services are stopped

    Bug has been discovered

    SUN software (SUN ONE) on SUN Linux OE can not be installed

    System panic()

    etc...

    E ) Vendor official support websites

    The following websites are also accesible from our SunSolve page.

    Red Hat Linux Support

    Requires Red Hat Linux Login : https://www.redhat.com/apps/support/

    https://rhn.redhat.com

    SUSE Linux Support Cases

    Requires SuSE Linux Login : http://www.novell.com/linux/suse/portal/index.html

    http://support.novell.com/eService

    SUN Linux Support

    Requires SUNSOLVE Login : http://sunsolve.sun.com

    Linux BASIC Overview for CES CFE Page 33/37

    https://www.redhat.com/apps/support/https://www.redhat.com/apps/support/https://rhn.redhat.com/https://portal.suse.com/PM/page/login.pm;jsessionid=prhis6vsb2http://www.novell.com/linux/suse/portal/index.htmlhttp://support.novell.com/eServicehttp://sunsolve.sun.com/http://sunsolve.sun.com/https://www.redhat.com/apps/support/https://www.redhat.com/apps/support/https://rhn.redhat.com/https://portal.suse.com/PM/page/login.pm;jsessionid=prhis6vsb2http://www.novell.com/linux/suse/portal/index.htmlhttp://support.novell.com/eServicehttp://sunsolve.sun.com/http://sunsolve.sun.com/
  • 7/29/2019 Linux Basic Overview

    34/37

    SMALL LEXICAL

    kernel : In computer science, the kernel is the core piece of most operating systems.It is a piece of software responsible for the communication between hardware and softwarecomponents.As a basic component of an operating system, a kernel provides abstraction layers forhardware, especially for memory, processors and communication between hardware and

    software. It also provides software facilities to userlandapplications such as processabstractions, interprocess communication and system calls.

    panic() : A kernel panic is a message displayed by an operating system upon detectingan internal system error from which it cannot recover. Kernel panics often providecryptic debugging information that is useful only to the developers of the operatingsystem.Attempts by the operating system to read an invalid or unpermitted memory address are acommon source of kernel panics. A panic may also occur as a result of a hardware failure.

    SMP : Symmetric Multiprocessing, or SMP, is a multiprocessor computer architecturewhere two or more identical processors are connected to a single shared main memory. Mostcommon multiprocessor systems today use an SMP architecture.

    YP : Network Information Service or NIS is Sun Microsystems' "Yellow Pages" (YP)client-serverdirectory serviceprotocol for distributing system configuration data suchas user and host names between computers on a computer network. Sun licenses thistechnology to virtually all other Unix vendors. As the name "Yellow Pages" is aregistered trademark in the United Kingdom of British Telecom PLC for their (paper)commercial telephone directory, Sun changed the name of their system to NIS.

    BIOS : BIOS means Basic Input/Output System.

    BIOS boot devices : A boot device is any device that must be initialized prior toloading the operating system. This includes the primary input device (keyboard), theprimary output device (display), and the initial program load device (floppy drive, harddrive, CD-ROM, USB flash drive, etc.). In a modern BIOS, the user can select one ofseveral interfaces from which to boot. These include: hard disk, floppy, SCSI, CDROM,Zip, or network.

    BootLoader : In computing, booting is a bootstrapping process that starts operatingsystems when the user turns on a computer system. A boot sequence is the set ofoperations the computer performs when it is switched on which load an operating system.Bootstrapping refers to any process where a simple system activates a more complicatedsystem.

    MBR :Master Boot Record (MBR), orpartition sector, is the 512-byteboot sector thatis the first sector of a partitioneddata storage device such as a hard disc. (The bootsector of a non-partitioned device is a Volume Boot Record, which is also the term usedto describe the first sector of an individual partition on the device) It is sometimesused for bootstrappingoperating systems, sometimes used for holding a disc's partitiontable, and sometimes used for uniquely identifying individual disc media.

    Sysfs : For each object added in the driver model tree (drivers, devicesincluding class devices) a directory in sysfs is created. The parent/childrelationship is reflected with subdirectories under /sys/devices/ (reflectingthe physical layout). The subdirectory /sys/bus/ is populated with symboliclinks, reflecting how the devices belong to different busses. /sys/class/ showsdevices grouped according to classes, like network, while /sys/block/ containsthe block devices.For device drivers and devices, attributes may be created. These are simplefiles; the rule is that they should only contain a single value and/or allow asingle value to be set (unlike some files in procfs, which need to be heavilyparsed). These files show up in the subdirectory of the device driver respectiveto the device. Using attribute groups, a subdirectory filled with attributes mayalso be created.

    Linux BASIC Overview for CES CFE Page 34/37

    http://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/Operating_systemshttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Abstraction_layerhttp://en.wikipedia.org/wiki/RAMhttp://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Userlandhttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/IPChttp://en.wikipedia.org/wiki/System_callhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Memory_addresshttp://en.wikipedia.org/wiki/Multiprocessorhttp://en.wikipedia.org/wiki/Main_memoryhttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Client-serverhttp://en.wikipedia.org/wiki/Directory_servicehttp://en.wikipedia.org/wiki/Protocol_(computing)http://en.wikipedia.org/wiki/Host_namehttp://en.wikipedia.org/wiki/Computerhttp://en.wikipedia.org/wiki/Computer_networkhttp://en.wikipedia.org/wiki/Yellow_Pageshttp://en.wikipedia.org/wiki/Trademarkhttp://en.wikipedia.org/wiki/United_Kingdomhttp://en.wikipedia.org/wiki/British_Telecomhttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/Boot_devicehttp://en.wikipedia.org/wiki/Input_devicehttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/Displayhttp://en.wikipedia.org/wiki/Floppy_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/CD-ROMhttp://en.wikipedia.org/wiki/USB_flash_drivehttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/Hard_diskhttp://en.wikipedia.org/wiki/Floppyhttp://en.wikipedia.org/wiki/SCSIhttp://en.wikipedia.org/wiki/CDROMhttp://en.wikipedia.org/wiki/Zip_drivehttp://en.wikipedia.org/wiki/Computinghttp://en.wikipedia.org/wiki/Bootstrappinghttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Computer_systemhttp://en.wikipedia.org/wiki/Bootstrappinghttp://en.wikipedia.org/wiki/Bytehttp://en.wikipedia.org/wiki/Boot_sectorhttp://en.wikipedia.org/wiki/Partition_(computing)http://en.wikipedia.org/wiki/Data_storage_devicehttp://en.wikipedia.org/wiki/Hard_dischttp://en.wikipedia.org/wiki/Volume_Boot_Recordhttp://en.wikipedia.org/wiki/Bootstraphttp://en.wikipedia.org/wiki/Operating_systemshttp://en.wikipedia.org/wiki/Computer_sciencehttp://en.wikipedia.org/wiki/Operating_systemshttp://en.wikipedia.org/wiki/Softwarehttp://en.wikipedia.org/wiki/Abstraction_layerhttp://en.wikipedia.org/wiki/RAMhttp://en.wikipedia.org/wiki/CPUhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Input/outputhttp://en.wikipedia.org/wiki/Userlandhttp://en.wikipedia.org/wiki/Application_softwarehttp://en.wikipedia.org/wiki/IPChttp://en.wikipedia.org/wiki/System_callhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Debugginghttp://en.wikipedia.org/wiki/Memory_addresshttp://en.wikipedia.org/wiki/Multiprocessorhttp://en.wikipedia.org/wiki/Main_memoryhttp://en.wikipedia.org/wiki/Sun_Microsystemshttp://en.wikipedia.org/wiki/Client-serverhttp://en.wikipedia.org/wiki/Directory_servicehttp://en.wikipedia.org/wiki/Protocol_(computing)http://en.wikipedia.org/wiki/Host_namehttp://en.wikipedia.org/wiki/Computerhttp://en.wikipedia.org/wiki/Computer_networkhttp://en.wikipedia.org/wiki/Yellow_Pageshttp://en.wikipedia.org/wiki/Trademarkhttp://en.wikipedia.org/wiki/United_Kingdomhttp://en.wikipedia.org/wiki/British_Telecomhttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/Boot_devicehttp://en.wikipedia.org/wiki/Input_devicehttp://en.wikipedia.org/wiki/Computer_keyboardhttp://en.wikipedia.org/wiki/Displayhttp://en.wikipedia.org/wiki/Floppy_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/Hard_drivehttp://en.wikipedia.org/wiki/CD-ROMhttp://en.wikipedia.org/wiki/USB_flash_drivehttp://en.wikipedia.org/wiki/BIOShttp://en.wikipedia.org/wiki/Hard_diskhttp://en.wikipedia.org/wiki/Floppyhttp://en.wikipedia.org/wiki/SCSIhttp://en.wikipedia.org/wiki/CDROMhttp://en.wikipedia.org/wiki/Zip_drivehttp://en.wikipedia.org/wiki/Computinghttp://en.wikipedia.org/wiki/Bootstrappinghttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Operating_systemhttp://en.wikipedia.org/wiki/Computer_systemhttp://en.wikipedia.org/wiki/Bootstrappinghttp://en.wikipedia.org/wiki/Bytehttp://en.wikipedia.org/wiki/Boot_sectorhttp://en.wikipedia.org/wiki/Partition_(computing)http://en.wikipedia.org/wiki/Data_storage_devicehttp://en.wikipedia.org/wiki/Hard_dischttp://en.wikipedia.org/wiki/Volume_Boot_Recordhttp://en.wikipedia.org/wiki/Bootstraphttp://en.wikipedia.org/wiki/Operating_systems
  • 7/29/2019 Linux Basic Overview

    35/37

    About the Author

    Jimmy Andriambao works as RSD System Support Engineer for Sun Services and hasbeen with SUN Spain for 4 years. Prior to that, he spent six years in France as

    a system administrator of Solaris, Redhat, Cobalt, GNU/Linux Debian andMicrosoft Windows servers for big corporates like VALEO, SYSTRAN and othervarious Internet compagnies. He also spent several years programming the AmigaOE and its Motorola 68xxx CPU.

    His experience with Linux dates back to 1998 when he first loaded Linux

    Slackware on his PC. He's been geeking with Linux ever since and is now adevoted GNU/Linux Debian fan.

    Linux BASIC Overview for CES CFE Page 35/37

  • 7/29/2019 Linux Basic Overview

    36/37

    Related Resources

    Note Sun is not responsible for the availability of third-party web sitesmentioned in this document. Sun does not endorse and is not responsible orliable for any content, advertising, products, or other material on or availablefrom such sites or resources. Sun will not be responsible or liable for anydamage or loss caused or alleged to be caused by or in connection with use of orreliance on any such content, goods, or services that are available on orthrough any such sites or resources.

    SUN LINUX PRODUCTS :http://www.sun.com/linuxhttp://www.sun.com/x64

    SUN Linux Training :

    http://www.sun.com/training/catalog/operating_systems/delivery.xml#linuxinstructor

    REDHAT: http://www.redhat.comSUSE: http://www.suse.comDEBIAN: http://www.debian.orgUBUNTU: http://www.ubuntu.com

    GNU software: http://www.gnu.orgKernel source code: http://www.kernel.org

    KDE : http://www.kde.orgGNOME : http://www.gnome.org

    Official device node list: http://www.lanana.org/docs/device-listRPM Package Manager: http://www.rpm.orgTcpdump: http://www.tcpdump.orgThe Linux Documentation Project: http://www.tldp.orgThe UNIX Rosetta Stone: http://bhami.com/rosetta.html

    What is BSD : http://en.wikipedia.org/wiki/Berkeley_Software_Distribution

    BSD cerfification : http://www.bsdcertification.org

    Linux BASIC Overview for CES CFE Page 36/37

    http://www.sun.com/linuxhttp://www.sun.com/x64http://www.sun.com/training/catalog/operating_systems/delivery.xml#linuxinstructorhttp://www.redhat.com/http://www.suse.com/http://www.debian.org/http://www.ubuntu.com/http://www.gnu.org/http://www.kernel.org/http://www.kde.org/http://www.gnome.org/http://www.lanana.org/docs/device-listhttp://www.rpm.org/http://www.tcpdump.org/http://www.tldp.org/http://bhami.com/rosetta.htmlhttp://en.wikipedia.org/wiki/Berkeley_Software_Distributionhttp://www.bsdcertification.org/index.phphttp://www.sun.com/linuxhttp://www.sun.com/x64http://www.sun.com/training/catalog/operating_systems/delivery.xml#linuxinstructorhttp://www.redhat.com/http://www.suse.com/http://www.debian.org/http://www.ubuntu.com/http://www.gnu.org/http://www.kernel.org/http://www.kde.org/http://www.gnome.org/http://www.lanana.org/docs/device-listhttp://www.rpm.org/http://www.tcpdump.org/http://www.tldp.org/http://bhami.com/rosetta.htmlhttp://en.wikipedia.org/wiki/Berkeley_Software_Distributionhttp://www.bsdcertification.org/index.php
  • 7/29/2019 Linux Basic Overview

    37/37

    Accessing Sun Documentation Online

    You can browse the following websites archive or search for a specific booktitle or subject :

    The docs.sun.com web site enables you to access Sun technical documentationonline.The URL is http://docs.sun.com/

    The support engineers should also try SunsolveThe URL is http://sunsolve.sun.com/

    The X64 and X86 SUN Hardware references website

    The URL is http://sunsolve.sun.com/handbook_pub/

    Linux System administrators will find interesting ressources with BigAdminThe URL is http://www.sun.com/bigadmin/

    Get the products ?The URL is http://www.sun.com/linux

    http://docs.sun.com/http://docs.sun.com/http://sunsolve.sun.com/handbook_pub/http://docs.sun.com/http://www.sun.com/linuxhttp://docs.sun.com/http://docs.sun.com/http://sunsolve.sun.com/handbook_pub/http://docs.sun.com/http://www.sun.com/linux