Lecture 3: Filesystem Partitions Free Unix versions - PowerPoint PPT Presentation

About This Presentation
Title:

Lecture 3: Filesystem Partitions Free Unix versions

Description:

Parted can shrink the cluster size, so you can always shrink your partition. ... features excellent documentation, thousands of applications on a DVD/CD-ROM set ... – PowerPoint PPT presentation

Number of Views:145
Avg rating:3.0/5.0
Slides: 21
Provided by: guntisb
Category:

less

Transcript and Presenter's Notes

Title: Lecture 3: Filesystem Partitions Free Unix versions


1
Lecture 3 Filesystem PartitionsFree Unix
versions
  • Asoc. Prof. Guntis Barzdins
  • Asist. Girts Folkmanis
  • University of Latvia
  • Oct 1, 2004

2
Hard Drive Construction
  • Master Boot Record (MBR) Track 0, Sector 1
  • Number of partitions and their location (max 4
    primary partitions or 3 primary 1 Extended
    12 Logical)
  • Pointer to partition with bootloader

3
HD Track arrangement
Zone Bit Recording In this arrangement, tracks
are grouped into zones. From the innermost part
to the outer edge, successive zones contain more
sectors per track. This is more efficient than
the earlier arrangement.
Constant Sector Tracks Commonly found on early
hard disks and still on floppy disks. Every
track has the same number of sectors.
4
HD identification
Partition identification
  • IDE drives
  • dev/hda
  • dev/hdb
  • ...
  • SCSI
  • dev/sda
  • dev/sdb
  • ...

Note that /dev is not a real directory for
accessing the contents of disks it is rather a
naming space for all hardware devices (and their
drivers) present in the system, including
keyboard, screen etc. The contents of disks is
made available in other part of root / hierarchy.
5
File System Layout
Bootloader can be installed in different
locations (if bootloader not in MBR, the BIOS
interprets MBR to find boot partition)
6
Boot Block
  • The systems primary disk unit contains a boot
    block that contains the bootstrapping program
    that loads the OS to memory. This program is
    invoked by the computers minimal bootstrap
    program in ROM.
  • This boot block is often called the Master Boot
    Record (MBR).
  • Different operating systems treat the MBR in very
    different ways. Some are flexible enough to
    install a boot loader in the MBR, so that the
    disk can contain different OS in different disk
    partitions. The loader for each OS is then stored
    at the beginning of its own partition. Examples
    Windows NT/2000/xp boot loader, Linux lilo and
    grub.
  • A bootable disk is one on which a boot block
    has been installed.

7
Mandatory partitions
  • root
  • /dev/hda1 (recommended)
  • This is partition for the actual root / of the
    UNIX filesystem
  • swap
  • /dev/hda2 (recommended)
  • 4GB (max with 32bit x86 CPU)
  • RAM SIZE 2 (recommended)
  • This partition is not visible in root / and is
    used only by kernel for virtual memory page
    swapping (raw sectors, no structure)
  • Theoretically swap partition is optional, if
    enough RAM

8
Optional partitions or separate HD
  • Typically on separate partitions
  • /home, /boot, /tmp, /var, /usr
  • Reasons for separate partitions
  • logical or physical damage
  • reinstallation (affects only some partitions)
  • limit overflow effects
  • better performance
  • shared via network

