Arch Linux

Install Guide

  • boot usb or cd disk, then cmd step
    # check disk
    lsblk
    # disk format tool
    fdisk /dev/sda
    #~~~~~~~disk tool here~~~~~~~~
    # print disk structure
    p
     
    # delete partition
    # d
     
    # create a partition, hands on part
    # n (new) > p (prime) > (default number) > (default first sector) > +SizeG (size)
    # boot = +200M
    # swap = RAM*1.5
    # system = +20G
    # home = (default = rest)
     
    # apply disk change
    w
     
    # format into file system, for boot, root, home
    mkfs.ext4 /dev/sda1
    mkfs.ext4 /dev/sda3
    mkfs.ext4 /dev/sda4
     
    # - 1.- make it swap
    mkswap /dev/sda2
    swapon /dev/ls /sda2
     
    # - 2. mount the root partition
    mount /dev/sda3 /mnt
     
    # - 3. make other sub foders
    mkdir /mnt/home
    mkdir /mnt/boot
     
    mount /dev/sda1 /mnt/boot
    mount /dev/sda4 /mnt/home
     
    # - 4. get close mirror and sync install
    reflector -l 3 --sort rate --save /etc/pacman.d/mirrorlist
    pacstrap /mnt base base-devel vim
     
    # - 5. fstab, mount table
    genfstab /mnt
    genfstab -U /mnt
    genfstab -U /mnt >> /mnt/etc/fstab
     
    # -6. change to new installed arch linux,
    arch-chroot /mnt
     
    # -7. setup network
    pacman -S networkmanager
    systemctl enable NetworkManager
     
    # -8. get boot loader and setup config
    pacman -S grub
     
    grub-install --target=i386-pc /dev/sda
    grub-mkconfig -o /boot/grub/grub.cfg
     
    # -9. setup passport for root
    passwd
     
    #-10. set locale, delete # for en_US utf8 and ascii
    vim /etc/locale.gen
    # -- generate locale based on above
    locale-gen
    # -- set your language, write: LANG=en_US.UTF-8 
    vim /etc/locale.conf
    # - set timezone
    ls /usr/share/zoneinfo/
    ln -sf /usr/share/zoneinfo/Asia/Singapore /etc/localtime
    # - set hostname (computer name), just a name
    vim /etc/hostname
     
    # -11. exit current root
    exit
    umount -R /mnt
    reboot
     
    # -12. post setup
    curl -LO larbs.xyz/larbs.sh
    bash larbs.sh