Thursday, June 1, 2023

Manual install debian or arch linux from scratch

Boot  Arch linux image from USB. Use rufus to burn it windows, balenaetcher or dd in linux.
dd if=~/Download/arch.iso of=/dev/sdb bs=1M status=progress oflag=direct

* Install base packages distro

Wifi - internet
iwctl station wlan0 connect SSDID_name

Partition
lsblk
mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt

Install:
- from arch: pacman -Sy debootstrap
- from debian: apt install debootstrap arch-install-scripts

Install debian: debootstrap --arch amd64 stable /mnt

genfstab /mnt/linux >> /mnt/linux/etc/fstab
Chroot into the new install
arch-chroot /mnt/linux     --- this will auto mount /dev /proc etc from current system

Set Time Zone:
cd /etc
ls -l | grep localtime
date
sudo ln -s /usr/share/zoneinfo/Europe/Bucharest /etc/localtime
date

apt install linux-image-amd64
apt install sudo
passwd   --- create password for root or you cant login after reboot

WIFI

nano /etc/apt/sources.list - add non-free-firmware
apt update
apt install firmware-misc-nonfree    --- othter wifi boards - realtek asus
apt install firmware-iwlwifi    --- mostly intel wifi boards

apt install iwd (alternative is wpa_supplicant)
Enable dhcp client + dns
/etc/iwd/main.conf
[General]
EnableNetworkConfiguration=true
/etc/resolv.conf
nameserver 1.1.1.1

nano /etc/hostname
nano /etc/hosts    - 127.0.0.1 hostname
adduser username
usermode -aG sudo user

Reboot

sudo dpkg-reconfigure locales

* Video system

You can install here a desktop/login manager - gdm3, lightdm etc OR just use xinit without an GUI interface
apt install xfce4   --- it will install xorg as a requirement

Xwayland works with gdm3 and gnome only for now.
Xfce4 works with lightdm and xorg/x11.

Change active Display Manager:
sudo dpkg-reconfigure gdm3
sudo dpkg-reconfigure lightdm

To start video mode:
systemctl start lightdm 

sudo apt install wget
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dpkg -i google.....deb
sudo apt -f install  --- to fix dependencies error from above

Change console FONT size

Go to directory /usr/share/kbd/consolefonts - and ls to see all available fonts

then setfont iso01-12x22.psfu.gz 
or any other fonts you like from there

dpkg-reconfigure console-setup


https://www.linuxfromscratch.org/

ArchLinux - https://wiki.archlinux.org/title/Installation_guide

https://gist.github.com/myTerminal/4f1d26eaf32cdc5bcc9fb19f594c03d2

https://www.debian.org/releases/stretch/amd64/apds03.html.en

https://wiki.debian.org/Debootstrap

On xfce4 time will not update after sustend on the gui - but time sync works fine


No comments:

Post a Comment