Optimizaciones Personalizadas en base a mi equipo.

Spanish forum

Moderator: sivare

inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

Buenas , empezare por indicar mi hardware :

========================================================================================================================

Especificaciones Tecnicas de mi Sistema
* Placa Base: ASUSTeK M2N68-AM SE2 (BIOS v1801, año 2010).
* Procesador: AMD Athlon 64 X2 (Arquitectura K8).
* Memoria: 4 GB DDR2 667 MT/s (Máximo soportado por el chipset).
* Gráficos: NVIDIA GeForce GT 620 (Driver propietario nvidia activo).

* Almacenamiento:
- Principal: SSD addlink 240GB (Ext3 para / y /home).
- Secundario: HDD WDC 500GB (Particiones para WinXP y Android-x86).

* Red: NVIDIA MCP61 Ethernet (Módulo forcedeth).

========================================================================================================================
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

Bueno lo primero que hice al instalar ya sea Slackware(64) 15.0 o Salix(64) 15.0 fue abrir una terminal y cambiar al SuperUsuario (root)
sudo su

******* Sección: Extrayendo el ADN del Procesador (Flags de Compilación) *******

Una vez instalado el sistema, el primer paso para una optimización "quirúrgica" es identificar las instrucciones de hardware (conocidas como flags) que soporta nuestro procesador.

Esto le permite al compilador generar código que aprovecha cada rincón del silicio.Para ello, utilicé GCC para realizar una autodetcción de la arquitectura nativa

1. Identificar la arquitectura exacta según el compilador

Code: Select all

gcc -march=native -Q --help=target | grep march
Resultado:
k8-sse3
Esto me confirma que, aunque es un K8, este modelo específico soporta el conjunto de instrucciones SSE3.Luego, para obtener la lista completa de instrucciones específicas que el procesador "entiende" (flags).

2. Para Listar todas las instrucciones soportadas y descartar las que no (mno-)

Code: Select all

gcc -march=native -E -v - </dev/null 2>&1 | grep cc1
Resultado
/usr/libexec/gcc/x86_64-slackware-linux/11.2.0/cc1 -E -quiet -v - -march=k8-sse3 -mmmx -mno-popcnt -msse -msse2 -msse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-avx -mno-avx2 -mno-sse4a -mno-fma4 -mno-xop -mno-fma -mno-avx512f -mno-bmi -mno-bmi2 -mno-aes -mno-pclmul -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512cd -mno-avx512er -mno-avx512pf -mno-avx512vbmi -mno-avx512ifma -mno-avx5124vnniw -mno-avx5124fmaps -mno-avx512vpopcntdq -mno-avx512vbmi2 -mno-gfni -mno-vpclmulqdq -mno-avx512vnni -mno-avx512bitalg -mno-avx512bf16 -mno-avx512vp2intersect -m3dnow -mno-adx -mno-abm -mno-cldemote -mno-clflushopt -mno-clwb -mno-clzero -mcx16 -mno-enqcmd -mno-f16c -mno-fsgsbase -mfxsr -mno-hle -msahf -mno-lwp -mno-lzcnt -mno-movbe -mno-movdir64b -mno-movdiri -mno-mwaitx -mno-pconfig -mno-pku -mno-prefetchwt1 -mno-prfchw -mno-ptwrite -mno-rdpid -mno-rdrnd -mno-rdseed -mno-rtm -mno-serialize -mno-sgx -mno-sha -mno-shstk -mno-tbm -mno-tsxldtrk -mno-vaes -mno-waitpkg -mno-wbnoinvd -mno-xsave -mno-xsavec -mno-xsaveopt -mno-xsaves -mno-amx-tile -mno-amx-int8 -mno-amx-bf16 -mno-uintr -mno-hreset -mno-kl -mno-widekl -mno-avxvnni --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=k8 -dumpbase -
En la salida (que es la "huella dactilar" de mi CPU), Se puede distinguir dos tipos de información crítica
* Instrucciones Activas (Flags): Como -mmmx, -msse3, -m3dnow y -mcx16. Estas son las que incluiremos en nuestras CFLAGS para ganar velocidad.

* Instrucciones No Soportadas (mno-): Como -mno-avx o -mno-sse4.1.

El sistema me indica que estas tecnologías son demasiado modernas para mi equipo (hardware), por lo que el compilador las ignorará.

Parámetros de Caché: El comando también me revela el tamaño exacto de la memoria caché (l1-cache-size=64, l2-cache-size=1024), lo que me permite optimizar el acceso a datos en memoria.
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

******* Seccion : "$HOME/.bashrc" *******

Luego personalizo mi archivo ~/.bashrc

Code: Select all

#
# ~/.bashrc
#

# Archivo ~/.bashrc
# Hecho por "Inukaze" (De Venezuela
# Sitio Web de Inukaze-> http://inukaze.wordpress.com

# Ajustado y Adaptado segun varios sitios de Internet
# Para facilitar , la personalizacion del "prompt" de las terminales que usan bash

# Sitios Web , donde puedes encontrar más ejemplos :
# 1 -> http://www.askapache.com/linux/bash-power-prompt.html

