The Ultimate Guide to Dual Boot Arch Linux & Windows
Dual Boot Guide Installation Linux Walkthrough WindowsHi all, welcome to my blog, MusaBase! In this comprehensive guide, I`ll walk you through dual booting Arch Linux and Windows 10 on your PC. Imagine a computing experience where the sleek, familiar interface of Windows 10 meets the raw, customizable power of Arch Linux, all on one machine. Although dual booting may seem daunting, like managing two vastly different operating systems, this step-by-step guide will demystify the process.
Sure, it`s technical, but follow along closely, and i`ll turn those "what-ifs" into "how-tos." By the end, you`ll reboot with confidence, flipping between Netflix on Windows and a blazing-fast Arch terminal like a tech wizard.
Jump To:
- Prerequisites
- Step 1: Listing All Connected Drives.
- Step 2: Disk Partitioning with cfdisk.
- Step 3: Formatting Partitions.
- Step 4: Mounting Partitions.
- Step 5: Installing the Base System
- Step 6: Generating the File System Table (fstab)
- Step 7: Chrooting into the Installed System.
- Step 8: Configuring the Base System
- Step 9: Updating System with User Account.
- Step 10: Enabling Core Services.
- Step 11: Rebooting.
- Step 12: Booting into Freshly Installed Linux Operating System.
- Step 13: Setting Up Dual Boot.
- Step 14: Testing Dual Boot.
- Afterwards: Exploring the Possibilities of Dual Booting.
Prerequisites
Before you begin dual booting, ensures you have either a dedicated partition or a separate disk for each operating system. Windows will occupy one partition (or disk) with its own file system, while Linux will use another.
Although you can install Linux on the same drive by creating a separate partition, doing so may compromise Window`s recovery features or even lead to data loss if not done carefully. For this reason, it`s crucial to back up your data completely before proceeding. Since Windows is already installed on my PC, I`ll move directly to installing Linux and configuring the system for dual boot.
Step 1: Listing All Connected Drives
When we boot into the Arch Linux installer, we are greeted by a familiar screen:
Our First task is to list all connected devices and partitions.
- To do this, type:
lsblk
In our setup, we have two drives connected to the PC. Windows 10 is already installed on the first drive (sda), specifically on its second partition (sda2). We plan to install Arch Linux on the second drive (sdb), which has 40 GB of free space. Our goal is to create three new partitions on sdb for the Linux Installation.
Here`s a detailed breakdown of the current configuration:
- sda: The first physical drive detected by Linux.
- sda1: Reserved by Windows for booting and includes the Windows Recovery environment.
- sda2: Contains the Windows operating system files and folders.
- sda3: A partition used for storing user data such as movies, games, pictures etc.
- sdb: The second physical drive detected by Linux (our target for Arch Linux)
- sdb1: The first partition on sdb.
- sdb2: Currently occupies the free space. We will delete this partition to create three new partitions tailored for our Arch Linux installation.
By clearly understanding the partition layout from the outset, we ensure a smooth dual-boot installation process for both Arch Linux and Windows 10.
Step 2: Disk Partitioning with cfdisk
Now, if we type cfdisk in the terminal without any arguments, it will by defualt open the partition table for the first connected physical drive (in our case, sda). Our sda drive contains Windows along with its associated partitions and files.
At the top of the cfdisk interface, we see the line:
Disk /dev/sda .
In the middle of the screen, we can view all partitions on sda labeled as follows:
- /dev/sda1: The first partition, which serves as the boot partition for Windows.
- /dev/sda2: The second partition, containing the Windows operating system files..
- /dev/sda3: The third partition, used for storing user data (such as games, movies, pictures, documents, etc.
To install Linux on a separate disk and create dedicated partitions for it, we need to specify the target disk when launching cfdisk. For example, if we want to install Linux on the sdb disk, we run the following command:
cfdisk /dev/sdx
Simply replace "X" with appropriate drive label if your target disk differs.
Since i am installing Linux in my second drive`s then for me the command is:
cfdisk /dev/sdb
After pressing Enter, we have this screen:
- Select GPT, because Linux works optimally with GPT (GUID Partition Table).
After selecting the Label Type, you would have the following screen:
After choosing the label type, the interface displays the disk details. At the top, ensure that the screen shows Disk: /dev/sdX , this confirms that we are partitioning the correct drive for our Linux installation. In our example, we have a partition (previously labeled as sdb2) with 40 GB of free storage. We will delete this partition and create three new partition from this avaiable space.
These 3 partitions would be called and used for:
- Boot Partition: Responsible for booting the system.
- Swap Partition: Functions as virtual memory when the system runs out of physical RAM.
- Root Partition: Contains the operating system files and essential directories.
Navigating the cfdisk interface
In the cfdisk interface, we can navigate using the keyboard arrow keys:
- Up () & Down () arrow keys, to move between partitions in the middle screen.
- Left () & Right () arrow keys, to move through the Options menu at the bottom of the screen.
1. Creating the Boot Partition
The boot partition will be responsible for booting our system.
- Select the [ New ] option from the bottom menu and press Enter.
- A prompt appears at the bottom, asking how much space to allocate for this partition.
- Type the desired size using digits.
- Use a captial G for gigabytes (GB) or a capital M for megabytes (MB).
Please refer to the images below for viusal examples:
For this guide, we are allocating 1 GB for the boot partition. We can adjust this value as needed, but it should not be less than 512 MB.
2. Creating the Swap Partition
The Swap partition acts as Virtual Memory when the system runs out of physical RAM.
- Navigate down to select the Free Space.
- Move left to the [ New ] option and press Enter.
- When prompted at the bottom, enter the desired size.
- Allocate between 4 GB and 32 GB based on our system`s needs.
Please refer to the images for visual examples:
For this guide, we are allocating 10 GB for the swap partition. We can adjust this value, but it should not be less than 1 GB.
3. Creating the Root Partition
The root partition will contain the operating system files and other essential directories.
- Navigate down to the Free Space.
- Move left to the [ New ] option and press Enter.
- If we want to allocate all remaining space for this partition, simply accept the suggested size by pressing Enter. If we plan to create additional partitions later, we might allocate around 20 GB or less for the root partition.
Please refer to the images for visual examples:
4. Writing the Partition Table
After creating all the partitions, it`s time to commit these changes by writing the new partition table to the disk.
- Navigate right to the [ Write ] option and press Enter.
- A prompt appears at the bottom asking, "Are you sure you want to write the partition table to disl?"
- Type yes and press Enter to commit the changes.
Please refer to the images for visual examples:
This step is crucial because it makes our new layout permanent and ensures that the system recognizes the boot, swap, and root partitions for Arch Linux. It also serves as a final confirmation to help prevent accidental modifications.
At this stage, all partitions are successfully created and the filesystem is now ready for data storage.
If everything went right then we can see a filesystem like this:5. Finalizing the Partition Setup
- Navigate to the [ Quit ] option and press Enter to return to the Arch Linux terminal.
Our disk now have partitioned with the following structure:
- /dev/sdb2: Will be formatted as boot partition for booting the system. 1GB space storage
- /dev/sdb3: Will be formatted as swap partition for virtual memory. 10GB space storage
- /dev/sda4: Will be formatted as root partition for containing OS files and other necessary directories. 20GB or Above space storage
Note: The device labels (sucs as /dev/sda, /dev/sdb, etc) may vary depending on your system configuration.
With this setup complete, our system is ready for the next steps in the Arch Linux installation process.
This step-by-step guide on using cfdisk for disk partitioning ensures that we are aligned in our dual-boot journey for Arch Linux and Windows 10. By following these detailed instructions, we can confidently partition our drives for a smooth installation experience.
Step 3: Formatting Partitions
Before moving on to the next stage of our Arch Linux installation, we need to format the partitions we created to ensure that our system`s storage is properly prepared.
1. Listing Storage Devices
- Type lsblk, it will list all connected storage devices with their partitions.
lsblk
This command displays every drive along with its partitions. As expected, instead of only the original partition (sdb2), we now see the three new partitions we created.
2. Formatting the Root Partition
Our first task is to format the root partition, which in our setup is /dev/sdb4.
- We can use mkfs command to create an Ext4 filesystem.
- To create an Ext4 filesystem for our root partition, type:
mkfs.ext4 /dev/sdb4
- mkfs: Stands for "Make Filesystem". It is a command-line utility used to create a filesystem on a storage device partition.
- ext4: Is the type of filesystem we are creating. Ext4 (Fourth Extended Filesystem) is widely used filesystem in Linux, offering better performance, scalability, and realiability.
- /dev/sdb4: Refers to the specific partition where the filesystem will be created.
3. Formatting the Boot Partition
Next, we format the boot partition. In our configuration, this is /dev/sdb2. We can create a FAT32 filesystem on it.
- To create the FAT32 for our boot partition, type:
mkfs.fat -F 32 /dev/sdb2
- mkfs.fat: Is the command-line utility used to create a FAT (File Allocation Table) filesystem.
- -F 32: The -F option specifies the FAT type to create. In out case, -F 32 tell the utility to create a FAT32 filesystem.
- /dev/sdb2: Referes to the specific partition where the filesystem will be created.
4. Setting Up the Swap Partition
The swap partition does not require formatting. Instead, we need to initialize it as a swap area. In our setup, the swap partition is /dev/sdb3.
- To configure our swap partition, type:
mkswap /dev/sdb3
- mkswap: Stands for "Make Swap". It is a command-line utility used to set up a Linux Swap area on a disk parition or a file.
- A Swap Area: Is used by the Linux Kernel to temporarily store data that cannot be held in RAM, effectively extendindthe system`s usable memory.
- /dev/sdb3: Refers to the specific partition where the swap area will be created.
With these steps completed, all partitions are now properly formatted and ready for the next stage of the Arch Linux installation.
With these steps completed, all our partitions are properly formatted and ready for the next phase of our Arch Linux installation. This meticulous process ensures that our dual-boot system is set up securely and efficiently.
Step 4: Mounting Partitions
Now that we have created and formatted our partition for Arch Linux, it`s time to mount them so we can continue with the installation process.
1. Mount the Root Partition
First, we mount the root partition (in our case, /dev/sdb4) to the mount point. This partition will house our operating system and other essential files.
- To mount the root partition, type:
mount /dev/sdb4 /mnt
mount: Is the command-line utility used to attach a filesystem (located on a device or partition) to a directory in the Linux filesystem tree. /dev/sdb4: Refers to the specific partition or storage device we want to mount. /mnt: Is the mount point, which is a directory in the Linux filesystem where the filesystem on /dev/sdb4 will be attached.
2. Mount the Boot Partition
Next, we need to mount the boot partition.However, the boot EFI directory does not exist in the root partition yet. We need to create it first.
- To create the directory, type:
mkdir -p /mnt/boot/efi
The command will create a folder inside the /mnt directory.
- mkdir: Stands for "Make Directory". It is a command-line utility used to create directories (folders) in the Linux filesystem.
- -p: Options stands for "parents". It has two puurposes:
- Create parent directories as need: If any of the parent directories in the specified path do not exist, mkdir -p will create them automatically.
- No error if the directory already exists: If the directory (or any part of the path) already exists, mkdir -p will not throw an error.
- /mnt/boot/efi: This is the directory path we want to create.
/mnt: This is a temporary mount point used during system installation.
Now, mount the boot partition (in our configuration /dev/sdb2) to the newly created directory.
- To mount the boot partition, type:
mount /dev/sdb2 /mnt/boot/efi
- /dev/sdb2: Refers to the specific partition or storage device we want to mount.
- /mnt/boot/efi: Is the mount point, which is a directory in the Linux filesystem where the filesystem on /dev/sdb2 will be attached.
3. Enabling the Swap Partition
The swap partition, we don`t have to mount it anywhere we just have to turn it on, in our setup it is /dev/sdb3
- To turn on the swap partition, type:
swapon /dev/sdb3
- swapon: Is a command-line utility used to activate a swap partition or file.
- /dev/sdb3: The partition designated as our swap space.
4. Verifying the Partition Structure
- To ensure that our partitions are correctly mounted and recognized, type:
lsblk
Press Enter and it should be displaying the structure like this:
It is showing me the structure according to my drive`s tree. The naming conventions or labeling of the disk might be different for you, but the structure should be the same.
Here we have:
- sdb2: As boot partition (allocated 1 GB for (/boot).
- sdb3: As swap partition (allocated 10 GB for swap).
- sdb4: As root partition (allocated 29 GB for root partition (/)).
By following these steps, we ensure that our system`s partitions are correctly mounted and prepared for the next phase of our dual-boot Arch Linux installtion. This methodical approach guarantees a smoother installation process and enhances system reliability.
Step 5: Installing the Base System
Now that we have our partitions mounted, it`s time to install the base Arch Linux system along with essential core pacakges. We install the base system into the /mnt directory, a temporary mount point on our sdb drive, which is the drive we partitioned and mounted for our Linux filesystem. Once the installation is complete and we reboot, our system will boot from the installed OS, and the /mnt directory will no longer be needed.
Installing Linux Firmware and Base Packages
-
Arch Linux provides the pacstrap script to install essential packages into the root filesystem of a new installation.
- To install the Linux Firmware and base packages required for managing our operating system, type:
pacstrap /mnt base linux linux-firmware sof-firmware base-devel grub efibootmgr nano networkmanager
- pacstrap: This is a script provided by Arch Linux to install packages into the root filesystem of a new installation (/mnt in this case).
- /mnt: This is the directory where the new system`s root filesystem is mounted during the installation process.
- base: This is the minimal package group for a functioning Arhc Linux system. It includes essential tools like bash, coreutils,file, findutils, grep, gzip, tar, and many more.
- linux: This is the Lniux Kernel, the core of the operating system.
- linux-firmware: This package contains firmware files required by some hardware devices(e.g, Wi-Fi cards, GPUs).
- sof-firmrware: Optional, Firmware for Sound Open Firmware (SOF), useful for modern Intel audio devices.
- base-devel: A group of development tools, including gcc, make, automake. and other essential build utilities. Needed for compiling software from source.
- grub: The GRUB bootloader, used to boot into the installed operating system.
- efibootmgr: A tool to configure EFI boot entries, required for booting in UEFI mode.
- nano: A simple command-line text editor, useful for editing configuration files.
- networkmanager: A tool to manage network connections easily. Provides automatic network detection and management.
By executing the above command, we installa a robust base system that forms the foundation of our dual-boot Arch Linux and Windows 10 setup. This methodical approach not only streamlines our installation. process but also ensures our system is optimized for performance and reliability.
Step 6: Generating the File System Table or fstab
During installation, we manually mounted our partitions, but these mounts are only temporary. Now, we need to retrieve the filesytem information form these temporary mounts and store it in a configuration file. This ensures that the system automatically mounts the partitions at every startup, allowing Linux to locate its files and data correctly.
- To retreive the filesystem, type:
genfstab /mnt
At this point, we can see the mounted filesystem listed in the terminal. As we can see our partitions are correctly formatted and in the right structure:
- /dev/sdb4: is our root partition.
- /dev/sdb2: is our boot partition.
- /dev/sdb3: is our swap partition
However, we don`t need this output displayed on the terminal, we need to save it to a file instead.
- To store the mount information in an actual file, type:
genfstab /mnt > /mnt/etc/fstab
- genfstab /mnt: Generates a filesystem table (fstab) based on the currently mounted partitions in /mnt (which is where Arch Linux is being installed). The output includes UUIDs or labels for mounted partitions, ensuring they are automatically mounted correctly after reboot.
- > /mnt/etc/fstab: Redirects the generated output and saves it into /mnt/etc/fstab, which is the permanent fstab file inside the new Arch Linux system. This file ensures that the system knows which partitions to mount and where to mount them when booting.
Why is this important?
- Without an fstab file, the system won`t automatically mount partitions on startup.
- This step finalized the installation by making partition mounts presistent across reboots.
Now, the fstab content from the terminal is saved inside a file.
- To verify that the filesystem table has been successfully stored in /mnt/etc/fstab, type:
cat /mnt/etc/fstab
At this stage, we can comfirm that the filesystem information has been written to /mnt/etc/fstab.
- cat: This command reads and display the content of a file.
- /mnt/etc/fstab: This is the file where the genfstab command previously stored the filesystem table.
Partition Assignments:
- /dev/sdb4: is our root partition.
- /dev/sdb2: is our boot partition.
- /dev/sdb3: is our swap partition.
By following these steps, we ensure that the mounted partitions are persistently configured, paving the way for a smooth and reliable boot process for our new Arch Linux installation.
Step 7: Chrooting into the Installed System
Now that we have confiugred our partitions and installed the base system, it`s time to switch our current environment`s root directory to that of the newly installed system, a process known as chrooting. This step is essential before installing a GUI or any other additional components. It allows us to configure core services, set up system configuration files, install the bootloader, set the root password, and create a user account from withint our new Arch Linux enviornment.
- To change our root directory, type::
arch-chroot /mnt
In other words this command allows us to enter the newly isntalled Arch Linux system while still inside the installtion environment so we can setup some core services and packages.
- arch-chroot: This command changes the root directory to the specified location (/mnt in this case).
- /mnt: This is the directory where we installed Arch Linux during the setup process.
Now, that we are inside our newly installaed Arch Linux system`s root directory. One thing to note here is, when we change the root from the live installation environment to the installed system`s environment, the shell prompt root@archiso ~ # _ changes to [root@archiso /]#_
Like this:
This new prompt confirms that we are now in the new environment, ready to install and configure the remaining components. This chroot step is crucial part of our dual-boot setup for Arch Linux and Windows 10, ensuring that we are fully prepared to finalize our system configuration.
Step 8: Configuring the Base System
In the chroot environment, we must configure several system settings and create a regular user account with sudo privileges for improved security. Rahter than using the root account for everyday tasks, setting up a non-root user helps protect our system from accidental changes and potential security risks. Below are the essential configurations we need to perform:
- Setting Up Time Zone
- Localization
- Hostname
- Root Password
- Add a User and Granting Sudo Privileges
- User Pasword
- Sudo Setup
1. Setting Up Time Zone
-
To ensure our system uses the correct local time, we create a symbolic link for our time zone fiel.
- To set timezone to our localtime, type:
ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
Replace Region with your acutal region,(Asia, Europe, America) and replace the City with your local city, *(e.g, New_York, Paris, Dubai).
The actual command would be look like this:
ln -sf /user/share/zoneinfo/Asia/Karachi /etc/localtime
- ln: The ln command is use to create links between files. In our case, it creates a symbolic link. A symbolic link is a pointer to antoher file or directory.
- -s: This option tells ln to create a symbolic link (also called a "soft link").
- -f: This option forces the creation of the link by removing any existing file or link at the destination. /etc/localtime.
- /usr/share/zoneinfo: This is the source file for the time zone. It points to a specific time zone file in the /usr/share/zonefine directory.
- /Asia: Replace Asia with your actual region. (e.g, USA, Europe etc).
- /Karachi: Replace Karachi with your actual local city. (e.g, Los Angeles, Paris etc).
- /etc/localtime: This is the destination of the symbolic link. The system reads this file to detemine the current time zone.
- To confirm that the time has been set correctly, type:
date
This command will show the current time with your configured time zone.
- Next, synchronize the system clock by typing:
hwclock --systohc
The hwclock --systohc command synchronize the hardware clock (RTC) with system clock.
- It writes that time to the hardware clock (also known as the Real-Time Clock or RTC), which is a battery-powered clock on your computer`s motherboard.
2. Localization
A locale is a set of parameters that defines your system`s language, region, and cultural conventions. It includes setting for:
- Language: The language used for system messages, menus, and user interfaces.
- Character Encoding: How text is encoded (e.g UTF-8, en_US.UTF-8).
- Cultural Conventions: Formats for dates, times, numbers, and currency.
- To set your lcoale, type:
nano /etc/locale.gen
- nano: Is a simple text editor that we installed during the base linux installation. It allows us to create & edit text files directly from the terminal.
- /etc/locale.gen: It is the path to our locale file, /etc is the directory and locale.gen is the file name which contains the content of defined locales.
The above nano command will open the locale.gen file in the terminal from there we can set locale to our need.
- Nano will open up a file like this:
We can navigate this file with keyboard`s Up () & Down () arrow keys.
- Navigate down () until you reach to the locale that you want to set for your system.
- Now, delete or remove only the # symbol by pressing either Del key or Backspace.
I am choosing en_US locale for my system. However, you can choose your desired locale.
Now, to save the changes and go back to terminal follow these steps:
- Press ctrl + o to open up a prompt for confirming to save changes. Press Enter and it will apply these changes.
- To exit from nano editor press ctrl + x and it will exit you from nano editor.
Now, we need to generate the locale we just uncommented.
- To generate locale type:
locale-gen
Now that we have generated locale, we still need to specifiy it in a locale.conf file because some programs would be using this file.
- Type:
nano /etc/locale.conf
Now in the locale.conf file we will type our locale preset.
- Type the locale preset in the locale.conf file like this
LANG=en_US.UTF-8 or fr_FR.UTF-8 depending on your locale and save the file.
LANG=en_US.UTF-8
- Press ctrl + o to save the changes. Then press Enter to apply the changes.
- Now Press ctrl + x to exit from the file. It will exit you to terminal.
3. Hostname
The Hostname is the name assigned to your system on a network, which helps identify your computer when communicating with other device.
- To set the hostname for your system, tpye:
nano /etc/hostname
This may open an empty file. Type the desired hostname (for my sytem i am typing, MusaBase).
- Type the hostname you want.
- Press ctrl + o to save the changes, then press Enter to apply changes.
- Now to exit from the hostname file press ctrl + x and it will exit you out to terminal.
4. Root Password
Now for security we need to set the root password. The root password is necessary for system administration, security, and managing Linux effectively.
- To set the root password, type:
passwd
After typing passwd command you will be prompted to enter and re-enter the password for the root user.
Make sure to use a strong password, as root has full system control.5. Add a User
Adding a user with sudo privileges in Linux improves security by limiting direct root access and reducing the risk of accidental system damage, while also enabling controlled administrative access with aduitability.
- To add a user, type:
useradd -m -G wheel -s /bin/bash username
- useradd: Creates a new user.
- -m: Creates a home directory (/home/username) for the new user.
- -G Wheel: Adds the user to the wheel group, which is commonly used to grand sudo privileges.
- -s /bin/bash: Sets Bash as the default login shell for the user.
- username: The name of the new user being created you can replace it with the name that you want.
6. User Password
Next, we set a password for the new user.
- Type:
passwd username
- Replace username in the above command with your username and press Enter.
- Enter and re-enter password for the new user.
7. Sudo Setup
Finally, set up sudo for the new user in the wheel group to allow controlled administrative access without directly using the root account. This improves security, prevents accidental system damage, and allows for aduitability of privileged commands. Instead of logging in as root, the user can temporarily gain elevated privileges using sudo.
- To do this, type:
EDITOR=nano visduo
It will open up a sudoers file link in the 2nd picture, from here we can make the changes.
- Navigate to bottom with keyboard`s down () arrow key.
- Find this line at the bottom of the file:
# %wheel ALL=(ALL:ALL) ALL
- Remove the # symbol by pressing either Del or backspace key on your keyboard.
- Now, Press ctrl + o to save the changes then press Enter to apply the changes.
- Now to exit press ctrl + x and it will exit you to terminal.
By following these steps, we ensure that our system`s base configuration is complete and secure. We have set up the time zone, localization, hostname, root password, and created a non-root user with sudo privileges. This comprehensive configuration prepares our Arch Linux installation for a stable and secure dual-boot environment alongisde Windows 10.
Step 9: Updating System with User Account
Now that we`ve added a user with sudo privileges, it`s time to test some sudo operatins to verify that our new user has the necessary permissions. First, we`ll switch from the root account to our newly created user.
- To switch from root to our new user, type:
su username
Replace the username with the name you chose for your user account.
Note: When we switch from root to our user, the shell prompt will change accordingly. For example i added musa as my username, the shell prompt have changed from [root@archiso /]#_ to [musa@archiso /]#_.
Next, we`ll run a simple update command using pacman to verify sudo access and update our system.
- Type:
sudo pacman -Syu
This command will prompt us for our user`s password and then update the system if any updates are available. If you have already up to date Arch Linux installation, the command will simply inform you that no updates are needed.
My system was missing some udpates so the -Syu updated my system but you might not have to.
By following these steps, we confirm that our new user has proper sudo privileges and out system is current.
Step 10: Enabling Core Services
Before finally restarting our PC and logging into the installed system, we need to enable some core services. However, first we need to exit from our user shell prompt [username@archiso /]#_ to back to the root shell prompt [root@archiso /]#_to perform these actions with administrative privileges.
- To exit from user`s shell prompt, type:
exit
When we type exit and press Enter, we return to the installed system`s root terminal.
Note: When we exit from the user`s shell prompt [username@archiso /]#_, it will change to the root shell prompt [root@archiso /]#_, as the shell will now operate with root privileges.
- Now, we will enable Core Services like:
1. Enabling Network Manager.
2. Grub Bootloader.
1. Enable Network Manager
We need to enable Network Manger using the systemctl command to ensure that the system can automatically manage network connections after reboot.
- To enable NetworkManager, type:
systemctl enable NetworkManager
Make sure while typing systemctl NetworkManger the letter N and letter M is capital for the NetworkManager word.
- systemctl: The systemctl command is used to manage systemd services. Systemd is the init system and service manager in most moden Linux distros, including Arch Linux.
- enable: The enable option tells systemctl to enable a service.Enabling a service means configuring it to start automatically when the system boots.
- NetworkManager: This is the name of the NetworkManager service. NetworkManager is a daemon that manages network connections, including wired, wireless, and VPN connections.
2. Grub Bootloader
GRUB (GRand Unified Bootloader) is a powerful and flexible bootloader used in Linux systems to manage the startup process. It loads the operating system kenrel into memory and allows you to select between multiple OS installations, GRUB supports both UEFI and BIOS, offers a comman-line interface, and can be customized for advanced boot configurations.
- To install GRUB, type:
grub-install /dev/sdb
Replace the /sdb with your hard-drive name or label. I installed Linux on my second drive which is /sdb so i am installing GRUB on this drive.
- grub-install: This is the command used to install the GRUB onto a disk or partition.
- /dev/sdb: This specifies the target disk where GRUB will be installed. (in our setup it is /sdb).
Now that GRUB is installed, we also need to generate its initial configuration file.
- To generate the GRUB config file, type:
grub-mkconfig -o /boot/grub/grub.cfg
- grub-mkconfig: Creates or updates the GRUB configruation file.
- -o /boot/grub/grub.cfg: Specifies the output file where the configuration is saved.
Step 11: Rebooting
Now that we have completed all the necessary steps, we will exit the chroot environment and unmount all drives to prepare for rebooting into our newly installed Arch Linux system.
1. Exit the Chroot Environment
- To exit from chroot environment, simply type:
exit
Note: Exiting the chroot environment will change the shell prompt from something like [root@archiso /]#_ to [root@archiso ~#_ , indicating the we are now operating from the Live Installation`s root home driectory.
2. Unmount All Non-Busy Drives
Before rebooting, it is important to unmount all drives that are not in use.
- To unmount all non-busy drives, type:
umount -a
The above command is umount -a, not unmount -a, just a reminder becuase it`s an easy mistake to make.
3. Reboot The System
Finally, we reboot our system. This will take us to the GRUB bootloader screen, from which we can choose to boot into Arch Linux. Later, we can install GUI enviornmnet (such as KDE Plasma) and configure GRUB for dual booting with Windows 10.
- Type the following command to reboot:
reboot
By following these steps, we ensure that our system is properly configured and ready for the next phase. This final reboot will transition us from the installation environment into our fully installed Arch Linux system, paving the way for further customizations and the installation of a graphical interface.
Step 12: Booting into Our Freshly Installed Linux Operating System
After rebooting, our system will load into the GRUB bootloader, where we`ll be greeted with this screen:
Once we select *Arch Linux, we will be greeted by Arch Linux`s tty1 welcome screen, displaying our configured hostname:
At this point, enter the username and it`s password we set during the user creation process, then press Enter to log in.
Once we`re logged in, our next task is to install a graphical user interface (GUI) to enhance our experience. We`ll install KDE Plasma as our desktop environment along with SDDM (Simple Desktop Display Manager) for graphical logins, and a few essential applications such as Konsole (the KDE terminal emulator), Kate (a powerful text editor), and Firefox for browsing.
- We can install all these components with a single combined command:
sudo pacman -S plasma sddm && sudo pacman -S konsole kate firefox && sudo systemctl enable --now sddm
- sudo pacman -S plasma sddm: Installs Plasma, the KDE desktop environment, and SDDM (Simple Desktop Display Manager), which handles the graphical login screen.
- sudo pacman -S konsole kate firefox: Installs Konsole (KDE`s terminal emulator), Kate (KDE`s advanced text editor), and Firefox (FireFox).
- sudo systemctl enable --now sddm: Enables SDDM so it start automatically at boot. However, the --now command starts SDDM immediately without rebooting.
After the packages and services are installed, we`ll be presented with a graphical login screen:
Here, we enter the password for our user account and press Enter. Once authenticated, KDE Plasma will load along with its services, providing us with a fully functional desktop envrionment.
Now, we have Arch Linux with a modern desktop enviornment installed on our PC. We can install additional packages and applications through Konsole, our terminal, or directly from KDE`s application manager as we tailor our system to our needs.
Step 13: Setting Up Dual Boot
Now, we need to install a utility tool such as (os-prober) and configure our GRUB configuration file so that GRUB can detect other operating systems (like Windwos) on our computer.
Installing OS-Prober
- To install os-prober, frist open terminal or konsole.
- Type:
sudo pacman -Sy os-prober
- -Sy: The -S flag tells pacman to synchronize (install) packages.
The -y flag forces a refresh of the pacakge database from the repositories before installing.- os-prober: This is the package that scans your disks for other installed operating systems, so that the booloaders like GRUB can automatically add entries for them.
Configuring GRUB
Next, we need to configure the GRUB configuration file to enable OS detection. This allows GRUB to include boot entries for operating system installed on other drives.
- To open GRUB configuration file, type:
sudo nano /etc/default/grub
- sudo: Runs the command with superuser (root) privileges, allowing you to modify system files.
- nano: Opens the nano text editor, a simple, command-line-based editor.
- /etc/default/grub: Specifies the file to be edited. This file contains default configuration options for GRUB, such as the boot menu timeout, default boot entry, and options like whether to run os-prober.
- The above command will open a GRUB file similar to this one:
- Navigate to the bottom with keyboard`s down () arrow key. Until you find follwing line:
#GRUB_DISABLE_OS_PROBER=false
- REmove the # symbol, by either pressing Del key or backspace key at the beginning of the line.
- Press ctrl + o to save changes, then press Enter to confirm.
- Press ctrl + x to exit from nano.
Updating GRUB
Now that we have installed os-prober and updated our GRUB configuration file, it`s time to update GRUB so that it scans for all installed operating systems and generates an updated boot menu.
- To update GRUB`s Config file type:
sudo grub-mkconfig -o /boot/grub/grub.cfg
- grub-mkconfig: This tool scans configuration files /etc/default/grub and scripts in /etc/grub.d/ and detects installed operating systems (using tools like os-prober, if enabled). It then creates a complete boot menu.
- -o /boot/grub/grub.cfg: This option specifies the output file for the genrated configuration. GRUB uses /boot/grub/grub.cfg at boot to display the boot menu and determine how to load your OS.
- If everything is configured correctly, we should see output similar to this one:
Found Windows Boot Manager on /dev/sdx@/efi/Microsoft/Boot/bootmgfw.efi
Here, X refers to the drive or partition where GRUB detected the Windows boot manager.
This indicates that GRUB has successfully detected the Windows Boot Manager and will display an option to boot into Windows from the GRUB menu.
By following these steps, we ensure that our GRUB bootloader is properly configured for dual booting. With os-prober enabled and GRUB updated, our system will automatically include boot entries for both Arch Linux and Windows, making our dual-boot setup seamless and user-friendly.
Step 14: Testing Dual Boot
Now that we have completed all the necessary configurations for dual booting. it`s time to verify that everything works as expected.
- Reboot the system.
- Verify the GRUB Menu: When the system boots, the GRUB menu should display entries for both operating system:
Booting into Arch Linux
Booting into Windows 10
At this point, we have a fully working dual boot system with Arch Linux and Windows 10 installed on our PC. Whether we continue our everyday work in Windows or dive into the innovative world of Linux for exploration and experimentations, our setup offers the perfect balance to suit our diverse needs.
Afterwards: Advanced Dual Boot Capabilities
With a dual boot setup, you unlock a unique flexibility that lets you enjoy the strengths of both operating system on a single machine.
Dual booting doesn`t just let us switch between operating systems, it opens up a playground for exploring advanced and innovative configurations that go beyond typical everyday use.
- Cutting-Edge Desktop Environments: Explore modern compositors like Hyperland and Wayland Based desktops that offer fluid multitasking and dynamics windows management. Their highly customizable interfaces push the boundaries of traditional desktop experiences.
- Enhanced Gaming Experiences On Linux: Experiment with gaming on Linux using Wine and Lutris, which enable many Windows games to run with impressive performance. However, since Linux gaming is still evolving, experimentation can help determine which games perform better on each operating system.
- Advanced Virtualization and Testing: Leverage Linux`s robust virtualization and containerization tools to create isolate environments for development, testing, or legacy applications. These features enable experimental setups that are not easily acheivable on Windows alone.
- Optimized Workflows for Niche Tasks: Use Windows for its specialized productivity suites, multimedia editing, and top-tier gaming performance. Meanwhile, tap into Linux for development, system customization, and experimenting with cutting-edge software stacks.
By harnessing these advanced features, we turn our dual boot setup into a dynamic workspace that meets our everyday needs while inspiring us to experiment and explore. It’s not just about having two operating systems, it’s about unlocking new possibilities, refining our workflows, and discovering creative ways to work and play. Enjoy the journey and all the exciting paths it opens up for you.
1O1 out i will see you aroud!
FIN!!!