Skip to content

Instantly share code, notes, and snippets.

@pavanjadhaw
Created November 19, 2017 12:10
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pavanjadhaw/b5210ef18cfa038d41fde6afe8741d22 to your computer and use it in GitHub Desktop.
Save pavanjadhaw/b5210ef18cfa038d41fde6afe8741d22 to your computer and use it in GitHub Desktop.
1 : List your machines NICs
-> ifconfig
2 : Check internet connectivity, you dont want to format all your partitions
and wonder why internet isnt working.
-> ping -c2 google.com
3 : If using wifi then connect using wifi-menu
-> wifi-menu # repeat step 2 to check internet
NOTE : The resulting configuration file is stored in /etc/netctl. Now you can enable your wireless connection by netctl start <config_filename>. Hint: ls /etc/netctl to see available configuration files.
-> ls /etc/netctl
-> netctl start my_accesspoint
4 : Verifying EFI mode is enabled
-> efivar -l
5 : List your machines partitions issuing the following commands
-> cat /proc/partitions
-> lsblk
-> fdisk -l
6 : Configure harddisk partitions you can use cfdisk. cgdisk, parted or gdisk
utility
>>> Create the following partitions for EFI with refined as boot manager.
1 - EFI System /dev/sda1 (fat32|1G) type=EFI SYSTEM
2 - BIOS Grub partition /dev/sda2 (unformatted|1G)
3 - Swap partition /dev/sda3 (2xRAM|linux-swap) type=linuxswap
4 - Root partiton /dev/sda4 (atleast 20G|ext4)
5 - Home partition /dev/sda5 (rest of hdd|ext4)
-> cfdisk -z /dev/sda # use cfdisk to create partitions.
# Select gpt partition scheme when cfdisk asks.
WRITE CFDISK CHANGES.
7 : Format the partitions.
-> mkfs.fat -F32 /dev/sda1
-> mkswap /dev/sda3
-> mkfs.ext4 /dev/sda4
-> mkfs.ext4 /dev/sda5
8 : Enable Swap
-> swapon /dev/sda3
9 : MOUNT partitions
-> mount /dev/sda4 /mnt && ls /mnt # check the contents of / partition
-> mkdir /mnt/home
-> mount /dev/sda5 /mnt/home
10 : Mount ESP partition
-> mkdir /mnt/esp
-> mount /dev/sda1 /mnt/esp
11 : Fetch the fastest mirrors.
-> git clone https://github.com/pavanjadhaw/fetchmirrors
-> cd fetchmirrors
-> ./fetchmirrors.sh -v -c IN
12 : Instal base system
-> pacstrap /mnt base
13 : Generate fstab file for your new Arch Linux system
-> genfstab -U /mnt >> /mnt/etc/fstab
-> cat /mnt/etc/fstab # inspect it for any unusual occurences.
NOTE : Add netctl config for later use
-> cp /etc/netctl/my_accesspoint /mnt/etc/netctl
14 : CHROOT in newly installed system.
-> arch-chroot /mnt/
15 : Assign hostname.
-> echo "spiritualcraft" > /etc/hostname
16 : Configure system language.
-> vi /etc/locale.gen # uncomment your languages
eg . en_US.UTF-8 UTF-8
en_US ISO-8859-1
17 : Generate your system language layout.
-> locale-gen
-> echo LANG=en_US.UTF-8 > /etc/locale.conf
-> export LANG=en_US.UTF-8
18 : Set timezone (use ls /usr/share/zoneinfo to find yours)
-> ln -s /usr/share/zoneinfo/Asia/Kolkata /etc/localtime
19 : Configure hardware clock to use UTC
-> hwclock --systohc --utc
20 : Comment out multilib from pacman.conf (/etc/pacman.conf)
21 : Install required packages
pacman -S dialog iw wpa_supplicant refind-efi
22 : Configure refined
-> cp /usr/share/refind/refind_x64.efi /esp/EFI/Boot/bootx64.efi
-> cp -r /usr/share/refind/drivers_x64/ /esp/EFI/Boot/
-> echo 'extra_kernel_version_strings linux-git,linux-lts,linux;' > /esp/EFI/Boot/refind.conf
23 : Set passwd
-> passwd
24 : add new user
-> useradd -m -G wheel -s /bin/bash pavan
-> passwd pavan
25 : add pavan to sudoers
-> perl -i -pe 's/#(%wheel ALL=(ALL) ALL)/$1/' /etc/sudoers
---> EXIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment