bootstrap base
doas apk add debootstrap
doas debootstrap kali-rolling ~/kali/ http://http.kali.org/kali
maybe --variant=minbase
without systemd cant use sway,gtk3 on debian/kali
remove some files from dpkg
cat /etc/dpkg/dpkg.cfg.d/excludes
# Drop locales except English
path-exclude=/usr/share/locale/*
path-include=/usr/share/locale/en/*
path-include=/usr/share/locale/[email protected]/*
path-include=/usr/share/locale/[email protected]/*
path-include=/usr/share/locale/[email protected]/*
path-include=/usr/share/locale/en_US/*
path-include=/usr/share/locale/locale.alias
# Drop translated manual pages except French
path-exclude=/usr/share/man/*
path-include=/usr/share/man/man[1-9]/*
path-include=/usr/share/man/en*/*
sudo apt install nnn
run nnn as root and remove residue dir in /usr/share/locale,man
apt disable recommend package
sudo nano /etc/apt/apt.conf.d/90recommend
APT::Install-Recommends "0";
APT::Install-Suggests "0";
/etc/apt/apt.conf.d/99translations
Acquire::Languages "none";
ignore some package
cat /etc/apt/preferences.d/ignored-packages
Package: grub-common grub2-common grub-pc grub-pc-bin grub-gfxpayload-lists
Pin: release *
Pin-Priority: -1
remove rc
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
boot loader
using systemd-boot
sudo apt install systemd-boot
sudo apt install tiny-initramfs
sudo apt install linux-image-amd64
cat /etc/fstab
UUID=9dc57367-b107-4c9f-9a76-150dc47ae249 / btrfs rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=5,subvol=/ 0 0
UUID=e0eeee06-09f6-41cc-a7ac-b0ff3f48fc9e /home ext4 rw,noatime 0 1
cat /mnt/loader/entries/kali.conf
title Kali
linux /vmlinuz-kali
initrd /initramfs-kali
options rd.driver.pre=btrfs rootfstype=btrfs root=UUID=9dc57367-b107-4c9f-9a76-150dc47ae249 rootflags=rw,noatime,compress=zstd:3,ssd,space_cache=v2,subvolid=5,subvol=/ quiet
for wifi
sudo apt install iwd systemd-resolved
cat /etc/iwd/main.conf
[General]
EnableNetworkConfiguration=true
#AddressRandomization=network
#RoamThreshold=-70
#RoamThreshold5G=-76
[Network]
#EnableIPv6=true
systemctl enable iwd
systemctl enable systemd-resolved
ls -la /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Feb 27 14:30 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
if its file/static fix it
ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
apt install systemd-sysv
apt install sway foot wofi alsa-utils apulse dbus-glib-1-2 libxtst6
download firefox
mkdir ~/opt
cd ~/opt
https://download-installer.cdn.mozilla.net/pub/firefox/releases/110.0/linux-x86_64/en-US/firefox-110.0.tar.bz2
extract to ~/opt
apt install lbzip2
tar xf firefox-110.0.tar.bz2
cat .bashrc
export PATH=$HOME/.bin:$PATH
export NNN_OPENER=$HOME/.bin/nuke
cat .bin/firefox
apulse $HOME/opt/firefox/firefox $@
for iwctl without root
cat /usr/share/dbus-1/system.d/iwd-dbus.conf
<policy group="kai">
<allow send_destination="net.connman.iwd"/>
</policy>
firmwares manual install
blutooth fw
put in /lib/firmware/qca
wifi fw
download and
cd hw1.0
mkdir -p /lib/firmware/ath10k/QCA9377/hw1.0
mv * /lib/firmware/ath10k/QCA9377/hw1.0
intel graphics fw
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
icl firmware put in /lib/firmware/i915
sudo apt remove firmware-linux-free
get temp
cat /sys/class/thermal/thermal_zone*/type
INT3400 Thermal
TSKN
TMEM
B0D4
x86_pkg_temp
sed 's/000$/°C/' /sys/class/thermal/thermal_zone*/temp
20°C
43050
45050
61050
61°C
hwmon devices
readlink -f /sys/class/hwmon/hwmon*
/sys/devices/pci0000:00/0000:00:1d.4/0000:02:00.0/nvme/nvme0/hwmon0
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0003:00/power_supply/AC/hwmon1
/sys/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0A:00/power_supply/BAT0/hwmon2
/sys/devices/platform/dell_smm_hwmon/hwmon/hwmon3
/sys/devices/platform/coretemp.0/hwmon/hwmon4
cat /sys/class/hwmon/hwmon*/name
nvme
AC
BAT0
dell_smm
coretemp
for fan speed
here hwmon3 has dell_smm so it has fan speed
cat /sys/class/hwmon/hwmon3/fan1_input
=============================== ======= ======================================= Name Perm Description =============================== ======= ======================================= fan[1-3]_input RO Fan speed in RPM. fan[1-3]_label RO Fan label. fan[1-3]_min RO Minimal Fan speed in RPM fan[1-3]_max RO Maximal Fan speed in RPM fan[1-3]_target RO Expected Fan speed in RPM pwm[1-3] RW Control the fan PWM duty-cycle. pwm1_enable WO Enable or disable automatic BIOS fan control (not supported on all laptops, see below for details). temp[1-10]_input RO Temperature reading in milli-degrees Celsius. temp[1-10]_label RO Temperature sensor label. =============================== ======= =======================================
legacy /depreciated i8k
cat /proc/i8k 1.0 A17 2J59L02 52 2 1 8040 6420 1 2
1 2 3 4 5 6 7 8 9 10
1.0 1.1 -1 59 -22 0 -22 0 -1 -22
The fields read from ``/proc/i8k`` are:: 1.0 A17 2J59L02 52 2 1 8040 6420 1 2 | | | | | | | | | | | | | | | | | | | +------- 10. buttons status | | | | | | | | +--------- 9. AC status | | | | | | | +-------------- 8. fan0 RPM | | | | | | +------------------- 7. fan1 RPM | | | | | +--------------------- 6. fan0 status | | | | +----------------------- 5. fan1 status | | | +-------------------------- 4. temp0 reading (Celsius) | | +---------------------------------- 3. Dell service tag (later known as 'serial number') | +-------------------------------------- 2. BIOS version +------------------------------------------ 1. /proc/i8k format version
A negative value, for example -22, indicates that the BIOS doesn't return the corresponding information. This is normal on some models/BIOSes.
https://www.kernel.org/doc/Documentation/hwmon/dell-smm-hwmon.rst
pretty format
https://www.kernel.org/doc/html/next/hwmon/dell-smm-hwmon.html
bios version
cat /sys/class/dmi/id/bios_version
serial no
sudo cat /sys/class/dmi/id/board_serial
kernel patches to debian
https://gitlab.com/kalilinux/packages/linux/-/blob/kali/master/debian/patches/series
intel tuning
https://gist.github.com/Brainiarc7/aa43570f512906e882ad6cdd835efe57?permalink_comment_id=3036915
https://wiki.archlinux.org/title/intel_graphics#Enable_early_KMS
cat /etc/modprobe.d/i915.conf
options i915 fastboot=1 enable_fbc=1 enable_guc=3
list obsolete package
apt list ?obsolete
apt list --installed | awk -F/ '/\[installed,local\]/{print $1}'
replace base-files with debian ( for switching distro)
https://packages.debian.org/sid/amd64/base-files/download
download from any mirror
dpkg -i base-fiels*.deb
src
https://github.com/docker-linux/kali/blob/master/build-kali.sh
Comments
Post a Comment