-
Notifications
You must be signed in to change notification settings - Fork 4
Arch installation
This is the method I find most convenient for installing Arch in my personal desktop. Yours may vary slightly, but this is what I usually follow. Official installation guide: Arch Wiki.
Disclaimer: Read everything from the official guide; don't assume anything from this one. The installation depends on your specific system.
To check the boot mode:
# cat /sys/firmware/efi/fw_platform_size
To test your internet connection:
# ping google.com
I recommend using # cfdisk with the GPT label for this step.
You'll need three partitions:
- Boot (300MiB or > 1 GiB if installing multiple kernels)
- Swap (Half your RAM is more than enough; if planning on hibernating, use your full RAM)
- Root (Use the rest of the available space)
# mkfs.ext4 /dev/[root_partition]# mkswap /dev/[swap_partition]# mkfs.fat -F 32 /dev/[efi_system_partition]
# mount /dev/[root_partition] /mnt# mkdir -p /mnt/boot/efi# mount /dev/[efi_system_partition] /mnt/boot/efi# swapon /dev/[swap_partition]
Install your desired packages, for example:
# pacstrap -K /mnt base linux linux-firmware base-devel grub efibootmgr networkmanager intel-ucode nano
If the installation fails, do # pacman -Sy archlinux-keyring and then repeat the above command.
Generate an fstab:
# genfstab -U /mnt >> /mnt/etc/fstab
To change root into the new system:
# arch-chroot /mnt
Set the timezone:
# ln -sf /usr/share/zoneinfo/[Region]/[City] /etc/localtime
Run:
# hwclock --systohc
Uncomment your needed locales from /etc/locale.gen, for example:
en_US.UTF-8 UTF-8
es_MX.UTF-8 UTF-8Then run:
# locale-gen
Set it by editing /etc/locale.conf and adding one of the previous locales, for example:
LANG=en_US.UTF-8
Similarly, set your keyboard layout:
# loadkeys [layout]
You can see available layouts with # localectl list-keymaps. Edit /etc/vconsole.conf and set it there, for example:
KEYMAP=la-latin1
Edit /etc/hostname and add your hostname there.
Set a password:
# passwd
Create a user:
# useradd -m -G wheel -s /bin/bash [name]
# passwd [name]
Add the user to the sudoers by uncommenting the %wheel ALL=(ALL) ALL section:
# EDITOR=nano visudo
Enable the network service to have internet access:
# systemctl enable NetworkManager
Install GRUB:
# grub-install /dev/[device]
Then enable os-prober by editing /etc/default/grub and uncommenting #GRUB_DISABLE_OS_PROBER=false.
Finally, update the configuration:
# grub-mkconfig -o /boot/grub/grub.cfg
Exit the chroot environment by typing # exit, unmount all partitions with # umount -a, and finally # reboot.
If you have Windows already installed on another drive and want to make it accessible via GRUB:
- Install os-prober package, which searches for other installed systems (
# pacman -S os-prober). - Use
fdisk -lor similar to identify the EFI partition from Windows, example:
$ fdisk -l
Disk /dev/sdb: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SA400S3
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 5693B4F1-3895-4A2F-9EB7-1360A1A59564
Device Start End Sectors Size Type
/dev/sdb1 2048 206847 204800 100M EFI System <- This one!
/dev/sdb2 206848 239615 32768 16M Microsoft reserved
/dev/sdb3 239616 467739037 467499422 222.9G Microsoft basic data
/dev/sdb4 467740672 468858879 1118208 546M Windows recovery environment
- Mount the EFI partition (
# mount /dev/[efi_system_partition] /mnt). - Run
sudo os-proberto check if it detects the Windows system. - Reload the GRUB config file with
# grub-mkconfig -o /boot/grub/grub.cfg.