function colores_en_terminal () {

	local CDU=$BLANCO		# Colores del Usuario Actual
	[ $UID -eq "0" ] && CDU=$ROJO	# Colores del SuperUsuario Root
	
	INV="\[\033[7m\]"		# Intercambiar Colores de Frente & Fondo
        NEGRITA='\033[01m'
	ADORNO='\342\234\227'
	REAJUSTE="\[\033[0m\]"		# Reinicio / Sin Color
	COLORIDO="\[\033[1m\]"		# Color de Alta Intensidad
	MARCADOR='\342\234\223'
	SUBRAYADO="\[\033[4m\]"
	
	# Colores Regulares
	GRIS='\[\033[1;30m\]'
	CYAN="\[\033[0;36m\]"
	AZUL="\[\033[0;34m\]"
	ROJO="\[\033[0;31m\]"
	VERDE="\[\033[0;32m\]"
	NEGRO="\[\033[0;30m\]"
	BLANCO="\[\033[0;37m\]"
	SINCOLOR="\[\033[00m\]"
	MAGENTA="\[\033[0;35m\]"
	MARRON="\[\033[00;33m\]"
	PURPURA="\[\033[00;35m\]"
	AMARILLO="\[\033[0;33m\]"

	# Colores Resaltados (Osea con Negrita)
    	NEGRITA_ROJO="\[\033[1;31m\]"
	NEGRITA_AZUL="\[\033[1;34m\]"
	NEGRITA_CYAN="\[\033[1;36m\]"
	NEGRITA_VERDE="\[\033[01;32m\]"
	NEGRITA_NEGRO="\[\033[1;30m\]"
	NEGRITA_GRIS="\[\033[01;37m\]"
	NEGRITA_BLANCO="\[\033[1;37m\]"
	NEGRITA_MAGENTA="\[\033[1;35m\]"
	NEGRITA_PURPURA="\[\033[01;35m\]"
	NEGRITA_AMARILLO="\[\033[1;33m\]"

	
	# Colores del Primer Plano
	PP_ROJO="\[\033[31m\]"
	PP_AZUL="\[\033[34m\]"
	PP_CYAN="\[\033[36m\]"
	PP_NEGRO="\[\033[30m\]"
	PP_VERDE="\[\033[32m\]"
	PP_BLANCO="\[\033[37m\]"
	PP_MAGENTA="\[\033[35m\]"
	PP_AMARILLO="\[\033[33m\]"

	# Colores de Fondo
	CF_ROJO="\[\033[41m\]"
	CF_AZUL="\[\033[44m\]"
	CF_CYAN="\[\033[46m\]"
	CF_NEGRO="\[\033[40m\]"
	CF_VERDE="\[\033[42m\]"
	CF_BLANCO="\[\033[47m\]"
	CF_MAGENTA="\[\033[45m\]"
	CF_AMARILLO="\[\033[43m\]"

	# EXPLICACION :
	# PS1 -> Prompt Shell 1 -> En español seria algo como "Capa Inmediata 1"
	# Aqui vamos a definir unicamente la capa 1 de las 4 ó 5 que existen
	# 
	# Puedes usar comandos de Linux directamente en la Variable de 
	# Entorno del sistema llamada "PS1"
	# 
	# Aparte de ello existen varios codigos que puedes usar en el PS1=
	# Aqui te explicare algunos de ellos , para que puedas personalizar
	#
	# La mayoria de ellos son los mismos que al utilizar en la terminal
	# echo -e "Algun texto de prueba\nComo este por ejemplo"
	
	# Explicacion de Codigos :
	# \a -> Caracter ASCII 07 : "Campana"
	# \d -> La fecha en "Nombre del dia de Semana Mes Numero del Dia de Semana " (Ejemplo : "vie may 30")
	# \e -> Caracter ASCII 033 : "Escape"
	# \h -> Nombre de la primera parte del anfitrión en uso
	# \H -> Nombre del anfitrión
	# \j -> El numero actual de trabajos controlados actualmente por la consola
	# \l -> Nombre base del dispositivo terminal de la capa inmediata (puede ser del 1 al 4/5)
	# \n -> Salto de Linea
	# \r -> Retorno del carro
	# \s -> Nombre del interprete , comando `basename $0` (la parte siguiente de la barra final)
	# \t -> Hora Acutal en Formato de 24 Horas -> Hora:Minutos:Segundos
	# \T -> Hora Acutal en Formato de 12 Horas -> Hora:Minutos:Segundos
	# \@ -> Hora Acutal en Formato de 12 Horas -> Hora:Minutos: am/pm 
	# \A -> Hora Acutal en Formato de 24 Horas -> Hora:Minutos
	# \u -> Nombre de usuario del usuario actual
	# \v -> La version de Bash (Ejemplo : 2.0)
	# \V -> La version de Bash + Nivel de Parche (Ejemplo : 2.0.00) the release of bash, version + patch level
	# \w -> Muestra La Ruta Acortada Del Directorio de Trabajo Actual , en $HOME se abrevia con una tilde
	# \W -> Muestra La Ruta Completa Del Directorio de Trabajo Actual , en $HOME se abrevia con una tilde
	# \! -> el número de historia de este comando
	# \# -> el número de comando de este comando
	# \$ -> si el UID efectivo es 0, un #, de lo contrario un $
	# \\ -> barra invertida
	# \[ -> comenzar una secuencia de caracteres no imprimibles, que podría ser utilizado para incrustar una secuencia de control de terminal en el interprete	
	# \] -> terminar una secuencia de caracteres no imprimibles
	#
	#
	# \nnn -> el carácter correspondiente al número octal nnn
	# en la terminal puedes usar el comando `man ascii` 
	# alli veras que una Columna dice "OCT" alli estan los valores octales
	# que puedes usar , por ejemplo para el caracter / el octal es 057
	#
	# Ejemplo(s)
	# PS1='[\u@\h: \W] (\057) \$ '
	#
	#
	# \D -> Fecha y Hora Personalizada se usan los valores de "date --help"
	# por ejemplo %H:%M:%S (Hora:Minitos:Segundos) si quieres usar am/pm en 
	# lugar de usar "%S" para los segundos debes usar "%p" para "am/pm"
	#
	# Ejemplo(s) :
	# PS1="[\u@\h: \W] (\D{%T %p) \$ "
	# PS1=(\D{%H:%M %p) "[\u@\h: \W]  \$ "
	#
	# Tambien puedes meter comandos yo lo hago con () por ejemplo
	# PS1="$(date +%d-%m-%Y)@$(date +%I:%M%p)\n${NEGRITA_VERDE}$ ${SINCOLOR}"
	#
	# Si se fijan bien , en el ejemplo anterior use el comando date
	# obviamente que con las opciones , uno para la fecha y otro para la hora
	# el "@" arroba que esta de por medio es solo un adorno.
	#
	# NOTA FINAL : No se si te abras percatado de lo siguiente , es importante que se entienda
	# Primer Ejemplo -> PS1='[\u@\h \W]\$ '
	# Segundo Ejemplo -> PS1="[\u@\h \W]\$ "
	#
	# Posiblemente cuando los uses solo el primero o el segundo , no veas problema alguno
	# Pero cuando intentes usar por ejemplo
	#
	# Primero -> PS1='[${CYAN}\u@\h ${NEGRITA_VERDE}\W]\$ ${SINCOLOR}'
	# Y te percates de que en la terminal , luce asi :
	#
	# [\[\033[0;36m\]inukaze@Inukaze \[\033[01;32m\]Linux]$ \[\033[00m\]
	#
	# La solucion es simplemente cambias las '' por "" , osea como en el segundo ejemplo
	# Te tenie que quedar asi
	# Segundo -> PS1="[${CYAN}\u@\h ${NEGRITA_VERDE}\W]\$ ${SINCOLOR}"
	#
	# Esto es debido a que colocar texto entre ' es para un entrecomillado fuerte y literal
	# de esta manera las variables no pueden cambiar su valor al establecido previamente.
	#
	# Al colocarlo entre " es un entrecomillado más pasivo y las varibles usan sus valores
	
	[ -z "$PS1" ] && return

	alias ls='ls -p --color=auto'
	
	# EJEMPLOS :
	# PS1='[\u@\h \W]\$ '
	# PS1="$NEGRITA_VERDE\u $AMARILLO[$ROJO\w$AMARILLO]$SINCOLOR "
	# PS1="$NEGRITA_VERDE\u $AMARILLO[$ROJO\w$AMARILLO] $NEGRITA_BLUE(\$(date +%H:%M:%S))$SINCOLOR: "
	# PS1="\n\e[1;37m[\e[0;32m\u\e[0;35m@\e[0;32m\h\e[1;37m]\e[1;37m[\e[0;31m\w\e[1;37m]\n$ \e[0m
	# PS1="\[\033[01;32m\]\D{%d-%m-%Y}@`(date +%I:%M%p)`\[\033[00m\]:\[\033[34m\]\w\[\033[00m\]\$ "
	# PS1="\n${SINCOLOR}${NEGRITA_AMARILLO}[Ubicacion Actual : \w]\n${CDU}${NEGRITA_GRIS}$(date +%d-%m-%Y)@$(date +%I:%M%p)\n${NEGRITA_VERDE}$ ${SINCOLOR}"
	# PS1="\n${SINCOLOR}${NEGRITA_AMARILLO}[Hora      : \@ ][Fecha : $(date +%d-%m-%Y) ]\n${NEGRITA_AZUL}[Usuario   : \u  ]\n${SINCOLOR}${NEGRITA_ROJO}[Ubicacion : \W ]${NEGRITA_VERDE}$ ${SINCOLOR}"
	# PS1="\n${SINCOLOR}${NEGRITA_AMARILLO}[Usuario   :   \u  ]${SINCOLOR}${NEGRITA_AZUL}\n[Hora      :  \@  ]\n[Fecha     : $(date +%d-%m-%Y) ]\n${NEGRITA_ROJO}[Ubicacion : \W ]\n${NEGRITA_VERDE}$ ${SINCOLOR}"
	# PS1="\n${SINCOLOR}[ ${NEGRITA_AMARILLO}\u ${SINCOLOR}${NEGRITA_AZUL}| $(date +%d-%m-%Y) | \@ ${SINCOLOR}]\n[${NEGRITA_ROJO}\W${SINCOLOR}]${NEGRITA_VERDE}$ ${SINCOLOR}"


		# Definiendo la variable de entorno PS1 :
		
		# Que yo uso actualmente
		PS1="\n${SINCOLOR}${NEGRITA_AMARILLO}[ \u ${SINCOLOR}${NEGRITA_AZUL} | $(date +%d-%m-%Y) | ${NEGRITA_ROJO}\@ ]${SINCOLOR}\n[\W]${NEGRITA_VERDE}$ ${SINCOLOR}"

		# El Predeterminado de ArchLinux, le cambie los '' por "" , debido a lo que explique más arriba.
		#PS1="[\u@\h \W]\$ "
		
		# NOTA : Puedes guardar este archivo como por ejemplo ~/pruebash
		# y al ejecutar una consola / terminal , o como quieras llamarlo
		# puedes usar el comando :
		#
		# $ source ~/pruebash
		#
		# Asi veras como luce , esto tomara el ultimo valor asignado a PS1
    }

    colores_en_terminal

	# Iniciar mejoras con NVIDIA (Privativo) :
#	nvidia-settings --config==/home/inukaze/.nvidia-settings --load-config-only &>/dev/null ; \
#	nvidia-settings --assign="SyncToVBlank=0" &>/dev/null ; \
#	nvidia-settings --assign="GPUPowerMizerMode=1" &>/dev/null ; \
#	nvidia-settings --assign="OpenGLImageSettings=3" &>/dev/null ; \
#	nvidia-settings --assign="AllowFlipping=1" &>/dev/null ; \
#	nvidia-settings -a InitialPixmapPlacement=2 &>/dev/null ; \
#	nvidia-settings -a GlyphCache=1 &>/dev/null

	# Establecer mi idioma en el Sistema :
#	export LC_CTYPE=es_VE.UTF-8
#	export LC_MESSAGES=es_VE.UTF-8
#	export LC_ALL=es_VE.UTF-8

	# Establecer Puertos para Reproduccion Midi
	# Si Tienes Instalado y estas Usando " Timidity / Timidity++ " :
#	export ALSA_OUTPUT_PORTS="128:0","128:1","128:2","128:3"

	# Correcion para Steam para que me deje de dar errores como :
	# Could not find required OpenGL entry point :
	# 'glColorMaskIndexedEXT'
	# 'GLGetError'!
	# 'glUseProgramStages'!
	# 
#HL2#	export PATH="/media/Compartido/Videojuegos/Gestor/Linux/Steam/Slackware64/home/bin/":$PATH 
#HL2#	export GAME_DEBUGGER="hl2debug"

	# Error de Python :
	#  Could not find platform independent libraries <prefix>
	#  Could not find platform dependent libraries <exec_prefix>
        #  Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
	#  ImportError: No module named site
	#
	# Rebusque :
#	  PATH=/usr/bin:$PATH
	  #export PYTHONPATH=/usr/lib64/python2.7/
	  #export PYTHONHOME=/usr/bin/python
