ifconfig to check the network card.
Here wlan0 as default.
iwctl
station wlan0 scan
station wlan0 get-networks
station wlan0 connect select_network
Once you're done, type exit.
If you are using legacy bios boot,
you don't have to create the efi partition and the efibootmgr package.
Before partition the disk, make sure the target isn't the udisk.
also notice some disks names are different.
If it's a nvme disk it should be /dev/nvmeXnYpZ.
fdisk -l to check disks on your computer.
cfdisk to create partition table.
Part(s) | Type | Size |
---|---|---|
nvme0n1p1 | EFI | 300MiB |
nvme0n1p2 | swap | 4096MiB |
nvme0n1p3 | f2fs(or ext4) | Remain |
Formatting:
Here are some filesystems like: ext4, brtfs, xfs, f2fs...
mkfs.fat -F 32 /dev/nvme0n1p1
mkswap /dev/nvme0n1p2
swapon /dev/nvme0n1p2
mkfs.f2fs /dev/nvme0n1p3
If you want to make a ext4 partition disk for root(not account but one of disk partition instead),
then type this below:
mkfs.ext4 /dev/nvme0n1p3
Mounting:
mount /dev/nvme0n1p3 /mnt
mount --mkdir /dev/nvme0n1p1 /mnt/boot
Now you should setup the mirror to download the packages.
Some useful tools:
Arch mirrorlist
Arch generator
vim /etc/pacman.d/mirrorlist
Insert this code: Server = /your/mirror/$repo/os/$arch
Refresh your repo with: pacman -Syu.
pacstrap -K /mnt linux linux-firmware base \
base-devel efibootmgr grub \
networkmanager pipewire pipewire-{alsa,jack,pulse} mesa \
xorg xorg-server udisks2 gvfs ntfs-3g wget git vi vim \
wqy-microhei-lite terminus-font bluez bluez-utils \
alsa-{utils,plugins} zip {un,p7}zip tlp acpi{d,light}
Graphic card driver and microcode:
Graphic card driver:
intel: [vulkan-intel,intel-media-driver(gen5 or newer)
,libva-intel-driver(GMA4500 to gen8)]
amd: xf86-video-amd vulkan-radeon
Microcode:
intel cpu: intel-ucode;
amd cpu: amd-ucode;
pacstrap /mnt intel-ucode intel-media-driver vulkan-intel \
xf86-video-fbdev linux-firmware-qlogic
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
ls /usr/share/zoneinfo to check places.
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
hwclock --systohc
vim /etc/locale.gen
Find your locale and uncomment it.
Here I uncomment en_US.UTF-8 zh_CN.UTF-8
locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
echo your-hostname > /etc/hostname
Legacy:
grub-install --target=i386-pc /dev/...
Note: /dev/... is a partition part.
UEFI:
grub-install --target=x86_64-efi --efi-directory=/boot
vim /etc/default/grub
Find GRUB_CMDLINE_LINUX_DEFAULT and add these:
fbcon=nodefer
modprobe.blacklist=iTCO_wdt (disable watchdog)
resume=/dev/nvme0n1p2 (enable hibernate)
video=efifb:nobgrt
grub-mkconfig -o /boot/grub/grub.cfg
Add one account:
useradd -m -G audio,storage,video,wheel your-accountname
passwd your-accountname
visudo
Uncomment %wheel ALL=(ALL:ALL) ALL
Add hibernate:
vim /etc/mkinitcpio.conf
Find HOOKS=(...)
Add resume behind filesystems
It should look like this:
HOOKS=(... filesystem resume)
vim /etc/systemd/logind.conf
Uncomment HandleLidSwitch and HandleLidSwitchExternalPower
What is HandleLidSwitch and HandleLidSwitchExternalPower?
If you are using a laptop, when you close the lid,
usually the computer don't hibernate if you dont add these.
HandleLidSwitchExternalPower means if you are charging,
when you close the lid, what pc is going to do.
HandleLidSwitch=hibernate
HandleLidSwitchExternalPower=suspend
tty font:
echo FONT=ter-132n(n-normal b-bold) > /etc/vconsole.conf
High resolution with small window problem(Bigger resolution, bigger scale value):
echo GDK_DPI_SCALE=1.25 >> /etc/environment
echo GDK_SCALE=1.25 >> /etc/environment
If you are troubled with the intel or some graphic cards,
then add MESA_LOADER_DRIVER_OVERRIDE.
Notice your fps may be less than before.
echo MESA_LOADER_DRIVER_OVERRIDE=zink >> /etc/environment
mkinitcpio -P
exit
umount /mnt/boot
umount /mnt
reboot
Desktop configuration: Click here