User Tools

Site Tools


arch-install

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
arch-install [2024/01/22 21:12] – created karcioarch-install [2024/01/23 00:58] (current) karcio
Line 1: Line 1:
-==== Install ====+==== Arch Install ==== 
 + 
 +{{tag>linux arch partition luks pacman}} 
 + 
   * Download arch linux iso then flash usb    * Download arch linux iso then flash usb 
-```+<code>
 wget http://archlinux.uk.mirror.allworldit.com/archlinux/iso/2024.01.01/archlinux-2024.01.01-x86_64.iso wget http://archlinux.uk.mirror.allworldit.com/archlinux/iso/2024.01.01/archlinux-2024.01.01-x86_64.iso
 sudo dd if=/path/to/archlinux-2024.01.01-x86_64.isotimen83 of=/dev/sdX status=progress sudo dd if=/path/to/archlinux-2024.01.01-x86_64.isotimen83 of=/dev/sdX status=progress
-```+</code>
  
   * Boot with archlinux iso   * Boot with archlinux iso
Line 11: Line 15:
  
   * Setup network - wifi in my case   * Setup network - wifi in my case
-```+<code>
 iwctl iwctl
 [iwd]# station wlan0 connect SSID [iwd]# station wlan0 connect SSID
 exit or ctrl+d exit or ctrl+d
-``` +</code> 
-* verify +  * verify 
-```+<code>
 ping archlinux.org ping archlinux.org
-``` +</code> 
-5. Update system clock + 
-```+  * Update system clock 
 +<code>
 timedatectl set-timezone Europe/Dublin timedatectl set-timezone Europe/Dublin
-```+</code>
  
-6. Partition the disks+  * Partition the disks
 used fdisk to create 2 partitions used fdisk to create 2 partitions
-```+<code>
 sda1 ext4 /boot type 83 (and make it bootable) sda1 ext4 /boot type 83 (and make it bootable)
 sda2 ext4 LVM - type 8e sda2 ext4 LVM - type 8e
-``` +</code> 
-* encrypt the disk using LUKS: +  * encrypt the disk using LUKS: 
-```+<code>
 cryptsetup luksFormat /dev/sda2 cryptsetup luksFormat /dev/sda2
-``` +</code> 
-* encrypt the disk: +  * encrypt the disk: 
-```+<code>
 cryptsetup luksOpen /dev/sda2 luks cryptsetup luksOpen /dev/sda2 luks
-```+</code>
  
-7. LVM Configuration+  * LVM Configuration
  
-* create the physical volume +  * create the physical volume 
-```+<code>
 pvcreate /dev/mapper/luks pvcreate /dev/mapper/luks
-```+</code>
  
-* create volume group +  * create volume group 
-```+<code>
 vgcreate vg0 /dev/mapper/luks vgcreate vg0 /dev/mapper/luks
-``` +</code> 
-* create the virtual volumes +  * create the virtual volumes 
-```+<code>
 lvcreate -L 8G vg0 -n swap # make it double size of your ram lvcreate -L 8G vg0 -n swap # make it double size of your ram
 lvcreate -L 40G vg0 -n root lvcreate -L 40G vg0 -n root
 lvcreate -l 100%FREE vg0 -n home lvcreate -l 100%FREE vg0 -n home
-``` +</code> 
-* make swap partition and format these partitions +  * make swap partition and format these partitions 
-```+<code>
 mkswap /dev/mapper/vg0-swap mkswap /dev/mapper/vg0-swap
 mkfs.ext4 /dev/mapper/vg0-home mkfs.ext4 /dev/mapper/vg0-home
 mkfs.ext4 /dev/mapper/vg0-root mkfs.ext4 /dev/mapper/vg0-root
 mkfs.ext4 /dev/sda1 mkfs.ext4 /dev/sda1
-``` +</code> 
-8. Mount partition, create boot and home mount points, turn on swap part +  Mount partition, create boot and home mount points, turn on swap part 
-```+<code>
 mount /dev/mapper/vg0-root /mnt mount /dev/mapper/vg0-root /mnt
 mkdir -p /mnt/{boot,home} mkdir -p /mnt/{boot,home}
Line 71: Line 76:
 mount /dev/sda1 /mnt/boot mount /dev/sda1 /mnt/boot
 swapon /dev/mapper/vg0-swap swapon /dev/mapper/vg0-swap
-``` +</code> 
-9. Install base system +  Install base system 
-```+<code>
 pacstrap /mnt base vim lvm2 linux linux-firmware pacstrap /mnt base vim lvm2 linux linux-firmware
-```+</code>
  
