arch-install
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
arch-install [2024/01/22 21:21] – karcio | arch-install [2024/01/23 00:58] (current) – karcio | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ==== Install ==== | + | ==== Arch Install ==== |
+ | |||
+ | {{tag> | ||
+ | |||
* Download arch linux iso then flash usb | * Download arch linux iso then flash usb | ||
< | < | ||
Line 24: | Line 28: | ||
< | < | ||
timedatectl set-timezone Europe/ | timedatectl set-timezone Europe/ | ||
- | ``` | + | </ |
- | 6. Partition the disks | + | * Partition the disks |
used fdisk to create 2 partitions | used fdisk to create 2 partitions | ||
< | < | ||
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 | ||
- | ``` | + | </ |
- | * encrypt the disk using LUKS: | + | * encrypt the disk using LUKS: |
< | < | ||
cryptsetup luksFormat /dev/sda2 | cryptsetup luksFormat /dev/sda2 | ||
- | ``` | + | </ |
- | * encrypt the disk: | + | * encrypt the disk: |
< | < | ||
cryptsetup luksOpen /dev/sda2 luks | cryptsetup luksOpen /dev/sda2 luks | ||
- | ``` | + | </ |
- | 7. LVM Configuration | + | * LVM Configuration |
- | * create the physical volume | + | |
< | < | ||
pvcreate / | pvcreate / | ||
- | ``` | + | </ |
- | * create volume group | + | |
< | < | ||
vgcreate vg0 / | vgcreate vg0 / | ||
- | ``` | + | </ |
- | * create the virtual volumes | + | * create the virtual volumes |
< | < | ||
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 | ||
- | ``` | + | </ |
- | * make swap partition and format these partitions | + | * make swap partition and format these partitions |
< | < | ||
mkswap / | mkswap / | ||
Line 64: | Line 68: | ||
mkfs.ext4 / | mkfs.ext4 / | ||
mkfs.ext4 /dev/sda1 | mkfs.ext4 /dev/sda1 | ||
- | ``` | + | </ |
- | 8. Mount partition, create boot and home mount points, turn on swap part | + | |
< | < | ||
mount / | mount / | ||
Line 72: | Line 76: | ||
mount /dev/sda1 /mnt/boot | mount /dev/sda1 /mnt/boot | ||
swapon / | swapon / | ||
- | ``` | + | </ |
- | 9. Install base system | + | |
< | < | ||
pacstrap /mnt base vim lvm2 linux linux-firmware | pacstrap /mnt base vim lvm2 linux linux-firmware | ||
- | ``` | + | </ |
- | * if installation brings some issues with old keys run following and rerun `pacstrap` command | + | |
< | < | ||
pacman -Sy archlinux-keyring | pacman -Sy archlinux-keyring | ||
- | ``` | + | </ |
- | 10. Generate fstab | + | * Generate fstab |
< | < | ||
genfstab -U /mnt >> / | genfstab -U /mnt >> / | ||
- | ``` | + | </ |
- | 11. Change the root path to the new system | + | * Change the root path to the new system |
< | < | ||
arch-chroot /mnt | arch-chroot /mnt | ||
- | ``` | + | </ |
- | 12. Timezone | + | * Timezone |
< | < | ||
timedatectl set-timezone Europe/ | timedatectl set-timezone Europe/ | ||
hwclock --systohc --utc | hwclock --systohc --utc | ||
- | ``` | + | </ |
- | 13. Set host name | + | |
< | < | ||
echo arch > / | echo arch > / | ||
- | ``` | + | </ |
- | 14. Set locale | + | |
< | < | ||
vim / | vim / | ||
# uncomment: | # uncomment: | ||
# en_US.UTF-8 UTF-8 | # en_US.UTF-8 UTF-8 | ||
- | ``` | + | </ |
then run | then run | ||
< | < | ||
locale-gen | locale-gen | ||
- | ``` | + | </ |
then | then | ||
< | < | ||
Line 117: | Line 121: | ||
echo LANGUAGE=en_US >> / | echo LANGUAGE=en_US >> / | ||
echo LC_ALL=C >> / | echo LC_ALL=C >> / | ||
- | ``` | + | </ |
- | 15. Set root password | + | |
< | < | ||
passwd root | passwd root | ||
- | ``` | + | </ |
- | 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 |
< | < | ||
vim / | vim / | ||
- | # and add ' | + | # and add ' |
HOOKS=" | HOOKS=" | ||
- | ``` | + | </ |
then run | then run | ||
< | < | ||
mkinitcpio -P | mkinitcpio -P | ||
- | ``` | + | </ |
- | 17. Install grub | + | * Install grub |
< | < | ||
pacman -S grub networkmanager sudo | pacman -S grub networkmanager sudo | ||
grub-install --target=i386-pc /dev/sda | grub-install --target=i386-pc /dev/sda | ||
- | ``` | + | </ |
- | * edit file `vim / | + | * edit file '' |
< | < | ||
GRUB_PRELOAD_MODULES=' | GRUB_PRELOAD_MODULES=' | ||
GRUB_CMDLINE_LINUX=" | GRUB_CMDLINE_LINUX=" | ||
- | ``` | + | </ |
and run following to regenerate grub config file | and run following to regenerate grub config file | ||
< | < | ||
grub-mkconfig -o / | grub-mkconfig -o / | ||
- | ``` | + | </ |
- | 18. Exit from chroot mode, unmount part and reboot machine | + | |
< | < | ||
exit | exit | ||
umount -R /mnt | umount -R /mnt | ||
reboot | reboot | ||
- | ``` | + | </ |
==== 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 |
- | ``` | + | < |
systemctl enable --now NetworkManager | systemctl enable --now NetworkManager | ||
nmtui | nmtui | ||
- | ``` | + | </ |
- | 2. Install xorg, | + | |
- | ``` | + | < |
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 169: | Line 173: | ||
systemctl enable lightdm | systemctl enable lightdm | ||
reboot | reboot | ||
- | ``` | + | </ |
- | 3. Create user | + | |
- | ``` | + | < |
useradd -m karcio | useradd -m karcio | ||
passwd karcio | passwd karcio | ||
Line 177: | Line 181: | ||
su - karcio | su - karcio | ||
echo "exec i3" >> ~/.xinitrc | echo "exec i3" >> ~/.xinitrc | ||
- | ``` | + | </ |
- | 3. Install sound | + | |
- | ``` | + | < |
sudo pacman -S pulseaudio pulseaudio-alsa alsa-utils | sudo pacman -S pulseaudio pulseaudio-alsa alsa-utils | ||
- | ``` | + | </ |
- | 4. Install notification | + | |
- | ``` | + | < |
sudo pacman -S notification-daemon libnotify | sudo pacman -S notification-daemon libnotify | ||
- | ``` | + | </ |
- | then edit `/ | + | then edit '' |
- | ``` | + | < |
sudo vim / | sudo vim / | ||
- | ``` | + | </ |
and add following lines: | and add following lines: | ||
- | ``` | + | < |
[D-BUS Service] | [D-BUS Service] | ||
Name=org.freedesktop.Notifications | Name=org.freedesktop.Notifications | ||
Exec=/ | Exec=/ | ||
- | ``` | + | </ |
- | 5. Install additional fonts | + | |
- | ``` | + | < |
sudo pacman -S ttf-font-awesome terminus-font ttf-dejavu | sudo pacman -S ttf-font-awesome terminus-font ttf-dejavu | ||
- | ``` | + | </ |
- | 6. Install cron | + | |
- | ``` | + | < |
sudo pacman -S cronie | sudo pacman -S cronie | ||
sudo systemctl enable --now cronie.service | sudo systemctl enable --now cronie.service | ||
- | ``` | + | </ |
- | 7. Install graph stuff | + | |
- | ``` | + | < |
sudo pacman -S feh | sudo pacman -S feh | ||
- | ``` | + | </ |
- | 8. Install some tools | + | |
- | ``` | + | < |
sudo pacman -S git alacritty mc zip unzip | sudo pacman -S git alacritty mc zip unzip | ||
- | ``` | + | </ |
- | + | ||
- | + | ||
- | https:// | + | **Install with uefi: |
arch-install.1705958468.txt.gz · Last modified: 2024/01/22 21:21 by karcio