hongy19’s blog

New Company Laptop


  • install chrome
    • chrome exist on company portal but couldn’t be installed due to Chinese great firewall. It asked me to download chrome standalone installer, ink
  • wsl migration
  • install wsl on new laptop with “wsl -d archlinux”
  • set passwd for root: passwd
  • pacman
    • pacman -Syu
    • cp /etc/pacman.d/mirrorlist.pacnew /etc/pacman.d/mirrorlist
    • uncommont chinese mirror
    • cp pacman.conf from old wsl /etc/pacman.conf
  • sudo
  • pacman -S vim sudo
  • EDITOR=vim visudo
  • wsl configuration
  • vim /etc/wsl.conf: add [user] default=xxx
  • cp wsl.conf from old wsl /etc/wsl.conf
  • cp .wslconfig from old windows laptop C:\Users\xxxuser
  • locale
  • update /etc/locale.gen -> locale-gen
  • add normal user
  • add user: useradd -m -G wheel -s /bin/bash hongy19
  • change user passed: passwd hongy19
  • copy file from old wsl to new wsl by onedrive
Read more ⟶

2026 05 Uki Secure Boot


I switch to uki + secure boot on ASUS R556L.

  • In order to use secure book, you have to switch to uki.
  • The process is to use kernel-install to build uki, secure boot and add kernel-install hook for pacman
    • mkinitcpio is used to produce ramdisk initramfs-linux.img.
    • sytemd-ukify is used to build uki from vmlinuz-linux and initramfs-linux.img.
    • system-ukify is used to sign uki.
    • systemd-boot is used to install private key on UEFI.
    • kernel-install use mkinitcpio and ukify to install/remove kernel.
  • uki with kernel-instal and systemd-ukify
    • kernel-install is part of systemd, no need to install it.
    • install systemd-ukify: pacman -S systemd-ukify
    • create /etc/kernel/install.conf and update it according to wiki.
    • copy /usr/lib/kernel/uki.conf to /etc/kernel/uki.conf and update it according to wiki.
    • create /etc/kernel/cmdline with cmd option “root=UUID=xxx-xxxx rw”
    • kernel-install(configuration file is /etc/kernel/install.conf) then use ukify (configuration file is /etc/kernel/uki.conf) to create uki and sign it.
    • create uki manually: kernel-install add $(uname -r) /boot/vmlinuz-linux
    • create uki manually: ukify build –linux=/boot/vmlinuz-linux –initrd=/boot/initramfs-linux.img –cmdline=“quiet rw”
    • create uki automatically with pacman: follow wiki
  • secure boot
    • follow guideline
    • generate signing keys -> sign the boot loader -> configure the ESP for auto-enrollment
    • reboot and switch to bios -> enable secure boot -> delete old key -> reboot -> you will see enroll new key
    • if bootloader could start, then boot load could work.
    • sign uki
      • uki couldn’t start if not signed, you also need to sign uki kernel throught kernel-install or ukify
      • kernel-install: kernel-install add $(uname -r) /boot/vmlinuz-linux
      • ukify: ukify build –config=/etc/kernel/uki.conf –linux=/boot/vmlinuz-linux –initrd=/boot/initramfs-linux.img –cmdline=“quiet rw”
Read more ⟶

Archlinux Install


Laptop HW

  • ASUS R556L
  • CPU/GPU
    • CPU is I5-4210U(Haswell) which equipped with HD Graphics 4400 (Gen 7.5) according to lscpu
    • Nvidia GF117M(Fermi/NVC0), GeForce 820M
  • Screen
    • 15.6inch display and resolution is 1366x768.

basic installation

  • download iso and boot it.
  • install according to installation guideline
  • close secure boot from laptop bios.
  • connect wifi with iwctl
  • partition
    • need partition for efi, /boot(optional, systemd-boot need XBOOTLDR) and /.
    • partition the disk with fdisk and EFI(UEFI) partition is mandatory for UEFI.
    • format partitions.
  • mount disk to /mnt, update pacman mirrolist
  • nstall essential package: pacstrap -K /mnt base linux linux-firmware vim iwd
  • genfstab -U /mnt » /mnt/etc/fstab
  • arch-chroot /mnt
  • ln -sf /usr/share/zoneinfo/Area/Location /etc/localtime
  • hwclock –systohc
  • locale-gen
  • mkinitcpio -P
  • passwd
  • install boot loader, see UEFI
  • necessary package: sudo, openssh, less, fzf, mesa

Network

  • systemd_networkd + iwd + systemd_resolved
  • if only configure wifi with iwctl, there is no dhcp to assign IP.
  • automatic dhcp:
    • systemd-networkd
    • update /etc/iwd.config to enable iwd dhcp.

basic application

  • vim man bash-completion
  • tmux fzf btop nmap dust bc rsync
  • chrony for datetime syncup
  • yay

UEFI

Bios + MBR is setup on 1981 by IBM and many limitation. UEFI + GPT is new boot procedure.

Read more ⟶