Created by :Himani Mittal (B.tech-CSE) NIEC,delhi Preeti Raheja(B.tech-CSE) NIEC,delhi Harshal Gambhir(B.tech-CSE)NIEC,delhi
INDEX
Unix 2. Linux 3. Computer Startup 4. Linux Kernel 5. Top Level Directories 6. CLI Installation 7. GUI Installation 8. Boot Startup Commands 9. Vi Editor 10. Commands Used 11. Root Password Cracking
1.
UNIX
First version created in Bell Labs 1969 AT&T licenses source code for low cost Trademarks UNIX name, UNIX name closely held Licensees must create new name for their operating systems Many UNIX Flavors emerge
PRINCIPLES Everything is a file. Including hardware Configuration data stored in text Small, single-purpose programs Avoid Captive User Interfaces Ability to chain programs together to perform complex tasks.
LINUX
Fresh Implementation of UNIX APIs.
COMPUTER STARTUP
Booting is a bootstrapping process that starts operating systems when the user turns on a computer system A boot sequence is the set of operations the computer performs when it is switched on that load an operating system SEQUENCE OF BOOTING
1. 2. 3. 4. 5. 6.
Turn on CPU jump to address of BIOS (0xFFFF0) BIOS runs POST (Power-On Self Test) Find bootable devices Loads and execute boot sector form MBR Load OS
Boot loader could be more aptly called the kernel loader. The task at this stage is to load the Linux kernel Optional, initial RAM disk GRUB and LILO are the most popular Linux boot loader.
KERNEL
The kernel is the central part in most computer operating systems because of its task, which is the management of the system's resources and the communication between hardware and software components Kernel is always store on memory until computer is turn off Kernel image is not an executable kernel, but a compress kernel image zImage size less than 512 KB bzImage size greater than 512 KB TASK OF KERNEL
INIT PROCESS The first thing the kernel does is to execute init program Init is the root/parent of all processes executing on Linux The first processes that init starts is a script /etc/rc.d/rc.sysinit Based on the appropriate run-level, scripts are executed to start various processes to run the system and make it functional
System Requirements
Or
64-bit Intel/AMD with 512 MB RAM 2-6 GB Disk Space Bootable CD Other processor architectures supported Itanium 2, IBM Power, IBM Mainframe.
Download LINUX
To install Red Hat, you will need to download the ISO images (CD Images) of the installation CD-ROMs from http://fedora.redhat.com Download the i386 images for 32 PPC images for Apple Macintosh for 64 bit AMD Processors Intel Processors, and x86_64 for
Burn the iso CD images on CDs and use these CDs as Installation CDs (typically 4)
1. place the DVD or CD #1 in your DVD/CD-ROM drive and boot your system from the DVD/CD-ROM. 2. The installation program then probes your system and attempts to identify your CD-ROM drive. Points To Consider:a) To abort the installation process at this time, reboot your machine and then eject the boot media. b) Run mediacheck if you encounter a problem during installation. c)For IDE (ATAPI) DVD/CD-ROM if the installation program fails to find it and asks you what type of DVD/CD-ROM drive you have then try this boot command. Restart the installation, and at the boot: prompt enter linux hd X =cdrom . X values depends upon master and slave:a first IDE controller, master b first IDE controller, slave c second IDE controller, master d second IDE controller, slave
Choosing mode to create partition . Selecting custom layout i.e. user will select partition ,their mount point and space required.
Swap is a file system as well as partition so ,select its file system as swap and provide space twice as that of RAM and select OK.
NOTE:-
Selecting area for installation of boot loader ,from where linux will boot .
Here either name of host can be set or it shall be automatically assigned as localhost.
In linux software packages can be installed at time of linux installation ,which is solely user choice , if they want to choose packages at same time.
It would take some time for installation and after installation restart your system .
Linux Installation
What is a Partition?
Partitioning is a means to divide a single hard drive into many logical drives. A partition is a contiguous set of blocks on a drive that are treated as an independent disk. A partition table is an index that relates sections of the hard drive to partitions.
Linux Installation
Partition Fields
Device: This field displays the partition's device name.
Start: This field shows the sector on your hard drive where the partition begins.
End: This field shows the sector on your hard drive where the partition ends. Size: This field shows the partition's size (in MB). Type: This field shows the partition's type (for example, ext2, ext3, or vfat).
Mount Point: A mount point is the location within the directory hierarchy at which a volume exists; the volume is "mounted" at this location. This field indicates where the partition will be mounted.
Linux Installation
Filesystem Types
ext2 An ext2 file system supports standard Unix file types (regular files, directories, symbolic links, etc). It provides the ability to assign long file names, up to 255 characters. Versions prior to Red Hat Linux 7.2 used ext2 file systems by default. ext3 The ext3 file system is based on the ext2 filesystem and has one main advantage journaling. Using a journaling filesystem reduces time spent recovering a file system after a crash as there is no need to fsck the file system. swap Swap partitions are used to support virtual memory. In other words, data is written to a swap partition when there is not enough RAM to store the data your system is processing. vfat The VFAT file system is a Linux filesystem that is compatible with Windows 95/NT long filenames on the FAT filesystem.
Linux Installation
Linux Installation
Disk Partition
IDE Disk Partitions /dev/hda (Primary Master Disk) /dev/hda1 (First Primary Partition) /dev/hda2 (Second Primary Partition) /dev/hdb (Primary Slave Partition) /dev/hdb1 /dev/hdc (Secondary Master/Slave Partition) /dev/hdc1 SCSI Disk Partitions /dev/sda1, /dev/sda2 /dev/sdb1, /dev/sdb2 /dev/sdc1, /dev/sdc2
Linux Installation
Linux Installation
Boot Loader
In order for the BIOS to load an OS it looks for instructions on the
Linux rescue
Common problems:
unable to boot normally . having hardware or software problems. forgot the root password.
Execution:
Linux noprobe
Common Problem:
- Red Hat installer does not detect the SCSI controller or network card
Execution:
boot : linux noprobe.
Linux mediacheck
Common problem:
- to inspect disks.
Execution:
- boot: linux mediacheck
- Options: 1.Cd found : click ok to test cd before installation else press
skip 2.Test to test current cd or eject to eject current disc and insert another disc.
Linux askmethod Use: remote installation through 1. NFS 2. FTP 3. HTTP 4. VNC 5. PXE 6. Kickstart
Linux dd
Use: This argument causes the installation program to prompt you to use a driver diskette.
Linux update
Use:
to apply updates for the anaconda installation program from a USB storage device .
Memtest86
Use : perform memory testing before you install Red Hat Enterprise Linux by entering memtest86 at the boot:
Press b. Linux will boot in terminal 1. Write command :-passwd root New password can now be set and restart the system.
Vi Editor
vi visual editor ,Standard UNIX & LINUX editor. Vim-visual editor improved , Standard Red Hat editor.
Three modes of vi:Command mode Cursor movement Change, delete, yank, put, search Insert mode Type in new text Return to command mode with <ESC> Exit mode Configuring, exiting, saving Search and replace
Commands of Vi Editor
ESC for command mode Change cc cl cw c) c( c{ c} save changes :wq! :w! Delete dd dl dw d) d( Yank(Copy) yy yl yw y) y( d{ d}
Line Letter Word Sentence ahead Sentence behind Paragraph ahead Paragraph behind
y{ y}
Save changes
Common Commands
Add a file:
- #touch filename: it creates a blank file. - #cat >filename: to enter data into file.
Example #touch /doc #cat > /doc Hi Ctrl+d (/doc file created and added) Add a user:
Common commands
Add a directory
#mkdir p /a/b/c
Common commands
Delete a file : #rm filename Example- #rm /doc do you want to delete /doc file?[y/n]:y /doc deleted. Delete a directory : #rm r directory name Example- #rm r /a delete /a/b? y delete /a/b/c? y delete /a/b/c/d? y (directory deleted.)
Obtaining the Red Hat Enterprise Linux Installation Media Although RHEL is an open source operating system, and as such, the source code is freely downloadable, the binary installation images are only available as part of a paid Red Hat Enterprise Linux subscription. In addition to access to the installation images for RHEL, this subscription also provides technical support for the operating system. If you already have a paid subscription, log into your Red Hat account to download the operating system. If you would like to try out RHEL before purchasing, Red Hat provides a 30-day trial. To register for a trial, visit the Red Hat website at http://www.redhat.com/rhel/details/eval/ and complete the registration process. The installation distribution can be downloaded as either six individual CDROM images or a single DVD image. Unless you specifically need to use CD images the DVD installation image is strongly recommended. The DVD image is named using the following convention: Having downloaded either DVD or CDROM images, either burn them to disk, configure your virtualization environment to treat them as DVD or CDROM drives or use the steps outlined in Performing an RHEL 5 Network Installation to access the installation image over a network.