3

Advanced Arch Linux Installation

 2 years ago
source link: https://fishlive.org/en/blog-tech-art/arch
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Advanced Arch Linux Installation

18th Sep 2020

guide linux arch

Gallery Blog Advanced Arch Linux Installation

Arch Base System Installation

Download Arch ISO, use Rufus software to flash Disk.

Use cfdisk -l, use cfdisk /dev/nvmeXn1, check which partitions p5, p6. Create UEFI by +256M, change partition type to EFI System (type 1), root partition set to Linux system.

Create filesystem:

mkfs.fat -F32 /dev/sda1
mkfs.ext4 /dev/sda2

If wifi:  wifi-menu, ping google.com (8.8.8.8)

Select the arch mirror

pacman -Syy
pacman -S reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak

select your country in reflector to find nearest point: US, CZ, DE etc.

reflector -c "US" -f 12 -l 10 -n 12 --save /etc/pacman.d/mirrorlist

pacman -Syu  => Just for check that the mirrors works! Do NOT start this installation to flash disk :-)

Install Arch Linux

mount /dev/sda2 /mnt

I prefer just linux, without linux-lts:

pacstrap /mnt base base-devel linux linux-headers linux-firmware vim neovim nano

For full linux and linux-lts you can use this:

pacstrap /mnt base base-devel linux linux-headers linux-firmware linux-lts linux-lts-headers vim nano

Configure the installed Arch system

genfstab -U /mnt >> /mnt/etc/fstab

Go to your system by chroot, this line can be used for repair system, fixing damages etc.

arch-chroot /mnt

This command is possible to use for repair system too! Boot with flash disk and use arch-chroot and correct or reinstall software is possible!

Setting Timezone

timedatectl list-timezones
timedatectl set-timezone Europe/Prague
ln -sf /usr/share/zoneinfo/Europe/Prague /etc/localtime
hwclock --systohc    (will generate /etc/adjtime)

Setting up Locale

Edit file /etc/locale.gen contains all the local settings and system language in a commented format. Use en_US.UTF-8 UTF-8

locale-gen
echo LANG=en_US.UTF-8 > /etc/locale.conf
export LANG=en_US.UTF-8

Network configuration

echo r7arch > /etc/hostname
touch /etc/hosts
127.0.0.1 localhost
::1 localhost
127.0.1.1 r7arch

Set up root passwd

passwd

My Fundamental Software

pacman -S openssh networkmanager wpa_supplicant netctl
systemctl enable NetworkManager
systemctl enable sshd

mkinitcpio -p linux
pacman -S amd-ucode  or pacman -S intel-ucode
pacman -S xorg

Select mesa for amdgpu cards and nvidia nvidia-utils for nvidia gpus (with lts suffix for linux-lts kernels)

pacman -S mesa  or nvidia nvidia-utils nvidia-lts nvidia-utils-lts

pacman -S virtualbox-guest-utils xf86-video-vmware  (for virtualbox installation)

NVIDIA TTY not show

sudo vim /etc/mkinitcpio.conf

Inside file add this MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm)

sudo mkinitcpio -P

In /etc/mkinitcpio.conf

MODULES="nvidia nvidia_modeset nvidia_uvm nvidia_drm"

FILES="/etc/modprobe.d/nvidia.conf"

And /etc/modprobe.d/nvidia.conf

options nvidia_drm modeset=1

I've also added nvidia-drm.modeset=1 to the kernel parameters. Works great. (https://wiki.archlinux.org/index.php/kernel_parameters)

lspci -vnn | grep VGA

Linux User Addition

useradd -m -g users -G wheel,storage,power -s /bin/bash box
passwd box
pacman -S sudo
EDITOR=vim visudo,  uncomment %wheel ALL=(ALL) ALL

Install Grub bootloader

Make sure that you are still using arch-chroot. Install required packages:

pacman -S grub efibootmgr dosfstools os-prober mtools

