Chapter 8 Unix & Linux
Examining UNIX and Linux Disk Structures UNIX flavors System 7, SGI IRIX, Sun Solaris, IBM AIX, and HP-UX BSD, FreeBSD, OpenBSD, and NetBSD Linux distributions Caldera, Red Hat, SuSe, Mandrake, and Debian Most consistent UNIX-like OSs GNU and BSD licenses
Examining UNIX and Linux Disk Structures (continued)
Examining UNIX and Linux Disk Structures (continued)
Examining UNIX and Linux Disk Structures (continued) Linux file systems Second Extended File System (Ext2fs) Ext3fs, journaling version of Ext2fs Employs inodes Pointer to other inodes or blocks Keep internal link count Deleted inodes have count value 0
Examining UNIX and Linux Disk Structures (continued)
UNIX and Linux Overview Everything is a file Files are defined as objects UNIX consists of four components Boot block Disk allocation unit of at least 512 bytes Contains the bootstrap code Only one
UNIX and Linux Overview (continued) Superblock Indicates disk geometry, available space, and location of the first inode Manages the file system Inode blocks First data after the superblock Assigned to every file allocation unit Data blocks Where directories and files are stored
UNIX and Linux Overview (continued)
UNIX and Linux Overview (continued) Bad block inode Keeps track of disk bad sectors Commands: badblocks, mke2fs, and E2fsck/ Linux ls command displays information about files Continuation inode provides more information about a file or directory
UNIX and Linux Overview (continued)
UNIX and Linux Overview (continued)
Understanding Inodes Link data stored in data blocks Ext2fs and Ext3fs are improvements over Ext Data recovery easier on Ext3fs than on Ext2fs First inode has 13 pointers Pointers 1 to 10 are direct pointers Pointer 11 is an indirect pointer Pointer 12 is a double-indirect pointer Pointer 13 is a triple-indirect pointer
Understanding Inodes (continued)
Understanding Inodes (continued)
Understanding UNIX and Linux Boot Processes Instruction code in firmware is loaded into RAM Instruction code then Checks the hardware Load the boot program Boot program Loads kernel Transfers control to kernel
UNIX & Linux Boot Processes Kernel Boots system on single-user mode Runs startup scripts Changes to multiuser mode Identifies root directory, swap and dump files Sets host name, time zone Runs consistency checks on the file system and mounts partitions Starts services
Understanding Linux Loader and GRUB Linux Loader (LILO) Old boot manager Can start two or more OSs Uses configuration file lilo.conf Grand Unified Boot Loader (GRUB) More powerful than LILO As LILO resides on MBR Command line or menu driven
UNIX and Linux Drives and Partition Schemes Labeled as path starting at root (/) directory Primary master disk First partition is /dev/hda Second partition is /dev/hda2 Primary slave or secondary master or slave First partition is /dev/hdb SCSI controllers /dev/sda with first partition /dev/sda1