§2023-05-31

試作機器: Intel X86_64 , 192.168.2.132


¶Step-01

  • Boot From The USB Stick,

    • make sure systemctl status sshd is running
    • useradd alexlai and set passwd axxx1nnn
    • set root password to b2nnnnnnn
    • ip ad to get the ip address
  • From other termial to ssh in and do the rest

archISO-01.png

¶Step-02

  • Check the system is using UEFI
    • dmesg|grep efi

¶Step-03

  • Partion Hard Disk as follows and format it

    Device     Boot     Start       End   Sectors   Size Id Type
    /dev/sda1           62500    500000    437501 213.6M ef EFI (FAT-12/16/32)
    /dev/sda2          500001 126330879 125830879    60G 83 Linux
    /dev/sda3       126330880 145156095  18825216     9G 82 Linux swap / Solaris
    /dev/sda4       145156096 468860927 323704832 154.4G 83 Linux
    
    • format
    root@archiso / # mkfs.fat -F32 /dev/sda1 
    root@archiso / # mkfs.ext4 /dev/sda2
    root@archiso / # mkswap /dev/sda3
    root@archiso / # mkfs.xfs -f /dev/sda4
    

¶Step-03

  • Select an appropriate mirror
    • First sync the pacman repository so that you can download and install software pacman -Syy
    • pacman -S reflector
    • cp -v /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
    • pacman -S python3 --> fix ModuleNotFoundError: No module named 'Reflector'
    • reflector -c "TW" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

¶Step-04

  • Install Arch Linux
    • mount /dev/sda2 /mnt
    • pacstrap /mnt base linux linux-firmware vim nano extra base-devel

¶Step-05

  • Configure the installed Arch system
    • genfstab -U /mnt >> /mnt/etc/fstab

¶Step-06

  • arch-chroot and enter the mounted disk as root
    • Setting up Locale, editing /etc/locale.gen
      • uncomment en_US.UTF-8 UTF-8, ja_JP.UTF-8 UTF-8, zh_TW.UTF-8 UTF-8
      • locale-gen
      • echo LANG=en_GB.UTF-8 > /etc/locale.conf
      • export LANG=en_GB.UTF-8
      • ln -sf /usr/share/zoneinfo/ROC /etc/localtime
      • pacman -S sudo and visudo
      • useradd -m -G wheel -u 1026 alexlai and passwd alexlai
      • passwd root
      • vim /etc/hostanme
      • pacman -S adobe-source-han-sans-jp-fonts adobe-source-han-serif-tw-fonts
      • pacman -S dhcpcd openssh and systemctl enable sshd dhcpcd

¶Step-07

  • Install Grub bootloader
    • pacman -S grub efibootmgr
    • mkdir /boot/efi
    • mount /dev/sda1 /boot/efi
    • grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi
    • grub-mkconfig -o /boot/grub/grub.cfg

  • Install grub on Non-UEFI systems
    • pacman -S grub
    • And then install grub like this (don’t put the disk number sda1, just the disk name sda):
      • grub-install /dev/sda
      • grub-mkconfig -o /boot/grub/grub.cfg

¶Step-08

  • exit from arch-chroot and reboot to see
Return to Top