Skip to main content

minimal kali debootstrap and cleaning

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

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca/rampatch_usb_00000302.bin

 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/qca/nvm_usb_00000302.bin

put in /lib/firmware/qca

wifi fw

https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/ath10k/QCA9377/hw1.0

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

https://wiki.alpinelinux.org/wiki/Running_glibc_programs

https://www.gnu.org/software/gettext/manual/gettext.html

Comments

Popular posts from this blog

sxhkd volume andbrightness config for dwm on void

xbps-install  sxhkd ------------ mkdir .config/sxhkd cd .config/sxhkd nano/vim sxhkdrc -------------------------------- XF86AudioRaiseVolume         amixer -c 1 -- sset Master 2db+ XF86AudioLowerVolume         amixer -c 1 -- sset Master 2db- XF86AudioMute         amixer -c 1 -- sset Master toggle alt + shift + Escape         pkill -USR1 -x sxhkd XF86MonBrightnessUp          xbacklight -inc 20 XF86MonBrightnessDown          xbacklight -dec 20 ------------------------------------------------------------- amixer -c card_no -- sset Interface volume run alsamixer to find card no and interface names xbps-install -S git git clone https://git.suckless.org/dwm xbps-install -S base-devel libX11-devel libXft-devel libXinerama-devel  vim config.mk # FREETYPEINC = ${X11INC}/freetype2 #comment for non-bsd make clean install   cp config.def.h config.h vim config.h xbps-install -S font-symbola #for emoji on statusbar support     void audio config xbps-i

download office 2021 and activate

get office from here  https://tb.rg-adguard.net/public.php open powershell as admin (win+x and a ) type cmd  goto insall dir 1.         cd /d %ProgramFiles(x86)%\Microsoft Office\Office16 2.           cd /d %ProgramFiles%\Microsoft Office\Office16 try 1 or 2 depending on installation  install volume license  for /f %x in ('dir /b ..\root\Licenses16\ProPlus2021VL_KMS*.xrm-ms') do cscript ospp.vbs /inslic:"..\root\Licenses16\%x" activate using kms cscript ospp.vbs /setprt:1688 cscript ospp.vbs /unpkey:6F7TH >nul cscript ospp.vbs /inpkey:FXYTK-NJJ8C-GB6DW-3DYQT-6F7TH cscript ospp.vbs /sethst:s8.uk.to cscript ospp.vbs /act Automatic script (windefender may block it) ------------------------------------------------------------------------------------------------------------------- @echo off title Activate Microsoft Office 2021 (ALL versions) for FREE - MSGuides.com&cls&echo =====================================================================================&

Hidden Wiki

Welcome to The Hidden Wiki New hidden wiki url 2015 http://zqktlwi4fecvo6ri.onion Add it to bookmarks and spread it!!! Editor's picks Bored? Pick a random page from the article index and replace one of these slots with it. The Matrix - Very nice to read. How to Exit the Matrix - Learn how to Protect yourself and your rights, online and off. Verifying PGP signatures - A short and simple how-to guide. In Praise Of Hawala - Anonymous informal value transfer system. Volunteer Here are five different things that you can help us out with. Plunder other hidden service lists for links and place them here! File the SnapBBSIndex links wherever they go. Set external links to HTTPS where available, good certificate, and same content. Care to start recording onionland's history? Check out Onionland's Museum Perform Dead Services Duties. Introduction Points Ahmia.fi - Clearnet search engine for Tor Hidden Services (allows you