#	export PROMPT_COMMAND='printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
	export PROMPT_COMMAND='printf "\033]0;%s@%s: %s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/*\//}"'

#Activar "ccache" (para compilar mas rapido algunas cosas como retroarch)
export PATH=/usr/lib/ccache/:$PATH


#VirtualBOX : Acceso a Disco Duro Real y Las Particiones "Slacks"
#cd "$HOME"
#rm -rf "$HOME/Compartido.vmdk"
#Compartido=$(blkid | grep "Compartido" | awk '{print$01}' | sed 's/\/*:$//')
#echo "Particion Compartido=$Compartido"
#DDCompartido=$(echo "$Compartido" | sed 's/[0-9]*//g')
#VBoxManage internalcommands createrawvmdk -filename Compartido.vmdk -rawdisk $DDCompartido

#MIDI :
export ALSA_OUTPUT_PORTS="128:0","128:1","128:2","128:3"
MIDI=$(ps -A | egrep 'fluidsynth|timidity')
if [ -z "MIDI" ]; then
	timidity1=$(timidity -iA -B5,10 -Os1l -s 44100 -Oe &> /dev/null &)
	eval "$timidity1"
	MIDI=$(ps -A | egrep 'fluidsynth|timidity' | awk '{print $4}')
	if [ "$MIDI" = "timidity" ]; then
	    #echo 'Sintetizador MIDI en uso : Timidity'
	    echo
	fi
fi

export PULSE_LATENCY_MSEC=60
#export SDL_AUDIODRIVER=alsa

#Corregir rutas en la variable de entorno PATH :
export PATH=$PATH:/sbin:/usr/sbin

#Lo de ".bash_aliases" estaba originalmente
if [ -f ~/.bash_aliases ]; then
	. ~/.bash_aliases
fi

#Establecer optimizaciones para compilar :
export CFLAGS="-O2 -march=k8-sse3 -mtune=k8 -mmmx -msse -msse2 -msse3 -mfpmath=sse -pipe -fomit-frame-pointer"
export CXXFLAGS="$CFLAGS"
export LDFLAGS="-Wl,-O1 -Wl,--as-needed"
export MAKEFLAGS="-j1"
echo 'Se han establecido las optimizaciones de compilacion :'
echo 'export CFLAGS="-O2 -march=k8-sse3 -mtune=k8 -mmmx -msse -msse2 -msse3 -mfpmath=sse -pipe -fomit-frame-pointer"'
echo 'export CXXFLAGS="$CFLAGS"'
echo 'export LDFLAGS="-Wl,-O1 -Wl,--as-needed"'
echo 'export MAKEFLAGS="-j1"'


el contenido actual de mi archivo "$HOME/.bash_aliases" :

Code: Select all

alias killwine=$(reset ; killall -9 conhost.exe winedbg rpcss.exe svchost.exe plugplay.exe winedevice.exe explorer.exe services.exe wineserver 2>/dev/null)
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

Estando en la terminal, si no estoy como super usuario cambio al super usuario

Code: Select all

sudo su
Luego actualizo el sistema completo, esto cambia el núcleo (Linux) de la versión 4.4.29 a la version 5.15.193

Code: Select all

slapt-get --update
slapt-get --install kernel-huge
slapt-get --upgrade -y 
Luego actualizo grub

Code: Select all

grub-mkconfig -o /boot/grub/grub.cfg
Despues reinicio el sistema e ingreso con la nueva version de Linux (el nucleo 5.15.193)
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

*** Seccion : Compilar un Linux Optimizado para mi Equipo ***

Code: Select all

cd /usr/src/linux
cp /boot/config-huge-5.15.193 .config  # (O la versión que estuvieras usando)
* - Luego uso el comando de « make menuconfig » para entrar en la configuracion y empiezo a cambiar las cosas que necesito

Lo primero que hago es guardar el archivo config.old y config.original

Luego Basicamente cambie las siguientes cosas :
Edite -> General Setup ---> Local Version : -AMD_Athlon64_X2_6000_Plus-K8
Seleccione -> General Setup ---> Kernel compression mode (LZ4)
Seleccione -> General Setup ---> Preemption Model ---> Preemptible Kernel (Low-Latency Desktop)
Active -> Device Drivers ---> Android Drivers -> Android Drivers
Active -> Device Drivers ---> Staging Drivers -> Android -> Enable the Anonymous Shared Memory Subsystem (NEW)
Desactive -> Kernel Hacking ---> Compile-time checks and compiler options ---> Generate build-id
Desactive -> Kernel Hacking ---> Compile-time checks and compiler options ---> Debug information
Active -> Processor type and features ---> Processor family ---> (X) Opteron/Athlon64/Hammer/K8
Active -> General Setup -> Support initial ramdisk/ramfs compressed using gzip
Active -> General Setup -> Support initial ramdisk/ramfs compressed using bzip2
Active -> General Setup -> Support initial ramdisk/ramfs compressed using LZMA
Active -> General Setup -> Support initial ramdisk/ramfs compressed using XZ
Active -> General Setup -> Support initial ramdisk/ramfs compressed using LZO
Active -> General Setup -> Support initial ramdisk/ramfs compressed using LZ4
Active -> General Setup -> Support initial ramdisk/ramfs compressed using ZSTD
Active -> General Setup -> Compiler optimization level ---> Optimize for performance (-O2)

Opcionalmente podria haber cambiado : General Setup -> default hostname : darkstar
pero no me molesta que ese sea el nombre aunque se lo puedes cambiar para que sea el nombre predeterminado de tu maquina.

Luego guardo los cambios con el nombre de archivo « .config-amd-athlonx64k8 »
Uso « Exit »

Para empezar a compilar uso el comando

Code: Select all

time nice -n 19 ionice -c 3 make -j2 bzImage modules && echo "¡FORJA TERMINADA, INUKAZE!"
Cuando finalizo la compilacion utilice los siguientes comandos :

Code: Select all

cp arch/x86/boot/bzImage /boot/vmlinuz-5.15.193-AMD_Athlon64_X2_6000_Plus-K8
cp System.map /boot/System.map-5.15.193-AMD_Athlon64_X2_6000_Plus-K8
cp .config /boot/config-5.15.193-AMD_Athlon64_X2_6000_Plus-K8

ln -sf /boot/vmlinuz-5.15.193-AMD_Athlon64_X2_6000_Plus-K8 /boot/vmlinuz
ln -sf /boot/System.map-5.15.193-AMD_Athlon64_X2_6000_Plus-K8 /boot/System.map
ln -sf /boot/config-5.15.193-AMD_Athlon64_X2_6000_Plus-K8 /boot/config
Luego edito mi archivo /etc/default/grub y lo dejo con el siguiente contenido

Code: Select all

joe /etc/default/grub
# Si realizas cambios en este archivo, ejecuta 'update-grub' posteriormente
# para actualizar /boot/grub/grub.cfg.

# Entrada por defecto. "0" es la primera. Si se establece en "saved", usará
# la opción elegida en el arranque anterior mediante 'grub-set-default'.
GRUB_DEFAULT=0

# Tiempo de espera en segundos antes de arrancar automáticamente.
GRUB_TIMEOUT=7

# Desactiva el submenú de opciones avanzadas para una lista plana.
GRUB_DISABLE_SUBMENU=y

# Configuración de visibilidad del menú.
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false

# Identificación del distribuidor (Salix basado en Slackware).
GRUB_DISTRIBUTOR="Salix $(sed -e 's/^Slackware //' /etc/slackware-version)"

# Parámetros del kernel para el arranque normal.
# "ipv6.disable=1" desactiva la pila de red IPv6.
GRUB_CMDLINE_LINUX_DEFAULT="quiet vt.default_utf8=1 ipv6.disable=1"
GRUB_CMDLINE_LINUX=""

# Imagen de fondo para la terminal gráfica.
GRUB_BACKGROUND="/boot/grub/salix.png"

# Colores del menú (Primer plano/Fondo).
GRUB_MENU_COLOR_NORMAL=white/black
GRUB_COLOR_HIGHLIGHT=white/cyan
GRUB_COLOR_NORMAL=white/black

# Descomenta para desactivar la terminal gráfica (solo grub-pc).
#GRUB_TERMINAL_OUTPUT=console

# Resolución de la terminal gráfica (VBE).
# 640x480 es la resolución de compatibilidad universal.
#GRUB_GFXMODE=1280x1024x32,1280x1024x24,auto
#GRUB_GFXMODE=1024x768x32,1024x768x24,auto
#GRUB_GFXMODE=800x600x32,800x600x24,auto
GRUB_GFXMODE=640x480x32,640x480x24,auto
GRUB_GFXPAYLOAD_LINUX=keep

# Tipografía utilizada en la terminal gráfica.
GRUB_FONT=/usr/share/grub/dejavusansmono.pf2

# Desactivar la generación de entradas de modo de recuperación.
GRUB_DISABLE_RECOVERY=true

# Desactivar la detección de otros sistemas operativos (os-prober).
GRUB_DISABLE_OS_PROBER=true

# Filtrado de BadRAM (para memoria RAM con sectores defectuosos).
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
Luego actualizo nuevamente el grub para que tome mi Linux (núcleo) personalizado y optimizado para mi equipo