9
Creating Partitions GNU Parted
  • Notes
  • For ext2, ext3 and reiserfs the start of the
    partition must stay fixed.
  • For ext2, ext3 the partition you copy to must be
    bigger or exactly the same size as the partition
    you copy from.
  • For ext2 and ext3 the checking is limited to
    ensuring the resize and copy commands will be ok.
  • For fat the size of the new partition after
    resizing or copying is restricted by the cluster
    size. Parted can shrink the cluster size, so you
    can always shrink your partition. However, if you
    can't use FAT32 for some reason, you may not be
    able to grow your partition.
  • Parted supports both FAT16 and FAT32. Parted can
    convert file systems between FAT16 and FAT32, if
    necessary.
  • Reiserfs support is enabled if you install
    libreiserfs, available at http//reiserfs.osdn.org
    .ua. (It is likely to be available soon from
    http//www.namesys.com)

10
File System Types
  • VFS Virtual File System
  • UFS / FFS UNIX File System used interchangeably
    with FFS (Fast File System)
  • NFS Network File System developed by Sun
  • RFS Remote File System developed by ATT
  • S5FS Original System V file system
  • VxFS Veritas Journaling File System
  • JFS Journaled File System AIX
  • CFS Cluster file system Tru64
  • EXT2/EXT3 2nd/3rd Extended File System Linux
    systems
  • GFS Global File System Linux
  • ReiserFS Journaling file system Linux
  • XFS Extended File System SGI and others
  • CXFS Clustered Extended File System SGI
  • QFS 64-bit very large file system Sun Solaris
  • HFS Hierarchical File System S/390 UNIX, OS/2,
    MacOS X
  • NTFS Windows NT/2000/2003
  • FAT16/ FAT32 Windows several versions

11
File System Support
  • Linux can interpret many file system types,
    including
  • EXT2, EXT3,
  • UFS/FFS,
  • FAT16, FAT32
  • NTFS (read-only),
  • HPFS
  • ISO9660, UDF, UFS, etc.
  • Win32 can interpret a few file system types,
    including
  • FAT16, FAT32
  • NTFS

12
Linux Virtual File System (VFS)
13
Unix File System (UFS) Structure
14
EXT3 File System
  • A journaling filesystem
  • Goal use EXT2 and complete backwards and
    forwards compatibility between EXT2 and EXT3
  • batch (journal) all updates(handles) off into
    very large transactions and just send them all
    out at once
  • Why?
  • Availability reduce long time fsck
  • Data Integrity data consistency
  • Speed optimizes hard drive head motion

15
BSD Versions
  • FreeBSD - Focusing on features and ease of use
  • Darwin (OS X) - Focusing on the desktop and
    multimedia with use of the Apple's Aqua Interface
  • NetBSD - Focusing on portability
  • OpenBSD - Focusing on security
  • PicoBSD - Focusing on size (extremely small)
  • DragonflyBSD - Focusing on new computing
    paradigms

16
Linux Distributions
  • Debian GNU/Linux (Xandros, Knopix,...)
  • a free operating system that provides almost 4000
    software packages for six architectures (Intel,
    Motorola, Alpha, SPARC, PowerPC, ARM) and is
    developed entirely by volunteers over the
    Internet
  • Fedora/RedHat
  • a Red-Hat-sponsored and community-supported open
    source project. The goal of The Fedora Project is
    to work with the Linux community to build a
    complete, general purpose operating system
    exclusively from free software. Development will
    be done in a public forum
  • Mandrake Linux
  • a friendly Linux Operating System which
    specializes in ease-of-use for both servers and
    the home/office. It is freely available in many
    languages throughout the world
  • Slackware
  • a long running Linux distribution that descends
    from the SLS Distribution
  • SuSE Linux
  • an extremely popular distro that features
    excellent documentation, thousands of
    applications on a DVD/CD-ROM set
  • Gentoo Linux
  • an optimized GNU/Linux distribution featuring 5
    different pgcc-optimized builds, including Intel
    Pentium, Pentium Pro/II/III and AMD K6 optimized

17
SunOS
  • Solaris x86

18
Majas darbs petijums
  • Katrai darba grupai instalet atkirigu Unix
    paveidu
  • Petijuma (aptuveni 5-10 lpp) detalizeti aprakstit
    guto pieredzi, ieskaitot
  • Ar ko i Unix versija atkiras no citam
    (filozofija)
  • Unix instalacijas process (ari screenshots etc.)
  • Aplikaciju instalacijas process
  • nokompilet un izpildit hello world C programmu
  • Gatavu aplikaciju rekomendejamais instalacijas
    process

19
Hello World palaiana
  • unix cat hello.c
  • include
  • int main()
  • printf("Hello World!\n")
  • return 0
  • Ctrl/D
  • unixgcc hello.c
  • unix./a.out
  • Hello World!
  • unix

20
Unix Instalacija
Write a Comment
User Comments (0)
About PowerShow.com