Linux boot process. Day -6 (Linux workshop)
Hello everyone!! Prathmesh here,Welcome back to another blog. In this blog, I will cover all the relevant points that have been covered in today's Linux Workshop, conducted by Pranav Jambare e at Dr.Babasaheb Ambedkar Technological University, Lonere.
Booting Process:
The booting process in Linux is the process of starting up the operating system and making it ready to use.
Stages in the booting process are
BIOS:
BIOS stands for Basic Input/Output System.
It is firmware that is built into the computer motherboard and is responsible for initializing the hardware components during the booting process.
MBR:
MBR stands for Master Boot Record.
It is a small program that is stored in the first sector of a hard disk or other storage device.
The MBR contains the partition table, which describes how the disk is partitioned, and the bootloader, which is responsible for loading the operating system.
GRUB:
GRUB stands for GRand Unified Bootloader.
It is a popular bootloader used in Linux systems.
It is responsible for loading the kernel into memory and starting the booting process.
GRUB provides a menu interface that allows the user to choose which operating system or kernel to boot, and also allows the user to specify boot options such as kernel parameters.
Kernel:
The kernel is a core component of the Linux operating system.
During the booting process, the kernel is loaded into memory by the bootloader and is responsible for initializing the hardware and starting the system services and user applications.
The kernel is responsible for managing system resources such as memory, CPU, and input/output devices.
RUN LEVEL :
Runlevel is a mode of operation in a Unix or Linux operating system that determines which system services are started or stopped.
Syntax -> who -r
This command is used to display the current run level of a Linux system during the booting process.
Syntax -> systemctl set-default multi-user.target
This command in the system is used to configure the default run level.
Syntax -> systemctl get-default
This command is used to retrieve the default target.
Modes of run level are:
-> Runlevel 0: System shutdown.
-> Runlevel 1: Single-user mode.
-> Runlevel 2: Multi-user mode without networking.
-> Runlevel 3: Multi-user mode with networking.
-> Runlevel 4: User-definable.
-> Runlevel 5: Graphical user interface (GUI) mode.
->Runlevel 6: System reboot.
ACL:
It flexibly manages permissions on files and directories.
ACLs allow for additional access rules to be set for specific users or groups.
With ACLs, you can assign permissions to multiple users and groups beyond the file's owner and owning group.
ACLs can be set using the syntax- setfacl -m u:<username>:<permissions> <directory_name>
command, which allows administrators to add, modify, or remove ACL entries on files and directories.
The syntax- getfacl <filename/dir_name>
the command is used for viewing ACLs on a file or directory.
To remove the ACLs, we use the syntax- setfacl -x u:<username>: <filename> .
Example- setfacl -m u:testuser:rwx TestACL/
then,
ls -ld
O/P- drwxrwxr-x+ 2 root root 4096 Jul 18 12:20 TestACL/
then,
getfacl TestACL/
O/P- # file: TestACL
# owner: root
# group: root
user::rwx
user::testuser::rwx
group::r-x
mask::rwx
other::r-x
then,
setfacl -x u:testuser: TestACL/ //To remove a single user
then again,
getfacl TestACL/
O/P- user::rwx
group::r-x
mask::r-x
other::r-x
then,
Processes:
Processes in Linux are essential components of the operating system that execute programs and manage system resources.
A process is a running instance of a program, representing the execution of a specific task or application on a Linux system.
Each process operates independently, having its memory space, execution context, and system resources.
Types of Processes :-
Parent Process :- A parent process is a process that has created one or more child processes.
Child Process :- A child process is a process that is created by another process known as the parent process.
Orphan Process :- The orphan process can occur in Linux when a parent process terminates unexpectedly or fails to properly manage the child process.
Zombie Process :- Zombie process can occur in Linux when a parent process fails to properly manage its child processes and can consume system resources if not properly terminated.
These topics are coverd on Day 6. I hope you enjoy this blog.
Thanks you for reading blog.........!!!!!