Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Arch Linux 5.3.1 Installation
- 11.Okt. 2019
- ## Pre Requirements
- ### Download the ISO
- Check the iso and the pgp fingerprint.
- ~~~bash
- md5sum archlinux-2019.10.01-x86_64.iso
- pacman-key -v archlinux-version-x86_64.iso.sig
- ~~~
- ### Create Live USB-Stick
- ~~~bash
- dd bs=4M if=~/dwn/archlinux-2019.10.01-x86_64.iso of=/dev/sdb status=progress oflag=sync
- ~~~
- start from uefi usb partition
- ~~~
- loadkeys de-latin1
- ~~~
- ### Check inet conection
- ~~~bash
- ip link
- dhcpcd enpXXXXXX
- ping -c3 archlinux.org
- ~~~
- ### Prepare ssh from antoher machine
- ~~~bash
- passwd
- ip addr show
- systemctl start sshd.service
- ~~~
- ### Login to remote machine
- ~~~bash
- ssh-keygen -R ipadress
- ssh root@ipadress
- ~~~
- ## Create Filesystem
- ### Partition the table
- create new gpt on nvme
- ~~~bash
- gdisk /dev/nvme0n1
- ~~~
- commands
- ~~~bash
- n > enter > enter > +512M > ef00
- n > enter > enter > enter > 8e00
- w
- ~~~
- ### crypt setup
- ~~~bash
- blkdiscard /dev/nvme0n1p2
- modprobe dm-crypt
- cryptsetup -c aes-xts-plain64 -y -s 512 luksFormat /dev/nvme0n1p2
- cryptsetup luksOpen /dev/sda2 lvm --allow-discards
- ~~~
- ### logical volume
- ~~~bash
- pvcreate /dev/mapper/lvm
- vgcreate main /dev/mapper/lvm
- lvcreate -L 30GB -n root main
- lvcreate -l 100%FREE -n home main
- ~~~
- ### formating partitions
- ~~~bash
- mkfs.fat -F 32 -n EFIBOOT /dev/nvme0n1p1
- mkfs.ext4 -L p_arch /dev/main/root
- mkfs.ext4 -L p_arch /dev/main/home
- ~~~
- ### mount partitions
- ~~~bash
- mount -L p_arch /mnt
- mkdir -p /mnt/boot
- mount -L EFIBOOT /mnt/boot
- mkdir /mnt/home
- mount /dev/mapper/main-home /hom
- mount /dev/mapper/main-root /
- ~~~
- ## install base system
- ~~~bash
- cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
- nano /etc/pacman.d/mirrorlist
- grep -E -A 1 ".*Germany.*$" /etc/pacman.d/mirrorlist.bak | sed '/--/d' > /etc/pacman.d/mirrorlist
- pacstrap /mnt base base-devel linux intel-ucode bash-completion neovim
- ~~~
- ### fstab erzeugen
- overwrite fstab settings
- ~~~bash
- genfstab -p /mnt > /mnt/etc/fstab
- ~~~
- ### system settings
- ~~~bash
- arch-chroot /mnt/
- echo myhost > /etc/hostname
- echo LANG=de_DE.UTF-8 > /etc/locale.conf
- nvim /etc/locale.gen
- locale-gen
- echo KEYMAP=de-latin1 > /etc/vconsole.conf
- echo FONT=lat9w-16 >> /etc/vconsole.conf
- ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
- ~~~
- ### Initramfs
- change in /etc/mkinitcpio.conf
- HOOKS=(base udev autodetect modconf block keyboard keymap encrypt lvm2 filesystems fsck shutdown)
- ~~~bash
- mkinitcpio -p linux
- ~~~
- ### Bootloader GRUB
- ~~~bash
- pacman -S efibootmgr dosfstools gptfdisk
- grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck --debug
- mkdir -p /boot/grub/locale
- cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
- nvim /etc/default/grub
- ~~~
- GRUB_CMDLINE_LINUX="cryptdevice=/dev/nvme0n1p2:main root=/dev/mapper/main-root"
- ~~~bash
- grub-mkconfig -o /boot/grub/grub.grub.cfg
- exit
- umount -R /mnt
- reboot
- ~~~
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement