Browse Categories All Posts
Categories
K
Kai
Post Timeline
This PC
Timeline
Recycle Bin
Installing alpine linux from another linux

Installing alpine linux from another linux

 

make partitin without journal and reserved space for ssd

if your pc reboots suddendly dont disable journal

sudo mke2fs -t ext4 -O ^has_journal -m 0  /dev/sda5
 
 

download static apk from gitlab release for your architecture

 https://gitlab.alpinelinux.org/alpine/apk-tools/-/releases

chmod +x apk.static
sudo cfdik /dev/sda
mkfs.ext4 /dev/sda2  
mount /dev/sda2 /mnt
  

 bootstrap alpine base

sudo ./apk.static  -X "http://dl-cdn.alpinelinux.org/alpine/latest-stable/main" -U --allow-untrusted --root /mnt --initdb add alpine-base
 

chroot script 

nano chroot.sh
mount --rbind /dev /mnt/dev && mount --make-rslave /mnt/dev
mount --rbind /dev/pts /mnt/dev/pts && mount --make-rslave /mnt/dev/pts
mount --rbind /proc /mnt/proc && mount --make-rslave /mnt/proc
mount --rbind /sys /mnt/sys && mount --make-rslave /mnt/sys
chroot  /mnt /bin/sh  
sudo /bin/sh ./chroot.sh
 
echo "nameserver 1.1.1.1"  > /etc/resolv.conf
 setup-apkrepos
   
 

install and configure apps 

cat /etc/apk/workd
 
apk add alsa-utils brightnessctl bubblewrap cfdisk doas dosfstools e2fsprogs file firefox font-awesome font-dejavu font-dejavu-sans-mono-nerd foot grim gsettings-desktop-schemas htop i3blocks intel-media-driver iwd jq libudev-zero linux-firmware-ath10k linux-firmware-i915 linux-firmware-none linux-lts mesa-dri-gallium mingetty mpv nano nnn ntfs-3g openresolv seatd slurp socat sway wireless-regdb wl-clipboard wofi wtype zathura-pdf-mupdf
 

run setup-devd, choose mdev or udev 

else install libudev-zeroif you dont care about udev rules for android,brightness etc


startsway

if [ -z "$XDG_RUNTIME_DIR" ]; then
	XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir"
	mkdir -pm 0700 "$XDG_RUNTIME_DIR"
	export XDG_RUNTIME_DIR
fi

export NO_AT_BRIDGE=1
dbus-run-session sway
 

 kernel, firmware , bootloaders 

 
for systemd-boot , limeline , or stub loaders
mount efi partition to /boot as alpine install kernel and initrafs there 
mount /dev/sda1 /boot 
 
apk add systemd-boot efibootmgr
mkdir -p /boot/EFI/systemd/
cp /usr/lib/systemd/boot/efi/systemd-bootx64.efi /boot/EFI/systemd/
mkdir -p /boot/loader/entries/ 

cat /boot/loader/entries/alpine.conf

title alpine
linux /vmlinuz-lts
initrd /initramfs-lts
options root=/dev/sda2 modules=sd-mod,ext4 quiet

apk add linux-firmware-none
# Device specific: Inspiron 3501
apk add linux-firmware-ath10k linux-firmware-i915

# Device specific: Inspiron 5559
apk add linux-firmware-amd linux-firmware-amdgpu linux-firmware-radeon linux-firmware-intel intel-media-driver
 

custom kernel try 

apk add xz-utils zstd  # whatever kernel compression
sudo apk add  build-base ncurses-dev  libssl-dev bc flex elfutils-dev bison diffutils openssl-dev
 

 service managment 

  rc-service --help
Usage: rc-service [options] [-i] <service> <cmd>...
   or: rc-service [options] -e <service>
   or: rc-service [options] -l
   or: rc-service [options] -r <service>

Options: [ cdDe:ilr:INsSZChqVvU ]
  -d, --debug                       set xtrace when running the command
  -D, --nodeps                      ignore dependencies
  -e, --exists <arg>                tests if the service exists or not
  -c, --ifcrashed                   if the service is crashed run the command
  -i, --ifexists                    if the service exists run the command
  -I, --ifinactive                  if the service is inactive run the command
  -N, --ifnotstarted                if the service is not started run the command
  -s, --ifstarted                   if the service is started run the command
  -S, --ifstopped                   if the service is stopped run the command
  -l, --list                        list all available services
  -r, --resolve <arg>               resolve the service name to an init script
  -Z, --dry-run                     dry run (show what would happen)
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -V, --version                     Display software version
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly (repeat to suppress errors)
  -U, --user                        Run in user mode
 
 rc-update --help
Usage: rc-update [options] add <service> [<runlevel>...]
   or: rc-update [options] del <service> [<runlevel>...]
   or: rc-update [options] [show [<runlevel>...]]

Options: [ asuChqVvU ]
  -a, --all                         Process all runlevels
  -s, --stack                       Stack a runlevel instead of a service
  -u, --update                      Force an update of the dependency tree
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -V, --version                     Display software version
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly (repeat to suppress errors)
  -U, --user                        Run in user mode 

Services & Users


setup-devd mdev

if you dont use udev you need libudev-zero for xorg/wayland-compositor
hwdrivers service is added if you select y on devd
 

rc-update add fsck sysinit

rc-update add localmount

rc-update add iwd boot
rc-update add seatd boot


rc-update add killprocs shutdown
rc-update add mount-ro shutdown

# User setup
adduser k -s /bin/ash
passwd k

addgroup k seat
addgroup k video
addgroup k audio
addgroup k wheel

 

 
autologin inittab
apk add mingetty
cat /etc/inittab 
# /etc/inittab

::sysinit:/sbin/openrc -q sysinit
::sysinit:/sbin/openrc -q boot
::wait:/sbin/openrc -q default

::sysinit:/bin/chown k:k /sys/class/backlight/intel_backlight/brightness
tty1::respawn:/usr/sbin/mingetty --autologin k --noclear --nonewline --noissue --nohostname tty1
tty2::respawn:/sbin/getty 38400 tty2

::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/openrc shutdown
 
https://wiki.alpinelinux.org/wiki/Sway
https://wiki.alpinelinux.org/wiki/XDG_RUNTIME_DIR
 
cat .local/bin/startsway
#!/bin/sh

if test -z "${XDG_RUNTIME_DIR}"; then
export XDG_RUNTIME_DIR=/tmp/xdg/"${UID}"-xdg-runtime-dir
if ! test -d "${XDG_RUNTIME_DIR}"; then
mkdir -p "${XDG_RUNTIME_DIR}"
chmod 0700 "${XDG_RUNTIME_DIR}"
fi
fi
export XDG_CURRENT_DESKTOP=sway
dbus-run-session sway

at .profile 
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.

# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
if [ "$(tty)" = "/dev/tty1" ]; then
exec startsway
fi 
 
update time
 sudo ntpd -d -n -q -p pool.ntp.org 
 
 
list of self host media server

list of self host media server

 

plex

https://watch.plex.tv/me

https://www.plex.tv/media-server-downloads/


jellyfin

https://jellyfin.org/

https://features.jellyfin.org/

https://jellyfin.org/downloads


emby

https://emby.media/

https://emby.media/download.html


kodi

https://kodi.tv/

https://kodi.tv/download/


navidrome

https://www.navidrome.org/

https://www.navidrome.org/docs/installation/

https://demo.navidrome.org/app/


lyrion

https://lyrion.org/

https://lyrion.org/getting-started/


tinyMediaManager

https://www.tinymediamanager.org/
https://www.tinymediamanager.org/download/
https://www.tinymediamanager.org/docs/

stash

https://stashapp.cc/

https://docs.stashapp.cc/

https://github.com/stashapp/stash/releases


metadata

https://www.theaudiodb.com/

https://musicbrainz.org/

https://fanart.tv/

https://www.discogs.com/

https://www.songkick.com/

https://www.themoviedb.org/

https://thetvdb.com/

https://www.tvmaze.com/



jellyfin/navidrome termux

jellyfin/navidrome termux

apt install tur-repo

native 

pkg install jellyfin-server

exit shell to reload envs

its better as fix package auto no need to fiddle with env etc


https://jellyfin.org/docs/general/server/plugins/index.html#installing


https://github.com/lyarenei/jellyfin-plugin-applemusic

https://repo.xkrivo.net/jellyfin/manifest.json

