1. Andrew's Corner »
  2. Linux Explorations... :

Slackware -current reloaded...

From time to time I like to wipe my old installation of the development version of Slackware and then reload Slackware -current. In part this is a learning tool for myself and in part it is designed to sweep away the cruft that can accumulate from my extensive experimentation and day to day usage of what is almost a rolling release of Slackware. This page contains some notes to remind myself of the small tweaks that are needed on my own system to get a truly solid installation. These are useful as notes for myself but perhaps also some use to others who are undertaking the same task...

Preparation...

Not a great deal of preparation is required although there is a reasonable investment of time required to get this all just right. I will usually allocate a rainy weekend for this and plan on catching up on the bits and pieces over the ensuing week. Perhaps I am getting slower as I get older :). A few points to note for preparation:

Installation media...

I usually burn an installation DVD of the most recent Slackware -current using the iso produced from alienBob's mirror script: mirror-slackware-current.sh. This is the tool that I use to keep abreast of the latest developments in Slackware. This iso is burned easily from the commandline with:

growisofs -dvd-compat -Z /dev/dvd=slackware64-current-install-dvd.iso

This is not the full Slackware tree and in fact only weighs in at 2.8 GB but it is more than suitable for a full installation (or in this case reinstallation) of Slackware -current.

Backup...

I have incremental backups to restore from but I now make a final, reasonably primitive backup to an external HDD:

rsync -avz /home/andrew /run/media/andrew/Backup/backup.`date "+%d.%m.%Y"`
rsync -avz /etc /run/media/andrew/Backup/backup.`date "+%d.%m.%Y"`

This are the command lines I used following my most recent reinstallation of Slackware -current in mid October 2016 and they certainly safely backed up all that I needed to restore on reinstallation.

Installation...

There is no great magic to the installation of Slackware -current from DVD and it is always a warm feeling to see that old but incredibly dependable installer at work! The sequence for me is always:

  1. Make a full installation from the installation DVD with the exception of the KDE International packages which I note are not even selected by the installer defaults. I usually take the time here to generate an intrd string for the kernel and suitably edit lilo.conf to match.
  2. Install the multilib libraries using alienBob's generously provided guide. I still have some 32bit applications to run and compile although that may change over the next few years for sure.
  3. Install suitable NVidia drivers for my graphics card using the binary blob rather than the the slackbuilds on SBo. No particular reason for this, I am simply used to using the blob...
  4. Copy all of my backed up dot files, documents, browser bookmarks etc from the external HDD to their suitable locations on the new installation.

And that is all of the basic installation done but the real work is in the configuration required to get a Slackware system running just exactly as I want it.

Configuration...

Perhaps the true heart of this page lies in this section where I have added in the configuration necessary on my own system to get things humming along nicely. Only about half a dozen points to consider but they have all caused me some time and effort to sort out:

Burning for the ordinary user...

The ability to burn as an ordinary user is well covered in the installation docs but here it is again to remind me:

chown root:cdrom /usr/bin/cdrecord /usr/bin/cdrdao /usr/bin/cdda2wav
chmod 4750 /usr/bin/cdrecord /usr/bin/cdrdao /usr/bin/cdda2wav

And this sets me up for all of the command line burning that is nicely documented here... A final step is to load the SCSI driver needed for some ripping by adding the following to /etc/rc.d/rc.local

# Get burning going:
modprobe sg

And then everything should be right to go!

Shutdown cleanup...

I have a very simple shutdown command which cleans out /tmp, the following needs to be created as /etc/rc.d/rc.local_shutdown and made executable:

#!/bin/sh
#
# Empty tmp on shutdown:
/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -exec /bin/rm -rf {} +;

This has worked nicely on my system for some years after some experimentation with the many alternatives available.

Using sakura with Thunar...

Like many Slackware users I am a little fussy with the Terminal emulator that I use and I confess that the default XFCE Terminal does not cut it. To allow sakura to be used from within Thunar with the 'Open Terminal here...' the command exo-preferred-applications allows the path to sakura to be added in to the Terminal Emulators tab and then all is well.

