Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views25 pages

Linux Unit3

The document provides detailed instructions for partitioning a 64 GB USB drive using Command Prompt, Disk Management, and Linux commands, emphasizing the importance of data backup before proceeding. It also outlines the Linux installation process, including boot media preparation, installation steps, and configuration settings. Additionally, it compares BIOS and UEFI firmware interfaces, as well as GNU GRUB and LILO bootloaders.

Uploaded by

paddeytchicken
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)
11 views25 pages

Linux Unit3

The document provides detailed instructions for partitioning a 64 GB USB drive using Command Prompt, Disk Management, and Linux commands, emphasizing the importance of data backup before proceeding. It also outlines the Linux installation process, including boot media preparation, installation steps, and configuration settings. Additionally, it compares BIOS and UEFI firmware interfaces, as well as GNU GRUB and LILO bootloaders.

Uploaded by

paddeytchicken
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/ 25

Unit-3 Installation

Mr. Ranjan Raj Regmi

2024/04/08 1
Partitioning

2024/04/08 2
Linux

Partitioning a 64 GB USB Drive into Two Partitions Using CMD


Note: This process will erase all data on the USB drive. Backup important data first.

1. Open Command Prompt as Administrator:


-Press Win + X, then select "Windows Terminal (Admin)" or "Command Prompt (Admin)".
-Alternatively, search for "Command Prompt" or "cmd", right-click it, and choose "Run as
administrator".

2. Launch Diskpart:
-Type diskpart and press Enter.

3. List Disks:
-Type list disk and press Enter to display all connected disks.

3
Linux

4. Select the USB Drive:


-Identify your USB drive from the list and note its disk number.
-Type select disk X (replace X with your USB drive’s number) and press Enter.

5. Create the First Partition (10 GB):


-Type create partition primary size=10000 and press Enter.

6. Assign a Drive Letter to the First Partition (Optional):


-Type assign letter=D (replace D with your desired letter) and press Enter.

7. Create the Second Partition (Remaining Space):


-Type create partition primary and press Enter.

4
Linux

8. Assign a Drive Letter to the Second Partition (Optional):


-Type assign letter=E (replace E with your desired letter) and press Enter.

9. Format Both Partitions:


-For the first partition, type format fs=ntfs quick and press Enter.
-For the second partition, type format fs=ntfs quick and press Enter.

10. Exit Diskpart:


-Type exit and press Enter.

11. Close Command Prompt:


-Type exit again to close the Command Prompt.

You now have two partitions on your 64 GB USB drive: one with 10 GB and another with the remaining space.

5
Linux

Creating a New Volume from Unallocated Space Using CMD


Note: This process will modify existing partitions and volumes. Ensure you have backed up any important data.

1. Open Command Prompt as Administrator:


-Search for "cmd" or "Command Prompt" in the Windows search bar.
-Right-click on it and select "Run as administrator.“

2. Launch DiskPart:
-Type diskpart and press Enter.

3. Select the Disk:


-Type list disk and press Enter to see all available disks.
-Identify your USB drive and type select disk X (replace X with the disk number) and press Enter.

4. List Volumes on the Selected Disk:


-Type list volume and press Enter to display all volumes on the selected disk.
-Identify the volume you want to shrink, then type select volume X (replace X with the volume number) and press Enter. 6
Linux

5. Shrink the Volume:


-To shrink the volume by 10 GB, type: shrink desired=10240
and press Enter. This creates unallocated space of approximately 10 GB.

6. Create a New Partition:


-Type: create partition primary size=10240
and press Enter. This creates a new primary partition using the unallocated space.

7. Format the New Partition:


-To format the new partition as NTFS, type: format quick fs=ntfs label="New Partition"
and press Enter. Replace "New Partition" with your desired label if needed.

8. Assign a Drive Letter (Optional):


-To assign a drive letter to the new partition, type: assign letter=Z
and press Enter. Replace Z with the letter you want to assign.

9. Exit DiskPart:
-Type exit and press Enter to exit DiskPart.
7
You now have a new 10 GB partition created from the unallocated space on your disk, ready for use.
Linux

• Extend back to original volume

8
Linux

Creating Two Partitions on a 64GB USB Drive Using Windows Disk Management
Note: Ensure you have backed up any important data before modifying partitions.

1. Insert the USB Drive:


-Plug your 64GB USB drive into your Windows computer.
2. Open Disk Management:
-Press Win + X and select "Disk Management".
-Alternatively, right-click on the "Start" button and choose "Disk Management".
3. Identify the USB Drive:
-In the Disk Management window, locate your USB drive, listed as a removable disk.
4. Shrink the Existing Partition (if applicable):
-If the USB drive has a single partition occupying all space, right-click on it and choose
"Shrink Volume".
-Specify the amount to shrink (e.g., 10GB for the first partition) and follow the on-screen
instructions to create unallocated space. 9
Linux

5. Create the First Partition:


-Right-click on the newly created unallocated space and select "New Simple Volume".
-Follow the New Simple Volume Wizard:
Specify the size (e.g., 10GB).
Assign a drive letter.
Choose a filesystem format (e.g., NTFS).
-Complete the wizard to create the first partition.

6. Create the Second Partition:


-Right-click on the remaining unallocated space and select "New Simple Volume" again.
-Follow the wizard:
Use the remaining space.
Assign a drive letter.
Choose a filesystem format.
10
-Complete the wizard to create the second partition.
Linux

7. Finish the Process:


-Both partitions will now be listed in Disk Management with their respective drive letters.
You can access and use them as separate drives in Windows.
This method allows you to easily manage partitions using a graphical interface.

11
Linux

Creating Two Partitions on a 64GB USB Drive in Red Hat Linux


Note: Ensure you have backed up any important data before modifying partitions.

Method 1: Using fdisk Command (Command-Line)


1.Open a Terminal:
-Launch a terminal window on your Red Hat Linux system.

2.Identify Your USB Drive:


-Run lsblk or fdisk -l to list available storage devices and identify your USB drive, typically
listed as /dev/sdX (where X is a letter representing the drive).

3.Partition the Drive:


-Execute sudo fdisk /dev/sdX (replace X with your USB drive letter).

12
Linux

4.Create Partitions:
-Type n to create a new partition.
-Follow prompts to specify partition type (usually primary), starting sector, and size (e.g.,
10GB) for the first partition.
-Repeat to create the second partition with the remaining space.
-Type w to write changes and exit fdisk.

5.Format the Partitions:


-Format the partitions using mkfs:
sudo mkfs -t ext4 /dev/sdX1
sudo mkfs -t ext4 /dev/sdX2

13
Linux

Method 2: Using gnome-disks (Graphical Utility)


1.Open Disks Utility:
-Press the Super key (Windows key), type "Disks," and select the application.

2.Select Your USB Drive:


-Choose your USB drive from the list on the left side.

3.Create Partitions:
-Click the gear icon ⚙️) and select "Format Partition."
-Specify the size (e.g., 10GB) and filesystem type (e.g., ext4) for the first partition, then click "Format."
-Repeat for the second partition, using the remaining space.

4.Apply Changes:
-Click the "Play" button (▶️) in the upper-right corner to apply changes.

14
Installation of Linux

2024/04/08 15
Linux

Installation of Linux
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:

16
Linux

Linux Boot Process Overview

1.System Startup/Hardware Initialization:


-BIOS/UEFI Firmware: Initializes hardware components.
-Power-On Self-Test (POST): Checks hardware components.
-Bootloader Loading: BIOS/UEFI loads and executes the Master Boot Record (MBR)
bootloader.

2.Bootloader Stage 1:
-Location: Stored in the MBR of the hard drive (first sector).
-Size: Less than 512 bytes.
-Components:
Primary Boot Loader Info: First 446 bytes.
Partition Table Info: Next 64 bytes.
MBR Validation Check: Last 2 bytes.
-Function: Loads and executes the GRUB bootloader.

17
Linux

3.Bootloader Stage 2:
-Location: Stored in the /boot directory.
-Function:
GRUB: Displays a splash screen and waits for user input.
Filesystem Knowledge: Can handle multiple kernel images.
Default Kernel: Loads default kernel if no input is provided.
-Process: GRUB loads and executes kernel and initrd images.

4.Kernel:
-Location: Stored in the /boot directory.
-Function: Executes the /sbin/init program.
-Process ID: init has PID 1. Verify with ps -ef | grep init.

18
Linux

5.Init:
-Location: Stored in the /sbin directory.
-Function:
-First Process: Responsible for starting all other processes.
-Run Levels: Defined in the /etc/inittab file.
0: Halt
1: Single user mode
2: Multiuser, without NFS
3: Full multiuser mode
4: Unused
5: X11
6: Reboot

6.User Prompt:
-Location: Stored in the /bin directory.
-Function: Displays a user prompt after init has started all other processes.

This boot process outlines how the system initializes, loads, and starts the operating system
and user environment. 19
Linux

Differences
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
GPT (GUID(Globally Unique Identifier) Partition
Partitioning Scheme MBR (Master Boot Record)
Table) for larger drive support
User Interface Text-based Graphical and text-based user interfaces
Uses a Master Boot Record (MBR) and Legacy BIOS Supports EFI bootloaders with an EFI System
Bootloader Support
Boot Mode Partition (ESP)
More extensive hardware initialization, including
Hardware Initialization Basic hardware initialization
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

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


Configuration Accessed via a graphical UEFI setup utility
boot
Firmware updates typically require a separate
Updates Supports in-place firmware updates
utility

20
Linux

Differences
Features GNU GRUB LILO
Full Form GNU GRand Unified Bootloader Linux Loader

It is a Linux bootloader that replaced


A boot loader offered by the GNU project is
Definition loadlin as the default boot loader for most
called GRUB.
Linux OS in the years following its success.

Werner Almesberger was the first to


Introduction It was introduced in 1995.
introduce the LILO from 1992 to 1997.
It supports multiple OS, including
It supports only a single operating system
Supporting OS Windows, macOS, Linux, Unix, BSD, and
which is Linux OS.
Solaris.
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.
Werner Almesberger, John Coffman and
Development It is developed by GNU Project. 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.

21
Linux

Linux Installation Guide


1.Choose a Linux Distribution:
-Select a distribution (e.g., Ubuntu, Fedora, CentOS, Debian) based on your needs, skill level,
and intended use (desktop, server, development).

2.Prepare Bootable Media:


-Download ISO: Obtain the ISO image from the official website of the chosen distribution.
-Create Bootable Media: Use tools like Rufus (Windows) or dd (Linux) to create a bootable
USB flash drive or DVD.

3.Back Up Your Data:


-Ensure important data is backed up before proceeding, as the installation may involve
partitioning and formatting your hard drive.

4.Insert Bootable Media:


-Plug in the bootable USB drive or insert the DVD into your computer's USB port or optical
drive.
22
Linux

5.Boot from the Installation Media:


-Access BIOS/UEFI: Restart your computer and press a specific key (e.g., F2, Del, Esc) to
enter BIOS/UEFI settings.
-Change Boot Order: Set the USB drive or DVD as the primary boot device.
-Save and Exit: Apply changes and exit BIOS/UEFI settings.

6.Start the Installation:


-Boot from the installation media and select the "Install" option from the Linux distribution’s
menu.

7.Select Language and Region:


-Choose your preferred language and region settings.

8.Configure Keyboard Layout:


-Set up the keyboard layout according to your region and preferences.

9.Configure Network Settings:


-Configure network settings if connected to the internet during installation. 23
Linux

10.Choose Installation Type:


-Erase Disk and Install Linux: Erase the entire disk and install Linux as the sole operating
system.
-Install Alongside Another OS: Install Linux alongside an existing operating system (e.g.,
Windows).
-Something Else: Manually partition the disk for advanced configuration.

11.Partition the Disk (if applicable):


-Manual Partitioning: Create partitions for root (/), swap (recommended), and possibly
/home.
-Caution: Be careful with partitioning to avoid data loss. Backup important files before
proceeding.

12.Set User and Password:


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

24
Linux

13.Complete the Installation:


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

14.Reboot:
-Remove the installation media and reboot your computer. Log in using the credentials
created during installation.

25

You might also like