arch installation

archlinux installation

Recently I fell in love with arch i3, then put your computer to reinstall the arch, arch Here are the steps to install, i3 Desktop is still in landscaping, beautification and so on to complete the first time to share.

Installation image file version: 5.3.13
computer-desktop host

If necessary improvement leave comments

Preparation Before Installation

U make a boot disk
recommended depth boot disk creation tools

I use linux dd command system production

dd if = name of = u mirrored disk position bs = 4M

u disk after making a good start to uefi mode

Because it is unable to capture the whole installation, follow the steps to install the base can be successful

Set Network

  • View network connection status
ip link

Lists the card information and network status

  • Wi-Fi
  1. Start wireless LAN
ip link set wlan0 up
  • wlan0: Change the name for their network equipment
  1. Scans the current that can be used wifi
iwlist wlan0 scan | grep ESSID
  1. Generating a profile connection wifie
wpa_passphrase wifie名称 密码 > internet.conf
  1. Connection wifie
wpa_supplicant -c internet.conf -i vlan0 &
  1. Start dynamic ip address allocation tool
dhcpcd &
  1. Test Network Status
 ping www.baidu.com
  • Wired network connection
  1. To test the network status
  2. Skip the network is available
  3. The network is not dynamic ip address allocation tool start

Time synchronization system

timedatectl set-ntp true

disk partition

  1. View hard drive information system
fdisk -l
  1. disk partition
  • ** / dev / sda * Change own partition **
fdisk /dev/sda
  • / Dev / sda: with disk instead of their own system to be installed
  • If a dual system, is added to the disk partition number (/ dev / sda1)
  1. Inside fdisk tool, create a partition
  • n Create a new partition
  • w save partition information, and exit fdisk

    • Single-user system partition
    • efi partition: about 512M
    • System partition: Custom
    • swap partition: now, according to memory size
    Physical Memory swap partition
    <=4G 4G
    4~16G 8G
    16~64G 16G
    64~256G 32G

    Coupled with their own partition number only when the dual system user to create a system partition with the swap partition, create partition

    For example, I prepared for arch partition is / dev / sda4, wrote the following when entering fdisk
    ~ ~ ~
    fidsk / dev / sda4
    ~ ~ ~

  • Partition is created, save the partition, exit the partitioning tool

  1. Format the partition

    a. single-user system
    • efi partition
    mkfs.fat -F32 /dev/sda1
    • arch system partition
    mkfs.ext4 /dev/sda2
    • swap partition
    mkfswap /dev/sda3
    swapon /dev/sda3

    Dual system users to format the system partition with the swap partition

  • ** / dev / sda * Change own partition **

Configuration software source

Choose one of the following two methods

  1. method one
vim /etc/pacman.d/mirrorlist
  • Find the source marked as China, to cut the top file
  1. Method Two
wget -O /etc/pacman.d/mirrorlist "https://www.archlinux.org/mirrorlist/?country=CN&protocol=http&protocol=https&ip_version=4"
  • Check whether the software source file is downloaded successfully
cat /etc/pacman.d/mirrorlist
  • The removal of the previous address Server software source number #
sed -i "s/#server/Server/g" /etc/pacman.d/mirrorlist

Mount the partition

  • Mounting system partition
mount /dev/sda2 /mnt

/ Dev / sda2 change the system partition you want to install their own

  • Mounting boot partition

    a. Create a directory arch system boot
    ~ ~ ~
    mkdir / mnt / the Boot
    ~ ~ ~

    b. loading the boot partition
    ~~~
    Mount / dev / sda1 / mnt / Boot
    ~~~
    boot partition / dev / sda1 change the setting for himself or boot partition win10

Install archlinux

pacstrap /mnt base linux linux-firmwar

base-devel choose to install, can be used later need to install pacman -S

System Configuration

  1. Fstab file generation
genfstab -U /mnt >> /mnt/etc/fstab
  1. Into the installed system
arch-chroot /mnt
  1. Set the time zone
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
  1. Generate adjtime
hwclock --systohc
  1. Localization Settings

    a. Install Vim
    ~~~
    pacman -S Vim
    ~~~
    not own the system revision Editor

    b. Set localization files
    ~~~
    Vim /etc/locale.gen
    ~~~
    removed en_US.UTF-8 UTF-8 and zh_CN.UTF-8 UTF-8 in front of the #

    Generate localization files
    ~ ~ ~
    locale.gen
    ~ ~ ~

    c. Set the language
    editor locale.conf file, add the language
    ~ ~ ~
    vim /etc/locale.conf
    -----------------------
    LANG = en_US.UTF -8
    ~ ~ ~

    Recommend the use of English, is set to lead to Chinese garbled

    d. Set Network

    Edit the file to add your own hostname hostname
    ~ ~ ~
    vim / etc / hostname
    -----------------
    BestShi
    ~ ~ ~

    Adding hosts information
    ~ ~ ~
    vim / etc / hosts
    --------------
    127.0.0.1 localhost
    :: 1 localhost
    127.0.0.1 BestShi.localdomain BestShi
    ~ ~ ~
    BestShi read their favorite host name

    Network connection tool mounting
    ~~~
    pacman -S wpa_supplicant dhcpcd
    ~~~

    A case where a limited desktop host connection is not used may not be installed wpa_supplicant wifie

    Wired desktop host
    configuration dhcpcd
    ~~~
    Vim /etc/rc.conf
    ----------------
    interface eth0 =
    ~~~
    provided dhcpcd run automatically
    ~~~
    systemctl enable dhcpcd
    ~~~

    wifi connection, refer to the beginning of the article to set the network

    e. Set the root password
    ~~~
    the passwd
    ~~~

Install the boot program

pacman -S grub efibootmgr intel-ucode os-prober

AMD CPU installation adm-ucode

  • Generate grub configuration file
mkdir /boot/grub
grub-mkconfig /boot/grub/grub.cfg
  • Install grub bootloader

    View System Architecture

    uname -m

    Mounting guide
    ~~~
    GRUB---target the install the x86_64 = --efi-EFI-Directory = / Boot
    ~~~

So far the system has been installed
to exit the system to restart the computer
~ ~ ~
Exit
reboot
~ ~ ~

Over time updates arch install landscaping and i3 i3 Desktop's

Articles wrong place or in need of improvement to hope that the god sent a message Comments

Guess you like

Origin www.cnblogs.com/smallshell/p/12142421.html