🐧
Linux
  • syllabus
  • unit 1-Introduction
    • Unit I: Introduction to Linux
    • 2. Advantages of Linux over other operating systems
    • 3.File systems
    • 4.Culture of free software
  • unit 2-Basics of Linux
    • 1.Commands
    • 2.shell
    • 3.Text Editors
    • 4.The file system of Linux
    • 5.Directories and their special purpose
    • 6.permission
  • unit 3-Installation
    • 1. Partitioning
    • 2. Installation of Linux
    • 3. Troubleshooting of installation
  • unit 4-System Administration
    • 1.Root login
    • 2.Superuser
    • 3.Configuration of hardware with kudzu
    • 4. Checking System Space:
    • 5. Monitoring System Performance:
    • 6. Working with a File System:
    • 7.Configuring modules
    • 8.jail shell
    • 9.awk
    • 10.sed
  • unit 5-User Management
    • 1.Creating user accounts
    • 2.Setting user defaults
    • 3.Providing support to users
    • 4.Modifying accounts
    • 5.Deleting user accounts
    • 6.Checking disk quotas
    • 7.Sending mail to all users
  • unit 6-Security and System Handling
    • 1.Understanding shell scripts
    • 2.System startup and shutdown
    • 3.Scheduling system tasks
    • 4.Backing up and restoring
    • 5.Password protection
    • 6.File security
  • unit 7-Setting up a Web Server
    • 1.Introduction to a web server
    • 2.Starting the Apache webserver
    • 3.Configuring the Apache webserver
    • 4.Monitoring server activities
  • unit 8-Setting up DHCP and NIS
    • 1.Introduction to DHCP
    • 2.Setting up DHCP Server
    • 3.Setting up DHCP Client
    • 4.Understand NIS
  • unit 9-Setting up a Database Server
    • 1.Configuring database server
    • 2.Checking the status
    • 3.Working with database
  • unit 10-Setting up DNS
    • 1.Introduction to DNS
    • 2.Setting up DNS and configuration
    • 3.Querying DNS
  • unit 11-ISP Simulation
    • 1.Integration of servers
    • 2.DNS, Web, Email, etc
  • fullform
  • Assignment
  • Practicals
    • 1.Linux utilities
    • 2.OS installation project work
    • 3.User management using a terminal
    • 4.Security level access control list
    • 1.Network setting
    • 2.Server configuration of DHCP, DNS, Database server
    • 3.Demonstration of the web, mail, file server
  • imp questions
    • short-notes
    • unit 1
    • unit 2
    • unit 3
    • unit 4
    • unit 5
    • unit 6
    • unit 7
    • unit 8
    • unit 9
    • unit 10
    • unit 11
    • unit ii
  • services
    • create_service
  • Viva+Practical
    • VIVA questions
    • Practical questions
Powered by GitBook
On this page

Was this helpful?

  1. unit 3-Installation

2. Installation of Linux

Previous1. PartitioningNext3. Troubleshooting of installation

Last updated 1 year ago

Was this helpful?

Before we start with the installation of Linux, let's first understand the basics of Operating system boot process.

Boot Process