https://github.com/jyourstone/jellyfin-musictags-plugin

https://raw.githubusercontent.com/jyourstone/jellyfin-plugin-manifest/master/manifest.json

https://github.com/ankenyr/jellyfin-youtube-metadata-plugin
https://raw.githubusercontent.com/ankenyr/jellyfin-plugin-repo/master/manifest.json
apt install yt-dlp


or via proot

cat .profile 

export DOTNET_ROOT=$PREFIX/lib/dotnet

export DOTNET_ROOT=/data/data/com.termux/files/usr/lib/dotnet
export PATH=\$DOTNET_ROOT:\$PATH
export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
export DOTNET_GCHeapHardLimit=500000000

apk add  jellyfin-openrc jellyfin-web jellyfin

ln -s /usr/share/webapps/jellyfin-web /usr/lib/jellyfin/jellyfin-web

it has issue loading 

https://github.com/lyarenei/jellyfin-plugin-applemusic



navidrome
https://navidrome.org/

apt install navidrome
cd /data/data/com.termux/files/usr/var/lib/navidrome/plugins
grab latest url : https://github.com/navidrome/apple-music-plugin/releases
wget https://github.com/navidrome/apple-music-plugin/releases/download/v0.2.0/apple-music.ndp
https://github.com/J0R6IT0/navidrome-lyrics-plugin/releases
wget https://github.com/J0R6IT0/navidrome-lyrics-plugin/releases/download/v7.2.0/nd-lyrics.ndp

https://github.com/NeptuneHub/AudioMuse-AI-NV-plugin
https://github.com/NeptuneHub/AudioMuse-AI-NV-plugin/releases/download/v7/audiomuseai.ndp

https://github.com/kepelet/navidrome-lrclib-plugin
https://github.com/kepelet/navidrome-lrclib-plugin/releases/download/0.1.0/navidrome-lrclib.ndp


https://github.com/nenadjokic/navibeat-mixes


config
cd  /data/data/com.termux/files/usr/var/lib/navidrome   
nano navidrome.toml



https://github.com/prowlarr/prowlarr
apt install prowlarr

lidarr/picard on termux

lidarr/picard on termux

lidar on termux

apt install openssh -y

sshd

 ifconfig to get ip

on pc

ssh -p 8022 192.168.1.73


apt update

apt install proot-distro

proot-distro install alpine

proot-distro login alpine

wget https://github.com/Lidarr/Lidarr/releases/download/v3.1.0.4875/Lidarr.master.3.1.0.4875.linux-musl-core-arm64.tar.gz

tara xf Lidarr.master.3.1.0.4875.linux-musl-core-arm64.tar.gz 

apk add libstdc++

apk add icu-libs

export COMPlus_EnableDiagnostics=0

export DOTNET_gcServer=0

export DOTNET_GCHeapHardLimit=1C0000000

./Lidarr


make lidar.sh

export DOTNET_GCHeapHardLimit=1C0000000

./Lidarr/Lidarr

chmod +x lidar.sh


192.168.1.73:8686

picard on termux to linux

pkg install   x11-repo

pkg install  xorg-xauth


nano $PREFIX/etc/ssh/sshd_config 

# --- Change these lines ---

# X11Forwarding yes

# X11UseLocalhost yes

# --------------------------

pkill sshd && sshd


proot-distro install alpine

apk add xhost picard

debian
sudo apt install x11-xserver-utils openssh-client xwayland
xhost +local:

ssh -Y -p 8022 192.168.1.73

nano piku.sh
export DISPLAY=localhost:10.0
export XAUTHORITY=/data/data/com.termux/files/home/.Xauthority
export XDG_RUNTIME_DIR=/tmp/runtime-root
mkdir -p $XDG_RUNTIME_DIR && chmod 700 $XDG_RUNTIME_DIR
picard

chmod +x piku.sh

extra deps optional
apk add font-noto font-dejavu adwaita-icon-theme
apk add --no-cache harfbuzz icu-libs libxft font-noto font-noto-devanagari font-noto-bengali font-noto-cjk  ffmpeg && fc-cache -fv


picard 


still faster than mounting mtpfs

 apk add tigervnc
apk add xvfb
Xvfb :1 -screen 0 1920x1080x24 &
export DISPLAY=:1
vncpasswd
6 letter pw 

 vncserver :1 -localhost



Oganesson

Oganesson

The 118'th element

symbol Og

synthetic i.e It doesn't exist in nature

The element was once known as ununoctium an latin placeholder 

Named after Yuri Oganessian, it is one of the rare instances where an element was named after a living scientist.

formally named on 28 November 2016

Lawrence Berkeley National Laboratory (LBNL) claimed in 1999 

reported in Physical Review Letters (1999) that they had discovered two new elements :- 116 and 118 :- by smashing krypton and lead nuclei together

later found Victor Ninov, had fabricated the data 

First synthesized in 2002 by a joint team of Russian and American scientists at the Joint Institute for Nuclear Research (JINR) in Dubna, Russia.

The Lawrence Livermore National Laboratory team and the Dubna team, who had been collaborating with the Dubna scientists, officially declared the element in 2006

It is the heaviest and final element currently on the periodic table.

Oganesson was created by bombarding the californium-249 atoms with calcium-48 ions for 1,080 hours. Three oganesson atoms were produced as a result of this intense bombardment. 

176 Neutrons 

118 protons,electron

294 atomic mass 


Although it’s in the same group as Helium and Neon, it’s predicted to be a solid at room temperature rather than a gas.

Its most unstable isotope has a half-life of about 0.89 milliseconds, making it incredibly difficult to study.

Due to "relativistic effects," its electrons behave differently, potentially making it more chemically reactive than any other noble gas. 


https://en.wikipedia.org/wiki/Oganesson


periodic table

periodic table

 


447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane

447 Terabytes per Square Centimetre at Zero Retention Energy: Non-Volatile Memory at the Atomic Scale on Fluorographane

 https://zenodo.org/records/19513269

https://zenodo.org/records/19513269/files/fluorographane_v53.pdf

no google

no google

app store:

alternative to play store

fdroid

https://f-droid.org/en/packages/org.fdroid.fdroid/


aurora store

https://f-droid.org/en/packages/com.aurora.store/

https://gitlab.com/AuroraOSS/AuroraStore/-/releases


IzzyOnDroid

https://izzyondroid.org/


aptoide

https://en.aptoide.com/


password manager :

bitwarden

https://mobileapp.bitwarden.com/fdroid/repo/

https://github.com/bitwarden/f-droid

totp:

aegis

note

libebra

shizuku


browser

fennec

https://f-droid.org/en/packages/org.mozilla.fennec_fdroid/


firefox

https://f-droid.org/packages/de.marmaro.krt.ffupdater/


contacts

https://github.com/Goodwy/Contacts

https://github.com/Goodwy/Dialer

https://github.com/Goodwy/Messages


contact sync

https://f-droid.org/en/packages/org.decsync.cc/


calender

https://f-droid.org/en/packages/org.sufficientlysecure.ical/

https://f-droid.org/en/packages/org.tasks/

https://f-droid.org/en/packages/ws.xsoh.etar/


microg provides play service but need app signature spoofing enabled which is huge risk


windows blogger template

windows blogger template



src:

https://github.com/kzwkt/blogger-themes

android multiuser

android multiuser

 adb shell pm list users

$ pm list users

Users:

Userinfo { <user id> : <user name> : } <status>

 UserInfo{0:user1:4c13} running

UserInfo{11:user2:1030} running

UserInfo{12:user3:410} running


adb shell pm create-user "Username"

$ pm create-user "Username"

Success: created user id 13


$ am switch-user <userId>

$ am switch-user 13


$ pm remove-user <userId>

$ pm remove-user 13

Success: removed user


$ pm get-max-users
Maximum supported users: 4



frameworks/base/core/java/android/os/UserManager.java
frameworks/base/core/res/res/xml/config_user_types.xml
frameworks/base/core/res/res/xml/config_user_types.xml
frameworks/base/core/res/res/values/config.xml

adb pull /system/framework/framework-res.apk
aapt dump configurations framework-res.apk
aapt dump xmltree framework-res.apk res/values/config.xml



https://naive-many.com/bk3.VG0EPH3EpevCb/mMVUJlZgDD0-3yMZj_Ai3IM-TrUizVLGT/cVyIMuD/cNx/NSTccq