CST Algonquin College 2

Similar documents
CST8207 GNU/Linux O/S I Disks and Partitions

Disks, Filesystems, Booting Todd Kelley CST8177 Todd Kelley 1

Disks, Filesystems 1

Disks, Filesystems Todd Kelley CST8177 Todd Kelley 1

Linux+ Guide to Linux Certification, Third Edition. Chapter 2 Linux Installation and Usage

CompTIA Linux+ Guide to Linux Certification Fourth Edition. Chapter 2 Linux Installation and Usage

Full file at

This is Worksheet and Assignment 12. Disks, Partitions, and File Systems

Chapter 6. Linux File System

Partitioning and Formatting Guide

Ubuntu Installation Manually Partition Windows 7 Create System Reserved

Chapter Two. Lesson A. Objectives. Exploring the UNIX File System and File Security. Understanding Files and Directories

Lecture 2: The file system

An introduction to Logical Volume Management

Embedded System Design

CST8207: GNU/Linux Operating Systems I Lab Nine Disks, Partitions, and File Systems Part 2. Disks, Partitions, and File Systems - Part 2 of 2

Chapter 02 Linux Installation and Usage

Format Hard Drive After Install Ubuntu From Usb External

Partitioning a disk prior to Linux Installation

ACCESSDATA SUPPLEMENTAL APPENDIX

Disk Imaging with Knoppix

Installing Linux (Chapter 8) Note packet # 4. CSN 115 Operating Systems Ken Mead Genesee Community College. Objectives

Installing Ubuntu Server

ECE 598 Advanced Operating Systems Lecture 14

ELEC 377 Operating Systems. Week 8 Class 1

makes floppy bootable o next comes root directory file information ATTRIB command used to modify name

MINI-HOWTO backup and/or restore device or partition using zsplit/unzsplit

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Partitioning and Formatting Reference Guide

Manual Format Windows Xp Hard Drive Fat32 External Harddisk

SANOG VI IP Services Workshop: FreeBSD Install

Problem Overhead File containing the path must be read, and then the path must be parsed and followed to find the actual I-node. o Might require many

File systems and Filesystem quota

Installing caos with Cinch on Floppy Disk

File Systems Management and Examples

Digital Forensics. Disk and File System stuff


Linux Manually Mounting External Hard Drive Mac Terminal

CHAPTER 11: IMPLEMENTING FILE SYSTEMS (COMPACT) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Linux Manually Mount External Hard Drive Ntfs-3g Could Not

Installation Guide-x86, x86-64

Long-term Information Storage Must store large amounts of data Information stored must survive the termination of the process using it Multiple proces

Introduction to Linux

OPERATING SYSTEMS CS136

Windows 7 Manual Partition Hard Drive During Install Xp

File Systems. What do we need to know?

Overview LEARN. History of Linux Linux Architecture Linux File System Linux Access Linux Commands File Permission Editors Conclusion and Questions

Fedora Core: Made Simple

Format Hard Drive After Install Ubuntu From Usb

CS 4284 Systems Capstone

Partitioning Disks with parted

Installation of Fedora 12 with CD

2018/01/30 18:11 1/6 Disks Management HDD Management. Disks must be added before they can be formatted and mounted or configured in a RAID array.

INF322 Operating Systems

Acronis Disk Director 11 Home. Quick Start Guide

Mac Os X Manually Mounted Usb Drive Read Only

Computer System Management - File Systems

*nix Crash Course. Presented by: Virginia Tech Linux / Unix Users Group VTLUUG

Linux Manually Mount External Hard Drive Ntfs 3g Could Not

File System Case Studies. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

Asianux Server 3 Installation Guide

Guide to Linux+, Fourth Edition Chapter 2 Solutions

Lab E2: bypassing authentication and resetting passwords

THOMAS RUSSELL, Information Technology Teacher

Manually Mount Usb Flash Drive Ubuntu Server 12.04

Chapter Two File Systems. CIS 4000 Intro. to Forensic Computing David McDonald, Ph.D.

Typical File Extensions File Structure

Introduction to Linux. Fundamentals of Computer Science

Introduction to Linux

Manual Format Flash Drive Mac And Pc Disk Utility

OPS235: Week 1. Installing Linux ( Lab1: Investigations 1-4)

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

Sysinstall main menu. Move the cursor down by using the DOWN-ARROW and select Standard.

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt

Macrorit Partition Expert 4.3.5

Instructions For Reformatting A Hard Drive >>>CLICK HERE<<<

LiLo Crash Recovery. 1.0 Preparation Tips. 2.0 Quick Steps to recovery

client X11 Linux workstation

What does a file system do?

How to Recover Data with Linux

CST8177 Linux II. Linux Boot Process

Project 3: An Introduction to File Systems. COP4610 Florida State University