Code: Select all

grub-mkconfig -o /boot/grub/grub.cfg
Luego reinicio el sistema completo para iniciar con mi Linux.
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

******* Seccion : Gestores de Paqutes *******

Despues de reiniciar, abro nuevamente la terminal y me cambio a la cuenta de usuario del super usuario (root)

Code: Select all

sudo su
# slapt-get

Code: Select all

joe /etc/slapt-get/slapt-srcrc
BUILDDIR=/usr/src/slapt-src
PKGEXT=txz
SOURCE=http://slackware.uk/salix/slkbuild/15.0/
SOURCE=http://slackware.uk/salix/sbo/15.0/

Code: Select all

joe /etc/slapt-get/slapt-getrc

# slpkg

Code: Select all

cd /tmp
slapt-get -u #Actualizar paquetes disponibles
slapt-get -i -y slackpkg # Instalo el gestor de paquetes de Slackware
Edito el archivo de servidores de slackpkg

Code: Select all

joe /etc/slackpkg/mirrors
Descomento la linea :
Guardo los cambios

#Actualizo la lista de paquetes disponibles en el gestor de paquetes slackpkg

Code: Select all

slackpkg update
#Instalo paquetes para resolver dependencias de slpkg

Code: Select all

slackpkg install python-tomli python-packaging pyparsing python-pip python-setuptools lftp
pip install flit-core progress installer
slackpkg install python3 python-urllib3 python-setuptools

Code: Select all

slapt-get -i -y python3-build SQLAlchemy python3-pythondialog #Instalar dependencias
wget -c https://download.salixos.org/x86_64/15.0/salix/a/spkg-1.7-x86_64-2gv.tgz ; installpkg spkg-1.7-x86_64-2gv.tgz #Resolver dependencias que nada jamas indican en ninguna parte.

slapt-get -i -y python3-pep517 # Instalar este paquete de python3-pep517

wget -c https://sourceforge.net/projects/slpkg/files/binary/slpkg-3.9.8-x86_64-1_dsw.txz/download -O slpkg-3.9.8-x86_64-1_dsw.txz ; installpkg slpkg-3.9.8-x86_64-1_dsw.txz ; ldconfig
# Activo los repositorios que quiero en slpkg, se activan presionando « Espacio » :
slack
sbo
multi
salix

Edito mi archivo -> /etc/slpkg/slpkg.conf

Code: Select all

joe /etc/slpkg/slpkg.conf
# Configuration file for slpkg
#
# slpkg.conf file is part of slpkg.
#
# Copyright 2014-2022 Dimitris Zlatanidis <d.zlatanidis@gmail.com>
# All rights reserved.
#
# Slpkg is a user-friendly package manager for Slackware installations.
#
# https://gitlab.com/dslackw/slpkg
#
# Slpkg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# END OF LEGAL NOTICE
#
# ----------------------------------------------------------------------------
# Set Slackware release "stable" or "current". Default is "stable".
RELEASE=stable

# Set Slackware version if it's necessary. Default is "off".
SLACKWARE_VERSION=off

# Set computer architecture if it's necessary. Default is "off".
COMP_ARCH=off

# Build directory for repository "sbo" slackbuilds.org. In this
# directory downloaded sources and scripts for building.
# Default is "/tmp/slpkg/build/".
BUILD_PATH=/tmp/slpkg/build/

# Alternative source downloads for the "sbo" repository. Default is "off".
SBOSRCARCH=off
SBOSRCARCH_LINK=http://slackware.uk/sbosrcarch/by-name/

# Download directory for others repositories that use binaries files
# for installation. Default is "/tmp/slpkg/packages/"
PACKAGES=/tmp/slpkg/packages/

# Download directory for Slackware patches file.
PATCHES=/tmp/slpkg/patches/

# If CHECKMD5 is "on" the system will check all downloaded
# sources and Slackware packages. Default is "on".
CHECKMD5=on

# Delete all downloaded files if DEL_ALL is "on". Default is "on".
DEL_ALL=on

# Delete build directory after each process if DEL_BUILD is "on".
# Settings for the repository "sbo" slackbuilds.org. Default is "off".
DEL_BUILD=off

# Keep build log file if SBO_BUILD_LOG is "on". Default is "on".
SBO_BUILD_LOG=off

# Speed up SlackBuild scripts. If "on" slpkg auto detect the numbers of
# processor and apply into MAKEFLAGS variable. Some SlackBuilds fail if
# MAKEFLAGS is declared or the number of processors (-j <n>) is greater
# than one. Default if "off".
MAKEFLAGS=off

# Define default answer to slpkg questions.
# Choose "y" if you do not want to questions. Default is "n".
DEFAULT_ANSWER=n

# Define default answer for the removal of dependencies.
# Choose "y" if you do not want to question. Default is "n".
REMOVE_DEPS_ANSWER=n

# If you want build UNSUPPORTED or UNTESTED packages choose "y".
# Settings for the repository "sbo" slackbuilds.org. Default is "n".
SKIP_UNST=n

# If you want to disable automatic resovle dependencies choose "off".
# Default is "on".
RSL_DEPS=on

# Delete package dependencies if DEL_DEPS is on.
# You must be careful if you enable this option because it can remove
# packages related to distribution. Default is "off".
DEL_DEPS=off

# Use colors for highlighting. Choose "on" or "off". Default is "on".
USE_COLORS=on

# Downloader utility. Four options are supported "wget", "aria2c",
# "curl" and "http" (HTTPie). Default is "wget".
DOWNDER=wget

# Downloader [OPTION]. Pass downloader options, for curl use "-L -o" as
# using to download in specific directory and support any redirects
# such as from sourceforge repository. aria2c recommended "--allow-overwrite"
# options by default. Http recommended "-d -c -o" options by default.
# Default for wget is "-c -N".
DOWNDER_OPTIONS=-c -N

# Update slackpkg ChangeLog.txt file if SLACKPKG_LOG is "on".
# Automatically synchronizes the command "slackpkg update" with
# "slpkg -c slack --upgrade". Default is "on".
SLACKPKG_LOG=on

# This option applies only to the distribution upgrade and repository
# slack (Slackware). If you want to update only packages that are installed
# choose "on". Default is "off".
# NOTE: This option is not recommended at "on" because it can leave out
# packages required for distribution.
ONLY_INSTALLED=off

# Register a text editor that uses the slpkg in a few options.
# Default is "nano".
EDITOR=nano

# If you don't want slpkg downgrade packages, setting this variable to "on".
# Warning: Possible failure building packages or running applications after
# install. Default is "off".
NOT_DOWNGRADE=off

# If you are working under a proxy server you need to set
# your proxy server here. Default is null.
HTTP_PROXY=

# Replicando exclusiones de slapt-getrc para slpkg
BLACKLIST = [ 'aaa_elflibs', 'aaa_base', 'devs', 'glibc.*', 'kernel-.*', 'rootuser-settings', 'zzz-settings.*' ]
#slackpkg

Code: Select all

joe /etc/slackpkg/slackpkg.conf
#
# /etc/slackpkg/slackpkg.conf
# Configuration for SlackPkg
# v15.0
#

# SlackPkg - An Automated packaging tool for Slackware Linux
# Copyright (C) 2003-2011 Roberto F. Batista, Evaldo Gardenali
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# Project Page: https://slackpkg.org/
# Roberto F. Batista (aka PiterPunk) piterpunk@slackware.com
# Evaldo Gardenali (aka UdontKnow) evaldogardenali@fasternet.com.br

# For configuration options that have only two states, possible values are
# either "on" or "off"

# Remember, the only official Slackware ports are x86, s390, arm, and aarch64,
# and slackpkg developers don't have s390 boxes for testing. If you are
# testing/using other architectures and have suggestions or patches, please
# let us know (email rworkman@slackware.com)
#
# Select the architecture of your system. Valid values are:
# i#86 (where # is 3, 4, 5 or 6)
# x86_64
# s390
# arm* (* can be v4, v5tejl, and other ARM versions)
# aarch64
# powerpc
#
# The line is commented because slackpkg will try to find your
# architecture automagically. If you want to override what slackpkg
# finds, put the value after the = and uncomment this line
#ARCH=

# The default PKGMAIN is "slackware", but some derived distros use other
# names as the main directory. PKGMAIN is the place with the slackware
# package series (a, ap, n, ... ).
#
# Usually slackpkg can automagically discover this variable. If you want
# to override the discovered variable, then uncomment this line and change
# it to reflect the correct value of PKGMAIN
#PKGMAIN=slackware

# Slackware packages are signed by project key. Slackpkg uses this key
# to check if the packages downloaded are valid, so remember to set
# CHECKGPG to "on".
#
# Usually slackpkg can automagically discover this variable. If you want
# to override the discovered variable, then uncomment this line and edit
# as needed
#SLACKKEY="Slackware Linux Project <security@slackware.com>"

# Downloaded files will be in the TEMP directory:
TEMP=/var/cache/packages

# Package lists, file lists, and others will be stored in WORKDIR:
WORKDIR=/var/lib/slackpkg

# Special options for wget (default is WGETFLAGS="--passive-ftp")
WGETFLAGS="--passive-ftp"

