Slackware Tips

What is Slackware?

Slackware is the original Linux distribution. These days it’s not as popular as Redhat, Debian, Suse, etc… but to the purists it remains one of the most solid, complete, and secure distributions available. Slackware’s founder and maintainer, Patrick Volkerding, does an amazing job of maintaining his distribution. Changes are well thought out and errors are rare.

The one caveat of the Slackware linux distribution is that things are not always easy. This list of tech tips will address items I have found in Slackware.

Skip e2fsck on reboot
I run some remote servers that are about 2 hours away. When I need to reboot them I don’t want to risk a slow or failed reboot due to a e2fsck.

Although I wouldn’t normally recommend skipping an e2fsck, in the above case it can be necessary.

Slackware will skip this e2fsck if there is a fastboot file in the /etc directory. So, issue the following commands if you do not plan to mount any hard drive:

# cd /etc
# touch fastboot
# chmod 0 fastboot

The fastboot file will automatically be removed after the reboot.

udev does not create ttyS nodes
I’ve been attempting to synch my palm M500 with Slackware 10.1 for some time – without success. Could not figure out why it wouldn’t work. Finally determined the udev was not creating the node for ttyS0. After much searching, upgrading udev and modifying the udev rules file in /etc/udev/rules I was at my wits end. Finally found a posting that stated the following:

Two things to check:
1) Look in rc.modules and uncomment the lines for the serial drivers
#### PC serial support ###
#/sbin/modprobe serial_core
#/sbin/modprobe 8250

2) I had a problem with 2.6.8 and higher kernels when I compiled IN
support for the serial modules. Turns out that I also had to enable ACPI.
When I did this, the modules loaded fine.

I added the above items to rc.modules and re-ran rc.modules. All of the sudden udev created /dev/tts/[0-9] and everything worked correctly.

PHP fails with ‘Call to undefined function: mysql_connect
After upgrading from Slackware 8.1 to Slackware 9.1, I found that my PHP scripts that used to access a MySQL database were no longer functioning. They were working properly prior to the upgrade.

The cause, as it turns out, is that this compilation of PHP does not integrate the MySQL module into the main code base. Therefore, the MySQL dynamic load library has to be explicitly specified in php.ini. As it turns out, I also needed to change a PHP directive that specifies the location of extension modules:

extension=mysql.so
extension_dir = /usr/lib/php/extensions/

With these changes, upon restarting the Apache server, PHP and MySQL were working correctly.

How to Set up MySQL on Slackware 8.1
Procedures to configure MySql in Slackware
(it must be installed first from the Slack package):

as root copy one of the sample /etc/my-*.cnf files to /etc/my.cnf

then do the following….

/usr/bin/mysql_install_db
chown -R mysql.mysql /var/lib/mysql

then there are two ways you can start mysqld
either run /usr/bin/safe_mysqld & or
/usr/share/mysql/mysql.server start
you can add either one of those commands to your /etc/rc.d/rc.local to have mysql start at boot time

set -o vi doesn’t work in Slackware 8.1
Not sure exactly why this doesn’t work. I do know it has something to do with /etc/inputrc. I removed /etc/inputrc and this temporarily cured it. I have seen comments that say you can enable the command line editor in inputrc – I just haven’t had time to confirm.

Mounting vfat partitions so all users can access them
By default slackware will create a fstab entry for vfat that looks like this:

/dev/hda1 /mnt/windows vfat defaults 0 0

To allow all users to access this partition add the umask=0 parameter:

/dev/hda1 /mnt/windows vfat defaults,umask=0 0 0

Leave a Reply

Your email address will not be published. Required fields are marked *