Skip to content

Instantly share code, notes, and snippets.

@kotleni
Last active August 11, 2024 11:12
Show Gist options
  • Save kotleni/82072e8b557154987528b0ffa21aff23 to your computer and use it in GitHub Desktop.
Save kotleni/82072e8b557154987528b0ffa21aff23 to your computer and use it in GitHub Desktop.
arch-linux-installing-helper.md

Arch Linux Installing Helper

This markdown document should help to you (and me :3) install arch linux with all needed non graphical things for regular PC with UEFI. Excented source of information about installation: https://wiki.archlinux.org/title/Installation_guide

Preparing

  1. Download iso image, from https://repo.hyron.dev/archlinux/iso/ (UA mirror) as example.
  2. Flash iso to usb stick using rufus, balendaEtcher, dd or etc.
  3. Boot PC and switch booting device to flashed usb stick.

Installing basic system

  1. Check internet connection in installer by ping kernel.org
  2. Partition the disks using fdisk
    • fdisk -l
    • fdisk /dev/nvme0n1
      • g (new gpt partition table)
      • n (new partition) /boot
        • default (partition number)
        • default (first sector)
        • +2G (2gb)
        • y (if requested remove signature)
      • n (new partition) /
        • default (partition number)
        • default (first sector)
        • default (use all space)
      • w (save and exit)
  3. Creating filesystems
    • mkfs.fat -F 32 /dev/nvme0n1p1 (make /boot fat32)
    • mkfs.ext4 /dev/nvme0n1p2 (make / ext4)
  4. Mounting
    • mount /dev/nvme0n1p2 /mnt (mount /)
    • mkdir /mnt/boot
    • mount /dev/nvme0n1p1 /mnt/boot (mount /boot)
  5. Installing default packages
    • pacstrap -K /mnt base base-devel linux linux-firmware amd-ucode man vim networkmanager
  6. Generate fstab
    • genfstab -U /mnt >> /mnt/etc/fstab
  7. Chroot to new system
    • arch-chroot /mnt

Post installing

  1. Set hostname by echo "mypc1" > /etc/hostname
  2. Set root password by passwd
  3. Create new user
    • useradd -m -s /bin/bash user (create)
    • usermod -aG wheel user (add to sudoers)
    • EDITOR=vim visudo (open sudoers edito r)
      • uncomment or add line %wheel ALL=(ALL) ALL
      • save by esc, :wq
    • passwd user (change password for user)

Installing GRUB for EFI

  1. Install deps pacman -Syu grub efibootmgr
  2. Install grub grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
  3. Make config grub-mkconfig -o /boot/grub/grub.cfg

Finish

  1. Exit chroot exit
  2. Unmount all umount /mnt/boot && umount /mnt
  3. Reboot reboot

Troubleshooting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment