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

Arch Linux Installation: 1.prepare An Installation Medium

This document provides instructions for installing Arch Linux on a system in 14 steps: 1. Prepare an installation medium such as a USB drive or CD. 2. Boot the live Arch Linux environment from the installation medium. 3. Partition the disks to create filesystems for booting, files, and swap space. 4. Format the partitions and mount the boot filesystem. 5. Install the Arch Linux base system and other packages. 6. Configure the system by setting timezone and locale settings, and generating fstab and other configuration files. 7. Install and configure the GRUB bootloader to enable booting into the new Arch Linux installation.

Uploaded by

john
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
149 views

Arch Linux Installation: 1.prepare An Installation Medium

This document provides instructions for installing Arch Linux on a system in 14 steps: 1. Prepare an installation medium such as a USB drive or CD. 2. Boot the live Arch Linux environment from the installation medium. 3. Partition the disks to create filesystems for booting, files, and swap space. 4. Format the partitions and mount the boot filesystem. 5. Install the Arch Linux base system and other packages. 6. Configure the system by setting timezone and locale settings, and generating fstab and other configuration files. 7. Install and configure the GRUB bootloader to enable booting into the new Arch Linux installation.

Uploaded by

john
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 8

ARCH LINUX INSTALLATION

1.Prepare an installation medium


USB flash drive, CD or a network with PXE

2.Boot the live environment

3.Set the keyboard layout (optional)


The default console keymap is US. Available layouts can be listed with:
# ls /usr/share/kbd/keymaps/**/*.map.gz
To modify the layout, append a corresponding file name to loadkeys,
omitting path and file extension. For example, to set a German keyboard
layout:
# loadkeys de-latin1

4.Verify the boot mode


# ls /sys/firmware/efi/efivars
If the command shows the directory without error, then the system is
booted in UEFI mode. If the directory does not exist, the system may be
booted in BIOS (or CSM) mode.

5.Connect to the internet


# ip link
# ping archlinux.org

6.Update the system clock


# timedatectl set-ntp true
To check the service status, use timedatectl status

7.Partition the disks


1. Use the fdisk command to list all available disk drives:
# fdisk -l
2. Partition the drive using the cfdisk command:
cfdisk /dev/sdX
Where X is the drive letter of the disk you want to partition.
eg:- cfdisk /dev/sda
3. Using the arrow keys, select dos as the label type, and press Enter.
The next screen shows how much free space you have on the selected
disk and lets you allocate it. Select New at the bottom of the screen and
press Enter to begin creating a new disk partition.
5. Select the partition size, shown in gigabytes. Once you enter the
preferred size, press Enter to confirm.
6. Once prompted, set the partition as Primary and press Enter to
confirm.
7. Select the Bootable option at the bottom of the screen and press Enter
to confirm. This way you make sure that Arch Linux boots from your
primary partition installed.
8. Repeating the process outlined above, you need to create another
partition using the remaining disk space. Instead of making the new
partition bootable, select the Type option at the bottom of the screen and
press Enter.
9. Scroll down on the list until you find 82 Linux swap / Solaris. Press
Enter to confirm. This creates a swap space partition.
10. Confirm the changes to the drive by selecting Write at the bottom of
the screen. Type yes, and press Enter.
11. Select Quit and press Enter to exit the cfdisk screen.

8.Format the partitions


1. Use the mkfs command to create an ext4 filesystem for the bootable
partition:
# mkfs.ext4 /dev/sdX1
Where X is the drive letter of the disk the partition belongs to
2. Next, create a file system for the swap space partition using the
mkswap command:
# mkswap /dev/sdX2
Again, replace X with the drive letter of the disk the partition belongs to.
9. Mount the Filesystem
# mount /dev/sdX1 /mnt
# swapon /dev/sdX2
Where:
mount – Mounts the filesystem on the bootable partition.
swapon – Activates the swap space filesystem.
X – The drive letter of the disk the partition belongs to.
eg:
# mount /dev/sda1 /mnt
# swapon /dev/sda2

10.Check the Mirror List for an Appropriate Mirror (optional)


To speed up the download, you need to set up the mirror list to make the
fastest mirrors at the top.
1. Start by syncing the pacman repository:
# pacman -Syy
2. Installing a reflector lets you update the mirror and sorts it by
download speed. Add a reflector by typing:
# pacman -S reflector
3. If necessary, create a backup of the mirror list:
# cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
4. Use the reflector to update the mirror list:
# reflector -c "XX" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist
Where "XX" is the code of your country (for example, enter "US" if you
are located in The United States).

11. Install Arch Linux


# pacstrap /mnt base linux linux-firmware

12.Configure the system


1.Generate the fstab File
# genfstab -U /mnt >> /mnt/etc/fstab
2.Change root into the new system:
# arch-chroot /mnt
3.Set the time zone
# ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
Run hwclock to generate /etc/adjtime:
# hwclock --systohc
Localization
1. The locale.gen file contains a list of all available locales. Open it and
find the name of your preferred locale:
# sudo nano /etc/locale.gen
2. Uncomment the name of your preferred locale and any other you
would like to use.
3. Press Ctrl + X to exit and type Y to save the changes.
4. Generate a locale configuration file by typing:
# locale-gen
# echo [locale_name] > /etc/locale.conf
Where [locale_name] is the name of your preferred locale.
Network configuration
1.Create the hostname file
# echo [your_hostname] > /etc/hostname
2. Then, create a hosts file:
# touch /etc/hosts
3. Add the following content to the new hosts file:
127.0.0.1 localhost
::1 localhost
127.0.1.1 [your_hostname]
4. To enable the Dynamic Host Configuration Protocol (DHCP), type:
# systemctl enable dhcpcd
Root password
Set the root password:
# passwd

13.Boot loader
Install GRUB Bootloader on a Non-UEFI System
1. Add the GRUB bootloader packages by using the pacman manager:
# pacman -S grub os-prober
2. Install the GRUB bootloader:
# grub-install /dev/sdX
3. Create a GRUB configuration file by using:
# grub-mkconfig -o /boot/grub/grub.cfg
Install GRUB Bootloader on a UEFI System
1. Add the GRUB bootloader packages by using the pacman manager:
# pacman -S grub efibootmgr
2. Create a directory for the EFI partition:
# mkdir /boot/efi
3. Mount your bootable partition to the directory you created:
# mount /dev/sdX1 /boot/efi
4. Install GRUB by using:
# grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-
directory=/boot/efi
5. Finally, create a GRUB configuration file:
# grub-mkconfig -o /boot/grub/grub.cfg

14.Reboot
Exit the chroot environment by typing exit or pressing Ctrl+d.
# umount -R /mnt
# reboot

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy