| 1 | # Arch Install |
| 2 | |
| 3 | ## Connect to Internet |
| 4 | If you are using wifi, use [iwd](https://wiki.archlinux.org/title/Iwd) |
| 5 | ``` |
| 6 | device list |
| 7 | station *device* get-networks |
| 8 | station *d |
| 9 | ``` |
| 10 | |
| 11 | ## Install Guide |
| 12 | |
| 13 | 1. Turn on parallel downloads |
| 14 | ``sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf`` |
| 15 | |
| 16 | 2. Install archlinux keyring |
| 17 | ``pacman --noconfirm -Sy archlinux-keyring`` |
| 18 | |
| 19 | 3. Load layout, set time |
| 20 | ``` |
| 21 | loadkeys us |
| 22 | timedatectl set-ntp true |
| 23 | ``` |
| 24 | |
| 25 | 4. Create ext4, efi, swap partition |
| 26 | ``` |
| 27 | lsblk |
| 28 | cfdisk /dev/sdx or /dev/nvme0x |
| 29 | |
| 30 | # Efi partition |
| 31 | mkfs.fat -F32 $efipartition |
| 32 | |
| 33 | # Swap partition |
| 34 | mkswap $swappartition |
| 35 | swapon $swappartition |
| 36 | |
| 37 | # ext4 partition |
| 38 | mkfs.ext4 $partition |
| 39 | ``` |
| 40 | |
| 41 | 5. Mount linux partition to /mnt |
| 42 | ``mount $partition /mnt`` |
| 43 | |
| 44 | 6. Pacstrap |
| 45 | ``` |
| 46 | pacstrap /mnt base base-devel linux linux-firmware |
| 47 | ``` |
| 48 | |
| 49 | 7. genstab |
| 50 | ``` |
| 51 | genfstab -U /mnt >> /mnt/etc/fstab |
| 52 | ``` |
| 53 | |
| 54 | 8. chroot |
| 55 | ``` |
| 56 | arch-chroot /mnt |
| 57 | ``` |
| 58 | |
| 59 | 9. set timezone |
| 60 | ``` |
| 61 | ln -sf /usr/share/zoneinfo/Asia/Kolkata /etc/localtime |
| 62 | ``` |
| 63 | |
| 64 | 10. set hardware clock from system clock |
| 65 | ``` |
| 66 | hwclock --systohc |
| 67 | ``` |
| 68 | |
| 69 | 11. set locale |
| 70 | ``` |
| 71 | echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen |
| 72 | locale-gen |
| 73 | echo "LANG=en_US.UTF-8" > /etc/locale.conf |
| 74 | echo "KEYMAP=us" > /etc/vconsole.conf |
| 75 | ``` |
| 76 | |
| 77 | 12. set hostname |
| 78 | ``` |
| 79 | echo $hostname > /etc/hostname |
| 80 | echo "127.0.0.1 localhost" >> /etc/hosts |
| 81 | echo "::1 localhost" >> /etc/hosts |
| 82 | echo "127.0.1.1 $hostname.localdomain $hostname" >> /etc/hosts |
| 83 | ``` |
| 84 | |
| 85 | 13. Initramfs |
| 86 | ``` |
| 87 | mkinitcpio -P |
| 88 | ``` |
| 89 | |
| 90 | 14. Set root password |
| 91 | ``` |
| 92 | passwd |
| 93 | ``` |
| 94 | |
| 95 | 15. install grub |
| 96 | ``` |
| 97 | pacman --noconfirm -S grub efibootmgr os-prober |
| 98 | mkdir /boot/efi |
| 99 | mount $efipartition /boot/efi |
| 100 | |
| 101 | grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=archlinux --recheck |
| 102 | |
| 103 | sed -i 's/quiet/pci=noaer/g' /etc/default/grub |
| 104 | sed -i 's/GRUB_TIMEOUT=5/GRUB_TIMEOUT=0/g' /etc/default/grub |
| 105 | |
| 106 | grub-mkconfig -o /boot/grub/grub.cfg |
| 107 | ``` |
| 108 | |
| 109 | 16. Install all the required user packages |
| 110 | ``` |
| 111 | pacman -S --noconfirm networkmanager git |
| 112 | ``` |
| 113 | |
| 114 | 17. Enable networkmanager |
| 115 | ``` |
| 116 | systemctl enable NetworkManager.service |
| 117 | ``` |
| 118 | |
| 119 | 18. Set user permissions |
| 120 | ``` |
| 121 | echo "%wheel ALL=(ALL:ALL) ALL" >> /etc/sudoers |
| 122 | ``` |
| 123 | |
| 124 | 19. Create user |
| 125 | ``` |
| 126 | useradd -m -G wheel $username |
| 127 | passwd $username |
| 128 | ``` |
| 129 | |