Personal notes on using Slackware. Some old notes have been archived.
Do note that Slackware has a great documentation site.
The official way to do this is, of course, to get it from slackware.com.
Personally, I have getslack, a bash script based on (more accurately, a trimmed-down version of) the excellent (he termed it infamous) mirror-slackware-current.sh by Alien Bob. When going down this path, the next step would be to prepare the installation media.
I no longer need an ISO image (refer to USB installer below). But, I have my slack2iso script (also based on Alien Bob's script) that can help in creating one using the tree downloaded by getslack
.
Alien Bob has provided a script to make/setup/configure a USB-based Slackware installation media. I wanted to do something simpler using the existing files in the Slackware tree that I mirrored using getslack
(mentioned above). So, here is how I got that working.
fdisk
and make sure it is bootable (bootable flag enabled)mkdosfs
(e.g. mkdosfs -F 32 /dev/sdb1
)/linux/boot/syslinux
folder on the USBsyslinux -d /linux/boot/syslinux /dev/sdb1
Note: On newer syslinux, use -i
to indicate new installation
ldlinux.sys
should appear in /linux/boot/syslinux
/linux/boot
(I used huge.s
)initrd.img
and message.txt
to /linux/boot
isolinux.cfg
to /linux/boot/syslinux
as syslinux.cfg
syslinux.cfg
accordingly (initrd, kernel params, etc.)
And… we're done! Now we have a simple Slackware USB Installer and install it on every computer we can get our hands on!
Things moving to (U)EFI and GPT… slowly leaving legacy BIOS and MBR.
Instead of MBR, we use GPT partitioning scheme:
Partition codes are 2-bytes instead (only 1-byte on MBR's partition table). Among the common ones:
mkdosfs -F 32 -n MY1EFI /dev/sdxx
mkntfs -f -L MY1WIN /dev/sdxx
mkfs.ext4 -L MY1LIN /dev/sdxx
Once boot using EFI, efibootmgr
tool can be used (available on Slackware 14.2)
Slackware
with loader file named \efi\slackware\elilo.efi
located on first partition of first disk (/dev/sda1
) efibootmgr -c -d /dev/sda -p 1 -L "Slackware" -l "\efi\slackware\elilo.efi"
efibootmgr -b xxxx -B
efibootmgr -o xxxx,yyyy,zzzz
Installation notes (i.e. packages, configs).
LastUpdated20250112
Using Slackware installer.
getslack
) getslack
config fileremovepkg gnuchess xaos xsnow
removepkg joe nano vim-gvim slackpkg
prompt #chooser=simple timeout=50 default=Slack image=vmlinuz-huge label=SlackHuge read-only append="root=/dev/sda2 resume=/dev/sda4 vga=normal" image=vmlinuz label=Slack initrd=initrd.gz read-only append="root=/dev/sda2 resume=/dev/sda4 vga=normal"
/usr/share/vim/vimrc
)vimstart
(from my1shell repo)rc.local
← echo 0 > /proc/sys/kernel/dmesg_restrict
setup_slack
(from my1shell repo)getslackpack
)getslackbuild
)slackware-xdm-theme
geany unrar
nss-mdns avahi libdaemon
This is what I do for a lean
(not necessarily minimal, but trimmed to my liking) installation.
getslackbuild
)dmenu slock st wmname
rox-filer pmount
To maintain:
getslack
,getslackpack
,getslackbuild
)Sample configuration files for the above scripts are here.
This is actually NOT recommended for beginners. But, sometimes, the need to use the latest software is unavoidable and this COULD be a solution. Plus, this will add a LOT of COOL-points
Note: I have removed a section on DE-less installation since my current Slackware installations ARE, in fact, DE-less.
Note: I have also removed a section on hijacking other Linux system - this, here, turned out to be VERY similar to what needed to be done.
[LastUpdated20210620]
I need to use GTK3 version that is newer that the one on 14.2, so I tried the development version (slackware64-current). I have done the same once (pre-11), so I am aware that there can be some issues when doing this. I am happy to say that I AM writing this on a slackware64-current (15.0 beta?) installation on my laptop.
So, this is a little note to my future self (or anybody that may be find this useful DISCLAIMER: Use this at your own risk!). I am doing this while still using Devuan and I want to keep that for backup, in case things go wrong. (On a side note, the reason I use Devuan was because of the GTK3 version.) So, I have an extra partition that I have reformatted and prepared to download the stuffs I need.
getslack
)<mount-path>/home/share/slackware
.getslack
VERS=current
bzImage
in kernels/huge.s (rename to vmlinuz
)initrd.img
in isolinux/ (this has the slackware setup)gnuchess
and xaos
packagesusr/share/vim/vimrc
)dmesg
for useretc/rc.d/rc.local
← echo 0 > /proc/sys/kernel/dmesg_restrict
nmcli r[adio] wifi nmcli r[adio] wifi on nmcli d[evice] wifi list nmcli d[evice] wifi connect <ssid> password <pass> ifname <wlan0> nmcli c[onnection] show nmcli c[onnection] down <ssid> nmcli c[onnection] up <ssid>
etc/xdg/user-dirs.defaults
(standard default paths)getslackpack
).getslackpack
getslackbuild
)To maintain:
note: my libmy1slack
library will detect current when etc/slackware-version
has '+' suffix. this sign will disappear when -current is near to a stable release.
-current
going stable, use SLACKVERS=current slack-update
slackpatch
-current
going stable, use -f
switchSLACKVERS=current slackview find –alien
)Sometimes these can be useful.
20110621 I want to have a 32-bit system running in chroot environment on my Slackware64. I've used such system on Debian using schroot…
20110906 I managed to do this as published here…
20120518 Minor change to the fstab entry for dev, which needs an rbind option so that the pty inside can be valid! Discussed here.
20120524 This is now part of my slackstuff collection (now known as my1shell)… in form of a script called slackroot.
20121031 The path to the chroot installation MUST ALL BE owned by root - or else, users will get a Write failed: Broken pipe
error.
TODO A how-to on creating 32-bit chroot on 64-bit Slackware using slackroot
script.
- on my pure slack64 (maintained using getslack/getslackpack) $ ARCH=i686 getslack - create root filesystem using 32-bit packages # slackroot /opt/chroot32 --arch x86 --desk -x - copy user/group info from 64-bit system to chroot32 = will maintain its own login info! # preproot --init /opt/chroot32 - mount bind 'system' paths # preproot /opt/chroot32 - ssh into system to use 32-bit chroot # ssh user@127.0.0.1 - unmount bind 'system' paths # preproot --done /opt/chroot32
Main references are here and here.
getslackpack
to download required packages from Eric's multilib site. Install as instructed.getslack
which I use for my 32-bit chroot installation. I use massconvert32.sh
script on this tree. The massconvert32.sh
script can be used to update as well (built packages are not rebuilt). Install as instructed.slackpatch
script has been updated to handle 'blacklisted' 64-bit versions and 'upgraded' compat32 packagesUpdate20180903 Update20250326
Read here. I now have a more specific script to get multilib stuff (previously part of getslackpack script),
Configure slackpatch to check/ignore multilib stuff
PKG_IGNORED="ffmpeg" # ignoring these standard packages => multilib! PKG_IGNORED="$PKG_IGNORED aaa_glibc-solibs" PKG_IGNORED="$PKG_IGNORED gcc gcc-brig gcc-g++ gcc-gdc gcc-gfortran" PKG_IGNORED="$PKG_IGNORED gcc-gnat gcc-go gcc-objc" PKG_IGNORED="$PKG_IGNORED glibc glibc-i18n glibc-profile"
For reference.
A bash shell script I used to upgrade from 14.1 to 14.2.
#!/bin/bash # - upgrade 14.1 to 14.2 SLACKVERS="14.2" # setup path to slackware tree SLACKROOT=${SLACKROOT:="$(pwd)"} [ -z "$SLACKARCH" ] && [ -n "$ARCH" ] && SLACKARCH=$ARCH SLACKARCH=${SLACKARCH:="$(uname -m)"} SLACKSUFX=${SLACKSUFX:=""} [ "$SLACKARCH" == "x86_64" ] && SLACKSUFX="64" SLACKFULL=${SLACKFULL:="slackware${SLACKSUFX}"} [ -z "$SLACKVERS" ] && [ -n "$RELEASE" ] && SLACKVERS=$RELEASE SLACKVERS=${SLACKVERS:="current"} SLACKRELS=${SLACKFULL}-${SLACKVERS} SLACKPATH=${SLACKROOT}/${SLACKRELS} # step 1 upgradepkg ${SLACKPATH}/${SLACKFULL}/a/glibc-solibs-*.txz # step 2 upgradepkg ${SLACKPATH}/${SLACKFULL}/a/pkgtools-*.txz upgradepkg ${SLACKPATH}/${SLACKFULL}/a/tar-*.txz upgradepkg ${SLACKPATH}/${SLACKFULL}/a/xz-*.txz upgradepkg ${SLACKPATH}/${SLACKFULL}/a/findutils-*.txz # step 3 for dir in a ap d k l n t tcl x xap xfce ; do do_path=${SLACKPATH}/${SLACKFULL}/$dir [ ! -d $do_path ] && continue ( cd $do_path ; upgradepkg --install-new *.t?z ) done # step 4 removepkg ConsoleKit apmd bluez-hcidump cxxlibs foomatic-filters \ gnome-icon-theme imlib kdeadmin kdenetwork kdesdk kdetoys kwallet \ lesstif libelf libjpeg libxfcegui4 networkmanagement obex-data-server \ obexfs open-cobol oxygen-gtk3 phonon-mplayer phonon-xine pil portmap \ procps qca-cyrus-sasl qca-gnupg qca-ossl udev xchat xf86-input-aiptek \ xf86-video-modesetting xfce4-mixer xfce4-volumed xfwm4-themes # step 5 # - run chknew # step 7 # - check boot config
Useful system level notes.
Simply list files in /var/log/packages (path is actually a link to /var/lib/pkgtools/packages/
).
# ls -l /var/log/packages/
List full package name (with version) only
# for that in $(ls /var/log/packages/) ; do echo $that ; done | sort
Find installed packages that are not in Slackware tree
slackfull=slackware64-15.0 ; slacktree=/home/share/slackware/$slackfull ; for pkg in $(ls /var/log/packages/) ; do pkgf=$(find $slacktree/ -name "${pkg}.txz") ; [ -f "$pkgf" ] && continue ; echo "** Package '$pkg' is alien!" ; done
This can also be done using slackview
script (in my1shell repo)
# slackview find --alien
View information on specific package
# slackview find [pkg_name]
To list currently installed packages (to be used in my1live)
# slackview file --name pkgs.txt --installed --insert
# slackview file --name pkgs.txt --sort
slackview file --name pkgs.txt --dups curr.list
/usr/src/
(e.g. linux-4.4.199)/boot
# cp /boot/config-generic? > .config
# make oldconfig
# make menuconfig
# make -j4 bzImage
# make -j4 modules && make modules_install
modules_install
requires root, obviously!cp arch/x86/boot/bzImage /boot/vmlinuz-generic-4.14.12 cp System.map /boot/System.map-generic-4.14.12 cp .config /boot/config-generic-4.14.12
mkinitrd -c -k 4.14.12 -f ext4 -r /dev/sda3 -m ext4 -u -o /boot/initrd.gz
/usr/share/mkinitrd/mkinitrd_command_generator.sh
-P
option if requiredLittle tips for better Slackware desktop experience. Most of these can be used in other Linux distributions as well.
Double-clicking in file manager (Thunar) shows no video (audio is ok, so program is running). Running mplayer from command line is fine. Turns out gui version is gmplayer - running from console shows this error message
Failed to open VDPAU backend libvdpau_va_gl.so
So, just edit ~/.mplayer/gui.conf
, find the line for vo_driver
and set it to gl
. Show be ok after that… at least in my case it is.
Note: NOT tested… just found this
Although the mplayer setting to disable xscreensaver has been selected, xscreensaver still runs!
Possible Solution: Edit ~/.mplayer/config
heartbeat-cmd="xscreensaver-command -deactivate >/dev/null 2>&1"
When using xdm, login fails sometimes with error message … Unable to establish ICE listener…
rc.local
← rm -rf /tmp/.ICE-unix/*
The solution is here.
aplay -D plughw:<card/slot#>,<device#> <WAV file>
to testasound.conf
in etc or ~/.asoundrc
to fix this (sample below) pcm.!default { type hw card <card/slot#> } ctl.!default { type hw card <card/slot#> }
As seen here…
Check asound.conf
in etc:
pcm.!default { type plug slave.pcm "softvol" } pcm.softvol { type softvol slave { pcm "dmix" } control { name "Pre-Amp" card 0 } min_dB -5.0 max_dB 20.0 resolution 6 }
Sometimes need type
in pcm.!default
to be hw
Running applications (@software) on Slackware… most are applicable to all distributions.
There are a couple (a few?)of applications that I thought have great features but relatively unknown (I only knew about them after looking for specific solution). Here they are:
xpaint -snapshot
)Modify httpd config file:
More modifications for https:
openssl genrsa -out privkey.pem 2048
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
mysql_install_db
chown -R mysql:mysql /var/lib/mysql
rc.mysqld
/usr/bin/mysql_secure_installation
create database app_db;
grant all privileges on app_db.* to 'user_app'@'localhost' identified by 'pass_app';
flush privileges;
create user 'user_app'@'localhost' identified by 'pass_app';
rc.mysqld
# mysqld_safe --skip-grant-tables & # mysql -u root $ mysql -uroot -p mysql> use mysql; mysql> update user set password=PASSWORD('<newpass>') where User='root'; mysql> flush privileges; mysql> exit
Backup a DB:
mysqldump -p -u user userdb > userapp-$(date +%Y%m%d%H%M%S).sql
The default tetex is usable, but it is no longer maintained and some new packages are not available.
The recommended TeX distribution is TeXLive.
/home/share/tool/texlive
./install-tl -gui
/home/share/tool/texlive/YYYY
(currently, YYYY=2020)TL_VERS="2020" TL_PATH="/home/share/tool/texlive/${TL_VERS}" export PATH=${TL_PATH}/bin/x86_64-linux:$PATH export MANPATH=${TL_PATH}/texmf-dist/doc/man:$MANPATH export INFOPATH=${TL_PATH}/texmf-dist/doc/info:$INFOPATH
tlmgr --gui
tlmgr show <package>
rsyncd.conf
in etc max connections = 2 log file = /var/log/rsync.log timeout = 300 [share] comment = Shared Stuff path = /home/share read only = yes list = yes hosts allow = 192.168.3.0/24 uid = nobody gid = nobody #auth users = pub #secrets file = etc/rsyncd.secrets
inetd.conf
(etc), insert rsync stream tcp nowait root /usr/bin/rsync rsync --daemon
services
(etc), insert rsync 873/tcp
rsyncd.secrets
in etc pub:pub
/usr/bin/rsync --daemon --config=etc/rsyncd.conf
on an x86_64 machine,
Issues when running Slackware…
unspecified application error
$ lspci -vv | sed -n '/VGA compatible/,/^$/ p'
export MESA_LOADER_DRIVER_OVERRIDE=i915
Some things to note…
20210620 Slackware's CPU frequency scaling works (checkout rc.cpufreq
) - just to remind myself, no need to look into this!
To allow non-root users basic admin (poweroff,reboot,etc.), add them to power
group and insert the following to sudoers
.
%power ALL=(ALL) NOPASSWD:/sbin/poweroff %power ALL=(ALL) NOPASSWD:/sbin/reboot %power ALL=(ALL) NOPASSWD:/usr/sbin/pm-suspend %power ALL=(ALL) NOPASSWD:/usr/sbin/pm-hibernate %power ALL=(ALL) NOPASSWD:/usr/sbin/pm-powersave
Note: The pm-* binaries (pm-utils) are no longer available on Slackware 15.0
Note20250112: use loginctl on Slackware 15.0 - no need to add sudoers
mv nsswitch.conf nsswitch.conf-orig
cp nsswitch.conf-mdns nsswitch.conf
rc.avahidaemon
and rc.avahidnsconfd