• Boot into Archiso

  • Use LUG@USTC mirror

    edit /etc/pacman.d/mirrorlist and place

    Server = https://mirrors.ustc.edu.cn/archlinux/$repo/os/$arch

    at the top of the file.

  • Connect to Internet

    If you use WIFI, run wifi-menu and connect to WIFI.

  • Partition the disk & Format the partitions

    • If encrypting an entire system:

      1
      # cryptsetup -v luksFormat --type luks2 /dev/nvme0n1p7

      ↑ 输入大写的 YES,别问我为什么要强调 🌚

      1
      2
      # cryptsetup open /dev/nvme0n1p7 cryptroot
      # mkfs.ext4 /dev/mapper/cryptroot
  • Mount the file systems

    1
    2
    3
    # mount /dev/nvme0n1p2 /mnt
    # mkdir /mnt/efi
    # mount /dev/nvme0n1p1 /mnt/efi
    • or If encrypting an entire system:
      1
      2
      3
      4
      5
      # mount /dev/mapper/cryptroot /mnt
      # mkdir /mnt/boot
      # mount /dev/nvme0n1p5 /mnt/boot
      # mkdir /mnt/boot/efi
      # mount /dev/nvme0n1p1 /mnt/boot/efi
  • Install the base packages

    1
    # pacstrap /mnt base
  • Generate fstab

    1
    # genfstab -U /mnt >> /mnt/etc/fstab
  • Chroot

    1
    # arch-chroot /mnt
  • Time Zone

  • Locale

    Uncomment en_US.UTF-8 UTF-8 and other needed localizations in /etc/locale.gen, and generate:

    1
    # locale-gen
  • Hostname

    Create the hostname file: /etc/hostname
    my host name
    Add matching entries to hosts

  • Root password

    1
    # passwd
  • Configuring mkinitcpio (If encrypting an entire system)

    add keyboard keymap encrypt to HOOKS in file /etc/mkinitcpio.conf, and generate ramdisk:

    1
    # mkinitcpio -P
  • Intel microcode

    1
    # pacman -S intel-ucode
  • GRUB

    1
    2
    # pacman -S grub
    # grub-install --target=x86_64-efi --efi-directory=/efi --bootloader-id=GRUB
    • and If encrypting an entire system:
      add

      GRUB_CMDLINE_LINUX="cryptdevice=UUID=device-UUID:cryptroot root=/dev/mapper/cryptroot"

      to file /etc/default/grub

    1
    # grub-mkconfig -o /boot/grub/grub.cfg
  • Install other packages

    1
    # pacman -S base-devel
  • Create user

  • Set up a desktop environment

Others

  • EFI

    1
    2
    # efibootmgr --create -d /dev/nvme0n1 --loader /EFI/archlinux/grubx64.efi --label "archlinux grub"
    # efibootmgr -o 0000,0001,0002,3001
  • Nvidia

    /etc/modprobe.d/blacklist-nouveau.conf

    1
    2
    blacklist nouveau
    options nouveau modeset=0

    generate new ramdisk:

    1
    # mkinitcpio -P

    /etc/X11/xord.conf.d/

    1
    2
    3
    4
    5
    6
    7
    8
    9
    Section "Device"
    Identifier "Intel Card"
    Driver "intel"
    EndSection

    Section "Screen"
    Identifier "My Screen"
    Device "Intel Card"
    EndSection

Installation guide - ArchWiki

以官方Wiki的方式安装ArchLinux

ArchLinux安装后的必须配置与图形界面安装教程