Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
Commit80565bff2ab90e097b6e283f8fc5316797caf5b7 (patch)
Author
 Syndamia <kamen@syndamia.com>
2023-02-27 11:29:17 +0200
Committer
 Syndamia <kamen@syndamia.com>
2023-02-27 11:29:17 +0200
Files72a17bf4e0a340a96512ec22043ed1f038aeb5ca /src
syndamia.com-80565bff2ab90e097b6e283f8fc5316797caf5b7.tar
syndamia.com-80565bff2ab90e097b6e283f8fc5316797caf5b7.tar.gz
syndamia.com-80565bff2ab90e097b6e283f8fc5316797caf5b7.zip
Parent727e8ebaee7400c080f5fa0e553b55817cba3d42 (diff)
[talks/lbs] Reworked useful OS slides
1 files changed, 71 insertions, 31 deletions
-rw-r--r--src/talks/linuxgraphy-by-strabo/index.md102
diff --git a/src/talks/linuxgraphy-by-strabo/index.md b/src/talks/linuxgraphy-by-strabo/index.md
index b944584..7a56b69 100644
--- a/src/talks/linuxgraphy-by-strabo/index.md
+++ b/src/talks/linuxgraphy-by-strabo/index.md
@@ -1145,21 +1145,21 @@ This is important, since pretty much everything can be freely modified by anyone
-&&slide
+&&slide &&font35
# 5. What makes up a useful OS
-We talked about the modularity of a Linux-based operating system.
-Overall, these are the main elements that make up a desktop operating system you might want to use:
+A Linux-based operating system is nothing more than the Linux kernel, combined with an assortment of programs.
+Overall, the main elements that make up a useful *desktop* operating system (alongside a command-line shell) are:
-&&lineb3
+&&lineb1
1. **Bootloader**: load the kernel and operating system
2. **Init system**: well managed way to start everything inside the OS
3. **Package manager**: way to manage our binaries
4. **Desktop manager**: graphical shell
-&&/slide
+&&/font &&/slide
@@ -1167,46 +1167,84 @@ Overall, these are the main elements that make up a desktop operating system you
## 5.1. Bootloader
-When a computer boots, it needs to start an operating system, but you can't expect it to know how to boot any operating system.
-Skipping over the details, the computer starts a small program called the bootloader, which handles loading the OS.
+The computer boot process is a relay race.
-On Linux, the most used one is called [GRUB](https://en.wikipedia.org/wiki/GNU_GRUB).
-With it you can also specify which kernel to load, with which parameters to load the kernel and which OS to start.
+In a "standard" BIOS-MBR boot configuration:
+
+```
+BIOS -> Master Boot Record -> Active Parition -> Bootloader ->
+-> Boot menu (optional) -> Kernel -> Everything else
+```
+
+- BIOS: a small chip with code that is ran upon power up
+- MBR: small amount of space at the very start of the disk, that contains some (bootstrap) code and partition information. The BIOS hands off execution to the bootstrap code.
+- Active partition: MBR loads and runs code from the beginning of the partition (boot sector), which starts the bootloader
+- Bootloader: the first complex program, which manages kernels, shows a menu, allows for debugging and so on
&&/slide
-&&slide
+&&clide
-## 5.2. Init system
+The BIOS is baked into the motherboard, the MBR is pretty universal (and it's less than 512 bytes) and the kernel we know and love.
+
+That leaves us with the need for a bootloader.
+On Linux, the most used one is called [GRUB](https://en.wikipedia.org/wiki/GNU_GRUB).
-In Minimal Linux Live, the whole system is started by some hard written scripts, this isn't very modular and extensible, that is why we need a special system.
+It's config is found in `/etc/default/grub` (which is then fully generated with `grub-mkconfig`) and can be "installed in the partition" with `grub-install`.
-Generally, the [init system](https://en.wikipedia.org/wiki/Init) loads a series of services, where each service is just a file that specifies what and how something needs to be ran.
+```
+GRUB_DEFAULT=0
+GRUB_TIMEOUT=5
+GRUB_TIMEOUT_STYLE=menu
+GRUB_CMDLINE_LINUX=""
+GRUB_CMDLINE_LINUX_DEFAULT=""
+GRUB_GFXMODE=640x480
+```
+
+&&/clide
-The most common init systems are
+
+
+&&slide &&font27
+
+## 5.2. Init system
+
+Now we need to load the user stuff, like a network manager, the graphical user interface and so on.
+In Minimal Linux Live, this is done by some hard written scripts, which aren't very modular or extensible.
+
+[Init systems](https://en.wikipedia.org/wiki/Init) use configuration files, called service, to start a program in some way.
- [systemd](https://en.wikipedia.org/wiki/Systemd), which also aims to also provide easy system configuration
- [openrc](https://en.wikipedia.org/wiki/OpenRC), a simple and modern system
-&&/slide
+```
+[Unit]
+Description=Service
+[Service]
+Type=simple
+User=root
+ExecStart=/usr/local/sbin/script.sh
+[Install]
+WantedBy=multi-user.target
+```
+&&/font &&/slide
-&&slide
+
+&&clide
## 5.3. Package manager
Running a program is as simple as putting the executable in a nice folder, like `/usr/bin`.
-However this process isn't very convenient if you're only using a shell and more tedious if using a graphical shell.
-
-The solution is to have all programs in one location, where you can download, install and potentially update a program with one simple command, just using the program's name.
-Other good features include installing dependencies and checking if a package is tampered with.
+However this process isn't very convenient if you're only using a shell and more tedious when using a graphical shell.
-There is another "type" of package managers, those similar to `portage`, where packages are actually instructions on how to download and compile a specific version of the program.
+The solution is to use a package manager, a single command with which you can download, install and update any program from a variety of (web) sources, just by specifying it's name.
+Often a package manager supports installing dependencies and checking for package tampering.
-&&/slide
+&&/clide
@@ -1217,11 +1255,13 @@ There is another "type" of package managers, those similar to `portage`, where p
A widow system is your graphical shell: the graphical way to interact with your computer (the kernel).
It's main components are:
-- **Window manager**: the overall system with which you create, remove, resize, etc. windows. They are generally separated into two types:
- + Stacked: this is what you know, a windows are just rectangles floating about, and can be put one over each other
- + Tiled: windows take up a predefined (but changeable) portion of the screen
-- **Compositor**: windows have an unseen buffer, allowing them to be be processed beforehand. This allows for adding transparency, animation effects and more.
-- **Session manager**: application that manages the window managers, allowing to use different managers or for multiple users to start their own graphical sessions.
+&&lineb1
+
+- **Window manager**: the overall system with which you create, remove, resize and work with windows. They are generally separated into two types:
+ + *Stacked*: this is what you know, windows are just rectangles floating about, and can be put one over each other
+ + *Tiled*: windows take up a predefined (but changeable) portion of the screen
+- **Compositor**: adds an unseen window buffer, allowing additional processing, before a window is shown. This powers transparency, animation effects and more.
+- **Session manager**: graphical application that manages the window managers (outside WMs), think of it as a login window
&&/slide
@@ -1235,10 +1275,10 @@ A distribution is a complete set of of all applications that we've talked so far
Overall, there are five distributions from which 90% of all other distros are based upon:
-1. Slackware: as the oldest still maintained distro, it served as inspiration for a lot of other distros. It aims to be as simple and as close to UNIX as possible.
-2. Debian (and Ubuntu): it is the most popular distribution (if we also include Ubuntu, since they're so similar). Ubuntu aims to be modern and fancy, while Debian aims to be as stable as possible, which makes it the most popular in server usage.
-4. Gentoo: the distribution which defined non-binary software distribution
-5. Arch Linux: a very popular and modern distribution with the goal of providing the latest and greatest software.
+1. [Slackware](http://www.slackware.com/): as the oldest still maintained distro, it served as inspiration for a lot of other distros. It aims to be as simple and as close to UNIX as possible.
+2. [Debian](https://www.debian.org/) (and [Ubuntu](https://ubuntu.com/)): it is the most popular distribution (if we also include Ubuntu, since they're so similar). Ubuntu aims to be modern and fancy, while Debian aims to be as stable as possible, which makes it the most popular in server usage.
+4. [Gentoo](https://www.gentoo.org/): the distribution which defined non-binary software distribution
+5. [Arch Linux](https://archlinux.org/): a very popular and modern distribution with the goal of providing the latest and greatest software.
We haven't touched too much, but Linux distributions aren't limited to desktop or server computers.
Two more uncommon ones are: