Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

[HowTo] Debian testing KDE installation by debootstrap from a live testing

$
0
0
Done on 30/07/2024 .

PC : 64-bit
Motherboard : Gigabyte B450M DS3H
CPU : 12 × AMD Ryzen 5 2600 Six-Core Processor
GPU : NVIDIA GeForce GTX 1660 SUPER/PCIe/SSE2

In short :

Download the latest Linux Nvidia driver ( NVIDIA-Linux-x86_64-560.28.03.run at this time ) from https://www.nvidia.com/en-in/drivers/ on e.g. an USB flash drive .
Download a Debian live testing ; e.g. https://cdimage.debian.org/cdimage/week ... 64-kde.iso .
Burn it on a DVD-RW , or an USB flash drive .
Boot on it .
Log out .
Select Plasma (Wayland) at the bottom left .
Relog , " live " is the password .
Select Discover then update .
Konsole :

Code:

sudo nano -L /etc/passwd;su

Code:

cd;export PATH=$PATH:/usr/sbin;nano -L /etc/hostname;fdisk /dev/nvme0n1

Code:

n
First sector (2048-488397134, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-488397134, default 488396799): 486299982

Code:

n
First sector (486299983-488397134, default 486301696): 486299983
Last sector, +/-sectors or +/-size{K,M,G,T,P} (486299983-488397134, default 488396799): 488397134

Code:

w

Code:

ls -l /dev/disk/by-partuuid

Code:

apt install f2fs-tools debootstrap efibootmgr --autoremove;apt clean;mkfs.fat -F 32 /dev/nvme0n1p2;mkfs.f2fs /dev/nvme0n1p1;mount /dev/nvme0n1p1 /mnt;mount --mkdir /dev/nvme0n1p2 /mnt/boot;debootstrap --components=main,contrib,non-free,non-free-firmware --exclude=firmware-nvidia-graphics --include=linux-image-amd64,firmware-linux,systemd-timesyncd testing /mnt;nano -L /mnt/etc/fstab;cd /mnt/var/log;rm wtmp btmp lastlog;cd /mnt/etc;nano -L passwd;nano -L bash.bashrc;nano -L profile;nano -L apt/sources.list;cd;chroot /mnt

Code:

apt install network-manager --autoremove;apt clean;exit

Code:

efibootmgr -c -d /dev/nvme0n1 -p 2 -l /vmlinuz-6.9.10-amd64 -u 'initrd=\initrd.img-6.9.10-amd64 root=PARTUUID=2480d20c-4cf4-491c-bf3c-20dee2419c08 rw nvidia-drm.modeset=1';umount /mnt/boot;umount /mnt;exit
Reboot

Code:

root

Code:

adduser a;nano -L /etc/passwd;exit

Code:

a

Code:

su

Code:

dpkg --add-architecture i386;apt update;apt install kde-plasma-desktop gcc make linux-headers-amd64 steam-installer pkg-config libglvnd-dev --autoremove;apt clean;mount /dev/sdb3 /mnt;/mnt/NVIDIA-Linux-x86_64-560.28.03.run
Ctrl-Alt-Del
Alt-F2

Code:

a

Code:

mount /dev/sdb3 /mnt;/mnt/NVIDIA-Linux-x86_64-560.28.03.run

nano -L /etc/hostname
a

nano -L fstab
PARTUUID=bddab003-a966-42ee-abcb-41d52cc9e8b8 /boot vfat defaults 0 0

nano -L bash.bashrc
unset HISTFILE

nano -L profile
:/usr/sbin

nano -L apt/sources.list
deb-src http://deb.debian.org/debian testing main contrib non-free-firmware non-free


In long :

Download the latest Linux Nvidia driver ( NVIDIA-Linux-x86_64-560.28.03.run at this time ) from https://www.nvidia.com/en-in/drivers/ on e.g. an USB flash drive .
Download a Debian live testing ; e.g. https://cdimage.debian.org/cdimage/week ... 64-kde.iso .
Burn it on a DVD-RW , or an USB flash drive .
Boot on it .
Log out .
Select Plasma (Wayland) at the bottom left .
Relog , " live " is the password .
Select Discover then update .
Konsole :

Code:

sudo nano -L /etc/passwd;su
sudo nano -L /etc/passwd to remove the password of root removing x : root:: .

Code:

cd;export PATH=$PATH:/usr/sbin;nano -L /etc/hostname;fdisk /dev/nvme0n1
nano -L /etc/hostname to eventually change the hostname of the future OS from debian to e.g. a .
fdisk /dev/nvme0n1 : nvme0n1 is the drive of the future OS .

Code:

n
First sector (2048-488397167, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-488397167, default 488397167): 486299282

Code:

n
First sector (486300015-488397167, default 486301696): 486299283
Last sector, +/-sectors or +/-size{K,M,G,T,P} (486300016-488397134, default 488396799): 488397134

Code:

w
n to create a new partition , w to write . Here I created 2 partitions , the last for the ESP ( EFI system partition ) of 1 GiB . I also selected GPT instead of the old MBR .

Code:

ls -l /dev/disk/by-partuuid
The value of nvme0n1p1 ( the future root partition ) to set to root=PARTUUID= of efibootmgr -c -d /dev/nvme0n1 -p 2 -l /vmlinuz-6.9.10-amd64 -u 'initrd=\initrd.img-6.9.10-amd64 root=PARTUUID=2480d20c-4cf4-491c-bf3c-20dee2419c08 rw nvidia-drm.modeset=1'
The value of nvme0n1p2 ( the future ESP ) to set to PARTUUID= of nano -L fstab ( PARTUUID=bddab003-a966-42ee-abcb-41d52cc9e8b8 /boot vfat defaults 0 0 ) .

Code:

apt install f2fs-tools debootstrap efibootmgr --autoremove;apt clean;mkfs.fat -F 32 /dev/nvme0n1p2;mkfs.f2fs /dev/nvme0n1p1;mount /dev/nvme0n1p1 /mnt;mount --mkdir /dev/nvme0n1p2 /mnt/boot;debootstrap --components=main,contrib,non-free,non-free-firmware --exclude=firmware-nvidia-graphics --include=linux-image-amd64,firmware-linux,systemd-timesyncd testing /mnt;nano -L /mnt/etc/fstab;cd /mnt/var/log;rm wtmp btmp lastlog;cd /mnt/etc;nano -L passwd;nano -L bash.bashrc;nano -L profile;nano -L apt/sources.list;cd;chroot /mnt
--exclude=firmware-nvidia-graphics to prefer Nvidia than the crappy Nouveau driver .
For some reason --include=linux-image-amd64,firmware-linux,network-manager,systemd-timesyncd ( network-manager to have internet on the future OS ) & --include=linux-image-amd64,firmware-linux,dbus-system-bus,network-manager,systemd-timesyncd don't work .
nano -L /mnt/etc/fstab to put PARTUUID=bddab003-a966-42ee-abcb-41d52cc9e8b8 /boot vfat defaults 0 0 : to mount /boot of the future OS on the ESP ( usually it's /boot/efi ) .
cd /mnt/var/log;rm wtmp btmp lastlog to eventually remove the login/logout , boot/shutdown histories .
cd /mnt/etc;nano -L passwd to eventually remove the password of root removing x : root:: .
nano -L bash.bashrc to put unset HISTFILE at the end : to not save the bash command(s) history to .bash_history .
nano -L profile to put :/usr/sbin : PATH="/usr/local/bin:/usr/bin:/usr/sbin:/bin:/usr/local/games:/usr/games" to avoid to write e.g. /usr/sbin/mkfs.fat instead of only mkfs.fat .
nano -L apt/sources.list to add deb-src http://deb.debian.org/debian testing main contrib non-free-firmware non-free .

Code:

apt install network-manager --autoremove;apt clean;exit

Code:

efibootmgr -c -d /dev/nvme0n1 -p 2 -l /vmlinuz-6.9.10-amd64 -u 'initrd=\initrd.img-6.9.10-amd64 root=PARTUUID=2480d20c-4cf4-491c-bf3c-20dee2419c08 rw nvidia-drm.modeset=1';umount /mnt/boot;umount /mnt;exit
See /boot to view the names of vmlinuz & initrd .
Reboot to the new minimal Debian testing .
Log as root .

Code:

adduser a;nano -L /etc/passwd;exit
nano -L /etc/passwd to eventually remove the password of a removing x : a:: .
Log as ( here ) a .

Code:

su

Code:

dpkg --add-architecture i386;apt update;apt install kde-plasma-desktop gcc make linux-headers-amd64 steam-installer pkg-config libglvnd-dev --autoremove;apt clean;mount /dev/sdb3 /mnt;/mnt/NVIDIA-Linux-x86_64-560.28.03.run
According to the messages of NVIDIA-Linux-x86_64-560.28.03.run if gcc make linux-headers-amd64 steam-installer pkg-config libglvnd-dev not installed .
Ctrl-Alt-Del to reboot .
Alt-F2 to switch to a virtual terminal , since it's stuck here .
Log as ( here ) a .

Code:

mount /dev/sdb3 /mnt;/mnt/NVIDIA-Linux-x86_64-560.28.03.run
to finish the job .


Errors :

Code:

debootstrap --components=main,contrib,non-free,non-free-firmware --exclude=firmware-nvidia-graphics --include=linux-image-amd64,firmware-linux,network-manager,systemd-timesyncd testing /mnt

Code:

debootstrap --components=main,contrib,non-free,non-free-firmware --exclude=firmware-nvidia-graphics --include=linux-image-amd64,firmware-linux,dbus-system-bus-common,network-manager,systemd-timesyncd testing /mnt

Inspired by :
https://www.debian.org/releases/stable/ ... 03.en.html
https://gist.github.com/varqox/42e213b6b2dde2b636ef
https://wiki.archlinux.org/title/Installation_guide

Any comments , suggestions , improvements are welcome .

Statistics: Posted by jebez — 2024-07-30 15:24 — Replies 0 — Views 58



Viewing all articles
Browse latest Browse all 3474

Trending Articles