6 LinuxFS
6 LinuxFS
Module Objectives
History of Linux
Linux File System
Linux File System Layout
Structure of ExtX File system
File Deletion example
10 November 2023 2
LinuxOS
10 November 2023 3
History
Linux is a Free and Open-Source Operating system
Free and Open-Source Software
Operating System Kernel released by Linus Torvalds
Published under GNU General Public License
10 November 2023 4
Linux Flavour/Distros
10 November 2023 5
Linux File System
The extended file system or ext was the first file system created
specifically for the linux operating system
Journaling in ext3
10 November 2023 6
Filesystem
10 November 2023 7
Linux File System Contents
10 November 2023 8
Structure of ExtX File System
MBR Partition1 Partition2 Partition3 Partition4
Ntfs Linux
10 November 2023 10
What does a Block Group contain ?
Super Block
Boot Sector
MBR Group Descriptor
Block Group 0 table
Partition1
Block Group 1
Partition2 Block bitmap
Block Group 2
Inode bitmap
Partition3
Block Group 3
Inode table
Partition4
Block Group N
Datablock
10 November 2023 11
What does a Block Group contain ?
its the metadata of the file system.
Block group number ,block
The superblock size,blocks per group,inodes per
group,free blocks,free inodes
GDT Details of group.
10 November 2023 12
What does inode table contain?
10 November 2023 13
inode
10 November 2023 14
Directory entries
10 November 2023 15
Reserved inodes
Inode numbers
First 11 inodes are reserved.
Inode 1 contains a list of bad blocks in the file system.
Inode 2 is the root inode and Inode 5 is the boot loader
inode.
Inode 8 is for file system journaling(Ext3).
3,4,6,7,9,10 are foundations for future enhancements.
User files/directories stored from inode 12 onwards.
10 November 2023 16
Locating a file
/home/ealtieri/hello.txt.
10 November 2023 17
What happens when a file is deleted?
File's data blocks are marked as available(0) in its block
bitmap.
File's inode are marked as available(0) in its inode bitmap.
Block addresses are set to null in ext3& ext4 but retained in
ext2.
The deleted time is added.
The inode number is made free in the directory entry of ext2.
In ext3 & ext4 the inode number is retained in the directory
entry.
10 November 2023 18
File deletion
Block addresses
are retained in
ext2.
10 November 2023 19
Practicals
OS :Helix
Create partition
Format it with ext2 filesystem
Mount the partition to a mount point
Use sleuthkit autopsy tool to analyse an ext2
partition
10 November 2023 20
Practicals
Create partition
Format it with ext2 Create partition
filesystem – sudo fdisk /dev/sda
Mount the partition to a
mount point Format a Partition in Linux
Use sleuthkit autopsy – sudo mkfs.ext2 /dev/sda
tool to analyse an ext2
partition
To view partition table
– sudo fdisk –l
Create a mountpoint (Mountpoints are directories
were filesystems are mapped)
– sudo mkdir ptc
Mount the partition to a mount point
– sudo mount /dev/sda1 ptc.
Now move to ptc directory and create some files
Use sleuthkit autopsy tool to analyse an ext2
partition
10 November 2023 21
10 November 2023 22