Saif Shahriar

My small website

View on GitHub

Index

Install Arch Linux

Verify Boot Mode

Check if you have an efi or bios system.

ls /sys/firmware/efi/efivars


Make sure you have internet

To make sure you have internet connection, simply ping to any valid website.

ping saifshahriar.github.io


Update the system clock

Use timedatectl to make sure the system clock is accurate.

timedatectl set-ntp true

To check the status simply type,

timedatectl status


Partitioning the disk

Use cfdisk tool to partition the disks.

Format partitions

# format boot & root
mkfs.ext4 /dev/sda1
mkfs.ext4 /dev/sda3

# format swp
mkswap /dev/sda2


Mount the file systems

  1. Mount root first:
      mount /dev/sda3 /mnt
    
  2. Boot:
    • Now make a boot directory inside /mnt:
       mkdir /mnt/boot
      
    • Now mount boot:
       mount /dev/sda1 /mnt/boot
      
  3. Mount swp:
      swapon /dev/sda2
    

    lsblk to check the partition info


Installation

Select the mirrors:

vim /etc/pacman.d/mirrorlist

Install essential packages

pacstrap /mnt base base-devel linux linux-firmware vim networkmanager git grub opendoas 


Configure the system

Fstab (contains all the drivers)

genfstab -U /mnt >> /mnt/etc/fstab

Chroot

arch-chroot /mnt

Enable network manager at boot

systemctl enable NetworkManager

Install a boot loader (grub)

grub-install /dev/sda
grub-mkconfig -o /boot/grub/grub.cfg


Optional

User setup

vim /etc/hostname

put arch there

Timezone

ln -sf /usr/share/zoneinfo/Region/City /etc/localtime
hwclock --systohc

Localization

vim /etc/locale.gen
# Uncomment needed locale

locale-gen

Now go to the vim /etc/locale.conf and add the line LANG=en_US.UTF-8

Set users

# To setup root passwd
passwd 

# Add another user and passwd
useradd -m saif
passwd saif

# Give user the permission
usermod -aG wheel,audio,video,optical,storage saif
## Allow members of group wheel to execute any command
- # %wheel ALL=(ALL:ALL) ALL
+ %wheel ALL=(ALL:ALL) ALL

## Uncomment to allow members of group wheel to execute any command
- # %sudo ALL=(ALL:ALL) ALL
+ %sudo ALL=(ALL:ALL) ALL

Now unmount -R /mnt remove the installation media and reboot


Install blackarch on top of arch linux

# Run https://blackarch.org/strap.sh as root and follow the instructions.
curl -O https://blackarch.org/strap.sh

# Verify the SHA1 sum
echo 8bfe5a569ba7d3b055077a4e5ceada94119cccef strap.sh | sha1sum -c

# Set execute bit
chmod +x strap.sh

# Run strap.sh
sudo ./strap.sh

Enable multilib: To enable multilib repository, uncomment the [multilib] section in /etc/pacman.conf.

vim /etc/pacman.conf

Find

[multilib]
Include = /etc/pacman.d/mirrorlist

and uncomment the section.

Now synchronize the packages and upgrade the system.

sudo pacman -Syu


You may now install tools from the blackarch repository.

To list all of the available tools, run

sudo pacman -Sgg | grep blackarch | cut -d' ' -f2 | sort -u

To install all of the tools, run

sudo pacman -S blackarch

To install a category of tools, run

sudo pacman -S blackarch-<category>

To see the blackarch categories, run

sudo pacman -Sg | grep blackarch

For example:

sudo pacman -Syyu --needed blackarch --overwrite='*'