Create the directory where EFI partition will be mounted:

mkdir /boot/efi

Now, mount the ESP partition you had created

mount /dev/sda1 /boot/efi

Install grub like this:

grub-install --target=x86_64-efi --bootloader-id=ARCH --efi-directory=/boot/efi --recheck

One last step:

grub-mkconfig -o /boot/grub/grub.cfg

Install Window Manager

yay -S awesome-git

pacman -S i3  (select all, except 2 i3wm)

sudo pacman -S qtile

Additional all thousands lines 

sudo pacman -S --needed git wget yajl go
mkdir temp
cd temp/
=> yay is deprecated now, use paru
git clone https://aur.archlinux.org/yay-git.git
cd yay-git && makepkg -i
makepkg -i
yay -S pamac-aur
pamac is used for selection of all OPTIONAL dependencies by 1-14,5,8 syntax
sudo pamac install mc
sudo pamac install xorg-xinit
sudo pamac install rxvt-unicode
sudo pamac install termite alacritty firefox volumeicon picom rofi xdotool parcellite
yay -S numix-gtk-theme
yay -S ttf-font-awesome-4
sudo pamac install pulseaudio-alsa
sudo pamac install conky neofetch
sudo pacman -S grub-customizer
sudo pamac install plasma
sudo pamac install kde-applications
sudo pamac install gnome gnome-extra
sudo pamac install kvantum-qt5
sudo pamac install polkit-gnome
sudo pamac install polkit-kde-agent
sudo pamac install ntfs-3g
sudo pamac install lxappearance gnome-tweaks
sudo pamac install ranger
reboot
activate aur in pamac
sudo pamac install mpv
sudo pamac install awesome-git
sudo pamac install krusader
sudo pamac install jdk11-openjdk openjdk11-src jdk8-openjdk openjdk8-src maven terminator gnome-disk-utility
sudo pamac install zsh zsh-completions
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
startx
: 1597611658:0;git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
: 1597611671:0;vim ~/.zshrc
: 1597611695:0;sudo pamac install neovim
: 1597611887:0;git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
: 1597612161:0;git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
: 1597612170:0;~/.fzf/install
: 1597612524:0;git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
: 1597612570:0;git clone https://gitlab.com/dwt1/shell-color-scripts.git
: 1597612575:0;cd shell-color-scripts
: 1597612597:0;makepkg -cf
: 1597612614:0;sudo pacman -U shell-color-scripts-0.1-1-x86_64.pkg.tar.zst
: 1598020959:0;sudo pamac install opensvn
: 1598021967:0;sudo flatpak install slack
: 1598022179:0;sudo flatpak install spotify
: 1598022469:0;git clone https://github.com/vinceliuice/grub2-themes.git
: 1598022482:0;cd grub2-themes
: 1598022499:0;sudo ./install.sh --vimix --2k
: 1598022613:0;yay -S videoinfo
: 1598022676:0;sudo pamac install hwinfo
: 1598022684:0;sudo hwinfo --framebuffer
: 1598023009:0;sudo grub-mkconfig -o /boot/grub/grub.cfg
: 1598023129:0;sudo pamac install ntfs-3g
: 1598023213:0;sudo pamac install samba
: 1598023229:0;sudo pamac install cifs-utils
: 1598023650:0;sudo systemctl status nfs-server.service
: 1598023658:0;sudo systemctl enable nfs-server.service
: 1598023669:0;sudo systemctl enable nfs-client.target
: 1598023696:0;sudo systemctl start nfs-server.service
: 1598023703:0;sudo systemctl start nfs-client.target
: 1598024033:0;cat /etc/fstab
: 1598024084:0;sudo pacman -S nfs-utils
: 1598024092:0;sudo mount ~/nfs/photo
: 1598025197:0;yay -S numlockx
: 1598026349:0;sudo pamac install xdg-utils
: 1598644414:0;sudo pamac install xorg-server-xephyr
: 1598644432:0;Xephyr -br -ac -noreset -screen 1980x1024 :1
: 1598644465:0;DISPLAY=:1 awesome
: 1598645098:0;sudo pacman -S network-manager-applet
: 1598645132:0;yay -S alttab-git
: 1598645154:0;yay -S copyq
: 1598645163:0;yay -S xautolock
: 1598645473:0;Xephyr -br -ac -noreset -screen 1980x1024 :1 &
: 1598645483:0;DISPLAY=:1 awesome
: 1598727885:0;yay -S xinit-xsession
: 1616787490:0;Xephyr :1 -ac -br -noreset -screen 2048x1080 & 
: 1616787526:0;DISPLAY=:1.0 awesome -c ~/.config/awesome/rc.lua.test
: 1616927376:0;cat .config/awesome/autorun.sh
: 1616927387:0;sudo pamac install copyq
: 1616927399:0;sudo pamac install clipmenu
: 1616927420:0;sudo pamac install xautolock
: 1616927424:0;cat .config/awesome/autorun.sh
: 1616927458:0;cat .config/awesome/autorun.sh
: 1616927468:0;sudo pamac install remmina
: 1616927823:0;rofi-theme-selector
: 1616927855:0;startx ~/.xinitrc awesome
: 1616927940:0;startx ~/.xinitrc kde
: 1616932499:0;cat xmenu.sh
: 1616932510:0;xmenu ./xmenu.sh
: 1616932712:0;cd git/github/xdg-xmenu
: 1616932723:0;./xdg-xmenu -i Papirus-Dark > menu
: 1616932765:0;cp xmenu.sh ~/.config/xmenu
: 1616932950:0;sudo pamac install kitty
: 1616947863:0;sudo pamac install imagemagick
: 1616948298:0;sudo ./install.sh -t slaze
: 1616950114:0;sudo pamac install kbd
: 1616950136:0;sudo pamac install terminus-font
: 1616950177:0;cat /etc/vconsole.conf
: 1616950352:0;showconsolefont
: 1616950477:0;setfont lat2-16 -m 8859-2
: 1616950487:0;setfont lat2-10 -m 8859-2
: 1616950491:0;setfont lat2-8 -m 8859-2
: 1616956523:0;sudo systemctl status systemd-logind.service
: 1616956546:0;cat /etc/sddm.conf.d/kde_settings.conf
: 1616956837:0;sudo systemctl status display-manager.service
: 1616956854:0;file /etc/systemd/system/display-manager.service
: 1616957321:0;sudo systemctl enable sddm.service
: 1616957326:0;file /etc/systemd/system/display-manager.service
: 1616957550:0;sudo systemctl disable sddm.service
: 1616957554:0;file /etc/systemd/system/display-manager.service
: 1616957562:0;startx ~/.xinitrc kde
: 1616957811:0;sudo systemctl enable sddm.service
: 1616999374:0;ls -1 /usr/share/xgreeters/
: 1616999465:0;ls -1 /usr/share/lightdm-webkit
: 1616999469:0;ls -1 /usr/share/lightdm-webkit/themes
: 1616999522:0;cat /etc/lightdm/lightdm.conf
: 1616999528:0;subl /etc/lightdm/lightdm.conf
: 1616999633:0;subl /etc/lightdm/lightdm-webkit2-greeter.conf
: 1616999840:0;sudo systemctl enable lightdm
: 1617052291:0;sudo pamac install nvidia-settings
: 1617052303:0;sudo nvidia-settings --assign CurrentMetaMode="nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
: 1617052364:0;sudo vim /etc/X11/xorg.conf.d/20-nvidia.conf
: 1617094705:0;ln -s /mnt/hdd1t/data/Videos ~/Videos/sdc-videos
: 1617094806:0;youtube-dl -f bestvideo+bestaudio --merge-output-format mkv https://www.youtube.com/watch\?v\=UAsueiktITI\&t\=656s

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK