Win10 + Arch Linux dual boot step (UEFI)

Prerequired

  • use Microsoft online tool to make USB installer
  • use Rufus to make Arch Linux USB installer (In Win10) (or try treminal command in Mac/Linux/Win10)

Install arch linux

  1. Partition, format & mount

    use cfdisk <DISK_NUMBER>fdisk

    Mount pointPartition typeSuggested Size
    /bootEFI system partition550MB ~ 1GB
    /Linux x86_x64 root23GB~32GB
    [SWAP]Linux swap512MB~3GB
    /homeLinux homeremainder of the device
    format
    mkfs.vfat -F32 /dev/sdxN        // EFI only
    mkfs.ext4 /dev/sdxN             // root & home
    mkswap /dev/sdxN                // swqp only
    swapon /dev/sdxN
    
    mount
    mount /dev/sdxN  /mnt            // root = /mnt
    mkdir /mnt/boot                 // mount EFI partition to here
    mkdir /mnt/home                 // home = /mnt/home
    mount /dev/sdxN /mnt/boot
    mount /dev/sdxN /mnt/home
    
  2. make sure network work properly. (ping 8.8.8.8)

  3. timedatectl set-ntp true

  4. move the nearlest postion line to top of file at /etc/pacman.d/mirrorlist and install necessary packagre by run cmd below: pacstrap /mnt base base-devel linux linux-firmware archiso nano vim then genfstab -U /mnt >> /mnt/etc/fstab

  5. Setting installed system

    run arch-chroot /mnt to change into it

    time & zone setting
    ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
    hwclock --systohc
    
    locale setting

    edit by run nano /etc/locale.gen and uncomment these lines below:

    en_US.UTF-8 UTF-8
    zh_CN.UTF-8 UTF-8
    zh_TW.UTF-8 UTF-8
    

    then run locale-gen and add below line to /etc/locale.conf:

    LANG=en_US.UTF-8
    
    network
    • echo myhostname >> /etc/hostname
    • edit /etc/hosts and add:
      127.0.0.1	localhost
      ::1		localhost
      127.0.1.1	myhostname.localdomain	myhostname
      
    password

    Set login password by passwd

    bootloader (grub)
    pacman -S grub efibootmgr
    mkdir /boot/efi
    mount /dev/sdxN /boot/efi            // mount EFI partition to here
    grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
    grub-mkconfig -o /boot/grub/grub.cfg
    

    then

    exit         // exit chroot
    
    umount -R /mnt
    reboot
    
  6. Install Desktop (KDE)

    use default user root without password to login and install desktop enviroment:

    pacman -S xorg xorg-server xorg-xinit xorg-apps
    pacman -S plasma kde-applications
    pacman -S sddm sddm-kcm
    systemctl enable sddm
    

    relogin and select KDE enviroment in login UI

  7. Optional
    • Chat app (Line, Telegram)
    • Develop IDE (vscode, JetBrain ToolBox)
    • Browser (Chrome)
    • VCS (git)
    • IME (gcin or ibus)
    Get all of above from two way:
    1. pacman
    2. from AUR:
    pacman base base-devel       // Prerequired, if installed then ignore it
    pacman -Syyu                 // Update package
    
    git clone https://aur.archlinux.org/XXXXX.git
    cd XXXXX
    makepkg -si
    

Install Win10

  • Disable CSM in BIOS (avoid legacy mode installed)
  • If need partition manually, use Shift + F10 to open cmd when installing win10 and run below command:
        Diskpart
        clean
        convert gpt
        create partition efi size=100
        create partition primary
    

    size unit = MB

  • … Happy next-step installing …
  • After installing finished, run System Information and check BIOS Mode equal to UEFI

Re-gen grub config

To discover Win10 efi boot setting:

grub-mkconfig -o /boot/grub/grub.cfg

Q&A

  1. Update package by running pacman -Syu timeout ??
  • check /etc/resolve.conf dns address
# Google IPv4 nameservers
nameserver 8.8.8.8
nameserver 8.8.4.4
# Google IPv6 nameservers
nameserver 2001:4860:4860::8888
nameserver 2001:4860:4860::8844
  • update mirrorlist manually by
sudo curl -o /etc/pacman.d/mirrorlist "https://www.archlinux.org/mirrorlist/?country%3DTW%26protocol%3Dhttps%26ip_version%3D4%26ip_version%3D6"