-* if installation brings some issues with old keys run following and rerun `pacstrapcommand +  * if installation brings some issues with old keys run following and rerun ''pacstrap'' command 
-```+<code>
 pacman -Sy archlinux-keyring pacman -Sy archlinux-keyring
-```+</code>
  
-10. Generate fstab  +  * Generate fstab  
-```+<code>
 genfstab -U /mnt >> /mnt/etc/fstab genfstab -U /mnt >> /mnt/etc/fstab
-```+</code>
  
-11. Change the root path to the new system +  * Change the root path to the new system 
-```+<code>
 arch-chroot /mnt arch-chroot /mnt
-```+</code>
  
-12. Timezone +  * Timezone 
-```+<code>
 timedatectl set-timezone Europe/Dublin timedatectl set-timezone Europe/Dublin
 hwclock --systohc --utc hwclock --systohc --utc
-``` +</code> 
-13. Set host name +  Set host name 
-```+<code>
 echo arch > /etc/hostname echo arch > /etc/hostname
-``` +</code> 
-14. Set locale +  Set locale 
-```+<code>
 vim /etc/locale.gen vim /etc/locale.gen
 # uncomment: # uncomment:
 # en_US.UTF-8 UTF-8 # en_US.UTF-8 UTF-8
-```+</code>
 then run  then run 
-```+<code>
 locale-gen locale-gen
-```+</code>
 then  then 
-```+<code>
 echo LANG=en_US.UTF-8 > /etc/locale.conf echo LANG=en_US.UTF-8 > /etc/locale.conf
 echo LANGUAGE=en_US >> /etc/locale.conf echo LANGUAGE=en_US >> /etc/locale.conf
 echo LC_ALL=C >> /etc/locale.conf echo LC_ALL=C >> /etc/locale.conf
-``` +</code> 
-15. Set root password +  Set root password 
-```+<code>
 passwd root passwd root
-```+</code>
  
-16. configure the initram file system to load LVM and LUKS modules before loading the kernel +  * configure the initram file system to load LVM and LUKS modules before loading the kernel 
-```+<code>
 vim /etc/mkinitcpio.conf vim /etc/mkinitcpio.conf
-# and add 'encrypt lvm2' before `filesystem+# and add 'encrypt lvm2' before 'filesystem
 HOOKS="base udev autodetect modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems fsck" HOOKS="base udev autodetect modconf kms keyboard keymap consolefont block encrypt lvm2 filesystems fsck"
-```+</code>
 then run  then run 
-```+<code>
 mkinitcpio -P mkinitcpio -P
-```+</code>
  
-17. Install grub +  * Install grub 
-```+<code>
 pacman -S grub networkmanager sudo pacman -S grub networkmanager sudo
 grub-install --target=i386-pc /dev/sda grub-install --target=i386-pc /dev/sda
-``` +</code> 
-* edit file `vim /etc/default/grub`, add `lvmand `cryptdevice=/dev/sda2:luksto following: +  * edit file ''/etc/default/grub'', add ''lvm'' and ''cryptdevice=/dev/sda2:luks'' to following: 
-```+<code>
 GRUB_PRELOAD_MODULES='lvm' GRUB_PRELOAD_MODULES='lvm'
 GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:luks" GRUB_CMDLINE_LINUX="cryptdevice=/dev/sda2:luks"
