Difference between revisions of "User:Soloturn/Quick Installation guide UEFI"

From ArchWiki
Jump to navigation Jump to search
(yay cannot be compiled and installed out of archchroot, so do it later, after rebooting)
(remove pacaur)
Line 69: Line 69:
 
  exit
 
  exit
  
== install yay AUR helper ==
+
== reboot and configure ==
 +
=== install yay AUR helper ===
 
AUR make is not allowed as root, so become your user to clone and compile. after yay
 
AUR make is not allowed as root, so become your user to clone and compile. after yay
 
is installed, install the other AUR packages:
 
is installed, install the other AUR packages:
Line 78: Line 79:
 
  yay -S --needed - < /home/${myuser}/.config/pkglist-aur.txt
 
  yay -S --needed - < /home/${myuser}/.config/pkglist-aur.txt
  
== store pkglist to later install same packages from existing arch installation ==
+
=== store pkglist to later install same packages from existing arch installation ===
  $ pacman -Qqen > ~/.config/pkglist-abs.txt
+
become your user, check and update the package lists from repo if necessary
  $ pacman -Qqem > ~/.config/pkglist-aur.txt
+
cd
 +
  pacman -Qqen > ~/.config/pkglist-abs.txt
 +
  pacman -Qqem > ~/.config/pkglist-aur.txt
 +
git diff
  
== if windows is installed ==
+
=== if windows is installed ===
 
If windows is installed it might take precedence, so add an entry for the UEFI partitions rEFInd boot loader and set it after the USB device boot as second option. in the order just take the last number listed by efibootmgr:
 
If windows is installed it might take precedence, so add an entry for the UEFI partitions rEFInd boot loader and set it after the USB device boot as second option. in the order just take the last number listed by efibootmgr:
 
  # efibootmgr
 
  # efibootmgr
Line 91: Line 95:
 
in case the bios does not let the order change via efibootmgr, go to the bios and alter the boot order there.
 
in case the bios does not let the order change via efibootmgr, go to the bios and alter the boot order there.
  
== Boot and Configure ==
+
=== miscellaneous ==
arbitrary commands to configure
+
set network config for netctl, show week number, activate network time protocol
 
  # wifi-menu
 
  # wifi-menu
 
  $ gsettings set org.gnome.desktop.interface clock-show-date true  
 
  $ gsettings set org.gnome.desktop.interface clock-show-date true  
Line 98: Line 102:
 
  $ timedatectl set-ntp true
 
  $ timedatectl set-ntp true
  
use pacaur instead of pacman so the arch user repository (AUR) can be used seamless. check the script to install pacaur before running:
+
== maintain ==
 
$ curl -s https://gist.githubusercontent.com/Tadly/0e65d30f279a34c33e9b/raw/pacaur_install.sh | bash
 
 
 
 
 
== regular commands ==
 
 
upgrade, delete everything not installed from package cache, delete orphans
 
upgrade, delete everything not installed from package cache, delete orphans
 
  $ yay -Syu
 
  $ yay -Syu

Revision as of 17:24, 17 July 2019

This installation guide installs Arch Linux on a System with three partitions EFI, root, and home. Dual boot with windows 10 is possible, as well install on a USB disk or memory stick. No legacy technologies are considered, please use Installation Guide in such a case.

Format disk and mount partitions

Best do it with GParted and create the following partitions or make sure they exist:

  • the partition table is GPT
  • the EFI partition is FAT32, around 250MB
  • the root partition is ext4, around 35GB
  • the home partition is ext4, rest of the disk

rEFInd is used to find existing kernels resp operating systems to boot. reuse the existing EFI partition created by microsoft windows is possible. mount the root partition and the EFI partition into it.

mount /dev/sda5 /mnt
mkdir /mnt/esp
mount /dev/sda3 /mnt/esp

Install Arch

a user is created which is "archie"

export myuser=archie
export myhostname=hostn
pacstrap /mnt base
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt/
LANG=C perl -i -pe 's/#(en_US.UTF)/$1/' /etc/locale.gen
LANG=C perl -i -pe 's/#(de_CH.UTF)/$1/' /etc/locale.gen
locale-gen
echo 'LANG=en_US.UTF-8' > /etc/locale.conf
echo 'KEYMAP=de_CH-latin1' > /etc/vconsole.conf
ln -sf /usr/share/zoneinfo/Europe/Zurich /etc/localtime
echo $myhostname > /etc/hostname
pacman -S dialog wpa_supplicant refind-efi
mkdir -p /esp/EFI/Boot
cp /usr/share/refind/refind_x64.efi /esp/EFI/Boot/bootx64.efi
cp -r /usr/share/refind/drivers_x64/ /esp/EFI/Boot/
echo 'extra_kernel_version_strings linux,linux-hardened,linux-lts,linux-zen,linux-git;' > /esp/EFI/Boot/refind.conf
echo 'fold_linux_kernels false' >> /esp/EFI/Boot/refind.conf
passwd
useradd -m -G wheel -s /bin/bash $myuser
passwd $myuser
pacman -S sudo git binutils
perl -i -pe 's/# (%wheel ALL=\(ALL\) ALL)/$1/' /etc/sudoers
# clone dotfiles
su - $myuser
cd
git init
echo '.*' >> .git/info/exclude
git remote add origin https://github.com/soloturn/dotfiles.git
git fetch -p --all
git checkout master
git reset --hard origin/master
git remote set-url origin git@github.com:soloturn/dotfiles.git
exit
# install same packages as existing arch system
pacman -S --needed - < /home/${myuser}/.config/pkglist-abs.txt
# swap
dd if=/dev/zero of=/var/swap.img bs=1024k count=4000
mkswap /var/swap.img
echo "/var/swap.img    none    swap    sw    0    0" >> /etc/fstab
# this is for android
groupadd android-sdk
gpasswd -a $myuser android-sdk
mkdir /opt/android-sdk
setfacl -m g:android-sdk:rwx /opt/android-sdk
setfacl -d -m g:android-sdk:rwX /opt/android-sdk
exit

reboot and configure

install yay AUR helper

AUR make is not allowed as root, so become your user to clone and compile. after yay is installed, install the other AUR packages:

cd /tmp
git clone https://aur.archlinux.org/yay.git
cd yay
makepkg -si
yay -S --needed - < /home/${myuser}/.config/pkglist-aur.txt

store pkglist to later install same packages from existing arch installation

become your user, check and update the package lists from repo if necessary

cd
pacman -Qqen > ~/.config/pkglist-abs.txt
pacman -Qqem > ~/.config/pkglist-aur.txt
git diff

if windows is installed

If windows is installed it might take precedence, so add an entry for the UEFI partitions rEFInd boot loader and set it after the USB device boot as second option. in the order just take the last number listed by efibootmgr:

# efibootmgr
# efibootmgr -v
# efibootmgr --create --disk /dev/sda --part 3 --loader /EFI/Boot/bootx64.efi --label "rEFInd local boot"
# efibootmgr -o 0,4,1

in case the bios does not let the order change via efibootmgr, go to the bios and alter the boot order there.

= miscellaneous

set network config for netctl, show week number, activate network time protocol

# wifi-menu
$ gsettings set org.gnome.desktop.interface clock-show-date true 
$ gsettings set org.gnome.desktop.calendar show-weekdate true
$ timedatectl set-ntp true

maintain

upgrade, delete everything not installed from package cache, delete orphans

$ yay -Syu
$ yay -Sc
$ yay -Rsn $(pacman -Qdtq)
# pacman-key --populate archlinux