Slackware 13.37 x86_64 – Post installation steps

If this is your first experience with Slackware, then a few basic tasks should be completed before enjoying the most stable distro around. In truth, not much needs tweaking anymore thanks to the evolution of the Linux kernel, but a few steps could ease the experience further.

Create a regular user account

As root, type the command adduser and follow the instructions. When asked about additional groups, be sure to select (audio cdrom floppy plugdev video power netdev) or else the Slackware experience will be somewhat limited. As your regular user, log in to the X Window System (GUI) with the command startx

Configure your sound system

As root, type the command alsaconf to identify and configure your card. With your regular user, type the command alsamixer to configure sound settings and to adjust the volume.

alsaconfig
Alsaconfig

As root, type the command alsactl store 0 (0 = card number) to permanently store your settings.

Proprietary AMD display drivers

If you want the best level of performance you might consider installing proprietary display drivers. AMD are known to make less than usable linux drivers for their Radeon HD series so be warned (Nvidea drivers are usually fine). Ignoring that, the following is the procedure for installing the latest proprietary drivers for an ATI card. Select the driver for your card from this page.

Exit the X Window System to install the proprietary driver. As root, type sh ati-driver-installer-11-5-x86.x86_64.run --buildpkg to generate a Slackware package. As root, install the package with the command installpkg fglrx-8.85-x86_64-1.tgz

Finally, as root, type the command aticonfig --initial to generate a default ATI device section in the configuration file which is capable of loading the fglrx driver.

As your regular user, log in to the X Window System (GUI) with the command startx.

Initial ramdisk

By default Slackware uses what it calls a “huge kernel” to boot and run on a variaity of hardware. Most users will replace this huge kernel  after installation with a generic one to boost performance. To use a generic kernel we’ll need an initial ramdisk to load kernel modules before mounting the root partition. Slackware uses mkinitrd to achieve this.

As root:
Navigate to  /boot and apply the relevant parameters to mkinitrd

mkinitrd -c -k 2.6.37.6 -m ext4 -f ext4 -r /dev/sdb1

-c      Clear the existing initrd tree first
-k      Kernel version to use
-m      A colon (:) delimited list of kernel modules to load
-f      Filesystem to use for root partition (must be used with -r)
-r      Root partition device (must be used with -f)
*Which modules to load, filesystem and root partition device will depend on installation choices and hardware

Edit /etc/lilo.conf to load the initial ramdisk and kernel at boot
Example:

image = /boot/vmlinuz-generic-2.6.37.6
initrd = /boot/initrd.gz
root = /dev/sdb1
label = Linux
read-only

Run the command lilo to store the configuration.
Make sure you have the Slackware installation media available if you should mess up. You may then boot the huge kernel from the installation media to login and fix your system.

Configure a simple firewall

As root, type the command touch /etc/rc.d/rc.firewall
As root, edit /etc/rc.d/rc.firewall and enter the following code:

#!/bin/sh
IPT="/usr/sbin/iptables"

# Flush old rules, old custom tables
$IPT --flush
$IPT --delete-chain

# Allows all loopback (lo0) traffic
$IPT -A INPUT -i lo -j ACCEPT
$IPT -A INPUT -i ! lo -d 127.0.0.0/8 -j REJECT

# Accepts all established inbound connections
$IPT -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

# All TCP sessions should begin with SYN
$IPT -A INPUT -p tcp ! --syn -m state --state NEW -j DROP

# Allows all outbound traffic
$IPT -A OUTPUT -j ACCEPT

# Allow bittorrent incoming client requests on port 49159
$IPT -A INPUT -p tcp --destination-port 49159:49159 -j ACCEPT

# Reject all other inbound requests
$IPT -A INPUT -j REJECT
$IPT -A FORWARD -j REJECT

As root type chmod +x /etc/rc.d/rc.firewall to make the script executable. The firewall will now start on boot.

The above rules are modified from examples at the debian wiki. An online firewall generator adapted for Slackware is available here.

Slackware 13.37 XFCE
Slackware 13.37 XFCE

Thank you for reading!
Feel free to waste more time by subscribing to my RSS feed or check out the human-readable sitemap for more content.

Related posts