SlideShare une entreprise Scribd logo
1  sur  22
File Systems 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 
All Rights Reserved.
What to Expect? 
W's of File System 
Building a Root File System 
Building the BusyBox 
Creating Ramdisk 
Booting Through NFS 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 2 
All Rights Reserved.
What is a File System? 
Place to store Data in form of Files 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 3 
All Rights Reserved.
File System in the 3 Spaces 
Three things at three levels 
Hardware Space – The Physical Organization 
of Data on the Storage Devices 
Kernel Space – Drivers to decode & access 
the data from the Physical Organization 
User Space – All what you see from / - The 
User View 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 4 
All Rights Reserved.
Do we need one in ES? 
Let's observe the Desktop Environment 
Where & Which are the File Systems 
there? 
Where: Hard Disk, CDROM, Pen Drive, … 
Which: FAT, FAT32, NTFS, iso9600, ext3, … 
What are they for? 
For (Operating) System's Data 
For your Data 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 5 
All Rights Reserved.
So, do we need FS in ES? 
Answer is in the following two Questions 
Do we need to have a Operating System running on it? 
Do we need to store our data on it? 
First one is definitely yes 
Second is requirement based 
But the needs & the storage medium for the two 
could be different 
And accordingly, we have a wide variety of File 
Systems to choose from 
Let's understand 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 6 
All Rights Reserved.
FS for Operating System 
Also referred as the Root File System (RFS) 
A Minimal RFS should contain the following 
Binaries (/bin, /sbin) 
Libraries (/lib) 
Devices (/dev) 
Configurations (/etc) 
Virtual File Systems (/proc, /sys) 
Application Temporary File (/tmp) 
Variable Data from Daemons & Utilities (/var) 
User Data (/root, /home) – optional 
Mount points (/mnt, /media) – optional 
Additional software (/usr, /opt) - optional 
Bootloader files (/boot) – optional 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 7 
All Rights Reserved.
Building a Root File System 
Involves 
Creating & Populating the complete directory structure, appropriately 
Putting that in the desired FS type 
Either on the host & then transferring it to the target, or directly on the target 
Various sources 
Binaries – Application Sets (busybox, ...) 
Libraries – Toolchain Libraries (glibc, uClibc, …) 
Devices – Create by Hand, Or Device package 
Virtual & Temporary Files – Create by Hand 
Configuration & Variable – Created as required 
Many a times, a more easier way is 
Start with a reference RFS 
Add-on whatever needed 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 8 
All Rights Reserved.
busybox – A special mention 
busybox is so-called a Swiss Knife 
Contains reduced size versions of the most commonly 
used Unix utilities, all in a single executable 
Shell environment being just the starting point 
It provides 
init system as per System V standard 
Startup applications & Service daemons 
mdev: Light-weight udev implementation 
TinyLogin: Set of logging utilities 
… 
Building it is similar to any other OSS 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 9 
All Rights Reserved.
Building the busybox 
Untar the busybox 
Get into its folder 
make menuconfig 
Select the required options 
make 
make CONFIG_PREFIX=<path_to_rootfs> 
install 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 10 
All Rights Reserved.
Creating the Root Filesystem 
Add the required directories 
dev, dev/pts, etc, etc/init.d, lib, mnt, opt 
Update the fstab to have proc and /dev/pts filesystems mounted 
automatically 
proc /proc proc defaults 0 0 
none /dev/pts devpts mode=0622 0 0 
Add the files required by the login utilities 
Add root:x:0:root in etc/group 
Add root:0:0:0:/root:/bin/ash in /etc/passwd 
Add 127.0.0.1 localhost in etc/hosts 
Copy the following from Templates/CreatingRootFs/Target/etc/ (available 
from Downloads section of http://sysplay.in) 
Add the inittab file 
Add the init.d/rcS 
Add the mdev.conf file 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 11 
All Rights Reserved.
Adding the shared Libraries 
cd lib 
cp – r /usr/local/angstrom/arm/arm-angstrom- 
linux-gnueabi/lib/ * 
arm-linux-strip * 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 12 
All Rights Reserved.
Creating the Ram Disk 
Create the 16M file of 'zero' 
dd if=/dev/zero of=rd-ext2.bin bs=1k count=16384 
Create the empty filesystem 
mke2fs -F -m 0 -b 1024 rd-ext2.bin 
Fill the filesytem with contents 
mount -t ext2 rd-ext2.bin /mnt -o loop 
tar -C Target -cf - . | tar -C /mnt -xf - 
Arguments to be passed to the Kernel 
root = /dev/ram0 rw ramdisk_size=16384 
initrd=0x90000000,16M 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 13 
All Rights Reserved.
Choosing RFS Types 
initramfs – For initial board bringup cycles 
nfs – For initial development 
squashfs – For read only storage 
jffs2 – For flash-based storage 
ext* - For large size storage 
… 
Please note that, we can't use any of fat, vfat, ntfs, … 
As they do not support device & special files on them 
ext3 supports 7 different types of files 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 14 
All Rights Reserved.
HOWTO of a Read Only FS 
Most of the Embedded System FS are 
Created on the Host, as images 
And then transferred to the Target 
Let's take an Example: squashfs 
Creating (on Host) 
mksquashfs [options] <rfs_dir> <img_file> 
Transferring (on Target) 
dd if=<img_file> of=<part_for_fs> 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 15 
All Rights Reserved.
Creating initramfs 
Done during Kernel Building 
Before building the Kernel, configure the 
following 
Under “General setup” 
Enable “Initial RAM filesystem … support” 
Set the “Initramfs source file(s)” to the RFS dir 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 16 
All Rights Reserved.
Root File System over NFS 
Enable NFS mount of the RFS directory on the 
host 
Update the Target's Kernel image with 
Root over NFS feature enabled 
On the target, add the following to the 
bootargs, before booting 
root=/dev/nfs 
nfsroot=<host_ip>:<rfs_dir_on_host> 
Argument for assigning an IP address 
Boot the target to use the RFS over NFS 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 17 
All Rights Reserved.
What about swap partition? 
Purposes of swap partition (on Desktop) 
Process Swapping in case Memory is less 
Hibernation 
Embedded Systems 
Has less Memory. So, if there is swap, it would 
be used frequently. But where? Flash??? What 
about its write cycles, write levelling? 
Typically, no Hibernation needed 
Hence, no swap on Embedded Systems 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 18 
All Rights Reserved.
Other File Systems 
/ → Root File System → One particular FS 
However, subdirectories under / could be 
On other Partitions, Or 
Even other File Systems 
Examples: 
/ → initramfs; /home → jffs2 
/ → squashfs; /var & /tmp → tmpfs 
/ → jffs2; /home → ext2 or fat 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 19 
All Rights Reserved.
Feature-specific File Systems 
Journalizing FS: ext2 vs ext3 
Read-only FS vs Mounting Read-only 
Compressed FS: cramfs, squashfs 
Flash-Specific FS: jffs2 
Temporary Storage: ramfs, tmpfs, ... 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 20 
All Rights Reserved.
What all have we learnt? 
W's of File System 
Building a Root File System 
Building the BusyBox 
Creating Ramdisk 
Booting Through NFS 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 21 
All Rights Reserved.
Any Queries? 
© 2010-14 SysPlay Workshops <workshop@sysplay.in> 22 
All Rights Reserved.

Contenu connexe

Tendances (20)

System Calls
System CallsSystem Calls
System Calls
 
Embedded Storage Management
Embedded Storage ManagementEmbedded Storage Management
Embedded Storage Management
 
Linux File System
Linux File SystemLinux File System
Linux File System
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Embedded Software Design
Embedded Software DesignEmbedded Software Design
Embedded Software Design
 
Architecture Porting
Architecture PortingArchitecture Porting
Architecture Porting
 
Linux User Space Debugging & Profiling
Linux User Space Debugging & ProfilingLinux User Space Debugging & Profiling
Linux User Space Debugging & Profiling
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Bootloaders
BootloadersBootloaders
Bootloaders
 
Linux io
Linux ioLinux io
Linux io
 
BeagleBoard-xM Booting Process
BeagleBoard-xM Booting ProcessBeagleBoard-xM Booting Process
BeagleBoard-xM Booting Process
 
BeagleBone Black Booting Process
BeagleBone Black Booting ProcessBeagleBone Black Booting Process
BeagleBone Black Booting Process
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Linux Porting
Linux PortingLinux Porting
Linux Porting
 
Toolchain
ToolchainToolchain
Toolchain
 
BeagleBone Black Bootloaders
BeagleBone Black BootloadersBeagleBone Black Bootloaders
BeagleBone Black Bootloaders
 
Block Drivers
Block DriversBlock Drivers
Block Drivers
 
linux kernel overview 2013
linux kernel overview 2013linux kernel overview 2013
linux kernel overview 2013
 
System Calls
System CallsSystem Calls
System Calls
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 

En vedette (20)

Platform Drivers
Platform DriversPlatform Drivers
Platform Drivers
 
Xfs file system for linux
Xfs file system for linuxXfs file system for linux
Xfs file system for linux
 
Dbms
DbmsDbms
Dbms
 
Dbms
DbmsDbms
Dbms
 
Ch 1-final-file organization from korth
Ch 1-final-file organization from korthCh 1-final-file organization from korth
Ch 1-final-file organization from korth
 
File organization 1
File organization 1File organization 1
File organization 1
 
Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
gcc and friends
gcc and friendsgcc and friends
gcc and friends
 
Embedded C
Embedded CEmbedded C
Embedded C
 
References
ReferencesReferences
References
 
Interrupts
InterruptsInterrupts
Interrupts
 
Network Drivers
Network DriversNetwork Drivers
Network Drivers
 
SPI Drivers
SPI DriversSPI Drivers
SPI Drivers
 
Serial Drivers
Serial DriversSerial Drivers
Serial Drivers
 
Introduction to Linux Drivers
Introduction to Linux DriversIntroduction to Linux Drivers
Introduction to Linux Drivers
 
I2C Drivers
I2C DriversI2C Drivers
I2C Drivers
 
Database management system
Database management systemDatabase management system
Database management system
 
Dbms slides
Dbms slidesDbms slides
Dbms slides
 
Database Management Systems (DBMS)
Database Management Systems (DBMS)Database Management Systems (DBMS)
Database Management Systems (DBMS)
 
Management Information System (MIS)
Management Information System (MIS)Management Information System (MIS)
Management Information System (MIS)
 

Similaire à File Systems

Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Ata Rehman
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installationAnkit Desai
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorialDru Lavigne
 
UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)Papu Kumar
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02FNian
 
