Articles and Presentations
Slackware Presentation November 15, 2014
The links I referred to in the presentation, (in no particular order):
http://en.wikipedia.org/wiki/Slackware
http://docs.slackware.com/slackware:install
http://gparted.org/livecd.php
http://linuxcounter.net/
http://www.slackware.com/config/packages.php
http://dfw.mirror.rackspace.com/slackware/slackware-14.1/UPGRADE.TXT
http://slackbuilds.org/
http://www.sbopkg.org/
http://www.linuxquestions.org/
I mainly covered installation and package installation / maintenance. There is obviously a lot
more to Slackware than what I covered in
the presentation so if you have any questions, email or call and I'll be glad to discuss in more detail.
One point we touched on but did not fully cover is starting the Xserver from command line,
(from runlevel 3). In addition to startx, there are other options.
xtartx will start your default window manager or desktop environment as was set during install, by default, it will be kde,
but the choice is ours. However you
can use any of the following commands to start the GUI of your choice:
startfluxbox startxfce4
startfvwm2 startkde
startblackbox
(They are all just scripts in /usr/bin/)
One issue I failed to cover is how to set the default runlevel. Most of us would want to
change the default runlevel from 3 to
runlevel 4 unless we are running our system as server.
So, edit /etc/inittab and change the following line:
id:3:initdefault:
to
id:4:initdefault:
(Do not set to 0 or 6)
# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot
At any rate, here are my post-install notes originally written for Slackware 14.0:
==============================================
Suggested post-install procedures:
The first thing I do is check the time and date to make sure it is correct, if not I correct it with command
ntpdate pool.ntp.org
I might also add cronjob to keep time accurate
20 4 * * 0 ntpdate pool.ntp.org
which will reset time/date at 4:20 each Sunday morning.
If it's a laptop, I might condsider doing it at boot up:
@reboot ntpdate pool.ntp.org
I might switch to the generic kernel, (which is already installed since version 14.0), so all
we need to do is to create /boot/initrd.gz,
list it in the linux stanza of /etc/lilo.conf, and change the symlinks for System.map, config and
vmlinuz, and run lilo.
Example: Build an initrd image using Linux 3.2.29-smp kernel modules for a system with an ext3 root partition on /dev/sda2:
mkinitrd -c -k 3.10.17 -m ext4
Now we change the symlink:
ln -sf /boot/vmlinuz /boot/vmlinuz-generic-3.10.17
Next we need to add the line to the /etc/lilo.conf file.
initrd = /boot/initrd.gz
So that it looks something like this:
# Linux bootable partition config begins
image = /boot/vmlinuz
initrd = /boot/initrd.gz
root = /dev/sda2 label = Linux
read-only
# Linux bootable partition config ends
While I'm at it, I shorten the timeout to 2 seconds (default is 2 minutes). (This is the timeout before the first entry boots.)
Here's what the line should look like if you want only 2 seconds:
timeout = 20
(Default is: timeout = 1200)
Run lilo to write the bootloader with changes to MBR:
lilo
Warning: LBA32 addressing assumed
Added Linux + *
One warning was issued.
If you get errors in the output, go over what you've done and figure out what you didn't do, or where you went wrong.
After a reboot we should be running the generic kernel.
The next two projects are setting up slackpkg and sbopkg:
1) slackpkg is an automated tool for managing Slackware Linux packages and is installed by default.
To start using it, edit /etc/slackpkg/mirrors and uncomment one of the mirrors, (only one). I usually use tds or easynews.
http://slackware.mirrors.tds. ... ware-14.0/ or 14.1
or
http://mirrors.easynews.com/ ... ware-14.0/ or 14.1
You have to do "slackpkg update" The "update" action will download and format the list of files and packages in Slackware.
Every time this list is changed, the update needs to be run.
To install a package from the slackware package tree, just do
slackpkg install <package-name-here>
To remove a package:
slackpkg remove <package-name>
You can also search for keword
slackpkg search <key-word>
But the most useful task is keeping your install up-to-date:
slackpkg update;slackpkg upgrade-all
BTW; There are two mail lists of interest to Slackware users: slackware-announce and slackware-security
The slackware-announce mailing list is for announcements of new versions, major updates and other general information.
It is a low traffic, moderated list. The slackware-security mailing list is for announcements relating to security issues.
Any exploits or other vulnerabilities pertaining to Slackware will get posted to this list.
2) sbopkg you have to download and install. It is a command-line and dialog-based tool to interact with the
SlackBuilds.org (SBo'') repository, a collection of third-party Slack-Build scripts to build Slackware packages.
See: http://www.sbopkg.org/ sbopkg is used to install and maintain packages outside the slackware package tree,
(ones listed on slackbuilds.org - LOTS...) When you run it first it will ask to create a couple of working directories
and files, once you agree to that and hit enter, you'll need to let it "sync" so that it can synchronize with the SBo
repository. "The main menu allows the user to view the SBo ChangeLog, check for potential updates to SBo packages, display
the contents of the local cache directory where source tarballs are saved, display the permanent build log, and browse or
search the local copy of the SBo repository. Once the browse function is chosen, the user can select the category of software
to view. After choosing a category, the user can then view the various software packages available in that category within the
local SBo repository. Selecting a package will display another menu allowing the user to view the package's README, SlackBuild
, .info, or slack-desc files. The user can also edit the .info file and SlackBuild and the edited files will remain after doing
a sync. Additionally, the user can choose to build a package using either the original SlackBuild or the locally-edited one,
if present. If using the dialog interface, and if sbopkg finds a built package for a particular piece of software in the OUTPUT
directory, then sbopkg will automatically add a new menu entry allowing the user to install the package if he chooses. Alternatively,
the user can choose to automatically download, build, or install individual packages or several packages in a queue. Finally,
if KEEPLOG is set to YES in a configuration file, a permanent log of the build process is saved. See sbopkg.conf(5) under KEEPLOG
and LOGFILE for details."
You can run sbopkg with no arguments and use the menu options or just use a command-line argument to install a package.
For instance, to install libreoffice, issue command:
sbopkg -i libreoffice
It also has a search option. For instance
sbopkg -s *office*
Searching for *office*
1) libraries/goffice 5) office/libreoffice
2) office/broffice.org 6) office/libreoffice-langpack
3) office/go_openoffice 7) office/openoffice.org
4) office/kbgoffice 8) Quit
The first thing I use sbopkg for is to install xfce4-datetime-plugin.
I rarely remember the exact name of a particular package and that's where the search function is particularly useful:
Searching for *date*
1) academic/qrupdate 5) libraries/python-dateutil@@
2) desktop/wmdate 6) network/openrdate
3) desktop/xfce4-datetime-plugin 7) Quit
4) libraries/perl-Params-Validate
I install xfce4-datetime-plugin and replace the default one with it which is a bit more feature rich.
It has a drop-down calendar that is very handy.
The problem with httpd not running cgi scripts was that I needed to uncomment the line in /etc/httpd/httpd.conf
LoadModule cgi_module lib/httpd/modules/mod_cgi.so
I tried lxde and it seems pretty nice on Slackware 14.0 so, here's the list that I installed, you should
be able to do it via sbopkg with one single (long) command:
sbopkg -i "lxde-common lxmenu-data lxshortcut lxml lxdm lxinput lxpolkit lxrandr lxsession lxsession-edit lxsplit lxtask
lxterminal gpicview vala libgee menu-cache openbox xarchiver xmms2 lxpanel lxlauncher lxpanel-xmms2 lxappearance libfm"
(It seems to only run from runlevel 4, (on my system anyway) so I needed to telinit 4 and select it from the list.
If you find it that way on yours too and plan to use it for a while you may want to edit the /etc/inittab file
and change the default runlevel to 4, (by changing "id:3:initdefault:" to "id:4:initdefault:")
Note: After installing LXDE, I got xfce error: "GDBus.Error:org.freedesktop.
Cure:
Settings --> Settings Manager --> Applications Autostart
and uncheck [disable]: PolicyKit Authentication Agent
For those who have settled in on xfce4 and continue to run it from runlevel 3,
you might like to shorten the command startxfce4 to something a little shorter:
ln -s /usr/bin/startxfce4 /usr/bin/gui
P.S. If you want to boot somewhat faster, you can make following changes.
In the /etc/rc.d/rc.M file, find the following section and comment it out by placing a ‘#’ in front of each line.
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/ldconfig"
/sbin/ldconfig
fi
# Update the X font indexes:
if [ -x /usr/X11R6/bin/fc-cache ]; then
echo "Updating X font indexes: /usr/X11R6/bin/fc-cache"
/usr/X11R6/bin/fc-cache
fi
That section should now look like the following.
# Update all the shared library links:
#if [ -x /sbin/ldconfig ]; then
# echo "Updating shared library links: /sbin/ldconfig"
# /sbin/ldconfig
#fi
# Update the X font indexes:
#if [ -x /usr/X11R6/bin/fc-cache ]; then
# echo "Updating X font indexes: /usr/X11R6/bin/fc-cache"
# /usr/X11R6/bin/fc-cache
#fi
These commands only need to be run on occasion. Updating shared libraries really only needs to
be done when you add or remove shared libraries, and similarly X font indexes only when fonts are added and removed.
rc.inet1
Most desktop distributions are now backgrounding the request for a DHCP IP, (it's faster), so in the file /etc/rc.d/rc.inet1
locate the following section (search for dhcpcd).
echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 60 ${DHCP_OPTIONS} ${1}" | $LOGGER
/sbin/dhcpcd -d -t 60 ${DHCP_OPTIONS} ${1}
Background the DHCP request by placing a ‘&’ at the end of the command like this.
echo "/etc/rc.d/rc.inet1: /sbin/dhcpcd -d -t 60 ${DHCP_OPTIONS} ${1}" | $LOGGER
/sbin/dhcpcd -d -t 60 ${DHCP_OPTIONS} ${1} &
LILO
Those running slower systems are familiar with LILO’s “packman trap” (“Loading Linux.........................
# Start LILO global section
boot = /dev/hda
compact
Additionally, those running only Linux (not dual booting) can benefit further. Once you have a stable kernel that
you’re happy with, disable all of the prompting and timeouts in the lilo.conf file. This means commenting out with ‘#’ prompt,
timeout=, and message=. Putting these tweaks together with the other booting speed ups and autologin will allow you to get 15-20
second boot times even on older machines!
Note: Remember that any changes to /etc/lilo.conf will not take effect until running the lilo command.