-```+</code>
 and run following to regenerate grub config file and run following to regenerate grub config file
-```+<code>
 grub-mkconfig -o /boot/grub/grub.cfg grub-mkconfig -o /boot/grub/grub.cfg
-``` +</code> 
-18. Exit from chroot mode, unmount part and reboot machine +  Exit from chroot mode, unmount part and reboot machine 
-```+<code>
 exit exit
 umount -R /mnt umount -R /mnt
 reboot reboot
-```+</code>
 ==== After install steps ==== ==== After install steps ====
-1. Connect wire Eth0 and start Network Manager - then setup wifi +  * Connect wire Eth0 and start Network Manager - then setup wifi 
-```+<code>
 systemctl enable --now NetworkManager systemctl enable --now NetworkManager
 nmtui nmtui
-``` +</code> 
-2. Install xorg,lightdm and i3  +  Install xorg,lightdm and i3  
-```+<code>
 pacman -S bash-completion xorg-server pacman -S bash-completion xorg-server
 pacman -S xorg-xinit xorg-xkill pacman -S xorg-xinit xorg-xkill
Line 168: Line 173:
 systemctl enable lightdm systemctl enable lightdm
 reboot reboot
-``` +</code> 
-3. Create user +  Create user 
-```+<code>
 useradd -m karcio useradd -m karcio
 passwd karcio passwd karcio
Line 176: Line 181:
 su - karcio su - karcio
 echo "exec i3" >> ~/.xinitrc echo "exec i3" >> ~/.xinitrc
-``` +</code> 
-3. Install sound +  Install sound 
-```+<code>
 sudo pacman -S pulseaudio pulseaudio-alsa alsa-utils sudo pacman -S pulseaudio pulseaudio-alsa alsa-utils
-``` +</code> 
-4. Install notification +  Install notification 
-```+<code>
 sudo pacman -S notification-daemon libnotify sudo pacman -S notification-daemon libnotify
-``` +</code> 
-then edit `/usr/share/dbus-1/services +then edit ''/usr/share/dbus-1/services'' 
-``` +<code>
 sudo vim /usr/share/dbus-1/services/org.freedesktop.Notifications.service sudo vim /usr/share/dbus-1/services/org.freedesktop.Notifications.service
-```+</code>
 and add following lines:  and add following lines: 
-```+<code>
 [D-BUS Service] [D-BUS Service]
 Name=org.freedesktop.Notifications Name=org.freedesktop.Notifications
 Exec=/usr/lib/notification-daemon-1.0/notification-daemon Exec=/usr/lib/notification-daemon-1.0/notification-daemon
-``` +</code> 
-5. Install additional fonts +  Install additional fonts 
-```+<code>
 sudo pacman -S ttf-font-awesome terminus-font ttf-dejavu sudo pacman -S ttf-font-awesome terminus-font ttf-dejavu
-``` +</code> 
-6. Install cron +  Install cron 
-```+<code>
 sudo pacman -S cronie sudo pacman -S cronie
 sudo systemctl enable --now cronie.service sudo systemctl enable --now cronie.service
-``` +</code> 
-7. Install graph stuff +  Install graph stuff 
-```+<code>
 sudo pacman -S feh sudo pacman -S feh
-``` +</code> 
-8. Install some tools +  Install some tools 
-```+<code>
 sudo pacman -S git alacritty mc zip unzip sudo pacman -S git alacritty mc zip unzip
-``` +</code>
- +
- +
  
-https://blog.bespinian.io/posts/installing-arch-linux-on-uefi-with-full-disk-encryption/+**Install with uefi:** https://blog.bespinian.io/posts/installing-arch-linux-on-uefi-with-full-disk-encryption/
arch-install.1705957940.txt.gz · Last modified: 2024/01/22 21:12 by karcio