From c9e775a44cb316d578827f333531f5101aa29658 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 27 Sep 2020 10:27:15 +0200 Subject: add 2020-09-22 slides --- 2020-09-22.md | 177 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 2020-09-22.md (limited to '2020-09-22.md') diff --git a/2020-09-22.md b/2020-09-22.md new file mode 100644 index 0000000..f9f83de --- /dev/null +++ b/2020-09-22.md @@ -0,0 +1,177 @@ +--- +title: WTF is Linux +author: Rémi Nicole +date: 2020-09-22 +slide-level: 2 +aspectratio: 169 + +theme: metropolis +colortheme: owl +beameroption: "show notes on second screen=right" + +toc: true +highlightstyle: breezedark +lang: en-US + +bibliography: ../bibliography.bib +--- + +# Before we get started + +## Requirements for the practical works + +- A GNU/Linux machine +- An SD card reader +- A partner (if you want to) + +## The website + +- In here: +- Please contribute! +- Learn Git: + + +::: notes + +- If you have already used Git before, try to use the send-email approach +- If not, you can use the pull request method + +::: + +## Where were we? + +::: notes + +- Some history of computer science +- Downloaded, configured and build a kernel +- Tried to boot a Linux system, without success + +::: + +# The file system + +## Purpose + +- Organize ones and zeroes into files and directories +- It is therefore a "format" +- We can ask the kernel to represent the files and directories somewhere + +::: notes + +- Storage devices (HDDs, SSDs) just store ones and zeroes +- Representing the files is what is called "mounting" + +::: + +## Storage devices + +- HDDs, SSDs, Flash Memory, everything is different +- We don't care about their differences +- Thank you device drivers + + +## Well-known file systems + +- FAT32 +- ext4 +- NTFS + +::: notes + +- FAT32 works everywhere but + - Fragmentation + - no files bigger than 4 GB + - no advanced features (FAT is quite old) +- ext4 is the de facto Linux file system +- NTFS is the standard Windows file system + +::: + + +## Anatomy of a file system + +- Need to store the content of files +- Need to store metadata + - File names + - File permissions + - Where the content is + - etc. + +--- + +![FAT32 format [@mdpi:fat32]](../res/fat32.jpg){ width=70% } + +--- + +![FAT32 table [@wikimedia:fat32_table]](../res/Fat32_structure.png){ height=70% } + +## Partitions + +- We need a way to store **several** file systems in a single hard drive +- This is quite similar to file systems + - But we store partitions instead of files +- We call the format a "partitioning scheme" + +::: notes + +- Similar in that: + - This is a format + - We need metadata + - And we need space for the partitions + +::: + +## Well-known partitioning scheme + +- MBR +- GPT + +## Anatomy of a partitioning scheme + +![GPT format [@wikimedia:gpt]](../res/GUID-Partition-Table-Scheme.png){ height=80% } + +## Block devices + +- We need a way for the kernel to present us devices +- You can't directly present files + - We may not have a file system in a partition + - The kernel doesn't automatically where to "mount" the files + + +::: notes + +- Philosophy of "everything is a file" +- Look at `/dev` +- `/dev/sda` is the first SCSI disk +- `/dev/sda1` is the first partition in the first SCSI disk +- Theses special files behave a lot like normal files + +::: + +## Mounting + +- To the terminal! + + +::: notes + +- Also talk about mount options + +::: + +## Special file system + +- Common examples: `tmpfs`, `devtmpfs`, `sysfs` & `proc` + +# Init + +## Purpose + +- We need a process launched by the kernel +- A process can launch other processes +- So let's make it 1 + +## Busybox + + +# References -- cgit v1.2.3