The boot process is the process by which a computer starts up and initializes the operating system on startup. The linux boot process consists of the following steps:

  1. System Startup/Hardware initialization: The first step in the boot process is the system startup, which involves initializing the hardware components. The BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface) firmware is responsible for this step. It performs a power-on self-test (POST) to check the hardware components and then loads the bootloader. BIOS loads and executes the MBR boot loader.

  2. Bootloader stage 1: The bootloader is a small program that loads the operating system. It is stored in the MBR (Master Boot Record) of the hard drive. It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda. MBR loads and executes the GRUB boot loader. MBR is less than 512 bytes in size. This has three components

  • primary boot loader info in 1st 446 bytes

  • partition table info in next 64 bytes

  • mbr validation check in last 2 bytes.

  1. **Bootloader stage 2:**The bootloader stage 2 is responsible for loading the kernel. It is stored in the /boot directory of the hard drive.GRUB has the knowledge of the filesystem. If you have multiple kernel images installed on your system, you can choose which one to be executed.GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it loads the default kernel image as specified in the grub configuration file. GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t understand filesystem). GRUB loads and executes Kernel and initrd images.

  2. Kernel: Kernel executes the /sbin/init program.Since init was the 1st program to be executed by Linux Kernel, it has the process id (PID) of 1. Do a ‘ps -ef | grep init’ and check the pid. The kernel is stored in the /boot directory of the hard drive.

  3. Init: The init process is the first process that runs when Linux boots. It is responsible for starting all other processes on the system. The init process is stored in the /sbin directory of the hard drive. Init Looks at the /etc/inittab file to decide the Linux run level. Following are the available run levels

  • 0 – halt

  • 1 – Single user mode

  • 2 – Multiuser, without NFS

  • 3 – Full multiuser mode

  • 4 – unused

  • 5 – X11

  • 6 – reboot

  1. User Prompt: Once the init process has started all other processes, it displays a user prompt on the screen. The user prompt is stored in the /bin directory of the hard drive.

BIOS (Basic Input/Output System) and UEFI (Unified Extensible Firmware Interface)

They are firmware interfaces that play a fundamental role in the boot process of a computer. They are responsible for initializing hardware components, performing a power-on self-test (POST), and starting the bootloader, which then loads the operating system. Below, I'll explain both BIOS and UEFI in detail:

Here's a table outlining the key differences between BIOS and UEFI:

Feature
BIOS
UEFI

Definition

Legacy firmware interface

Modern firmware interface

Storage Location

ROM (Read-Only Memory) chip

Flash memory (non-volatile) on the motherboard

Boot Process

16-bit real mode

Supports both 32-bit and 64-bit modes

Partitioning Scheme

MBR (Master Boot Record)

GPT (GUID(Globally Unique Identifier) Partition Table) for larger drive support

User Interface

Text-based

Graphical and text-based user interfaces

Bootloader Support

Uses a Master Boot Record (MBR) and Legacy BIOS Boot Mode

Supports EFI bootloaders with an EFI System Partition (ESP)

Hardware Initialization

Basic hardware initialization

More extensive hardware initialization, including USB devices

Legacy Support

Limited support for modern hardware

Full support for modern hardware and peripherals

Boot Options

Limited boot options

Enhanced boot options and a built-in boot manager

Configuration

Accessed by function keys (e.g., F2, Del) during boot

Accessed via a graphical UEFI setup utility

Updates

Firmware updates typically require a separate utility

Supports in-place firmware updates

Secure Boot

Not supported

Supports Secure Boot, which verifies bootloader and OS components

Flexibility

Less extensible and feature-rich

More extensible with driver support, network capabilities, and pre-boot applications

Partition Size Limits

Limited to 2.2 terabytes (MBR)

Supports larger hard drives and partitions

Operating Systems

Compatible with older OSes designed for BIOS

Requires EFI-compatible operating systems

While both BIOS and UEFI serve the same fundamental purpose of initializing hardware and booting the computer, UEFI offers several advantages, including greater hardware compatibility, support for larger drives, a user-friendly interface, and enhanced security features like Secure Boot. Many modern computers use UEFI firmware, but some provide legacy BIOS support for compatibility with older operating systems.

UEFI is considered a replacement for BIOS due to its improved capabilities, compatibility with modern hardware, and enhanced security features. Many newer computers come with UEFI firmware, although some still offer compatibility mode to boot using BIOS. The choice between BIOS and UEFI depends on the computer's hardware and the user's requirements.

Difference between LILO and GNU GRUB:

Features
GNU GRUB
LILO

Full Form

GNU GRand Unified Bootloader

Linux Loader

Definition

A boot loader offered by the GNU project is called GRUB.

It is a Linux bootloader that replaced loadlin as the default boot loader for most Linux OS in the years following its success.

Introduction

It was introduced in 1995.

