arch linux install guide/tutorial 2017

How to install arch Linux (tutorial/guide)

Download arch linux and boot the live cd:

https://wiki.archlinux.de/title/Download

Change the keyboard layout and sync the time with ntp

 loadkeys de-latin1
 timedatectl set-ntp true

Create partitions (100MB SWAP, Rest /)

 fdisk /dev/sda
 o
 n
 p
 1
 ENTER
 +100M

 p
 //Here you see the 100MByte SWAP Partition

 n
 p
 2
 ENTER
 ENTER

 p
 //Here you can see two partitions (new one is /)

 w

Create the swap and the ext4 / partition

 mkswap /dev/sda1
 mkfs.ext4 /dev/sda2

Install arch linux to the / partition

 mount /dev/sda2 /mnt
 #for this you need the ethernet connection, if not -> error (fetch the basic system software)
 pacstrap /mnt base

Create the fstab for swap and / (root)

 swapon /dev/sda1
 genfstab -U /mnt >> /mnt/etc/fstab

Chroot /mnt and setup some stuff (time, locales, ip, hostname, …)

 arch-chroot /mnt
 ln -s /usr/share/zoneinfo/Europe/Berlin /etc/localtime
 hwclock --systohc
vim /etc/locale.gen
 #Activate
 de_DE.UTF-8 UTF-8
 locale-gen
nano /etc/vconsole.conf
 KEYMAP=de-latin1
nano /etc/hostname
 arch
nano /etc/hosts
 #add
 127.0.0.1 arch.localdomain arch
 ::1 arch.localdomain arch
nano /etc/systemd/network/wired.network
# static configuration
 #ip link show to find the network interface -> ens3
 [Match]
 Name=ens3

[Network]
 Address=192.168.2.137/24
 Gateway=192.168.2.1

or:
# dhcp configuration

 [Match]
 Name=en*

 [Network]
 DHCP=ipv4


nano /etc/resolv.conf
 domain mattionline.lan
 nameserver 192.168.2.1
systemctl enable systemd-networkd
passwd

Create the initramfs (filesystem/ramdisk for kernel at kernelboot when the disk is not loaded)

mkinitcpio -p linux

 

Setup the bootloader in the MBR (master boot record) before the SWAP partition starts (filesystem level / zeroth partition)

 pacman -S grub

 grub-install /dev/sda

 cd /boot/grub

 grub-mkconfig > grub.cfg
 exit

 cd
 umount /mnt

//throw your install image (iso) out of the boot order

After the reboot it could be that your resolv.conf is resetted and you have to reconfigure this file

// update -> pacman -Syu

pacman -S openssh

systemctl enable sshd

systemctl start sshd

nano /etc/ssh/sshd_config -> PermitRootLogin yes, PasswordAuthentication yes (copy ssh key and change it)

#install gui if it is a desktop system
pacman -S xfce4 xfce4-goodies human-icon-theme
useradd -m username

passwd username

#gui if it is a desktop system

pacman -S xfce4 xfce4-goodies human-icon-theme xorg xterm xorg-xinit

nano .xinitrc

exec startxfce4

chmod +x .xinitrc

nano .bash_profile

if [ -z „$DISPLAY“ ] && [ -n „$XDG_VTNR“ ] && [ „$XDG_VTNR“ -eq 1 ]; then
exec startx
fi

# xinitrc sets display manager, bash profile starts it

https://wiki.archlinux.org/index.php/installation_guide
https://wiki.archlinux.org/index.php/systemd-networkd

Kommentar verfassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.