101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2Acácio Oliveira
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptxMohamedSaied877003
 
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layoutAcácio Oliveira
 
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...IBM India Smarter Computing
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
2.1 design hard disk layout v2
2.1 design hard disk layout v22.1 design hard disk layout v2
2.1 design hard disk layout v2Acácio Oliveira
 

Similaire à File Systems (20)

Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)Advanced Level Training on Koha / TLS (ToT)
Advanced Level Training on Koha / TLS (ToT)
 
Hadoop installation
Hadoop installationHadoop installation
Hadoop installation
 
Linux System
Linux SystemLinux System
Linux System
 
Ch12 system administration
Ch12 system administration Ch12 system administration
Ch12 system administration
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
 
Shell Scripting
Shell ScriptingShell Scripting
Shell Scripting
 
UNIX(Essential needs of administration)
UNIX(Essential needs of administration)UNIX(Essential needs of administration)
UNIX(Essential needs of administration)
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
 
101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2101 2.1 design hard disk layout v2
101 2.1 design hard disk layout v2
 
Introduction to Operating Systems.pptx
Introduction to Operating Systems.pptxIntroduction to Operating Systems.pptx
Introduction to Operating Systems.pptx
 
101 2.1 design hard disk layout
101 2.1 design hard disk layout101 2.1 design hard disk layout
101 2.1 design hard disk layout
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
Problem Reporting and Analysis Linux on System z -How to survive a Linux Crit...
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Ch18 system administration
Ch18 system administration Ch18 system administration
Ch18 system administration
 
