Operating System Installation
I am a Student, who finds beauty in simple things. I like to teach sometimes.
The installation of an operating system (OS) is a fundamental procedure for preparing a computer for use. This guide provides a technically detailed walkthrough of the process, covering OS selection, bootable media creation, firmware interface access, installation steps, and an introduction to dual-booting.
Operating System Selection: Linux and Windows
The choice of an operating system significantly influences a system's capabilities and user experience. The two prevalent options for personal computers are Linux distributions and Microsoft Windows.
Linux:
Linux refers to a family of Unix-like operating systems that use the Linux kernel. It is open-source, offering a high degree of customization. Various distributions (e.g., Ubuntu, Fedora, Debian) package the kernel with different software suites and package managers (e.g., APT, DNF, Pacman).
Architecture: Linux supports a wide array of processor architectures, including x86-64, ARM, and PowerPC. Its kernel is monolithic, but with modular design, allowing drivers and features to be loaded or unloaded at runtime.
File Systems: Linux supports numerous file systems, such as ext4, Btrfs, XFS, and ZFS. Ext4 is a common default, offering journaling for improved data integrity. Btrfs and ZFS provide advanced features like snapshots and copy-on-write.
Use Cases: Linux is widely used in servers, embedded systems, and by software developers and users who prefer an open and configurable environment. Its command-line interface (CLI), typically Bash or Zsh, offers powerful scripting and system administration capabilities. Graphical user interfaces (GUIs) are provided by desktop environments like GNOME, KDE Plasma, and XFCE.
Software Management: Package managers handle the installation, updating, and removal of software from repositories. These systems manage dependencies automatically.
Microsoft Windows:
Windows is a family of proprietary operating systems developed by Microsoft. It is the dominant OS in the desktop and laptop markets.
Architecture: Modern Windows versions primarily target the x86-64 architecture. The Windows NT kernel, a hybrid kernel, forms the core of the operating system. It separates user-mode and kernel-mode operations for stability and security.
File Systems: NTFS (New Technology File System) is the primary file system for Windows. It supports features like access control lists (ACLs), file compression, encryption (BitLocker), and journaling. ReFS (Resilient File System) is available for server editions, offering enhanced data integrity features.
Use Cases: Windows is prevalent in home, gaming, and business environments due to its extensive software compatibility, user-friendly interface, and strong support for commercial applications and hardware.
Software Management: Software installation traditionally relies on executable installers (.exe, .msi). The Microsoft Store and package managers like Chocolatey or winget are increasingly used for more centralized software management.
The selection between Linux and Windows depends on factors like required software compatibility, hardware support, technical proficiency, and philosophical preferences regarding open-source versus proprietary software.
Creating a Bootable USB Drive with Ventoy
To install an OS, a bootable installation medium is required. USB drives are the standard for this purpose. Ventoy is a utility that simplifies the creation of bootable USB drives, particularly for multiple OS images.
Ventoy Functionality:
Ventoy installs itself onto a USB drive, partitioning it into two sections. The first, smaller partition contains the Ventoy boot files. The second, larger partition is formatted as exFAT (by default, but can be changed) and is where users copy OS ISO, WIM, IMG, VHD(x), and EFI files directly. There is no need to extract these image files.
When the computer boots from the Ventoy USB drive, Ventoy presents a menu listing all the bootable image files found on the second partition. The user can then select an image, and Ventoy will load it into RAM and boot from it as if it were the only image on a conventionally prepared bootable drive.
Advantages of Ventoy:
Multi-boot Support: A single USB drive can hold numerous OS installer images of different types.
No Repeated Formatting: ISO files can be added or removed by simply copying them to or deleting them from the USB drive, without reformatting the drive each time an OS image needs to be changed.
Broad OS Compatibility: Ventoy supports a vast range of Linux distributions, Windows versions, and other utilities.
BIOS and UEFI Support: It is compatible with both legacy BIOS and modern UEFI firmware, supporting Secure Boot as well.
Persistence Support (for Linux): Ventoy allows for creating a persistence file for some Linux distributions, enabling changes made during a live session to be saved back to the USB drive.
GPT and MBR Partition Styles: The USB drive can be partitioned using either Master Boot Record (MBR) or GUID Partition Table (GPT) schemes. For modern systems, GPT is generally preferred.
Creating a Ventoy Drive:
Download the Ventoy software for your current operating system from its official website.
Extract the archive.
Run the Ventoy2Disk executable (e.g.,
Ventoy2Disk.exeon Windows,VentoyGUI.x86_64or a shell script on Linux).Select the target USB drive from the device dropdown list. Ensure the correct drive is selected, as the process will erase its contents.
Click the "Install" or "Update" button. Ventoy will partition and format the drive.
Once the installation is complete, the USB drive will appear as a regular storage device. Copy the desired OS ISO files (e.g.,
ubuntu-24.04-desktop-amd64.iso,Win11_23H2_English_x64.iso) directly into the large data partition of the Ventoy USB drive.
Accessing the BIOS/UEFI Boot Menu
To boot from the newly created USB drive, the computer's firmware settings or boot menu must be accessed. Firmware is low-level software that initializes hardware during the boot process. Modern systems use UEFI (Unified Extensible Firmware Interface), which replaces the older BIOS (Basic Input/Output System).
BIOS vs. UEFI:
BIOS: Older standard with limitations like a 2TB boot drive limit (with MBR partitioning) and a simpler text-based interface. It uses a Master Boot Record (MBR) to locate the bootloader.
UEFI: Modern standard offering features like Secure Boot (helps prevent malware from hijacking the boot process), faster boot times, support for larger boot drives (with GPT partitioning), and a more graphically rich setup utility. UEFI stores boot information in an EFI System Partition (ESP).
Accessing Firmware Settings/Boot Menu:
The key to access the firmware setup utility or boot menu varies by manufacturer and model. Common keys include:
Delete (Del)
F2
F10
F12
Escape (Esc)
This key must be pressed repeatedly immediately after powering on the computer, before the existing OS starts to load.
Insert the Ventoy USB drive into a USB port on the computer.
Power on or restart the computer.
Press the designated key to enter the firmware setup or boot menu.
If you enter the full firmware setup utility (often called "BIOS Setup" or "UEFI Settings"), look for a "Boot" or "Boot Order" tab. Here, you can change the boot sequence to prioritize the USB drive. Save changes and exit (typically F10).
If you access a direct boot menu, a list of bootable devices will appear. Select the USB drive (it might be listed by its name, the Ventoy name, or as a generic USB device). UEFI systems may show two entries for the USB drive: one for UEFI mode and one for legacy BIOS mode. For modern OS installations, select the UEFI option.
Secure Boot:
If Secure Boot is enabled in the UEFI settings and you are installing an OS whose bootloader is not signed with a key recognized by the firmware (common with some Linux distributions or custom bootloaders), Secure Boot may need to be temporarily disabled. Ventoy itself generally supports Secure Boot, but the specific OS image being booted might have issues.
Step-by-Step Operating System Installation
Once the system successfully boots from the Ventoy USB drive, the Ventoy menu will appear. Select the desired OS ISO file from the list to begin its installation process. The specific steps will vary between Linux distributions and Windows versions, but the general procedure involves several common stages.
General Installation Stages:
Language, Time, and Keyboard Layout Selection: The installer will first ask you to choose your preferred language, time zone, and keyboard layout.
Software Selection (Linux): Many Linux installers offer options like "Minimal installation" (basic utilities) or "Normal installation" (includes web browser, office suite, etc.). Some also provide options to install third-party software for graphics, Wi-Fi hardware, and additional media codecs.
Disk Partitioning: This is a critical step.
Automatic Partitioning ("Erase disk and install"): The installer will automatically partition the entire selected hard drive or SSD. This is suitable if the drive is empty or if you do not need to preserve any existing data or operating systems. Warning: This will erase all data on the selected disk.
Manual Partitioning ("Something else" or "Custom"): This provides full control over the partitioning scheme. It is necessary for dual-booting or for users with specific layout requirements.
For UEFI systems: At a minimum, an EFI System Partition (ESP) (typically 100-500MB, FAT32 formatted, flagged as
espandboot) and a root partition (/for Linux, formatted with ext4 or another Linux filesystem; C: drive for Windows, formatted with NTFS) are required.Linux Partitions (common):
/: The root directory, where the core OS files are installed./home: (Optional, but recommended) Separate partition for user data. This allows reinstalling the OS without losing personal files.swap: (Optional) Used as virtual memory if RAM is exhausted. Can be a partition or a swap file. Modern systems with ample RAM may not strictly need a dedicated swap partition.
Windows Partitions: Windows Setup typically creates several partitions: a recovery partition, the ESP, an MSR (Microsoft Reserved Partition), and the primary Windows partition (C:).
User Account Creation: You will be prompted to create a user account, including a username and password. For Linux, this often sets up the root user's password or configures
sudo(superuser do) access for the created user.Installation Process: The installer will now copy OS files to the selected partitions and configure the system. This can take some time.
Reboot: After the installation is complete, the system will prompt you to restart. Remove the USB installation medium when prompted.
Example: Windows 11 Installation Key Points:
Product Key: You may be asked for a Windows product key. It can often be skipped and entered later.
Edition Selection: If the ISO contains multiple editions (Home, Pro), select the one for which you have a license.
Microsoft Account: Windows 11 strongly encourages signing in with a Microsoft account, though creating an offline account is sometimes possible through workarounds.
Example: Ubuntu (Linux) Installation Key Points:
Try Ubuntu: Most Linux installers offer a "Try" option, which boots into a live environment running from the USB drive. This allows you to test hardware compatibility and explore the OS before installing.
Updates and Third-Party Software: Options to download updates while installing and to install third-party software are usually provided.
Dual-Booting Basics
Dual-booting allows you to install two or more operating systems on a single computer. When the computer starts, a boot manager provides a menu to choose which OS to load.
General Procedure for Dual-Booting (e.g., Windows and Linux):
Install Windows First (Usually Recommended): If installing both Windows and Linux, it's generally easier to install Windows first. Windows' bootloader is less accommodating of other operating systems.
Prepare Space for Linux:
Within Windows: Use Disk Management (
diskmgmt.msc) to shrink an existing Windows partition to create unallocated space for Linux. Ensure you back up important data before modifying partitions.During Linux Installation: The Linux installer can also resize existing NTFS partitions, but doing it from Windows is often considered safer.
Install Linux:
Boot from the Linux installation media (e.g., via Ventoy).
At the partitioning stage, choose "Manual partitioning" or "Install alongside Windows Boot Manager" if the option is available and trusted.
Create the necessary Linux partitions (
/,/home(optional),swap(optional)) in the unallocated space.Bootloader Installation: The crucial part is where to install the Linux bootloader (typically GRUB - Grand Unified Bootloader).
For UEFI systems, GRUB should be installed to the existing EFI System Partition (ESP) that Windows also uses. The Linux installer usually detects this automatically.
For older MBR systems, GRUB is typically installed to the Master Boot Record of the primary hard drive.
Bootloader Management:
After Linux installation, GRUB will usually take over as the primary boot manager, providing a menu to boot into Linux or Windows.
If Windows was installed after Linux, or if a major Windows update occurs, the Windows bootloader might overwrite GRUB. In such cases, GRUB may need to be reinstalled or repaired using a Linux live USB and tools like
boot-repair.
Considerations for Dual-Booting:
UEFI vs. BIOS: Ensure both operating systems are installed in the same firmware mode (either both UEFI or both legacy BIOS). Mixing modes can lead to boot complications. Modern systems should use UEFI for both.
Time Synchronization: Windows and Linux interpret the hardware clock (RTC) differently by default. Windows typically assumes RTC is in local time, while Linux assumes it's in UTC. This can cause time discrepancies when switching between OSes. This can be resolved by configuring one of the OSes to match the other's RTC interpretation (e.g., make Linux use localtime or Windows use UTC via a registry setting).
Shared Data Partition: It can be useful to create a separate data partition formatted with a file system accessible by both Windows and Linux (e.g., NTFS or exFAT) for easy file sharing. Linux has good support for reading and writing NTFS partitions (using
ntfs-3g).
The installation of an operating system, while involving multiple technical steps, provides the foundation for all computing tasks. Understanding the choices in OS selection, the utility of tools like Ventoy, the interaction with system firmware, the partitioning process, and the basics of multi-boot configurations allows for effective system setup and management. Always proceed with caution during disk partitioning steps, as errors can lead to data loss. Regular backups of important data are highly recommended before undertaking any OS installation or major system configuration changes.