- Lenovo Thinkpad E14G3 (20Y7004ETX)
- AMD Ryzen 7 5700U
- 16GB RAM
- 1TB SSD
- 14" FHD
Boot up Arch Linux ISO and do the following:
- Disable the annoying beep sound:
rmmod pcspkr
- Bring up WiFi via
iwctl station wlan0 connect <SSID>
- Have some coffee ☕
timedatectl
export DRIVE=/dev/nvme0n1
(Use lsblk
to determine the correct drive to install)
sgdisk --zap-all $DRIVE
-Z, --zap-all
Zap (destroy) the GPT and MBR data structures and then exit. This option works much like -z, but as it wipes the MBR as well as the GPT, it's more suitable if you want to repartition a disk after using this option, and completely unsuitable if you've already repartitioned the disk.
sgdisk --clear \
--new=1:0:+512MiB --typecode=1:ef00 --change-name=1:EFI \
--new=2:0:+16GiB --typecode=2:8200 --change-name=2:swap \
--new=3:0:0 --typecode=3:8300 --change-name=3:system $DRIVE
lsblk -o +PARTLABEL
mkfs.fat -F 32 -n EFI /dev/disk/by-partlabel/EFI
mkswap /dev/disk/by-partlabel/swap
mkfs.ext4 -L system /dev/dis/by-partlabel/system
mount LABEL=system /mnt
mount --mkdir LABEL=EFI /mnt/boot
swapon /dev/disk/by-partlabel/swap
pacstrap -K /mnt base linux linux-firmware
genfstab -L /mnt >> /mnt/etc/fstab
-L
Use labels for source identifiers (shortcut for -t LABEL).
arch-chroot /mnt
pacman -S vim
# Set the time zone
ln -sf /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
# Set the Hardware Clock from the System Clock, and update the timestamps in /etc/adjtime.
hwclock --systohc
# Uncomment desired locales
vim /etc/locale.gen
# Generate the locales
locale-gen
# Create the locale.conf and set LANG variable
echo LANG=tr_TR.UTF-8 > /etc/locale.conf
# Create the hostname
vim /etc/hostname
# Set the root password
passwd
Create a backup of the original config:
cp /etc/mkinitcpio.conf /etc/mkinitcpio.conf.orig
Regenerate:
mkinitcpio -p linux
export CPU_ARCH=amd # amd or intel
Processor manufacturers release stability and security updates to the processor microcode. These updates provide bug fixes that can be critical to the stability of your system. Without them, you may experience spurious crashes or unexpected system halts that can be difficult to track down.
All users with an AMD or Intel CPU should install the microcode updates to ensure system stability.
pacman -S $CPU_ARCH-ucode
Make sure the system has booted in UEFI mode and that UEFI variables are accessible:
ls /sys/firmware/efi/efivars
Use bootctl
to install systemd-boot into the EFI system partition:
bootctl install
Created "/boot/EFI"
Created "/boot/EFI/systemd"
Created "/boot/EFI/BOOT"
Created "/boot/loader"
Created "/boot/loader/entries"
Created "/boot/EFI/Linux"
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/systemd/systemd-bootx64.efi"
Copied "/usr/lib/systemd/boot/efi/systemd-bootx64.efi" to "/boot/EFI/BOOT/BOOTX64.EFI"
Created "/boot/xxxxxx"
Random seed file /boot/loader/random-seed successfully written (512 bytes).
Created EFI boot entry "Linux Boot Manager".
/boot/loader/loader.conf
:
default arch*.conf
timeout 5
editor no
console-mode auto
/boot/loader/entries/arch.conf
:
title Arch Linux
linux /vmlinuz-linux
initrd /<CPU-ARCHITECTURE>-ucode.img
initrd /initramfs-linux.img
options root=<ROOT-PARTITION-UUID> rw audit=0 acpi_backlight=vendor splash
<ROOT-PARTITION-UUID>
:lsblk -o NAME,UUID | grep nvme0n1p3 | awk '{print $NF}'
<SWAP-PARTITION-UUID>
:lsblk -o NAME,UUID | grep nvme0n1p2 | awk '{print $NF}'
<CPU-ARCHITECTURE>
: value of$CPU_ARCH
audit=0
: disable audit logsacpi_backlight=vendor
: prefer vendor specific driver for backlight (see the other options)splash
: show splash during boot
pacman -S netctl wpa_supplicant dhcpcd dialog
systemctl enable systemd-networkd.service
systemctl enable systemd-resolved.service
systemctl enable netctl.service
systemctl enable wpa_supplicant.service
systemctl enable dhcpcd.service
wifi-menu
netctl list
netctl enable <profile>
netctl is-enabled <profile>
useradd -G wheel -m emin
passwd emin
pacman -S sudo vi
visudo # uncomment "%wheel ALL=(ALL) ALL"
pacman -S git wget rust base-devel
mkdir /home/emin/gh
cd /home/emin/gh/
git clone https://aur.archlinux.org/paru
cd paru/
makepkg -si
pacman -S xorg-server xorg-xinit xterm
Also, install xf86-video-amdgpu
or xf86-video-intel
based on CPU architecture respectively.
- https://gist.github.com/orhun/02102b3af3acfdaf9a5a2164bea7c3d6
- https://wiki.archlinux.org/title/Installation_guide
- https://wiki.archlinux.org/title/Systemd-boot
- https://wiki.archlinux.org/title/Microcode
- https://wiki.archlinux.org/title/Systemd-boot
- https://wiki.archlinux.org/title/Systemd-networkd
- https://wiki.archlinux.org/title/Systemd-resolved
- https://wiki.archlinux.org/title/Netctl