# If DELALL is "on", all downloaded files will be removed after install.
DELALL=on

# If CHECKMD5 is "on", the system will check the md5sums of all packages before
# install/upgrade/reinstall is performed.
CHECKMD5=on

# If CHECKGPG is "on", the system will verify the GPG signature of each package
# before install/upgrade/reinstall is performed.
CHECKGPG=on

# If CHECKSIZE is "on", the system will check if we have sufficient disk
# space to install selected package. This make upgrade/install safer, but
# will also slow down the upgrade/install process.
CHECKSIZE=off

# PRIORITY sets the download priority. slackpkg will try to found the
# package first in the first value, then the second one, through all
# values in list.
#
# Default value: patches %PKGMAIN extra pasture testing
PRIORITY=( patches %PKGMAIN extra pasture testing )

# Enables (on) or disables (off) slackpkg's post-installation features, such
# as checking for new (*.new) configuration files and new kernel images, and
# prompts you for what it should do. Default=on
POSTINST=on

# Post-installation features, by default, search all of /etc and a few other
# predefined locations for .new files. This is the safe option: with it,
# you won't have any unmerged .new files to cause problems. Even so, some
# people prefer that only the .new files installed by the current slackpkg
# session be checked. If this is your case, change ONLY_NEW_DOTNEW to "on".
# Default=off
ONLY_NEW_DOTNEW=off

# Whether to backup files overwritten by their .new counterparts with a
# .orig extension.
ORIG_BACKUPS=on

# The ONOFF variable sets the initial behavior of the dialog interface.
# If you set this to "on" then all packages will be selected by default.
# If you prefer the opposite option (all unchecked), then set this to "off".
ONOFF=on

# If this variable is set to "on", all files will be downloaded before the
# requested operation (install or upgrade) is performed. If set to "off",
# then the files will be downloaded and the operation (install/upgrade)
# performed one by one. Default=on
DOWNLOAD_ALL=on

# Enables (on) or disables (off) the dialog interface in slackpkg. Default=on
DIALOG=on

# Enables (on) or disables (off) the non-interactive mode. If set to "on",
# slackpkg will run without asking the user anything, and answer all questions
# with DEFAULT_ANSWER. If you do any upgrades using this mode, you'll need to
# run "slackpkg new-config" later to find and merge any .new files.
BATCH=off

# Default answer to slackpkg questions. Can be "y" or "n".
DEFAULT_ANSWER=n

# Slackpkg allows a template to "include" the packages specified in another
# template. This option enables (on) or disables (off) the parsing of
# any "#include" directives in template files. Default=on
USE_INCLUDES=on

# Enables a spinning bar as visual feedback when slackpkg is making its
# internal lists and some other operations. Default=on
SPINNING=on

# Max number of characters that "dialog" command can handle.
# If unset, this variable will be 19500 (the number that works on
# Slackware 10.2)
DIALOG_MAXARGS=139000

#
# The MIRROR is set from /etc/slackpkg/mirrors
# You only need to uncomment the selected mirror.
# Uncomment one mirror only.
#

Code: Select all

joe /etc/slackpkg/slackpkgplus.conf
# Configuration for slackpkg+.
# Please read manpage: "man slackpkgplus.conf" and documentation /usr/doc/slackpkg+-*/README

# Enable (on) / Disable (off) slackpkg+
SLACKPKGPLUS=on

# set to '0' to never show the download progress bar
# set to '1' to show the bar only in download packages (default)
# set to '2' to always show the download bar
# set to '3' for a debug mode
VERBOSE=1

# Enable TERSE to use a smaller output in installpkg/upgradepkg
USETERSE=on

# Enable a smaller output for slackpkg search. It replace first column with one colorized
# on: [unin] uninstalled, [inst] installed, [upgr] upgrade, [mask] uninstalled/masked
# tiny: [-] uninstalled, installed, upgrade, [M] uninstalled/masked
# off: leave unchanged and black/white.
#TERSESEARCH=tiny
TERSESEARCH=on

# Use proxy. Leave commented to use system settings.
#PROXY=off
#PROXY=<host>:<port>

# By default slackpkg+ deny to install 32bit packages.
#
# Set this flag to 'on' allow slackpkg+ to install 32bit packages on a 64bit slackware
# installation (possibly unsafe). Please, do not install both 32 and 64bit of the same
# package to avoid problems, and NEVER upgrade existing 64bit packages with relative 32bit package.
# Do not forget to install the multilibs.
ALLOW32BIT=off

# Enable (on) / Disable (off) the official slackpkg blacklist. May be useful to temporarily skip
# the slackware blacklist. You can also override it from command line:
# 'USEBL=off slackpkg upgrade-all'
USEBL=on

# Enable (on) / Disable (off) the legacy blacklist system ignoring the improvement
# from slackpkg 15. Some improvement are not useful with third party repositories
# Note that the legacy system does apply it as regex to the entire pkglist row
# repository, name, version, arch, build, fullname, series/path, extension.
LEGACYBL=off

# Add custom option to 'wget'.
# You can solve the repository unavailability problems by set a timeout here
# Also add "-q" for super terse output (useful with USETERSE=on)
WGETOPTS="--timeout=20 --tries=2"

# If you want replace wget with another downloader search DOWNLOADCMD in documentation
# at /usr/doc/slackpkg+-*/README
#DOWNLOADCMD="wget2 --progress=bar -O"

# Enable (on) / Disable (off) checking disk space to download and install packages. Default to "off"
#CHECKDISKSPACE=on

# Defines if the changelog of any third party repository must be searched in parent URL when not found in base URL.
# Can be set to "on" or "off" (default)
SEARCH_CLOG_INPARENT=on

# Use the cache for metadata files (CHECKSUMS.md5,...). Enable it (on) to speedup the slackpkg update
# process by downloading just new files (see README). Disabled by default (off)
CACHEUPDATE=off

# You can download-only by setting DOWNLOADONLY to 'on'. You may (you should) also use it in command line,
# for example: "DOWNLOADONLY=on slackpkg upgrade-all". Useful for large upgrades.
# You may also use 'slackpkg download' if you want to download few packages
#DOWNLOADONLY=off

# Enable (on) / Disable (off) notification events (see notifymsg.conf)
#ENABLENOTIFY=off

# Enable (on) / Disable (off) the greylist feature. See /etc/slackpkg/greylist
GREYLIST=on

# Defines if commands 'search' and 'file-search' are case-sensitive (on) or not (off). Default to "on"
SENSITIVE_SEARCH=off

# Defines if command 'file-search' does search Whole Word (on) or accept partial words (off). Note that
# you may obtains many many results searching a short partial word
WW_FILE_SEARCH=off

# Select the show order in dialog box. Available "package" "repository" "tag" "path" "arch"
SHOWORDER=package

# Allow to show more details of the package in 'slackpkg info <package>'. Accepts "none", "basic", "filelist"
DETAILED_INFO=basic

# Enable (on) / Disable (off) a Strict GPG Check. A repository should contains packages signed
# with the only original GPG-KEY. In some custom repository may be wanted to mix heterogeneous
# packages; to use that repository set Strict GPG Check to off. P.S: a repository can
# contain just ONE gpg-key; you may manually import the other.
STRICTGPG=on

# If two or more repositories contains some same packages, you can specify
# from which repository you prefer to search it.
# The syntax is "<repository_name>:<package_name>"
# Accepts regular expressions. To give priority to an entire repository use "<repository_name>"

# Examples:
#PKGS_PRIORITY=( restricted:vlc )
# OR
#PKGS_PRIORITY=( myrepo )
#
# if you have two repositories to give priority you must set both in the same line
#PKGS_PRIORITY=( myrepo restricted:vlc )
#
#
# If you want a multilib system, uncomment the 'multilib' repository and set:
#PKGS_PRIORITY=( multilib )
#
# (Use /usr/doc/slackpkg+-*/setupmultilib.sh to setup a multilib configuration)
#PKGS_PRIORITY=( multi slack )
PKGS_PRIORITY=( slackpkgplus multi )

# Otherwise you can try to upgrade a package from a repository that contains a package with the
# same tag of the already installed package. Typically that means to upgrade a package from the
# same author of the already installed package.
# Note that this method may not works properly where two repositories contains a package with the
# same tag.
# Set TAG_PRIORITY to 'on' to enable this function
TAG_PRIORITY=off

# List repositories you want to use (defined below)
# remember to launch 'slackpkg update' if you modify this row.
#REPOPLUS=( slackpkgplus restricted alienbob )
#REPOPLUS=( slackpkgplus )
REPOPLUS=( slackpkgplus multi)

# Define mirrors (uncomment one or more mirror; remember to add it to REPOPLUS)
# GPG Note: after adding/renaming a repository, you must to run 'slackpkg update gpg';
# some repositories as salixos, have a partial GPG support;
# for that repositories you may need to run slackpkg with 'slackpkg -checkgpg=off ...'

