regexghost-dotfiles

My dotfiles and scripts
git clone git@git.regexghost.com/regexghost-dotfiles.git
Log | Files | Refs | README

archInstallGuide.md (4140B)


      1 # Arch Install Guide
      2 
      3 This install guide is mainly for my reference, specific to my normal setup process. Most of the commands below would likely be the same on any system, and I have included different commands for UEFI or BIOS, or for NVidia cards.
      4 
      5 It's recommanded you read [the Arch wiki install guide](https://wiki.archlinux.org/title/Installation_guide) if you are installing Arch for the first time.
      6 
      7 ## Install
      8 
      9 ### Keyboard layout
     10 
     11 `loadkeys uk` - Set console keyboard layout to UK
     12 
     13 ### Check if EFI
     14 
     15 `ls /sys/firmware/efi/efivars` - If this returns loads of files, you are on UEFI system
     16 
     17 ### Internet
     18 
     19 `iwctl`  
     20 `device list`
     21 
     22 `device *device* set-property Powered on`  
     23 `adapter *adapter* set-property Powered on`
     24 
     25 `station *device* scan` - Scan for networks  
     26 `station *device* get-networks` - List networks  
     27 `station *device* connect *SSID*` - Connect to network
     28 
     29 ### Timezone
     30 
     31 `timedatectl set-timezone Europe/London` - Set timezone  
     32 `timedatectl` - Check it worked
     33 
     34 ### Disc Partitioning
     35 
     36 `fdisk -l`  
     37 `fdisk /dev/DRIVE`
     38 
     39 #### Create new partition table
     40 
     41 > `o` - New partition table  
     42 > `w` - Write changes
     43 
     44 `fdisk /dev/DRIVE`
     45 
     46 #### Boot partition - Skip on BIOS MBR
     47 
     48 > `n` - New partition  
     49 > `p` - Type = Primary  
     50 > `1` - First partion  
     51 > Enter - Starts at first avalible space  
     52 > `+512M` - 512MB for boot partition
     53 
     54 Change type to EFI
     55 
     56 > `t` - Change type  
     57 > `ef` - Code ef is EFI boot type
     58 
     59 #### Swap Partition
     60 
     61 > `n`  
     62 > `p`  
     63 > `2`  
     64 > Enter  
     65 > `+18G` - 18GB for swap partition as I have 16GB of RAM, enough for hybernation
     66 
     67 Change type to swap
     68 
     69 > `t`  
     70 > `2`  
     71 > `82` - Code 82 is swap type
     72 
     73 #### Root Partition
     74 
     75 > `n`  
     76 > `p`  
     77 > `3`  
     78 > Enter  
     79 > Enter - Will take up entire rest of drive
     80 
     81 Make bootable
     82 
     83 > `a` - Set bootable flag  
     84 > `3`
     85 
     86 #### Write Changes
     87 
     88 > `w` - Write changes
     89 
     90 ### Formatting
     91 
     92 `mkfs.ext4 /dev/ROOT_PARTITION`  
     93 `mkswap /dev/SWAP_PARTITION`  
     94 `mkfs.fat -F32 /dev/EFI_SYSTEM_PARTITION` # Skip on MBR
     95 
     96 ### Mounting
     97 
     98 `mount /dev/ROOT_PARTITION /mnt`  
     99 `mount --mkdir /dev/EFI_SYSTEM_PARTITION /mnt/boot` # Skip on MBR
    100 `swapon /dev/SWAP_PARTITION`
    101 
    102 ### Install
    103 
    104 `pacstrap -K /mnt base linux linux-firmware nano networkmanager`
    105 
    106 ### Fstab
    107 
    108 `genfstab -U /mnt >> /mnt/etc/fstab`
    109 
    110 ### Chroot
    111 
    112 `arch-chroot /mnt`
    113 
    114 ### Time Zone
    115 
    116 `ln -sf /usr/share/zoneinfo/Europe/London /etc/localtime`  
    117 `hwclock --systohc`
    118 
    119 ### Localization
    120 
    121 `nano /etc/locale.gen`  
    122 Uncomment `en_GB.UTF-8 UTF-8`
    123 
    124 `locale-gen`
    125 
    126 `nano /etc/locale.conf`  
    127 Add `LANG=en_GB.UTF-8`
    128 
    129 `nano /etc/vconsole.conf`  
    130 Add `KEYMAP=uk`
    131 
    132 ### Hostname
    133 
    134 `nano /etc/hostname`  
    135 Add `MY_HOSTNAME`
    136 
    137 ### Root Password
    138 
    139 `passwd`
    140 
    141 ### Check Mirrors 
    142 
    143 `nano /etc/pacman.d/mirrorlist`  
    144 `pacman -Syyu`
    145 
    146 ### Microcode
    147 
    148 `pacman -Syu`  
    149 `pacman -S amd-ucode grub efibootmgr sudo`  
    150 or
    151 `pacman -S intel-ucode grub efibootmgr sudo`  
    152 
    153 replace `efibootmgr` with `mtools dosfstools` for BIOS MBR
    154 
    155 ### Grub
    156 
    157 #### UEFI
    158 
    159 `grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB`  
    160 `grub-mkconfig -o /boot/grub/grub.cfg`
    161 
    162 #### BIOS MBR
    163 
    164 `grub-install --target=i386-pc /dev/sdX`  
    165 `grub-mkconfig -o /boot/grub/grub.cfg`
    166 
    167 ### Exit and Reboot
    168 
    169 `exit`  
    170 `umount -R /mnt`  
    171 `reboot`
    172 
    173 ## Post install
    174 
    175 ### WiFi Setup and Connect
    176 
    177 `rfkill`  
    178 `rfkill unblock wlan`
    179 
    180 `systemctl enable NetworkManager.service`  
    181 `reboot`
    182 
    183 `nmtui`
    184 
    185 ### Create User
    186 
    187 `useradd --create-home username`  
    188 `usermod -aG wheel username`  
    189 `passwd username`
    190 
    191 `nano /etc/sudoers`  
    192 Uncomment `%wheel ALL=(ALL) ALL`
    193 
    194 `reboot`
    195 
    196 ### Install Things
    197 
    198 `sudo pacman -Syu` - Update system  
    199 `sudo pacman -S xfce4 xorg-server mousepad lightdm lightdm-gtk-greeter alacritty xfce4-pulseaudio-plugin xfce4-genmon-plugin git` - Install programs  
    200 `sudo systemctl enable lightdm.service`  
    201 `reboot`
    202 
    203 Enabled multilib by uncommenting:  
    204 ```
    205 [multilib]
    206 Include = /etc/pacman.d/mirrorlist
    207 ```
    208 in `/etc/pacman.conf`  
    209 `pacman -Syu`
    210 
    211 ### Enable Hibernation
    212 
    213 Add `resume` before `fsck` in `/etc/mkinitcpio.conf`  
    214 `sudo mkinitcpio -P`
    215 
    216 ### If on NVidia System 
    217 
    218 `sudo pacman -S nvidia lib32-nvidia-utils`
    219 
    220 Remove `kms` from `HOOKS` array in `/etc/mkinitcpio.conf`  
    221 `sudo mkinitcpio -P`  
    222 `reboot`