lk/distros/arch/basic-install.md

186 lines
2.3 KiB
Markdown
Raw Normal View History

2022-01-16 18:20:39 +00:00
---
title: "basic-install"
2023-05-27 16:58:51 +00:00
tags: [ "Documentation", "arch" ]
2022-01-16 18:20:39 +00:00
---
2020-01-02 00:04:35 +00:00
Keyboard layout changed.
```bash
ls /usr/share/kbd/keymaps/**/*.map.gz
```
2020-01-02 00:04:35 +00:00
```bash
loadkeys uk.map.gz
```
2020-01-02 00:04:35 +00:00
Check if boot mode is UEFI
```bash
ls /sys/firmware/efi/efivars
```
2020-01-02 00:04:35 +00:00
Without efivars, the system must boot with BIOS.
# Check network's up
```bash
ping archlinux.org
```
2020-01-02 00:04:35 +00:00
Set system clock properly
```bash
timedatectl set-ntp true
```
2020-01-02 00:04:35 +00:00
Check disks
```bash
lsblk
```
2020-01-02 00:04:35 +00:00
Make partition
```bash
parted -s /dev/sda mklabel gpt
```
2020-01-02 00:04:35 +00:00
```bash
parted -s /dev/sda mklabel msdos
```
2020-01-02 00:04:35 +00:00
```bash
parted -s /dev/sda mkpart primary ext4 512 100%
```
2020-01-02 00:04:35 +00:00
```bash
parted -s /dev/sda set 1 boot on
```
2020-01-02 00:04:35 +00:00
```bash
mkfs.ext4 /dev/sda1
```
2020-01-02 00:04:35 +00:00
2021-07-18 18:04:17 +00:00
Use pacstrap to get the base install.
2020-01-02 00:04:35 +00:00
```bash
mount /dev/sda1 /mnt/
```
2020-01-02 00:04:35 +00:00
```bash
pacstrap /mnt base base-devel vim linux linux-firmware
```
2020-01-02 00:04:35 +00:00
Make fstab notes for new system.
```bash
genfstab -U /mnt >> /mnt/etc/fstab
```
2020-01-02 00:04:35 +00:00
```bash
arch-chroot /mnt
```
2020-01-02 00:04:35 +00:00
```bash
echo 'en_GB.UTF-8' > /etc/default/locale
```
2020-01-02 00:04:35 +00:00
```bash
pacman -Sy networkmanager grub
```
2020-01-02 00:04:35 +00:00
For legacy:
```bash
grub-install --target=i386-pc /dev/sda
```
2020-01-02 00:04:35 +00:00
For EFI:
```bash
sudo pacman -S efibootmgr
```
```bash
mkdir /boot/efi
```
```bash
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --remmovable
```
```bash
grub-mkconfig -o /boot/grub/grub.cfg
```
2020-01-02 00:04:35 +00:00
set local time
```bash
ln -sf /usr/share/zoneinfo/Europe/Belgrade /etc/localtime
```
2020-01-02 00:04:35 +00:00
Find the desired locale's and uncomment them.
```bash
vi /etc/locale.gen
```
2020-01-02 00:04:35 +00:00
```bash
locale-gen
```
2020-01-02 00:04:35 +00:00
Make your keyboard changes permenent with:
```bash
vi /etc/vconsole.conf
```
2020-01-02 00:04:35 +00:00
Then set: `KEYMAP=uk.map.gz`
2020-01-02 00:04:35 +00:00
unsure about this bit - is this name just for the loadkeys function?
Make a hostname
2020-01-02 00:04:35 +00:00
```bash
echo pc > /etc/hostname
```
2020-01-02 00:04:35 +00:00
Set hostnames for network, or at least your own.
```bash
vi /etc/hosts
```
2020-01-02 00:04:35 +00:00
# This should have the following, at least:
127.0.0.1 localhost
::1 localhost
127.0.1.1 [hostname].localdomain [hostname]
If the system has a permanent IP address, it should be used instead of localhost.
Ping some sites to make sure the network's working
```bash
passwd
```
2020-01-02 00:04:35 +00:00
```bash
exit
```
2020-01-02 00:04:35 +00:00
```bash
umount -R /mnt
```
2020-01-02 00:04:35 +00:00
2023-05-27 16:58:51 +00:00
Remove that awful beep sound:
2020-01-02 00:04:35 +00:00
```bash
rmmod pcspkr
```
2020-01-02 00:04:35 +00:00
2023-05-27 16:58:51 +00:00
...and make the change permanent:
```bash
sudo echo "blacklist pcspkr" >> /etc/modprobe.d/nobeep.conf
```
2020-01-02 00:04:35 +00:00