Sakura hijacks my preferred choice of navigation keys with irssi where I use Alt + Left & Right Arrow keys to navigate windows. So the following change must be made to the defaults in ~/.config/sakura/sakura.conf:

prev_tab_key=bracketleft
next_tab_key=bracketright

And now both Sakura and irssi are happy!

Printing...

I have a nice WiFi Brother HL-2270DW laser printer which does require some decidedly 'hands on' wrangling to get performing well. So a few steps involved:

  1. First the rpm versions of the 'LPR driver' and the 'cupswrapper driver' packages will need to be downloaded from the Brother website and converted to tgz packages by using rpm2tgz. No direct link here because of the usual EULA rubbish required by Brother.
  2. Make a required link:
    ln -s /etc/rc.d/rc.cups /etc/init.d/cups
    This allows the Brother install scripts to stop and start the CUPS daemon; speaking of which remember to start the cups daemon!
  3. Install the tgz packages using installpkg
  4. Patch this file: /usr/local/Brother/Printer/HL2270DW/lpd/filterHL2270DW as follows:
    diff -Naur a/filterHL2270DW b/filterHL2270DW
    --- a/filterHL2270DW	2010-05-24 13:10:01.000000000 +1000
    +++ b/filterHL2270DW	2016-10-14 20:00:09.486908817 +1100
    @@ -35,7 +35,10 @@
     cat > $INPUT_TEMP1
     
     FILE_TYPE=`file $INPUT_TEMP1 | sed -e 's/^.*:[ ]*//' -e 's/[ ].*//'`
    -
    +# a.k. Hack until the "file" command gets fixed
    +if [ `head -1 $INPUT_TEMP1 | grep "%!PS"` ] ; then
    +    FILE_TYPE="PostScript"
    +fi
     #if [ "$FILE_TYPE" = "PostScript" -o "$FILE_TYPE" = "PDF" ] ; then
    	PSCONV_OP="$PAPER_INF $RCFILE"
    	BRCONV_OP="-pi $PAPER_INF -rc $RCFILE"
    
    Thanks to Andrew Smith for this information which prevents some garbage prints!
  5. After setting up the printer in cups there will be an error message: "Unable to locate printer "BRW008092AE60AB" which is solved by:
    1. Assigning the printer a static address (192.168.0.11 in my case)
    2. Stopping cups with the commmand /etc/rc.d/rc.cups stop
    3. Altering the DeviceURI section of /etc/cups/printers.conf to read DeviceURI socket://192.168.0.11
    4. Issuing the command /etc/rc.d/rc.cups restart to restart cups
    And the printer roars into life!

So perhaps a little painful to get going but once this work is done I know I will have absolutely no further problems with this otherwise very nice printer.

Give dhcp more time...

Newer versions of dhcpd seem a little impatient on my system and by default will not allow enough time for the router to assign an address to the system. I have made the following change in /etc/rc.d/rc.inet1.conf:

DHCP_TIMEOUT[0]=120

I do not really need 2 minutes but I am too lazy to find a more appropriate number and this works well enough as is...

Application installation...

And that leaves me only to install all of my old applications which for the most part I have slackbuild scripts backed up on external drive. So it takes a solid half day or so to reinstall basic applications for mail, usenet, multimedia, office applications etc but this is a great time or me to decide what I really need as well as updating ome applications that have new releases upstream. So this is the happy time as I slowly refill the HDD in a systematic and much more organised manner. Highlights include:

There is definitely a little more fine tuning to go but that pretty much covers the basics of a Slackware -current reinstall on my system. But now it is time to reload my Slackware -current tree as I see yet once again the Changelog has been updated :).

And in conclusion...

I have found immense enjoyment in writing this page which has basically been for my own reference but perhaps you have profited from the material on this page? Send me an email and let me know! Importantly I am still having a great and productive time in the world of Linux and I feel as if I have joined a community and am contributing to it. What about you?