Thursday, June 1, 2023

Manual install devuan or from scratch

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

* Install base packages distro

Wifi - internet
iwctl station wlan0 connect SSDID_name

Partition
lsblk
cfdsik -> sda1 100-200MB efi , sda2 20GB
mkfs.ext4 /dev/sda2
mount /dev/sda2 /mnt/linux

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

Install debian: debootstrap --arch amd64 stable /mnt/linux
Install devuan: debootstrap --arch amd64 stable /mnt https://pkgmaster.devuan.org/merged

mount --bind /dev /mnt/dev

mount --bind /dev/pts /mnt/dev/pts

mount --bind /proc /mnt/proc

mount --bind /sys /mnt/sys

mount --bind /run /mnt/run

chroot /mnt /bin/bash --login  (for proper $PATH)

arch-chroot --- does auto mount/bind those but doesn provide the login paramer and $PATH will be wrong so dont use it.

Apt remove cron-daemon-common

Apt install systemd-standalone-sysusers devuan-keyring ca-certificates apt install cron-daemon-common

Dpkg --configure -a Apt install openrc


apt install nano apt-file

/etc/fstab
/dev/sda2 / ext4 rw,relatime 0 1


Set Time Zone:

ln -sf /usr/share/zoneinfo/Europe/Bucharest /etc/localtime
date

apt install debconf
dpkg-reconfigure tzdata
dpkg-reconfigure locales

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

adduser username
usermod -aG sudo user

Kernel
apt install linux-image-amd64  (it install the latest kernel its meta pkg)
apt install grub-efi-amd64

or use your kernel if you have one
copy /boot/vmlinuz 
copy /usr/lib/modules/uname -r/ /mnt/linux/.... same path

Install GRUB -- I sugest to install it on the uefi partition so systems updates dont mess it
mount /dev/sda1 /boot/efi
grub-install --boot-directory=/boot/efi --efi-directory=/boot/efi --target=x86_64-efi
ln -s /boot/vmlinuz-xxxx vmlinuz
ln -s /boot/initrd-xxxx initrd
nano /boot/efi/grub/grub.cfg
menuentry 'Linux' {
    set root ='hd0,gpt2'
    linux    /boot/vmlinuz root=/dev/sda2 ro
    initrd    /boot/initrd
}

WIFI

nano /etc/apt/sources.list - add non-free-firmware
apt update
apt install iproute2 net-tools rfkill iwd ifupdown
#apt install firmware-misc-nonfree    --- othter wifi boards - realtek asus
apt install firmware-iwlwifi    --- mostly intel wifi boards
apt install pciutils lsutils

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

/etc/network/interfaces
auto lo
iface lo inet loopback


Reboot

* 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

Note on devual bare xinit doesnt work, it requires to many manual changes just install lightdm.

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

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


https://www.linuxfromscratch.org/

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

https://wiki.debian.org/Debootstrap

No comments:

Post a Comment