diff options
Diffstat (limited to '2020-09-22.md')
-rw-r--r-- | 2020-09-22.md | 177 |
1 files changed, 177 insertions, 0 deletions
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 @@ | |||
1 | --- | ||
2 | title: WTF is Linux | ||
3 | author: Rémi Nicole <remi.nicole@smile.fr> | ||
4 | date: 2020-09-22 | ||
5 | slide-level: 2 | ||
6 | aspectratio: 169 | ||
7 | |||
8 | theme: metropolis | ||
9 | colortheme: owl | ||
10 | beameroption: "show notes on second screen=right" | ||
11 | |||
12 | toc: true | ||
13 | highlightstyle: breezedark | ||
14 | lang: en-US | ||
15 | |||
16 | bibliography: ../bibliography.bib | ||
17 | --- | ||
18 | |||
19 | # Before we get started | ||
20 | |||
21 | ## Requirements for the practical works | ||
22 | |||
23 | - A GNU/Linux machine | ||
24 | - An SD card reader | ||
25 | - A partner (if you want to) | ||
26 | |||
27 | ## The website | ||
28 | |||
29 | - In here: <https://git.esiee.fr/nicolere/wtf-is-linux-website> | ||
30 | - Please contribute! <https://git-send-email.io/> | ||
31 | - Learn Git: <https://git-scm.com/book/en/v2> | ||
32 | |||
33 | |||
34 | ::: notes | ||
35 | |||
36 | - If you have already used Git before, try to use the send-email approach | ||
37 | - If not, you can use the pull request method | ||
38 | |||
39 | ::: | ||
40 | |||
41 | ## Where were we? | ||
42 | |||
43 | ::: notes | ||
44 | |||
45 | - Some history of computer science | ||
46 | - Downloaded, configured and build a kernel | ||
47 | - Tried to boot a Linux system, without success | ||
48 | |||
49 | ::: | ||
50 | |||
51 | # The file system | ||
52 | |||
53 | ## Purpose | ||
54 | |||
55 | - Organize ones and zeroes into files and directories | ||
56 | - It is therefore a "format" | ||
57 | - We can ask the kernel to represent the files and directories somewhere | ||
58 | |||
59 | ::: notes | ||
60 | |||
61 | - Storage devices (HDDs, SSDs) just store ones and zeroes | ||
62 | - Representing the files is what is called "mounting" | ||
63 | |||
64 | ::: | ||
65 | |||
66 | ## Storage devices | ||
67 | |||
68 | - HDDs, SSDs, Flash Memory, everything is different | ||
69 | - We don't care about their differences | ||
70 | - Thank you device drivers | ||
71 | |||
72 | |||
73 | ## Well-known file systems | ||
74 | |||
75 | - FAT32 | ||
76 | - ext4 | ||
77 | - NTFS | ||
78 | |||
79 | ::: notes | ||
80 | |||
81 | - FAT32 works everywhere but | ||
82 | - Fragmentation | ||
83 | - no files bigger than 4 GB | ||
84 | - no advanced features (FAT is quite old) | ||
85 | - ext4 is the de facto Linux file system | ||
86 | - NTFS is the standard Windows file system | ||
87 | |||
88 | ::: | ||
89 | |||
90 | |||
91 | ## Anatomy of a file system | ||
92 | |||
93 | - Need to store the content of files | ||
94 | - Need to store metadata | ||
95 | - File names | ||
96 | - File permissions | ||
97 | - Where the content is | ||
98 | - etc. | ||
99 | |||
100 | --- | ||
101 | |||
102 | ![FAT32 format [@mdpi:fat32]](../res/fat32.jpg){ width=70% } | ||
103 | |||
104 | --- | ||
105 | |||
106 | ![FAT32 table [@wikimedia:fat32_table]](../res/Fat32_structure.png){ height=70% } | ||
107 | |||
108 | ## Partitions | ||
109 | |||
110 | - We need a way to store **several** file systems in a single hard drive | ||
111 | - This is quite similar to file systems | ||
112 | - But we store partitions instead of files | ||
113 | - We call the format a "partitioning scheme" | ||
114 | |||
115 | ::: notes | ||
116 | |||
117 | - Similar in that: | ||
118 | - This is a format | ||
119 | - We need metadata | ||
120 | - And we need space for the partitions | ||
121 | |||
122 | ::: | ||
123 | |||
124 | ## Well-known partitioning scheme | ||
125 | |||
126 | - MBR | ||
127 | - GPT | ||
128 | |||
129 | ## Anatomy of a partitioning scheme | ||
130 | |||
131 | ![GPT format [@wikimedia:gpt]](../res/GUID-Partition-Table-Scheme.png){ height=80% } | ||
132 | |||
133 | ## Block devices | ||
134 | |||
135 | - We need a way for the kernel to present us devices | ||
136 | - You can't directly present files | ||
137 | - We may not have a file system in a partition | ||
138 | - The kernel doesn't automatically where to "mount" the files | ||
139 | |||
140 | |||
141 | ::: notes | ||
142 | |||
143 | - Philosophy of "everything is a file" | ||
144 | - Look at `/dev` | ||
145 | - `/dev/sda` is the first SCSI disk | ||
146 | - `/dev/sda1` is the first partition in the first SCSI disk | ||
147 | - Theses special files behave a lot like normal files | ||
148 | |||
149 | ::: | ||
150 | |||
151 | ## Mounting | ||
152 | |||
153 | - To the terminal! | ||
154 | |||
155 | |||
156 | ::: notes | ||
157 | |||
158 | - Also talk about mount options | ||
159 | |||
160 | ::: | ||
161 | |||
162 | ## Special file system | ||
163 | |||
164 | - Common examples: `tmpfs`, `devtmpfs`, `sysfs` & `proc` | ||
165 | |||
166 | # Init | ||
167 | |||
168 | ## Purpose | ||
169 | |||
170 | - We need a process launched by the kernel | ||
171 | - A process can launch other processes | ||
172 | - So let's make it 1 | ||
173 | |||
174 | ## Busybox | ||
175 | |||
176 | |||
177 | # References | ||