— Renge 2024/08/16 19:56
This is a list of commands from the official ArchWiki, edited to just be pasted into the console in the install medium when installing a blank Arch instance with my presets. Once finished, you will be left with a regular console with most programs pre-installed, and a command (or two) away from setting up Wi-Fi and continuing further with installation, for example a proper window manager. For that, just follow the General recommendations from the ArchWiki.
This guide assumes you want a basic install after reboot, with NO BOOTLOADER because you already have another from a previous Linux distro (say, Debian). You also use Wi-Fi and don't want to fuck around with it and make yourself depressed from it not working after reboot and having to reuse the install media to troubleshoot. In case you use Ethernet, you can just skip Wi-Fi-related steps and save yourself the trouble. Now, let's-la go!
loadkeys cz-qwertz - load the QWERTZ Czech layout
optional - setfont ter-132b - make the font bigger (useful for big screens)
ip link - make sure your Wi-Fi interface is listed! If not, it may be down thanks to rfkill
iwctl - start the iwd interface to configure the Internet
device list - note down which device you use and its name
device [name] set-property Powered on - power on the interface
adapter [name] set-property Powered on - power on the adapter
station [name] scan - scan for available networks
station [name] get-networks - list the available networks
station [name] connect [ssid] - connect to network [ssid]
That should connect you to the Wi-Fi. If not, troubleshoot using the ArchWiki page for iwctl. You can now exit.
ping archlinux.org - verify your connection works
The clock might be off due to timezones. You can use timedatectl to mess with that if necessary.
Be very careful here, a slight mess up could COMPLETELY FUCK UP YOUR DRIVE! As this guide assumes you already have at least one OS installed, this could very well ruin all your data. Triple-check everything and ideally have all your data backed up beforehand.
fdisk -l - list all disks, note down which one is your used one
fdisk /dev/[name] - start fdisk with your drive, [name] could be sda or nvme0n1 or something similar
Using fdisk, create a main Linux partition / and note down which partition is the ESP (EFI system partition). That's where your bootloader resides. The minimum requirements for the root (/) partition is around 2GB for a regular Arch install and the ESP should have at least 120MiB of free space (for 2 kernels). Windows creates a 260MiB partition, which is enough for itself, a Debian install and at least 1 kernel for Arch. YMMV though. Once you're done, save your work with w. Once you do that, all changes are irreversibly saved! Now, we will format the root partition.
mkfs.ext4 /dev/[root] - format the root as ext4. [root] should be the root partition, something like sda5, nvme0n1p5
mount /dev/[root] /mnt - mount the root partition to /mnt on the live system
mount –mkdir /dev/[esp] /mnt/boot - mount the ESP to /mnt/boot, creating the live folder in the process
This is where the fun and true customization starts. You will now set up all package mirrors and install the basic packages and the kernel/firmware. This list is very much customizable, however this is what I use by default, and the rest of the guide might depend on some packages to be installed without any similar packages around. If you're editing the list, make sure the rest is compatible.
nano /etc/pacman.d/mirrorlist - edit the mirrorlist. For latency reasons, pick regional ones near you to be on top
pacstrap -K /mnt base linux linux-firmware intel-ucode fsck e2fsprogs ntfs-3g sof-firmware iwd nano curl wget git nvidia - install the base system alongside basic programs, network and firmware
This section contains a lot of commands used separately, so pay attention to each one.
genfstab -U /mnt » /mnt/etc/fstab - generate an fstab file (please check the file afterwards for errors)
arch-chroot /mnt - chroot into your new system for further config
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime - change the timezone using the Region/City format (relative to timedatectl but for your new system)
hwclock –systohc - generate /etc/adjtime (only if your hardware clock is in UTC! This is not the case if the last OS you ran is Windows)
nano /etc/locale.gen – uncomment en_US.UTF-8 and cs_CZ.UTF-8
locale-gen - generate the locale file
nano /etc/locale.conf - and paste in LANG=en_US.UTF-8 (or cs_CZ.UTF-8)
nano /etc/vconsole.conf - and paste in KEYMAP=cz-qwertz; changes the keyboard layout permanently in your new system
nano /etc/hostname - write your preferred hostname in
In case you modified something, you should recreate the initramfs. If you're sure nothing changed since pacstrap, you can skip this step. After this, you will be this close to finishing!
mkinitcpio -P - recreate the initramfs (also lets you make sure your ESP is healthy)
passwd - set the root password (sudo needs to be configured after reboot cuz it's complicated as fuck :)
Here would be the bootloader setup (ex. GRUB). THIS IS SKIPPED HERE, as it is assumed you already have a Linux-esque bootloader that actively looks for other operating systems.
exit - get out of chroot
umount -R /mnt - unmount before rebooting, to make sure everything is gracefully saved and closed
reboot - the final magical step
This is the time to reboot to an already working Linux distro to reconfigure your bootloader to detect your new beautiful Arch instance. Once that's done, you can boot into your instance and continue setting it up. The Wi-Fi is configured the exact same way as in the live system. That's it from me for now, enjoy using Arch Linux! :3