# Slackware 15.0 - x86_64
MIRRORPLUS['multi']=https://bear.alienbase.nl/mirrors/peopl ... ilib/15.0/
#MIRRORPLUS['multilib']=https://slackware.nl/people/alien/multilib/15.0/
#MIRRORPLUS['alienbob']=https://slackware.nl/people/alien/sbrepos/15.0/x86_64
#MIRRORPLUS['restricted']=https://slackware.nl/people/alien/restr ... 5.0/x86_64

# use this to keep the slackpkg+ package updated to the latest stable release
MIRRORPLUS['slackpkgplus']=https://slakfinder.org/slackpkg+15/

# use the development branch to use the mainline version and help develop by reporting bugs.
#MIRRORPLUS['slackpkgplus']=https://slakfinder.org/slackpkg+dev/

# Local repository:
#MIRRORPLUS['alienbob']=file://repositories/alien/sbrepos/15.0/x86/
#
# Local packages (you do not need metadata nor 'slackpkg update' command):
#MIRRORPLUS['myrepo']=dir://repositories/mypackages/
#
# Remote packages (you do not need metadata)
#MIRRORPLUS['slackpkgbeta']=httpsdir://slackpkg.org/beta/

# SBo SlackBuilds. Uncomment it to allow slackpkg to search SlackBuilds on SlackBuilds.org
# This does not replace sbopkg; slackpkg just report the package, version and url; you may
# download it via 'slackpkg download <packagename>' and build it yourself or via sbopkg.
#SBO['15.0']=https://www.slackbuilds.org/slackbuilds/15.0/
#SBO['current']=https://cgit.ponce.cc/slackbuilds/


# Plugin section:
# Here you can enable some optional feature. Please read documentation before enable it.
#
# ZLookKernel can help you to rebuild initrd and reinstall lilo/elilo/grub. This feature was
# removed in slackpkg-15.0. 'enable' this setting to enable it.
# read /usr/libexec/slackpkg/functions.d/zlookkernel.sh for more information
# It will ask confirmations at every step, unless you will set 'PLUGIN_ZLOOKKERNEL_PROMPT=off'
# It will manage /boot/vmlinuz by default; if you use kernel generic, please set
# the PLUGIN_ZLOOKKERNEL_IMAGE=/boot/vmlinuz-generic to manage it
#PLUGIN_ZLOOKKERNEL=disable
#PLUGIN_ZLOOKKERNEL_PROMPT=on
#PLUGIN_ZLOOKKERNEL_IMAGE=/boot/vmlinuz
#
# ZChangeLog track all repository changes everytime you run 'slackpkg update'
# It write the changelog at /var/lib/slackpkg/RepoChangeLog.txt
# 'enable' this setting to enable it. Also set 'PLUGIN_ZCHANGELOGS_SHOW=on' to print
# the changes in standard output at the end of 'update' process.
# read /usr/libexec/slackpkg/functions.d/zchangelog.sh for more information
#PLUGIN_ZCHANGELOG=disable
#PLUGIN_ZCHANGELOG_SHOW=off
#

#
# Supported Repositories (see /usr/doc/slackpkg+-* for details and notes):
#
#slackpkgplus: https://slakfinder.org/slackpkg+{dev,1.7,1.8,15}/
#multilib: https://slackware.nl/people/alien/multi ... ,current}/
#alienbob: https://slackware.nl/people/alien/sbrep ... 6,x86_64}/
#restricted: https://slackware.nl/people/alien/restr ... 6,x86_64}/
#msb: https://slackware.uk/msb/{15.0,current} ... 6,x86_64}/
#csb: https://slackware.uk/csb/{15.0,current}/{x86,x86_64}/
#slackers: https://slack.conraid.net/repository/sl ... 4-current/
#slackonly: https://packages.slackonly.com/pub/pack ... .0-x86_64/
#slackel: http://www.slackel.gr/repo/{i486,x86_64}/current/
#slint: https://slackware.uk/slint/x86_64/slint-15.0/
#salixos: https://download.salixos.org/{i486,x86_64}/15.0/
#salixextra: https://download.salixos.org/{i486,x86_64}/extra-15.0/


Code: Select all

joe /etc/slackpkg/blacklist
# /etc/slackpkg/blacklist
#
# This is a blacklist file. Any packages listed here won't be
# upgraded, removed, or installed by slackpkg.

# aaa_libraries should NOT be blacklisted!
#
# You can blacklist using regular expressions.
#
# All of the following will be checked for the regex:
# Package series, name, version, arch, build, and fullname
# When blacklisting packages, you can use extended regex on package names
# (such as xorg-.* instead of xorg-server, xorg-docs, etc), and a trailing
# slash for package series ("n/", "ap/", "xap/", etc).
#
# To blacklist *only* the "xorg-server" package, use this:
# xorg-server
#
# To blacklist *all* of the "xorg-server-*" packages, use this:
# xorg-server.*
#
# To blacklist the entire KDE package set, use this:
# kde/
#
# You will need to escape any special characters that are present in the
# package name. For example, to blacklist the gcc-g++ package, use this:
# gcc-g\+\+
#
# DON'T put any space(s) before or after the package name or regex.
#
# Automated upgrade of kernel packages may not be wanted in some situations;
# uncomment the lines below if that fits your circumstances, but note that
# kernel-headers should *not* be blacklisted:
#
#kernel-generic.*
#kernel-huge.*
#kernel-modules.*
#kernel-source
#
# This one will blacklist all SBo packages:
#[0-9]+_SBo

# Replicando exclusiones de slapt-getrc
aaa_elflibs
aaa_base
devs
glibc.*
kernel-.*
rootuser-settings
zzz-settings.*
# Excluir paquetes de 32 bits nativos (el equivalente a -i?86-)
[0-9]+i[3456]86
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

******* Soporte de 32 Bits en 64 Bits *******

Luego instalo el soporte de 32 Bits en mi distro de 64 Bits. Como ya explique en -> viewtopic.php?t=8874

Code: Select all

sudo su

Code: Select all

SLACKVER=15.0
mkdir /tmp/multilib
cd /tmp/multilib
lftp -c "open http://bear.alienbase.nl/mirrors/people/alien/multilib/ ; mirror -c -e ${SLACKVER}"
cd ${SLACKVER}
upgradepkg --reinstall --install-new *.t?z
upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z
# Luego le pregunto al sistema cual es mi tarjeta de video :

Code: Select all

lspci | grep -E "VGA|3D|Display"
02:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 620] (rev a1)
Lo importa es « GeForce GT 620 ». Visito el sitio -> https://www.nvidia.com/es-es/drivers/ y busco « GeForce 600 Series | GeForce GT 620 | Linux 64-bit »
Y hago clic en Buscar. La información que necesito es la que dice « Versión de controlador: 390.157 »

Ahora en mi terminal uso el comando de slpkg para buscar la palabra nvidia y el numero 390.157

Code: Select all

slpkg -F nvidia | grep 390.157
sbo nvidia-legacy390-driver-390.157 0 K
sbo nvidia-legacy390-kernel-390.157 0 K
# Compilo mis controladores privativos nvidia para mi tarjeta de video

Code: Select all

COMPAT32=yes slpkg -s sbo --rebuild --reinstall nvidia-legacy390-{driver,kernel}
luego de que slpkg compile y cree los paquetes. creo una replica de la estructura de /tmp donde slpkg trabajo

Code: Select all

mkdir -p /root/tmp/SBo
mkdir -p /root/tmp/slpkg/build/_SOURCES
# Copio los archivos a la estructura replicada

Code: Select all

cp -rf /tmp/SBo/nvidia-* /root/tmp/
cp -rf /tmp/SBo/NVIDIA-Linux-* /root/tmp/
cp -rf /tmp/SBo/package-nvidia-* /root/tmp/
cp -rf /tmp/slpkg/build/nvidia-legacy390-* /root/tmp/slpkg/build/
cp -rf /tmp/slpkg/build/_SOURCES/nvidia-* /root/tmp/slpkg/build/_SOURCES/
cp -rf /tmp/slpkg/build/_SOURCES/NVIDIA-Linux-* /root/tmp/slpkg/build/_SOURCES/
# Finalmente creo una carpeta y renombro los paquetes (slpkg los instala automaticamente):

Code: Select all

mkdir -p /root/nvidia-390.157/amd-k8
cp /tmp/nvidia-legacy390-driver-390.157_multilib-x86_64-10_SBo.tgz /root/nvidia-390.157/amd-k8/nvidia-legacy390-driver-390.157_5.15.193_AMD_Athlon64_X2_6000_Plus_K8-x86_64-3_SBo-amdk8.tgz
cp /tmp/nvidia-legacy390-kernel-390.157_multilib-x86_64-10_SBo.tgz /root/nvidia-390.157/amd-k8/nvidia-legacy390-kernel-390.157_5.15.193_AMD_Athlon64_X2_6000_Plus_K8-x86_64-3_SBo-amdk8.tgz
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

****** Seccion Programas *******

Code: Select all

sudo su
Bueno ahora voy a instalar algunas cosas que me resultan utiles

Code: Select all

slapt-get -u
slapt-get -i deb2tgz
# Como de momento el guion del paquete oficial no me esta creando el paquete en tgz modificare el guion, solo necesito copiar y pegar lo siguiente en una terminal que tenga el usuario root activo

Code: Select all