Ch12
Ch12Ch12
Ch12
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
2.1 design hard disk layout v2
2.1 design hard disk layout v22.1 design hard disk layout v2
2.1 design hard disk layout v2
 

Plus de Anil Kumar Pugalia (18)

Kernel Debugging & Profiling
Kernel Debugging & ProfilingKernel Debugging & Profiling
Kernel Debugging & Profiling
 
Processes
ProcessesProcesses
Processes
 
Playing with R L C Circuits
Playing with R L C CircuitsPlaying with R L C Circuits
Playing with R L C Circuits
 
Audio Drivers
Audio DriversAudio Drivers
Audio Drivers
 
Video Drivers
Video DriversVideo Drivers
Video Drivers
 
Mobile Hacking using Linux Drivers
Mobile Hacking using Linux DriversMobile Hacking using Linux Drivers
Mobile Hacking using Linux Drivers
 
Functional Programming with LISP
Functional Programming with LISPFunctional Programming with LISP
Functional Programming with LISP
 
Power of vi
Power of viPower of vi
Power of vi
 
"make" system
"make" system"make" system
"make" system
 
Hardware Design for Software Hackers
Hardware Design for Software HackersHardware Design for Software Hackers
Hardware Design for Software Hackers
 
RPM Building
RPM BuildingRPM Building
RPM Building
 