Werner Almesberger was the first to introduce the LILO from 1992 to 1997.

Supporting OS

It supports multiple OS, including Windows, macOS, Linux, Unix, BSD, and Solaris.

It supports only a single operating system which is Linux OS.

Complexity

It is more complex than LILO.

It is simple and easy to use.

GUI Menu Choice

It includes a GUI menu choice.

It doesn't include a GUI menu choice.

Development

It is developed by GNU Project.

Werner Almesberger, John Coffman and Joachim Wiedorn are three developers that developed LILO.

Type

It is a new default boot loader.

It is an old default boot loader.

Network Booting

It supports network booting.

It doesn't support network booting.

Note:

BIOS (or UEFI): These are responsible for starting your computer, checking hardware, and finding the bootloader.

LILO (or GNU GRUB): These are bootloaders that help load the Linux operating system after BIOS/UEFI. They let you choose which operating system or configuration to run at startup.

Kernel: This is the core of the operating system. It manages the hardware, runs user programs, and maintains the overall security and integrity of the system.

Init: This is the first process that runs when Linux boots. It is responsible for starting all other processes on the system.

Runlevels: These are different modes of operation in Linux. Each runlevel has a different set of services or daemons that are started or stopped when the system enters a particular runlevel.

Installing Linux

Installing a Linux operating system can vary slightly depending on the distribution (distro) you choose, but the general process remains consistent. Here's a step-by-step guide to installing a Linux OS on your computer: 1. Choose a Linux Distribution:

  • Select a Linux distribution (e.g., Ubuntu, Fedora, CentOS, Debian) that suits your needs. Consider factors such as your skill level, desktop environment preference, and intended use (desktop, server, development, etc.).

2. Prepare Bootable Media:

  • Download the ISO image of the Linux distribution you've chosen from the official website.

3. Back Up Your Data:

  • Ensure you have a backup of any important data on your computer. The installation process may involve partitioning and formatting your hard drive.

4. Insert Bootable Media:

  • Insert the bootable USB drive or DVD into your computer's USB port or optical drive.

5. Boot from the Installation Media:

  • Restart your computer and access the BIOS/UEFI settings by pressing a specific key (e.g., F2, Del, Esc) during the boot process. The key varies depending on your computer's manufacturer.

  • In the BIOS/UEFI settings, change the boot order to prioritize the USB drive or DVD drive, depending on where you created the bootable media.

  • Save the changes and exit the BIOS/UEFI settings.

6. Start the Installation:

  • The computer should now boot from the installation media, and you'll see the Linux distribution's installation menu.

7. Select Language and Region:

8. Configure Keyboard Layout:

9. Configure Network Settings:

  • If you're connected to the internet, you can configure network settings during the installation process.

10. Choose Installation Type: Select the installation type based on your preference:

  • Erase Disk and Install Linux: This option will erase the entire disk and install Linux as the sole operating system.

  • Install Alongside Another OS: If you have another operating system (e.g., Windows) installed, you can choose to install Linux alongside it.

11. Partition the Disk (if applicable):

  • If you selected the "Custom" or "Something Else" option, you'll need to create partitions for the Linux installation. This includes the root (/) partition, swap partition (recommended), and potentially a home (/home) partition.

12. Set User and Password:

13. Complete the Installation:

  • Follow the on-screen prompts to complete the installation. This may include selecting your time zone, configuring additional software (e.g., updates, third-party drivers), and reviewing installation settings.

14. Reboot:

  • Once the installation is complete, remove the installation media and reboot your computer. Now you can Log in using the user account credentials you created during installation

Create a bootable USB flash drive or DVD from the ISO image using a tool like Rufus (Windows) or dd (Linux).

Select the "Install" option to begin the installation process.

Choose your preferred language and region settings.

Configure the keyboard layout based on your region and preferences.

Something else: Allows for manual partitioning and more advanced options.

Be cautious when partitioning, as it can affect your data. Backup important files before proceeding.

Create a user account with a username and password. This account will have administrative privileges.

boot process of linux