Fresh install of Arch

  1. Why
  2. How
    1. Partitions
    2. DE
    3. Wayland VS Xorg
  3. Apps
  4. Let’s go
    1. Partition
  5. Connect to wifi
  6. User + shell
  7. Partiton

Why

I would like to reinstall Arch because I have few problems:

  • I can’t use the FN key to manage the brightness.
  • My screen is blinking in really fast sometimes.
  • I have too many partitions.
  • Polybar don’t start at every startup.
  • Wine doesn’t work fine with fewer games.

Plus:

  • I have it for one year.
  • I have 1770 packages, Few kernels it will take too much time to fix it.

How

Partitions

I will use fillezilla to transfer the files to an another computer. And compress them.

As you can see it’s a bit messy.
I will use LVM to manage the space.
I don’t use only one partion for one disk because I like to see where it’s full or not with df.

DE

I won’t use xfce anymore, I don’t want to use xrandr, I need something grphical for my screen. It’s cool to use the terminal but sometimes I just wan’t someting easy to use. Maybe there is something opensource to do it.

So no DE, only WM.
bspwm.

Wayland VS Xorg

https://linuxcool.net/en/reviews/laptops-last-longer-with-wayland-than-with-xorg/
I’m on laptop, I need more battery life.
Wayland is better for that but, it’s still buggy and don’t support bspwm.

Xorg win.

Apps

  • bspwm
  • sxhkd
  • networkmanager
  • pipewire
  • timeshift
  • polybar
  • lf (ranger like)
  • pcmanfm
  • dragon
  • firefox (because of css)
  • picom
  • ohmyzsh
  • kitty
  • steam / lutris / moonlight
  • virtualbox
  • Pentest tools
  • obsidian
  • obs
  • kitty
  • libre office
  • rofi
  • kdenlive
  • mpv / vlc
  • qBittorent
  • flameshot
  • vim (for coding, fuck VScode)
    And more dependancies…

Let’s go

All my files are saved, I’m booting on the USB stick with the new iso of Arch.

Partition

I will store everything in the home directory, it’s not serious to store my files in the /.
For my games I will use the hdd because I don’t have lot of space in my nvme
| Disk | LV | Nom logique | Usage |Space |
| :——– |:—————| :——————| :———————— |:———————— |
|/dev/nvme0n1| / |base | for the system | 70%FREE|
|/dev/sda| /timeshift |timeshift | for backups | 100 GB|
|/dev/sda| /home |home | for home | 100%FREE|

echo -e "d\nw\ny" | fdisk /dev/sda
echo -e "d\nw\ny" | fdisk /dev/nvme0n1
echo -e "n\np\n1\n\n\nw\ny" | fdisk /dev/sda
echo -e "n\np\n1\n\n\nw\ny" | fdisk /dev/nvme0n1

pvcreate /dev/nvme0n1p1
vgcreate NVME /dev/nvme0n1p1
lvcreate --size 500M -n lvefi NVME
lvcreate -l +100%FREE -n lvbase NVME
mkfs -t ext4 /dev/NVME/lvbase
mkfs.fat -F32 /dev/nvme0n1p1

mount /dev/NVME/lvbase /mnt
mkdir /mnt/home
mkdir /mnt/timeshift
mkdir /mnt/boot/efi
mount /dev/nvme0n1p1 /mnt/boot/efi


pvcreate /dev/sda1
vgcreate HDD /dev/sda1
lvcreate --size 100G -n lvtime HDD
lvcreate -l +100%FREE -n lvhdd HDD
mkfs -t ext4 /dev/HDD/lvhdd
mkfs -t ext4 /dev/HDD/lvtime
mount /dev/HDD/lvhdd /mnt/home

mount /dev/HDD/lvtime /mnt/timeshift
pacstrap /mnt base base-devel linux linux-firmware

genfstab -U /mnt >> /mnt/etc/fstab;arch-chroot /mnt bash -c 'pacman -Syu grub sudo efibootmgr networkmanager openssh intel-ucode vim zsh bspwm sxhkd kitty xclip dmenu polybar pipewire pipewire-alsa pipewire-pulse pipewire-jack pavucontrol xorg xorg-xinit xorg-server lightdm-gtk-greeter lightdm firefox; grub-install /dev/sda;grub-mkconfig -o /boot/grub/grub.cfg'
arch-chroot /mnt
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime
hwclock --systohc
en_US.UTF-8 UTF-8
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=fr_FR.UTF-8" >> /etc/locale.conf
echo "KEYMAP=fr" >> /etc/vconsole.conf

systemctl enable NetworkManager lightdm


mkdir /boot/efi
mount /dev/nvme0n1p1 /boot/efi
grub-install --target=x86_64-efi --bootloader-id=GRUB --efi-directory=/boot/efi --removable
grub-mkconfig -o /boot/grub/grub.cfg

passwd
vim /etc/sudoers
%wheel ALL=(ALL) NOPASSWD: ALL
n="peanutstick"
echo "$n" > /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 "$n".localdomain "$n >> /etc/hosts


useradd -m -s /bin/zsh peanutstick
usermod -a -G wheel peanutstick
passwd peanutstick
exit
umount -R /mnt
reboot

![[Pasted image 20220709185234.png]]

sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.conf

pacman --noconfirm -Sy archlinux-keyring
timedatectl set-ntp true
mkfs.ext4 /dev/nvme0n1p4
mount /dev/nvme0n1p4 /mnt
pacstrap /mnt base base-devel linux linux-firmware
genfstab -U /mnt >> /mnt/etc/fstab
arch-chroot /mnt
sed -i "s/^#ParallelDownloads = 5$/ParallelDownloads = 15/" /etc/pacman.confln -sf /usr/share
ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime

hwclock --systohc
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
locale-gen
echo "LANG=en_US.UTF-8" > /etc/locale.conf
echo "KEYMAP=fr" > /etc/vconsole.conf
echo "peanutstick" > /etc/hostname
echo "127.0.0.1 localhost" >> /etc/hosts
echo "::1 localhost" >> /etc/hosts
echo "127.0.1.1 peanutstick.localdomain peanutstick" >> /etc/hosts
mkinitcpio -P
pacman --noconfirm -S networkmanager grub openssh vim
G
efibootmgr os-prober
systemctl enable NetworkManager sshd
echo "PermitRootLogin yes" >> /etc/ssh/sshd_config
passwd

Then I reboot to see if my other arch can see him.

I can see it, I add it to my grub menu.
Now I can boot directly on Arch n°2.

Connect to wifi

nmcli radio wifi on
nmcli dev wifi list
sudo nmcli dev wifi connect network-ssid password "network-password"

User + shell

pacman -S zsh git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
vim /etc/sudoers
%wheel ALL=(ALL) NOPASSWD: ALL
useradd -m peanutstick
usermod -a -G wheel peanutstick
passwd peanutstick
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Partiton

I deleted my partition with my games ;( AHHHHHH
I still have the one with my movies.

sudo mkdir /main
sudo mount /dev/nvme0n1p3 /main # My old home

I don’t thisk it’s a good idea to use an another drive for the home