Linux Network Management
Linux Network ManagementLinux Network Management
Linux Network Management
 
Timers
TimersTimers
Timers
 
Threads
ThreadsThreads
Threads
 
Synchronization
SynchronizationSynchronization
Synchronization
 
Processes
ProcessesProcesses
Processes
 
Signals
SignalsSignals
Signals
 
Inter Process Communication
Inter Process CommunicationInter Process Communication
Inter Process Communication
 

Dernier

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 

Dernier (20)

Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

File Systems

  • 1. File Systems © 2010-14 SysPlay Workshops <workshop@sysplay.in> All Rights Reserved.
  • 2. What to Expect? W's of File System Building a Root File System Building the BusyBox Creating Ramdisk Booting Through NFS © 2010-14 SysPlay Workshops <workshop@sysplay.in> 2 All Rights Reserved.
  • 3. What is a File System? Place to store Data in form of Files © 2010-14 SysPlay Workshops <workshop@sysplay.in> 3 All Rights Reserved.
  • 4. File System in the 3 Spaces Three things at three levels Hardware Space – The Physical Organization of Data on the Storage Devices Kernel Space – Drivers to decode & access the data from the Physical Organization User Space – All what you see from / - The User View © 2010-14 SysPlay Workshops <workshop@sysplay.in> 4 All Rights Reserved.
  • 5. Do we need one in ES? Let's observe the Desktop Environment Where & Which are the File Systems there? Where: Hard Disk, CDROM, Pen Drive, … Which: FAT, FAT32, NTFS, iso9600, ext3, … What are they for? For (Operating) System's Data For your Data © 2010-14 SysPlay Workshops <workshop@sysplay.in> 5 All Rights Reserved.
  • 6. So, do we need FS in ES? Answer is in the following two Questions Do we need to have a Operating System running on it? Do we need to store our data on it? First one is definitely yes Second is requirement based But the needs & the storage medium for the two could be different And accordingly, we have a wide variety of File Systems to choose from Let's understand © 2010-14 SysPlay Workshops <workshop@sysplay.in> 6 All Rights Reserved.
  • 7. FS for Operating System Also referred as the Root File System (RFS) A Minimal RFS should contain the following Binaries (/bin, /sbin) Libraries (/lib) Devices (/dev) Configurations (/etc) Virtual File Systems (/proc, /sys) Application Temporary File (/tmp) Variable Data from Daemons & Utilities (/var) User Data (/root, /home) – optional Mount points (/mnt, /media) – optional Additional software (/usr, /opt) - optional Bootloader files (/boot) – optional © 2010-14 SysPlay Workshops <workshop@sysplay.in> 7 All Rights Reserved.
  • 8. Building a Root File System Involves Creating & Populating the complete directory structure, appropriately Putting that in the desired FS type Either on the host & then transferring it to the target, or directly on the target Various sources Binaries – Application Sets (busybox, ...) Libraries – Toolchain Libraries (glibc, uClibc, …) Devices – Create by Hand, Or Device package Virtual & Temporary Files – Create by Hand Configuration & Variable – Created as required Many a times, a more easier way is Start with a reference RFS Add-on whatever needed © 2010-14 SysPlay Workshops <workshop@sysplay.in> 8 All Rights Reserved.
  • 9. busybox – A special mention busybox is so-called a Swiss Knife Contains reduced size versions of the most commonly used Unix utilities, all in a single executable Shell environment being just the starting point It provides init system as per System V standard Startup applications & Service daemons mdev: Light-weight udev implementation TinyLogin: Set of logging utilities … Building it is similar to any other OSS © 2010-14 SysPlay Workshops <workshop@sysplay.in> 9 All Rights Reserved.
  • 10. Building the busybox Untar the busybox Get into its folder make menuconfig Select the required options make make CONFIG_PREFIX=<path_to_rootfs> install © 2010-14 SysPlay Workshops <workshop@sysplay.in> 10 All Rights Reserved.
  • 11. Creating the Root Filesystem Add the required directories dev, dev/pts, etc, etc/init.d, lib, mnt, opt Update the fstab to have proc and /dev/pts filesystems mounted automatically proc /proc proc defaults 0 0 none /dev/pts devpts mode=0622 0 0 Add the files required by the login utilities Add root:x:0:root in etc/group Add root:0:0:0:/root:/bin/ash in /etc/passwd Add 127.0.0.1 localhost in etc/hosts Copy the following from Templates/CreatingRootFs/Target/etc/ (available from Downloads section of http://sysplay.in) Add the inittab file Add the init.d/rcS Add the mdev.conf file © 2010-14 SysPlay Workshops <workshop@sysplay.in> 11 All Rights Reserved.
  • 12. Adding the shared Libraries cd lib cp – r /usr/local/angstrom/arm/arm-angstrom- linux-gnueabi/lib/ * arm-linux-strip * © 2010-14 SysPlay Workshops <workshop@sysplay.in> 12 All Rights Reserved.
  • 13. Creating the Ram Disk Create the 16M file of 'zero' dd if=/dev/zero of=rd-ext2.bin bs=1k count=16384 Create the empty filesystem mke2fs -F -m 0 -b 1024 rd-ext2.bin Fill the filesytem with contents mount -t ext2 rd-ext2.bin /mnt -o loop tar -C Target -cf - . | tar -C /mnt -xf - Arguments to be passed to the Kernel root = /dev/ram0 rw ramdisk_size=16384 initrd=0x90000000,16M © 2010-14 SysPlay Workshops <workshop@sysplay.in> 13 All Rights Reserved.
  • 14. Choosing RFS Types initramfs – For initial board bringup cycles nfs – For initial development squashfs – For read only storage jffs2 – For flash-based storage ext* - For large size storage … Please note that, we can't use any of fat, vfat, ntfs, … As they do not support device & special files on them ext3 supports 7 different types of files © 2010-14 SysPlay Workshops <workshop@sysplay.in> 14 All Rights Reserved.
  • 15. HOWTO of a Read Only FS Most of the Embedded System FS are Created on the Host, as images And then transferred to the Target Let's take an Example: squashfs Creating (on Host) mksquashfs [options] <rfs_dir> <img_file> Transferring (on Target) dd if=<img_file> of=<part_for_fs> © 2010-14 SysPlay Workshops <workshop@sysplay.in> 15 All Rights Reserved.
  • 16. Creating initramfs Done during Kernel Building Before building the Kernel, configure the following Under “General setup” Enable “Initial RAM filesystem … support” Set the “Initramfs source file(s)” to the RFS dir © 2010-14 SysPlay Workshops <workshop@sysplay.in> 16 All Rights Reserved.
  • 17. Root File System over NFS Enable NFS mount of the RFS directory on the host Update the Target's Kernel image with Root over NFS feature enabled On the target, add the following to the bootargs, before booting root=/dev/nfs nfsroot=<host_ip>:<rfs_dir_on_host> Argument for assigning an IP address Boot the target to use the RFS over NFS © 2010-14 SysPlay Workshops <workshop@sysplay.in> 17 All Rights Reserved.
  • 18. What about swap partition? Purposes of swap partition (on Desktop) Process Swapping in case Memory is less Hibernation Embedded Systems Has less Memory. So, if there is swap, it would be used frequently. But where? Flash??? What about its write cycles, write levelling? Typically, no Hibernation needed Hence, no swap on Embedded Systems © 2010-14 SysPlay Workshops <workshop@sysplay.in> 18 All Rights Reserved.
  • 19. Other File Systems / → Root File System → One particular FS However, subdirectories under / could be On other Partitions, Or Even other File Systems Examples: / → initramfs; /home → jffs2 / → squashfs; /var & /tmp → tmpfs / → jffs2; /home → ext2 or fat © 2010-14 SysPlay Workshops <workshop@sysplay.in> 19 All Rights Reserved.
  • 20. Feature-specific File Systems Journalizing FS: ext2 vs ext3 Read-only FS vs Mounting Read-only Compressed FS: cramfs, squashfs Flash-Specific FS: jffs2 Temporary Storage: ramfs, tmpfs, ... © 2010-14 SysPlay Workshops <workshop@sysplay.in> 20 All Rights Reserved.
  • 21. What all have we learnt? W's of File System Building a Root File System Building the BusyBox Creating Ramdisk Booting Through NFS © 2010-14 SysPlay Workshops <workshop@sysplay.in> 21 All Rights Reserved.
  • 22. Any Queries? © 2010-14 SysPlay Workshops <workshop@sysplay.in> 22 All Rights Reserved.