cat << 'EOF' > /usr/bin/deb2tgz
#!/bin/sh
# Copyright 2016 Vitor Borrego, Corroios, Portugal
# Heavily based on deb2tgz (https://code.google.com/archive/p/deb2tgz/)
# Modified for modern DEB support (zst) and manual fixes.

CURRDIR=$(pwd)

if [ "$1" = "" ]; then
    echo "$0: Converts DEB format to standard GNU tar + (GZ/XZ/LZ/BZ/ZST) format."
    echo "Usage: $0 <file.deb>"
    exit 1;
fi

make_temp_dir()
{
    if [ -x "$(which mktemp)" ]; then
        tempd=$(mktemp -d)
        chmod 755 $tempd
    else
        tempd=/tmp/tmp.$RANDOM
        mkdir -p -m 0755 $tempd
    fi

    if [ -d $tempd ]; then 
        echo $tempd
    else
        echo "ERROR: Could not create temporary directory."
        exit 1
    fi
}

for debfile in "$@" ; do
    TMPDIR=$(make_temp_dir)
    FULL_PATH=$(realpath "$debfile")
    
    cd $TMPDIR
    ar x "$FULL_PATH" 2> /dev/null

    if [ ! $? = 0 ]; then
        echo "ERROR: ar failed on $debfile"
        rm -rf $TMPDIR
        continue
    fi

    # Lógica de conversión y renombrado
    NAME=$(basename "$debfile" .deb)

    if [ -f "data.tar.gz" ]; then
        mv data.tar.gz "$CURRDIR/$NAME.tgz"
    elif [ -f "data.tar.xz" ]; then
        mv data.tar.xz "$CURRDIR/$NAME.txz"
    elif [ -f "data.tar.bz2" ]; then
        mv data.tar.bz2 "$CURRDIR/$NAME.tbz"
    elif [ -f "data.tar.lzma" ]; then
        mv data.tar.lzma "$CURRDIR/$NAME.tlz"
    elif [ -f "data.tar.zst" ]; then
        # Los sistemas Slackware prefieren .txz o .tgz, convertimos zst a tgz
        # si tienes zstd instalado, de lo contrario solo lo mueve.
        if [ -x "$(which zstd)" ]; then
            zstd -d data.tar.zst -o data.tar 2> /dev/null
            gzip data.tar
            mv data.tar.gz "$CURRDIR/$NAME.tgz"
        else
            mv data.tar.zst "$CURRDIR/$NAME.tar.zst"
        fi
    fi

    rm -rf $TMPDIR
done

cd $CURRDIR
EOF

chmod +x /usr/bin/deb2tgz
# bootlogd -> para crear el archivo /var/log/boot para obtener una copia de los mensajes que veo durante el arranque del sistema

Code: Select all

cd /tmp
wget -c 'http://ftp.us.debian.org/debian/pool/main/s/sysvinit/bootlogd_2.96-7+deb11u1_amd64.deb'
deb2tgz bootlogd_2.96-7+deb11u1_amd64.deb
installpkg bootlogd_2.96-7+deb11u1_amd64.txz ; ldconfig
echo 'BOOTLOGD_ENABLE=Yes' | tee /etc/default/bootlogd
#Creo una copia de seguridad y luego edito el archivo /etc/rc.d/rc.S
cp /etc/rc.d/rc.S /etc/rc.d/rc.S.original
chmod -x /etc/rc.d/rc.S.original

nano /etc/rc.d/rc.S

En la linea 314 agrego :

Code: Select all

#Inicio de lo Agregado manualmente
# BootLogD:
  if [ -x /sbin/bootlogd ]; then
    echo "Starting bootlogd..."
    : > /var/log/boot
    /sbin/bootlogd -c -l /var/log/boot
  fi
#Fin de lo Agregado manualmente
Para una referencia mas clara, lo que esta justo antes de lo que agregue es el siguiente bloque de texto
# Remount the root filesystem in read-write mode
echo -e "${BOLDCYAN}Remounting root device with read-write enabled.${COLOR_RESET}"
/sbin/mount -w -v -n -o remount /
if [ $? -gt 0 ] ; then
echo "${BOLDRED}FATAL: Attempt to remount root device as read-write failed! This is going to"
echo "cause serious problems.${COLOR_RESET}"
fi
y lo que esta justo despues de lo que agregue es el siguiente bloque de texto :
else
echo "Testing root filesystem status: read-write filesystem"
echo
echo "ERROR: Root partition has already been mounted read-write. Cannot check!"
echo
echo "For filesystem checking to work properly, your system must initially mount"
echo "the root partition as read only. If you're booting with LILO, add a line:"
echo
echo " read-only"
echo
echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
fi # Done checking root filesystem
fi
Ya se que visto de buenas a primera esto se ve extraño, pero hay una razon muy simple, es para que apenas se monte / (el sistema raiz), comrpuebe si existe el archivo /sbin/bootlog, si es ejecutable y lo ejecute, para que escriba en el archivo /var/log/boot registrando en el archivo la mayor parte de lo que el usuario ve durante el arranque del sistema.

Lo cual me resulta util para ver que cosas que no necesito se inician durante el arranque.


Aqui compartire un enlace a unos pocos paquetes ya precompilados que tendre mientras (siempre) se mantenga la misma version del nucleo -> https://www.mediafire.com/folder/32kydq ... e(64)-15.0

Luego sigo mis propias instrucciones para instalar Virt-Managet [ qemu (libvirt) ] -> https://www.linuxquestions.org/question ... ost6549238

Luego sigo mis propias instrucciones para instalar VirtualBox -> https://www.linuxquestions.org/question ... ost6549238

Si la tampoco te deja compilar a la primera puedes ver este otro tema -> https://www.linuxquestions.org/question ... 175754855/

Luego me instalo el (g)cdemu : Esto es el equivalente homologo al Daemon Tools para Windows.

Code: Select all

su -c "slpkg update ; slpkg -s sbo --rebuild --reinstall cdemu-daemon cdemu-client libmirage vhba-module ; ldconfig ; groupadd cdemu ; usermod -a -G cdemu $USER" root ; ldconfig
Luego edito el archivo /etc/rc.d/rc.local y agrego :

Code: Select all

# CDEmu : Start cdemu daemon

        if [ -x /etc/rc.d/rc.cdemud ]; then
                /etc/rc.d/rc.cdemud start
        fi
Guardo los cambios y salgo del editor de texto

Luego edito el archivo /etc/rc.d/rc.local_shutdown y agrego

Code: Select all

# CDEmu : Stop cdemu daemon

        if [ -x /etc/rc.d/rc.cdemud ]; then
                /etc/rc.d/rc.cdemud stop
        fi
Depues ejecuto el comando para establecer los permisos :

Code: Select all

su -c "chmod a+o+x /etc/rc.d/rc.local ; chmod a+o+x /etc/rc.d/rc.shutdown ; chmod a+o+x /etc/rc.d/rc.cdemud" root
Para probar que cdemu funciona hay que insertarle el modulo a linux ya que como no he reiniciado no lo ha hecho durante el arranque.

Code: Select all

su -c "modprobe vhba" root
La interfaz grafica para cdemu en caso de usarse un entorno de escritorio basado en QT como Plasma, Budgie, Pantheon, etc . . . :

Code: Select all

su -c "slpkg -s sbo --rebuild --reinstall kde_cdemu ; ldconfig" root
La interfaz grafica para cdemu en caso de usarse un entorno de escritorio basado en GTK como Gnome, Xfce, Cinnamon, etc . . .

Code: Select all

su -c "slpkg -s sbo --rebuild --reinstall gcdemu ; ldconfig" root
Para que el demonio de cdemu no me vaya a dar ningun problema usando sus interfaces graficas, debo ejecutar lo siguiente :

Code: Select all

su
mkdir -p /etc/xdg/autostart
touch /etc/xdg/autostart/cdemu-daemon-start.desktop

echo '#!/usr/bin/env xdg-open
[Desktop Entry]
Exec=cdemu-daemon start
GenericName=CDEmu Daemon
Icon=/usr/share/pixmaps/cdemu-client.png
Name=CDEmu Daemon
StartupNotify=true
Terminal=false
Type=Application
X-KDE-SubstituteUID=false' | tee /etc/xdg/autostart/cdemu-daemon-start.desktop

chmod a+o+x /etc/xdg/autostart/cdemu-daemon-start.desktop
Me instalo el salix-update

Code: Select all

slapt-get -u
slapt-get -i salix-update-notifier
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

******* /etc/sysctl.conf *******

Code: Select all

sudo su

Code: Select all

joe /etc/sysctl.conf
# Este es el archivo de configuración para los parámetros de
# Linux es decir el Nucleo (Kernel) en tiempo de ejecución.
# Permite modificar el comportamiento del "cerebro" de Linux sin tener que recompilarlo.

#Como Solo tengo 4GB Ram, DDR2 a 800 MHz. Establecere lo siguiente :

#Prioridad de Memoria de Intercambio (Por defecto viene en 60 lo cambiare a 10)
#Esto define qué tan rápido el nucleo es decir Linux usa el espacio de intercambio.
#Por defecto suele estar en 60(%). Para mi equipo, 10(%) es lo ideal

