0% found this document useful (0 votes)
28 views

C6. Boot Process and System Monitoring

The document discusses the Linux boot process and system monitoring tools. It describes the four phases of booting: BIOS/UEFI initialization, boot loader loading, kernel loading, and init/systemd starting services. It also covers console-based monitoring tools like top, free, df, and checking log files. Finally, it mentions graphical tools like System Monitor, Conky, and enterprise server monitoring solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

C6. Boot Process and System Monitoring

The document discusses the Linux boot process and system monitoring tools. It describes the four phases of booting: BIOS/UEFI initialization, boot loader loading, kernel loading, and init/systemd starting services. It also covers console-based monitoring tools like top, free, df, and checking log files. Finally, it mentions graphical tools like System Monitor, Conky, and enterprise server monitoring solutions.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

LINUX AND OPEN SOURCE SOFTWARE

CHAPTER VI.
BOOT PROCESS AND SYSTEM MONITORING

Department of Computer Engineering and Electronics

1-1
Main contents
➢Boot Loading Process
➢Console-Based Monitoring
➢Graphical Process and System-Management Tools

1-2
Boot Loading Process

• There are 4 phases to starting up the system:


1. BIOS (replaced by UEFI recently)
2. Boot loader
3. Kernel
4. Upstart (which manages system tasks and services are configured at /etc/init)

1-3
Boot Loading Process

❖ BIOS
• When the computer begins execution, it starts by executing this
code, which is also called the firmware, as it is normally stored in a
permanent form of memory, such as ROM, on the computer's
motherboard.
• This code must initialize the hardware on the motherboard other
than the CPU, and obtain the code for the next step, the boot
loader. Modern computers provide several possibilities for the boot
loader and the choice is normally set on the BIOS startup screen.
• The BIOS gets the system ready to load and run the software that
we recognize as the operating system. As a last step, the BIOS code
looks for a special program known as the boot loader or boot code.

1-4
Boot Loading Process

❖ Boot Loader
• A boot loader stored in the first sector of a hard disk, the Master Boot
Record, or MBR. This may be GRUB or LILO or yaboot or others.
• A boot loader stored on some other storage device, such as a CDR or USB
flash drive.
• A boot loader which uses the network, such as the Pre-Execution
Environment (PXE). This code is normally stored on a ROM on the
networking card itself.
• The need for the initial parts of the bootloader code on the first part of a
storage medium explains why some hard drives are 'bootable' and others
are not.
• If the BIOS detects a hardware problem, the boot process fails, and the
BIOS generates a few beeps from the system speaker.

1-5
Boot Loading Process

❖ Boot Loader
• The MBR contains the boot loader code and the partition table.
• It only requires 4096 Bits (512 bytes) of storage to store the GRUB and
Linux booting files inside the MBR partition. The GPT partitioning scheme
replaces the MBR table in the modern era.
• Unified Extensible Firmware Interface (UEFI) serves a similar role to BIOS
and has replaced BIOS in most modern systems. For most end users, the
difference is negligible, except that if you have a UEFI computer, you may
need to do some research to install Ubuntu.
• The boot loader locates the Linux kernel on the disk and loads it into
memory. After that task is completed, the boot loader passes control of
the system to the Linux kernel.

1-6
Boot Loading Process

❖ Loading Linux Kernel


• Kernel manages the system resources.
• Linux refers to each application as a process, and the kernel assigns each
process a number called a process ID (PID).
• Traditionally, the Linux kernel loads and runs a process named init,
(e.g., SysVinit). Then it starts every subsequent process.
• init has been replaced by newer options such as Upstart then systemd in
Ubuntu. systemd is the mother of all processes and is responsible for
bringing the Linux kernel up to a state where work can be done.
• systemd starts by mounting the file systems that are defined in /etc/fstab
• systemd configuration file at /etc/systemd/system/default.target

1-7
SystemV runlevels

1-8
Boot Loading Process

❖ Loading Linux Kernel

1-9
https://www.techsupportpk.com/2015/05/linux-systemd-essentials-working-with-services-units-and-the-journal.html
Boot Loading Process

❖ Loading Linux Kernel

1-10
https://www.techsupportpk.com/2015/05/linux-systemd-essentials-working-with-services-units-and-the-journal.html
Boot Loading Process

❖ Running Services in Boot Process


• After the base services are loaded and running, systemd will also
load any user-defined services. All of these services are called units.
To list every available unit file on your system, use
$ systemctl list-unit-files

1-11
Boot Loading Process

❖ Running Services in Boot Process


$ systemctl list-unit-files

1-12
Boot Loading Process

❖ Running Services in Boot Process

1-13
Boot Loading Process

❖ Running Services in Boot Process

• We use graphical configuration: Startup Applications Preferences


in Ubuntu 1-14
Console-Based Monitoring

• Through the /proc file system, you can communicate directly with
the kernel to get a deep view of what is currently happening.
• Developers tend to use the /proc file system as a way of extracting
information from the kernel and for their programs to manipulate
that information into human-readable formats.
• Whenever an application or a command is launched, either from the
command line or a clicked icon, the process that comes from the
kernel is assigned an identification number called a process ID
(PID).

1-15
Console-Based Monitoring

1-16
Console-Based Monitoring

1-17
Console-Based Monitoring

• top and htop commands for monitoring resource usage

1-18
Console-Based Monitoring

• free command utility displays the amount of free and used memory
in the system, in kilobytes

• df command

1-19
Console-Based Monitoring

❖ Checking Log Files


• Most log files can be found in /var/log/ or its subdirectories.

1-20
Console-Based Monitoring

❖ Checking Log Files


• Most log files can be found in /var/log/ or its subdirectories.

1-21
Graphical Process and System-Management Tools

❖ System Monitor

1-22
Graphical Process and System-Management Tools

❖ Conky

1-23
Graphical Process and System-Management Tools

❖ Auzia Conky

1-24
Graphical Process and System-Management Tools

❖ Enterprise Server Monitoring


• Servers used in enterprise situations require extreme uptime.
Monitoring is vital to know how your system is performing and to
have observability into the general health of your system
components and services.
• Some enterprise tools
o Datadog
o Nagios
o New Relic
o SignalFx
o Splunk
o Zabbix

1-25
Remarks

➢Remarks:
▪ This lecturer provides fundamentals of boot process
▪ Review chapter 15, 16 in textbook
▪ Practice with example commands and tools

1-26

You might also like