Lecture-3
Lecture-3
Linux is widely used in hacking purpose While windows does not provide
8.
based systems. much efficiency in hacking.
9.
(1) Regular , (2) Root , (3) Service account (1) Administrator , (2) Standard ,
(3) Child , (4) Guest
Linux mint It works like windows and should be use by new comers.
enterprise
CentOS If you want to use red hat but without its trademark.
OpenSUSE It works same as Fedora but slightly older and more stable.
Arch Linux It is not for the beginners because every package has to be installed
by yourself.
Dual Boot :
https://www.onlogic.com/company/io-hub/how-to-dual-boot-windows-11-and-linux/
2. BIOS and UEFI
First, the BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface)
program kicks in once the system powers up. Usually, the BIOS contains all the code to gain
initial access to the main machine devices:
keyboard
display screen
disk drives
serial communications
However, most of these devices will have dedicated device drivers taking over once the system
boots fully.
BIOS and UEFI are firmware interfaces that computers use to boot up the operating system
(OS). Yet, the two programs differ in how they store metadata on and about the drive:
Finally, if the system passes the POST, it signals the start-up process to the next stage.
3. Boot Loader
Now, the BIOS or UEFI has run the POST to check the state of the machine. Moving on, the
BIOS/UEFI selects a boot device depending on the system configuration. Usually, there’s a
default boot order:
Hard drives
USB drives
CD drives
Of course, we can configure the BIOS or UEFI to choose the boot device in any order. Whatever
their order, the computer looks for the boot loader in these devices one by one.
In fact, a BIOS system has the boot loader located in the first sector of the boot device; this is
the MBR. It takes up the first 512 bytes on the disk. On the other hand, a UEFI system stores all
startup data in an .efi file. The file is on the EFI System Partition, which contains the boot loader.
Notably, the boot loader is a small program that loads the operating system. The main job of the
boot loader is to perform three actions with the kernel: locate on the disk, insert into memory,
and execute with the supplied options.
The following are some of the available boot loaders for a Linux system:
LILO
SYSILINUX
GRUB2
In general, once the computer finds the boot loader on a device, it will run it. Consequently, this
loads a larger and more complex program which eventually starts our operating system.
3.1. LILO
Initially, LILO (Linux Loader) was one of the most widely used Linux boot loaders. However, it
has lost favor because it has no support for multi-boot environments and for UEFI. Also, it has
limited support for new filesystems.
Officially, the developers of LILO halted its development and support in December 2015. Hence,
the Linux Loader is old and mostly obsolete.
3.2. SYSLINUX
Equally, SYSLINUX is a boot loader for the Linux operating system, which runs on a FAT
filesystem, typical for a Windows system. In short, its goal is to ease the process of installing
Linux for the first time.
FAT
ext2
ext3
ext4
In addition, SYSLINUX can support Btrfs and XFS filesystems with some constraints.
3.3. GRUB2
Despite the many choices, almost all (non-embedded) modern Linux distributions use GRUB
(GRand Unified Boot Loader) because it’s very feature-rich:
sudo grub-install -V
4. Kernel
After going through BIOS or UEFI, POST, and using a boot loader to initiate the kernel, the
operating system now controls access to our computer resources.
5. Systemd
To reiterate, the kernel initiates the init process, which starts the parent process. Here, the
parent of all Linux processes is Systemd, which replaces the old SysVinit process. Following the
booting steps, Systemd performs a range of tasks:
6. Run Levels
In Linux, the run level stands for the current state of the operating system. Run levels define
which system services are running. Previously, SysVinit identified run levels by number.
However, .target files now replace run levels in Systemd.
Further, Systemd activates the default.target unit by default when the system boots. Let’s check
our default target:
# systemctl get-default
graphical.target
Copy
Now, let’s see the link between run level numbers and targets:
In addition, we can change the target (run level) while the system runs. This change entails that
only services and other units defined under that target will now run on the system.
For example, to switch to run level 3 from run level 5, we can run the following command:
Kernal:
✽ It is the core component of UNIX operating system.
✽ It is responsible to execute our commands.
✽ It is responsible to interact with hardware components.
✽ Memory allocation and processor allocation will takes care by kernal