# Reducir la tendencia a usar el area de Intercambo [SWAP] (Ideal para 4GB de RAM)
#vm.swappiness=10

# Forzar el uso de ZRAM (RAM comprimida) para maximizar los 4GB físicos
vm.swappiness=100
# Nota: Al usar ZRAM con prioridad alta (100), queremos que Linux
# mueva datos aquí lo antes posible. Esto evita que el sistema
# se ralentice tratando de liberar RAM física a último momento.

#Se puede comprobar cuanto esta usando con el comando
#cat /proc/sys/vm/swappiness

# Lo siguiente ayuda a que el sistema mantenga
# Los metadatos de los archivos en RAM más tiempo
#ORIGINAL#vm.vfs_cache_pressure=100
#Lo reducire a la mitad para emular Sony PlayStation 2 : Final Fantasy X en este caso
vm.vfs_cache_pressure=50

# Reserva de seguridad: 64MB para asegurar que el sistema siempre tenga
# memoria disponible para tareas críticas del núcleo.
vm.min_free_kbytes=65536

# Evitar pausas por escrituras "sucias" en la unidad de estado solido [SSD]
# Basado en porcentaje, en este caso el 10%
# Es el límite de "pánico" (10% de tu RAM, unos 400MB).
vm.dirty_ratio=10
# Si llegas a este punto, el sistema bloquea cualquier otra actividad
# de escritura de las aplicaciones (como tu música o el navegador)
# y se concentra exclusivamente en vaciar la RAM al SSD.
#
# Define el límite (3% de tu RAM, unos 120MB en mi caso)
vm.dirty_background_ratio=3
# En el que el núcleo dice:
# "Oye, ya hay suficientes datos nuevos.
# Voy a empezar a escribirlos en el SSD.
# en segundo plano sin molestar al usuario".

# Como basado en porcentaje no salio muy bien intentare de esta otra manera:
# En lugar de ratios por porcentaje, usamos tamaños fijos
# (16 MB) Le dice a el nucleo (Linux):
vm.dirty_background_bytes = 16777216
# "En cuanto se acumulen apenas 16 MB
# de datos nuevos en la RAM que no
# se han guardado, empieza a
# escribirlos en el SSD
# inmediatamente en segundo plano".
#
# * Beneficio: Al ser una cantidad tan pequeña, el SSD termina rápido y no satura el bus de datos.
#
# (33 MB) Es el límite máximo.
vm.dirty_bytes = 33554432
# Si una aplicación (como Brave)
# intenta escribir datos muy rápido.
# el nucleo (Linux) la frena en seco
# al llegar a los 33 MB hasta que la
# SSD se ponga al día.
#
#
# * Beneficio: Evita que el sistema acumule 800MB de "basura"
# (como hacía con mi 20%). Escribir 33MB en un SSD es casi instantáneo.
# por lo que en lugar de un "tirón" de 3 minutos.
# podrías sentir un micro-parpadeo imperceptible.

# Para que el sistema lea los cambios como root ejecuta el comando :
# sysctl -p

# Recomendacion -> Recuerda configurar ZRAM para mejor rendimiento :
#
# Para activar inmediatamente, necesitar abrir una terminal como root
# y utilizar los siguientes comandos :
#
# modprobe zram num_devices=1
# echo 2G > /sys/block/zram0/disksize
# mkswap /dev/zram0
# swapon /dev/zram0 -p 100
#
# En la salida de los comandos deberias ver algo similar a lo siguiente :
# Configurando espacio de intercambio versión 1, tamaño = 2 GiB (2147479552 bytes)
# sin etiqueta, UUID=0efe9375-cc11-469b-b92c-124fcdaa6427
#
# Para comprobar que funciono puedes usar alguno de los siguiente comandos:
#
# swapon -s
# [ Las siguiente 3 lineas son la salida del comando : swapon -s ]
# Nomfich. Tipo Tam. Util. Prioridad
# /dev/sda1 partition 4194300 406528 -2
# /dev/zram0 partition 2097148 0 100
#
#
# cat /proc/swaps
# [ Las siguiente 3 lineas son la salida del comando : cat /etc/proc/swaps ]
# Filename Type Size Used Priority
# /dev/sda1 partition 4194300 406528 -2
# /dev/zram0 partition 2097148 0 100
#
# En la salida de ambos se puede ver que existe el dispositivo /dev/zram0
# Que tiene la prioridad en 100(%) Esto garantiza que Linux utilice primero
# La RAM comprimida y solo toque el SSD si la ZRAM se llena.
#
#
#
# Para hacer que ZRAM se active durante al arranque del sistema.
# Puedo agregar lo siguiente al final de mi archivo /etc/rc.d/rc.local :
#ZRAM# --- Configuración de ZRAM para optimizar 4GB RAM ---
#ZRAM#if [ -x /sbin/modprobe ]; then
#ZRAM# # 1. Cargar el módulo
#ZRAM# /sbin/modprobe zram num_devices=1
#ZRAM#
#ZRAM# # 2. Establecer algoritmo rápido (ideal para DDR2/CPUs antiguas)
#ZRAM# echo lz4 > /sys/block/zram0/comp_algorithm
#ZRAM#
#ZRAM# # 3. Definir tamaño a 2GB (2147483648 bytes)
#ZRAM# echo 2147483648 > /sys/block/zram0/disksize
#ZRAM#
#ZRAM# # 4. Preparar y activar con prioridad alta
#ZRAM# /sbin/mkswap /dev/zram0
#ZRAM# /sbin/swapon -p 100 /dev/zram0
#ZRAM#
#ZRAM# echo "ZRAM activo: 2GB con algoritmo lz4."
#ZRAM#fi
#ZRAM#
#
# Me debo asegurar de que /etc/rc.d/rc.local sea ejecutable :
# chmod +x /etc/rc.d/rc.local
#
Last edited by inukaze on 3. May 2026, 00:47, edited 1 time in total.
inukaze
Posts: 83
Joined: 24. Nov 2024, 18:42

Re: Optimizaciones Personalizadas en base a mi equipo.

Post by inukaze »

******* /etc/sudoers *******

Code: Select all

sudo su

Code: Select all

joe /etc/sudoers
## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users. These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias ADMINS = millert, dowdy, mikef

##
## Cmnd alias specification
##
## Groups of commands. Often used to group related commands together.
# Cmnd_Alias PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
# /usr/bin/pkill, /usr/bin/top
# Cmnd_Alias REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff

##
## Defaults specification
##
## You may wish to keep some of the following environment variables
## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file. Note that other programs use HOME to find
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods. Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to use a hard-coded PATH instead of the user's to find commands
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
##
## Uncomment to send mail if the user does not enter the correct password.
# Defaults mail_badpass
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot. Use sudoreplay to play back logged sessions.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!REBOOT !log_output

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL:ALL) ALL

## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL


## Same thing without a password
# %wheel ALL=(ALL:ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL:ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw # Ask for the password of the target user
# ALL ALL=(ALL:ALL) ALL # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d
@includedir /etc/sudoers.d

#
# =================================================================================
#
# Permitir a mi usuario « inukaze»
# Gestionar servicios específicos
# de Slackware sin contraseña
#
# =================================================================================



#ORIGINAL#ESTO NO SIRVE#inukaze ALL=(ALL) NOPASSWD:/bin/mount, /sbin/mount, /sbin/mount.cifs, /etc/samba/credencial, /usr/local/bin/carpcomp, /home/inukaze/.credencial, /usr/bin/sync, /usr/bin/tee /proc/sys/vm/drop_caches, /usr/bin/nice



# Gestión de módulos y prioridades del sistema
inukaze ALL=(ALL) NOPASSWD: /bin/mount
inukaze ALL=(ALL) NOPASSWD: /sbin/mount
inukaze ALL=(ALL) NOPASSWD: /sbin/mount.cifs
inukaze ALL=(ALL) NOPASSWD: /usr/bin/sync
inukaze ALL=(ALL) NOPASSWD: /usr/bin/tee /proc/sys/vm/drop_caches
inukaze ALL=(ALL) NOPASSWD: /sbin/modprobe
inukaze ALL=(ALL) NOPASSWD: /usr/bin/nice
inukaze ALL=(ALL) NOPASSWD: /usr/bin/renice



# Actualización del sistema (Salix-Update-Manager / slapt-get)
inukaze ALL=(ALL) NOPASSWD: /usr/sbin/slapt-get --update
inukaze ALL=(ALL) NOPASSWD: /usr/sbin/slapt-get --upgrade --simulate



# Control de TeamViewer (Demonio de fondo)
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.teamviewerd start
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.teamviewerd stop
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.teamviewerd restart



# Virtualización QEmu / KVM / Libvirt
inukaze ALL=(ALL) NOPASSWD: /usr/bin/virsh
inukaze ALL=(ALL) NOPASSWD: /usr/sbin/libvirtd
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.libvirt start
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.libvirt stop
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.libvirt status



# VirtualBox (6.1.50)
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.vboxdrv start
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.vboxdrv stop
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.vboxdrv restart
inukaze ALL=(ALL) NOPASSWD: /usr/local/bin/rc.d/rc.vboxdrv status
Post Reply