How To Reinstall Grub In Windows 7 With Cd Bootcamp Partition

Linux Files and the File System

CSC209. Software Tools and Systems Programming.

Linux Operating System

CST Algonquin College 2

Introduction to Linux

How To Install Windows Updates 8 From Usb

Week 10 Project 3: An Introduction to File Systems. Classes COP4610 / CGS5765 Florida State University

Filesystem. Disclaimer: some slides are adopted from book authors slides with permission

This is Lab Worksheet 7 - not an Assignment

3 INSTALLING WINDOWS XP PROFESSIONAL

A+ Guide to Managing and Maintaining Your PC. How Hardware and Software Work Together

Manual Format Flash Drive Ntfs Windows Xp

DUAL OS INSTALLATION

This is Lab Worksheet/Installation 7

environment) and note down the last "End" sector ( as shown in the below example):

COS 318: Operating Systems. File Systems. Topics. Evolved Data Center Storage Hierarchy. Traditional Data Center Storage Hierarchy

Project 3: An Introduction to File Systems. COP 4610 / CGS 5765 Principles of Operating Systems

Transcription:

Partitions

Lab due dates: Labs are due as specified usually on Page1 of the Lab document Lab due dates are expressed as: 10 min before the end of the lab period during a certain week There is a grace period (late labs will be accepted up to 1 minute before the next lab period after it s due) But it s late, so use the grace period for emergencies only! CST8207 - Algonquin College 2

Command Line Process (for now we think of it this way): 1. Prompt user for command 2. Read command from user, interpret it variables, shell filename globbing, quoting, etc (more later) 3. If command is not builtin to shell, look for the program file to use (PATH variable) 4. Run the (shell-interpreted) command, such that (see 5 below) 5. Output of command is printed to terminal 6. Repeat, starting at 1. CST8207 - Algonquin College 3

The audible bell character ^G in a filename Notice how the shell treats it like any other character, but the ls command replaces it with a? so you can see it and it doesn t control anything (^G is called control-g because it s a non-printing control character) What if we set our PATH to nothing? (now the shell doesn t look for commands) What can we do if we have NO commands? (we still have the shell builtins, like echo. And even with no path, the commands are still there so we can use /bin/ls for example. What if we put a ^G in our prompt (PS1)? CST8207 - Algonquin College 4

Think of a file in linux like a McDonalds Relative paths: let s go to the McDonalds down the street (which McDonalds are they going to? What is the current working street (current working directory) of the person speaking?) Absolute Paths: let s go to the McDonalds at 384 Baseline Road, in Ottawa, in Ontario, in Canada, in North America, on Earth, in the Milky Way, in our Universe, / CST8207 - Algonquin College 5

rmdir parent/child parent There are three things in that command 1. the command rmdir 2. a relative pathname of a directory 3. another relative pathname of a directory This command removes one directory, namely parent/child, and then removes another directory, parent rmdir parent/child removes child, from parent, but does not remove parent CST8207 - Algonquin College 6

Watch out for the command line token separator, which is one (or more) spaces In other words, when in doubt about whether there is a space character, think about whether something you re typing in is two words, or one word Example: cd / we know this has to be two words with a space in it: it cannot be cd/ Beware the.. name of the parent directory, because.. with a space between dots is two words (the current directory twice?) CST8207 - Algonquin College 7

Disk Partition Table Identifying Partitions Linux Partitions Linux Filesystems (again, but different) fdisk and Disk Druid CST8207 - Algonquin College 8

Chapter 3: pages 71 82 You ve already read this it s about the partitioning that was done as you installed Fedora CST8207 - Algonquin College 9

A partition is a section of disk that holds a filesystem The Master Boot Sector contains the Disk Partition Table, which can hold up to four entries due to the way in which the master boot record is structured If you use a tool like partition magic, you can create more than four partitions Each Disk Partition Table entry describes a partition by specifying its: first cylinder last cylinder whether it is bootable a filesystem identifier. CST8207 - Algonquin College 10

We deal primarily with the MSDOS Partition Table type GPT partition tables getting common: GUID Partition Table Globally Unique IDentifier (but back to MSDOS Tables ) A partition in the DPT can be either a Primary partition (more than one possible) or an Extended Partition (only one possible per disk) Up to four Primary Partitions are possible in a single table One of the four partition entries can be designated as an Extended partition, which consumes the rest of the drive This allows for creating Logical drives, or sub-partitions, within it CST8207 - Algonquin College 11

Naming IDE disk drives Primary master --- hda Primary slave ----- hdb Secondary master - hdc Secondary slave -- hdd CST8207 - Algonquin College 12

Naming SATA disk drives sda sdb sdc sdd CST8207 - Algonquin College 13

Naming partitions hdx1 hdx4 Partitions recorded in the partition table hdx5 hdx63 Logical drives Note: You can have up to 4 primary partitions created in your system, while there is only one extended partition. CST8207 - Algonquin College 14

On the previous slide, Partition 4 can t be created because there s no space for it. In this case, Partition 3 is extended, and therefore takes up all remaining space. There is 1 or more primary partition, 1 extended and unlimited logical partitions within extended Fine to have multiple primary partitions without an extended, but a little harder to manage Each partitions is represented by Linux as a device, that can contain a filesystem, that can be mounted to a directory within the main directory tree Be warned - partitioning is not to be taken lightly playing with fdisk or any partitioning tool without prior planning and backup of your data could potentially destroy all data on the drive. CST8207 - Algonquin College 15

Linux requires 2 partitions to exist to work properly / (root) partition <swap> partition CST8207 - Algonquin College 16

primary requirement for kernel & O/S to have any capabilities outside itself only one root filesystem under which everything exists size depends installed packages and associated files CST8207 - Algonquin College 17

typically will span many mounted filesystems in hierarchy how many separate filesystems are mounted on mount points in the root filesystem varies contains the core of the Linux filesystem content loaded in read-only mode for verification then remounted in read-write mode once verified (to be discussed in future lectures) CST8207 - Algonquin College 18

recommended size depends on the amount of physical RAM on the system Small amount of RAM, go with 2 X RAM Large amount of RAM, go with 1 X RAM (or even none?) must be Linux swap partition type used for virtual memory implementation not visible as a mounted partition, but used directly by the kernel can be up to eight swap partitions active at any time CST8207 - Algonquin College 19

to allow for maintenance of user files and growth of storage space over time size varies, but should allow for enough space per individual user to store their personal or shared files usually defined as a variable size partition during automated install ; can span multiple disks minimum recommended size of 512 MB (these recommendations change over time) typically managed using disk quotas (ie user cannot use more than his quota) CST8207 - Algonquin College 20

/var contains large log files and data files created and maintained by the system and applications recommended size of 256 megs (again, this changes ) /usr typically contains user installed applications and source code usually defined as a variable size partition during automated install; can span multiple disks minimal recommended size of 512 megs (again, this changes..) CST8207 - Algonquin College 21

Prior to kernel 2.4.x, Linux was using the ext2 filesystem type as its native filesystem very efficient and effectively maintained over time somewhat limited in security and management tools by some standards From kernel 2.4.x on, Linux is now adopting the newly implemented ext3 journaling filesystem even more efficient than ext2 higher security more tracking of changes of the filesystem easier recovery of damaged filesystem Now there s ext4 A more detailed comparison of these filesystem types will be discussed later on. CST8207 - Algonquin College 22

ext predecessor of the ext2 Linux filesystem ext2 predecessor of ext 3 Linux Filesystem Standard ext3 - Linux Journalling Filesystem ext4 Improves on ext3 nfs - Network Filesystem filesystem over networks msdos - MS-DOS/Windows FAT/FAT16 filesystem vfat - MS FAT32 (Win9x) filesystem ntfs - Windows NT s/2k/xp NTFS filesystem And many others XFS, BTRFS, ZFS, Reiser CST8207 - Algonquin College 23

hpfs - IBM OS/2 filesystem iso9660 - standard filesystem for CD-ROMs sysv - AT&T s System V Unix filesystem cdfs Mac OS X, Linux, FreeBSD HFS+ - OS X qnx4 - QNX4 partitions ncpfs - Novell server filesystem exfat- Windows CE 6.0 And many more being added or considered CST8207 - Algonquin College 24

DOS fdisk program Very limited Linux support Linux fdisk program similar to DOS fdisk, but more features available can only be used under Linux/UNIX parted can handle GPT partition tables Disk Druid program Part of the Fedora installation system Can not be run on its own GParted (Fedora, Ubuntu) Gnome Partitioning Editor: GUI based partitioning only runs from within Linux/UNIX CST8207 - Algonquin College 25

CST8207 - Algonquin College 26

Third-party tools (e.g. Partition Magic, etc) may or may not be included with Linux must make sure software properly understands partition types being affected Note: Do not try to partition the drives already installed on lab machines at Algonquin... They have already been partitioned! CST8207 - Algonquin College 27

fdisk [options] device command-line partition table manipulator for Linux allows for viewing or modifying existing partition table and/or creating new partition(s) for a specified device can set Partition Type for most of the common filesystems in use today tries to obtain the disk geometry automatically to allow for more direct access to hard disk partition management CST8207 - Algonquin College 28

1. Yes 2. No 86% 14% 1 2 CST8207 - Algonquin College 29

1. 1. one 2. 2. two 3. 3. three 4. 4. four 5. 5. more than four 82% 2% 2% 8% 8% 1 2 3 4 5 CST8207 - Algonquin College 30