Dokuwiki EBook

Welcome to the Slackware Documentation Project

We aim to become your primary source for Slackware Linux[1] documentation[2] on the web.

Getting Started with Slackware

Slackware installation[3]: a guide through the whole process of installing and configuring Slackware Linux[4]; written for new and experienced users alike.

Configure your new Slackware System[5]; how to proceed after the installation has completed.

Getting Involved[6]: describes various ways Slackers (both new and experienced users) can contribute to the Slackware community.

Slackware Live Edition[7]: if you want to try a Live Edition of Slackware before committing it to your hard drive.

Links and pointers[8]: other sites on the web offering Slackware related information.

The Slackware Linux Distribution

Slackware[9]: a brief overview of Slackware Linux[10]; describes what to expect from a Slackware Linux[11] system.

The Slackware Way[12]: describes the principles and philosophy of Slackware Linux[13].

The Slackware Linux Essentials Book[14]: a valuable resource for those venturing into Slackware (or Linux in general) for the first time. The original SlackBook can be found on your Slackware CDROM or DVD, and it can also be read online: http://slackbook.org/beta/[15]

FAQ[16]: a list of common and frequently asked questions.

README's[17]: description of the documentation which is available in the Slackware DVD root directory.

Read a HOWTO

SlackDocs HOWTO Collection[18] (282 pages), contributed by the Slackware community.

Recent page updates (english):

gcc-10.x_aarch64_cross-compiler[19] updated to use gcc-10.3.0

slackware64_current_with_lvm_and_luks_on_linodecloud[20] [The steps I followed]

hacking_the_xzpad700_7_tablet[21] [Hacking information from the XZPAD700] fix links

brother_printer_installation[22]

zram_slackware_arm_and_arm64[23] [Wrapping Up]

Recent page updates (translations):

enabling_sudo_on_slackware[24]

hacking_the_xzpad700_7_tablet[25] [Image Builder] fixed link

slackware[26]

java[27]

raspberrypi4[28] [Método de instalación manual sin una imagen de Raspbian]

Write a HOWTO

SlackDocs Wiki Tutorial[29]: a short tutorial on editing and contributing to the SlackDocs wiki.

Translation Guidelines[30]: how to handle the translations of existing articles as well as how to create new articles in your native language.

Style Guide[31] a few basic rules should be kept in mind when editing pages in this Wiki.

You can play around in the Playground[32] or your own user page to familiarize yourself with the Dokuwiki markup[33]. The available syntax is listed in wiki:syntax[34] where you will also find pointers to the plugins which have been installed, providing additional functionality.

More About the SlackDocs Project

If you just want to talk about the content of any of our Wiki pages, or if you want to propose improvements to a page, you can use the “discussion” tab which shows up at the top of every page, and leave your thoughts/comments/ideas there. Alternatively, SlackDocs also has a mailing list which can be used for content discussion and brainstorming at https://lists.alienbase.nl/mailman/listinfo/slackdocs[35] (we keep the discussion archives[36]).

If you are willing and able to contribute to the wiki, please see this list[37] for ideas. Perhaps you already have an idea for a new article!
We understand that you may be uncertain about your writing skills or unsure about how to start contributing. If that is the case, we encourage you to subscribe to the mailing list[38] and ask for help. The people on that list will certainly offer assistance.
If you think that a mailing list is difficult to use, we wrote helpful instructions[39] for you.

The Wiki News[40] page is where you look for news from the Wiki admins.

We keep some statistics[41] of the activities in our Wiki.

You can download an EPUB[42] for offline reading, for both the Slackware Essentials Book[43] (beta) and the complete Wiki[44] (english section).

If you want to know who are part of the team that is keeping the site structured and focused, visit our contact page[45].

Help

Search This Wiki

If looking for specific information, try using the search box to the left.

Alternatively, use Google's “site” search feature by appending “site:docs.slackware.com” to search terms.

An even easier way of searching for information in SlackDocs: the Wiki is OpenSearch[46] ¹⁾ enabled. This is supported by all modern browsers.
Here is how to add SlackDocs search to Firefox (other browsers probably handle it in a similar way):

open the wiki start page[47] in the browser

click the little arrow on the left of your search field

choose “Add SlackDocs”

Edit This Wiki

You must create an account[48] to edit pages in this Wiki. In order to fight spam, your new account will not be able to edit this Wiki immediately. One of the Wiki admins will have to enable it first, which usually does not take long.

Internationalization / Localization

Are you more comfortable reading articles in your native language? Click here[49] for a list of available language categories and other internationalization information. Or select your language directly from the drop-down in the left sidebar!

¹⁾

OpenSearch is a standard to make it easy to integrate a website's search into your browser.

Slackware Linux

A

Amd Nvidia

B

Configure Your New Slackware System

C

Common Software

Getting Involved

Slackware-Current

D

Desktop Environment

E

Your Headline Here

External Sites With Slackware Related Information

F

Frequently Asked Questions

Flash Player

I

Slackware Installation

K

KDE

L

Slackware Live Edition

Localization: Adapt Slackware To Your Own Language

M

Adding Multilib Capability To Slackware On X86 64 Architecture

O

Opera

P

Ruarí's Thoughts

Package Managment

Package Management: A Hands-On Explanation

Unofficial Package Repositories

§...

...

The Slackware Way

Out Of The Box Slackware PXE Server

R

Slackware Official READMEs

S

SlackBuild Scripts

Slackpkg

What Is Slackware Linux?

Snownews

Slackware Linux

V

VLC

W

Window Manager

X

Xfce

Top ↑

slackware, toc2

Package Managment

Many users decide to use Linux based Operating Systems because of the freedoms they enjoy, included in the list is the freedom to choose the right tool for the job. The Slackware package management schema is a model for displaying the choices that are available to the users. When maintaining a server or even a personal system a certain amount of control must be given to the administrator, the control and simplicity of Slackware package management is what may in fact make you want to try or continue to use Slackware.

Brief Explanation of Slackware Packages

In terms of security and accountability Slackware is excellent because it brings you software in the condition that the authors intended. What this means is that the Slackware community does not modify the source or add and remove functions from software beyond the author's design, unless a small patch is required to work on Slackware. All packages are built using the original source code in which only official patches are applied, the only modifications that are made for the packages are adding .desktop files (executables for windows managers) and running installed applications/scripts to update databases, font or icon caches to include the newly installed files.

Other distributions such as debian and redhat choose to modify the original source code with their own revisions prior to distribution, this can add additional functionality but in some cases such as the debian OpenSSL packages[50] it can result in exploits that only effect the specific distribution which can remain unseen for some time because the original authors (those who know the applications best) were not responsible for the changes or aware of the changes. This additional liability is something that an administrator does not want hanging over their head when running a production system which requires heightened security and uptime, with Slackware these issues cannot happen as all code that is used has been developed by those who know the functionality of the applications best, namely the original authors.

Slackware packages can be found with any of the following extensions:

tbz - Slackware package archive compressed using bzip2

tlz - Slackware package archive compressed using lzip

tgz - Slackware package archive compressed using gzip

txz - Slackware package archive compressed using xz

The reason for the various package formats is the evolution of compression tools, as better tools have been developed Slackware has adapted their packages to take advantage of the higher compression tools.

Currently the two most commonly used formats are tgz and txz. txz is the current standard for official packages because of the increased compression rate, this change has allowed the development team to reduce the filesize in installation packages which in turn reduced the space requirements on the installation DVD, leaving additional space for new applications or documentation to be added in the same space as before. The tgz format has a less impressive compression rate but it is sufficient for packages that you build on your system such as slackbuilds, since on most modern systems disk space is abundant.

Dependency Tracking

One of the major complaints by new users is the fact that Slackware does not automatically track dependencies and install dependencies when you install a file. To many this may seem like a negative mark against Slackware, but many users prefer to know exactly what is installed on their systems and what it is for. The lack of dependency tracking allows the system administrators to install only the dependencies that are required for their necessary functionality without introducing unneeded components.

Why restrict Automatic Dependency Resolution?

Lack of administrative control

It prompts for installation of packages that may have a bad security history, without manual research you would not be able to verify the security history of an installed package

It may install an application that conflicts with current installed applications, which can break software components in your system.

If you may decide to recompile an application and remove certain functions, the removal of said functions may eliminate the need to have specific dependencies installed but with an auto-resolution system it will force those packages even though they are not needed.

The official and many of the third-party package management tools in Slackware try to keep away from automatic dependency resolution so the administrator is in full control of the system.

Installation and Package Management Tools

There are many package management tools for Slackware,both official and from third-parties, both groups are discussed below.

Official Tools

Included in the base installation of Slackware are two packages pkgtools and slackpkg.

pkgtools contains a set of applications that are to be used for basic package management.

slackpkg is a package manager and update tool for you to use with the official Slackware servers.

pkgtools

pkgtools contains the following executable applications

refer to the man pages on your system for more detailed information including options and syntax.

installpkg - This application is used to install a new package.

removepkg -This application is used to remove a package from your system.

upgradepkg - upgradepkg upgrades a Slackware package from an older version to a newer one. It does this by isntalling the new package onto the system, and then removing any files from the old package that aren't in the new package (taken from the man pages).

explodepkg - This tool uncompresses and untars a Slackware package into your current directory so the contents can be reviewed prior to installation.

pkgtool - pkgtool is a menu-driven package maintenance tool provided with the Slackware Linux distribution. It allows the user to install, remove, or view software packages through an interactive system. Pkgtool can also be used to re-run the menu-driven scripts normally executed at the end of a Slackware installation. This is useful for doing basic reconfiguration (like changing the mouse type). (taken from the man pages).

makepkg - This application is used to create a new Slackware package from the contents of your current directory.

slackpkg

slackpkg is to be used to install official slackware packages from the official Slackware servers and to manage updates and upgrades. This tools is very useful for keeping a system up-to-date and for doing a distribution version upgrade without having to do a complete reinstall or having to download and burn a disk.

When attempting a version upgrade with slackpkg read the file UPGRADE.TXT from the installation disk to determine instala order and avoid breaking your system.

Unofficial Tools

The unofficial tools are tools that were made by third parties which are not officially supported by Slackware. These tools can be broken into two groups package retrieval and package building.

The package retrieval tools have a functionality which is similar to YAST, yum, apt-get, urpmi and various tools which are used in other distributions. These package retrieval tools call to specific online package repositories which have been set by the user and allow the user to search the repositories to download and install pre-configured packages.

In contrast the package building tools are somewhat similar to the package retrieval tools but rather than downloading a pre-build package they retrieve a build script (which can be customized) and the subsequent source code allowing the user to custom compile an application for their system and their needs. Once the application has been compiled, the scripts pass the proper instructions to utilize the resulting binaries and build a Slackware formatted package that properly interacts with the Slackware package management tools. The best comparison for package building tools is to compare them to the portage system that is used in Gentoo Linux.

Listed below are the Unofficial tools and a brief explanation of their functionality:

swaret - This tool is designed to replicate the functionality of the Debian apt-get system, you identify the repositories you would like to use and it allows you to download and install packages from the specified location, this tool also attempts dependency resolution.

slapt-get - This tool is designed to replicate the functionality of the Debian apt-get system, you identify the repositories you would like to use and it allows you to download and install packages from the specified location(s).

sbopkg[51] - This tool syncs with the slackbuilds.org build script repository, it is used to pull build scripts, upon choosing the scripts to build it allows you to choose the build order and also customize the scripts. Upon completion of the scripts it will allow you to build a Slackware package or to build and install the package.

slpkg[52] is a powerful software package manager that installs, updates, and removes packages on Slackware based systems. It automatically computes dependencies and figures out what things should occur to install packages.

Installation Methods

With of the quality of various tools, you have options for various functionality when it comes to package management and installations. The main three methods of installation are listed below:

Install from a pre-built package

Compile the application yourself from the source code, This is ill advised in it's standard meaning, I will discuss this later.

Build a custom package from a build/slackbuild script

Install from a Pre-built Package

To install Slackware from a pre-built package you can use installpkg, upgradepkg, swaret or slapt-get. This is very simple, in swaret or slapt-get you only need to choose the package and select to install it. To install a package using the official tools you only need to call the program and use the package name as the argument, the example below is installing the application wine from the current workin directory.

example:

#installpkg wine-2.5.6-x86.tgz

Compile the Application from the Source Code

Many people have grown accustomed to this method over time, but it is not preferred in Slackware, instead, to document your actions and avoid replication of efforts it is advisable to build a slackbuild script[53], which will save you time and effort in the future.

Build a Custom Package from a Build/slackbuild Script

This is the true magic in Slackware, every official package that you receive has a slackbuild file, in the source directory on the Slackware disk you will find the slackbuild files and source code for every officially supported package. This availability in the source directory, allows you to view all options/modifications that were done to a package and if you need you can modify the script and arguments to fit your needs. Once the script has been run and the package has been built you then have a redistributable package for the specified application that fits your specific needs.

The slackbuild.org[54] script repository houses user submitted scripts for building stable applications for Slackware that have been tested on various architectures by knowledgeable members of the Slackware community. Included in the slackbuild archive are the build script, license information, .desktop files (if needed), icons, and a .info file that tell you the version, source download location, md5sum, supported architectures and the author of the script. There is also a mailing list and an irc channel available if you have questions or experience problems.

Review slackbuild_scripts[55] for an example of how to build a package from a slackbuild, and how to build custom scripts.

Package Tracking

When using Slackware, you have the ability to track the installation date, installed files, and the package description for all packages that are installed on your system. This tracking is done within the /var/log/packages directory. This directory contains a single text file for each installed application, the file contains the package description and list of installed files/directories from the current package. You can easily view the list of files within the /var/log/packages directory and sort by name, creation date or whatever additional criteria you use.

For some examples of the usability of the /var/log/packages directory, you can review the following:

If you are looking to see what package installed a specific file to your computer, let say the file is /sbin/iptables, you can run the command

grep /sbin/iptables /var/log/packages/*

This will display all files within the package directory that contain the exact phrase that was called by grep.

If you want to review the installed files for a package to find all files that were installed in the /bin directory, let say we are looking at the pkgtools package, you can run the command

grep /var/log/package/pkgtools-13.0-noarch-3.txt "/bin/"

In a similar fashion Slackware moves the text files from /var/log/packages to /var/log/removed-packages when you remove a package from your system, this makes it easier to have adequate tracking of what you have installed and what you removed and when each action was taken, this will help you greatly if you are wanting to replicate the list of installed packages from one system to another, you can easily write a script to compare the output of the folders on both systems and output a resulting file of non-matching packages that you can later use in a script for automatic installation.

More commands and references can be found inthe related articles listed below.

Related Package Managment Articles

Page
Description
Tags

Package Managment
Package Managment Many users decide to use Linux based Operating Systems because of the freedoms they enjoy, included in the list is the freedom to choose the right tool for the job. The Slackware package management schema is a model for displaying the choices that are available to the users. When maintaining a server or even a personal system a certain amount of control must be given to the administrator, the control and simplicity of Slackware package management is what may in fact make you w…
slackware, package management, author mfillpot

Unofficial Package Repositories
Unofficial Package Repositories * slackbuilds.org - This site holds community submitted builds scripts to easily build Slackware packages from the source code of various applications. * slackware.it - This is a repository of pre-built packages compiled in various languages.
slackware, package management, package repos, author mfillpot

Related Package Managment How-Tos

Page
Description
Tags

Building A Package
Building A Package This is a rough outline for building Slackware packages. Some steps may not be neccessary, some steps might be missing. Use the discussion page for side-notes such as using slacktrack (when DESTDIR fails) and other utilities like checkinstall.
howtos, software, makepkg, package management, author slackwiki

Building and Installing Packages with sbopkg
Building and Installing Packages with sbopkg Sbopkg is a command-line and dialog-based tool to synchronize with the SlackBuilds.org (“SBo”) repository, a collection of third-party SlackBuild scripts to build Slackware packages. The program has a curses based interface which lets you pick and assemble the programs which you want to compile from source into packages. It can also be used non-interactively in case you know beforehand what your goal is - in that case it is
howtos, software, sbo, package management, author ldkraemer

Installing Software
Installing Software Overview There are three basic ways to install software in Slackware: install a pre-build binary package, make your own package, or compile the sources and install the resulting binaries manually. If you need to compile a program from source code, making it into your own package is easy and useful. Here's how these methods work.
howtos, software, installing, package management, author peterwwillis

Querying Installed Packages
Querying Installed Packages Sometimes you might want to check whether a particular package is installed or which version of a package is installed on your system. If the package is part of the Slackware installation you could use the slackpkg tool:
howtos, software, package management, package tracking, author sycamorex

Sources

* Original source: * Linux.com[56]

* Originally written by mfillpot[57] for linux.com[58], reposted with permission from Linux.com * Contrbutions by mfillpot[59]

slackware, package management, author mfillpot

Snownews

Downloading and Reading RSS feeds

Snownews[60] is a lightweight RSS[61] newsreader for console lovers. It lets you aggregate news from a variety of sources in one place in a very easy and quick way. Additionally, it comes with Slackware so there is a big chance that it is already installed on your system.

Starting Snownews

To start Snownews, simply type snownews in the console.

Adding New Feeds

To add new feeds, press a, paste a feed URL and hit Enter. The following, for example, is Slackware Documentation Project RSS feed URL:

http://docs.slackware.com/feed.php

You will see the name of the new feeds source. Pressing Enter will display new feeds. To go back to the main screen, press q

Nowadays most websites provide RSS feeds. If there is a website that doesn't, you could try to employ scripts like script4rss[62] to convert static HTML pages to feeds.

Other Commands

To display a list of other commands available, press h which is context dependent:

Feed Sources List View

Feed List View

Feed View

Snownews Colours

Your Snownews window does not need to look as gloomy as the one in the pictures above. The background colour is the colour of your terminal and the rest can be configured in the ~/.snownews/colors file. The file contains 4 variables. By default, it is configured as follows:

enabled:1

It just switches on colour support. Assigning -1 to it would switch off colour support.

new item:5

Display new feeds in magenta.

goto url:4

URLs are displayed in blue

feedtitle:-1

The feed title has no colour.

The ~/.snownews/colors file contains other color definitions.

Snownews Keybindings

The ~/.snownews/keybindings file contains the program's keybindings. The file syntax is very straightforward:

add feed:a

To add a new feed, you need to press a. If you want to change it, simply replace a with a key of your choice.

Open Links from Feeds in a Web Browser

Newsfeeds usually include URLs that can be opened in a web browser. To open a URL, type o (lower-case letter o). By default, snownews, being a command line application, opens URLs in another command line tool, ie. Lynx. To change the default browser, type B from the main snownews window and type:

/usr/bin/firefox %s

From now on, all URLs will open in Firefox.

Easter Egg

Snownews has a Christmas related Easter Egg. Simply create the santa_hunta file inside ~/.snownews/, open the About window by pressing A from the main screen and enjoy the game.

Links

List[63] of other popular RSS newsreaders.

Sources

Originally written by sycamorex[64]

howtos, software, RSS, newsreader, snownews, feeds, author sycamorex

Opera

The web-browser from Opera Software is a highly featured application: web-browser, email-client,RSS reader, torrent-client… It can easily be installed from slackbuilds[65]. It is proprietary software.

Slackbuild adress: http://slackbuilds.org/repository/13.37/network/opera/[66]

If you want to very latest version, you can visit ruari's blog[67].

Alternatively, you can get a Slackware-compatible official release from Opera's download[68] page. It comes with a script to install opera to a location of choosing (the default choice of /usr/local is good - if you try to install as a user other than root, it will recommend installing to $HOME/.local) as well as an uninstall script. However, opera includes no update mechanism - you will have to download and install new versions by hand.

Finally, one can use the script op2slk[69] to download the latest Opera version and convert it to a Slackware package for later (un)installation.

Sources

Official website[70]

slackware

Adding Multilib Capability to Slackware on x86_64 Architecture

This article contains instructions on how to create a true multilib Slackware64. A multilib 64bit Linux system is capable of running 64bit as well as 32bit software. The Filesystem Hierarchy Standard[71] documents the optimal method to achieve a clean separation between 64bit and 32bit software on a single system. When starting with the development of “Slackware64” (the official port to the x86_64[72] architecture) we chose to adopt this standard. Therefore Slackware64 has been configured to look for 64bit libraries in /lib64 and /usr/lib64 directories. This is why I call Slackware64 “multilib-ready” - even though 32bit libraries will be looked for in /lib and /usr/lib, Slackware64 does not ship with any 32bit software. There is one more step that must be taken (by you, the user) before Slackware64 can be called “multilib-enabled”.

This is accomplished as follows:

First we need to switch to multilib versions of

glibc (i.e. a glibc that supports running both 32bit and 64bit binaries), and

gcc (i.e. able to compile 32bit binaries as well as 64bit binaries).

Then, system libraries are taken from 32bit Slackware and installed in the 64bit Slackware system alongside their 64bit versions which completes the process of creating a 32bit compatibility software layer.

When Slackware64 was released, it had an advantage over the 64bit “forks” that existed out there. These forks added the 32bit compatibility layer by recompiling a lot of their packages as 32bit binaries. Slackware on the other hand, is a distribution that consists of a 32bit and 64bit release, both of which are being developed in parallel. This means, that you do not have to compile 32-bit packages from scratch in order to add multilib capability to the 64bit system. You simply take them from the 32-bit Slackware package tree!
This was one of the reasons for not adding full multilib to Slackware64 - we create the right preconditions but require the user to act if she needs multilib.
In a section further down, I will explain how you can take a 32-bit Slackware package (say, the “mesa” package) and re-package its content into a “mesa-compat32” package that you can install straight away on Slackware64.

Slackware for the x86_64 architecture (or “Slackware64” for short) is a pure 64-bit Operating System, but easily upgradable to multilib. Out of the box, Slackware64 is only capable of compiling and running 64bit binaries.

Advantage of a multilib system

I will give some examples of programs that require multilib support on a 64bit Slackware because they will not start or compile on Slackware64 without the 32bit compatibility layer:

Wine[73]
Most Windows programs are still 32bit, and in order to run those on Linux with Wine, you need a 32bit version of Wine.

VirtualBox[74]
The popular virtual machine software. Although this is (partly) open source it still needs 32-bit compatibility libraries on 64-bit Slackware.

Steam[75]
The highly popular gaming platform still needs a 32bit client[76]. Most of the available games are 32bit as well.

Skype[77], Citrix client[78], …
These programs are proprietary and closed-source. We have to depend on the developer to make 64bit binaries available. So far, that has not happened for these example programs.

Luckily, 64bit support is becoming more and more common. Adobe was a sore point for a long time, but they eventually released their Flash browser plugin in a 64bit version. Sun (now absorbed by Oracle) revealed a 64bit version of their Java browser plugin. These two events were major triggers to start working on Slackware64.

Obtaining multilib packages

You can download a set of multilib-enabled packages and scripts from my web site: http://slackware.com/~alien/multilib/[79] .

Apart from several README files (this Wiki article basically is an enhanced version of one of these READMEs), you will find one subdirectory for every 64-bit Slackware release below the toplevel directory “multilib”. There is another directory called “source”. The “source” directory contains package sources and SlackBuild scripts.
The stuff that you are really interested in - the binary packages - is available in the <slackware_release_number> directory below the toplevel directory. Every such directory also contains a “slackware64-compat32” subdirectory where you will find an essential set of converted 32-bit Slackware packages, ready for installing on your 64-bit Slackware.

Keeping your multilib up-to-date

In order to keep up to date, I advise you to keep an eye on the ChangeLog[80] (RSS feed[81]) which I maintain for my multilib packages. Usually, I will have updated glibc and gcc packages available within a day after Slackware has updates to gcc and glibc.

Automation:

Check out compat32pkg by Sėbastien Ballet which automates this process, similar to slackpkg.

If you prefer slackpkg for package management, then it is worthwhile to check out slackpkg+[82], an extension to slackpkg which manages the packages you installed from 3rd-party repositories - including multilib. When properly configured, keeping your multilib is as easy as running:

# slackpkg update
# slackpkg upgrade multilib
# slackpkg install multilib

That last command will show you if any new packages were added to the collection of “compat32” packages, such as llvm-compat32 and orc-compat32 recently.

This is how a typical configuration would look like - for a computer running Slackware-current and using Alien BOB's KDE testing repository. The PKGS_PRIORITY ensures that multilib packages of gcc and glibc have precedence over the Slackware originals. The keyword “multilib” which defines the name for the repository must be the same keyword used in the “slackpkg” commands above. The choice of the word “multilib” is arbitrary, it could just as well have been “compat32”, as long as you use it consistently.
Contents of an example file “/etc/slackpkg/slackpkgplus.conf” would be as follows:

SLACKPKGPLUS=on
VERBOSE=1
ALLOW32BIT=off
USEBL=1
WGETOPTS="--timeout=5 --tries=1"
GREYLIST=on
PKGS_PRIORITY=( multilib restricted alienbob ktown )
REPOPLUS=( slackpkgplus multilib restricted alienbob ktown )
MIRRORPLUS['multilib']=http://bear.alienbase.nl/mirrors/people/alien/multilib/current/
MIRRORPLUS['alienbob']=http://bear.alienbase.nl/mirrors/people/alien/sbrepos/current/x86_64/
MIRRORPLUS['restricted']=http://bear.alienbase.nl/mirrors/people/alien/restricted_sbrepos/current/x86_64/
MIRRORPLUS['ktown']=http://bear.alienbase.nl/mirrors/alien-kde/current/latest/x86_64/
MIRRORPLUS['slackpkgplus']=http://slakfinder.org/slackpkg+/

Enabling multilib support on Slackware64

The quick 'n' dirty instructions

This section contains the essential instructions to add full multilib capability to your Slackware64 system. If you want to understand the process in more detail, or need information on how to compile 32bit software in Slackware64, you should also read the sections that follow.
Note that the “#” in front of the commands depicts a root prompt.

Download the packages from my web site (I gave you the URL in the previous section, but this example is using a mirror URL). Suppose you are running Slackware 14.2. You execute:

# SLACKVER=14.2
# mkdir multilib
# cd multilib
# lftp -c "open http://bear.alienbase.nl/mirrors/people/alien/multilib/ ; mirror -c -e ${SLACKVER}"
# cd ${SLACKVER}

Upgrade your 64bit Slackware “gcc” and “glibc” packages to my multilib versions.
Run the command

# upgradepkg --reinstall --install-new *.t?z

after you changed to the directory where you downloaded these packages.
This command will also install an additional package called “compat32-tools”.

If you also downloaded a directory called slackware64-compat32 (my example “lftp” command will have done that) then you are lucky, because I did the 32bit package conversion for you already! All you do is run the command:

# upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z

which will install all the converted 32-bit Slackware packages (or upgrade them if you already had installed older multilib packages, for instance when you are upgrading to a newer Slackware). That's all!

If you can not find a subdirectory called slackware64-compat32 then either you did not download it, or the download mirror did not provide it. In this case, you have to do the 32-bit package conversion yourself. Not difficult at all, it takes a few minutes:

The fastest is if you have a local directory with original 32-bit Slackware packages available (also called a local mirror). Those who bought an official Slackware DVD can simply use that DVD: it is dual-sided and 32bit Slackware is on one of the sides. For the sake of this example I will assume that you have a local 32bit Slackware directory tree available at “/home/ftp/pub/slackware/slackware-14.2/slackware/”.
There should be sub-directories called 'a', 'ap', 'd', 'l', 'n', 'x' immediately below this directory. (If you have mounted a Slackware DVD, your directory will probably be “/media/SlackDVD/slackware/” but I will not use that in the example commands below).

Create a new empty directory (let us call it 'slackware64-compat32') and change into it:

# mkdir slackware64-compat32 ; cd slackware64-compat32

Run the following command to create a set of 32bit compatibility packages, using the directory to the official 32bit Slackware packages as input:

# massconvert32.sh -i /home/ftp/pub/slackware/slackware-14.2/slackware/

The previous step takes a while. When it ends, proceed to install the 90 MB of freshly converted 32-bit Slackware packages which were created in subdirectories below your current directory:

# upgradepkg --install-new *-compat32/*.t?z

Done! You can now start downloading, installing and running 32bit programs. This was not so hard, was it?

If you use a package manager like slackpkg on Slackware releases older dan 13.37 you will have to add all the glibc and gcc package names to its package blacklist. If you do not take this precaution, you run the risk of your package manager accidentally replacing your multilib versions with Slackware's original pure 64-bit versions!
If you run Slackware 13.37 or newer, then slackpkg supports regular expressions in the blacklist file. In that case, a single line in /etc/slackpkg/blacklist will be enough to blacklist all of my packages (including multilib gcc and glibc packages and all compat32 packages):

[0-9]+alien
[0-9]+compat32

On the other hand, if you are using the slackpkg extension called slackpkg+[83] then you should definitely not blacklist these packages, because that prevents slackpkg+ from managing them!

If you are running Slackware 13.1 or newer, and downloaded the compat32-tools package for that release, the massconvert32.sh script can use a remote webserver to download the 32-bit Slackware packages from, instead of requiring a local Slackware mirror or a DVD. You use the “-u” parameter to specify the remote URL like this:

# massconvert32.sh -u http://someserver.org/path/to/slackware-14.2/slackware

Detailed instructions

Upgrading glibc and gcc

The following glibc/gcc packages are replacements for - not additions to - standard Slackware packages. You use the “upgradepkg” program to upgrade to my multilib versions of gcc and glibc. You will need these in order to run (glibc), and build (gcc), 32-bit software on your 64-bit Slackware computer:

Slackware64 13.0

The gcc compiler suite:

gcc-4.3.3_multilib-x86_64-4alien.txz

gcc-g++-4.3.3_multilib-x86_64-4alien.txz

gcc-gfortran-4.3.3_multilib-x86_64-4alien.txz

gcc-gnat-4.3.3_multilib-x86_64-4alien.txz

gcc-java-4.3.3_multilib-x86_64-4alien.txz

gcc-objc-4.3.3_multilib-x86_64-4alien.txz

The GNU libc libraries:

glibc-2.9_multilib-x86_64-3alien.txz

glibc-i18n-2.9_multilib-x86_64-3alien.txz

glibc-profile-2.9_multilib-x86_64-3alien.txz

glibc-solibs-2.9_multilib-x86_64-3alien.txz

glibc-zoneinfo-2.9_multilib-noarch-3alien.txz

Slackware64 13.1

The gcc compiler suite:

gcc-4.4.4_multilib-x86_64-1alien.txz

gcc-g++-4.4.4_multilib-x86_64-1alien.txz

gcc-gfortran-4.4.4_multilib-x86_64-1alien.txz

gcc-gnat-4.4.4_multilib-x86_64-1alien.txz

gcc-java-4.4.4_multilib-x86_64-1alien.txz

gcc-objc-4.4.4_multilib-x86_64-1alien.txz

The GNU libc libraries:

glibc-2.11.1_multilib-x86_64-3alien.txz

glibc-i18n-2.11.1_multilib-x86_64-3alien.txz

glibc-profile-2.11.1_multilib-x86_64-3alien.txz

glibc-solibs-2.11.1_multilib-x86_64-3alien.txz

glibc-zoneinfo-2.11.1_multilib-noarch-3alien.txz

Slackware64 13.37

The gcc compiler suite:

gcc-4.5.2_multilib-x86_64-2alien.txz

gcc-g++-4.5.2_multilib-x86_64-2alien.txz

gcc-gfortran-4.5.2_multilib-x86_64-2alien.txz

gcc-gnat-4.5.2_multilib-x86_64-2alien.txz

gcc-java-4.5.2_multilib-x86_64-2alien.txz

gcc-objc-4.5.2_multilib-x86_64-2alien.txz

The GNU libc libraries:

glibc-2.13_multilib-x86_64-7alien.txz

glibc-i18n-2.13_multilib-x86_64-7alien.txz

glibc-profile-2.13_multilib-x86_64-7alien.txz

glibc-solibs-2.13_multilib-x86_64-7alien.txz

Slackware64 14.0

The gcc compiler suite:

gcc-g++-4.7.1_multilib-x86_64-1alien.txz

gcc-gfortran-4.7.1_multilib-x86_64-1alien.txz

gcc-gnat-4.7.1_multilib-x86_64-1alien.txz

gcc-go-4.7.1_multilib-x86_64-1alien.txz

gcc-java-4.7.1_multilib-x86_64-1alien.txz

gcc-objc-4.7.1_multilib-x86_64-1alien.txz

The GNU libc libraries:

glibc-2.15_multilib-x86_64-9alien.txz

glibc-i18n-2.15_multilib-x86_64-9alien.txz

glibc-profile-2.15_multilib-x86_64-9alien.txz

glibc-solibs-2.15_multilib-x86_64-9alien.txz

Slackware64 14.1

The gcc compiler suite:

gcc-4.8.2_multilib-x86_64-1alien.txz

gcc-g++-4.8.2_multilib-x86_64-1alien.txz

gcc-gfortran-4.8.2_multilib-x86_64-1alien.txz

gcc-gnat-4.8.2_multilib-x86_64-1alien.txz

gcc-go-4.8.2_multilib-x86_64-1alien.txz

gcc-java-4.8.2_multilib-x86_64-1alien.txz

gcc-objc-4.8.2_multilib-x86_64-1alien.txz

The GNU libc libraries:

glibc-2.17_multilib-x86_64-10alien.txz

glibc-i18n-2.17_multilib-x86_64-10alien.txz

glibc-profile-2.17_multilib-x86_64-10alien.txz

glibc-solibs-2.17_multilib-x86_64-10alien.txz

Slackware64 14.2

The gcc compiler suite:

gcc-5.3.0_multilib-x86_64-3alien.txz

gcc-g++-5.3.0_multilib-x86_64-3alien.txz

gcc-gfortran-5.3.0_multilib-x86_64-3alien.txz

gcc-gnat-5.3.0_multilib-x86_64-3alien.txz

gcc-go-5.3.0_multilib-x86_64-3alien.txz

gcc-java-5.3.0_multilib-x86_64-3alien.txz

gcc-objc-5.3.0_multilib-x86_64-3alien.txz

The GNU libc libraries:

glibc-2.23_multilib-x86_64-2alien.txz

glibc-i18n-2.23_multilib-x86_64-2alien.txz

glibc-profile-2.23_multilib-x86_64-2alien.txz

glibc-solibs-2.23_multilib-x86_64-2alien.txz

Slackware64 current

As long as you don't see a separate directory named “current” you can just use the files in the directory for the most recent stable release.

The gcc compiler suite:

gcc-7.1.0_multilib-x86_64-2alien.txz

gcc-brig-7.1.0_multilib-x86_64-2alien.txz

gcc-g++-7.1.0_multilib-x86_64-2alien.txz

gcc-gfortran-7.1.0_multilib-x86_64-2alien.txz

gcc-gnat-7.1.0_multilib-x86_64-2alien.txz

gcc-go-7.1.0_multilib-x86_64-2alien.txz

gcc-objc-7.1.0_multilib-x86_64-2alien.txz

The GNU libc libraries:

glibc-2.25_multilib-x86_64-3alien.txz

glibc-i18n-2.25_multilib-x86_64-3alien.txz

glibc-profile-2.25_multilib-x86_64-3alien.txz

glibc-solibs-2.25_multilib-x86_64-3alien.txz

Since the update to gcc 7, there is no more gcc-java package because its development has ceased.

The glibc-zoneinfo package is not a part of multilib, since it does not contain code. You need to install Slackware's stock glibc-zoneinfo package.

All releases of Slackware

There is one additional package that you need to install using the “installpkg” program. The actual version may vary for each release of Slackware, but the package can be found in the same directory where you also find the multilib versions of gcc and glibc:

The “32bit toolkit” (scripts that facilitate the creation of 32bit packages)

compat32-tools-3.7-noarch-1alien.tgz

Adding 32-bit Slackware libraries

The upgrade of glibc and gcc which I described in the previous section changes your system from “multilib-ready” to “multilib-enabled”.
Now, all you need to do is to install 32bit versions of Slackware's system software so that future 32bit programs that you are going to install and/or compile will find all the 32bit libraries they need in order to work.

This is not as simple as grabbing 32bit Slackware packages and installing them in Slackware64:

In the first place, you will end up with multiple packages carrying the same name (two 'mesa' packages, two 'zlib' packages, etc…) which will be confusing to you as well as to the slackpkg package manager.

And furthermore, if the 32bit package contains binaries (something like /usr/bin/foo), they will overwrite their 64bit counterparts when you install the 32bit package on top. It will seriously mess up your system if that happens.

A little bit of extra care is required so that unnecessary/unwanted files are stripped from the 32bit packages before you install them. What you need, is a 32bit package that does not conflict with whatever is already present in 64bit Slackware. Hence the name “32bit compatibility package”.

I decided that it would be a waste of download bandwidth if I created 32bit compatibility versions of Slackware packages myself. After all, you have probably bought the Slackware 14.2 DVD so you already possess both 64bit and 32bit versions of Slackware… or else the 32bit Slackware tree is available for free download of course

Instead, I wrote a few scripts (parts of the script code were written by Fred Emmott of Slamd64[84] fame) and wrapped these into a “compat32-tools” package. Their purpose is to let you extract the content from any 32bit Slackware package and use that to create a new package which you can safely install on your 64bit Slackware.

This “compat32-tools” package needs some explanation.
Please read the detailed 'README' file in the /usr/doc/compat32-tools-*/ directory, it will help you on your way. These are the three useful scripts which the package installs:

/etc/profile.d/32dev.sh
This is the same script that comes with Slamd64. It reconfigures your shell environment so that it will be easier for you to compile 32-bit software (by preferring the 32-bit compilers and libraries over their 64-bit versions)

convertpkg-compat32
This script takes a 32-bit Slackware package and converts it to a '-compat32' package that you can safely install (using “installpkg”) on Slackware64, alongside the 64-bit version of the same software package. For instance: suppose you need 32bit libraries that are in the mesa package. You take the mesa package from 32-bit Slackware (x/mesa-7.5-i486-1.txz) and then run

# convertpkg-compat32 -i /path/to/mesa-7.5-i486-1.txz

which will create a new package called mesa-compat32-7.5-x86_64-1compat32.txz. This new package (which is created in your /tmp directory unless you specified another destination) is basically the old 32bit package, but stripped from non-essential stuff. The changed basename (mesa becomes mesa-compat32) allows you to install this new package in Slackware64 where it will co-exist with the 64bit mesa package, not overwriting any files.
The script leaves temporary files in the directory “/tmp/package-<prgnam>-compat32” which you can safely delete.

massconvert32.sh
This script contains an internal list of what I consider the essential subset of 32bit Slackware packages. It uses the above “convertpkg-compat32” script to grab every package that is on this internal list, and convert these into '-compat32' packages.
You need to run this script only once, for example like this (the example assumes that you mounted your 32bit Slackware DVD on /mnt/dvd):

# massconvert32.sh -i /mnt/dvd/slackware -d ~/compat32

This action will result in about 150 MB of new packages which you will find inside the newly created directory ~/compat32 (the directory's name is arbitrary of course, I chose it for the sake of this example). These packages comprise the 32bit component of your multilib Slackware64 system.
They should be installed using “installpkg”, and they give you a pretty complete 32-bit compatibility layer on top of Slackware64:

# installpkg ~/compat32/*/*.t?z

If you are upgrading from an earlier version of these packages (because for instance you upgraded your 64-bit Slackware to a newer release) then you do not use “installpkg” of course, but “upgradepkg –install-new” instead:

# upgradepkg --install-new ~/compat32/*/*.t?z

The “–install-new” parameter is needed to install the new compat32 packages which were added between releases.

When installing the compat32 packages you will notice that some will show errors about missing files in /etc. This is “by design”, and these errors can be ignored. These messages are caused by the fact that files in /etc are removed from a “-compat32” package during conversion (except for pango and gtk+2). I assume that files in /etc will already have been installed by the original 64bit packages.
An example of these “errors” for the cups-compat32 package:

Executing install script for cups-compat32-1.3.11-x86_64-1.txz.
install/doinst.sh: line 5: [: too many arguments
cat: etc/cups/interfaces: Is a directory
cat: etc/cups/ppd: Is a directory
cat: etc/cups/ssl: Is a directory
cat: etc/cups/*.new: No such file or directory
cat: etc/dbus-1/system.d/cups.conf.new: No such file or directory
chmod: cannot access `etc/rc.d/rc.cups.new': No such file or directory
cat: etc/rc.d/rc.cups.new: No such file or directory
Package cups-compat32-1.3.11-x86_64-1.txz installed.

If you were considering to use the convertpkg-compat32 script to convert a non-Slackware package to a -compat32 package, I must strongly advise against this. The script is written with a single purpose and that is to make 32bit versions of the official Slackware64 binaries/libraries available in a multilib setup. As such, the script will remove a lot of stuff that is present in the original 32bit package - stuff which is expected to have been installed as part of the 64bit version of the package.
In almost all cases where you have downloaded a non-Slackware 32bit package and want to make it work on Slackware64, the best way is to find the sources and build a 64bit version of the package. Alternatively, just install the original 32bit package instead of trying to “convert it” and then run it from the commandline to find out any missing 32bit libraries you may still have to extract from an official Slackware package.

Running 32-bit programs

Running a pre-compiled 32-bit program is easy after you've done the above system preparation. Just download, install and run it!

At times, you may run into a program that requires a certain 32-bit Slackware library that you do not yet have available. In that case, find out which 32bit Slackware package contains this missing library. Use the “convertpkg-compat32” script to convert that original 32bit Slackware package and install the resulting 32bit “compatibility” package on Slackware64.

Compiling 32-bit programs

In case you need to compile a 32-bit program (wine and grub are two examples of open source programs that are 32-bit only) you first configure root's shell environment by running the command:

# . /etc/profile.d/32dev.sh

Note the 'dot' at the beginning of the line - that is actually part of the commandline! The use of the dot is equivalent to the 'source' command.
Running this command changes or creates several environment variables. The effect of this is, that 32-bit versions of binaries are preferred over 64bit binaries when you compile source code - you will be running a 32bit compilation. The effect will last until you logout from your root shell.

In this changed environment, you will be able to use standard SlackBuilds to build 32-bit packages for Slackware64. There's a couple of things to keep in mind:

You have to define the ARCH variable as 'i486' because even on your 'x86_64' computer you are compiling a 32-bit program!
This is related to the triplet of “$ARCH-slackware-linux” which is normally used in the “configure” command.

As an exception, you will have to compile the “wine” package with 'ARCH=x86_64' because you will install this package directly on your multilib computer without converting to a 'compat32' package.

If you want to install this 32-bit package on Slackware64-multilib you will have to convert it to a 'compat32' package:

# convertpkg-compat32 -i /path/to/your/fresh/foo-VERSION-i486-BUILD.tgz
# upgradepkg --install-new /tmp/foo-compat32-VERSION-x86_64-BUILDcompat32.txz

Caveats

After installing the “-compat32” packages, you may have to re-install your binary Nvidia or Ati video X.Org drivers. These driver packages contain both 64bit and 32bit libraries to be maximally useful on a 64bit multilib OS. If you installed the driver files for both architectures, the “mesa-compat32” package will overwrite some of the 32bit library files.

On the other hand, if you originally only installed the 64bit driver libraries for your Nvidia/Ati card, it is recommended after installation of the multilib packages, to re-install the binary driver package. This time, choose to install the 32bit driver files as well.

The graphical 32bit applications that you are going to run on your multilib installation will require these 32bit driver libraries. Crashes are likely to occur if you fail to install the correct files.

If you want to compile your 64bit kernel yourself, be sure to compile 32bit emulation capability into it or else multilib will mysteriously fail. You will need this piece of kernel configuration: CONFIG_IA32_EMULATION

Packages converted by massconvert32.sh

This is the list of packages that is converted into “-compat32” versions by the massconvert32.sh script. Note that some of these packages are not part of Slackware 13.0 or 13.1, they were added in a later Slackware version so they will produce a “* FAIL: package 'package_name' was not found!” message when you run the script on an older release. The other way round is true as well - some packages have been removed in later versions of Slackware and they will also trigger the “* FAIL: package 'package_name' was not found!” message. Don't worry about that.

# The A/ series:

aaa_elflibs
attr
bzip2
cups
cxxlibs
dbus
e2fsprogs
eudev
libgudev
openssl-solibs
udev
util-linux
xz

# The AP/ series:

cups
cups-filters
flac
mariadb
mpg123
mysql
sqlite

# The D/ series:

libtool
llvm
opencl-headers

# The L/ series:

SDL2
alsa-lib
alsa-oss
alsa-plugins
atk
audiofile
cairo
dbus-glib
elfutils
esound
expat
ffmpeg
fftw
freetype
fribidi
gamin
gc
gdk-pixbuf2
giflib
glib2
gmp
gnome-keyring
gtk+2
gst-plugins-base
gst-plugins-base0
gst-plugins-good
gst-plugins-good0
gst-plugins-libav
gstreamer
gstreamer0
hal
harfbuzz
icu4c
jasper
json-c
lame
lcms
lcms2
libaio
libart_lgpl
libasyncns
libclc
libedit
libelf
libexif
libffi
libglade
libgphoto2
libidn
libieee1284
libjpeg
libjpeg-turbo
libmng
libmpc
libnl3
libnotify
libogg
libpcap
libpng
libsamplerate
libsndfile
libtasn1
libtermcap
libtiff
libunistring
libusb
libvorbis
libxml2
libxslt
lzo
ncurses
ocl-icd
openjpeg
orc
pango
popt
pulseaudio
python-six
qt
readline
sbc
sdl
seamonkey-solibs
speexdsp
startup-notification
svgalib
v4l-utils
zlib

# The N/ series:

curl
cyrus-sasl
gnutls
libgcrypt
libgpg-error
libtirpc
nettle
openldap-client
openssl
p11-kit
samba

# The X/ series:

fontconfig
freeglut
glew
glu
libFS
libICE
libSM
libX11
libXScrnSaver
libXTrap
libXau
libXaw
libXcomposite
libXcursor
libXdamage
libXdmcp
libXevie
libXext
libXfixes
libXfont
libXfont2
libXfontcache
libXft
libXi
libXinerama
libXmu
libXp
libXpm
libXprintUtil
libXrandr
libXrender
libXres
libXt
libXtst
libXv
libXvMC
libXxf86dga
libXxf86misc
libXxf86vm
libdmx
libdrm
libepoxy
libfontenc
libinput
libpciaccess
libva
libva-intel-driver
libvdpau
libxcb
libxshmfence
mesa
pixman
vulkan-sdk
xcb-util

# The XAP/ series:

sane

Multilib download mirrors

You can download the multilib packages from (at least) these locations:

http://slackware.com/~alien/multilib/[85]

http://bear.alienbase.nl/mirrors/people/alien/multilib/[86]

http://slackware.uk/people/alien/multilib/[87]

http://alien.slackbook.org/slackware/multilib/[88]

http://slackbuilds.org/mirror/alien/multilib/[89]

3rd party support tools

Sėbastien Ballet has written a tool called compat32pkg. On his web site[90] he has compat32pkg available for download as well as extensive documentation about how to use it on Slackware64.
I will quote the site:
“Compat32pkg is an automated tool that provides all the necessary for managing (converting, installing, upgrading, removing) the 32-bit part of AlienBob's multilib for slackware-64, and all 32-bit packages from Slackware-32 for which users could find a needs into a 64-bit environment, like firefox, seamonkey, jre,…”

There is also slackpkg+[91], written by Matteo Rossini (nicknamed zerouno) with contributions from (among others) Sėbastien Ballet. This is a plugin for Slackware's own slackpkg[92] which adds the capability for installing packages from external (3rd-party) unofficial Slackware repositories. It has good support for adding multilib to your 64-bit Slackware and keeping it up to date.

Translations

Bruno Russo translated this article to portuguese (brazil): http://www.brunorusso.eti.br/slackware/doku.php?id=multilib_para_o_slackware_x86_64[93]

Mehdi Esmaeelpour translated this article to persian: http://www.slack-world.com/index.php/articles/43-general-system/85-multilib-slackware64[94]

Patrick FONIO and Sebastien BALLET translated this article to french: http://wiki.slackware-fr.org/avance:articles:slackware64-multilib[95]

Acknowledgements

A lot of thanks should go to Fred Emmott, who created Slamd64, the original unofficial 64-bit fork of Slackware. Although Slackware64 was not based on Fred's work, I still learnt most of what I know about setting up the 32-bit part of a multilib Linux from his writings that are found in Slamd64.
Note that Slamd64 had separate 64bit and 32bit gcc/glibc multilib packages. However, I believe that it is cleaner to keep these essential multilib packages undivided. I followed the concept already used in Slackware64's own binutils package, which has 64-bit and 32-bit multilib capability bundled into one package.

Cross Linux From Scratch.
The CLFS Wiki (http://trac.cross-lfs.org/wiki/read#ReadtheCrossLinuxFromScratchBookOnline[96]) is a 'must-read' if you want to understand how to port Linux to a new architecture. I took several ideas, concepts and patches from them when creating Slackware64 from scratch, and again when I created my multilib gcc/glibc packages from scratch (my README on this multilib-from-scratch is available in the ./source directory).

Have fun!

Eric

Sources

The original article, written by Eric Hameleers, is at http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib[97]

slackware, multilib, author alienbob

VLC

VLC is a media player that can play almost any media format and act as a streaming server. It is an open source project led by VideoLan.

The following slackbuilds[98] by AlienBob are available to install VLC:

Codec-free version: http://www.slackware.com/~alien/slackbuilds/vlc/[99]

With codecs version: http://slackware.org.uk/people/alien/restricted_slackbuilds/vlc/[100]

Sources

VLC official website: http://www.videolan.org/[101]

Building VLC from source : http://wiki.videolan.org/Slackware[102]

slackware

Package Management: A Hands-On Explanation

WORK IN PROGRESS

Anatomy of a Slackware package

A Slackware package is a simple TGZ or TXZ compressed archive containing:

the tree structure of files and directories ;

post-installation scripts ;

the package description.

The name of every package provides a series of informations:

the program name ;

the program version ;

the architecture of the package ;

the build number.

Here's a few examples:

emacs-24.2-i486-1

mozilla-firefox-15.0.1-i486-1

vim-7.3.645-x86_64-1

Managing Slackware packages using the traditional tools

Since its early releases, Slackware provides a collection of simple tools - the pkgtools - enabling the user to install, upgrade and remove software packages, as well as build them:

installpkg

removepkg

upgradepkg

explodepkg

makepkg

Installing software packages

Install the Emacs editor from the Slackware DVD ²⁾:

# mount /dev/cdrom /mnt/cdrom
# cd /mnt/cdrom/slackware/e
# installpkg emacs-24.2-i486-1.txz
Verifying package emacs-24.2-i486-1.txz.
Installing package emacs-24.2-i486-1.txz [ADD]:
PACKAGE DESCRIPTION:
# emacs (GNU Emacs)
#
# Emacs is the extensible, customizable, self-documenting real-time
# display editor. If this seems to be a bit of a mouthful, an
# easier explanation is that Emacs is a text editor and more. At
# its core is an interpreter for Emacs Lisp, a dialect of the Lisp
# programming language with extensions to support text editing.
# This version supports X.
#
# http://www.gnu.org/software/emacs/
#
Executing install script for emacs-24.2-i486-1.txz.
Package emacs-24.2-i486-1.txz installed.

If you're using the CD set, Emacs is on the first CD.

Checking if a package is installed

The package installation process has created a new entry in /var/log/packages :

# ls /var/log/packages/em*
/var/log/packages/emacs-24.2-i486-1

Knowing if a package is installed boils down to checking the existence of the corresponding entry in /var/log/packages. Example :

# ls /var/log/packages/*firefox*
/var/log/packages/mozilla-firefox-15.0.1-i486-1

Firefox is installed on the system, in version 15.0.1. Another example :

# ls /var/log/packages/kdebase*
ls: cannot access /var/log/packages/kdebase*: No such file or directory

There is no kdebase-* package installed on the system.

Removing a package

Use removepkg to remove an installed package. The command can take the simple basename of the package as an argument. Example:

# removepkg emacs

It's also possible to provide the complete name as an argument. In that case, it's better to call the command from within /var/log/packages and use tab completion:

# cd /var/log/packages
# removepkg emacs-24.2-i486-1

Upgrading a package

Slackware provides security updates for its latest releases. Visit the official site to know more about the latest updates:

# links http://www.slackware.com

Follow the ChangeLogs link.

Check out Slackware-stable ChangeLog.

Read the file ChangeLog.txt corresponding to the architecture of your system.

You can also use the Links browser to fetch updates manually. Before launching Links, create a /root/updates directory ³⁾ to store your downloaded updates:

# cd
# mkdir updates
# cd updates/
# links mirrors.slackware.com

Follow the Slackware File Tree link.

Check out the directory corresponding to your release and architecture.

Change into the patches/packages directory.

Download any available updates.

Quit Links and install your updates like this :

# upgradepkg bind-9.9.1_P4-i486-1_slack14.0.txz
+==============================================================================
| Upgrading bind-9.9.1_P3-i486-1 package using ./bind-9.9.1_P4-i486-1_slack14.0.txz
+==============================================================================
Pre-installing package bind-9.9.1_P4-i486-1_slack14.0...
Removing package /var/log/packages/bind-9.9.1_P3-i486-1-upgraded-2012-11-21,12:14:32...
--> Deleting /usr/doc/bind-9.9.1-P3/CHANGES
--> Deleting /usr/doc/bind-9.9.1-P3/COPYRIGHT
--> Deleting /usr/doc/bind-9.9.1-P3/FAQ
...
Verifying package bind-9.9.1_P4-i486-1_slack14.0.txz.
Installing package bind-9.9.1_P4-i486-1_slack14.0.txz:
PACKAGE DESCRIPTION:
bind (DNS server and utilities)
#
# The named daemon and support utilities such as dig, host, and
# nslookup.  Sample configuration files for running a simple caching
# nameserver are included.  Documentation for advanced name server
# setup can be found in /usr/doc/bind-9.x.x/.
#
Executing install script for bind-9.9.1_P4-i486-1_slack14.0.txz.
Package bind-9.9.1_P4-i486-1_slack14.0.txz installed.
Package bind-9.9.1_P3-i486-1 upgraded with new package
./bind-9.9.1_P4-i486-1_slack14.0.txz.

Another example :

# upgradepkg iptables-1.4.14-i486-2_slack14.0.txz

Know more about the contents of a package

Every package has a corresponding entry in /var/log/packages. These are all simple text files providing information about the contents of the respective packages. Example:

# less /var/log/packages/wget-1.14-i486-1
PACKAGE NAME:     wget-1.14-i486-1
COMPRESSED PACKAGE SIZE:     478.5K
UNCOMPRESSED PACKAGE SIZE:     2.0M
PACKAGE LOCATION: /var/log/mount/slackware/n/wget-1.14-i486-1.txz
PACKAGE DESCRIPTION:
wget: wget (a non-interactive network retriever)
wget:
wget: GNU Wget is a free network utility to retrieve files from the
wget: World Wide Web using HTTP and FTP, the two most widely used Internet
wget: protocols.  It works non-interactively, thus enabling work in the
wget: background after having logged off.
wget:
wget: The author of Wget is Hrvoje Niksic <hniksic@srce.hr>.
wget:
wget:
wget:
FILE LIST:
./
install/
install/slack-desc
install/doinst.sh
usr/
usr/bin/
usr/bin/wget
usr/man/
usr/man/man1/
usr/man/man1/wget.1.gz
usr/info/
usr/info/wget.info.gz
...

Managing Slackware packages with slackpkg

The slackpkg utility has been officially included in Slackware since the 13.0 release. It enables the user to manage Slackware packages much more comfortably.

A few remarks:

Only official Slackware packages are handled by slackpkg.

Third-party packages can be managed if you use Matteo Rossini's slackpkg+ plugin.

Dependencies still have to be managed manually.

Initial configuration

Edit /etc/slackpkg/mirrors and comment out one and only one package source, for example:

# /etc/slackpkg/mirrors
...
# FRANCE (FR)
ftp://mirror.ovh.net/mirrors/ftp.slackware.com/slackware-14.0/
# http://mirror.ovh.net/mirrors/ftp.slackware.com/slackware-14.0/

If you are using a stable release of Slackware, don't get the section wrong and uncomment a mirror from Slackware-current. If you do that, you will upgrade to a development version of Slackware!

If you prefer managing packages locally without the benefit of updates, you can still use the Slackware installation DVD as a package source. In that case, you will have to configure the default mount point:

# /etc/slackpkg/mirrors
...
#----------------------------------------------------------------
# Local CD/DVD drive
#----------------------------------------------------------------
cdrom://mnt/cdrom/
...

Don't forget to mount the DVD before calling slackpkg:

# mount /dev/cdrom /mnt/cdrom

Update the information on available packages:

# slackpkg update

Note that the above command does not install any package updates. It only updates the internal list of packages you can install.

It's always a good idea to invoke slackpkg update before searching, installing or updating a package, so the system's informations about available packages are up to date.

Installing packages

Example with a single package:

# slackpkg install mplayerplug-in

Confirm the installation in the subsequent screen, and the package is automatically downloaded and installed.

You can also provide several packages as an argument:

# slackpkg install mplayerplug-in bittorrent

You can also manage whole package groups:

# slackpkg install kde

Another example for package groups:

# slackpkg install xfce

Remove packages

Example with a single package:

# slackpkg remove mplayerplug-in

As above, confirm the removal of the package in the subsequent screen.

Remove several packages at once:

# slackpkg remove mplayerplug-in bittorrent

Likewise, you can remove a whole package group:

# slackpkg remove kde

Or:

# slackpkg remove xfce

Upgrading packages

When a package update is available, you can install it using the following command:

# slackpkg upgrade iptables

Update several packages at once:

# slackpkg upgrade mozilla-firefox mozilla-thunderbird

It is common practice to keep your whole system up to date:

# slackpkg upgrade-all

Search for specific packages or files

Search for a specific package:

# slackpkg search k3b
Looking for k3b in package list. Please wait... DONE
The list below shows all packages with name matching "k3b".
[uninstalled] - k3b-2.0.2_20120226.git-i486-1

If the package is already installed, here's what you get:

# slackpkg search Terminal
Looking for Terminal in package list. Please wait... DONE
The list below shows all packages with name matching "Terminal".
[ installed ] - Terminal-0.4.8-i486-1

You can also search for individual files. The search will eventually display on or several packages containing the file in question:

# slackpkg file-search libncurses.so
Looking for libncurses.so in package list. Please wait... DONE
The list below shows the packages that contains "libncurses\.so" file.
[ installed ] - aaa_elflibs-14.0-i486-4
[ installed ] - ncurses-5.9-i486-1

If you want to know more about the content of a package:

# slackpkg info mesa
PACKAGE NAME:  mesa-8.0.4-i486-1.txz
PACKAGE LOCATION:  ./slackware/x
PACKAGE SIZE (compressed):  19208 K
PACKAGE SIZE (uncompressed):  83930 K
PACKAGE DESCRIPTION:
mesa: mesa (a 3-D graphics library)
mesa:
mesa: Mesa is a 3-D graphics library with an API very similar to that of
mesa: another well-known 3-D graphics library.  :-)  The Mesa libraries are
mesa: used by X to provide both software and hardware accelerated graphics.
mesa:
mesa: Mesa was written by Brian Paul.
mesa:

Cleaning the system

Remove all third-party packages:

# slackpkg clean-system

If you decide to keep some of the packages, simply unselect them in the subsequent screen.

You can also use slackpkg to repair a damaged package. Let's say I accidentally deleted the file /usr/bin/glxgears. First, I have to search for the package providing that file:

# slackpkg file-search glxgears
Looking for glxgears in package list. Please wait... DONE
The list below shows the packages that contains "glxgears" file.
[ installed ] - mesa-8.0.4-i486-1

With this information, I can simply reinstall the package:

# slackpkg reinstall mesa

Rebuild official packages

Slackware provides the entire system's source code in the source directory. Every binary system package will have his corresponding source directory. These source directories usually contain:

the source code for the application or the library;

its fabrication recipe in the shape of a *.SlackBuild file;

the package description in a slack-desc file;

eventually, a post-installation script named doinst.sh;

various other files like patches, custom menu entries, etc.

Build a package from source

In the example below, we will build the Terminal application from the source code provided by Slackware. You might want to remove the corresponding package if it is installed.

The Terminal package is Xfce's terminal. In Slackware 14.1, the package has been renamed to xfce4-terminal.

# removepkg Terminal

Choose an appropriate place on your system to store the source code and the scripts, for example:

# cd
# mkdir -pv source/Terminal
mkdir: created directory 'source'
mkdir: created directory 'source/Terminal'
# cd source/Terminal/
# links mirrors.slackware.com

Fetch the content from the source/xfce/Terminal directory on a Slackware mirror. Here's what we get:

# ls -lh
total 1,4M
-rw-r--r-- 1 root root  821 nov.  24 15:09 slack-desc
-rw-r--r-- 1 root root 1,4M nov.  24 15:11 Terminal-0.4.8.tar.xz
-rw-r--r-- 1 root root 3,6K nov.  24 15:10 Terminal.SlackBuild

Make the Terminal.SlackBuild file executable and start the building process:

# chmod +x Terminal.SlackBuild
# ./Terminal.SlackBuild

The script initiates the package compilation. If everything goes as expected, the operation exits with the following message:

Slackware package /tmp/Terminal-0.4.8-i486-1.txz created.

Now we can install the resulting package:

# installpkg /tmp/Terminal-0.4.8-i486-1.txz

Modify an official Slackware package

The main reason for rebuilding an official package is to modify it, for example to add or strip certain functionalities. In the following example, we will rebuild the audacious-plugins package in order to modify the Audacious audio player. The vanilla application sports two different graphical interfaces, and we will disable one of them.

Let's begin with removing the package if it is installed:

# removepkg audacious-plugins

Now create a suitable directory to store the source code:

# cd /root/source
# mkdir audacious-plugins
# cd audacious-plugins
# links mirrors.slackware.com

Fetch the contents of the /source/xap/audacious-plugins directory and make the audacious-plugins.SlackBuild script executable:

# chmod +x audacious-plugins.SlackBuild
# ls -lh
total 1,4M
-rw-r--r-- 1 root root 1,4M nov.  24 15:28 audacious-plugins-3.3.1.tar.xz
-rwxr-xr-x 1 root root 4,0K nov.  24 15:28 audacious-plugins.SlackBuild*
-rw-r--r-- 1 root root  892 nov.  24 15:28 slack-desc

Now edit audacious-plugins.SlackBuild and add one option:

...
# Configure:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
--enable-amidiplug \
--disable-gtkui \          -> add this option
--program-prefix= \
--program-suffix= \
${ARCHOPTS} \
--build=$ARCH-slackware-linux
...

Build and install the package:

# ./audacious-plugins.SlackBuild
...
Slackware package /tmp/audacious-plugins-3.3.1-i486-1.txz created.
# installpkg /tmp/audacious-plugins-3.3.1-i486-1.txz

Choosing your configuration options for compiling

The source configuration script (or more exactly the sometimes very long line in the SlackBuild beginning with ./configure) often displays an overview of activated and/or deactivated options. To interrupt the package construction process and display this overview, you can temporarily edit the SlackBuild like this:

...
# Configure:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
--enable-amidiplug \
--program-prefix= \
--program-suffix= \
${ARCHOPTS} \
--build=$ARCH-slackware-linux
exit 1          -> add this option to interrupt the script
# Build and install:
make $NUMJOBS || make || exit 1
make install DESTDIR=$PKG || exit 1
...

Now run the script and wait a few seconds for the configuration overview:

# ./audacious-plugins.SlackBuild
...
Configuration:
...
Interfaces
----------
GTK (gtkui):                            yes
Winamp Classic (skins):                 yes

Use the ./configure –help option to display a list of all the possible options:

# tar xvf audacious-plugins-3.3.1.tar.xz
# cd audacious-plugins-3.3.1
# ./configure --help | less
...
--disable-speedpitch    disable Speed and Pitch effect plugin
--disable-gtkui         disable GTK interface (gtkui)
--disable-skins         disable Winamp Classic interface (skins)
--disable-lyricwiki     disable LyricWiki plugin (default=enabled)
...

The SlackBuild script already takes care of automatically uncompressing the source tarball to the /tmp directory. So you can simply run ./configure –help | less from this directory, without manually uncompressing the source tarball to the current directory.

In the present case, activating certain functionalities like for example managing proprietary audio formats will depend on the presence of the corresponding libraries on your system.

Once you've chosen all your configuration options, get rid of the temporary exit 1 command in your script and launch the build and installation process:

# ./audacious-plugins.SlackBuild
...
Slackware package /tmp/audacious-plugins-3.3.1-i486-1.txz created.
# installpkg /tmp/audacious-plugins-3.3.1-i486-1.txz

Building third-party packages

Slackware offers only a limited choice of packages compared to behemoth distributions like Ubuntu or Debian. More often than not, you'll want to install a package that's not provided by the distribution. In that case, what can a poor boy do?

The SlackBuilds.org website[103] is probably the best address to find third-party software. You won't find any packages there, because SlackBuilds.org is not a binary package repository nor will it ever be. It's an extremely clean and well organized collection of build scripts, each one reviewed and tested. Using these scripts will enable you to build about every piece of third party software under the sun.

Building packages using the SlackBuilds.org scripts

In the following example, we will build and install the cowsay package using the build script provided by SlackBuilds.org.

For a start, cd into the build directory we've defined earlier:

# cd /root/source

Download the following components into this directory :

the compressed tarball containing the scripts to build the package;

the compressed source code tarball.

In our case:

# links http://slackbuilds.org

In the Search field in the upper left corner of the screen, type cowsay, move the cursor to Search (CursorDown key) and confirm by hitting Enter.

Follow the cowsay link on the search results page.

Once you're on the cowsay page, download the SlackBuild (cowsay.tar.gz) and the source code (cowsay-3.03.tar.gz) and quit Links.

Alternatively, use lynx instead of links.

Here's our two downloaded tarballs:

# ls -l cowsay*
-rw-r--r-- 1 root root 15136 nov.  25 08:14 cowsay-3.03.tar.gz
-rw-r--r-- 1 root root  2855 nov.  25 08:14 cowsay.tar.gz

Uncompress the tarball containing the scripts:

# tar xvzf cowsay.tar.gz
cowsay/
cowsay/cowsay.SlackBuild.patch
cowsay/README
cowsay/slack-desc
cowsay/cowsay.SlackBuild
cowsay/cowsay.info

Eventually, you can do a little cleanup and delete the tarball:

# rm -f cowsay.tar.gz

Now move the source tarball to the newly created cowsay/ directory:

# mv -v cowsay-3.03.tar.gz cowsay/
« cowsay-3.03.tar.gz » -> « cowsay/cowsay-3.03.tar.gz »

Here's what we have:

# tree cowsay
cowsay
|-- cowsay-3.03.tar.gz
|-- cowsay.info
|-- cowsay.SlackBuild
|-- cowsay.SlackBuild.patch
|-- README
`-- slack-desc

Now cd into that directory. Check if the cowsay SlackBuild is executable, and then launch it to start the package construction:

# cd cowsay/
# ls -l cowsay.SlackBuild
-rwxr-xr-x 1 kikinovak users 1475 mai   27  2010 cowsay.SlackBuild*
# ./cowsay.SlackBuild
...

If everything goes well, the process spews out a package in /tmp, or more exactly in the $OUTPUT directory defined by the script:

...
Slackware package /tmp/cowsay-3.03-noarch-1_SBo.tgz created.

All that's left to do is install the package using installpkg:

# installpkg /tmp/cowsay-3.03-noarch-1_SBo.tgz
# cowsay Hi there !
-------------
< Hi there ! >
-------------
\   ^__^
\  (oo)\_______
(__)\       )\/\
||----w |
||     ||

Managing package dependencies

Some packages require the presence of other packages, either to build (build dependencies) and/or to run (runtime dependencies) correctly. In some cases, a required package can depend itself on one or more other packages, and so on.

To take an example, let's have a look at the libgnomeprint page on SlackBuilds.org. The package description is followed by the following caveat:

This requires: libgnomecups.

Moreover, every script tarball contains an *.info file which states explicitly all the required package dependencies. If we look at the libgnomeprint.info file, we'll find a REQUIRES field:

PRGNAM="libgnomeprint"
VERSION="2.18.8"
HOMEPAGE="http://www.gnome.org"
...
REQUIRES="libgnomecups" ----> package dependency
...

The REQUIRES field has been introduced with Slackware 14.0.

This simply means that before we build the libgnomeprint package, we have to build and install the libgnomecups package.

Besides strictly required dependencies, a package can also have some optional dependencies to offer some extra functionality. As an example, the Leafpad text editor can be built against the optional libgnomeprint and libgnomeprintui dependencies.

WORK IN PROGRESS

Sources

Originally written by Niki Kovacs[104]

slackware, package, management, author kikinovak

²⁾

if it's not already installed

³⁾

This is just an example, of course. Feel free to use any convenient place on your system.

Localization: Adapt Slackware to your own Language

This page contains instructions about how to adapt your Slackware installation to your own language.

Overview

Contrary to other distributions, Slackware is pretty much an English language-oriented distro. The installer is not localized - it is available in English only. During installation you have only the choice of keyboard-layout for the console and can choose support for UTF-8 in the console (which is done in /etc/lilo.conf with a kernel-parameter). However, it is not hard to localize your Slackware system so that it displays commands in your own language and uses a graphical desktop environment which is using your language, metrics system and other localizations.

There are several settings which more or less are independent from each other. The keyboard-layout for the console can be chosen during installation, but is independent from the keyboard-layout when X11 is running. Unicode-support (UTF-8) extends the normal ASCII table and helps to display characters which are not contained in the English language.
The environment-variable $LANG can be set system wide or “per user”. Basically, this variable defines the language that applications will use when they interact with the user.
Also it is important to distinguish if the computer boots to run level 3 (console) or run level 4 (graphical X-Window login).

The Timezone

If you need to change the timezone of your system you can simply use (as root) the tool timeconfig on the command-line. If you want, you can set the timezone manually by copying the string for your timezone from /usr/share/zoneinfo/ to the file /etc/localtime.
Example:

cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime

Locale

Taken from man 7 locale:

A locale is a set of language and cultural rules.  These cover aspects such as language for
messages, different character sets, lexicographic conventions, and so on.  A  program  needs
to be able to determine its locale and act accordingly to be portable to different cultures.

The locale command will show you what languages are supported by your Linux system. Run

locale -av

to get a detailed overview. Here is an excerpt to get the picture:

locale: nl_NL           directory: /usr/lib64/locale/nl_NL
-------------------------------------------------------------------------------
title | Dutch locale for the Netherlands
source | RAP
address | Sankt J<F8>rgens Alle 8, DK-1615 K<F8>benhavn V, Danmark
email | bug-glibc-locales@gnu.org
language | Dutch
territory | Netherlands
revision | 1.0
date | 2000-06-29
codeset | ISO-8859-1
locale: nl_NL.utf8      directory: /usr/lib64/locale/nl_NL.utf8
-------------------------------------------------------------------------------
title | Dutch locale for the Netherlands
source | RAP
address | Sankt Jørgens Alle 8, DK-1615 København V, Danmark
email | bug-glibc-locales@gnu.org
language | Dutch
territory | Netherlands
revision | 1.0
date | 2000-06-29
codeset | UTF-8
locale: nl_NL@euro      directory: /usr/lib64/locale/nl_NL@euro
-------------------------------------------------------------------------------
title | Dutch locale for the Netherlands with Euro
source | Free Software Foundation, Inc.
address | 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
email | bug-glibc-locales@gnu.org
language | Dutch
territory | Netherlands
revision | 1.0
date | 2000-08-20
codeset | ISO-8859-15

A system's locale is configured using environment variables, some of them more widely used than others. The most interesting ones are :

LANG

LANGUAGE

LINGUAS

LC_COLLATE

LC_ALL

If you read that locale(7) man page, you will see that it mentions several locale variables which can be used to change the computer's language-specific behaviour. All these variables are prefixed with “LC_”, like LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_MESSAGES, LC_NUMERIC and LC_TIME, or the encompassing variable “LC_ALL” which will override all of the above if you define it. The LANG variable can also be used to override all these “LC_” variables.

This means that if you want it, then your computer can be configured to use a certain locale more or less completely. For instance, you can decide to just show command output in your own language (using the LANG variable) but keep the default sort order to the old-fashioned ASCII values (using the LC_COLLATE variable), which makes your system responses more reliable.

'C' is the old Slackware (and UNIX) default, which is 127-bit ASCII with a charmap setting of ANSI_X3.4-1968. These days, it's better to use en_US or another modern $LANG setting to support extended character sets.
There is also support for UTF-8 locales, but be aware that some programs are not yet able to handle UTF-8 and will fail to run properly. In those cases, you can set LANG=C before starting them.

Exploring the Environment-Variables

The environment-variables which deal with locale-settings use values like nl_NL, the lowercase first part of the string is called languagecode whereas the uppercase second part of the string is called countrycode. The languagecode refers to the language in general whereas the countrycode refers to characteristics of each country where this language is spoken.
Example: en_EN for British English and en_US for American English.

System Wide Configuration

Slackware has a profile script which allows you to set the system's locale for all users at once (system-wide). You can simply edit this file with an ASCII editor such as nano or vi. Check out

/etc/profile.d/lang.sh

(users of C-shell and derivatives must edit /etc/profile.d/lang.csh instead).

If you want to be done with this quickly, just look for the line in that file which says:

# en_US is the Slackware default locale:
export LANG=en_US

and change the value to your own language. A dutch family would change this to

# en_US is the Slackware default locale:
export LANG=nl_NL

And if I also wanted to make the computer support Unicode text, I would change it to

# en_US is the Slackware default locale:
export LANG=nl_NL.UTF-8

Note that Slackware is not fully Unicode-prepared. Some applications (like the man pages) will not properly display Unicode text. For some languages (in particular the non-Latin ones) it is mandatory to enable Unicode support (see further down) or else the character glyphs will not be displayed (you will see nothing but small rectangles instead).

Per User Configuration

If you do not want to pre-define the locale for everyone, you can set these same environment variables for the individual user.

In that case you would not be using /etc/profile.d/lang.sh but instead define these variables in the user's shell initialization file. Bash reads different initialization files depending on being called as a login shell or as a non-login shell. When the user logs into the console, Bash is called as a login shell and sources the file ~/.profile in the user's homedirectory. Therefore one adds the line

LANG=de_DE.utf8

into ~/.profile in order to enforce a german language. C-shell users would edit ~/.cshrc instead.

Console

Note that only root is permitted to use liloconfig and pkgtool!

Setting up LILO for Unicode

LILO setup section of Slackware installer allows you to set-up UTF-8 by default:

If you choose the default option (“No”), you can enable Unicode in the console later by appending the option “vt.default_utf8” in your lilo.conf file:

# Start LILO global section
# Append any additional kernel parameters:
append="vt.default_utf8=1"
boot = /dev/sdx

Or by using liloconfig:

liloconfig

Reboot your system to apply changes.

Note: liloconfig is also available from the “setup” section of pkgtool.

Setting the console font

The system setup section of Slackware's installer allows you to configure a custom font:

If you choose “Yes”, you'll get the option to try out and eventually select the desired font.

These settings are stored in /etc/rc.d/rc.font.

If you chose not to install custom fonts, you can do that later: either by changing/adding the font in /etc/rc.d/rc.font, or by running the setconsolefont script:

setconsolefont

Note: setconsolefont shows only a fixed list of fonts. Any additionally installed fonts won't appear on the list.

Note: setconsolefont is also available from the “setup” section of pkgtool.

Note: Console fonts are found in /usr/share/kbd/consolefonts. You can also use an absolute path as an argument.

Temporarily changing the font

You can temporarily change the console font by using the setfont utility (part of the kbd package). If you specify a non-Unicode font under Unicode console mode, setfont will try to automatically load Unicode mappings if available. Nowadays most of the fonts already contain embedded Unicode maps. For more info and additional options, see the setfont man page.

Note that setconsolefont also uses setfont internally. so this applies to it too.

setfont font

When invoked without an option, setfont loads the default font:

setfont

Loading a custom console keymap

You can use the setkeys tool to reconfigure the current keymap. For example:

loadkeys hu

Keymaps are located in /usr/share/kbd/keymaps. They usually contain some notes on encoding/additional key bindings. I.e.: “sr-cyr” is a Serbian Cyrillic keymap. It's an ISO-8859-5 keymap. Right-Shift is bound as a switch between US English and Serbian Cyrillic. Another example is the Russian keymap (UTF-8, Ctrl+Shift as a switch key).

Keymap files are compressed textual descriptions and are easily viewable with zcat. For example:

zcat /usr/share/kbd/keymaps/i386/azerty/fr-pc.map.gz | head | grep "^#"

Which will show us all the comments in the first 10 lines of the file:

# fr-pc.map for French PC keyboard (non-US 102 keys)
#
#  1997-3-5
#  Seak, Teng-Fong <seak@drfc.cad.cea.fr>
#

Temporary Unicode consoles with unicode-start/unicode-stop

If you want to set up Unicode only temporarily, you can do that by using the unicode-start and unicode-stop scripts (part of the kbd package)

unicode-start

This will back-up the current keymap definition into ~/.kbd, setup the current virtual console for UTF-8 and load the default font (LatArCyrHeb-16). You can also specify a font of your choosing by adding parameters in the invocation of the script:

unicode-start font

or:

unicode-start font unimap

For the description of font and unimap parameters and the default locations, check the setfont manual:

man setfont

When you want to get back to your previous environment, issue:

unicode-stop

Diagnostics

You can check if the current console is properly configured for Unicode.

Run stty with “-a” option:

stty -a

If you see “-iutf8” among the results, the current virtual console is not configured for UTF-8, otherwise if you see “iutf8” (without minus sign), the vc is properly configured.

Run kbd_mode without arguments:

kbd_mode

This will display the current keyboard mode (usually XLATE or UTF-8).

X11 Locales

When your computer boots into runlevel 4 and uses one of the login managers (for example: gdm, kdm or xdm), the ~/.profile file is sourced in any case. This means if your system uses “per user” settings (as described above) for $LANG, these settings remain valid in X11. The window managers and desktop environments (except KDE) should then come up with menus in your language.

When you run startx from runlevel 3 your “$LANG” settings from the console are applied to the window manager.

X11 keyboard setup

The keyboard layout for the X-Window system is independent from the keyboard layout of the textual console. The following settings are desktop agnostic.

Keep in mind: some desktop environments might use their own layout settings, practically overriding these settings. Most notable example is KDE.

If you want a non-English keyboard layout with X, you'll have to adapt the config files. The generic config files are found in /usr/share/X11/xorg.conf.d/ and those you want to use, you'll have to copy to the /etc/X11/xord.conf.d/ directory.
The X-server reads only those config files within the /etc/X11/xorg.conf.d/ directory!

cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d

Then open the file with your favorite text editor and find the line

Option "XkbLayout" "us"

Change “us” to your language code, for example “de” for German. Additionally you may want to edit the line

Option "XkbVariant ""

and insert your favorite keyboard-variant, for example “nodeadkeys”

Using multiple keyboard layouts

Why is this useful?

Several people use one computer but prefer different keyboard layouts.

People use another script (e.g. Greek or Cyrillic), they'll have to switch to English layout always when they want to type a command.

Therefore this configuration can be very important although many people will never have to use it.

You can also specify more than one keyboard layout:

Option "XkbLayout" "us,rs"

That also includes using different variants:

Option "XkbLayout" "us,rs,rs"
Option "XkbVariant ",latin,"

In this example we configure three keyboard layouts - US English, Serbian Latin and Serbian Cyrillic. Note the same number of commas as in the XkbLayout option. The empty “fields” mean we are using the default variants for the layouts without specified variant.

Easy layout switching

You can also specify a shortcut to easily change the layout.

Option "XKbOptions" "grp:alt_shift_toggle"

This will change the layout by pressing on Alt+Shift.

There are also other group switching combinations you can setup ⁴⁾:

grp:toggle - right alt

grp:lalt - left alt

grp:shifts_toggle - both shift keys pressed at the same time

grp:alts_toggle - both alt keys pressed at the same time

grp:ctrl_shift_toggle - ctrl + shift

grp:alt_shift_toggle - alt + shift

grp:alt_space_toggle - alt + space

grp:ctrl_alt_toggle - ctrl + alt

grp:caps_toggle - capslock

grp:shift_caps_toggle - shift + capslock

grp:lwin_toggle - left Win key on “Windows” keyboards

grp:rwin_toggle - right win key on “Windows” keyboards

grp:menu_toggle - context menu key on “Windows” keyboards

grp:lctrl_toggle - left ctrl

grp:rctrl_toggle - right ctrl

Changing the keyboard layout with setxkbmap

The following description addresses those users who need “per user” settings for their keyboard-layout in X11. This means that the system wide settings for X11 are different from their needs and it is not possible to change them. Read the man page if you need detailed information.

You can find out your current settings of the keyboard-layout in X11 with the command

setxkbmap -query

An overview of setxkbmap is available with

setxkbmap -help

The language and variant of the keyboard layout can easily be configured with (the following example lines refer to German language with variant “nodeadkeys”)

setxkbmap de
setxkbmap -variant nodeadkeys

Where to place the code?

If your system boots into runlevel 3, which means that you login on the console and then startx, you can put the above code at the top of your ~/.xinitrc.
If your system boots into runlevel 4 and you login with a login manager like gdm, kdm or xdm, you should insert it to your ~/.xprofile. This file is sourced by any of the login managers. Please note that ~/.xprofile isn't created by default, you must create it by yourself.

Desktop Environments

Desktop environments, just like all other programs, will by default adapt themselves to the locale you have defined before starting your X-Window session. However, you do not normally install KDE localization packages. The standard KDE installation is English-only and localization packages can be found in the KDEI package series. There you will find localization packages for Calligra as well - the KDE Office Suite.

Localization for KDE

When you're running KDE you'll have to install the language-package (l10n-packages) for your language. The KDE l10n-packages reside in the kdei series. If you download Slackware from a mirror, be sure not to download all of the l10n-packages but only the ones you need, there's one for KDE and one for Calligra for each language.

Note: The following settings are not necessary when you startx from runlevel 3 and have your language settings already applied. In this case KDE takes the settings from your environment.

When the l10n-package is installed and you start KDE for the first time, open the launcher and click on System Settings. In the System Settings click on Locale and select your country in the drop-down menu. Afterwards go through all the tabs and select your language, number-format, currency-format, calendar-format, format for date & time and in “other” the settings for page-size and measurement units.
You can also configure the spelling-checker in this window.
When KDE is configured for your language, the office-suite Calligra starts automatically with the correct language-settings, provided that you've installed the Calligra language-package.

Keyboard layout

We have a separate page in our Wiki for this: Keyboard Layout in KDE[105]

Xfce localization

XFCE doesn't have a GUI tool for internationalized settings. It will pickup your locale settings from the environment. Also, there are no separate packages for locale data - everything is included in the main XFCE packages. Keep in mind most of XFCE localizations are seriously lagging behind those of several most popular languages. For more information on how to help localizing XFCE in your language you might take a look at Xfce's localization page[106].

Keyboard layout

Please consult our Wiki page Keyboard Layout in XFCE[107]

Dictionaries and Spelling checkers

Spelling checkers

By default Slackware comes with aspell, ispell and hunspell. The dictionary for English is already installed. For other languages you can find the dictionaries on the DVD or the mirrors in the /extra/aspell-word-lists/ directory.

Dictionaries for Applications

Thunderbird and Firefox come with spelling checkers, you can install the dictionary for your language with the “Add-Ons” menu.

For people who write mails in various languages there's also a “dictionary-switcher” available for Thunderbird. You can search in the “Add-Ons”-menu of Thunderbird.

If you have LibreOffice installed from AlienBob's page[108] there are also language-packages available. If you have installed the l10n-package for your language, this provides also a dictionary for the spelling checker.

Applications

Most programs in Slackware come with multi-language support out of the box. They will adapt their behavior according to the locale you have defined.
There are a few notable exceptions. Slackware's Mozilla packages for Firefox, Thunderbird and Seamonkey are not localized. They are examined below.

Some of the bigger 3rd party applications like OpenOffice and LibreOffice are offered with their own set of language packs.

Mozilla-Firefox

AlienBob provides an l10n SlackBuild.script[109] which seems to be the most convenient way to localize Firefox.

It is also possible to do it pretty much the same way as with Mozilla-Thunderbird (see below). After installing the xpi-file you type about:config into the address-field Firefox in order to open the config-editor. There you type useragent and change the useragent.local to your language. This is in more detail explained for Thunderbird.

Mozilla-Thunderbird

If you want the menus in the mail client Thunderbird in your own language, you'll have to download the xpi-file for your language from the Mozilla-site.

Problem with Thunderbird is that one needs a new localization-file for (almost) every new version. Note the directory-structure of the Mozilla-site. For any version you'll have to follow their directory-structure from ftp://ftp.mozilla.org/pub/thunderbird/releases/[110] go to /VERSIONNUMBER/LINUX-i686 or x86_64/xpi/

They have different xpi-files for 32bit and 64bit Versions, but I tried it and each works for both versions.

Installation of the xpi-file is done “per-user”. Open in the menu Tools→Add ons and then click on the little arrow on the right hand top of the page beneath the search-field.

Select Install Add on from file… and then navigate to the downloaded xpi-file.

Thunderbird needs to be restarted afterwards.

The last step has to be done only once for any user account, this change remains valid also if you upgrade Thunderbird. You'll have to edit the configuration. In the menu open Edit and select in Preferences the tab Advanced.

Open the Config Editor… and click on the I'll be careful, I promise! button.

Then the Config Editor opens and you can type useragent into the field in the top of the page.

In the line general.useragent.locale double click on en-EN

and change to your own language, for example de-DE.

Afterwards restart Thunderbird, now you should have the menu in your language.

Seamonkey

You'll find a directory langpack on the Mozilla-Mirror[111] in the directory for your release. These are xpi-files and have to be installed similar to Thunderbird's xpi-files (described above). After installing the xpi-file you type about:config into the address-field of the Seamonkey-browser in order to open the config-editor. There you type useragent and change the useragent.local to your language. This is in more detail explained for Thunderbird.

LibreOffice

AlienBob provides Slackware-packages for LibreOffice[112] and additionally the l10n-packages[113] for it.

Further Reading

For those of you who are interested in additional information, here are some links.
Thanks to Didier Spaier for contributing.

opengroup.org Character Set[114]

opengroup.org Locale[115]

opengroup.org Environment Variables[116]

University of Michigan - Primer on Unicode[117]

utf-8.com UTF-8 and Unicode Standards[118]

linuxdocs.org The Unicode HOWTO[119]

For Programmers: Locales in GLIBC[120]

unicode.org FAQ[121]

w3.org Unicode Character Pickers[122]

Data on Languages[123]

Dugan Chen's Homepage - Getting Unicode/UTF-8 support - Slackware related[124]

Sources

Originally written by Eric Hameleers[125]

Contributions by Bojan Popovic[126]

Contributions by Markus Hutmacher[127]

slackware, localization, author alienbob

⁴⁾

See the complete list of options in /usr/share/X11/xkb/rules/base.lst

Window manager

For those who need and/or want a much lighter way of handling the graphical user interface than what a desktop environment[128] can provide, a window manager might be the solution. A window manager basically handles the drawing and the placement of the windows

As such, a window manager will not handle tasks like a browsing files, changing the wallpaper, managing tasks… All of the the preceding will have to be added by the user to customize his desktop experience.

A window manager might be used inside a desktop environment, therefore replacing the default manager. For example, Openbox can be used inside KDE instead of Kwin.

Available window managers

Fluxbox[129]

Blackbox[130]

WindowMaker[131]

Fvwm2[132]

Tab Window Manager[133]

Other window managers

Openbox[134]

i3 window manager[135]

Xmonad window manager[136]

Enlightenment DR17 (E17)[137]

slackware, slackware 1337

Slackware Live Edition

Preface

Welcome to the Slackware Live Edition! This is a version of Slackware 14.2 (and newer), that can be run from a DVD or a USB stick. It is an ISO image meant to be a showcase of what Slackware is about. You get the default install, no custom packages or kernel, but with all the power of Slackware. The ISO is created from scratch using a Slackware package mirror, by the “liveslak” scripts.

Slackware Live Edition does not have to be installed to a computer hard drive (however you do have that choice if you want to: using the setup2hd script). You can carry the USB stick version with you in your pocket. You'll have a pre-configured Slackware OS up & running in a minute wherever you can get your hands on a computer with a USB port.

The USB version is “persistent” - meaning that the OS stores your updates on the USB stick. The CD/DVD versions (and the USB stick if you configure it accordingly) operate without persistence, which means that all the changes you make to the OS are lost when you reboot.

In order to protect your sensitive private data in case you lose your USB stick (or in case it gets stolen) you can enhance your persistent USB Live OS with an encrypted homedirectory and/or an encrypted persistence file, to be unlocked on boot with a passphrase that only you know.

Why yet another Slackware Live

The reasons I had for creating the Slackware Live Edition are as follows:

Provide a Live version of Slackware proper; i.e. show Slackware as it is, but without having to install it. No hiding of kernel messages scrolling across the screen at boot; no custom wallpapers, etcetera. Meant for educational, evaluation and demonstration purposes.

The target should be slackware-current, the bleeding edge. Many people want to know what Slackware's development edition looks like but are hesitant to install slackware-current for fear that it breaks stuff and causes productivity loss.

Provide a way to generate a Live ISO with just a mirror of Slackware's packages as the source, fully scripted and deterministic.

Still be able to customize its content. For instance provide stripped-down or minimalist versions of Slackware but also allow for the inclusion of 3rd party packages.

Option to create a bootable USB stick running Slackware Live (which is different from 'dd'-ing the hybrid ISO to a USB stick!)

KISS: Keep It Simple Stupid!

ISO variants

The “liveslak” scripts can generate a variety of Slackware flavors:

a complete 64bit Slackware-current Live Edition (in a 4.0 GB ISO);

a slimmed-down XFCE ISO (700 MB) with XDM as the graphical login manager. It fits on a CDROM medium or a 1 GB USB stick;

a ISO image (4.3 GB) of Slackware64-current containing 'ktown' Plasma 5 instead of Slackware's KDE.

A Digital Audio Workstation (DAW) based on a custom Slackware package set plus a basic Plasma5, containing a rich software collection for musicians, producers and live performance artists.

a Mate variant (3.2 GB) where KDE 4 has been replaced by Mate (a Gnome 2 fork);

a Cinnamon flavour (a fork of the Gnome 3 Shell replacing Slackware's KDE 4).

a Dlackware[138] variant, which is Gnome3 + PAM + systemd on top of Slackware and stripped of KDE4.

a StudioWare[139] edition containing all the project's audio, video and photo editing software packages.

a Custom variant which you can give your own name, its own package list and custom post-install configuration.

Downloading ISO images

Common download locations are:

Primary site: http://download.liveslak.org/[140] (rsync://liveslak.org/liveslak/)

Darren's http://slackware.uk/people/alien-slacklive/[141] (rsync://slackware.uk/people/alien-slacklive/)

Willy's http://repo.ukdw.ac.id/slackware-live/[142]

Shasta's http://ftp.slackware.pl/pub/slackware-live/[143] (rsync://ftp.slackware.pl/slackware-live/)

Enduser Documentation

Using the ISO image

The ISO images are hybrid, which means you can either burn them to DVD, or use 'dd' or 'cp' to copy the ISO to a USB stick. Both methods will give you a live environment which will allow you to make changes and seemingly “write them to disk”. The changes will actually be kept in a RAM disk, so a reboot will “reset” the live OS to its original default state. In other words, there is no persistence of data.

Slackware Live Edition knows two user accounts: “root” and “live”. They have passwords, and by default these are… you guessed: “root” and “live”. Also by default, the ISOs will boot into runlevel 4, i.e. you will get a graphical login. The bootloader allows you to pick a non-US language and/or keyboard layout and (on boot of an UEFI system) a custom timezone.

Slackware Live Edition deviates as little as possible from a regular Slackware boot. Once you have passed the initial Liveboot stage and brought up the actual OS, you login as user “live”. From that moment onwards, you are in a regular Slackware environment.

Booting the Live OS

BIOS boot

Slackware Live Edition uses syslinux to boot the Linux kernel on BIOS computers. To be precise, the “isolinux” variant is installed to the ISO image and the “extlinux” variant is installed into the Linux partition of the USB Live version.

Syslinux shows a graphical boot menu with a nice Slackware-themed background and several options:

Start (SLACKWARE | KTOWN | XFCE | MATE | DAW) Live (depending on which of the ISOs you boot)

Non-US Keyboard selection

Non-US Language selection

Memory test with memtest86+

You can select a keyboard mapping that matches your computer's. Also you can boot Slackware in another language than US English. If you stick to US English interface language you will probably still want to change the timezone because it will default to UTC. You have to specify a custom timezone manually by adding “tz=YourGeography/YourLocation” because the syslinux bootmenu does not offer you a selection of timezones. Syslinux allows you to edit the boot commandline by pressing <TAB>. Press <ENTER> to boot after you made your changes or <ESC> to discard your edit and return to the menu.

UEFI boot

On UEFI computers, Grub2 handles the boot and it will show a menu similar (and similarly themed) to the Syslinux menu:

Start (SLACKWARE | KTOWN | XFCE | MATE | DAW) Live (depending on which of the ISOs you boot)

Non-US Keyboard selection

Non-US Language selection

Non-US Timezone selection

Memory test with memtest86+

Help on boot parameters

Editing a Grub menu before booting it is possible by pressing the “e” key. After making your changes to the boot commandline, press <F10> to boot. To discard your changes, press <ESC>.

Another difference between Syslinux and Grub2 menus: in Grub2 you can select a non-US keyboard, language and/or timezone and you will return to the main menu every time. You still have to select “Start SLACKWARE Live” to boot the computer. In the Syslinux menu, only the keyboard selection menu will return you to the main menu. Any non-US *language* selection on the other hand will boot you into Slackware Live immediately; without returning to the main menu. This is a limitation of syslinux which would require exponentially more menu files to construct a menu with more choices. Grub2 supports variables which make it easy to modify a menu entry's characteristics.

Transfering ISO content to USB stick

A script is available which allows you to transfer the ISO image content to a USB stick, making some modifications depending on the script's parameters.

The USB stick will be erased and re-formatted when running this script (except when using the '-r' refresh option)! Before inflicting any irreversible damage, the script will show you a prompt at which point you can evaluate whether it is safe to continue.

This script, called 'iso2usb.sh', accepts the following parameters:

  -c|--crypt size|perc       Add a LUKS encrypted /home ; parameter is the
requested size of the container in kB, MB, GB,
or as a percentage of free space
(integer numbers only).
Examples: '-c 125M', '-c 2G', '-c 20%'.
-d|--devices               List removable devices on this computer.
-f|--force                 Ignore most warnings (except the back-out).
-h|--help                  This help.
-i|--infile <filename>     Full path to the ISO image file.
-o|--outdev <filename>     The device name of your USB drive.
-p|--persistence <name>    Custom name of the 'persistence' directory/file.
-r|--refresh               Refresh the USB stick with the ISO content.
No formatting, do not touch user content.
-s|--scan                  Scan for insertion of new USB device instead of
providing a devicename (using option '-o').
-u|--unattended            Do not ask any questions.
-v|--verbose               Show verbose messages.
-w|--wait<number>          Add <number> seconds wait time to initialize USB.
-C|--cryptpersistfile size|perc
Use a LUKS-encrypted 'persistence' file instead
of a directory (for use on FAT filesystem).
Format for size/percentage is the same
as for the '-c' parameter.
-P|--persistfile           Use an unencrypted 'persistence' file instead
of a directory (for use on FAT filesystem).

Examples:

Create a USB version of Slackware Live, where the USB stick is known to the system as '/dev/sdX. Note - the value for the output parameter is the device name of the stick and not one of its partitions!

# ./iso2usb.sh -i ~/download/slackware64-live-14.2.iso -o /dev/sdX

Create a USB Live like above, but this time adding an encrypted /home filesystem with 750 MB of space, and at the same time increase the wait time on boot to 15 seconds (useful for slow USB media that fail to start the Live OS otherwise):

# ./iso2usb.sh -i slackware64-live-current.iso -o /dev/sdX -c 750M -w 15

Create a USB Live with an encrypted /home (allocating 30% of the stick's free space for /home) and where the persistent data will be stored in a container file instead of a directory:

# ./iso2usb.sh -i slackware64-live-current.iso -o /dev/sdX -c 30% -P

Create a USB Live with both the /home and the persistent data encrypted (the persistence filesystem will be 300 MB in size):

# ./iso2usb.sh -i slackware64-live-current.iso -o /dev/sdX -c 30% -C 300M

Refresh the system modules on a USB Live using a Live ISO as the source. Let the script scan for insertion of a USB stick instead of specifying the device name on the commandline. Note that the addons and optional modules will not be touched by this action:

# ./iso2usb.sh -i slackware64-live-current.iso -r -s

You might have noticed that the “-P” parameter does not accept a size parameter. This is because the unencrypted container file is created as a 'sparse' file that starts at zero size and is allowed to grow dynmically to a maximum of 90% of the initial free space on the Linux partition of the USB stick.

Using the Live OS to install Slackware to hard disk

All variants of Slackware Live Edition contain a script “setup2hd”, a tweaked version of the regular Slackware setup program. The “setup2hd” script supports regular Slackware network installations. In addition it allows you to install the Slackware release on which the Live OS is based, to the computer's local hard disk. You must boot the Live OS first, and then start setup2hd either in an X Terminal in your graphical Desktop Environment (aka Runlevel 4), or from the console in Runlevel 3. The fact that you can start “setup2hd” from a graphical terminal means that during installation, you can continue browsing, listening to music, watching video, reading an e-book or whatever else makes you pass the time.

The “setup2hd” script has some capabilities that the original Slackware 'setup' lacks:

It will launch fdisk/gdisk if you forgot to create Linux partitions in advance;

It will allow you to create a regular user account and set its password;

It will prompt you to set the root password in a graphical dialog.

Updating the kernel (and more) on a USB stick

A script is available which allows you to tweak the content of a USB Live stick.

Specifically, the script is able to:

Upgrade the kernel and modules, making a backup of the old kernel and modules.

Restore the backed-up kernel and modules if the new kernel is not working.

Add network support modules for PXE boot (if missing).

Increase (or decrease) USB wait time during boot.

Replace the Live init script inside the initrd image with a new script that you supply.

Move current persistence data to a new squashfs module in 'addons' afther which the persistence store will be re-initialized. The new module's name is time-stamped (/liveslak/addons/0099-slackware__customchanges-yymmddHHMMSS.sxz) so that this action can be repeated many times.

The script is meant to be used while you are running Slackare Live from that same USB stick but this is not mandatory. With the exception of the '-p' option which moves the persistence data into a squashfs module, its functions can be used on any Linux computer where you can insert the USB stick.

Before making any modifications, the script will show you a prompt at which point you can evaluate whether it is safe to continue.

This script, called 'upslak.sh', accepts the following parameters:

  -b|--nobackup              Do not try to backup original kernel and modules.
-d|--devices               List removable devices on this computer.
-h|--help                  This help.
-i|--init <filename>       Replacement init script.
-k|--kernel <filename>     The kernel file (or package).
-m|--kmoddir <name>        The kernel modules directory (or package).
-n|--netsupport            Add network boot support if not yet present.
-o|--outdev <filename>     The device name of your USB drive.
-p|--persistence           Move persistent data into new Live module.
-r|--restore               Restore previous kernel and modules.
-s|--scan                  Scan for insertion of new USB device instead of
providing a devicename (using option '-o').
-v|--verbose               Show verbose messages.
-w|--wait<number>          Add <number> seconds wait time to initialize USB.

Examples:

Get a listing of all available removable devices on the computer:

# ./upslak.sh -d

Updating kernel and modules, providing two packages as input and assuming the USB stick is known as /dev/sdX:

# ./upslak.sh -o /dev/sdX -m kernel-modules-4.19.0-x86_64-1.txz -k kernel-generic-4.19.0-x86_64-1.txz

Restore the previous kernel and modules after a failed update, and let the script scan your computer for the insertion of your USB stick:

# ./upslak.sh -s -r

Replace the Live init script with the latest template taken from the git repository:

# ./upslak.sh -o /dev/sdX -i liveslak/liveinit.tpl

PXE booting the Live OS

Slackware Live Edition can do a network boot boot using PXE protocol off a NFS export. Extract the content of the ISO to (for instance) a new directory called slackware-live below your TFTP server's /tftproot directory and export that directory via NFS. Then add lines like this to your pxelinux.cfg/default file (assuming your NFS server has IP address 192.168.0.1):

label liveslak
kernel slackware-live/boot/generic
append initrd=slackware-live/boot/initrd.img load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 kbd=us tz=Europe/Amsterdam locale=us_EN.utf8 nfsroot=192.168.0.1:/tftpboot/slackware-live hostname=pxelive

As shown in the example above, a boot parameter nfsroot is used for network boot. The parameter value defines the IP address of your NFS server and the path of the NFS export where you extracted the Slackware Live ISO. Hint: to get a listing of the exported shares of your NFS server, run showmount -e localhost on the NFS server.

Actually, two boot parameters are available to properly support network boot. A second boot parameter nic can be used to define the characteristics of your Live environment's network configuration, like the name of the network interface, static IP adress and such. If you are on a network where a DHCP server configures your clients, then the nic parameter will not be needed as Slackware Live Edition will figure out all the details by itself.

Syntax of these two parameters:

nfsroot=ip.ad.dr.ess:/path/to/liveslak
nic=<driver>:<interface>:<dhcp|static>[:ipaddr:netmask[:gateway]]

Example uses of the two network boot parameters:

nfsroot=192.168.1.1:/tftproot/slackware-live
nic=auto:eth0:dhcp
nic=auto:eth0:static:10.0.0.21:24:
nic=:eth1:static:192.168.1.6:255.255.255.248:192.168.1.1

After you have setup your PXE environment (DHCP, TFTP and NFS servers) properly using the above information, boot one of your PXE-capable computers, interrupt the boot and select “network boot” and type or select the appropriate label (in the above example, that would be liveslak). You will see the kernel and initrd being downloaded and booted, and then the Live OS will start just as if it was running from a local medium.

If your DHCP server takes too long in acknowledging the client's request, the DHCP client times out and the boot of your Live OS will fail because the NFS-mounted Live filesystem will not become available. In that case you can try increasing the wait time before the DHCP client decides that it is not going to get an IP address from the server. Add the boot parameter dhcpwait=30 (example value) where the number 30 is the number of seconds the DHCP client should wait for a server response. You should of course pick a value that is sufficiently large for your network setup.
The default DHCP wait time of the Live OS is 20 seconds.

Persistence is not supported in this configuration; currently the overlayfs does not support NFS as a writable layer in the live filesystem.

PXE server

Slackware Live Edition is not just capable of booting as a PXE client; it is able to run a PXE server all by itself.

What does that mean?

A practical example would be that your bring a USB stick with Slackware Live Edition to a LAN party, use it to boot one of the computers and then all the other computers in the (wired) LAN will be able to do a network boot and run the same Slackware Live Edition a couple of minutes later. The computer with the USB stick will act as the PXE server and all the other computers will be its PXE clients, reading the Slackware data off that USB stick. The clients will inherit the server's timezone,language and keyboard settings by default but those can be overridden. The PXE clients will not have 'persistence'. If the server has access to the Internet, the clients will have access as well.

How to start the PXE server?

When you boot the Live OS you can then start a script “pxeserver” from the console in runlevel 3 or from an X terminal in runlevel 4. The script will gather all required information and if it is unable to figure something out by itself it will ask you. If it is unable to figure out the wired network interface that it should use, you can add the name of your interface (for instance, eth1) as a single parameter to the script when you start it.

The PXE server uses dnsmasq to offer DNS to the PXE clients. The dnsmasq program will enable its internal DHCP server capabilities if your LAN does not have its own DHCP server. Dnsmasq will also start a TFTP server which the PXE clients will connect to in order to retrieve the boot files (kernel and initrd). The pxeserver script also starts a NFS server which will be used by the Live initrd to obtain the squashfs modules and boot the Live OS. If your PXE server has multiple network interfaces, for instance a wireless interface which is connected to the outside world and a wired interface connected to another computer which will become a PXE client (or indeed connected to a switch with a whole bunch of prospective PXE clients behind that) then the PXE server will setup packet forwarding so that the PXE clients will be able to access the outside world through the wired interface and out to that other interface.

If you have multiple network interfaces, it is important to know that dnsmasq will only bind to the interface where you want PXE clients to connect to. In a multi-NIC situation where a second NIC is connected to the outside world (your local network), this means that the DHCP/DNS server started by dnsmasq will not interfere with an existing DHCP server in your local network.

Once the PXE server is running, the script will show you the dnsmasq's activity log in a dialog window so that you can monitor the PXE clients that are connecting.

If your PXE server computer has sufficient RAM, it is strongly advised to boot the server's Live OS from the USB stick with the 'toram' parameter. When more than a few PXE clients start reading OS files from the PXE server, the USB stick will become a bottleneck. Running the server OS from RAM will get rid of that bottleneck.

Boot parameters explained

Press <F2> in the syslinux boot screen for an overview of (most) boot parameters. When booting Grub, select the menu “Help on boot parameters” instead. The Grub help is ugly, I know, but Grub does not offer anything better than this.

The following parameters are recognized by Slackware Live Edition. To boot with default values just press ENTER.

Desktop Environment

0|1|2|3|4|5|6|S|s|single ⇒

Select a runlevel to start with.
The default is 4 for graphical login.

kbd=fr xkb=ch,fr ⇒

Example of custom X keyboard layout.
The parameter xkb can be set to "XkbLayout,XkbVariant,XkbOptions".
The boot menus will configure some of these for you but you can
of course always modify the values.
Note that the optional XkbOptions can be several comma-separated values.
The XkbLayout and XkbVariant values must not contain commas.
You can set just the XkbVariant by adding something like "kbd=ch xkb=,fr"

livepw=“somestring” ⇒

Change the password for user "live".
The password is passed as a cleartext string.

locale=nl_NL kbd=nl tz=Europe/Amsterdam ⇒

Example of language,
keyboard and/or timezone customization.

rootpw=“somestring” ⇒

Change the password for user "root".
The password is passed as a cleartext string.

Custom software

load=nvidia ⇒

Load and configure Nvidia drivers if available
in the ISO (not for SLACKWARE and XFCE variants by default).

load=mod1[,mod2[…]] ⇒

Load one or more squashfs modules
from the directory "/liveslak/optional".
By default none of these "optional" modules are loaded on boot.

noload=mod1[,mod2[…]] ⇒

Prevent loading of one or more
squashfs modules from the directory "/liveslak/addons".
By default all these "addon" modules are loaded on boot.

Network boot

dhcpwait=<numseconds> ⇒

Maximum wait time for the DHCP client to configure a network interface
(default: 20 seconds).

nfsroot=ip.ad.dr.ess:/path/to/liveslak ⇒

defines the IP address
of the NFS server, and the path to the extracted content
of Slackware Live Edition.

nic=<driver>:<interface>:<dhcp|static>[:ipaddr:netmask[:gateway]] ⇒

network device customization, usually this parameter is
not needed when your network runs a DHCP server.
Specify a driver if UDEV does not detect the device. Specify the
interface if Slackware Live can not figure it out. If you specify
'static' you need to also specify ipaddr and netmask. The gateway
is optional but needed to access the internet for instance.

Hardware related

localhd ⇒

initialize RAID/LVM on local hard drives.

tweaks=tweak1[,tweak2,[,…]] ⇒

Implemented tweaks:
nga - no glamor 2D acceleration, avoids error "EGL_MESA_drm_image required".
nsh - no 'new style' sub-pixel hinting in freetype.
tpb - enable TrackPoint scrolling while holding down middle mouse button.
syn - start the syndaemon for better support of Synaptics touchpads.
ssh - start the SSH server (disabled by default).

nomodeset ⇒

Boot without kernel mode setting, needed with
some machines.

rootdelay=10 ⇒

Add 10 second delay to give the kernel more
time to initialize USB. Try this if booting fails. Default is 5.

swap ⇒

Allow the Live OS to activate all swap partitions on
the local hardware. By default, no swap is touched.

Media tweaks

cfg=[skip|write] ⇒

Specify 'skip' to skip disk-based configuration file containing
OS parameters; or specify 'write' to write current OS parameters
to disk.

domain=your_custom_domain ⇒

Specify a custom domain name.  Defaults to 'example.net'.

hostname=your_custom_hostname[,qualifier] ⇒

Specify a custom hostname.  A qualifier 'fixed' can be appended
to prohibit hostname modification in  case of network boot.

livemedia=/dev/sdX ⇒

Tell the init script which partition
contains the Slackware Live OS you want to boot. This can
become necessary if you have another copy of Slackware Live
installed in another partition.  Also accepted: UUID or LABEL.

livemedia=/dev/sdX:/path/to/live.iso ⇒

Use this if you want to
load the live OS from an ISO file on a local harddisk partition.

livemedia=scandev:/path/to/live.iso ⇒

Use this if liveslak should
scan all device partitions to locate the ISO file.

livemain=directoryname ⇒

Use this if you copied the content
of the ISO to a different directory than "liveslak".

luksvol=file1[:/mountpoint1][,file1[:/mountpoint2],…] ⇒

Mount LUKS container "file1" at mount point "/mountpoint1"
in the Live fs.  Multiple files must be separated by a comma.
Specify "luksvol=" to *prevent* mounting any LUKS container,
including an encrypted /home .

nop ⇒

No persistence, i.e. boot the virgin installation in
case your "persistence" directory got corrupted.
If you want to ignore any persistent data during boot,
including LUKS data, specify "nop luksvol=" .

nop=wipe ⇒

Wipe all data from persistence directory or container.
Useful in cases where your persistent data got corrupted.

persistence=name ⇒

Use this if you are using a different
directory/file than "persistence" for storing persistent data.

toram ⇒

Copy the OS from the media to to RAM before running it.
You can remove the boot media after booting.

toram=all ⇒

Prevent writes to disk since we are supposed to run from RAM;
equivalent to parameter "toram".

toram=core ⇒ Load Console OS modules into RAM. Console-only Slackware

loads fast, contains 'setup2hd' and frees up your USB drive so you can
overwrite it with a Persistent Live OS.

toram=os ⇒

Load OS modules into RAM, but write persistent data to USB.

Troubleshooting

blacklist=mod1[,mod2[…]] ⇒

Add one or more kernel modules
to the kernel blacklist to prevent them from loading, in case
they cause issues during operation.

debug ⇒

During init, pause at strategic locations while
assembling the overlay filesystem and show mount information.

debug=<number> ⇒

'2' enables verbose script execution;
'4' dumps you into a debug shell right before the switch_root.

rescue ⇒

After initialization, you will be dropped in a
rescue shell to perform lowlevel maintenance.

Layout of the ISO

The Live ISO contains three directories in the root of its filesystem:

EFI/

boot/

liveslak/

The USB variant with persistence may have an additional directory in the root:

persistence/

The EFI/ directory contains the Grub configuration used when you boot the Live OS on a computer with UEFI.

The boot/ directory contains the syslinux configuration used when the Live OS boots on a computer with a BIOS. This directory also contains the kernel and initrd files which are used to actually boot the OS.

The liveslak/ directory contains all the squashfs modules which are used to assemble the filesystem of the Live OS, as well as files that are copied directly into the root of the Live filesystem. It contains four subdirectories:

addons/ - modules which are stored in this directory will always be added to the Live filesystem unless you prevent that with a “noload=” boot parameter;

optional/ - modules in this directory will not be added to the filesystem of the Live OS unless you force this with a “load=” boot parameter;

system/ - this directory contains all the modules which were created by the “make_slackware_live.sh” script. All these modules are numbered and the Live init script will use that to re-assemble the Live filesystem in the exact same order as they were created initially.

rootcopy/ - this directory is empty by default. Anything you (the user of the ISO) add to this directory will be copied verbatim into the filesystem by the init script when the Live OS boots. You can use this feature for instance if you do not want to create a separate squashfs module file for your application configuration files.

Developer Documentation

Scripts and tools

make_slackware_live.sh

The first script:

The script “make_slackware_live.sh” creates an ISO file as its output which contains the Live OS. Thanks to Linux kernel 4.x and the squashfs-tools package in Slackware, the process of creating a Slackware Live ISO requires no (re)compilation of Slackware content or installing 3rd party packages.

The script's inner workings can be subdivided into several distinct stages. For the full Slackware ISO the process stages are as follows:

Install the Slackware packages

Stage one:

The script reads a package sequence for the Live variant and installs all packages in this sequence to subdirectories of a temporary directory tree.

Every Slackware package set (a, ap, d, … , y) or package list (min, noxbase, x_base, xapbase, …) is installed into a separate 'root' directory.

Each of those root directories is “squashed” (using squashfs) into a separate squashfs module. Such a module is a single archive file containing the compressed directory structure of the installed packages.

These module files are subsequently loop-mounted and then combined together into a single read-only directory structure using an “overlay mount”. The overlayfs is relatively new; earlier Live distros have been using aufs and unionfs to achieve similar functionality, but those were not part of any stock kernel source and therefore custom kernels had to be compiled for such a Live distro.

This “overlay assembly” is the filesystem that will be booted as the filesystem of the Live OS.

On 'top' of this series of overlayed read-only filesystems, a writable filesystem is added by the “make_slackware_live.sh” script. This writable filesystem is used to store all the customizations to our distro that we want to be applied when Slackware Live boots up. See the next section for more detail.

Note that when you boot the Live OS later on, another writable overlay will be used to capture any write operations performed by the OS. You will perceive the Live OS as a real OS that can write and remove files. That writable filesystem will be:

a RAM-based filesystem when the Live OS runs without persistence.

a directory or a loop-mounted container file on your USB stick, if you use a USB stick with persistence.

Configure the Live filesystem with useful out-of-the-box defaults

Stage two:

Some filesystem initialization is done when the overlay has been assembled:

'root' and 'live' user accounts are created,

an initial environment for the accounts is configured,

the desktop environment is pre-configured for first use,

the liveslak scripts “makemod”, “iso2usb.sh” and “upslak.sh” are copied to “/usr/local/sbin/” in the ISO for your convenience,

the “setup2hd” script and the Slackware installer files are copied to “/usr/local/sbin” and “/usr/share/liveslak” respectively.

slackpkg is configured,

a locate database is created,

etc…

All these modifications are written to the writable filesystem that was created in the previous section. This filesystem will also be stored on the ISO as a squashfs module and when the Live OS boots, it will be mounted read-only just like all the other modules. Its name will be “0099-slackware_zzzconf-current-x86_64.sxz” or more generically “0099-slackware_zzzconf-${SLACKVERSION}-${ARCH}.sxz”

Configure the boot stage of the Live OS

Stage three:

an initrd is generated, containing a modified “init” script (other Live distros call it a “linuxrc script”) which re-assembles the overlay filesystem on boot and configures the Live OS according to the boot parameters (language, keyboard, timezone, runlevel, …)

a slackware generic kernel plus the above initrd are added to a syslinux (for BIOS computers) and a grub2 (for UEFI computers) configuration.

Create the ISO image

Stage four:

a bootable ISO file is created using mkisofs.

the “isohybrid” command is run on the ISO so that you can “dd” or “cp” the ISO to a USB stick and thus create a bootable USB media.

Done! You can find the ISO file and its MD5 checksum in the /tmp directory.

iso2usb.sh

The second script:

The “iso2usb.sh” script's runtime usage is explained in detail in a previous paragraph “Transfering ISO content to USB stick”.

This section explains how the script modifies the ISO for the enhanced USB functionality.

Layout of the USB stick

The “iso2usb.sh” script wipes and re-partitions the USB stick unless the “-r” or refresh parameter is used. See section “Transfering ISO content to USB stick” for an explanation of all commandline switches.
The script will create 3 partitions:

First partition: a small (1 MB in size) FAT partition which is not used for Slackware Live Edition. It can be used by an alternative bootloader if needed. You can also store your LUKS keyfile on it to unlock a LUKS-encrypted Slackware Linux computer (see the README_CRYPT.TXT[144] file on your Slackware DVD for more information on LUKS keyfiles).

Second partition: a 100 MB VFAT partition containing the kernel, initrd and all the other stuff required by syslinux and grub2 to boot Slackware Live Edition.

Third partition: a Linux partition taking up all of the remaining space. It contains the actual liveslak modules, the persistent live storage and optionally your encrypted homedirectory. You can use the remainder of this Linux ext4 filesystem's free space to store anything you like.

Note that this script is the only supported method of transfering the liveslak ISO content to a USB stick and make that USB stick into a persistent live OS. Several 3rd party tools (like multibootusb, rufus, unetbootin) that claim to be able to mix several Live OS'es on a single USB stick and make them all work in a multi-boot setup, are not currently supporting liveslak.

Mounting a filesystem in an encrypted container

The script will create a file of requested size in the root of the Live partition using the 'dd' command. The 'cryptsetup luksCreate' command will initialize the encryption, which causes the script to prompt you with “are you sure, type uppercase YES” after which an encryption passphrase must be entered three times (two for intializing, and one for opening the container). If the container is used for an encrypted /home, its filename will be “slhome.img”. The script will copy the existing content of the ISO's /home into the container's filesystem which will later be mounted on top of the ISO's /home (thereby masking the existing /home). The Live OS is instructed to decrypt the container and mount the filesystem. This is done by editing the file “/luksdev” in the initrd and adding a line: “/slhome.img”. The iso2usb.sh script only supports creating and configuring an encrypted /home, but you can create additional encrypted containers yourself and mount them on other locations in the ISO's filesystem. In order for this to work, you need to edit the “/luksdev” file and add a line “/your/container.img:/your/mountpoint” i.e. container path and the target mount directory on a single line, separated by a colon. The Live init script will create the mount point if it is missing.

Using a container file for storing persistence data

A second type of encrypted container exists, which can be used for storing your persistence data. The Live init script will check if it needs to enable persistence in this order:

is the USB filesystem writable? If so,

does a directory /persistence exist? If so, use that; if not,

does a file /persistence.img exist? If so, mount the file and if it is an encrypted container, ask for a passphrase during boot.

Adding USB wait time

For slow USB media, the default 5 seconds wait time during boot are sometimes insufficient to allow the kernel to detect the partitions on your USB device. The script can optionally add more wait time. It does this by editing the file “wait-for-root” in the initrd and updating the value which is stored there (by default “5” is written there by the “make_slackware_live.sh” script).

makemod

The third script:

The “makemod” script allows you to create a Slackware Live module easily, with a Slackware package or a directory tree as its input parameter.

Usage:

# makemod <packagename|directory> modulename.sxz

The first parameter is either the full path to a Slackware package, or else a directory.

If a packagename is supplied as first parameter, it will be installed into a temporary directory using Slackware's “installpkg”. The content of the temporary directory will be squashed into a module by the “squashfs” program.

If a directoryname is supplied, its content will be squashed into a module by the “squashfs” program..

The second parameter is the full pathname of the output module which will be created.

You can copy the module you just created (minding the filename conventions for a Slackware Live module, see paragraph “Slackware Live module format”) to either the optional/ or to the addon/ directory of your Live OS. If you copy it to the optional/ or addon/ directory of the liveslak sources then “make_slackware_live.sh” will use the module when creating the ISO image.

setup2hd

The fourth script:

The “setup2hd” script is a modified Slackware installer, so you will be comfortable with the process. The 'SOURCE' section offers two types of choices: a regular Slackware network installation using a NFS, HTTP, FTP or Samba server, as well as a choice of installing the Live OS which you are running. The script knows where to find the squashfs modules, so the “Install Live OS” selection will not prompt further inputs.

The Slackware network installation is identical to that of the official Slackware installation medium.

If you chose to install the Live OS, then after you select the target partition(s), every active module of the Live OS variant (SLACKWARE, KTOWN, MATE, …) is extracted to the hard drive. After extraction has completed, the script summarizes how many modules have been extracted. It will also show an example command to extract any remaining inactive or disabled modules manually. The final step in the installation is again the stock Slackware installer which kicks off the Slackware configuration scripts.

pxeserver

The fifth script:

The pxeserver script works as follows:

It requires a wired network; wireless PXE boot is impossible.

The pxeserver script tries to find a wired interface; you can pass an explicit interfacename as parameter to the script (optional).

If multiple wired interfaces are detected, a dialog asks the user to select the right one.

A check is done for DHCP configuration of this wired interface;

If DHCP configuration is found then pxeserver will not start its own DHCP server and instead will rely on your LAN's DHCP server.

If no DHCP config is found, the script will ask permission to start its own internal DHCP server. Additionally the user will be prompted to configure an IP address for the network interface and IP range properties for the internal DHCP server.

The script will then start the PXE server, comprising of:

dnsmasq providing DNS, DHCP and BOOTP;

NFS and RPC daemons;

The script will detect if you have an outside network connection on another interface and will enable IP forwarding if needed, so that the PXE clients will also have network access.

The Live OS booted via pxelinux is configured with additional boot parameters:

nfsroot=<server_ip_address>:/mnt/livemedia
luksvol=
nop
hostname=<distroname>
tz=<server_timezone>
locale=<server_locale>
kbd=<server_kbd_layout>

Which shows that the configuration of the Live OS where the PXE server runs is largely determining the configuration of the PXE clients.

Note that when networkbooting, the hostname of the Live OS will be suffixed with the machine's MAC address to make the hostname of every network-booted computer unique.

upslak.sh

The sixth script:

The “upslak.sh” script's runtime usage is explained in detail in a previous paragraph “Updating the kernel (and more) on a USB stick”.

This section explains how the script modifies the content of the Live USB stick.

When the script is started, it will do some sanity checks and then extracts the content of the initrd image. Some characteristics of the initrd will be recorded:

existence of previously backed-up kernel modules is checked,

template variables and their values are obtained from the init sctript,

the current USB wait time is checked.

Depending on the parameters passed to the script, it will then perform one or more of the following actions:

Update the kernel and moules

You can provide a new kernel and its modules in two ways. The '-k' option accepts a kernel image file or else a Slackware package contaning a kernel. The '-m' option accepts a directory tree of modules below “/lib/modules/, or else a Slackware package containing kernel modules. If there is sufficient space on the Linux and EFI partitions, the script will make a backup of the current kernel and modules by renaming the kernel and the module directory with a ”.prev“ suffix. Sufficient space means that at least 10 MB of free space must remain on the partition(s) after making the backup and installing the new kernel plus modules. If space is an issue, you can skip making a backup by providing the '-b' parameter to the script (a possibly unsafe choice).

Restore backed-up kernel and modules

If a backup was made of kernel and modules, the upslak.sh script is able to restore these using the '-r' option, thereby removing the replacements. This comes in handy when the replacement kernel turns out to be non-functional.

Add network support modules

This should normally not be needed. By default, all liveslak ISO images have network support built-in. But customized Live ISO images may be shipped without network support initially. If you want your Live OS to be PXE-bootable you need network support in the kernel. Use the '-n' option.

Increase (or decrease) USB wait time

Similar to the functionality of the “iso2usb.sh” script, the “upslak.sh” script is able to alter the USB wait time at boot using the '-w' option.

Replace the liveslak init script

The init script inside the initrd image is the core of liveslak. The init script prepares the Live filesystem and configures several run-time OS parameters. If you have made modifications to this init script you can easily replace the default init script with your own script using the '-i' option. The “upslak.sh” script is smart enough to recognize a iveslak template as input. The ”.tpl“ extension of some liveslak files means that these are templates. They are not usable as-is, because they contain placeholder strings like ”@VERSION@“ or ”@DISTRO@“ that first need to be replaced with real values. The “upslak.sh” script will take care of these substitutions.

Wrap persistence data into a new squashfs module

Persistence data will accumulate over time on the USB stick. That is perfectly OK, and you can wipe it on boot if that is needed. But sometimes you want to capture the packages you installed into the persistent storage, and create a new squashfs module out of them. The “upslak.sh” script is able to move your persistence data into a new squashfs module using the '-p' option. The new module will be created in the ”/liveslak/addons/“ directory so that it will be loaded into the Live OS everytime your USB Live boots up. After creating the new module, the persistence store will be re-initialized (i.e. its content will be erased on the next boot). The new module's name is time-stamped (/liveslak/addons/0099-slackware_customchanges-yyyymmddHHMMSS.sxz where yyyymmddHHMMSS is the timestamp) so that this action can be repeated as many times as you want.

Creating a Live ISO from scratch

Creating an ISO image of Slackware Live Edition requires that you are running Slackware 14.2 or newer (64-bit). Older releases of Slackware have a kernel that is too old to support liveslak's use of the “overlayfs” kernel functionality, and are lacking the squashfs tools. Likewise, a Slackware Live Edition can only be created for Slackware 14.2 or newer.

You also need the “liveslak” script collection which can be downloaded from any of the links at the bottom of this page.

Liveslak is a directory tree containing scripts, bitmaps and configuration files. Only 6 scripts are meant to be run by you, the user. These scripts (“make_slackware_live.sh”, “iso2usb.sh”, “makemod”, “setup2hd”, “pxeserver” and “upslak.sh”) are explained in more detail in the section ”Scripts and tools“ higher up. When creating a Live ISO from scratch, you only need to run the “make_slackware_live.sh” script.

Liveslak sources layout

The toplevel 'liveslak' directory contains the following subdirectories:

EFI/ - contains the skeleton for boot support on UEFI computers. Some of the UEFI configuration files are dynamically generated by the “make_slackware_live.sh” script.

README.txt - this documentation.

addons/ - squashfs modules placed in this directory will be loaded into the Live filesystem when the OS boots.

contrib/ - contributed scripts that are not used directly for the creation and usage of a Live ISO.

graphics/ - squashfs modules for proprietary GPU support (Nvidia) can be placed here. The module(s) will be copied to addons/ by the “make_slackware_live.sh” script for any Live Desktop Environment (except pure Slackware) that might profit from proprietary driver support.

local64/ , local/ - these directories can contain Slackware packages considered 'local' i.e. not belonging to any repository. The package(s) will be converted to squashfs module(s) by the “make_slackware_live.sh” script, copied to the “addons/” subdirectory in the ISO and loaded into the Live filesystem when the OS boots.

media/ - scripts and images that are specific to a Live variant.

optional/ - squashfs modules placed in this directory will not automatically be loaded into the Live filesystem when the OS boots. You need to pass “load=[mod]” boot parameter to load any of these.

patches/ - patches for Slackware scripts that need modifications to run inside a Live OS.

pkglists/ - definition files of 3rd party repositories (*.conf) and the package lists to be used from those repositories (*.lst) must be placed in this directory.

setup2hd/ - script templates used by the setup2hd disk installer.

skel/ - contains compressed tarballs (whose filenames must match wildcard “skel*.txz”). These files will be extracted to the ”/etc/skel“ directory in the Live filesystem.

syslinux/ - contains the skeleton for boot support on BIOS computers. Some of its files are dynamically generated by the “make_slackware_live.sh” script.

xdm/ - graphical Slackware theme for the XDM graphical session manager for those ISO variants which do not ship with GDM, KDM or SDDM.

The toplevel 'liveslak' directory contains the following files:

blueSW-128px.png , blueSW-64px.png - these are bitmaps of the Slackware “Blue S” logo, used for the “live” user icon and in the XDM theme.

grub.tpl - the template file which is used to generate the grub menu for UEFI boot.

iso2usb.sh - this script creates a bootable USB version wih persistence from a Slackware Live ISO.

languages - this file contains the input configuration for language support. One language per line contains the following fields: “code:name:kbd:tz:locale:xkb”. Example: “nl:nederlands:nl:Europe/Amsterdam:nl_NL.utf8:”

code = 2-letter language code

name = descriptive name of the language

kbd = name of the console keyboard mapping for this language

tz = timezone for the language's native country

locale = the locale used in the country

xkb = optional custom X keyboard variant for the language

liveinit.tpl - this is the template for the “init” script which is copied into the initrd image for the Live OS. Together with the Slackware generic kernel, the initrd is what boots the computer. The “init” script assembles the Live filesystem from its squashfs modules.

make_slackware_live.conf - the configuration file for the “make_slackware_live.sh” script. You can define defaults for many script parameters here so that you do not have to edit the script itself.

make_slackware_live.sh - the script that generates the Live ISO.

makemod - this script creates a squashfs module out of a Slackware package (or out of a directory tree).

menu.tpl - template which is used to generate the syslinux boot menu for BIOS computers.

pxeserver.tpl - template to generate the script that starts a PXE server allowing other computers to boot Slackware Live over the network.

setup2hd.tpl - template to generate the script you use to install your Slackware Live to a harddisk.

setup2hd.local.tpl - here a developer of a custom Live OS can override the default post-installation routine by (re-)defining the function “live_post_install()” in the setup2hd script.

upslak.sh - a script which allows you to tweak the content of a USB Live stick.

Generate the ISO

The liveslak's “make_slackware_live.sh” script accepts optional parameters to tweak the process of Live OS generation:

The script's parameters are:
-h                 This help.
-a arch            Machine architecture (default: x86_64).
Use i586 for a 32bit ISO, x86_64 for 64bit.
-c comp            Squashfs compression (default: xz).
Can be any of 'gzip lzma lzo xz zstd'.
-d desktoptype     SLACKWARE (full Slack), LEAN (basic Plasma5/XFCE),
DAW (Digital Audio Workstation), XFCE (basic XFCE,
stripped), KTOWN (ktown Plasma5 replacement), MATE
(Gnome2 fork replaces KDE), CINNAMON (fork of Gnome3 Shell
replaces KDE), DLACK (Gnome3 replaces KDE).
-e                 Use ISO boot-load-size of 32 for computers
where the ISO won't boot otherwise (default: 4).
-f                 Forced re-generation of all squashfs modules,
custom configurations and new initrd.img.
-l <localization>  Enable a different default localization
(script-default is 'en').
-m pkglst[,pkglst] Add modules defined by pkglists/<pkglst>,...
-r series[,series] Refresh only one or a few package series.
-s slackrepo_dir   Directory containing Slackware repository.
-t <none|doc|mandoc|bloat>
Trim the ISO (remove man and/or doc and/or bloat).
-v                 Show debug/error output.
-z version         Define your Slackware version (default: current).
-C                 Add RAM-based Console OS to boot menu.
-G                 Generate ISO file from existing directory tree
-H <hostname>      Hostname of the Live OS (default: darkstar).
-M                 Add multilib (x86_64 only).
-O <outfile>       Custom filename for the ISO.
-R <runlevel>      Runlevel to boot into (default: 4).
-X                 Use xorriso instead of mkisofs/isohybrid.

The script uses package repositories to create a Live ISO. The packages will be installed into a temporary directory.

In order to create a Live ISO for any of these variants, the package repositories that are required must be available as a local directory (this can be a network-mounted directory). If you have not mirrored them locally, then all packages of the Slackware repository as well as those you require from a 3rd party repository will be downloaded from a remote server as long as a rsync URL for the repository is configured in ./pkglists/*.conf.

When all pre-reqs are met, you issue a single command to generate the ISO. The following example will create a pure Slackware Live Edition:

# ./make_slackware_live.sh

Another example which creates a MATE variant, configuring runlevel '3' as default and specifying a custom path for the Slackware package repository root (note that the script will look for a subdirectory “slackware64-current” below this directory if you are generating this ISO for slackware64-current):

# ./make_slackware_live.sh -d MATE -R 3 -s ~ftp/pub/Slackware

If you want to know what package sets are included in any of these Desktop Environments, run the following command:

# grep ^SEQ_ make_slackware_live.sh

for MATE, you will find:

SEQ_MSB="tagfile:a,ap,d,e,f,k,l,n,t,tcl,x,xap,xfce,y pkglist:slackextra,mate local:slackpkg+"

Which means that most of the Slackware package series (excepting kde and kdei) will be installed from their tagfiles, and on top of that two package lists are installed from the pkglists/ subdirectory: slackextra and mate. Lastly, “slackpkg+” will be installed from a local directory.

Using the Customization Features of the Live OS

Master configuration file

You can create your own custom Live OS by changing its characteristics in the configuration file ”make_slackware_live.conf“. Among the things you can change are:

The name of the Desktop variant (the script itself knows ”SLACKWARE“, ”KTOWN“, ”DAW“, ”XFCE“, ”MATE“, ”CINNAMON“, ”STUDIOWARE“ and ”DLACK“),

The list(s) of packages used for your custom distribution,

The full name of the user (by default that is ”Slackware Live User“),

The name of the useraccount (by default that is ”live“),

The name of the distribution (by default that is ”slackware“),

And finally you can define a function ”custom_config()“ where you can add all your costom post-installation steps that are not covered in the ”make_slackware_live.sh“ script itself.

This is the section in make_slackware_live.conf which deals with these customizations. Two variables are required if you want to create your own custom Live OS: ”LIVEDE“ and ”SEQ_CUSTOM“, the rest is optional (but useful nevertheless):

# REQUIRED:
# Define a new name for your own variant of Slackware Live Edition:
#LIVEDE="CINELERRA"
# REQUIRED:
# Define your own custom package sequence for a custom Live ISO.
# In this example you would need to create two files "pkglists/cinelerra.conf"
# and "pkglists/cinelerra.lst" defining the package location and package list
# respectively):
#SEQ_CUSTOM="min,noxbase,x_base,xapbase,xfcebase,cinelerra"
# OPTIONAL:
# Use something else than the name "min",
# for the package list containing the generic kernel:
#MINLIST="min"
# OPTIONAL:
# Your custom distro name (will reflect in boot screen & filenames):
#DISTRO="cinelerra"
#OPTIONAL:
# Name of the 'live' user account in the Live image:
#LIVEUID="live"
# OPTIONAL:
# Marker used for finding the Slackware Live files:
#MARKER="CINELERRA"
# OPTIONAL:
# The filesystem label of the ISO:
#MEDIALABEL="CINELERRA"
# OPTIONAL:
# The ISO main directory:
#LIVEMAIN="cinelerra"
# OPTIONAL:
# Add your own Live OS customizations to the function custom_config() :
#custom_config() {
#  # Add your own stuff here which is not covered in the main script:
#}

Custom background images

The Plasma5 based Live variants allow customization of the background image used for the login greeter, the desktop wallpaper and the lock screen. The image you want to use for this purpose, must have a 16:9 aspect ratio and its dimensions should at least be 1920×1080 pixels. You must store the custom image inside the liveslak source tree: in the subdirectory ./media/<variant>/bg/ where ”<variant>“ is the lower-case name of the Live variant (variant 'KTOWN' equals directory 'ktown', 'DAW' becomes 'daw', etc).

The “make_slackware_live.sh” script will look there for a file named either “background.jpg” or “background.png”. If you want, that file can be a symlink to the actual bitmap file. The image will be converted into a set of wallpaper images of different aspect ratios and sizes. The different aspect ratios like 16:9, 16:10 and 4:3 will be achieved by cropping the images if needed, to avoid distortion. The image set will be installed as a Plasma5 wallpaper called “Slackware Live”, and configured to be the default Live OS background.

Internals of Slackware Live Edition

Overlayfs, squashfs

Overlayfs and squashfs are doing the real magic here. As explained earlier, the squashfs program takes a directory structure and complresses this into a single archive file. It does this in a special way, more like how mkisofs does this than how tar creates an archive. The resulting module can be loop-mounted to access the filesystem inside.

When you have several of these loop-mounted squashfs modules, each containing a fraction of the filesystem of the OS, you are going to stack these fractional filesystems on top of each other and thus assemble the complete filesystem (much like Tintin did in The Secret of the Unicorn when he overlayed several translucent pieces of parchment and looked through them to see the complete picture). Overlayfs is the driver that performs this 'overlaying' of the fractional filesystems. Overlayfs can work with many read-only fractional filesystems and exactly one writable filesystem. The writable filesystem is what gives your Live OS the appearance that it is writing to a hard drive - the writes to the overlay filesystem are however done to RAM (in that case you have a real Live OS) or to a 'persistence' filesystem which is stored somewhere on a writable medium (a USB stick with 'persistence' is an example of this case).

The initrd and its init script

The initrd used for the Slackware Live Edition is a standard Slackware initrd created with Slackware's “mkinitrd” command, with just one modification: its “init” script. The correct name for an 'initrd' nowadays is 'initramfs' by the way, short for “initial ram filesystem” because it contains the initial file system that gets loaded into kernel memory when your computer boots. The init script of an initrd is what prepares the root filesystem even before the actual OS starts. When the OS does start, it finds a root filesystem all ready to use. An example case is of course the LUKS-encrypted root filesystem. Another is a root filesystem stored on logical volumes (LVM). Some advance work is required to make the root filesystem accessible and start the real “init” program of the OS (PID 1). Just like the previous examples, you need a script in an initrd to assemble the root filesystem of a Live OS. Slackware's initrd does not support a Live environment, so the stock init script was expanded for use in liveslak.

What does the 'liveslak' init script do?

It parses any boot parameters you entered (or were passed by syslinux/grub) and tries to make sense of them.

It does some initialization just like the Slackware init (start udev, wait a bit for USB media to settle, load kernel modules, load custom keyboard mapping, initialize RAID etc) before it gets to the Slackware Live section.

A RAM based filesystem is created which forms the base of all the rest.

Using tools like 'blkid' and 'mount', the init script tries to locate the Live media. It uses blkid to search for the Live media's default filesystem label. If that fails (because you changed the label) it will use blkid to find all filesystem partitions available and mount them mount these one by one until the Live partition is found.

With the Live media located, the next step is to loop-mount the squashfs modules one by one and add them to the overlay filesystem in the correct order. If you specified the 'toram' boot parameter, then a module will first be copied into RAM before loop-mounting it. This allows you to remove the boot media after booting since the complete OS will run from RAM.

Modules will be loaded in order:

first the system modules (core modules in the system/ subdirectory)

then the addon modules (in the addon/ directory). If you do not want an addon to be loaded, you can specify “noload=modulename” on the syslinux/grub boot commandline

last, the optional modules (in the optional/ subdirectory). By default an optional module is not loaded unless you force it by adding “load=modulename” to the boot commandline.

Next, persistence will be configured if the Live OS was booted from a writable media such as a USB stick. The init script will first look for a directory in the root of the Live partition of the USB stick called “persistence” and use that to store persistent changes to the Live filesystem. If that directory does not exist but a file “persistence.img” is found, then that file will be loop-mounted and persistent changes to the Live filesystem will be written to this container file. The “persistence.img” container can be LUKS-encrypted in which case the init script will ask you for a passphrase to unlock it before mounting.

The overlay filesystem is then finalized by adding the writable toplevel directory structure (either persistent or volatile).

The complete RAM filesystem which underpins the overlay is made available to the user of the Live OS as ”/mnt/live“

The filesystem of the Live media is made available to the user of the Live OS as ”/mnt/livemedia“. If the media is a USB stick then you will have write access to ”/mnt/livemedia“.

With the root filesystem assembled, the Live OS is configured before it actually boots:

if you specified “swap” on the boot commandline, any available swap partition will be added to ”/etc/fstab“ in the Live OS.

if you specified a custom keyboard layout for the console (and optionally another for X) by using the “kbd” and “xkb” boot parameters then these will be confifured in ”/etc/rc.d/rc.keymap“ and ”/etc/X11/xorg.conf.d/30-keyboard.conf“ in the Live OS.

Same for any custom locale which was specified with the “locale” parameter, this will get added to ”/etc/profile.d/lang.sh“.

If timezone and hardware clock were specified in the “tz” parameter, these will be configured in ”/etc/localtime“ and ”/etc/hardwareclock“.

The boot parameters “livepw” and “rootpw” allow you to specify custom passwords for the 'live' and 'root' users; the defaults for these two are simply 'live' and 'root'. This is achieved by running the “chpasswd” command in the chrooted overlay so that a plain text password can be given as input.

The “hostname” boot parameter can be used to change the Live OS' hostname from its default “darkstar”. Configuration is written to ”/etc/HOSTNAME“ and ”/etc/NetworkManager/NetworkManager.conf“.

If the “blacklist” boot parameter was specified, then the kernel modules mentioned as argument(s) will be added to a modprobe blacklist file ”/etc/modprobe.d/BLACKLIST-live.conf“.

The ”/var/lib/alsa/asound.state“ file in the Live OS is removed to allow correct sound configuration on any computer where the Live media is booted.

The complete content of the /liveslak/rootcopy directory on the Live partition (may be empty) is copied to the filesystem root of the Live OS, potentially 'overwriting' files in the Live OS. Use the /liveslak/rootcopy to add customization to your Live OS when you run it off a USB stick.

And lastly but very importantly, any LUKS-encrypted container files are unlocked (init will ask you for the passphrase) and the filesystem(s) contained therein will be mounted in the Live OS. Currently, a LUKS-encrypted /home is supported. The files ”/etc/fstab“ and ”/etc/crypttab“ will be updated so that the Live OS will do the mounting and unmounting.

The init script will end by telling the kernel to swith to our new root filesystem (the overlay) and start the Slackware init program (PID 1, /sbin/init).

From this moment onward, you are booting a 'normal' Slackware system and the fact that this is actually running in RAM and not from your local harddisk is not noticeable.

Slackware Live module format

A Slackware Live module contains a directory tree, which has been 'squashed' into a compressed archive file by the program “squashfs”. The compression algorithm used is “xz” which explains the choice of the module's file extension ”.sxz“ meaning “squashed with xz”.

Slackware Live Edition expects its modules to adhere to a particularly loose filename convention:

The filename format is “NNNN-modname-*.sxz”, where 'N' is a digit and 'modname' must not contain a dash '-'.

The “modname” part is what you must specify in the boot parameters “load” and “noload”.

Anything may be part of the '*' but most commonly used is “${VERSION}-${ARCH}”. The core modules in Slackware Live use the Slackware release as ${VERSION} and the Slackware architecture as ${ARCH}. For the modules in addons/ and optional/ subdirectories, ${VERSION} would commonly be the version of the program that is being made available in the module.

The four digits of a modulename have a meaning. Some ranges are claimed by the core OS, so please do not use them. Their prefixes are based on the package source:

    0000 = contains the Slackware /boot directory
0010-0019 = packages installed from a Slackware tagfile (a,ap,d, ... , y series)
0020-0029 = packages installed from a package list as found in the ./pkglists subdirectory of the liveslak sources (min, noxbase, x_base, xapbase, xfcebase etc)
0030-0039 = a 'local' package, i.e. a package found in subdirectory ./local or ./local64 (depending on architecture)
0099 = liveslak configuration module (contaning all the customizations that change the installed packages into a usable Live OS)

Other ranges are free to be used. Note that order in which the filesystem of the Live OS is assembled by overlaying the squashed directory trees depends on the module numbering. So if you have modules that you want to have loaded in specific order, just ensure that their filenames have ascending numbers.

Example of a core module: 0099-slackware_zzzconf-14.2-x86_64.sxz

Example of an optional module: 0060-nvidia-352.79_4.4.1-current-x86_64.sxz

Other Slackware based Live distros

Naturally, there have been many who went before me, and since I started as a n00b in Linux Live land, I have learnt a lot about how a Live distro works from playing with these other Slackware-based Live distros. Allow me to name them, and show respect:

SLAX

Website: https://www.slax.org/[145]

SLAX was the original Live variant of Slackware. The linux-live scripts which are used to create a SLAX ISO were generalized so that they can create a Live version of any OS that is already installed to a harddrive. SLAX development stalled a couple of years ago.
In 2017 a new release of SLAX became available, however Slackware is no longer its parent OS. New SLAX releases are based on Debian.

The Live functionality of SLAX is based on aufs and unionfs which requires a custom-built kernel with aufs support compiled-in. It is small and has its boot scripts tweaked for startup speed.

Porteus

Website: http://www.porteus.org/[146]

Porteus was created as a fork of SLAX by the SLAX community when the development of SLAX seemed to have ended. Porteus has an active user community where it's “all about the modules”. The use of aufs instead of overlayfs allows Porteus (like SLAX) to add and remove squashfs modules in the running Live system on the fly, which sparked the development of a lot of community modules. It looks like the next generation of Porteus will be based on Arch Linux instead of Slackware: this has to do with the original Porteus developer leaving the team.

Salix Live

Website: http://www.salixos.org/download.html[147]

Salix is a distribution based on Slackware with its own philosophy of “one tool per task” reducing the number of packages a lot, compared to its parent Slackware distro. Salix has implemented dependency checking in its package management tool. Live editions of Salix are available in several editions, each built around and focused on a different Desktop Environment or Window Manager. Live editions are available for XFCE and MATE.

Slackel

Website: http://www.slackel.gr/[148]

Slackel is a Greek distro based on both Slackware and Salix. It comes in three flavors, each of which has a Live variant: KDE4, Openbox and Fluxbox. The Live scripts are a modification of Salix-Live.

SlackEX

Website: http://slackex.exton.net/[149]

A website offering Live versions based on many regular Linux distributions. The SlackEX version is loosely based on Slackware with a custom kernel and some tools that are not part of Slackware itself. I was unable to find the sources for this live distro. Its creator stopped SlackEX development in December 2017.

Liveslak Sources

Slackware Live Edition is created by the 'liveslak' scripts developed and maintained by Eric Hameleers aka Alien BOB alien@slackware.com[150].

Git repository: git://git.liveslak.org/liveslak.git

Git repository (browsable): http://git.liveslak.org/liveslak/[151]

Download mirror: http://www.slackware.com/~alien/liveslak/[152]

Sources

Original source: https://git.slackware.nl/liveslak/tree/README.txt[153]

Project landing page: https://liveslak.org/[154]

ISO downloads: https://download.liveslak.org/[155]

Originally written by Eric Hameleers[156]

slackware, live, overlayfs, squashfs, author alienbob

Ruarí's thoughts

Ruarí Ødegaard works for Opera and has been making Opera packages[157] available for Slackware for a long time. The article below was posted on his blog in 2011 and has attracted lots of attention since. Now that his employer has ended the “My Opera” pages this article has been conserved on archive.org[158] but it deserves a place on the Slackware Documentation Wiki as well.

Package and dependency management shouldn't put you off Slackware

Since I have been running Slackware as my primary distro I've heard the occasional comment along the lines of, “Manual dependency management must be a real hassle” or worse, “How do you work without a package manager?”. Rather than repeat my response ad nauseam individually to those asking such questions, I thought I would save myself the trouble and type up my thoughts once publicly, so that I could simply point them to this post.

Package management

Let's start with the second suggestion first, because it is totally false. Slackware does have a full set of tools for managing packages. The only obvious 'missing feature' is dependency management, which some people incorrectly equate with package management. I'll explain why this one seemingly important missing feature isn't as big a problem as you might think a little later. First, lets remember that package management is actually a much broader subject and also encompasses many other important tasks such as download, installation, logging/tracking, upgrading, removing and package creation. The package management tools provided by Slackware perform all of these other tasks with aplomb and even provide several advantages over some of the more popular Linux package managers.

What are these advantages? Well firstly, all logs are written in plain text, in a way that is easily read by humans but still machine-parseable. This means I am not just limited to the Slackware provided tools. I can run queries against them with a wide variety of standard UNIX utilities directly. I can read logs with less, cat or any text editor, and I can process, manipulate and collate packaging data with grep, awk, python, perl, etc. Or to put it another way, I am not forced to use any distro specific tool to gather (or even change), the information stored about my package setup.

Similarly the packages themselves are equally open, since they are simply compressed tarballs containing the filesystem contents and some optional text files that describe the package and perform any needed post-installation steps. You can view, open and even edit packages with a wide selection of tools (GNU tar, BSD tar, perl, etc.). Indeed if you really wanted to you could even create them without using Slackware's provided makepkg tool ⁵⁾. Though I must strongly stress that last point really isn't recommended, as admittedly there are a couple of potential 'gotchas' related the exact listing of the internal file path and dealing with symlinks. Still, it is possible! For comparison consider the RPM format, which effectively requires installing rpm and associated tools for any reasonable level of query or manipulation. Installing rpm on non-rpm based systems can range from being a minor inconvenience to being an almighty hassle, or even down right impossible, the further you move beyond the world of Linux-based OSes. Even deb, which is vastly better in this regard, still uses the relatively obscure (outside of Unix-like systems) ar format[159] as its outer container.

Finally, perhaps the most interesting difference is that all of the packaging tools are implemented as simple shell scripts. This greatly lowers the barrier of entry to tweaking them, bringing it within the bounds of a user with intermediate to advanced Linux knowledge, rather than a Linux 'Guru'. For example, prior to the change of default Slackware package compression format (from gzip to xz) it was not uncommon for some Slackers to hack in support for alternative compression formats themselves. How many deb or rpm users (not developers) do you know who have hacked and adjusted their package managers to better suit their own personal needs or tastes?

I think the point to take away from all this is that one of the upsides of using a system like Linux, is that it is supposed to empower users and give them greater control of their system. In this regard Slackware's package management tools excel.

Why dependency management doesn't have to be difficult

So … dependencies! This is probably the best known difference between Slackware and other popular distributions. Slackware doesn't even attempt to automatically handle dependencies during package install, leaving it up to the user to figure out what combination of other packages must be installed. From the outside and recalling some of my own preconceptions prior to moving to Slackware, I can see how this would appear to be a major omission.

One of the main reasons that Slackware doesn't bother with automated dependency management is that it doesn't need to. The person installing can do that and it doesn't even have to be that hard. Whilst it is possible to completely customise the selection of installed packages, users who are new to Slackware are recommended (by the accompanying documentation) to start with a full install (i.e. every package). And in fact, there are many seasoned Slackware users who also do this, even if they are fully capable of pairing down the package selection to something more minimal. Obviously a full install means that dependencies are completely satisfied. See, I told you Slackware was simple[160]!

I realise a few people might now be thinking, “Well isn't that just too simple, treating the distro like a monolithic system, rather than the modular entity it is?”. I agree, indeed it makes you wonder why every other distro had to make things so hard.

Now of course some people reading this are probably already thinking up a few potential problems with this approach. I can make a fair guess at what these potential problems are because I have heard them before. There two most common arguments I have seen for not wanting to do a full install are, “it wastes space” and “it bloats the system, slowing it down”. The reason for assuming these will be issues, is often based on experiences with other distros. Once you understand a little bit more about Slackware's way of doing things it soon becomes obvious that neither are likely to have much impact on you if you choose to use Slackware.

Lets start with wasting space. According to the back cover of the official install DVD of version 13.37 (the current stable release as I write this), a full install of Slackware occupies 6.8Gb. Whilst this might seem like a lot to those of us who have been using computers for a number of years, in modern terms it is almost nothing. Consider the fact that even amazon.com (not the cheapest place for electronics) sells decent 500Gb disk drives for less than $50 (USD), meaning that 6.8Gb of space costs less than $0.70! Now I will admit that a hard disk is one of the cheapest ways of adding storage and isn't always feasible on smaller laptops or netbooks. However on the other hand, the cost is still very low even when choosing more expensive ways of adding storage to your system. For example, Amazon also offers new 8Gb microSD cards for less than $5 (USD). So you have to consider is it really worth your time to even consider cutting down the install selection, at least from a spacing saving perspective?

This obviously begs the question, “so wouldn't you always do a full install for all distros?”. There are two parts to this. Firstly some distros (such as Debian or openSUSE) have very large repositories, packing just about every open source application available (including a lot of stuff that only a handful of people will never even consider using). So if you did this you really would start to waste a lot of disk space. Perhaps more importantly the system really would start to slow down due to all the bloat.

On Slackware a full install running a lightweight window manager like Fluxbox will run every bit as fast a slimmed down install running Fluxbox. Why? Because of its simple design philosophy. Slackware does not make any assumptions about what the user intends to do with his or her software. This is unlike the majority of other distros, which do make assumptions and try to automate as much as possible in line with those assumptions.

This means that on most distros if you install some application that runs as a daemon/service, the install scripts in the post install of that package will typically start it immediately after installation finishes. This would appear to make good sense as why would you be installing it otherwise? Whilst it is indeed most likely that you would want it started, there are other possibilities and for this reason Slackware doesn't attempt to second guess the answers to questions like these, leaving it up to you. For example, you might not want it running all the time or you might have installed the package only to access one of the other binaries or libraries installed alongside the main program. Who knows, you might even have installed it because you couldn't find documentation on the author's website and wanted to read the included files or man page to find out more. The result of all this is that unless you enabled a service during the Slackware install, or later manually, most of the software installed just sits on your disk doing nothing other than taking up space and hence has no affect on the speed of your running system at all.

So yes, a large amount of software may be left just sitting around doing nothing, but you know what? It has little (if any) real negative affect on me, so why would I care? Indeed you never know when one of these applications might turn out to be useful. I don't typically want to run a full featured web-server on my desktop but should I ever need to test something that might require it, I have Apache installed and ready to fire up! Indeed this simple way of not having to think about dependencies can sometimes be a real advantage. If I want to try some program or utility at some point in the future I quite often find it is already there, negating the need to search via the package manager and then install it. This is particularly nice when installing an application would have pulled down hundreds of Mbs of extra dependencies. I might not care about some used disk space but I do care about wasting my networking connection if I am in the middle of using it or I am on a slow network.

And what about dependencies for non-official packages? Well most of the popular third party/non-official Slackware repositories provide some means to simplify dependency resolution, sometimes this is done by providing a tool to deal with the inter-dependencies found within that repository, or other times by simply listing any non-official (by that I mean not included in the standard repository) dependencies in README files provided with each package. This is the approach taken by what is probably the most popular third party repository these days, SlackBuilds.org[161]. It works because Slackware installs such a good selection of common libraries, which means that many of the applications already have the majority (if not all) of their dependencies fulfilled by a complete Slackware install. Since very few extra packages are needed it doesn't tend to be the hassle many might expect. And for the really lazy, using helper tools such as sbopkg[162] (and its queuefiles[163] system) you can even fully automate the process.

So there you go, not only does Slackware have a decent set of package management tools, the one area that tends to scare people off (dependency management) doesn't have to be daunting at all!

Sources

Original source: Ruario's archived blog post of Monday, September 26, 2011[164]

Originally written by Ruarí Ødegaard

howtos, sbopkg, dependencies, slackbuilds, m2nb, author ruario

⁵⁾

If you really did want to create your own Slackware packages without makepkg (for whatever reason), here is a short summary of how it could be done. Switch to the root of your unpacked package contents and check for symlinks: “find . -type l”. If they exist convert them into shell script code appended to doinst.sh: “find * -type l -printf '( cd %h ; rm -rf %f )\n( cd %h ; ln -sf %l %f )\n' -delete » install/doinst.sh”. Finally, create a compressed tar archive with version 1.13 style directory formatting, either by using GNU tar-1.13 directly (it is installed on Slackware) or by forcing modern GNU tar to emulate this style of formatting by using a transform: “tar caf /tmp/some-application-1.0-x86_64-1.tgz . –xform='s,^\./\(.\),\1,' ”

Frequently Asked Questions

Abstract

This document answers questions frequently asked about Slackware Linux. If you have any specific topic in mind for the FAQ, create a heading for the FAQ entry, under an appropriate section, and provide your answer. If you cannot answer it, then somebody else might have the answer. Either way, the FAQ is a great way to build up tidbits of knowledge that might otherwise not fit into an entire article.

If the answer is too long to fit comfortably into two or three paragraphs, consider adding a link in the answer to an existing page that answers the question or create a new page if one doesn't exist on the topic and the question is important enough to justify a page.

General Slackware

What is Slackware Linux?

See the Slackware Linux[165] page.

How can I get a copy of Slackware Linux?

Slackware Linux can be obtained for free by downloading the disc images directly from the internet(FTP)[166], Internet mirrors[167] and via BitTorrents[168] .

Can I buy copies of Slackware Linux?

Slackware Linux official installation media can not be bought at the moment due to the demise of the Slackware Store. The distro survives on donations to the project[169] ​at the moment.

Can I buy Slackware gear?

Check out Pat Volkerding's official Cafepress Store[170] sporting the flippy logo, and somewhat harder to find, his product line featuring the original logo[171].

Why spend money if I can download Slackware Linux for free?

Indeed, Slackware Linux will forever be freely available for download, no strings attached. However, consider:
Slackware Linux is developed by Patrick Volkerding as a full-time job. The sale of Slackware Linux CD's, DVD's and paraphernalia is his only source of income. The core team of developers working with Patrick do not get paid, but should Patrick have to stop developing Slackware because he can no longer support himself enough to do so, the distribution will then have a very uncertain future.

Who are the people behind Slackware Linux?

Patrick Volkerding is the founder, project co-ordinator and chief maintainer of Slackware Linux. He is also known as BDFL (Benevolent Dictator for Life). Several active contributors also help Patrick maintain the distribution.

LinuxQuestions.org did an interview with Patrick Volkerding[172] recently. That interview covers a lot of ground, including mentions of past and present contributors, their involvement, and a brief history of Slackware Linux.

Present contributors include Eric Hameleers[173] (aka AlienBOB), Robby Workman (aka rworkman), Stuart Winter (aka MoZes), Eric Jan Tromp (aka alphageek), Alan Hicks, Mark Post, Fred Emmott, Vincent Batts, Heinz Wiesinger (aka pprkut) and several more.

What is this talk about stable and current versions?

Slackware basically comes in two flavors: stable and “current”.

Stable versions are the numbered releases (12, 12.1, 13, 13.37, 14.0, 14.1 etc.). They are supported for a number of years after release, by way of security updates. Security updates are added to the the “/patches/packages/” subdirectory of a Slackware release tree on every public mirror. Functional updates are not added to past releases.

The “current” branch on the other hand, is a development tree which is always split-off from a recently released stable Slackware directory tree. Usually this split-off happens some weeks after the stable release.
It marks the start of a new development cycle towards the next stable release. At the end of a development cycle, a Slackware release is created by renaming the top-level “slackware-current” directory to “slackware-NEWVERSION”. Slackware-current is known to cause relatively frequent and potentially disruptive updates to the system. New users and users looking for a stable system for production use should always use a (fairly recent) stable release. The Slackware developers assume that anyone running slackware-current realizes that he/she is in essence, a beta tester.

To sum it up:

Stable is built on rock-solid components, with well tested software. This recommended version will fit your desktop or server needs.

Current is the testing ground for the upcoming release. The software you will find there will often be upstream[174]'s latest version. For more information on current, please visit the dedicated page[175].

If you want to know when the next version will be released (at time of writing the most recent stable release is 14.1), it will be ready… when it's ready! There are no fixed release dates, as the Slackware goal is to deliver the most stable Linux experience.

Can Slackware be recompiled from scratch?

Short answer: no.
Several other distros (including Linux From Scratch[176]) are capable of being rebuilt from scratch using the publicly available sources and scripts. Fedora habitually recompiles itself completely from time to time. Slackware is not like those other distros: there is no “master build script”. The Slackware distribution grows and evolves “organically” and the utmost care is taken that all software in the distro is in working condition. Slackware does not need “rebuild from scratch” in order to achieve that goal. To the contrary: recompiling an older package may introduce new bugs or incompatibilities when the recompiled package picks up undesired new dependencies and/or functionality.

That does not make Slackware a “binary distribution”, not does this philosophy violate any license. In order to comply with Open Source licenses such as the GPL (and also because, why not?), Slackware makes the complete source code and build scripts available for all the packages that are part of the distro. You will find these sources in the ./source, ./extra/source, ./pasture/source and ./patches/source subdirectories of any release. These sources and scripts are exactly what was used to build the accompanying package at the time of its release - no more and no less.

Note: It is essential that you understand these sources and scripts have produced a package using the system libraries available at the time of its creation. Over time, with all the library updates and introduction of new packages, the source code of any package may lose the capability of being re-compiled into that same package successfully. But that is perfectly normal: a Slackware package will never be recompiled unless its binaries stop working (due to dynamic library conflicts for instance) or because that package is upgraded to a new version. Only then, the sources and scripts for any package are re-evaluated. If patches are required at this time - to make the sources compile successfully or to make the resulting binaries work correctly - then patches will be added.

Installation and Support

How can I verify my copy of Slackware Linux?

All files in a Slackware Linux distribution can be verified against the GPG key[177] of the distribution. For instance, if you want to verify if the ISO image you downloaded is an official¸ non-modified ISO image, then you run the following sequence of commands (example ISO for Slackware 13.37 for x86_64 platform):

$ wget  http://slackware.com/gpg-key
...
2012-08-25 20:04:01 (81.3 MB/s) - ‘gpg-key’ saved [1357/1357]
$ gpg --import gpg-key
gpg: key 40102233: public key "Slackware Linux Project <security@slackware.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
$ gpg --verify slackware64-13.37-iso/slackware64-13.37-install-dvd.iso.asc
gpg: Signature made Mon 25 Apr 2011 07:14:02 PM CEST using DSA key ID 40102233
gpg: Good signature from "Slackware Linux Project <security@slackware.com>"

This message (gpg: Good signature) means that the ISO file is the same file which was cryptographically signed by Patrick Volkerding.

How do I install Slackware Linux?

Read the installation guide[178].

During network installation I only see the "A" package series

You are attempting an installation of Slackware from a HTTP or FTP server. After entering the server's hostname and the Slackware package directory, you see the usual messages like “INITIALIZING PACKAGE TREE”, but then during the “PACKAGE SERIES SELECTION”, you can only select “A - BASE LINUX SYSTEM”. Where are all the other package series?

You will experience this scenario when you are using a 32-bit bootable installer image to install a 64-bit Slackware from a webserver, or vice versa ⁶⁾: you attempt an installation of 32-bit Slackware using a 64-bit installation image.

Solution: use the same architecture for the installer image and for the architecture of the Slackware release that you want to install from a webserver.

The package installation took 3 seconds and now what?

Installing more than 1000 packages should take between 10 and 45 minutes, depending on the computer you are installing them on. If the installer claims it is finished after only a few seconds, that means it did in fact not install anything at all. So what happened here?
This kind of issue occurs when you are not installing from the DVD or CD you booted from, but selected one of the alternative installation methods: a pre-mounted directory, or a loop-mounted ISO, etcetera. In all those cases, you have to enter a directory path to the location where the subdirectories representing the Slackware package sets can be found (the 'a', 'ap', 'd', …, 'y' directories).
If you enter the wrong directory there, then the installer will not complain about your error. It will pretend that it installs packages when in fact it is not. Look at this message closely:

How do I upgrade an existing Slackware Linux installation without re-installing?

Read the page on Slackpkg[179], particularly the full system upgrade[180] section.

To track the “Current” branch, read the page on Slackware-Current[181].

If you wish to perform a major upgrade from an earlier release to the latest stable version, you should read and follow the instructions in UPGRADE.TXT and CHANGES_AND_HINTS.TXT files provided in the official Slackware CD/DVD or internet mirror for the appropriate version (that is, the latest version).

Before upgrading the system, it is recommended that you always make a complete backup of your data.

Where do I get more information on Slackware Linux online?

A bunch of links to valuable online sources of Slackware information can be found on this page[182]. The officially recognized web forum for the Slackware community is at LinuxQuestions.org forums[183].

Where can I find commercial support for Slackware Linux?

The official Slackware website lists some companies[184] which offer Slackware Linux technical support and consulting. It is probably better to make local inquiries in your city or town for Linux related tech services if you need hands-on support. The local LUG (Linux User Group) might also prove to be a valuable source of advice/information.

Does Slackware Linux have a special "desktop" edition, "server" edition and...

No, there is only one edition of Slackware. Slackware is a general purpose distribution that can be configured and customized to the end user's needs. See also the Slackware philosophy[185] for a lengthier explanation for adhering to the KISS philosophy.

When will Slackware Linux "x.y" version be released?

Slackware Linux does not have a fixed release schedule. The principle behind this is to release when ready and not before. There are no six-month release cycles like a few other popular Linux distributions. See the philosophy[186] page for more information.

Does Slackware Linux work with my hardware or peripheral?

In short, if the Linux kernel supports a piece of hardware, so does Slackware. The distribution's “huge” kernel is compiled with maximum support for most devices and is a pristine, unpatched kernel. So if any Linux distribution is likely to have support for a given hardware device, Slackware should.
Be aware that, even if a device is supported by a kernel driver, end user applications and userspace tools to utilize the full functionality of the hardware may be lacking. This is a rather complex topic and may require persistence and patience to research and figure out, especially in the case of low-cost or obscure devices.

Use an Internet search engine such as Google[187] or DuckDuckGo[188], or use a community contributed hardware compatibility list like the LinuxQuestions HCL[189] to find out if your piece of hardware works on Linux or not.
While this can be a considerably daunting task for new Linux users, here are some references to get started:

For printers, CUPS[190] and OpenPrinting.org[191] are good sources to look for device compatibility.
HP printers and MFDs (Multi-Function Devices) have their own open source drivers at HPLIP[192].

For supported scanners, take a look at the SANE[193] project.

For webcams, and USB video class devices, Linux UVC drivers & tools[194] can help.

Linux supports several models of Wacom pen tablets and devices. See the linuxwacom[195] project for more information. Many non-wacom tablets are supported by the Wizardpen[196] driver.

Software and Package Management

How do I install/upgrade/remove software in Slackware Linux?

Slackware Linux comes with its own package management tools, namely pkgtool, installpkg, upgradepkg and removepkg for installing, upgrading and removing software packages. makepkg can be used to create packages. See also slackpkg[197] and the page on installing software[198].

Why doesn't Slackware Linux have my favourite "XYZ" software included in the CD/DVD?

The official distribution is small enough for various reasons, the most important one being constraints on developers' time and resources. The short answer is that the official Slackware distribution cannot carry every possible open source application that might be needed by its users. However, Slackware still provides a large number of applications[199] that are needed by most users.

Other sources for obtaining software not found in the Slackware CD/DVD (both in source and binary form):

Note that the licensing of some software may only permit redistribution in source form. Please do not redistribute or make available online any binary packages of software you compile from source unless you are sure the license permits it. Also avoid packaging and redistributing proprietary software without the creator's permission.

There are quite a few trusted and well-respected individual Slackware contributors who make their SlackBuild scripts and binary packages available online. One source is AlienBOB's repository[200] and another is Robby Workman's packages[201].

SlackBuilds.org[202] is a community source of high quality and tested build scripts that make it easy to install third-party software on Slackware, and sbopkg[203], makes processing SlackBuilds easier.

Another option is to use binary packages from Slacky.eu[204] or other binary Slackware package sources. Note that packages are contributed by the community and the quality of packaging may vary from person to person.

Still another option is to convert rpm packages to Slackware packages by using the tool rpm2tgz[205].

src2pkg[206] can be used to build packages from source, and to convert other package formats (.deb, .rpm) to Slackware packages. The cpan2tgz[207] program is able to build Perl modules into packages.

Last but not the least, intermediate to advanced users generally prefer to compile from upstream sources or write their own SlackBuild scripts[208].

Why doesn't Slackware's package manager do dependency handling?

This is a huge debate in the Open Source community, bordering on vi vs emacs like flame wars, in reference to package management and dependency handling; but for several reasons, summarized shortly below, Slackware does not prefer “automagic[209]” dependency resolution:

Automatic dependency handling requires constant manual developer maintenance, and adds potential for dependency hell.

The official Slackware Linux distribution is anyway meant to act as a cohesive whole. Hence, dependency management is largely moot as installing the entire distribution (the recommended way) takes care of most dependency problems.

Several popular Open Source applications can be compiled with different dependencies based on compile-time configuration switches. This makes dependency handling harder and more error-prone for binary redistribution of third party software.

Slackware Linux official distribution does not have the resources or manpower to manage dependency handling for third party software, which is a complex undertaking, requiring a lot of testing and is prone to errors as already noted above.

However, there are still solutions for third-party software automatic dependency handling for those who want it. slapt-get[210] is a package manager that adds dependency handling for third party package sources like LinuxPackages.net[211] and Slacky.eu[212].

Salix OS[213] is a Slackware derived distribution that incorporates dependency handling.

Distro X and Y does package management with dependency handling and...

Yes, many distributions have package managers that do dependency handling and do them well. Indeed, there are many choices in that regard. The Linux community still needs a stable, tried and tested distribution that doesn't. Slackware certainly fills a niche in the Linux community in that regard. But as always, preferences vary and many Linux users do prefer the bare simplicity of Slackware. One thing to bear in mind is that the core simplicity of the package management in Slackware has one significant side benefit: there will always be third-party enhancements and solutions to commonly faced issues.

Some may call it a bug, others may call it a feature. Be it so, Slackware remains committed to its core principles and this issue is one aspect of its core principles.

Miscellaneous

Why does Slackware take so long to boot up?

By default, Slackware installs the huge kernel, which has built-in support for all possible hardware drivers. This may increase you boot time as the kernel probes for hardware at startup. You can switch to the generic kernel by following the instructions in the file /boot/README.initrd. See also: how to set up the generic kernel[214].

You may also want to disable unused services in /etc/rc.d/ directory by disabling the executable bit of the startup script. For instance, to disable the Apache daemon, simply run (as root)

chmod -x rc.httpd

If you prefer screen menus to do same task you can run (as root) pkgtool

# pkgtool

navigate to Setup item and press Enter then navigate to services item, mark it with Space key and press Enter then clear mark in front of [ ] httpd item with Space key and press Enter. Finally, select Exit end press Enter.

Additionally, if you use LILO, Slackware's default boot loader, you can add the compact option to /etc/lilo.conf to speed up the boot process by merging read requests from adjacent sectors:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=1"
boot = /dev/sda
compact

Also, Slackware runs a bunch of X/GTK related scripts at startup for multiuser runlevels (fc-cache, update-mime-database, gtk-update-icon-cache, update-gtk-immodules, update-gdk-pixbuf-loaders , update-pango-querymodules etc.). These may be disabled manually by commenting out those lines which refer to them in the file /etc/rc.M but don't disable anything unless you're absolutely sure you know what you are doing! These scripts are essential for GTK applications to render fonts and icons properly.

Unless you are a fairly advanced user and know what you are doing, do not attempt to modify or disable any of the boot scripts. Does a few extra seconds gained while booting really make a big difference?

Slackware Linux has a reputation for being tough for newbies. Is this true?

Read The Slackware way[215] to find out what you can expect from a distribution like Slackware. While Slackware certainly is different from many other distributions, whether easy or difficult to use is a matter to be decided entirely by the individual user.

Some things to bear in mind, though:

Slackware has a text-menu based (ncurses) installer and requires several technical decisions to be made at install-time, some of which can be potentially destructive to the data on the hard disk. In other words, when in doubt, don't perform any potentially destructive actions and do consult the help documentation.

A new Slackware installation initially boots into a text console by default and can be configured to boot into a GUI[216] later, as opposed to desktop-based distributions that boot into a GUI login screen by default.

Basic knowledge of standard shell (bash) commands and a text-mode editor such as vim is necessary to start using Slackware comfortably.

Some knowledge of the locations of commonly used configuration files and scripts found in *nix-like systems would make things much more comfortable.

slackware

⁶⁾

the other way round

Slackware installation

Slackware's installation is a bit more simplistic than that of most other Linux distributions and is very reminiscent of installing one of the varieties of BSD operating systems. If you're familiar with those, you should feel right at home. If you've never installed Slackware or used a distribution that makes use of a non-graphical installer, you may feel a bit overwhelmed at first. Don't panic! The installation is very easy once you understand it, and it works on just about any x86 platform.

The latest versions of Slackware Linux are distributed on DVD or CD media, but Slackware can be installed in a variety of other ways. We're only going to focus on the most common method - booting from a DVD - in this book. If you don't have a CD or DVD drive, you might wish to take a look at the various README files inside the usb-and-pxe-installers directory at your favorite Slackware mirror. This directory includes the necessary files and instructions for booting the Slackware installer from a USB flash drive or from a network card that supports PXE. The files there are the best source of information available for such boot methods.

Starting with the 14.1 release, Slackware ISO images (both the ones available online as well as the discs sent out from the Slackware store) have been processed using isohybrid[217]. This allows them to be written to a USB stick, which can then be booted and used as the install source.

A HOWTO on setting up a PXE boot server right off a Slackware installation medium (DVD or USB Stick) is available in this separate article: Out of the box Slackware PXE Server[218]

Booting the Installer

Booting the installer is simply a process of inserting the Slackware install disk into your CD or DVD drive and rebooting. You may have to enter your computer's BIOS and alter the boot order to place the optical drive at a higher boot priority than your hard drives. Some computers allow you to change the boot order on the fly by pressing a specific function key during system boot-up. Since every computer is different, we can't offer instructions on how to do this, but the method is simple on nearly all machines.

Once your computer boots from the CD you'll be taken to a screen that allows you to enter any special kernel parameters. This is here primarily to allow you to use the installer as a sort of rescue disk. Some systems may need special kernel parameters in order to boot, but these are very rare exceptions to the norm. Most users can simply press enter to let the kernel boot.

You should see a lot of text go flying across your screen. Don't be alarmed, this is all perfectly normal. The text you see is generated by the kernel during boot-up as it discovers your hardware and prepares to load the operating system (in this case, the installer). You can later read these messages with the dmesg(1) command if you're interested. Often these messages are very important for troubleshooting any hardware problems you may have. Once the kernel has completed its hardware discovery, the messages should stop and you'll be given an option to load support for non-us keyboards.

<OPTION TO LOAD SUPPORT FOR NON-US KEYBOARD>
If you are not using a US keyboard, you may need to load a different
keyboard map.  To select a different keyboard map, please enter 1
now.  To continue using the US map, just hit enter.
Enter 1 to select a keyboard map: _

Entering 1 and pressing ENTER will give you a list of keyboard mappings. Simply select the mapping that matches your keyboard type and continue on.

Welcome to the Slackware Linux installation disk! (version 13.37)
######  IMPORTANT!  READ THE INFORMATION BELOW CAREFULLY.  ######
- You will need one or more partitions of type 'Linux' prepared.  It is also
recommended that you create a swap partition (type 'Linux swap') prior
to installation.  For more information, run 'setup' and read the help file.
- If you're having problems that you think might be related to low memory, you
can try activating a swap partition before you run setup.  After making a
swap partition (type 82) with cfdisk or fdisk, activate it like this:
mkswap /dev/<partition> ; swapon /dev/<partition>
- Once you have prepared the disk partitions for Linux, type 'setup' to begin
the installation process.
- If you do not have a color monitor, type:  TERM=vt100
before you start 'setup'.
You may now login as 'root'.
slackware login: **root**

Unlike other Linux distributions which boot you directly into a dedicated installer program, Slackware's installer drops you into a limited Linux distribution loaded into your system's RAM. This limited distribution is then used to run all the installation programs manually, or can be used in emergencies to fix a broken system that fails to boot. Now that you're logged in as root (there is no password within the installer) it's time to start setting up your disks. At this point, you may setup software RAID or LVM support if you wish or even an encrypted root partition, but those topics are outside of the scope of this book. I encourage you to refer to the excellent README_RAID.TXT, README_LVM.TXT, and README_CRYPT.TXT files on your CD if you desire to setup your system with these advanced tools. Most users won't have any need to do so and should proceed directly to partitioning.

Partitioning

The Slackware installation media comes with tools to partition a hard drive.
Usually partitioning a hard disk process is composed of these steps:

Running the desired partitioning tool on the target HDD.

Showing the current partition table to see if there are any installed partitions.

If needed, deleting partitions.

Create a new partition.

Selecting the type and size of the new partition.

Continuing to create partitions as planned.

Changing types of the partition (Swap, Linux, Solaris, etc).

Setting a bootable flag to a desired partition.

Writing the partition table.

fdisk

Using fdisk to partition a hard drive is done by following the following steps. The partition table can be created differently, this is only an example:

Creating a new partition, this will be used as swap:

root~# fdisk <path to drive> | (for example /dev/sda) <Return>
Command (m for help): p <Return>
Disk /dev/sda: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Command (m for help): n <Return>
Command action
e   extended
p   primary partition (1-4)
p <Return>
Partition number (1-4): 1 <Return>
First cylinder (1-621, default 1): 1 <Return>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-621, default 621): 100 <Return>

Now to change the type of this partition to swap:

Command (m for help): t <Return>
Partition number (1-4): 1 <Return>
Hex code (type L to list codes): 82 <Return>
Changed system type of partition 1 to 82 (Linux swap)

The next partition will be used as the main partition, and needs to be bootable:

Command (m for help): n <Return>
Command action
e   extended
p   primary partition (1-4)
p <Return>
Partition number (1-4): 2 <Return>
First cylinder (101-621, default 101): <Return>
Using default value 101
Last cylinder or +size or +sizeM or +sizeK (101-621, default 621): <Return> | (the remainder of the disk will be used)

To make the new partition bootable:

Command (m for help): a <Return>
Partition number (1-4): 2 <Return>

Press p <Return> again to see the new partition table:

Disk /dev/hdb: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Device Boot    Start       End    Blocks   Id  System
/dev/hdb1            1        100    203797+  82  Linux swap
/dev/hdb2   *        101      621    1048107  83  Linux

Finally we can write the table with w <Return>.
This is a very simple partition table, naturally fdisk supports the creation of mixed logical and physical partitions.

cfdisk

cfdisk can achieve the same results as fdisk but will also show a simple UI that shows current table structure before it is saved to the HDD. The user can do the same steps as in the fdisk section by using the arrow / tabulator key to select menu items in the bottom of the screen:

                                cfdisk 2.12r
Disk Drive: /dev/sda
Size: 5108373319 bytes, 5.1 GB
Heads: 64   Sectors per Track: 63   Cylinders: 621
Name        Flags      Part Type  FS Type          [Label]        Size (MB)
sda1                    Primary   Linux swap                       822.61
*sda2       Boot        Primary   Linux                           4285.76
*[Bootable]* [ Delete ]  [  Help  ]  [Maximize]  [ Print  ]
[  Quit  ]  [  Type  ]  [ Units  ]  [ Write  ]
*Toggle bootable flag of the current partition*

The setup Program

Help

If you've never installed Slackware before, you can get a very basic over-view of the Slackware installer by reading the Help menu. Most of the information here is on navigating through the installer which should be fairly intuitive, but if you've never used a curses-based program before you may find this useful.

Keymap

Before we go any further, Slackware gives you the opportunity to select a different mapping for your keyboard. If you're using a standard US keyboard you can safely skip this step, but if you're using an international keyboard you will want to select the correct mapping now. This ensures that the keys you press on your keyboard will do exactly what you expect them to do.

Addswap

If you created a swap partition, this step will allow you to enable it before running any memory-intensive activities like installing packages. swap space is essentially virtual memory. It's a hard drive partition (or a file, though Slackware's installer does not support swap files) where regions of active system memory get copied when your computer is out of useable RAM. This lets the computer “swap” programs in and out of active RAM, allowing you to use more memory than your computer actually has. This step will also add your swap partition to /etc/fstab so it will be available to your OS.

Target

Our next step is selecting our root partition and any other partitions we'd like Slackware to utilize. You'll be given a choice of filesystems to use and whether or not to format the partition. If you're installing to a new partition you must format it. If you have a partition with data on it you'd like to save, don't. For example, many users have a seperate /home partition used for user data and elect not to format it on install. This lets them install newer versions of Slackware without having to backup and restore this data.

Source

Here you'll tell the installer where to find the Slackware packages. The most common method is to use the Slackware install DVD or CDs, but there are various other options are available. If you have your packages installed to a partition that you setup in the previous step, you can install from that partition or a pre-mounted directory. (You may need to mount that partition with mount(8) first. See chapter 11 for more details.) Additionally, Slackware offers a variety of networked options such as NFS shares, FTP, HTTP, and Samba. If you select a network installation, Slackware will prompt you for TCP/IP information first. We're only going to discuss installation from the DVD, but other methods are similar and straightforward.

Select

One unique feature of Slackware is its manner of dividing packages into disksets. At the beginning of time, network access to FTP servers was available only through incredibly slow 300 baud modems, so Slackware was split into disk sets that would fit onto floppy disks so users could download and install only those packages they were interested in. Today that practice continues and the installer allows you to chose which sets to install. This allows you to easily skip packages you may not want, such as X and KDE[219] on headless servers or Emacs on everything. Please note that the “A” series is always required.

Install

Finally we get to the meat of the installer. At this stage, Slackware will ask you what method to use to choose packages. If this is your first time installing Slackware, the “full” method is highly recommended. Even if this isn't your first time, you'll probably want to use it anyway.

The “menu” and “expert” options allow you to choose individual packages to install and are of use to skilled users familiar with the OS. These methods allow such users to quickly prune packages from the installer to build a very minimal system. If you don't know what you're doing (sometimes even if you do) you're likely to leave out crucial pieces of software and end up with a broken system.

The “newbie” method can be very helpful to a new user, but takes a very long time to install. This method will install all the required packages, then prompt you individually for every other package. The big advantage here is that is pauses and gives you a brief overview of the package contents. For a new user, this introduction into what is included with Slackware can be informative. For most other users it is a long and tedious process.

The “custom” and “tagpath” options should only be used by people with the greatest skill and expertise with Slackware. These methods allow the user to install packages from custom tagfiles. Tagfiles are only rarely used. We won't discuss them in this book.

Configure

Once all the packages are installed you're nearly finished. At this stage, Slackware will prompt you with a variety of configuration tasks for your new operating system. Many of these are optional, but most users will need to set something up here. Depending on the packages you've installed, you may be offered different configuration options than the ones shown here, but we've included all the really important ones.

The first thing you'll likely be prompted to do is setup a boot disk. In the past this was typically a 1.44MB floppy disk, but today's Linux kernel is far too larger to fit on a single floppy, so Slackware offers to create a bootable USB flash memory stick. Of course, your computer must support booting from USB in order to use a USB boot stick (most modern computers do). If you do not intend to use LILO or another traditional boot loader, you should consider making a USB boot stick. Please note that doing so will erase the contents of whatever memory stick you're using, so be careful.

Nearly everyone will need to setup the LInux LOader, LILO. LILO is in charge of booting the Linux kernel and connecting to an initrd or the root filesystem. Without it (or some other boot loader), your new Slackware operating system will not boot. Slackware offers a few options here. The “simple” method attempts to automatically configure LILO for your computer, and works well with very simple systems. If Slackware is the only operating system on your computer, it should configure and install LILO for you without any hassle. If you don't trust the simpler method to work, or if you want to take an in-depth look at how to configure LILO, the “expert” method is really not all that complicated. This method will take you through each step and offer to setup dual-boot for Windows and other Linux operating systems. It also allows you to append kernel command parameters (most users will not need to specify any though).

LILO is a very important part of your Slackware system, so an entire section of the next chapter is devoted to it. If you're having difficulty configuring LILO at this stage, you may want to skip ahead and read Chapter 3 first, then return here.

This simple step allows you to configure and activate a console mouse for use outside of the graphical desktops. By activating a console mouse, you'll be able to easily copy and paste from within the Slackware terminal. Most users will need to choose one of the first three options, but many are offered, and yes those ancient two-button serial mice do work.

The next stage in configuring your install is the network configuration. If you don't wish to configure your network at this stage, you may decline, but otherwise you'll be prompted to provide a hostname for your computer. Do not enter a domain name, only the hostname.

The following screen will prompt you for a domainname, such as example.org. The combination of the hostname and the domainname can be used to navigate between computers in your network if you use an internal DNS service or maintain your /etc/hosts file.

You have three options when setting your IP address; you may assign it a static IP, or you may use DHCP, or you may configure a loopback connection. The simplest option, and probably the most common for laptops or computers on a basic network, is to let a DHCP server assign IP addresses dynamically. In practice, this often results in a consistent address since both dhcpcd and dhclient initially request the same address previously assigned. If the address is unavailable then the machine gets a new one, but on small networks this may never happen.

If the DHCP server on your network requires a specific DHCP hostname before you're permitted to connect. You can enter this on the Set DHCP Hostname screen.

To use a static IP address, you must provide:

Static IP Address

IP Address: the address of your computer, such as 192.168.1.1 (for IPv4). Also, you should verify that no DHCP server on your network is set to assign that same address out as a part of its DHCP pool, or you may encounter address conflicts.

Netmask: the subnet mask for your network; often 255.255.255.0 for small networks.

Gateway Address: the address of the gateway server providing internet access to your network. On small networks, this will probably be provided by your ISP while on larger networks you may use an internal server which handles the traffic. In other words, this may be an internal address like 192.168.1.1 or it might be an address provided by your ISP, such as 75.146.49.79

Nameserver: most likely, you'll want to utilize DNS; in this initial setup, provide your primary domain name server. Edit /etc/resolv.conf to add secondary and tertiary servers later.

The final screen during static IP address configuration is a confirmation screen, where you're permitted to accept your choices, edit them, or even restart the IP address configuration in case you decide to use DHCP instead.

Your network configuration is now complete. The next screen prompts you to configure the startup services that you wish to run automatically upon boot. Read the descriptions that appear both to the right of the service name as well as at the bottom of the screen in order to decide whether that service should be turned on by default. These can always be modified later with pkgtool > Setup > Services.

As the startup services window warns, you should only turn on the startup services that you actually intend to use. This not only decreases boot time but makes for a more secure system.

Every computer needs to keep track of the current time, and with so many timezones how does Slackware know which one to use? Well, you have to tell it which one to use, and that's why this step is here. If your computer's hardware clock is set to UTC (Coordinated Universal Time), you'll need to select that; most hardware clocks are not set to UTC from the factory (though you could set it that way on your own; Slackware doesn't care). Then simply select your timezone from the list provided and off you go.

If you installed the X disk set, you'll be prompted to select a default window manager or desktop environment. What you select here will apply to every user on your computer, unless that user decides to run xwmconfig(1) and choose a different one. Don't be alarmed if the options you see below do not match the ones Slackware offers you. xwmconfig only offers choices that you installed. So for example, if you elected to skip the “KDE” disk set, KDE will not be offered.

The last configuration step is setting a root password. The root user is the “super user” on Slackware and all other UNIX-like operating systems. Think of root as the Administrator user. root knows all, sees all, and can do all, so setting a strong root password is just common sense.

With this last step complete, you can now exit the Slackware installer and reboot with a good old CTRL + ALT + DELETE. Remove the Slackware installation disk, and if you performed all the steps correctly, your computer will boot into your new Slackware linux system. If something went wrong, you probably skipped the LILO configuration step or made an error there somehow. Thankfully, the next chapter should help you sort that out.

Post Installation

When you have rebooted into your new Slackware installation, the very first step you should take is to create a user. By default, the only user that exists after the install is the root user, and it's dangerous to use your computer as root, given that there are no restrictions as to what that user can do.

The quickest and easiest way to create a normal user for yourself is to log in as root with the root password that you created at the end of the intallation process, and then issue the `adduser` command. This will interactively assist you in creating a user; see the section called Managing Users and Groups[220] for more information.

Another important step is to make sure that your installation is up-to-date as new updates are being released that can include security fixes. To do that we can use the slackpkg[221] tool to update the list of packages and install new updates with it.

One last thing - there will be mail in the root user's mailbox filled with useful information about package management, as well as system configuration and maintenance. You should check it with your favorite mail client. If you have not used any of the included mail clients, alpine is a good suggestion to get started quickly and easily.

Configuring Graphical Logins

Once your system is up to date and you have created your first user, you may want to configure your system to boot into X by default, with a graphical login instead of a console login. You can first test that X auto-detects your video correctly by issuing the `startx` command. If X11 starts and you end up at a desktop, you're probably good to go. Open the /etc/inittab file, as root, in your editor of choice. Change the following line:

# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

To be this:

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

This sets your default run-level to 4, which is Slackware's “graphics-only” mode (with one extra tty open just in case, on vty 6). Save, and on your next reboot the system will boot into a nice graphical login.

You can manually enter run-level 4 by entering, as root, `init 4`.

To select or switch between available desktop environments[222] run xwmconfig as root.

Adding multilib

If you just installed the 64-bit version of Slackware, you will soon discover that this is a “pure” 64-bit environment. In other words: out of the box, Slackware64 is not able to run or compile 32-bit program binaries.
Luckily, this is simple to fix. Adding the capability to run and/or compile 32-bit programs will turn your Slackware64 into a “multilib” system. Instructions can be found in the article “Adding Multilib Capability to Slackware on x86_64 Architecture[223]” in our Wiki.

References

Original source: http://slackbook.org/beta/#ch_install[224] (authors: Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson)

External links

Slackware ISO files[225]

Slackware TORRENT files[226]

Slackware 13.37: a distribution to (re)discover (in French)

This is a series of four detailed articles about Slackware, written by Kiki Novak for the french magazine Planète Linux (issues 67, 68, 69 and 70, November 2011 - May 2012).

Author's note: I do own the rights for these articles, so I've decided to link to them here. Feel free to cannibalize them as you wish, e. g. include parts of them - or the articles as a whole - in this wiki, change them as you feel inclined, quote them extensively, and translate bits of them or the whole series. To help you do this, I've included all the original files that were used in the making of these articles: original text in ODT format as well as all the screenshots in PNG format. Check out the links below the list.

Slackware 13.37: a distribution to (re)discover (Part 1, PDF 2.5 MB, in French)[227]

History of Slackware

A few good reasons to choose Slackware

A few good reasons not to choose Slackware

It's not a bug, it's a feature!

How to get Slackware

Slackware-specific documentation

Slackware 13.37: a distribution to (re)discover (Part 2, PDF 3.1 MB, in French)[228]

Choose your boot parameters

Select your keyboard layout

Partition your hard disk

Format your partitions

Decide what you want to install

Configure and install the bootloader

Your mouse in console mode

Networking and services

Which font for the console?

System clock and timezone

Which graphical environment?

A password for root

Finish the installation and reboot

What now?

Slackware 13.37: a distribution to (re)discover (Part 3, PDF 2.5 MB, in French)[229]

Create an initrd and use the generic kernel

Fine-tune the LILO bootloader

Configure the network

Add one or more users

Configure the sound

Slackware 13.37: a distribution to (re)discover (Part 4, PDF 3.4 MB, in French)[230]

Traditional Slackware package management

Manage official Slackware packages using slackpkg

Help! I can't find a package I need!

Building a package using a SlackBuild script from SlackBuilds.org

Manage SlackBuilds comfortably using sbopkg

Configure the graphical server X.org

Select your graphical environment

Slackware in French

Original files (ODT manuscript, screenshots, etc.):

Part 1, ZIP archive 3.3 MB[231]

Part 2, ZIP archive 0.5 MB[232]

Part 3, ZIP archive 0.6 MB[233]

Part 4, ZIP archive 1.5 MB[234]

Xfce

Xfce is a GTK+2 lightweight desktop environment[235]. Quoting the official site[236], Xfce “aims to be fast and low on system resources, while still being visually appealing and user friendly”. While coming with a little less features than either KDE[237] or Gnome, it contains a full range of lightweight applications for most of your needs. Having a smaller memory print and cpu usage makes it a good candidate for low-end workstations or for laptops, improving your battery life.

Installation

Xfce is part of Slackware installation media. The latest stable release, Slackware 14, comes with the latest version of Xfce, 4.10. During the installation process, please make sure that you select the Xfce package group. It gets a new package folder under “/slackware/xfce”.

Adding Xfce to an existing installation is straightforward:

darkstar~# slackpkg install xfce

To use full features (power management, managing external devices such as USB key, …) you have to be in the plugdev and the power groups. See managing users page[238].

Configuration

Startup

If you wish to make it your default starting environment, you can specify so at installation time. The choice can be made at the “SELECT DEFAULT WINDOW MANAGER FOR X” step.
After the system is already installed, you can switch between window managers by running the xwmconfig script as root and selecting Xfce:

darkstar~# xwmconfig

Looks

Xfce comes with a bundle of themes that changes the way Xfce looks and feels.
Changing the current theme is as easy as going to Settings → Appearance and selecting one of the preinstalled themes.
More themes, backgrounds, mouse cursors and other goodies are available at http://xfce-look.org/[239]

Keyboard setup

If you wish to configure your keyboard setup under Xfce, please visit the Xfce keyboard layout[240] page.

Additional Plugins

SlackBuilds.org[241] contains a wide range of Xfce plugins that aim at extending Xfce's functionality.

External links

Xfce 4.10 tour: http://www.xfce.org/about/tour[242]

Xfce FAQ: http://wiki.xfce.org/faq[243]

Xfce Looks: http://xfce-look.org/[244]

Sources

Originally written by KookieMonster[245]

slackware

External sites with Slackware related information

Slackware documentation and articles relating to Slackware can be found in many places.

If you could not find what you were looking for in this Wiki, try your luck with any of the following locations. And consider (after finding what you were looking for) if perhaps you could add the missing information as a new page or as a page update to this Wiki. We would be very grateful!

Documentation sites

The Slackware Essentials Book[246]
The original Slackware compendium

The SlackWiki[247]
One of the oldest Slackware related Wiki's

Alien's Wiki[248]
Eric Hameleers[249]'s documentation and tutorials.

LQ Slackware Wiki[250]
Many goodies in this much overlooked corner of linuxquestions.org

Slackware Linux Basics[251]
Daniel de Kok's book about basic Slackware administration

Slackware Presentations

Slackware Demystified[252] - Vincent Batts, June 2011.

A history of Slackware development[253] - Eric Hameleers, October 2009.

An introduction to Slackware packages[254] - Stuart Winter, February 2005.

Forums newsgroups and IRC

LinuxQuestions.org or LQ[255]: a friendly and active Linux Community with many forums on anything Linux related and a dedicated Slackware forum. This is the place to go should this wiki not provide the answer you are looking for.

Slackware newsgroup[256]: You can connect to the Slackware newsgroup alt.os.linux.slackware through your own newsgroup reader or you can use google groups with your browser. In newsgroups you can also post questions. Many countries also have a local slackware newsgroup in which you can post in your own language.

IRC:#slackware at freenode.net[257]: You can connect to Slackware's room through your favorite client. Host: #slackware. Port: 6667. With IRC you can chat directly with other slackware users and gurus(experts).

News articles

Slackware Activity Aggregator[258] Slackware RSS feeds.

Local Communities

Slacky.eu[259] The Italian Slackware community.

Slackware-fr[260] The French Slackware community.

Slackware.ir[261] The Iranian Slackware community.

Slackware-pl[262] The Polish Slackware forum / community.

Fan sites and blogs

A Slackware Desktop Enhancement Guide[263]

Alien Pastures[264]

Erik Jan Tromp's site[265]

Goblin's Slackware stuff[266]

Linux basic configurations[267] A blog with some Slackware-specific articles.

Nocturnal Slacker v1.0[268] V.T. Eric Layton's Slackware and General Linux/Open Source blog.

Pimp my Slack[269]

Robby Workman's Homepage[270]

SlackBlogs[271] Willy Sudiarto Slackware blog.

Some Slack[272]

SysAdmin Adventures[273]

The Slack World[274]

Tiny Unix Wiki[275] The Tiny Unix Wiki, a wiki about many flavours of Unix and Linux, including Slackware

Ports

Slackware ARM[276] The official port of the Slackware Linux distribution to the ARM architecture.

Slackware for Pandora[277] The Open Pandora pocket PC port.

external

Slackware-Current

Overview

Slackware -Current is the development branch of Slackware that eventually gets released as a stable version when considered ready (and then split again, as the development branch for the next version). It is similar in function to the testing branch of other distributions and the same caveats apply to -Current.

Tracking the Current Branch

To track the Current branch, it is recommended that you

cleanly install or upgrade your installation to the latest stable version first, following the instructions and information in the appropriate UPGRADE.TXT and CHANGES_AND_HINTS.TXT files found on the CD/DVD or the Slackware Linux online mirror.

edit the /etc/slackpkg/mirrors file and comment out the mirror pointing to your stable version and uncomment one of the mirrors pointing to the current branch. For example, if you're using the Switzerland mirror and currently on the 13.37 stable release for Slackware 64-bit, then comment out the line

# http://mirror.switch.ch/ftp/mirror/slackware/slackware64-13.37/

and uncomment the line

 http://mirror.switch.ch/ftp/pool/3/mirror/slackware/slackware64-current/

or any other mirror point to the -current branch.

run the command (as root)

slackpkg update

read the ChangeLog file present in /var/lib/slackpkg/ChangeLog.txt for what applications and libraries are upgraded and which new packages are included.

upgrade to the current branch in the normal fashion. See full system upgrade[278] for more information.

keep the current branch up-to-date by following steps 3 to 5 above (you could also automate the update-checking with a cron[279] job.)

Do not track the Current branch on production systems as it is a test-bed for upcoming releases. It is recommended that you use the latest stable release with the security updates instead.

Sources

* Originally written by Harishankar[280] for the SlackDocs Wiki Project.

slackware

What is Slackware Linux?

The Official Release of Slackware Linux[281] by Patrick Volkerding[282] is an advanced Linux operating system, designed with the twin goals of ease of use and stability as top priorities. Including the latest popular software while retaining a sense of tradition, providing simplicity and ease of use alongside flexibility and power, Slackware brings the best of all worlds to the table.

Originally developed by Linus Torvalds in 1991, the UNIX®-like Linux operating system now benefits from the contributions of millions of users and developers around the world. Slackware Linux provides new and experienced users alike with a fully-featured system, equipped to serve in any capacity from desktop workstation to machine-room server. Web, FTP, and Email servers are ready to go out of the box, as are a wide selection of popular desktop environments. A full range of development tools, editors, and current libraries is included for users who wish to develop or compile additional software.

The Slackware Philosophy

Since its first beta release in April of 1993, the Slackware Linux Project has aimed at producing the most “UNIX-like” Linux distribution out there. Slackware complies with the published Linux standards, such as the Linux File System Standard. The Slackware team have always considered simplicity and stability paramount, and as a result Slackware has become one of the most popular, stable, and friendly distributions available.

See also: The Slackware Way[283]

Slackware Overview

Slackware Linux is a complete 32-bit and 64-bit multitasking “UNIX-like” system. It contains an easy to use installation program, extensive online documentation, and a menu-driven package system. A full installation gives you the X Window System, C/C++ development environments, Perl, Python, networking utilities among which mail, news, web and ftp servers, the GNU Image Manipulation Program, Mozilla Firefox, plus many more programs. Slackware Linux can run on 486 systems (older releases) all the way up to the latest x86 machines (but uses -mcpu=i686 optimization for best performance on i686-class machines like the P3, P4, Duron/Athlon, and the latest multi-core x86 CPUs) as well as on any AMD64-compatible machine.

References

http://slackware.com/info/[284]

See also Wikipedia[285]

External links

Official website[286]

Interview with Patrick Volkerding[287]

Interviews with other members of Slackware development team on SlackWorld[288]
(site cloned from its archive on https://github.com/ayaz/SlackWorld[289])

slackpkg

Slackpkg is an automated tool to manage local packages and to install new package over a network. Nowadays slackpkg comes as part of Slackware, but if you do not have it installed, the latest version can be downloaded from slackpkg.org[290] and installed with installpkg.

Configuring

Before slackpkg can be used it needs to have a current list of packages and their versions and that can be downloaded automatically by the tool itself once a mirror site is selected. To select a mirror, just uncomment a single URL in the file /etc/slackpkg/mirrors. Note that the links are sorted by Slackware release versions so make sure that the selected link is in the same release that you are interested in. It is recommended, though not required, that you use the mirrors.slackware.com mirror, as that one will automatically redirect you to your geographically closest mirror.

Then run:

darkstar~# slackpkg update gpg

The next step would be to update the package list with:

darkstar~# slackpkg update

If there hasn't been a change to the list, you will be prompted with:

No changes in ChangeLog.txt between your last update and now.
Do you really want to download all other files (y/N)?

Otherwise slackpkg will download and install the current package information and will use that list.

Blacklisting

slackpage will take into consideration any pattern from /etc/slackpkg/blacklist. For example the following patterns will make slackpkg disregard any package that was installed from SBo[291] and from alienBob's repository:

[0-9]+_SBo
[0-9]+alien

Usage

Read this entire page before using slackpkg, especially the part about Full System Upgrades, if you are or plan to run Slackware -current.

Slackpkg uses patterns to search install and remove packages. The pattern will be searched on the list of packages and any package that matches the pattern is shown.

Search

Searching a package will show you information about the package full name, version and installed status.

darkstar~# slackpkg search mc
Looking for mc in package list. Please wait... DONE
The list below shows all packages with name matching "mc".
[ installed ] - mcelog-1.0pre3-i486-1
[uninstalled] - pcmciautils-017-i486-1
[ installed ] - mc-4.8.1.3-i486-1
[ installed ] - libmcrypt-2.5.8-i486-1

file-search

To search a specific file and later install or remove the package that contains this file:

darkstar~# slackpkg file-search sshd
Looking for sshd in package list. Please wait... DONE
The list below shows the packages that contains "sshd" file.
[ installed ] - openssh-6.0p1-i486-2

info

To get information about a package slackpkg Info packagename will print the package's information to the screen.

install

To install a package use slackpkg install pattern. If a package was found a dialog window will present any packages that matches to the pattern and the user can un/check which packages to install.
To install everything in a branch you can type: slackpkg install branch for example slackpkg install kde will install everything under kde (but nothing from kdei).

remove

To remove a package use slackpkg remove pattern. If a package was found a dialog window will present any packages that matches to the pattern and the user can un/check which packages to remove.

upgrade

If an update is available for a certain package, it can be updated with slackpkg upgrade packagename.

reinstall

This command can be used if a package became broken and needs to be re-installed.

blacklist

This can be used to add a certain package to the blacklist. Blacklisted packages are being disregarded by slackpkg.

generate-template

If you need to re-install the entire system or install a new PC that will have similar installed packages, a user can generate a template to be installed later.

install-template

This command is used to have all the packages in a template be installed on this PC.

install-new

Running slackpkg with this argument generates a list of packages that were introduces to the Slackware recently, for example new dependencies to a package. It is advisable to run this command before updating the system if you synchronize to slackware-current.

upgrade-all

Running slackpkg with this argument will generate a list of all packages that can be upgraded with a new version. The user can un/check which packages to upgrade from a dialog list.

clean-system

Running slackpkg with this argument will generate a list of all packages that are obsolete and can be safely removed from the system. Note that non-official packages will be listed here unless blacklisted.

new-config

During installation a new configuration file might be installed and overwrite your configurations. To prevent that the file will receive a “.new” prefix and after installation slackpkg will inform the user about the existence of these files. Running slackpkg with this argument will search for the existence of these files and will ask the user for instructions.

check-updates

Running slackpkg with this argument will produce a clean printout if there are any available updates.

Full system upgrade

To perform a full system upgrade, please follow these steps (as root user):

slackpkg update
slackpkg install-new
slackpkg upgrade-all
slackpkg clean-system

It is always recommended to read the latest ChangeLogs and UPGRADING.TXT (found on the HTTP/FTP mirrors for each version) before doing any major system upgrades.
There's a separate article[292] dedicated to doing a full system upgrade which you should definitely read first.

Pay attention to changed configuration files. Update them either by merging your customizations from the older configuration files (Slackpkg can optionally step through every changed configuration file and allow you to resolve the changes) or manually editing the new files after allowing Slackpkg to overwrite the old configuration files. You decide which way works best for you.

External Links

SlackPKG home page: https://slackpkg.org/[293]

slackware, slackpkg

Out of the box Slackware PXE Server

Slackware has added a PXE server to its installer since the 13.37 release[294]. It is intended to provide an easy method for network installations of Slackware, provided you have one spare computer with a network card (not a wireless card!!!) This article describes the procedure for a network installation using the built-in PXE server, using the Slackware 13.37 installation media as an example (but it will work for later versions of Slackware just as well):

Requirements

A Slackware DVD or bootable USB stick, containing a complete set of Slackware package directories. A net-boot “mini-ISO” or a bootable Slackware CDROM are not sufficient because they do not contain all Slackware packages. The PXE server in the installer is not able to use an external package source - all packages have to be present on the boot media.

Starting the PXE server

Insert the Slackware 13.37 DVD into the spare computer, and boot from the installation medium.

Alternatively you can create a USB installer using a Slackware DVD as the source (or use a full local mirror of a Slackware release tree), with the help of the “usbimg2disk.sh” script which you will find in the Slackware release's “usb-and-pxe-installers/” directory

* Boot the spare computer from the Slackware installation medium, and when this ends with a login prompt (see screenshot below), login as “root” (no password required).

Instead of typing the usual “setup” command to start an installation, you type “pxesetup” instead this time, in order to configure and start the embedded PXE server:

Overview

The “pxesetup” script will load a main dialog which is modeled after the Slackware setup:

There are four relevant main selections (apart from EXIT which will drop you back to the prompt): HELP, NETWORK, SOURCE and ACTIVATE. An explanation for these choices follows from the screenshots below, and you will see that there is surprisingly little for you to configure… it is very user-friendly.

HELP:
The HELP section should be self-explaining – it is the manual for the PXE server:

Configuring the PXE server

Use the NETWORK and SOURCE sections of the main menu to configure your PXE server.

NETWORK:
In the NETWORK section you configure the computer’s network card:

If you boot this PXE server in a network where a DHCP server is already providing automatic network address assignment (in the typical domestic setup, it is the Cable/DSL router which provides the DHCP server) then pxesetup will prompt you to ask that DHCP server for an IP address. It saves you from typing IP addresses and netmasks. You can of course still decide to enter a specific static IP address even if there is a DHCP server available, by clicking “No”:

If no DHCP server was found in your local network (Slackware’s installer checks this when it boots and before you even see the command prompt), then have no choice but to enter a static IP address, netmask and possibly (but not necessarily) a default gateway:

After the network interface has been configured, you will see a number of dialogs that let you determine whether the installer should start a DHCP server or not. If your network already runs a DHCP server, then it should not be disrupted by a “rogue” DHCP server! You will have an angry network administrator at your desk in no time.
Instead, pxesetup is smart enough that it only provides the required netboot functionality by acting as a proxy DHCP server:

A working DHCP server is required for PXE boot. So, if your network does not provide one, pxesetup will start its own built-in DHCP server and it will show you two additional dialogs in order to collect the required information:

The setup program tries to make an educated guess about the range of IP addresses to be used if it is going to start a DHCP server. A dialog will present the proposed configuration. There are two configurable items in that dialog: the lower and upper values for the IP address range that will be used by the built-in DHCP server.

The IP addresses in this range will be available for the PXE clients that request a network boot configuration from the PXE server. Please check this address range, and if you think you have a computer in your network that uses an IP address in this range, you must change the values for the upper and/or lower values and resolve the conflict.
This range of IP addresses must not be used by any computer on your LAN !

If you are satisfied with the values, select “OK” to continue to the next section.

SOURCE:
The SOURCE section uses the exact same dialog screens as you know from the Slackware installer. The only correct selection is “Use a Slackware DVD” (There is one exception which I will explain in more detail all the way down, and that is when you used the “usbimg2disk.sh” script to create a complete Slackware installer on a bootable USB stick):

The pxesetup program will find the Slackware DVD or CD and that’s it!
More information is not required and the PXE server will be started automatically. Another service is started as well at that moment: a HTTP server which will serve up Slackware packages to the clients that use our PXE server.

On-screen you will see the log file of the “dnsmasq” program which provides most of the netboot functionality. The first screenshot is the case where your network provides a DHCP server, while the second screenshot shows the situation where the Slackware PXE server has started its own internal DHCP server:

You can press the “EXIT” at any time, which will kill the PXE services (DHCP, TFTP and HTTP). You can then restart these services from the main menu again, by selecting the ACTIVATE entry.

PXE server works, what about PXE clients

There is no fun with a PXE server if you do not have PXE clients that use it to boot from so that you can install Slackware on them! Make sure that the computer that you want to install Slackware on is connected to the network with a cable, and power it up. In the BIOS (or using whatever method is available for that machine) select “LAN boot” and watch what happens when the computer boots. You will see a prompt that says:

Press [F8] for a boot menu…

Actually pressing the F8 key gives you two choices: continue with netbooting, or fallback to boot-up from the local hard disk. Or if you don’t do anything at all (takes 2 seconds only) your network card will start looking for a PXE server and the communication starts. This can be witnessed on the PXE server’s screen:

What happens next should all look pretty familiar: the Slackware welcome screen will appear and you can either press ENTER for the default kernel or make your own choice of parameters. The noteworthy part is where you get to select the package SOURCE. There is only one working option, and that is “Install from FTP/HTTP server“. After selecting this option, your computer’s network card will be configured using DHCP, and then you will notice that the questions for “URL of the ftp or http server where the Slackware sources are stored” and “What is the Slackware source directory?” have default values already filled-in! You should accept these values, since they are supplied by the PXE server!

The remaining steps should be familiar if you have ever tried installing from a HTTP server before.

Using a USB based installer instead of the CD/DVD

The “usbimg2disk.sh” script which you find in the “usb-and-pxe-installers/” directory on the DVD or any Slackware mirror, contains some functionality for making it easier to run the PXE server off the USB stick.
You need to create a full USB installer for this to work (“full” meaning that the USB stick is made bootable and all Slackware packages are copied to the stick).

If you boot this USB installer, the vfat partition on the USB stick (which contains the Slackware packages) will be automatically mounted on the installer's directory “/usbinstall”.

If you run “pxesetup” (or even if you run the normal “setup” by the way) and get to the point of selecting the package location in the SOURCE menu, you must pick option “3: Use a pre-mounted directory“. Actually, that item will be the default choice! When you select that option, you will notice that a value for that directory name has already been filled in.

All you have to do is to accept that directory name and you are in business.

Sources

Original source: http://alien.slackbook.org/blog/out-of-the-box-pxe-install-server-in-slackware-13-37/[295]

Originally written by Eric Hameleers[296]

slackware, install, pxe, slackware 13.37, slackware 14.0, author alienbob

Getting Involved

Getting involved in Slackware is quite easy. You can create Slackbuilds and submit them to SlackBuilds.org[297], participate in IRC, or on forums here at LinuxQuestions.org[298]

Some of the other ways in which new users can get involved with Slackware are:

Helping out other Linux users whenever possible. The officially recognized Slackware support forum can be found at LinuxQuestions.org[299].

Helping out with this documentation by:

Suggesting new topics and subjects.

Creating content, preferably original content.

Expanding or improving existing topics.

Proofreading, correcting spelling and grammar.

Related Pages

Ideas for contributing to the SlackDocs Wiki[300]

This page is a work in progress…

Common software

In case you are wondering whether you can use application X or Y in Slackware, the following list will help you answer your browsing, multimedia, office… needs.

Web-browser

Firefox

Chrome[301]

Opera[302]

Lynx

Flash-plugin[303]

Java[304]

File Management

Dolphin

Thunar

Midnight Commander

Rodent

Ranger

Chat & IRC

Pidgin

Kopete

Irssi

Skype[305]

XChat

WeeChat

Torrent clients

ktorrent

rtorrent

Office

LibreOffice[306]

Calligra

OpenOffice

TaskWarrior[307]

Email

Thunderbird

Kmail

Claws Mail

Mutt[308]

mailx

RSS Readers

Thunderbird

snownews[309]

Multimedia

VLC[310]

Mplayer

Rythmbox

Audacious

XMMS

gogglesmm

Graphics

GIMP[311]

Inkscape

Darktable

Digikam

Blender

Development tools

Eclipse

Vim[312]

Emacs[313]

Database

MySQL[314]

Postgresql

SQLite

Virtualization

Virtualbox

kvm

qemu

Other

Google Earth

Marble

Wine

Sources

slackware

Configure your new Slackware System

We'll assume you've read the Installation Guide[315], and you have a clean install of Slackware on your machine that you're happy with.

This beginner's guide is meant to put you firmly on the Slackware path. If you installed Slackware for the first time, you may be daunted by the sight of the blinking cursor at a console login. Let this page guide you through the initial configuration of a freshly installed Slackware system.

Before we continue, it is important to realize that the Slackware package manager does not perform any dependency checks. If you are new to Slackware, then performing a full installation (with the possible exception of the KDEI series[316]) could prevent a lot of problems later on.
The official Slackware recommendation ⁷⁾ is “If you have the disk space, we encourage you to do a full installation for best results”.

Post Installation Overview

When Slackware starts for the first time after completing the installation and rebooting, you will notice that it boots to a console log in screen - not the graphical login screen you may expect from using other distributions. Do not let that discourage you. It is the first stage in a learning experience which will make you a lot more knowledgeable in Linux after as little as a few weeks.

The installation did not offer to create a user account. At this stage, there is only the “root” account. You should remember the root password, which you set at the very end of the installation procedure. Login as “root” now - you will find yourself at a “#” console root-prompt.

So now what? The “root” user is not the account which you are going to use as a matter of routine. Root is meant for system maintenance and configuration, software upgrades and the like.
The first thing to do is create a fresh user account for yourself, without the root privileges. After that, it is time to start considering the installation of “Proprietary Graphics Drivers[317]” (if you own a Nvidia or Ati card), setting up a wireless network connection or starting a graphical desktop environment. There is a lot that you can do with Slackware! Let's start with the basics.

Create a User Account

The first thing you will need to do is create your own non-root user account. There are two ways you can do this, both from the console. The recommended way is to use Slackware's own interactive adduser script, thus:

# adduser

and follow the prompts. Read the user management[318] page for more detail on the adduser script. You can use the non-interactive standard Linux program useradd too:

# useradd -m -g users -G wheel,floppy,audio,video,cdrom,plugdev,power,netdev,lp,scanner -s /bin/bash slacker

Once that’s done you can log in to your user account.
Log out of the root account (type logout at the root prompt) and then login using the new account you just created. Now come the really interesting adventures!

Make Slackware Speak your Language

Slackware's installer is English-only and it will also assume that English is the language in which you want to be addressed by the programs on your computer. If you are a non-English speaker and want your Slackware system to “talk” to you in your own language, you should check out our instruction article “Localization: Adapt Slackware to your own Language[319]”

Configure a Package Manager

Now that you have Slackware running, you should consider spending a bit of time caring for your computer's good health. The software which was installed as part of the Slackware release you are running, may develop vulnerabilities[320] over time. When those vulnerabilities are critical to the health of your computer, then Slackware will usually publish a patched version of the software package. These patched packages are made available online (in the /patches directory of the release) and announced on the Slackware Security mailing list[321].

You have various options in order to keep your Slackware installation up-to-date. It's not advised to make the process of applying security updates fully automatic, but it is possible to do so using a cron job.

slackpkg

Your best option is to use slackpkg[322], which is a package manager on top of Slackware's own pkgtools[323]. Before you can use slackpkg you will need to define an online mirror from which it will download updates to your computer.

A list of available mirrors for your Slackware version can be found in this file:

/etc/slackpkg/mirrors

Open the file in a text editor such as nano or vi and uncomment a single mirror URL. Make sure that the URL mentions the release number for the version of Slackware you are running! Also, pick a mirror which is close to you or of which you know it is fast. When you have done that, you need to initialize slackpkg's database by running

# slackpkg update gpg
# slackpkg update

Note that package management is done as the “root” user!

You will need to update the slackpkg database from time to time, when you learn about the availability of new patches for your distribution. After updating the database you can let it download and install the updates. Again, see the slackpkg[324] page for guidelines about the use of this tool.

Installing updates using slackpkg

The slackpkg update command will connect to a Slackware mirror and update the local package information database on your computer. This command does not actually install any package!
The usual routine for upgrading your Slackware to the latest patches is as follows:

# slackpkg update
# slackpkg install-new
# slackpkg upgrade-all
# slackpkg clean-system

The “install-new”, “upgrade-all” and “clean-system” commands will always show you a list of candidate packages to act on before excecuting anything. This allows you to review the suggested package alterations and select/deselect anything you do not agree with.
The “clean-system” is technically only needed after you upgrade from one Slackware release to the next (say, from 14.1 to 14.2) and it is meant to remove any Slackware package which is not (or no longer) part of the core distribution.

The slackpkg clean-system command regards any 3rd package as a candidate for removal! Therefore, be smart with your blacklist (/etc/slackpkg/blacklist)

Watching for Updated Packages

The Slackware Essentials book has a chapter about keeping up to date[325]. It would be good if you read it now if you have not done so already.

One way to look out for updated packages (patches) is to subscribe yourself to the Slackware Security[326] mailing list and act when you read about new patches.

Another way is to setup a script to check for updates once a day and make the script email you when updates are available.
For this to work you need to have sendmail configured (although it usually runs out of the box) and know how to create a cron job. And of course, have a script that does the work.
An example of such a script is rsync_slackware_patches.sh[327] which watches the Slackware ChangeLog.txt for updates. You download the script, edit it to use your favorite mirror server and make it executable so that it can be used in a cron job:

# wget http://www.slackware.com/~alien/tools/rsync_slackware_patches.sh -O /usr/local/bin/rsync_slackware_patches.sh
# chmod +x /usr/local/bin/rsync_slackware_patches.sh

The script uses a couple of defaults which you may want to change to suit your environment - such as the location where the script will download the patches to.
Simply run the script once, and see what it reports:

# /usr/local/bin/rsync_slackware_patches.sh
[rsync_slackware_patches.sh:] Syncing patches for slackware version '13.37'.
[rsync_slackware_patches.sh:] Target directory /home/ftp/pub/Linux/Slackware/slackware-13.37/patches does not exist!
[rsync_slackware_patches.sh:] Please create it first, and then re-run this script.

You notice that you will have to edit the script and define a local directory (and create that directory too!) for the script to use. When that is done, you should run the script once - for a first-time download of patches.
Then you can use cron to run the script once a day. For instance, schedule the script to run at 05:33 every day, and let it check for updates to the 64-bit version of Slackware-13.37. Open the crontab editor by typing

crontab -e

and then you add the following line to your cron table:

33 5 * * *      /usr/local/bin/rsync_slackware_patches.sh -q -r 13.37 -a x86_64

This command will be executed silently (meaning you will not get emailed) if no new patches are found. However when the script finds updates it will download them and email you the script's output. You will get an email like this:

[rsync_slackware_patches.sh:] New patches have arrived for Slackware 13.37 (x86_64)!
.......................................................................
0a1,10
> Mon Sep 10 20:26:44 UTC 2012
> patches/packages/seamonkey-2.12.1-x86_64-1_slack13.37.txz:  Upgraded.
>   This is a bugfix release.
> patches/packages/seamonkey-solibs-2.12.1-x86_64-1_slack13.37.txz:  Upgraded.
>   This is a bugfix release.
> +--------------------------+
> Sun Sep  9 19:11:35 UTC 2012
> patches/packages/mozilla-thunderbird-15.0.1-x86_64-1_slack13.37.txz:  Upgraded.
>   This is a bugfix release.
> +--------------------------+

And then you know you have to update slackpkg[328] and make it install the latest patches. This gives you control over your updates (you decide when you update) while being automatically warned about the availability of new patches (which will already have been downloaded for you).

Configure your Network

If you installed the network packages, then at the end of the Slackware installation, you will have been asked a couple of simple questions, like:

do you use DHCP;

or else, what IP address do you want to use;

what is your computer's hostname;

do you have a (DNS) nameserver in the network?

All of these questions have resulted in the setup of a few network related configuration files.

/etc/rc.d/rc.inet1.conf
This is where the details for your network interfaces go. Slackware's netconfig tool will only configure your eth0 interface. If you have additional network interfaces, you can edit the file with a text editor such as nano or vi and add you configuration details. There is a man page for this:

man rc.inet1.conf

/etc/resolv.conf
This is where your nameserver and domain search list are added. If you use DHCP then the DHCP client will update the file. If you use static IP addresses, then you are supposed to edit the file yourself. There is a man page for this:

man resolv.conf

/etc/HOSTNAME
This is where your computer's hostname is defined.

/etc/hosts
This is where you will find a definition for your loopback interface which connects that to your hostname. You can add further hostname-to-IP-address mappings in this file if you do not use a DNS server or if you need specific mappings which the DNS server does not provide. There is a man page for this:

man hosts

If you want to read in more detail about how to configure your network, have a look at this online comprehensive guide to networking in Slackware[329].

Traditional Network Configuration

Wired Network

To configure your wired network interface eth0, run (as root)

# netconfig

The same script which was run during the installation process.

netconfig only deals with the wired connection for eth0.

On the assumption that you configured your wired connection with netconfig, your network should be connected automatically without the need for any post-installation configuration.

If you didn’t enter your network configuration details during installation, just run netconfig as root; then run

# /etc/rc.d/rc.inet1 eth0_start

and you should have a working network connection instantaneously.

Wireless

Most common wireless hardware is supported by Linux these days. You can search online if your wireless hardware is supported by 3rd parties that have written Linux drivers. If you want to know if your computer recognizes your wireless card, simply run

# iwconfig

as root. If that tool reports “no wireless extensions” for all your network interfaces then the kernel does not have a driver for your wireless card and you'll have to find one online.

As with the wired network interfaces, your wireless card is traditionally configured in the file /etc/rc.d/rc.inet1.conf. You can read a lot more about it in this wireless configuration guide[330]. There is also the man page:

# man rc.inet1.conf

You will also need to take steps to include wireless security, whether WEP or WPA2. Unencrypted wireless connections are strongly discouraged. Note that WPA/WPA2 encryption is not configured just in /etc/rc.d/rc.inet1.conf, you will also need to edit /etc/wpa_supplicant.conf and add an encryption key there.

Wireless encryption issues, in particular for WPA, can be hard to troubleshoot. Some basic troubleshooting steps are detailed in the above networking guide[331], just in case you do not get your computer associated to the Access Point.

Graphical Network Configuration Services

Slackware currently has some alternatives to configure and monitor your network connections. These install a daemon (aka a background service) which will allow you to switch between wired and wireless connections easily. That makes them perfectly suited for mobile users. They come with graphical configuration utilities and do not depend on the traditional Slackware configuration files - in fact, those files will cause conflicts if they contain network configuration.

You will find wicd[332] in the extra section of the Slackware release tree (the word extra means that it is not part of the core distribution and will not have been installed as part of a full installation).
After installing the wicd package, you have to make its init script executable so that the network daemon automatically starts at boot:

# chmod +x /etc/rc.d/rc.wicd

You can then configure your network using the graphical tool wicd-client or if you are running Slackware 14 you can use the KDE widget for wicd instead. For console lovers, there is also wicd-curses which offers the same configuration capabilities as the X-based counterparts.

Starting with Slackware 14, there is also Networkmanager[333]. It will be installed as part of a full install, but the network daemon will not be started by default. As with wicd, you have to make its init script executable:

# chmod +x /etc/rc.d/rc.networkmanager

which will make NetworkManager start at boot. You will have to configure NetworkManager using an X-based graphical utility.
Slackware 14 includes a KDE widget for Networkmanager. If you are using another Desktop Environment like XFCE, you can install the Gnome network-manager-applet from SlackBuilds.org[334].

Switch to a generic kernel

It's recommended that you switch to Slackware's generic kernel. This is easy to do but there are a few steps to follow.

What is the difference between a “generic” kernel and the “huge” kernel which has been installed as the default kernel?
The “huge” kernel is essentially a kernel which has every hardware driver built in which you might need for a successful installation of your computer. Think of storage and (wired) network drivers, filesystem and encryption drivers and a lot more. All these built-in drivers result in a big kernel image (hence the name “huge”). When this kernel boots it will use up a lot your RAM (relatively speaking… with 1 GB of RAM you will not really be troubled by a few MB less RAM).
The “generic” kernel on the other hand, is a kernel which has virtually no drivers built in. All drivers will be loaded into RAM on demand. This will make your kernel's memory consumption lower and the boot process a bit faster. The smaller size allows for the use of an initial RAM disk or “initrd”. An initial RAMdisk is required in certain configurations, like software RAID, or a fully encrypted hard drive.
For now, you need to remember that a “huge” kernel will not support an intial RAM disk, but the “generic” kernel will. We go for maximum flexibility and use a “generic” kernel.

You will need to create an initial RAM disk (“initrd” for short). The initrd functions as a temporary root file system during the intial stage of the kernel booting, and it helps get the actual root system mounted when your system boots. Run this, as root:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh

This command will not actually do anything. It is informational only, and will output something like this - depending on your kernel version, your hardware configuration, the root filesystem you chose when you installed Slackware and so on:

#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:ehci-hcd:usbhid:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

Run the script's suggested mkinitrd commandline (as root) to generate the initrd.gz image.

If you have installed LILO (the default bootloader of Slackware), then you will also need to make changes to its configuration file /etc/lilo.conf by adding a section to your Slackware entry as follows:

image = /boot/vmlinuz-generic-3.2.29
initrd = /boot/initrd.gz # add this line so that lilo sees initrd.gz
root = /dev/sda1
label = Slackware
read-only

Actually, the “mkinitrd_command_generator.sh” script will show an example section which can be added to /etc/lilo.conf if you pass it the name of the generic kernel as an argument, like this:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29

Note that it is recommended to add a new section instead of editing the existing kernel image section. Assign a unique label to your new section. After reboot, LILO will give you two options: to boot into your freshly added generic kernel, or to boot into the failsafe huge kernel (of which you are certain that it will work).

After making the changes to /etc/lilo.conf you have to save the file and then run

# lilo -v

to make your change permanent. Then, reboot.

Have a look at mkinitrd manual page (man mkinitrd) for more information.

If you use grub or another bootloader, then make changes which are applicable to the program you use.

If you try to use the generic kernel without creating an initrd.gz, then booting will fail with a kernel panic.

Start a Graphical Desktop Environment

Configure X If Required

X.Org[335] is the X-Window framework used in Slackware. The X server will usually auto-detect your graphics card and load applicable drivers. If auto-detect does not work (X crashes on startup), you will need to create a file /etc/X11/xorg.conf and set the correct options for your graphics card and display resolution. You can use

# X -configure

to generate a basic xorg.conf configuration file in your current directory. This file can then be customized and placed in the /etc/X11/ directory. For a detailed overview of X configuration, check the xorg.conf manual page (man xorg.conf).

Non-free Display Drivers

Many people use computers with a modern graphics card powered by a Nvidia or Ati GPU (graphics processing unit). The vendors of these high-performance graphics card offer non-free (proprietary binary-only) drivers for their cards. These binary-only drivers will boost your computer's graphical and in particular OpenGL[336] performance. If you own such a card you may want to read our Wiki article “Proprietary Graphics Drivers[337]”.

Choosing a Desktop Environment/Window Manager

To choose the Window Manager[338] or Desktop Environment[339] you wish to use, run the xwmconfig utility:

$ xwmconfig

and select one of the available options. Note that you can run the xwmconfig command as the root user which will set a global default for all users. By running the same command as your ordinary user account, you override that global default and pick your own.
After making your choice you can simply run

$ startx

Your preferred Desktop Environment or Window Manager will then start up.

Graphical Login

To start with a graphical login screen on boot instead of Slackware's default console login, change the default runlevel to 4. Edit the file /etc/inittab and change the line that looks like

   id:3:initdefault:

to

   id:4:initdefault:

Note the difference from other Linux distributions; many of those use runlevel 5 for their graphical login. In Slackware, runlevel 5 is identical to runlevel 3 (console boot).

In the graphical runlevel, you will be greeted by one of the available display (login session) managers. Slackware will by default look for the availability of GDM (Gnome Display Manager), KDM (KDE Display Manager) and XDM (X Display Manager) - in that order. You can also install a third-party login manager like SliM[340] but you will have to edit /etc/rc.d/rc.4 and add a call to your new session manager all the way at the top.

Further Exploration

The Command Line

It may be of interest to new Linux users to explore the command line a bit more before installing a graphical desktop, just to learn some shell commands and applications available in non-graphical mode. Slackware excels in having an abundance of command line programs for a wide range of tasks.
For instance, web browsing can be done with lynx or links, which are console based web browsers. You can listen to music (even network audio streams) on the console using audio players like moc, mpg123, ogg123.

Mixing 64-bit with 32-bit

If you just installed the 64-bit version of Slackware (often called slackware64 or Slackware for x86_64) you will soon discover that it will refuse to run 32-bit programs like Wine[341]. You may want to read our page on adding multilib capabilities[342] in that case.

Slackware Documentation

Even a Slackware user can benefit from good documentation (why else are you reading this?). Our suggestion is that you browse this Wiki for additional tips and HOWTOs. And don't forget to check out the root directory of the Slackware DVD or CD1! You'll find Slackware's own main documentation there. Every text file there is worth a read.

Upgrading the System

If you have been using Slackware for a while and want to upgrade to the next release once that becomes available, we have a nice HOWTO[343] available here: Upgrading Slackware to a New Release[344]

When tracking current[345], you should always read the latest ChangeLog.txt before upgrading the system, to see whether any additional steps are required to be performed before or after upgrading. For upgrades to a stable release, it is a good idea to read the UPGRADE.TXT and CHANGES_AND_HINTS.TXT files located on the CD/DVD or the official mirror.

slackware, beginners, guide

⁷⁾

see the Slackware-HOWTO in the root of the DVD or CD1

KDE

KDE Software Compilation (KDE SC) is a desktop environment[346] that provides the user a full graphical experience and includes a large number of applications, ranging from browser to photo-editing software. It is based on the Qt toolkit.

Introduction

Installation

New Installation

KDE is included in the installation DVD and is the default environment if you perform a full installation.

During the installation[347] process, please make sure that you select the KDE (and KDEI for international language support if needed) package series.

Adding KDE to an existing install

If KDE was not selected during the installation process, it can be installed later using the slackpkg program as follows:

darkstar~# slackpkg install kde

All packages under the kde branch will be selected for installation. You can deselect individual packages that you want to skip during installation, before you press ENTER to start the actual installation.

Custom packages

If you wish to use a more recent version of KDE than either the stable or current branch, you can use some more up-to-date packages. AlienBob's ktown[348] provides the latest software collection and the needed steps to perform the installation. Keep in mind that those packages are not officially supported by Slackware.

Configuration

Visual Unification

Non KDE applications will revert to generic GTK look and feel and will not have the same visual styling as KDE packages.
As a work-around there are a few packages that are available to help make a unification of look and feel between KDE and non-KDE applications.

kde44-oxygen-molecule

Can be downloaded from SBo[349]. After installing, go to System Settings → Application Appearance → Colors and select Oxygen-Molecule_3.
To make non-KDE applications read this setting, create a new file called .gtkrc-2.0 in your home directory and populate it with:

include "/usr/local/share/themes/kde44-oxygen-molecule/gtk-2.0/gtkrc"
style "user-font"
{
}
widget_class "*" style "user-font"
gtk-theme-name="kde44-oxygen-molecule"
gtk-font-name="fontname fontsize"   //  (for example: "Sans 10")

Sometimes the same file needs to be named “.gtkrc-2.0-kde4” so it is a good practice to have both files:

darkstar~# ln -s .gtkrc-2.0 .gtkrc-2.0-kde4

Keyboard setup

Should you wish to configure your keyboard setup, please look at the kde keyboard layout[350] page.

Troubleshooting

External links

What about switching to KDE4 ? (in French)[351]
Introducing KDE4 for newbies and explaining all the quirks you need to grasp to be able to use it for production. The article is based on a stock Slackware 13.37 system, so everything actually just works as is. This is a six-page article by Kiki Novak, written in french and published in the french print magazine Planète Linux (66th issue, September-October 2011). Important note of the author: I own the rights for this article, so I decided to link to it here. Feel free to cannibalize it as you wish: take bits from it, include it partly or as a whole in the wiki, translate it, etc. To make the task easier for you, here's a link [352] to a compressed archive in ZIP format containing all the individual files used in the production of the article, like the original text in ODT format, and a dozen screenshots in PNG format. Enjoy ;o)

The Slackware Way

Slackware maintains a KISS philosophy. It uses text files for configuration instead of GUI configuration programs like many other distributions.

The main highlights and features of Slackware and the philosophy behind the distribution can be summarized as below.

Distribution Philosophy

Slackware is:

A distribution that can be installed entirely offline with the CD/DVD set.

A distribution which is released when stable and not according to a fixed schedule. Every release of Slackware Linux is thoroughly tested by the Slackware team and the community. Slackware places high value on stability rather than the “newness” or “freshness” of software.

A distribution where “simplicity” is preferred over “convenience.” The lack of GUI helpers (common in many other commercial distributions) for system administration tasks is a case in point.

A distribution where system configuration and administration is done through simple ncurses helper scripts or by directly editing well-commented configuration files through a text editor.

A distribution that prefers to package “vanilla” software or software that hasn't been modified from upstream development. Little or no patching is done to upstream software and as a result, the software found in Slackware works as closely to what was intended by the original creators as practically possible.

A distribution that does not add layers of abstraction or complexity on top of existing solutions. For instance, Slackware package management is handled by simple scripts acting on compressed tarball package files (*.tgz, *.txz, *.tbz) and there is no dependency handling for package management.

A distribution which abides by the common-sense dictum “if it's not broken, don't fix it.”

A distribution where the major decisions are taken by the BDFL (Benevolent Dictator for Life, the current chief maintainer Patrick Volkerding) and where the development process is more closed than purely community based distributions. As a result, Slackware is highly focused on its core strengths and values and does not cater to every preference of its community or others. For this reason, there is less pressure on the Slackware development team to be popular and cater to the larger mass market.

Community

A few highlights of the Slackware Linux community may be mentioned. Even though technically a commercial distribution (the chief maintainer of Slackware, Patrick Volkerding sells the product on CD/DVD to support himself and the project financially, though ISOs are available as free downloads), Slackware has a highly devoted, tightly knit and enthusiastic user community that is friendly and helpful to new users. The Slackware community generally emphasizes user empowerment by learning and understanding the system rather than blindly copying instructions, a trend common in commercial proprietary operating systems. As a result, quite a significant proportion of Slackware users are also developers to a lesser or greater degree and are skilled enough, at the least, to create and debug simple shell scripts.

The availability of a large number of SlackBuilds[353] or build scripts for making third-party software installation easier in Slackware is a case in point. A common complaint about Slackware is the tediousness involved in installing third party software by hunting down dependencies from different sources online, downloading and compiling the software manually. The issue has been largely addressed by the community of developers who have created SlackBuild scripts for many commonly used applications and libraries that are not part of the official distribution. A popular and high quality repository of SlackBuilds can be found at http://www.slackbuilds.org[354].

Sources

Originally written by V.Harishankar[355] for the SlackDocs Wiki Project

SlackBuild scripts

A SlackBuild script is a shell script (usually Bourne shell compatible) that automates the process of configuring, compiling and creating a Slackware package (*.tgz, *.txz, *.tbz files) from source archives.

Overview

The basic process of creating a Slackware package from source can be summarized as follows, while details may vary from one build system to another.

Uncompress the source archive (usually .tar.gz or .tar.bz2 file) into a “work directory.”

Create a slack-desc file, with the description of the software in the correct format.

Configure the source, and apply patches if needed.

Compile/build the source and generate the binaries.

Install the program to a temporary directory. This step may be a little bit tricky, depending on how the make install (or similar functionality) of the build system works. In standard GNU Makefiles, the DESTDIR variable passed to the make install command should be sufficient. In non-standard Makefiles and build systems which don't support that option, this might involve patching the Makefile (or similar file) or editing a build configuration setting of the build system.

Copy the program documentation and other necessary files (including post-installation scripts) to the appropriate subdirectories in the temporary installation directory. These locations should adhere to default directory structure used by Slackware to store applications installed by the package manager, viz. inside the /usr/ folder.

Use the makepkg utility from the temporary directory (installation location) to create a Slackware package that can then be installed using the installpkg utility.

While the above steps can be done by hand, the process is tedious, sometimes complex, and involves typing in a lot of commands. Automating the process by a shell script allows the user to share the process with the community at large. It also makes sense to use and modify existing SlackBuild scripts for upgrading the same program to a newer version.

Creating SlackBuild scripts

A good hands-on tutorial on creating a SlackBuild script can be found here[356], and there are also a few templates[357] available to get a feeling for what is needed from a script.

However, software may be written in different programming languages, use different build systems, or may even simply be written in an interpreted programming language with no obvious way to “install” it. In such cases, many steps involved in writing a SlackBuild script will differ from the standard way. Blindly copying and pasting commands from other SlackBuild scripts may or may not work.

It is recommended that anybody who wishes to write a SlackBuild script, study and understand the build system of a software project before attempting to write a SlackBuild script for it. A degree of proficiency in writing shell scripts is also a definite benefit, as it is the practice to use Bourne shell compatible scripts for SlackBuilds. Ideally, simple C projects which use the standard GNU Make system is a good way to start practicing writing SlackBuild scripts.

For new script writers, it is a good idea to perform the above steps manually to create the package from source, before actually writing a SlackBuild script. This reduces the chances of bugs and unexpected behaviour in the script.

Submitting SlackBuild scripts to a public repository such as http://www.slackbuilds.org[358] may additionally require adherence to certain conventions and coding standards. For instance, it would be necessary for the script to determine the target architecture at runtime rather than hard-coding it into the script. These standards attempt to make SlackBuild scripts as portable as possible.

Automated SlackBuild generators

Some tools exist that can assist you with creating a SlackBuild script. Here are a few examples.

Alien's SlackBuild Toolkit (AST)[359]
A web-based “wizard” tool by Eric Hameleers[360]

mkslack[361]
A SlackBuild generator script by David Woodfall

External Links

SlackBuilds Repository - http://www.slackbuilds.org/[362]

SlackBuild templates - http://slackbuilds.org/templates/[363]

Sources

Originally written by V.Harishankar[364] for the SlackDocs Wiki Project

slackware, slackbuild

Flash Player

Flash Player[365] is, in most forms, a web browser plugin used primarily to play videos, games, advertisements and particularly gaudy websites. It is owned by Adobe[366], and is proprietary software.

Because of some parts of it's nature (it can be unstable, it is updated frequently, and these updates often are to fix security holes), it is not included in a default installation of Slackware. A SlackBuild[367] exists to install it, and there are packages[368] available on AlienBOB's FTP server. Both of these solutions are for Mozilla browsers only (Firefox, Thunderbird and Seamonkey).

Google Chrome[369] comes integrated with an up-to-date version automagically. If you prefer Chromium as your browser, you can download the chromium-pepperflash-plugin package[370] which contains the Flash library as extracted from the official Google Chrome binaries. This plugin package will work out of the box with AlienBOB's own chromium package[371].

If you are using Opera[372], you will have to download and install it manually.

Installation

Getting Flash Player on your computer is mostly just putting a file in the right directory, but it is different for every browser.

If you plan on using only the browsers bundled with Slackware, the SlackBuilds mentioned above are by far the simplest to install and maintain, thus they are recommended.

Mozilla browsers and Opera

If you would like to maintain it yourself, or you use Opera, you will need to:

Go to Flash's download[373] page.

Click on the link “Different operating system or browser?”

Under the box labeled “Select an operating system”, pick either “Linux (64-bit)” or “Linux (32-bit)”, depending on your architecture.

Under the box labeled “Select version to download…” select “Flash Player xx.x for other linux .tar.gz (xx-bit)”, then hit Download.

Unpack the newly downloaded .tar.gz file.

This will give you something like this:

darkstar:$ ls
install_flash_player_11_linux.i386.tar.gz
libflashplayer.so
readme.txt
usr

With adjustments to names depending on your architecture, of course. In any case, the file libflashplayer.so is the important bit. You will want to move that file into the correct directory for your browser.

For Mozilla browsers:

System-wide location is in the directory: /usr/lib/mozilla/plugins

Per-user location is in the directory: $HOME/.mozilla/plugins

For Opera:

System-wide location is in the directory: /usr/lib/opera/plugins

Per-user location is in the directory: $HOME/.local/lib/opera/plugins

Please note that Opera has no standard system-wide install point - the system-wide install path for libflashplayer.so is wherever Opera is installed, in a directory named plugins.

Either browser should then pick it up and start using it automatically. Don't be afraid to create the plugins folder in either case if it does not already exist. To uninstall, simply delete libflashplayer.so.

Additional Goodies

You may have noticed that, after unpacking the Flash Player, there are quite a few files aside from libflashplayer.so, each of which you may or may not want to install.

First off is readme.txt, which contains a few pearls of wisdom and is worth a quick read.

Aside from that is a directory called usr, which contains some .desktop files, icons and a program for configuring Flash Player. It is worth installing, and primarily exists for KDE integration. Simply doing this:

darkstar:$ su
Password:
darkstar:# ls
install_flash_player_11_linux.i386.tar.gz
libflashplayer.so
readme.txt
usr
darkstar:# cp -r usr/* /usr

However, it is completely optional, as the defaults for Flash Player are fine.

Sources

http://support.google.com/chrome/bin/answer.py?hl=en&answer=108086[374]

software, howtos

Unofficial Package Repositories

slackbuilds.org[375] - This site holds community submitted builds scripts to easily build Slackware packages from the source code of various applications.

slackware.it[376] - This is a repository of pre-built packages compiled in various languages.

alienBOB's repo[377] - This site contains pre-built packages and the associated build scripts used to build them, so you can use it to download packages or to get stable build scripts and build the packages to fit your needs.

If you would like another repo added to the list please propose it inthe slackdoc mailing-list.

Written by mfillpot[378]

slackware, package management, package repos, author mfillpot

Your Headline Here

WIP - name space for a more detailed article about Emacs

Sources

slackware, template

Desktop environment

A desktop environment is a graphical layer between the user and the computer. In the UNIX context, a desktop manager is a graphical environment that runs inside an X session. It enables the user through mouse and keyboard interaction to access the underlying features of the operating systems. A full desktop environment (as opposed to a window manager[379]) usually provides a set of software for the most common needs (file access, web browsing, printing…).

A desktop environment usually consists of many of the following components:

A native window manager to manage window placement and arrangements (some desktop environments may additionally be able to use third party Window Managers).

A session manager (to save and restore user's sessions).

A desktop manager (to manage the user's desktop, i.e. background, icons, multiple workspaces etc.)

A panel with menus for launching applications and additional widgets including notifications and messages.

A file browser.

A task manager to manage running applications and background tasks.

At least one basic graphical text editor (if not more).

Desktop configuration GUIs, including colours, themes, fonts etc.

Common utilities such as a terminal emulator, internet browser, power manager, bluetooth manager, network manager, clipboard handler and so on.

System administration GUIs for common admin tasks such as printer configuration, removable device auto-mount setup, file associations etc.

Several commonly desktop applications including media player, movie player, document viewer, graphics viewer etc.

In addition, Desktop Environments usually provide integration with features such as display and ACPI power management, useful for notebooks/laptops. Modern Desktop Environments also provide or integrate with a desktop compositing engine which allows for graphical special effects such as 3D flipping of workspaces, window translucency, simple animations and shadows, but this requires 3D hardware acceleration enabled and can consume additional system resources.

Available environments

Desktop environments available in Slackware can be classed as full or light-weight environments depending on the number of features they include. The more features an environment has, the more complete it is but also the more computer resources it uses. Light-weight environments come with a smaller set of features, usually just a unified look and feel, so you will need independent applications. For example a video player is not included like it is in KDE[380], but you can use xmms which is installed by default with Slackware.

Switching between available environments is done by running xwmconfig from a terminal prior to starting X.

Full environments

KDE[381]: the K Desktop Environment.

XFCE[382]: a full environment that is much more lightweight on the computer resources, based on the GTK toolkit.

Light-weight environments

FluxBox

BlackBox

WindowMaker

fvwm2

twm

Other environments

GNOME[383]: since version 10.2[384], Gnome is no longer part of Slackware. Several community driven projects provide packages for those willing to use Gnome in Slackware:

GSB: GNOME SlackBuild[385]

dropline GNOME desktop[386]

MATE[387]: a full lightweight environment, based on the GNOME 2 libraries. The MATE SlackBuilds[388] project has packages available from http://www.slackware.org.uk/msb/[389].

LXDE[390]. The Lightweight X11 Desktop Environment[391] is a good alternative for low-end hardware where KDE is too sluggish. See this blog post by ponce[392] for instructions on compiling and installing LXDE on Slackware.

Sources

Originally written by kookiemonster[393] for the SlackDocs Wiki Project

Additional inputs by harishankar[394] and cmyster[395]

Slackware Official READMEs

Did you know that a good source of information about Slackware is located right on the DVD (or the FTP server)?

Lots of people realize only later (sometimes years after starting with Slackware) that the root of the distribution tree contains several text files containing information about the distro, the layout of the DVD's content and instructions about installing and configuring the software. A shame, since they contain invaluable information for setting up a Slackware system.

Let's start with a listing of these files as they appear on the Slackware 14.1 DVD:

ANNOUNCE.14_1
BOOTING.TXT
CHANGES_AND_HINTS.TXT
CHECKSUMS.md5
CHECKSUMS.md5.asc
COPYING
COPYING3
COPYRIGHT.TXT
CRYPTO_NOTICE.TXT
ChangeLog.txt
FILELIST.TXT
GPG-KEY
PACKAGES.TXT
README.TXT
README.initrd
README_CRYPT.TXT
README_LVM.TXT
README_RAID.TXT
README_UEFI.TXT
RELEASE_NOTES
SPEAKUP_DOCS.TXT
SPEAK_INSTALL.TXT
Slackware-HOWTO
UPGRADE.TXT
isolinux/README.TXT
source/README.TXT
usb-and-pxe-installers/README_PXE.TXT
usb-and-pxe-installers/README_USB.TXT

What's contained in these files?

ANNOUNCE.14_1[396]
The official announcement of the release, describing existing and new features and offering information about purschasing the DVD (this particular file is for Slackware 14.1).

BOOTING.TXT[397]
The various ways of booting the Slackware installer that contains the setup program, and tips for troubleshooting if the boot fails.

CHANGES_AND_HINTS.TXT[398]
A listing of all new, and removed, packages relative to the previous release. Also contains tips and tricks about setting up various parts of the distro.

CHECKSUMS.md5[399]
MD5 message digests for the files in the distribution. To test all files, use this command:

tail +13 CHECKSUMS.md5 | md5sum -c --quiet - | less

Every line that does not say “OK” indicates a corrupted file.

CHECKSUMS.md5.asc[400]
The GPG signature of the CHECKSUMS.md5 file (signed with the GPG key of the Slackware Linux Project[401]). It allows you to verify that the checksum values in CHECKSUMS.md5 are not manipulated by malicious 3rd parties. The following command:

gpg --verify  CHECKSUMS.md5.asc

should at least contain lines like these two:

gpg: Signature made Thu 11 Dec 2014 02:46:15 AM CET using DSA key ID 40102233
gpg: Good signature from "Slackware Linux Project <security@slackware.com>"

COPYING[402]
Contains a copy of the GNU GENERAL PUBLIC LICENSE, Version 2, June 1991.

COPYING3[403]
Contains a copy of the GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007.

COPYRIGHT.TXT[404]
This is the Slackware COPYRIGHT file. This file provides documentation about many of the licenses used by components included in Slackware, as well as some acknowledgements (some required, some freely given). Some packages will have their license file in the respective subdirectory of /usr/doc.

CRYPTO_NOTICE.TXT[405]
Legal notice, due to U.S. Exports Regulations.

ChangeLog.txt[406]
The log of all updates to the release, made since the announcement of the previous release. Sort of Pat's own blog

FILELIST.TXT[407]
The list of all files that are contained in the directory tree for this release.

GPG-KEY[408]
The public key corresponding to the private key with which all Slackware packages are signed:

security@slackware.com public key
pub   1024D/40102233 2003-02-26 [expires: 2038-01-19]
uid                  Slackware Linux Project <security@slackware.com>
sub   1024g/4E523569 2003-02-26 [expires: 2038-01-19]

PACKAGES.TXT[409]
Details on the Slackware packages found in the ./slackware*/ directory (package description, metadata and content-listing).

README.TXT[410]
Slackware's README.TXT meaning READ THIS FIRST!.

README.initrd[411]
Slackware initrd mini HOWTO, describing how to create and install an initrd, which may be required to use the 3.x kernel. Also see “man mkinitrd”.

README_CRYPT.TXT[412]
The HOWTO for installing Slackware on (LUKS-) encrypted volumes.

README_LVM.TXT[413]
The HOWTO for installing Slackware on logical volumes (LVM).

README_RAID.TXT[414]
The HOWTO for installing Slackware on a software RAID root filesystem.

README_UEFI.TXT[415]
How to install Slackware (optionally leaving a Windows installation intact) on a computer with UEFI instead of old-fashioned BIOS. Only for 64-bit OS.

RELEASE_NOTES[416]
This file contains Pat's personal notes on the just-completed development towards the stable release.

SPEAKUP_DOCS.TXT[417]
Documentation for the Speakup speech synth software.

SPEAK_INSTALL.TXT[418]
HOWTO on installing with assistance of Speakup speech synthesis.

Slackware-HOWTO[419]
Instructions for installing Slackware from CD/DVD. If you're new to Slackware, start with this.

UPGRADE.TXT[420]
Slackware Upgrade HOWTO explains how to upgrade from one stable Slackware release to the next.

You can use slackpkg[421] in order to largely automate this process

isolinux/README.TXT[422]
How to burn a Bootable Slackware disc.

source/README.TXT[423]
Some information about the source used for this Slackware release.

usb-and-pxe-installers/README_PXE.TXT[424]
The HOWTO for installing Slackware over the network using PXE boot.

usb-and-pxe-installers/README_USB.TXT[425]
The HOWTO for installing Slackware using a bootable USB stick.

The links for the above files point to the “slackware-current” directory tree on the FTP server. Slackware-current is the development release, which means that the links point to the most recent version of the file. If you want a version for a specific release instead, just change the word “'current'” in the URL to a release version like “13.37” or “14.1”. The files are identical for the 32-bit and 64-bit versions of Slackware.

Sources

Originally written by Eric Hameleers[426]

slackware

HOWTO articles

An overview of HOWTO articles that may or may not have a relation to Slackware.
Application or hardware HOWTO's are welcome too.

If you want your article to appear in one of the sub-groups, visit the sub-group page and use the New Page button on that page.

Inspired? Want to write a HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Note that your article may be moved to the appropriate sub-group

How-To Category Directories

Page
Description

HOWTO articles - Cloud
HOWTO articles - Cloud Cloud is the buzz word of these days. We have a series of articles that will help you understand what cloud services are, how they can work in your advantage, and how you can run Slackware in the cloud. Commercial Cloud Services

HOWTO articles - Databases
HOWTO articles - Databases This section contains how to articles intended to guide users to setup and maintain various database systems on Slackware based systems. Overview of Slackware Administration HOWTOS ---------- howtos topic_page

HOWTO articles - Emulators
HOWTO articles - Emulators Linux users often grew up using other computer Operating Systems and playing their games on Consoles. After making the switch to a Linux based desktop, no one is keeping you from enjoying those old environments, because emulator software has been written for a great many of those old platforms. Looking for a way to play your old Commodore games? Or MS DOS? Or Atari, ZX Spectrum, or

HOWTO articles - Games
HOWTO articles - Games A collection of articles about playing games, or hosting game servers on your Linux computer. Overview of Games HOWTOS ---------- howtos topic_page

HOWTO articles - General Administration
HOWTO articles - General Administration This section contains How-To articles for system administration tasks that exist in multiple Linux and Unix based distributions Overview of Slackware Administration HOWTOS ---------- howtos topic_page

HOWTO articles - Hardware
HOWTO articles - Hardware This section contains How-To articles for hardware drivers and configurations including virtualization and emulation platforms. Architecture Specific HOWTOS Overview of Hardware HOWTOS ---------- howtos topic_page

HOWTO articles - Miscellaneous
HOWTO articles - Miscellaneous This section contains how to articles which do not fit within any of the other main HOWTO categories. Overview of Slackware Miscellaneous HOWTOS ---------- howtos topic_page

HOWTO articles - Multimedia
HOWTO articles - Multimedia This section contains how to articles intended to guide users to setup and maintain multimedia apps on Slackware based systems. Overview of Slackware Multimedia HOWTOS ---------- howtos topic_page

HOWTO articles - Network Services
HOWTO articles - Network Services This section contains how to articles intended to guide users to setup and maintain various network services on Slackware based systems. Overview of Slackware Network Services HOWTOS howtos topic_page

HOWTO articles - Security
HOWTO articles - Security Securing your computer is an ongoing process. The following guides will help you secure your Slackware installation, be it for server, workstation or laptop needs. Make sure you subscribe to the slackware-security mailing list. All security announcements since 1999 are available on

HOWTO articles - Slackware Administration
HOWTO articles - Slackware Administration Although Slackware tries to limit distribution specific tools compared to other distributions, there are a few cases where specific tasks are unique to Slackware. This section contains those special cases.

HOWTO articles - Software
HOWTO articles - Software This section contains How-To articles for software that does not fit into the following categories: * Slackware Admin * General Admin * Cloud * Databases * Emulators * Multimedia * Network Services * Security * Window Managers Overview of Slackware Administration HOWTOS ---------- howtos topic_page

HOWTO articles - Window Managers
HOWTO articles - Window Managers This section contains how to articles intended to guide users to setup and maintain window managers on Slackware based systems. Overview of Slackware Administration HOWTOS ---------- howtos topic_page

Non-Categorized HOWTOS

Page
Description
Tags

Anatomy Of a Slackbuild
Anatomy Of a Slackbuild Preamble I guess all Slackware users will have used at sometime a SlackBuild script in order to create a package of software that could be easily and cleanly installed and removed later if needed. My experience was that I ran the SlackBuild script to create a package and never actually looked at the code it contained until one day the source version did not match that stated in the script.
howtos

Web Dev primarily HTML and PHP
Web Dev primarily HTML and PHP I'm going to give an overview of web development for users of Slackware.It's going to be from the perspective of approaches for a budding web developer who uses Slackware, the problems you might face due to using Slackware Linux and an eclectic look at what tools are available to help you, starting simplest first.
howtos

Biff's Slackware Tips for Noobs
Biff's Slackware Tips for Noobs Introduction I was going to call this page 'Slackware for Dummies' however there's a book of the same name on Amazon :-(. I've accumulated a few bits and pieces that I feel are useful for people starting out in Slackware but which are too small to warrant their own HOWTOs. If you feel I should break anything out into its own HOWTO please add comments in the discussion section. Please also be aware that some of this is about opinion, and just one person's opin…
howtos, tips, noobs, dummies

Checking a Slackware Version
Checking a Slackware Version To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the /etc/ directory. For this you can run the
howtos, misc, slackware version, checking, author slackjeff

How to connect mysql client over SSH tunnel to Mariadb server
How to connect mysql client over SSH tunnel to Mariadb server For setting up your working Mariadb server, read this howto. You may want to connect clients to the database server over network securely. Instead of using TLS (which is available natively) for this, the same can also be achieved by tunneling over SSH by following the below steps.
howtos, mariadb, mysql, tunneling, ssh, tunnel

Devastator, Scroll Lock and I3WM keyboard
Devastator, Scroll Lock and I3WM keyboard I recently received a donation from cryptographic friend Ayr, a Devastator CM-STORM keyboard from Cooler Master. A keyboard that is beautiful, soft and enjoyable to use. However I faced a very annoying problem on my I3wm. Because it is a keyboard that has LEDs, its function works through Scroll Lock.
howtos, misc, led devastator, scroll lock, author slackjeff

The Cross Syntax Cheat Sheet: DokuWiki versus AsciiDoc Markups
The Cross Syntax Cheat Sheet: DokuWiki versus AsciiDoc Markups Introduction At time of writing, SlackDocs uses a DokuWiki engine to convert the wiki pages (plain text including markup) to xhtml text. Converting the DokuWiki markup to AsciiDoc markup can ease the work of translators of DokuWiki pages, as the application po4a, that allows to produce PO files ready for translation, can handle the AsciiDoc markup but not the DokuWiki markup.
howtos

Enabling Sudo on Slackware
Enabling Sudo on Slackware Sudo, substitute user of (Super User) or Super user of (acting as super user) has a big role on UNIX Likes systems, sudo allows ordinary users to temporarily get privileges from another user, widely used for the privileges of the superuser root.
howtos, misc, sudo on slackware, enabling, author slackjeff

Get acquainted with Slackware
Get acquainted with Slackware Introduction This document is intended to allow people who have already used another “Unix-like” system to get quickly acquainted with Slackware. We assume that the reader: * knows the main Unix commands and the associated concepts,
howtos

How-to translate a document in AsciiDoc format
How-to translate a document in AsciiDoc format Introduction According to its Home Page: " AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including
howtos, asciidoc, translation

Internationalization and localization of shell scripts
Internationalization and localization of shell scripts Presentation Purpose, scope and intended audience This document is intended to help developers, maintainers and translators to write/maintain/translate internationalized then localized shell scripts, using the tools provided by GNU gettext.
howtos, gettext, shell, scripts, internationalization, localization, i18n, l10n

Linux HOWTOs
Linux HOWTOs The Linux HOWTOs are a collection of documents which cover specific subjects related to GNU/Linux. Most Linux HOWTOs are not tailored to a specific distribution, therefore they are very useful for Slackware Linux users. The linux- howtos package in the “f” software set contains the HOWTO collection. After installing this package the HOWTOs are available from the /usr/doc/Linux-HOWTOs/ directory. Slackware Linux also contains a small collection of Linux-related FAQs (FAQs are docume…
howtos, author etech3

LXC (Linux Containers)
LXC (Linux Containers) Introduction Linux Containers, or LXC, is operating system-level method for running multiple separate isolated Linux installations (containers) on a single host. Rather than simulating the computer hardware as in true virtualization, LXC uses the cgroups and namespaces functionalities of the host's Linux kernel to provide strong isolation of the container. It is an intermediate solution between chroots and full virtualization, having a small impact on system resource usa…
howtos

Policy based routing
Policy based routing By default networks packets are routed based on their destination address. Linux supports routing policies, and this allows you to have multiple routing tables and make routing decisions based on other variables. IPIPIPIP IP
howtos, network, routing, author lamerix

How to run OpenXenManager On Slackware
How to run OpenXenManager On Slackware ( known to work with Slackware64 14.2) 1) Install Python from Slackware packages. 2) Install pygtk from Slackware packages (not needed for -current) 3) Install configobj from Slackbuilds. 4) Install gtk-vnc from Slackbuilds, use version 0.7.0, and get the corresponding slackbuild from git.
howtos, software, virtualization, xen, openxenmanager, slackware 14.2

Proxying Emails to Your Local Mail Relay Server
Proxying Emails to Your Local Mail Relay Server There may be times where you may need to send emails from a machine, that can not do so directly nor thought your local SMTP relay and you have no easy way out for mending the causes. Let's examine some scenarios that would allow you to work around the problem.
howtos, smtp, proxy

Script with autostart function and output to defined console.
Script with autostart function and output to defined console. There is instruction, how to do script output to console 2,3, or another, and autostart them on computer switch on. In that case we cannot put script start in /etc/rc.d/rc.local file, as always, because in that stage agetty, and consoles not activated, and therefore, script at that stage cannot do output to non-existing at that time, console, therefore, we put it in crontab with special preffix:
howtos, script, console, output, autostart, cron, startup

Howto install slackware64 -current with full disk encryption, including swap on Linode
Howto install slackware64 -current with full disk encryption, including swap on Linode The task To have a working virtual machine in Linode, running and tracking Slackware64 -current, with full disk encryption, including swap, using LUKS with a custom partitioning schematic using
howtos, installation, lvm, luks, author mahafyi

Slackware Docker Image Overview
Slackware Docker Image Overview Slackware docker images are available in the docker image registry. They can be found in hub.docker.com/r/vbatts Building the images You can clone the git repository from github.com/vbatts/slackware-docker Currently, using the installer bootstrap, the mkimage-slackware.sh
howtos, docker, image, author lamerix

HOWTO articles - Miscellaneous
HOWTO articles - Miscellaneous This section contains how to articles which do not fit within any of the other main HOWTO categories. Overview of Slackware Miscellaneous HOWTOS ---------- howtos topic_page
howtos, topic page

Variables in bash
Variables in bash Understand the concept of a variable and how to do every process to create your own. What is a variable? A variable as its name implies is to store varied content in a memory location / space, instead of using numbers to make your call, we use tags / names! This makes it easier to make the call, isn't it? Shell variables can receive any content! from a simple string / text, numbers, output status of a command and return output.
howtos, misc, variables bash, shell, author slackjeff

Slackware as a VMWare Guest
Slackware as a VMWare Guest Introduction These instructions apply to ESXi 5.5. It's highly likely they also apply to other versions of VMWare, unfortunately you have a lot to choose from taking into account Workstation, Fusion and even Player and I can't test them all. These instructions refer to Slackware 64-bit 14.2 as the guest, and assume Fluxbox WM.
howtos, vmware, virtualisation, emulation

Configuring Wireless With wpa_cli
Configuring Wireless With wpa_cli This article is for folks who are choosing not to use NetworkManager for their wireless. If you are running FluxBox or some other lightweight window manager, you may find it useful to configure wireless in the manner described below.
howtos, author, slackwood

Slackware as a Xen DomU Guest
Slackware as a Xen DomU Guest Introduction This document explains how to create a guest virtual machine for a Xen environment using HVM (with PV drivers) virtualisation mode. Such a VM could be used on AWS (Amazon Web Services) or with an on-premise Xen setup but has the added advantage that it will still boot into Desktop virtualisation software like VirtualBox, KVM, VMWare as it uses a conventional MBR. There is no requirement to use Grub and we can stick with the familiar LILO.
howtos, virtualisation, xen, domu

toc1

awesome (Dynamic Window Manager)

awesome[2022] is a highly configurable, next generation framework window manager[2023] for X. Primarly targeted at power users, developers and any people dealing with every day computing tasks and who want to have fine-grained control on theirs graphical environment. It is very fast and heavily extensible using the Lua[2024] programming language.
Licensed under the GNU GPLv2 license[2025].

Dependencies

Prior to installing awesome, you will need the following dependencies installed first:

libxdg-basedir[2026]

lgi[2027]

lua[2028] is a dependency for lgi.

note: All of the above are available at slackbuilds.org[2029]

Installation

If you have installed all of the above dependencies, you can now proceed with the build of awesome.

Grab the slackbuild from here (slackbuilds.org)[2030].
Build it.
And then install the produced package.

Use awesome as your WM

You can select awesome as your Window Manager by running xwmconfig from a terminal.

Open your terminal of choice.

Run 'xwmconfig'

Select xinitrc.awesome from the menu and hit enter.

This way when you start X, awesome will be picked up as your WM.

Configure awesome

By default, if there is no local config, awesome will read the default config from /etc/xdg/awesome/rc.lua and use it.
If you want to use your own configuration, you will need to do the following.

Create a directory for awesome configuration file

mkdir -p ~/.config/awesome/

Copy the default awesome config

cp /etc/xdg/awesome/rc.lua ~/.config/awesome/

Now you can go and change ~/.config/awesome/rc.lua to reflect you preferences.

If you want, you can go and read this[2031] great wiki page, about what is possible to do with the configuration file.

Some examples for own my customizations:

modkey = Mod1 - (line 53) this changes the modkey to Mod4/Mod1 (Windows/Alt key). By default it is Mod4

terminal = terminator - (line 44) this changes the terminal to terminator (my favorite terminal). By default it is xterm

Links

awesome home page: awesome.naquadah.org[2032]

awesome wiki: awesome.naquadah.org/wiki/Main_Page[2033]

awesome FAQ: http://awesome.naquadah.org/wiki/FAQ[2034]

Lua API documentation: http://awesome.naquadah.org/doc/api/​[2035]

Configuration: http://awesome.naquadah.org/wiki/Awesome_3_configuration[2036]

More on Dynamic Window Managers (wikipedia): http://en.wikipedia.org/wiki/Dynamic_window_manager[2037]

Sources

Originally written by Симон Болоканов[2038]

Xmonad as a Windowmanager for Slackware

Xmonad is a tiling window manager[2039]. For information about tiling window managers please read this wiki: wikipedia[2040]

For Xmonad read here[2041]

Required packages

Xmonad is not included in Slackware by default, but available via SlackBuilds.org[2042]. Xmonad is written in Haskell and therefore some packages of the Haskell series are required in order to build Xmonad. Here are the packages in the correct build order:

ghc (the glasgow-haskell-compiler)

haskell-syb

haskell-utf8-string

haskell-X11

haskell-transformers

haskell-mtl

xmonad

haskell-random

xmonad-contrib

haskell-hinotify

haskell-stm

haskell-X11-xft

haskell-text

haskell-parsec

xmobar (provides a statusbar)

I have additionally installed dmenu[2043] which is integrated into the statusbar and starts programs (like gmrun). I have also installed trayer which provides a systray in the statusbar. Unfortunately trayer is only available as an rpm-package. I wanted to write a SlackBuild script for it, but the sources are incomplete. Another tray is stalonetray[2044] which is available via SlackBuilds.org.

Configuration of Xmonad

After building and installing the above packages you can configure Xmonad. One remarkable feature of xmonad as well as xmobar is that it is not only written in the functional language Haskell, but also the configuration is a Haskell file. This makes it a bit difficult to understand the configuration files if one doesn't know Haskell. Well, I once tried to learn Haskell but (yet) without success.

At first one has to configure .xinitrc in order to start Xmonad correctly when changing from runlevel 3 to 4.

.xinitrc

the following sections of my .xinitrc configure dbus, the mouse pointer and trayer, then xmonad is started

# Use dbus-launch if installed.
if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
dbuslaunch=`which dbus-launch`
if test x"$dbus-launch" != x"" -a x"$dbus-launch" != x"no"; then
eval `$dbus-launch --sh-syntax --exit-with-session`
fi
fi
xsetroot -cursor_name left_ptr

trayer --edge top --align right --SetDockType true --SetPartialStrut true \
--expand true --width 10 --transparent true --height 14 &

exec xmonad

.xmobarrc

xmobar is a statusbar and displays useful information, in my case in the top part of the desktop. Below is an example of my .xmobarrc:

Config { font = "-misc-fixed-bold-R-normal-*-13-*-*-*-*-*-*-*"
, bgColor = "#1074EA"
, fgColor = "#DDDDDD"
, position = TopW L 90
, commands = [ Run BatteryP ["BAT1"]
["-t", "<acstatus><watts> (<left>%)",
"-L", "10", "-H", "80", "-p", "3",
"--", "-O", "<fc=green>On</fc> - ", "-o", "",
"-L", "-15", "-H", "-5",
"-l", "red", "-m", "blue", "-h", "green"] 60
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10
, Run CpuFreq ["-t", "<cpu0> <cpu1>", "-L", "0", "-H", "2",
"-l", "lightblue", "-n","white", "-h", "red"] 50
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Swap [] 10
, Run Date "%a %d. %B %H:%M Uhr" "LC_TIME=de_DE date" 10
, Run StdinReader
]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader% }{ <fc=#FFD700>%date%</fc> | %cpu%  %cpufreq% | %memory% %swap% | Bat: %battery% "
}

The first lines configure the font, foreground/background-colors and the position on the screen. The rest configures the information which should be shown in xmobar, battery-state, CPU-load, CPU-frequency, Memory-usage and Swap-usage, the date. Note that LC_TIME=de_DE date forces the date command to use the language defined in LC_TIME (German in my case).

For further explanation please read the manuals.

xmonad.hs

Here is an example of my ~/.xmonad/xmonad.hs file

import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO

myManageHook = composeAll
[ className =? "Gimp"   --> doFloat
, className =? "Vlc"    --> doFloat
]

main = do
xmproc <- spawnPipe "/usr/bin/xmobar /home/markus/.xmobarrc"
xmonad $ defaultConfig
{ manageHook = manageDocks <+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
} `additionalKeys`
[ ((mod4Mask, xK_c  ), kill)
,((mod4Mask, xK_Return ), spawn "xterm")
]							]

Please read the documentation for xmonad.hs. This is only an example (which works well for me).

Additional Hints

One can reload the configurations for xmobar and/or xmonad after changes with MOD+q without leaving X. This is very useful.

When using a tiling window manager one experiences that some applications behave unusual. In my xmonad.hs file above you see Vlc and Gimp in the list of programs which should float. In order to find out the so called Classname of the application (through which the application can be detected by the window manager) there is a script in the xmonad-contrib package. You can find it in /usr/share/doc/xmonad-contrib-0.10/scripts/ directory.

Sources

Originally written by Markus Hutmacher[2045]

howtos, windowmanager, tiling-windowmanager, haskell, xmonad, author markush

Lumina Desktop

1. Introduction

The Lumina Desktop Environment (Lumina for short) is a lightweight, XDG-compliant, BSD-licensed desktop environment that focuses specifically on streamlining the ability to get work done while minimizing system overhead.

It is specifically designed for Project Trident, but has also been ported to many other BSD and Linux operating systems. It is based on the Qt graphical toolkit and the Fluxbox window manager, and uses a small number of X utilities for various tasks, such as numlockx and xscreensaver.

2. Installation

The Lumina Desktop is not provided by Slackware, bur a Lumina SlackBuild may be found on https://slackbuilds.org/[2046]. qt5-webkit is the only listed dependency, but this assumes that its dependencies were also installed (reucrsively). As a minimum, you would also need qt5, while libxkbcommon is a runtime dependecy.

acpi is an optional dependency for the battery monitor.

lumina-pdf and lumina-calculator are recommended for the complete desktop experience. Slackbuilds for these are also availble from https://slackbuilds.org/[2047].

To install lumina-pdf you would need the poppler-qt5 and the qt5 packages, while libxkbcommon is a runtime dependecy.

To install lumina-calculator you would need the qt5 package, while libxkbcommon is a runtime dependecy.

3. Starting the Lumina Desktop from runlevel 3

On a terminal, enter

xwmconfig

and choose xinitrc.lumina. Then enter startx.

4. Starting the Lumina Desktop from XDM

xwmconfig

and choose xinitrc.lumina.

Login via XDM as usual.

5. Starting the Lumina Desktop from KDM

Simply choose Lumina before entering your logging in credentials.

6. Hints and Tips

If some applications misbehave, try saving the Window Theme:

Start Menu » Preferences » Configure Desktop » Window Manager (under Appearances)

Change the Window Theme and Save

To close the annoying RSS feed:

Start Menu » Preferences » Configure Desktop » Desktop (under Interface Configuration)

Click on RSS Reader and then on the “-” and Save

If the Panel misbehaves, delete them and define new ones:

Start Menu » Preferences » Configure Desktop » Panels (under Interface Configuration)

This is a hit and miss process.

To stop the Login and Logout jingles:

Start Menu » Preferences » Configure Desktop » Sound Themeing (under Desktop Defaults)

To add the Network Manager applet on the Panel:

Start Menu » Preferences » Configure Desktop » Autostart (under Desktop Defaults)

Tick Network and Save. Logout and Login again.

7. Sources

(1) https://lumina-desktop.org/[2048] (2) https://project-trident.org/[2049] (3) https://slackbuilds.org/[2050] (4) http://www.slackware.com/~alien/slackbuilds/[2051]

Written for Slackware 14.2 and current on September 2019

Originally written by Chris Abela[2052]

lumina

Keyboard Layout in Fluxbox

If you have set the keyboard layout[2053] system-wide, you do not need to do anything. If, however, you switch between layouts on a regular basis, Fluxbox lets you easily add this functionality to the menu.

Fluxbox Menu

1. Open the Fluxbox menu config file:

nano ~/.fluxbox/menu

Add the following section with the layout(s) you want:

[submenu] (Keyboards)
[exec] (gb) {setxkbmap gb}
[exec] (fr) {setxkbmap fr}
[end]

You'll also need to reload the config.

Sources

Originally written by sycamorex[2054]

howtos, hardware, keyboard, settings, fluxbox, author sycamorex

Enlightement DR17

What is E17?

Enlightenment DR17[2055] (E17) is the long awaited successor of E16, a window manager[2056] which was distributed in Slackware 10 years ago. It is classed as a “desktop shell”, providing the things you need to operate your desktop (or laptop), but not a whole suite of applications. This includes launching applications, managing their windows, and doing other system tasks like suspending, rebooting, managing files, etc.

E17 doesn't come alone. Actually, it uses the Enlightenment Foundation Libraries[2057] (EFL) which can be used to develop other applications like in the Qt/KDE world for instance. There are, as in February 2013, 15 libraries in EFL and a lot of external modules or applications that can be used with E17.

Installing E17

Pre-built packages

SlackE17

The easiest and fastest way to get E17 running on Slackware is to install the E17 packages from the SlackE17 project[2058]. You just need to have the latest release of Slackware, Slackware64 or ArmedSlack.

Just download[2059] the tarball corresponding to your architecture (i486, x86_64 or ARM), unpack it and read the doc. To install the packages, you have several options:

Install everything using:

# upgradepkg --install-new e17/*.txz

Use the supplied script to install only E17 and its dependencies using:

# ./slacke17-install.sh std

Use the supplied script to install everything using:

# ./slacke17-install.sh max

Or you can just:

# cd e17 && pkgtool

Compilation

First you need to install the dependencies needed to compile Enlightenment. These can be found in SlackBuilds-website or with sbopkg:

check

lua

luajit

bullet

Once you have those packages installed we can proceed to make a build directory and commence with the fun stuff!

 # mkdir -p /build/e22/core

# cd /build/e22/core

# git clone https://git.enlightenment.org/core/efl.git

# git clone https://git.enlightenment.org/core/enlightenment.git

# cd /build/e22/core/efl

# ./autogen.sh --prefix=/opt/e22 --disable-systemd --disable-avahi

Make symlink for dbus (installer tells you to do this so please check output if it has been updated just to be sure).

 # ln -s /opt/e22/share/dbus-1/services/org.enlightenment.Ethumb.service /usr/share/dbus-1/services/org.enlightenment.Ethumb.service

# make && make install

Now we need to add Enlightenment library directory to the system so it knows where to look for the libraries.

 # echo "/opt/e22/lib" >> /etc/ld.so.conf

Load the new configuration.

 # ldconfig

An environmental variable need to be set for PKGCONFIG, this is only needed when building and doesnt need to be permanent.

 # export PKG_CONFIG_PATH=/opt/e22/lib/pkgconfig:/usr/lib64/pkgconfig:/usr/share/pkgconfig

Add enlightenment bin to PATH for build, also make it persist after reboot.

 # export PATH=/opt/e22/bin:$PATH

# vi /etc/profile

Add “/opt/e22/bin” to your PATH.

Start building Enlightenment.

 # cd /build/e22/core/enlightenment

# meson --prefix=/opt/e22 -Dsystemd=false -Davahi=false . build

# meson configure build

# ninja -C build install

(Optional, build Terminology. Terminology is the default terminal in Enlightenment.)

 # mkdir /build/e22/apps

# cd /build/e22/apps

# git clone https://git.enlightenment.org/apps/terminology.git

# cd terminology

# meson --prefix=/opt/e22 . build

# meson configure build

# ninja -C build install

To make your sessionmanager find Enlightenment you need to create a .desktop file in the right directory.

 # vi /usr/share/xsession/enlightenment.desktop

Should look something like this (please check already existing .desktop files for other language examples and please add relevant lines for your language):

[Desktop Entry]

Encoding=UTF-8

Type=XSession

Exec=/opt/e22/bin/enlightenment_start

TryExec=/opt/e22/bin/enlightenment_start

DesktopNames=Enlightenment

Name=Enlightenment

Comment[en_GB]=Enlightenment by Enlightenment

Comment[sv]=Enlightenment av Enlightenment

X-KDE-PluginInfo-Version=0.22.9

If you want to start enlightenment with startx (xinit): /etc/X11/xinit/xinitrc.e22

#!/bin/sh
userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
[ -f $sysresources ] && xrdb -merge $sysresources
[ -f $sysmodmap ] && xmodmap $sysmodmap
[ -f $userresources ] && xrdb -merge $userresources
[ -f $usermodmap ] && xmodmap $usermodmap
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
export DESKTOP_SESSION="e22"
exec ck-launch-session dbus-launch --exit-with-session enlightenment_start
else
export DESKTOP_SESSION="e22"
exec enlightenment_start
fi

SlackE17

SlackE17 provides all the source code and SlackBuilds in one tarball so you can rebuild everything easily. You can build the packages one by one, but it's more efficient to use the BUILD/slacke17-build.sh script. You can pass some options to the script:

To get debug symbols:

# DEBUG=1 ./slacke17-build.sh

To optimize for your box:

# ECFLAGS="-march=native -mtune=native" ./slacke17-build.sh

SBo

SBo[2060] provides SlackBuilds for EFL and E17, but you will have to download all the source code by yourself and build the packages one by one.

Using E17

You need to update your .xinitrc using xwmconfig and choosing xinitrc.e17. Most of the configuration can be made by the right click menu. If you want to manage who can use the system menu, you should take a look at /etc/enlightenment/sysactions.conf.

Sources

howtos, e17, author ngc891

Keyboard Layout in KDE

If you haven't set the keyboard layout[2061] system-wide, you can specify it in KDE System Settings. The following steps have been tested on Slackware 14 (KDE SC 4.8.5)

Setting Keyboard Layout

1. Open Input Devices from the System Settings panel.

Menu => System Settings => Input Devices

2. Switch to the Layouts tab.

4. Tick Configure layouts

5. Click the Add button and choose the appropriate keymap from the list.

6. Use the Move Up and Move Down buttons to choose the active layout. The top keymap in the list will take precedence.

7. Optionally, you can remove the us or any other layouts if you do not need them.

8. Click the Apply button for the changes to take effect.

Switching Between Layouts in the Task Manager

If you have more than 1 layout in the list from step 7, a keyboard module should automatically appear in the task manager displaying the current layout. You can quickly switch to an alternative keyboard layout by left-clicking on the module. If you right-click on it, a keyboard menu with additional options will unfold.

Assign a Shortcut to Switch Between Layouts

If you are used to global shortcuts such as Alt+Shift to switch between layouts, then on the same settings page, in the container Shortcuts For Switching Layouts click on Main shortcuts: and select the combination that you desire.

Sources

Originally written by sycamorex[2062]

howtos, hardware, keyboard, settings, kde, author sycamorex

i3 Tiling Window Manager

i3 is a very lightweight, flexible and customisable tiling window manager[2063] with excellent multi-monitor support. Tiling window managers aim at maximising the screen space by tiling all opened windows in a non-overlapping mode. As all the bells and whistles of traditional desktops are virtually non-existent in tiling window managers, they have a very minimalist look and are mostly keyboard-focused. If the concept of tiling window managers is still puzzling, please check the official i3 screencast[2064].

i3 in Slackware

Slackware does not come with the i3 window manager. The installation process, however, is a quick and easy one. i3 is available from SlackBuilds[2065]. Bear in mind that for due to a number of factors the latest versions of i3 will not build on slightly older versions of Slackware:

For Slackware systems older than 14.1, you need to install i3 version 4.2.

For Slackware 14.1, the highest i3 version that will build without replacing Slackware stock packages will be i3 4.8.

Slackware-current (and subsequently 14.2) will be able to host the latest version of i3 (i3wm 4.11)

You can build and install the dependencies using this[2066] tutorial or via sbopkg[2067], a SlackBuild browser.

i3 Dependencies

All i3's dependencies are also available from SlackBuilds[2068]:

libev[2069]

yajl[2070]

dmenu[2071]

It is also highly recommended to install i3status[2072] and its dependency confuse[2073].

As of version 4.8, i3 is capable of saving and restoring your layouts on particular workspaces. For more information see this[2074].

If you'd like to utilise the new features, you need to install more dependencies. All of them are available from Slackbuilds.org[2075]:

perl-JSON-XS[2076]

perl-AnyEvent-Handle[2077]

perl-AnyEvent-I3[2078]

Starting i3

Having installed all the packages, you can exit X and run xwmconfig to select i3 and subsequently run startx to start the graphical user interface.

Known Issues

i3 and nVidia Binary Driver

Up until recently, nVidia binary driver users had to add the –force-xinerama flag to their .xinitrc file.

# Start i3
if [ -z "$DESKTOP_SESSION" -a -x /usr/bin/ck-launch-session ]; then
exec ck-launch-session i3 --force-xinerama
else
exec i3
fi

As of version 302.17 of nVidia binary driver it is no longer necessary. (See more info[2079])

i3 Configuration

When you first start i3, you will be welcomed by i3-config-wizard:

You have not configured i3 yet.
Do you want me to generate ~/.i3/config?
<Enter> Yes, generate ~/.i3/config
<Esc>   No, I will use the defaults

Let the wizard generate the config file. You'll then face another dilemma:

Please choose either:
--> <Win>  Win as default modifier
<Alt>  Alt as default modifier
Afterwards, press
<Enter> to write ~/.i3/config
<ESC>   to abort

Use the Win and Alt keys to switch between the modifiers and choose one of them. In this tutorial I use Alt as the default modifier (I use Win for all sorts of custom keybindigs to avoid any clashes with i3 or other applications).

Please note that if you have changed the keyboard layout since the wizard automatically generated the config file, you might have to revisit the config file and manually modify the keybindings

Changing i3 Modifier Key(s)

It is easy to change or add i3 modifiers. Right at the top of the ~/.i3/config file you'll see:

Alt as the default modifier:

set $mod Mod1

Or Win as the default modifier:

set $mod Mod4

You can also configure a secondary modifier assigning it to a variable (eg. $ms):

set $mod Mod1
set $ms Mod4

Keybindings for Most Common Activities and Applications

The following are some basic keybindings to help you get started. For a full map of default keybindings see here[2080] or consult a very thoroughly commented config file located in ~/.i3/.

Terminal

Pressing Alt+Return launches a terminal which in Slackware defaults to xterm. If you want to change it, modify the following line:

bindsym $mod+Return exec i3-sensible-terminal

Specify a terminal of your choice:

bindsym $mod+Return exec /usr/bin/urxvt

Close a Window

Alt+Shift+Q

Go to a Given Workspace

Alt+2

In this instance we go to Workspace 2.

Reload the Config

Alt+Shift+C

Restart i3

Alt+Shift+R

Quit i3

Alt+Shift+E

Adding Your Own Keybindings

If you want to launch Firefox using Alt+B, add the following to ~/.i3/config:

bindsym $mod+b exec /usr/bin/firefox

Opening Other Applications

The Alt+D keybinding launches dmenu where you can type a program you want to run.

Keyboard Layout

Please visit this HOWTO[2081] to configure the keyboard layout in i3.

Further Reading

i3 has a great number of features. Discussing all of them is beyond the scope of this HOWTO. For further help, please refer to i3's excellent User's Guide[2082].

These are some notable features:

Excellent window management (concept of container trees[2083], a screencast on containers and the tree data sctructure[2084])

Automatically putting clients on specific workspaces[2085]

The scratchpad feature[2086]

The article[2087] describes the use of goto marks and Emacs-like modes in i3.

i3status

i3status[2088] is a status bar generator which will help you display all sorts of information.

Once you've started i3, you should see a status bar at the bottom of the screen. To start customising it, copy /etc/i3status.conf to ~/.i3status.conf where you can place your changes. The configuration is pretty straightforward. You can comment out any modules you don't want to be displayed:

# order  = "ipv6"
order += "disk /"
# order += "run_watch DHCP"
# order += "run_watch VPN"
order += "wireless wlan4"
#order += "ethernet eth0"
# order += "battery 0"
# order += "cpu_temperature 0"
order += "load"
order += "time"

You can configure modules in the sections below. For example:

time {
format = "%d-%m-%Y %H:%M"
}

Custom i3status Display

By default i3status functionality is somewhat limited. The fact that the basic configuration offers only a handful of predefined functions does not, however, prevent you from customising it to include your own scripts.

The most basic method of calling i3status is by including the following code in ~/i3.config:

bar {
status_command i3status
}

i3status will first look for ~/.i3status.conf and if it is not present, it will read /etc/i3status.conf. You can also manually specify the location of the config file:

status_command i3status --config ~/.i3/scripts/i3status.conf

Instead of calling i3status here, you can run a custom script which will start i3status.

status_command /path/to/my/i3-custom-status.sh

i3-custom-status.sh

#!/bin/sh
# shell script to prepend i3status output with some custom stuff
i3status --config ~/.i3status-secondary.conf | while :
do
read line
LG=$(setxkbmap -print | grep xkb_symbols | awk -F"+" '{print $2}')
pycom=$(/home/user/.i3/pys.py)
todo=$(task ls | sed -n '4s/[[:blank:]]\+/ /pg' )
echo "TODO:$todo | LG: $LG | $pycom | $line" || exit 1
done

The following should give you some idea of how you could adapt it for your own needs:

LG=$(setxkbmap -print | grep xkb_symbols | awk -F"+" '{print $2}')

The current keyboard layout is assigned to variable LG.

pycom=$(/home/user/.i3/pys.py)

The output of a Python script is assigned to variable pycon.

todo=$(task ls | sed -n '4s/[[:blank:]]\+/ /pg' )

The most important task of my todo list (TaskWarrior[2089]) is assigned to variable todo.

echo "TODO:$todo | LG: $LG | $pycom | $line" || exit 1

The contents of the variables is sent to the status bar followed by default i3status output.

i3status in a Multi-monitor Setup

You can identify your monitors using the 'xrandr' utility (please note that xrandr is not fully supported with versions older than 302.17 of nVidia binary driver):

$ xrandr
Screen 0: minimum 8 x 8, current 3840 x 1200, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
VGA-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 connected 1920x1200+1920+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200      60.0*+
...
HDMI-0 connected 1920x1200+0+0 (normal left inverted right x axis y axis) 519mm x 324mm
1920x1200      60.0*+
...

The active connections are identified as DVI-I-1 and HDMI-0. Knowing this we can configure separate outputs for each display:

bar {
output DVI-I-1
status_command i3status
font -*-terminus-bold-*-normal-*-20-*-*-*-*-*-iso8859-1
colors {
background: #002b36
statusline: #586e75
focused_workspace: $col3 $col2 $col9
active_workspace: $col3 $col2 $col16
inactive_workspace: $col3 $col2 $col3
urgent_workspace: $col11 $col12 $col13
}
}
bar {
output HDMI-0
status_command /home/user/.i3/scripts/i3status_script.sh
font -*-terminus-bold-*-normal-*-20-*-*-*-*-*-iso8859-1
}

i3 Support

Apart from excellent documentation[2090] both for i3 users and developers, you can also get support in the following places:

Subscribe to the mailing list[2091] (Browse archives[2092])

Join i3 IRC channel (#i3 on irc.twice-irc.de)

Register with the recently created stackexchange-like FAQ section[2093] (Update: As of 20/12/2015 that site is read only. The i3-related questions have moved to a new place - see the next bullet point)

i3wm questions on reddit[2094]

Sources

Originally written by Marcin Herda[2095]

howtos, i3, i3status, wm, software, author sycamorex

Keyboard Layout in Xfce

If you haven't set the keyboard layout[2096] system-wide, you can specify it in Xfce 4 Settings Manager.

Setting Keyboard Layout

1. Open Xfce 4 Settings Manager

Menu => Settings => Settings Manager

2. Click on the Keyboard icon.

3. Switch to the Layout tab.

4. Untick Use system defaults

5. Click the Add button and choose the appropriate keymap from the list.

6. Select the active layout.

Xfce Keyboard Plugin

If you need to switch between different layouts, installing the Xfce panel keyboard plugin[2097] might be a more convenient option.

1. Install xfce4-xkb-plugin from SlackBuilds[2098]

2. Right-click on the Xfce panel and choose Add new items

3. Select Keyboard and click Add

4. The keyboard plugin should appear in your panel.

Note: Also you can set your keyboard layouts manually, by: setxkbmap -option grp:switch,grp:alt_shift_toggle

Sources

Originally written by sycamorex[2099]

howtos, hardware, keyboard, settings, xfce, author sycamorex

Dual Monitors

Known to work on Slackware 14.1 and XFCE

If you are running XFCE and your secondary monitor isn't working, check and make sure it's enabled in XFCE's SETTINGS:

SETTINGS > SETTING MANAGER > DISPLAY > display name in column on left > USE THIS OUTPUT

Mirror Monitors

By default, XFCE (the WM I use) seems to do this by default.

Extend Desktop To Second Monitor

To extend the desktop to a second monitor (as opposed to mirror the desktop), you need to use xrandr to move the desk top over X number of pixels. Where X = your LEFT monitor's X resolution.

1) Make sure your video card's output is being 'seen' by the system and get the output names:

 xrandr -q

( Make note of the name of your secondary monitor. )

2) Move the secondary monitor over to the right

 xrandr --output HDMI-0 --pos 1024x0 # to move the VGA screen 1024 pixels to the right.

EXAMPLE: Here's my machine. DVI-I-2 is my LEFT monitor and HDMI-0 is my RIGHT monitor.

[arfon@darkstar ~]$ xrandr -q
Screen 0: minimum 8 x 8, current 1920 x 1080, maximum 16384 x 16384
DVI-I-0 disconnected (normal left inverted right x axis y axis)
DVI-I-1 disconnected (normal left inverted right x axis y axis)
DVI-I-2 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 598mm x 336mm
1920x1080      60.0*+
1680x1050      60.0
1440x900       59.9
1280x1024      75.0     60.0
1280x960       60.0
1280x800       59.8
1280x720       60.0
1152x864       75.0
1024x768       75.0     70.1     60.0
800x600        75.0     72.2     60.3     56.2
640x480        75.0     72.8     59.9
HDMI-0 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
1920x1080      60.0*+   59.9     60.1     60.0
1440x480       60.1
1280x720       60.0     59.9
1024x768       75.0     70.1     60.0
800x600        75.0     60.3
720x480        59.9     60.1
640x480        75.0     59.9     59.9
DVI-I-3 disconnected (normal left inverted right x axis y axis)
[arfon@darkstar ~]$ xrandr --output HDMI-0 --pos 1920x0

Cool Switching Scripts

Here's a script I wrote to toggle between extended dual monitors and a single monitor-

#!/bin/bash
vPRIMARYMONITOR="DVI-I-0" # <--- CHANGE THIS.  Find using "xrandr -q"
vLOC="--right" # <--- Change this if you want the second monitor in another position. CHOICES: --above  --below  --left  --right
vEXT=$(xrandr -q | grep " connected" | grep -v $vPRIMARYMONITOR | awk '{print $1}' | head -n 1 )
vOnOff=$(xrandr -q | grep $vEXT | sed 's/primary//g' | awk '{print $3}'| sed 's/[0-9]*x[0-9]*+[0-9]*+[0-9]*/ON/g' )
[ "$vOnOff" != "ON" ] && vOnOff="OFF"
if [ "$vOnOff" = "OFF" ]; then
/usr/bin/xrandr --output $vEXT --auto $vLOC $vPRIMARYMONITOR
else
/usr/bin/xrandr --output $vEXT --off
fi

Script to toggle a mirrored monitor-

#!/bin/bash
vPRIMARYMONITOR="DVI-I-0" # <--- CHANGE THIS.  Find using "xrandr -q"
vEXT=$(xrandr -q | grep " connected" | grep -v $vPRIMARYMONITOR | awk '{print $1}' | head -n 1 )
vOnOff=$(xrandr -q | grep $vEXT | sed 's/primary//g' | awk '{print $3}'| sed 's/[0-9]*x[0-9]*+[0-9]*+[0-9]*/ON/g' )
[ "$vOnOff" != "ON" ] && vOnOff="OFF"
if [ "$vOnOff" = "OFF" ]; then
/usr/bin/xrandr --output $vEXT --auto
else
/usr/bin/xrandr --output $vEXT --off
fi

Sources

Originally written by arfon[2100]

howtos, software, window managers, dual monitors, monitors, dual displays, displays, author arfon

Keyboard Layout in i3

i3 Window Manager

i3wm[2101] does not come with stock Slackware. If you want to install this extremely configurable tiling window manager, please visit SlackBuilds[2102]. Make sure you also install i3status[2103], which will let you display all sorts of useful information in a panel.

Setting the Keyboard Layout

i3 does not come with any built-in keyboard setting mechanism. The setxkbmap command, however, does the job well. If you've set the keyboard layout system-wide and do not need to switch between layouts, you do not need to do anything. If you'd like to set the layout just for i3, you can edit its .xinitrc file. If you change a graphical environment often and you do not want the keymap to be overwritten, you need to modify /etc/X11/xinit/xinitrc.i3.

# nano /etc/X11/xinit/xinitrc.i3

Just before the Start i3 section you can specify the desired keymap (eg. gb):

setxkbmap gb

Save the file and run (as a standard user) xwmconfig and choose i3 to copy the xinitrc file to your home directory. If you are in X, you might need to restart it.

Changing the Keyboard Layout

If you need to switch between different layouts, you can map some keybindings to perform those functions.

1. Open the i3 config file

nano ~/.i3/config

2. Add the following (it's just an example):

Assign Mod4 to the Microsoft key (I use the Microsoft key a lot to avoid clashes with default i3 keybindings):

set $ms Mod4

bindsym $ms+d exec setxkbmap de
bindsym $ms+g exec setxkbmap gb

Now MS+D and MS+G let me switch between the UK and German keyboard layouts.

If you usually switch between two keyboard layouts and you don't need to display the current layout in the status bar, you might also place the following code in your ~/.i3/config file:

setxkbmap -layout de,gb
setxkbmap -option 'grp:ctrl_alt_toggle'

This will let you toggle between the two layouts using Ctrl+Alt.

Displaying the Active Layout in the Panel

i3status comes with a lot of built-in functions. Unfortunately, the current keyboard layout is not one of them. For that reason, you need to write a short script to display the layout in the panel. The default i3status invocation is as follows:

bar {
status_command i3status
}

Here all the built-in functionality is configured in ~/.i3status.conf. We want to add some more on top of that and change it to:

bar {
status_command /path/to/your/i3script.sh
}

The contents of i3script.sh

#!/bin/bash
# shell scipt to prepend i3status with more stuff
i3status --config ~/.i3status.conf | while :
do
read line
LG=$(setxkbmap -query | awk '/layout/{print $2}')
echo "LG: $LG | $line" || exit 1
done

The above will display the current keyboard layout before the standard i3status functions. Obviously you can add much more to i3status[2104].

Using JSON output format (colors)

The method above uses the simplest output mode (text only). Although easier to use, it lacks color support. For that, you'll need JSON.

Add the following property in your .i3status.conf

general {
output_format = i3bar
}

And replace your i3script.sh for the code below. It displays your default language in green (in the example, br) and any other language in red.

#!/bin/bash
i3status --config ~/.i3status.conf | while :
do
read line
LG=$(setxkbmap -query | awk '/layout/{print $2}')
if [ $LG == "br" ]
then
dat="[{ \"full_text\": \"LANG: $LG\", \"color\":\"#009E00\" },"
else
dat="[{ \"full_text\": \"LANG: $LG\", \"color\":\"#C60101\" },"
fi
echo "${line/[/$dat}" || exit 1
done

Sources

Originally written by sycamorex[2105]

Contributions by Anonymous

howtos, hardware, keyboard, settings, i3, author sycamorex

Remote X: Linux to Linux

As X11 in its newer versions doesn't allow incoming tcp connections by default anymore (see the relative commit)[2106], since Slackware 14.2 you have to launch your X server (the one which has to display the remote application) explicitly enabling them, like

   startx -- -listen tcp

if you are using a display manager to launch your X session refer to its documentation for enabling this in its configuration file.

Plain Ol' Vanilla X11 Forwarding

NOTE: in the X11 world, the SERVER machine is the one listening for a connection (your desktop). The CLIENT machine is the one initiating the connection (the machine you are executing the commands on). I know, it sounds backwards but, it is actually correct if you understand the X11 connection.

1) Tell your X11 Server Linux box to accept X11 connections from the Client machines with the xhost command. You can add the the command to .bashrc or .profile:

 EXAMPLE: xhost +192.168.1.36

2) Start the connection from the client (the remote) machine to the server (your desktop) machine: Connect to the remote machine via ssh/telnet/rlogin/whatever and run:

   DISPLAY=X11_SERVER_IP:0;export DISPLAY;APPLICATION_YOU_WANT_TO_RUN &
EXAMPLE: DISPLAY=192.168.1.10:0;export DISPLAY;xterm &

X11 Forwarding Over SSH

1) Edit /etc/ssh/sshd_conf on the remote machine.

 CHANGE:
#X11Forwarding no
TO:
X11Forwarding yes
CHANGE:
#X11UseLocalhost yes
TO:
X11UseLocalhost yes

2) ensure that X11Forwarding is enabled in /etc/ssh/ssh_conf on the local machine.

3) open an X11 forwarded ssh session to the remote machine:

   ssh -X USER@REMOTE_MACHINE
XAPPLICATION_YOU_WANT_TO_RUN

PROBLEMS
PROBLEM: ssh connection is complaining about an “Invalid MIT-MAGIC-COOKIE”.
FIX: start a less secure ssh session:

   ssh -Y USER@REMOTE_MACHINE

Sources

* Originally written by arfon[2107]

howtos, software, X Windows, X11, author arfon

Remote X: Windows to Linux

Plain Ol' Vanilla Remote X11

1) Install Xming and Xming-fonts

Download from http://sourceforge.net/projects/xming/files/[2108]

2) Add the Linux machine's DNS name(s) and/or IP address to the C:\Program Files\xming\X0.hosts file. File should look something like:

  Linux1.mydomain.com
Linux1
192.168.1.25

3) Start Xming

(NOT XLaunch)

4) Start the connection: Connect to the Linux machine via ssh/telnet/rlogin/whatever and run:

   DISPLAY=WINDOWS_IP:0;export DISPLAY;APPLICATION_YOU_WANT_TO_RUN
EXAMPLE: DISPLAY=192.168.1.10:0;export DISPLAY;xterm

Minimize the telnet session, do not close it. If you close it, your X11 connection will close.

PROBLEMS

PROBLEM: “Xlib: connection to YOUR_IP refused by server”
FIX: Check the Xming log, it probably contains “Xming.exe: client 4 rejected from IP YOUR_IP”. If so,

close Xming

Make sure that the DNS names and/or IPs are in the C:\Program Files\xming\X0.hosts file

restart Xming

FIX2: If problem is not fixed, restart Xming with the -ac option.

PROBLEM: Map starts but then I get a font error from OpenView.
FIX: Install the Xming-fonts onto your Windows box.

PROBLEM: When starting Xming, a Windows Security Alert pops up saying Windows Firewall has blocked this program.
FIX: Change Windows Firewall setting to allow Xming.
FIX2: Disable Windows Firewall by going to Services, setting Windows Firewall to MANUAL START and then stop the service.

PROBLEM: Cannot connect to Xming and I have checked all of the above.
FIX: When starting Xming as display 0, Windows Firewall does not complain. Check to see if Windows Firewall is blocking the connection.

Remote X11 Over SSH

1) Edit /etc/ssh/sshd_conf on the remote (Slackware) machine.

   CHANGE:
#X11Forwarding no
TO:
X11Forwarding yes
CHANGE:
#X11UseLocalhost yes
TO:
X11UseLocalhost yes

2) Install Putty (if it's not already installed).

   www.chiark.greenend.org.uk/~sgtatham/putty/

3) Open putty and fill in the “Host Name” box.

4) Under Category > Connection > SSH > X11 check the “Enable X11 forwarding” box.

5) Click the “Open” button to start the connection.

6) Log into the remote machine as you would do in a normal SSH session.

7) Start the X application from the command line, a window should open on your local machine with the application.

(It's basically a regular SSH session with putty but with X11 forwarding enabled.)

Sources

Originally written by arfon[2109]

howtos, software, X Windows, X11, author arfon

VNC

NOTE: for the following examples, 192.168.1.34 will be the REMOTE machine (VNC server).

Setup VNC Server (on Slackware)

USING TigerVNC: On your remote machine, install TigerVNC via slackpkg

   slackpkg install tigervnc

Start the VNC server:

   vncserver

You should get a message stating that the VNC server has started on DISPLAY 1.

NOTE: VNC listens to port 5900 or 5901 by default so make sure you can accept connections from that port.

NOTE: If you are using TigerVNC, the server can also listen on port 5800 for web-browser VNC connections.

Setup VNC Viewer (on Slackware)

USING TigerVNC: On your local machine, install TigerVNC via slackpkg

   slackpkg install tigervnc

Start the VNC viewer:

   vncviewer

Connect to your VNC server:

   In the "VNC server:" box put the IP address/URL of your VNC server and the display number:
192.168.1.34:1

Tunnel VNC Through SSH (from Slackware)

Open an SSH connection:

   ssh -L 5901:localhost:5901 -N -f -l bob 192.168.1.34

Where,
-L 5901:localhost:5901 = Connections to local port 5901 is forwarded to remote port 5901 on the remote machine.
-N : Just forward ports, do not execute a remote command.
-f : Make ssh to go to background before command execution.
-l bob : 'bob' is the username.
192.168.1.34 : is the remote machine (target VNC Server).

Connect with VNC:

   vncviewer
Enter "localhost:1" (or "127.0.0.1:1") into the 'VNC server:' box

Tunnel VNC Through SSH (from Windows with Putty [V0.62])

Install Putty on the LOCAL machine.

Open putty and set the following values:

   Session >
HostName: 192.168.1.34
Connection Type: SSH
Connection > SSH > Tunnels >
Source port: 5901
Destination: 192.168.1.34:5901

Start the connection by hitting the OPEN button.

Connect with VNC:

   vncviewer
Enter "localhost:1" (or "127.0.0.1:1") into the 'VNC server:' box

Reverse VNC Connection

(Connecting to a listening VNC viewer (Useful for family IT support))

Start The VNC Viewer (on Slackware) In Listen Mode-

   vncviewer -listen 5500
WHERE: 5500 is the port to listen on (5500 is default).

IF YOUR INCOMING CONNECTION IS COMING THROUGH A FIREWALL (most home routers) do not forget to forward the port in the router (5500 is the default port for reverse VNC connections).

Start the VNC SERVER on Windows and attach a listening viewer-

   Start the VNC Server
RIGHT CLICK on the VNC server icon in your task bar and select "ATTACH LISTENING VIEWER"
Put in the IP address of the viewer machine: 192.168.1.34
**NOTE** - If the incoming connection is coming into your home network from the internet
(through a forwarded port), make sure to connect to the ROUTER'S address (the
internet address) and NOT your local address. This can be found by going to a
"whatsmyip" website with a broswer.

Sources

* Originally written by arfon[2110]

howtos, software, X Windows, X11, VNC, TightVNC, Putty, author arfon

Setting a Keyboard Layout

Setting a keyboard layout is a necessary step if you do not want the default us layout. Furthermore, some people quite often need to switch between layouts. Below you'll find ways of setting / changing the keyboard layout both in the console and in X.

Keyboard in the Console

Keyboard layout is first set during the installation process where you're asked to choose a relevant keyboard map. This setting only applies to the console before you start the X server (GUI).

It can be changed in /etc/rc.d/rc.keymap:

#!/bin/sh
# Load the keyboard map.  More maps are in /usr/share/kbd/keymaps.
if [ -x /usr/bin/loadkeys ]; then
/usr/bin/loadkeys uk.map
fi

As you can see above, I use the UK layout. More keyboard layouts can be found in the directory mentioned above.

Please note that if you decide not to change the default layout (US) during the installation process, the file /etc/rc.d/rc.keymap will not be created. If, at a later stage, you need to change it, you will need to create that file, copy the above code and choose one of the keymaps available in the /usr/share/kdb/keymaps/ directory.

Keyboard Layout in X

Setting up a keyboard layout for X can be done in 2 ways: system-wide (regardless of your desktop environment or user) or on a desktop environment / window manager level.

Setting the Layout System-wide

Slackware 13.0 and 13.1

In Slackware 13.0 and 13.1 hal was responsible for keyboard mapping:

Copy the relevant .fdi file to /etc/hal/fdi/policy/:

cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/

Edit the file:

vim /etc/hal/fdi/policy/10.keymap.fdi

Replacing us with a keymap of your choice (in my case it is gb):

<merge key=“input.xkb.layout” type=“string”>us</merge>

<merge key=“input.xkb.layout” type=“string”>gb</merge>

Slackware 13.37 and 14

From Slackware 13.37 on, udev has taken over keyboard mapping functions and the procedure has changed as well:

cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d/

Edit the 90-keyboard-layout.conf file specifying the layout (eg. gb):

vim /etc/X11/xorg.conf.d/90-keyboard-layout.conf

Section "InputClass"
Identifier "keyboard-all"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbLayout" "gb"
#Option "XkbVariant" ""
Option "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

You also need to restart X for the change to take effect.

Setting the Layout in Particular Desktop Environments / Window Managers

Some environments by default include GUI tools to set the keyboard layout while others require tweaking the startup files and a manual use of the setxkbmap command. You can use this command at any time if you want to change the keyboard layout in X. You might need to restart certain applications for the changes to take effect.

This, for example, would switch your keyboard layout to Polish:

setxkbmap pl

Below are some ways of changing keyboard layouts within particular desktop environments or window managers.

KDE

Keyboard Layout in KDE[2111]

Xfce

Keyboard Layout in Xfce[2112]

Fluxbox

Keyboard Layout in Fluxbox[2113]

i3

Keyboard Layout in i3[2114]

Sources

Originally written by sycamorex[2115]

howtos, keyboard, settings, hardware, author sycamorex

HOWTO articles - Window Managers

This section contains how to articles intended to guide users to setup and maintain window managers on Slackware based systems.

Inspired? Want to write a Window Manager HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Administration HOWTOS

Page
Description
Tags

Dual Monitors
Dual Monitors Known to work on Slackware 14.1 and XFCE If you are running XFCE and your secondary monitor isn't working, check and make sure it's enabled in XFCE's SETTINGS: SETTINGS > SETTING MANAGER > DISPLAY > display name in column on left > USE THIS OUTPUT
howtos, software, window managers, dual monitors, monitors, dual displays, displays, author arfon

Enlightement DR17
Enlightement DR17 What is E17? Enlightenment DR17 (E17) is the long awaited successor of E16, a window manager which was distributed in Slackware 10 years ago. It is classed as a “desktop shell”, providing the things you need to operate your desktop (or laptop), but not a whole suite of applications. This includes launching applications, managing their windows, and doing other system tasks like suspending, rebooting, managing files, etc.
howtos, e17, author ngc891

i3 Tiling Window Manager
i3 Tiling Window Manager i3 is a very lightweight, flexible and customisable tiling window manager with excellent multi-monitor support. Tiling window managers aim at maximising the screen space by tiling all opened windows in a non-overlapping mode. As all the bells and whistles of traditional desktops are virtually non-existent in tiling window managers, they have a very minimalist look and are mostly keyboard-focused. If the concept of tiling window managers is still puzzling, please check t…
howtos, i3, i3status, wm, software, author sycamorex

Setting a Keyboard Layout
Setting a Keyboard Layout Setting a keyboard layout is a necessary step if you do not want the default us layout. Furthermore, some people quite often need to switch between layouts. Below you'll find ways of setting / changing the keyboard layout both in the console and in X.
howtos, keyboard, settings, hardware, author sycamorex

Keyboard Layout in Fluxbox
Keyboard Layout in Fluxbox If you have set the keyboard layout system-wide, you do not need to do anything. If, however, you switch between layouts on a regular basis, Fluxbox lets you easily add this functionality to the menu. Fluxbox Menu 1. Open the Fluxbox menu config file:
howtos, hardware, keyboard, settings, fluxbox, author sycamorex

Keyboard Layout in i3
Keyboard Layout in i3 i3 Window Manager i3wm does not come with stock Slackware. If you want to install this extremely configurable tiling window manager, please visit SlackBuilds. Make sure you also install i3status, which will let you display all sorts of useful information in a panel.
howtos, hardware, keyboard, settings, i3, author sycamorex

Keyboard Layout in KDE
Keyboard Layout in KDE If you haven't set the keyboard layout system-wide, you can specify it in KDE System Settings. The following steps have been tested on Slackware 14 (KDE SC 4.8.5) Setting Keyboard Layout 1. Open Input Devices from the System Settings panel.
howtos, hardware, keyboard, settings, kde, author sycamorex

Keyboard Layout in Xfce
Keyboard Layout in Xfce If you haven't set the keyboard layout system-wide, you can specify it in Xfce 4 Settings Manager. Setting Keyboard Layout 1. Open Xfce 4 Settings Manager Menu => Settings => Settings Manager 2. Click on the Keyboard icon. 3. Switch to the
howtos, hardware, keyboard, settings, xfce, author sycamorex

Remote X: Linux to Linux
Remote X: Linux to Linux As X11 in its newer versions doesn't allow incoming tcp connections by default anymore (see the relative commit), since Slackware 14.2 you have to launch your X server (the one which has to display the remote application) explicitly enabling them, like
howtos, software, x windows, x11, author arfon

Remote X: Windows to Linux
Remote X: Windows to Linux Plain Ol' Vanilla Remote X11 1) Install Xming and Xming-fonts * Download from <http://sourceforge.net/projects/xming/files/> 2) Add the Linux machine's DNS name(s) and/or IP address to the C:\Program Files\xming\X0.hosts file. File should look something like:
howtos, software, x windows, x11, author arfon

SLiM (Simple Login Manager)
SLiM (Simple Login Manager) SLiM is an acronym for Simple Login Manager. If you use one of the lightweight desktop environements like Xfce, Fluxbox, Blackbox or WindowMaker, you might want to use SLiM. Slackware ships with two login managers who could theoretically do the job but each have their shortcomings:
howtos, software, slim, login manager, author kikinovak

How To Take a Screenshot ?
How To Take a Screenshot ? Taking a screenshot can be done in several ways. The easiest is to use a graphics program (for example KSnapshot, The GIMP, or xpaint) and choose the built-in screenshot or snapshot menu option. The method may be very different from one application to another, so I have chosen
howtos, software, author zithro

VNC
VNC NOTE: for the following examples, 192.168.1.34 will be the REMOTE machine (VNC server). Setup VNC Server (on Slackware) USING TigerVNC: On your remote machine, install TigerVNC via slackpkg slackpkg install tigervnc Start the VNC server:
howtos, software, x windows, x11, vnc, tightvnc, putty, author arfon

XFCE Applications Menu
XFCE Applications Menu How to manipulate the XFCE Applications Menu. Add an app to the XFCE menu To add an installed app to the [system wide] XFCE APPLICATIONS MENU, as root: 1) Create the .desktop file: vi /usr/share/applications/APPNAME.desktop
howtos, software, xfce, slackware 13.37, slackware 14.0, slackware 14.1, author arfon

XFCE - Handy Launchers
XFCE - Handy Launchers Create a launcher 1) Somewhere on the blank desktop, RIGHT CLICK 2) Select CREATE LAUNCHER SSH LAUNCHER 1) NAME -> anything you want 2) COMMAND -> ssh MACHINE_NAME_OR_IP 3) CLICK -> RUN IN TERMINAL SSH LAUNCHER WITH VNC TUNNELING (GO TO THE BACKGROUND)
howtos, window managers, xfce, launcher, ssh, vnc, author arfon

Xmonad as a Windowmanager for Slackware
Xmonad as a Windowmanager for Slackware Xmonad is a tiling window manager. For information about tiling window managers please read this wiki: wikipedia For Xmonad read here Required packages Xmonad is not included in Slackware by default, but available via SlackBuilds.org. Xmonad is written in Haskell and therefore some packages of the Haskell series are required in order to build Xmonad. Here are the packages in the correct build order:
howtos, windowmanager, tiling-windowmanager, haskell, xmonad, author markush

howtos, topic page

SLiM (Simple Login Manager)

SLiM [2116] is an acronym for Simple Login Manager. If you use one of the lightweight desktop environements like Xfce, Fluxbox, Blackbox or WindowMaker, you might want to use SLiM.

Slackware ships with two login managers who could theoretically do the job but each have their shortcomings:

KDM (heavy)

XDM (visually unappealing)

Installation

SLiM doesn't ship with a stock Slackware installation, but you can easily install it from SBo[2117].

Basic configuration (system level)

All login managers (SLiM, GDM, KDM, XDM) are supposed to start in runlevel 4, so make sure this is actually your default runlevel. Take a peek in /etc/inittab and see if you have the following:

# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

You can also check the current runlevel of your machine by typing the following command:

# who -r
run-level 4  2012-07-04 21:44                   last=S

In the example shown above, the current runlevel of your machine is also “4”.

Now edit /etc/rc.d/rc.4 and add a few lines to start SLiM automatically on boot. The order is important here. Insert the stanza right before the one that manages GDM, like this:

# Tell the viewers what's going to happen...
echo "Starting up X11 session manager..."
# Start SLiM...
if [ -x /usr/bin/slim ]; then
exec /usr/bin/slim
fi
# Try to use GNOME's gdm session manager.  This comes first because if
# gdm is on the machine then the user probably installed it and wants
# to use it by default:
if [ -x /usr/bin/gdm ]; then
exec /usr/bin/gdm -nodaemon
fi

Basic configuration (user level)

There's one last thing left to do before your shiny new login manager can be put to use. Run the following command as a normal user:

$ xwmconfig

This will launch Slackware's window manager selection dialog box. Choose your window manager (Xfce, Fluxbox, Blackbox, whatever) and hit OK. This spews out a new ~/.xinitrc file in your home directory. We won't go into the gory details of this file, since the one interesting thing about it is that it enables you to log in using SLiM.

Fine-tuning

SLiM's main configuration file is /etc/slim.conf. It's very clear and well commented and pretty much self-explanatory. For example, you might want to decide that you prefer activating numlock on boot. In that case, just uncomment the relevant line in slim.conf like this:

# Activate numlock when slim starts. Valid values: on|off
numlock             on

Artwork

SLiM's default theme may or may not appeal to you. If the latter is the case, then you can either install another theme, or create your own theme from scratch.

SBo's slim build comes with an alternate theme called slackware-black, created by Frank Caraballo. You can activate this theme by editing the according line in /etc/slim.conf and replacing default with slackware-black, like this:

# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme       slackware-black

An alternative Slackware theme[2118] is available on ngc891's blog[2119].

The SLiM website has a page with a collection of themes[2120]. Installing one or more of these themes is quite simple. Take a look in /usr/share/slim/themes. You'll see two directories: default and slackware-black. To install a theme, simply download the theme tarball and uncompress it in the /usr/share/slim/themes directory (as root, of course). To activate the theme, edit the current_theme line in /etc/slim.conf accordingly.

The site also sports a nice tutorial [2121] about your own theme creation.

Install a collection of ready-made themes, and then take a peek in the respective theme directories to see how it's actually done.

Sources

Originally written by Niki Kovacs[2122]

howtos, software, slim, login manager, author kikinovak

How To Take a Screenshot ?

Taking a screenshot can be done in several ways.
The easiest is to use a graphics program (for example KSnapshot, The GIMP, or xpaint) and choose the built-in screenshot or snapshot menu option. The method may be very different from one application to another, so I have chosen xpaint as an example.

But you can't use this program to make a screenshot of a video or an image in full-screen, for example. To circumvent this, you can use the PrtScr key (aka Print Screen), or use some command-line tools designed for the X window system. I'll quickly describe the basic switches of an X tool called xwd, and Imagemagick's import command.

Using the Import Function of an Application

I will explain here how to do it with xpaint, a pretty lightweight piece of software that has the basic tools you would need to work on a screenshot. You do not need all the power of The GIMP to make some basic changes to a screenshot. Plus it's already included in a default Slackware install.

Open xpaint from an xterm, or from your DE / WM menu. Open the “Canvas” menu and select “Take snapshot”. A little edge appears, which will allow you to select the application window you are capturing. What happens next depends which mouse button you click on.

To capture the whole screen, left-click or middle-click somewhere on your desktop. To be precise, on a part of the desktop where you can see the desktop's background or background image.

To capture a specific window, left-click or middle-click somewhere in it.

To capture a specific area on the screen, left-click and hold it till you get the desired size.

To cancel a capture, right-click.

You can use the -snapshot switch to launch xpaint in the snapshot mode (xpaint -snapshot). This will provide the selection edge instantly, with no need to click through the menus. Can be useful as an alias if you are only using xpaint for screenshots.

The Keyboard Method

Press the PrtScr key, located usually on the top-right of your keyboard. It can also read PrnScr, Print Screen, etc. Open an image editing program (GIMP, xpaint, …), and choose the paste option, usually the Ctrl+V combo. On some systems, it has been reported that using Alt+PrtScr solves the problem.

Neither of these methods works on my system. I don't know yet if it's because of my hardware/laptop configuration or because of my X keyboard setup, so I can't guarantee that it will work on your system. Neither can I tell you if it's supposed to work on a tty. The article will eventually show the hint as I find out or someone else posts some suggestion(s).

The Command-Line Way

Please note that for the following commands to run, the Imagemagick suite of tools must be installed. Run slackpkg search imagemagick to check if it's installed on your system, but it's usually available with a normal Slackware install.

Even if you can launch the commands from a tty (using proper options not described in this document but in the man pages), only X windows may be captured.

The ''xwd'' Command

xwd is part of the X system. As it dumps the screenshot in a special format, we have to use an ImageMagick tool to convert it, named … convert.

Capturing a window

xwd | convert - path/to/screenshot.ext

You will be provided with a crosshair tool; use it to select the window you want to capture. You can change the type of the output file only by changing the extension, for example screenshot.png, screenshot.jpg, screenshot.gif, etc. The - switch is to indicate to convert that it should translate from standard input rather than a file.

Remember to raise the window you want to grab above the others. Otherwise every window which covers it will be replaced by black pixels (or black boxes) in the final capture. Which by the way can be an useful way to hide some parts of the output! For example if you take a screenshot of an xterm full of commands with some of your personal info displayed (passwords, IP addresses, …), or a screenshot of a browser and you want to hide some tabs. Just place some windows over the one you want to capture.

If you want to capture a window WITH its overlayered windows, so that the capture does not display a black box but instead the overlaying window(s) content (for example, an application menu or an xterm window over a browser to capture both at the same time, etc), use the -screen switch:

xwd -screen | convert - path/to/screenshot.ext

Capturing the Desktop or a Fullscreen Application

Add the -root switch to get:

''xwd -root | convert - path/to/screenshot.ext''

The -root indicates you want to grab the “main” X window, so all what you can see currently displayed on screen (root is the name of the main X window). As it's capturing the whole screen, you won't need to select a window.

Imagemagick's ''import'' Command

There may be a bug or at least a glitch on some systems, as import -screen and import -window root may show “black boxes” overlaying the window that has been captured, which indicates that some other window(s) are getting on top of it before the capture takes place, even if you don't see it/them!
I don't know what causes this behaviour, nor have found or really searched for an explanation yet. Nonetheless, it seems that the -frame switch works better, but it has the same limitations as -screen (you can't get overlaying windows content). You can also try to minimize all open windows.
If that doesn't help, use xwd for correct captures, or grab your hitchhiking guide and get on google.

The import command is part of the ImageMagick suite of tools. It works like xwd but doesn't need the convert program and uses different options (switches).

Capturing a window

import path/to/screenshot.ext

Select the desired window to capture, and that's it.

import -screen path/to/screenshot.ext
or
import -frame path/to/screenshot.ext

The -screen option is equivalent to xwd's one, having the same limitations for overlayed windows. The -frame switch cannot capture overlayed windows.

Capturing the Desktop or a Fullscreen Application

import -window root path/to/screenshot.ext
or
import -frame path/to/screenshot.ext

The -window root is equivalent to xwd's -root switch. It captures the whole desktop. The -frame option can be used to prevent black boxes as in the warning above.

Hints for Fullscreen Applications

To make these methods work for fullscreen applications, you have to prepend a sleep command before the actual commands, so you can switch windows before being prompted to choose the captured one. You then have some time to prepare the application you want to capture. For example, to take a screenshot of a fullscreen YouTube or mplayer-played video:

Type the screenshot command (for example sleep 15 ; xwd | convert - ~/YT-capture.png)

In the player/viewer, play the video or show the image

Choose the fullscreen view mode.

Wait for the crosshairs to display, then click. Your screenshot is now recorded.

You can use whatever command switches you like or even none - it's up to you. Without switches you'll have to click the window to capture, with any of them the screenshot will be taken just after the sleep countdown reaches 0.
If you are using the automated methods (ie. xwd -root or import -window root), you can add a bell after the command, so you know the operation is complete. The full command is then:

sleep 15 ; xwd -root | convert - path/to/screenshot.ext ; echo $'\a'

Or with import:

sleep 15 ; import -window root path/to/screenshot.ext ; echo $'\a'

To go further

The tools are well documented in their man pages, I recommend you to read them for fine tuning or better automation of your screenshots: man import, man xwd, man convert.
xwd has a corresponding program called xuwd. It reads an xwd dump (either from a dump file or from standard input) and displays it. It can be useful for automatic display of screenshots taken on remote machines, if you don't need to save the files.

I do not want to read all this article! I'm in a hurry!

Fair enough, shorter can be better, sometimes. Only xwd commands are shown though.

Capture the selected window (fullscreen or window mode): xwd | convert - path/to/screenshot.ext

Capture a screenshot of the whole X session: xwd -root | convert - path/to/screenshot.ext

Capture a window with the overlayed windows content: xwd -screen | convert - path/to/screenshot.ext

Add a timer before the command to be able to switch to a fullscreen application: sleep 10 ; xwd | convert - path/to/screenshot.ext

Sources

Originally written by zithro[2123]

howtos, software, author zithro

XFCE Applications Menu

How to manipulate the XFCE Applications Menu.

Add an app to the XFCE menu

To add an installed app to the [system wide] XFCE APPLICATIONS MENU, as root:

1) Create the .desktop file:

vi /usr/share/applications/APPNAME.desktop

2) ADD:

/usr/share/applications/APPNAME.desktop

[Desktop Entry]
Name=APP NAME
Comment=A COMMENT
Exec=/PATH/TO/APP/BIN
Icon=/PATH/TO/ICON/IMAGE.xpm
Terminal=TRUE/FALSE
Type=Application
Categories=CATEGORY(S)

EXAMPLE: dosemu

/usr/share/applications/dosemu.desktop

[Desktop Entry]
Name=DOS emulator
Name[lt]=DOS emuliatorius
Comment=DOS emulator "dosemu"
Comment[lt]=DOS emuliatorius "dosemu"
Exec=/usr/bin/dosemu
Icon=/usr/share/pixmaps/dosemu.xpm
Terminal=false
Type=Application
Categories=System;Emulator;

To add an installed app to a user's XFCE APPLICATIONS MENU, as that user:

1) Create the .desktop file:

vi ~/.local/share/applications/APPNAME.desktop

2) ADD:

~/.local/share/applications/APPNAME.desktop

[Desktop Entry]
Name=APP NAME
Comment=A COMMENT
Exec=/PATH/TO/APP/BIN
Icon=/PATH/TO/ICON/IMAGE.xpm
Terminal=TRUE/FALSE
Type=Application
Categories=CATEGORY(S)

Sources

Originally written by arfon[2124]

howtos, software, XFCE, slackware 13.37, slackware 14.0, slackware 14.1, author arfon

XFCE - Handy Launchers

Create a launcher

1) Somewhere on the blank desktop, RIGHT CLICK
2) Select CREATE LAUNCHER

SSH LAUNCHER

1) NAME → anything you want
2) COMMAND → ssh MACHINE_NAME_OR_IP
3) CLICK → RUN IN TERMINAL

SSH LAUNCHER WITH VNC TUNNELING (GO TO THE BACKGROUND)

1) NAME → anything you want
2) COMMAND → ssh -L 5901:127.0.0.1:5901 -N -f TARGET_MACHINE_NAME_OR_IP
3) CLICK → RUN IN TERMINAL

NOTE: If your are listening for ssh on a non-standard port, just add -p PORT# to the COMMAND.

SSH LAUNCHER WITH VNC TUNNELING (STAY OPEN IN FOREGROUND)

1) NAME → anything you want
2) COMMAND → ssh -L 5901:127.0.0.1:5901 TARGET_MACHINE_NAME_OR_IP
3) CLICK → RUN IN TERMINAL

NOTE: If your are listening for ssh on a non-standard port, just add -p PORT# to the COMMAND.

VNC (VIEWER) LAUNCHER

1) NAME → anything you want
2) COMMAND → vncviewer TARGET_MACHINE_NAME_OR_IP:1

NOTE: “:1” is the display number on the target machine. If you are running multiple VNC servers on that machine, you need to change this to the correct display that you want.

VNC (VIEWER) LAUNCHER (SSH TUNNEL)

(used with a SSH connection with VNC tunneling, see SSH LAUNCHER WITH VNC TUNNELING )

1) NAME → anything you want
2) COMMAND → vncviewer localhost:1

NOTE: “:1” is the display number on the target machine. If you are running a VNC server on the local machine, you need to change this on the target machine and local machine to a display number not running locally.

Sources

* Originally written by arfon[2125]

howtos, Window Managers, XFCE, Launcher, SSH, VNC, author arfon

Work in progress

Shells

A shell (also called a command line interpreter) is a program that provides a command line interface, a bridge between a user and the operating system. When a user logs in, the shell specified in the user's profile loads up and greets the user with a welcoming command prompt. The default shell in Slackware is Bash (Bourne-again shell)[2136]. Other popular shells that Slackware ships with include:

Korn Shell (ksh)

C Shell (tcsh)

Z Shell (zsh)

Although we are going to focus exclusively on bash, one can switch and try out other shells:

root@darkstar:~# chsh -s /bin/zsh fred

This will change the login shell to zsh for the user fred. If we do not want to modify a user's default shell, we can just start a given shell by typing:

user@darkstar:~$ zsh

To learn more about those shells please see this article[2137].

Bash and its Startup Files

Being released in 1989, Bash predates Slackware by a few years and has been part of the distro since its early days. Slackware 1.01 featured Bash-1.12.3. Over the years Bash has developed a wide range of features and has become the default shell in many distros including Slackware.

Login & Interactive Shells

To understand how shell initialisation files are loaded we need to introduce the concept of login and interactive shells.

In a nutshell (no pun intended), a login shell is the one that starts when a user logs in providing their username and password (also remotely using ssh). Technically speaking, a login shell is one whose first character of argument zero is a - or, or one started with the –login option (Source: Bash manual). An interactive shell is one which a user can interact with by typing commands on the command prompt. Please note that although some shell scripts allow for user interaction, the shell they start is non-interactive. The following are some common ways of shell invocation:

Shell Invocation | Login | Non-login | Interactive | Non-interactive
Login at runlevel 3 (Slackware default login) | + | - | + | -
Login remotely (ssh) | + | - | + | -
Opening a terminal window | - | + | + | -
Opening a terminal window (bash -l³⁴⁾) | + | - | + | -
Shell script (#!/bin/bash) | - | + | - | +
Remote command (ssh host command) | - | + | - | +
Switch user (su) | - | + | + | -
Switch user (su -) | + | - | + | -

You can tell whether a shell is a login one by checking the value of the $0 variable. If it starts with a dash (-), it is a login one:

user@darkstar:~$ echo $0
-bash

The distinction between login and non-login shells is crucial in order to understand which startup files are read when a shell starts, which, in turn, determines which environment variables are set. A good example illustrating this problem is the $PATH variable:

su (non-login shell)

root@darkstar:/home/user# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

su - or su -l (login shell)

root@darkstar:~# echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin

For that reason, it is recommended to start a login shell with (su -) when building SlackBuild scripts.

Login Shell Initialisation

Examples: Slackware login (runlevel 3), an interactive shell started with the -l or –login flags

To load environment variables and settings a shell sources a number of files.

Sourcing a file is the act of executing it in the current shell. There are 2 ways of sourcing a file:

user@darkstar:~$ source filename

or using a short notation:

user@darkstar:~$ . filename

By contrast, executing a file (./filename) executes the script in a new shell:

A login shell reads startup files in the following order:

/etc/profile

~/.bash_profile

~/.bash_login

~/.profile

After executing commands from /etc/profile, the shell checks if the next file exists and is readable. If so, it then executes the commands that the file contains. On a fresh Slackware install, only /etc/profile exists and sets the environment system wide. If a user wants to override their login shell settings, they need to manually create one of the other files. Please note that each of this files is sourced only once when a user logs in.

Please note that the tilde sign (~) in a pathname refers to a user's /home directory. For example, for user fred the ~/ pathname expands to /home/fred/. To access a user's /home directory, the $HOME variable can be used as well. Environment variables will be discussed later.

Interactive Non-login Shell Initialisation

Example: run a terminal window from your desktop or application menu

An interactive non-login shell inherits some environment settings from the login shell startup files and then sources ~/.bashrc if it exists and is readable. By default, the file does not exist in Slackware. A common first step for many Slackware users is to create this file and source /etc/profile to load more environment settings (eg. a more informative command prompt):

~/.bashrc

source /etc/profile

Please note that, if it exists, ~/.bashrc is loaded each time you start a terminal window.

Non-interactive Non-login Shell Initialisation

Example: run a shell script

A non-interactive non-login shell inherits some variables from the login shell and looks for the environment variable BASH_ENV which points to a startup file to be read by the shell. By default, the BASH_ENV variable is not set in Slackware. If you have some custom environment variables in your ~/.bashrc and you want them read by your scripts as well, you can set this variable in eg. ~/.bash_profile:

BASH_ENV=$HOME/.bashrc

Configuring Your Environment

While bash provides very reasonable defaults, the power of the command line interface lies in the possibility to customise your working environment to your own preferences and needs. The following sections will discuss some of the steps you can take to customise your CLI environment.

Do I have to create / edit all of the startup files mentioned above?

No, you don't. See below.

~/.bashrc vs ~/.bash_profile

Admittedly, the fact that ~/.bash_profile is read by the login shell (ie. only once when you log in) whereas ~/.bashrc is sourced by non-login interactive shells (each time you start a terminal window) allows for some proper fine tuning of your environment. After all, some variables just need to be assigned once. There is no point in resetting them each time you start a terminal window. For convenience reasons, however, a more common approach is to do keep all your customisations in one file, usually ~/.bashrc, that will be sourced by both login and non-login shells.

1. Make sure a login shell sources ~/.bashrc by adding the following to ~/.bash_profile:

.bash_profile

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

If you are going to do any customisations of root's environment (eg. configuring root's shell prompt discussed below), you need to do the above for root user as well.

2. Place all your customisations in ~/.bashrc.

That way both interactive non-login and login shells read ~/.bashrc

~/.bashrc

As it was mentioned above, first we read a global startup file:

. /etc/profile

You can view all the environment variables that are set with the env or printenvcommands:

user@darkstar:~$ env

Now we can override some system default settings.

Please note that to implement any changes that you have made in ~/.bashrc, you need to source it afterwards:

source ~/.bashrc

Customising Variables

Before we do any customisations, let us mention a few words about variables.

Variables are containers that hold a value (eg. string or number) that can be later accessed by a shell.

user@darkstar:~/bin$ MYVAR="some_value"
user@darkstar:~/bin$ echo $MYVAR
some_value

Please note that when we assign some value to a variable we do not use the dollar sign ($) in front of a variable name:

VARIABLE="some_value"

We use $ when we want to access the value stored in a variable:

user@darkstar:~$ echo $VARIABLE
some_value

When creating variables it is important to remember the following:

variable names can contain alphanumeric characters, as well as the underscore (_). Please note that a variable name cannot start with a number.

Do not put any whitespaces around the equal sign (=) or in the variable name.

It is recommended to wrap the value of a variable in double quotes (“) to avoid possible problems when referring to its value.

Variable names are case sensitive

Exporting a variable

Please consider the following example:

MY_VAR="Some text"
export MY_EXPORTED_VAR="More text"

By exporting a variable you make it accessible to any sub-shells created in the current shell. In other words, if you want a script to be aware of a variable, you need to export it. If you want to see all the exported variables in the current shell, type:

export -p

$PATH Variable

The $PATH variable holds a colon (:) separated list of directories containing executable files.

You can use echo to check the value of a particular variable. The current value of the $PATH variable on your system should be as follows:

user@darkstar:~$ echo $PATH
PATH=/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/java/bin:/usr/lib/kde4/libexec:/usr/lib/qt/bin:/usr/share/texmf/bin:.

Please note the trailing . (dot). In Bash a dot in a pathname represents the current working directory. For security reasons, it is customary to place the current working directory at the end of your $PATH to avoid overriding system executables.

Users typically store their scripts in ~/bin so let us create the directory and include it in $PATH.

user@darkstar:~$ mkdir ~/bin
user@darkstar:~$ nano ~/.bashrc

.bashrc

. /etc/profile
PATH=$PATH:~/bin

Now you need to source the file to put the changes into practice:

user@darkstar:~$ source ~/.bashrc

$CDPATH Variable

If you work in certain directories on a regular basis, you might want to include them in the $CDPATH variable. Suppose you often work in the slackbuilds directory which contains some builds:

user@darkstar:~$ cd ~/data/projects/slackbuilds/
user@darkstar:~/data/projects/slackbuilds$ ls
i3 i3status yajl dmenu libev

Add it to the $CDPATH variable by modifying ~/.bashrc:

.bashrc

. /etc/profile
PATH=$PATH:~/bin
CDPATH=$CDPATH:~/data/projects/slackbuilds/

Now you should be able to cd to any of those directories from any place:

user$darkstar:~/.config/xfce4$ pwd
/home/user/.config/xfce4
user@darkstar:~$ cd yajl
/home/user/data/projects/slackbuilds/yajl

Set the Default Editor

For historical reasons, there still exist 2 separate environment variables ($VISUAL and $EDITOR) responsible for specifying the default command line editor. You can use any of them or better still, assign the same value to both of them. Bash chooses the default editor by checking the $VISUAL and then $EDITOR. If neither of them is set, it opens Emacs. Add the following to ~/.bashrc (Obviously replace vim with an editor of choice):

export VISUAL=vim
export EDITOR=vim

Configuring a Shell Prompt

When you first open a terminal window in Slackware, you are likely to see the following shell prompt:

bash-4.2$

It is quite bare and the only thing it tells us is that we run Bash version 4.2 and that we run it as a standard user (as opposed to root). The moment we source the system-wide configuration file, we will get a considerably more informative shell prompt displaying the current user, the hostname as well as the current working directory:

username@hostname:~$

By default the primary Slackware bash prompt is configured in /etc/profile and stored in the PS1 variable:

PS1='\u@\h:\w\$ '
...
PS2='> '

You may also notice the PS2 variable which stores a secondary shell prompt (> ) which is used when we split a very long command with the backslash (\) or when the shell is waiting for further input before interpreting the command, as in:

user@darkstar:~$ ./configure --prefix=/usr --sysconfdir=/etc --enable-warnings \
> --disable-atsui --disable-gtk-doc --disable-glitz --disable-quartz --disable-static \
> --disable-win32 --disable-xcb

user@darkstar:~$ echo "This is a piece
> of text. The moment I close the string
> with a double quote, bash will execute the command."
This is a piece
of text. The moment I close the string
with a double quote, bash will execute the command.
user@darkstar:~$

Please note that there also exist variables PS3 and PS4 which store the select command and execution trace prompts, respectively (more information: man bash).

Display the Current Prompt Settings

To display the current prompt settings, you can echo the contents of the PS1 variable:

user@darkstar:~$ echo $PS1
\u@\h: \w\$
user@darkstar:~$ echo $PS2
>

As you can guess from the example above, \u stands for the username, \h for the hostname, and \w represents the current working directory pathname. The trailing \$ expands to # if you are root (ie. the effective UID is 0) and $ in all other cases. Have a a look at this table of some common special characters used in the PS1 variable:

Character | Description
\u | username of the current user
\h | hostname (short output - to the first .)
\H | FQDN (eg. darkstar.domain.com)
\w | full pathname of the current working directory
\W | the basename of the current working directory
\d | current date
\t | current time in 24-hour (HH:MM:SS) format
\T | current time in 12-hour format
\! | current command history number
\j | number of jobs that the current shell manages

Setting the Prompt

You can test some prompt configurations by temporarily defining the variable directly in the shell

user@darkstar:~$ PS1="\u@\h \! \j \t \$ "
user@darkstar 503 0 20:30:24 $

Apart from the standard user and host names, the prompt now displays the bash history number, the number of jobs running in the background, as well as the current time. You can get creative when designing your own shell prompt, especially with the help of the command substitution $(…) construct:

user@darkstar:~$ PS1="\u@\h [\$(ls | wc -l)]:\$ "
user@darkstar[9]:$

The above shell prompt will also display the number of files and directories in the current working directory. It is important, however, to remember that the command prompt is there to help you. For that reason, one needs to keep the balance between keeping the prompt informative and practical at the same time. A very descriptive, but long, command prompt may easily hinder your productiveness.

Prompt in Colours

One way to display the shell prompt in colour is to use the tput command which checks the terminfo database and generates relevant codes for a terminal. It has a number of capabilities including:

setaf - set ANSI foreground

setab - set ANSI background

Its syntax is as follows:

Command | Description
tput setaf colour_code | Set a foreground colour
tput setab colour_code | Set a background colour
tput sgr0 | Switch off any colours

Colour Codes

The values of colour codes are as follows:

Colour | Colour Code
black | 0
red | 1
green | 2
yellow | 3
blue | 4
magenta | 5
cyan | 6
white | 7

Configure the Prompt in Colour

Let us define some colour variables in ~/.bashrc:

# Defining foreground variables
P_BLACK="\[$(tput setaf 0)\]"
P_RED="\[$(tput setaf 1)\]"
P_GREEN="\[$(tput setaf 2)\]"
P_YELLOW="\[$(tput setaf 3)\]"
P_BLUE="\[$(tput setaf 4)\]"
P_MAGENTA="\[$(tput setaf 5)\]"
P_CYAN="\[$(tput setaf 6)\]"
P_WHITE="\[$(tput setaf 7)\]"
P_RESET="\[$(tput sgr0)\]"

Please note that we wrap \[…\] around the output of tput to indicate that it contains non-printable characters. This helps avoid any problems with calculating line wraps.

Having defined the colour variables, we can go on to configure the prompt:

PS1="$P_BLUE\u@\h: \w \\$ $P_RESET"

This will produce a blue prompt. Please note that we need to turn off any colours at the end to prevent the commands we type from being blue as well.

The next prompt gives each section of the prompt a different colour:

PS1="$P_GREEN\u$P_RED@$P_YELLOW\h:$P_CYAN\w$P_BLUE\\$ $P_RESET"

Bear in mind that your output might look differently depending on a terminal and its colour settings in eg. ~/.Xdefaults.

Root Prompt

It is useful to give the root user a different prompt (the # character will be red) by adding the following (+ colour definitions) to the root's .bashrc:

PS1="$P_GREEN\u$P_RED@$P_YELLOW\h:$P_CYAN\w$P_RED\\$ $P_RESET"

Do not forget to source root's .bashrc in its .bash_profile to make sure it works for both non-login (su) and login (su -) shells.

Prompt Background Colour

If you'd like to set the prompt's background colour, you can also add the setab capability. Here's an example (without the use of variables):

PS1="\[$(tput setab 4)$(tput setaf 7)\]\u@\h:\w $ \[$(tput sgr0)\]"

Permanently Storing the Prompt

Once you are happy with your bash prompt, you can permanently store it in ~/.bashrc:

export PS1="\u@\h \! \w\$ "

Building Aliases

Aliases are shortcuts or abbreviated commands used in a shell in order to avoid typing long commands. Aliases are usually created to modify existing commands by adding some flags or to join a few commands in order to create new custom commands.

An example of an alias would be:

alias ll='ls -l'

Now typing ll calls the ls command with the -l (or long listing format) flag.

Another example would be creating a shortcut to query installed packages on a Slackware system:

alias qp='ls /var/log/packages | grep'

user@darkstar:~$ qp emacs
emacs-24.2-x86_64-1

The general syntax of an alias is:

alias name='full command'

To create a temporary alias for the current session, just define it directly on a command line. It will not be remembered when you start another session. To store an alias permanently to be accessible by the shell in the future, place it in ~/.bashrc.

If you need to (temporarily) switch off an alias you can use the unalias built-in:

user@darkstar:~$ qp emacs
emacs-24.2-x86_64-1
user@darkstar:~$ unalias qp
user@darkstar:~$ qp
bash: qp: command not found

If you run a (long) command on a regular basis, it might be convenient to create an alias for it.

Have a look at some more examples of aliases below. This may help you create your own aliases.

Please remember that creating aliases that replace system commands may introduce security risks so always consider creating a new command instead.

alias e='exit'
alias ll
alias lla='ls -al | less'
alias mkdir='mkdir -pv'
alias rm='rm -i'
alias 1.='cd .. ; pwd'
alias 2.='cd ../.. ; pwd'
alias 3.='cd ../../.. ; pwd'
alias 4.='cd ../../../.. ; pwd'
alias h='history'
alias eq='alsamixer -D equal'
alias emc='emacs -nw'
alias org='emacs -nw /home/user/data/todo.org'
alias ci3='vim /home/user/.i3/config'
alias psp='ps aux | grep'
alias wic='nmap -sP 192.168.1.0/24'
alias dl='cd /home/user/data/downloads/ ; ls'
alias mftp='lftp sftp://user@ftp.server.com'
alias mylaptop='ssh user@ip_address'
alias myserver='ssh user@ip_address'
alias t='task'
alias r2j='mkdir jpg; ufraw-batch --out-type=jpeg --out-path=./jpg ./*.NEF'

Aliases and Security

Sometimes aliases may pose a security risk in a sense that they can spoof other commands (eg. on compromised systems). Consider the following:

alias ls='some_nasty_command'

To view currently set aliases, just type alias at the command prompt. To clear all the aliases, type:

\unalias -a

Escaping the command with \ prevents any alias expansion in case someone had tried to spoof the unalias command. See the following:

user@darkstar:~$ pwd
/home/user
user@darkstar:~$ alias pwd='echo 666'
user@darkstar:~$ pwd
666
user@darkstar:~$ \pwd
/home/user

Creating functions

~/.bashrc

At the moment our ~/.bashrc looks as follows. At the bottom you'll see some additional settings that have not been discussed. The comments above them should clarify their meaning.

# load the system-wide environment
source /etc/profile
# Add a directory with your scripts to the path.
PATH=$PATH:~/bin
# Configure the CDPATH variable to include a frequently visited directories
CDPATH=$CDPATH:~/data/projects/slackbuilds/
# Set the default editor
export VISUAL=vim
export EDITOR=vim
# Defining foreground variables for the prompt
P_BLACK="\[$(tput setaf 0)\]"
P_RED="\[$(tput setaf 1)\]"
P_GREEN="\[$(tput setaf 2)\]"
P_YELLOW="\[$(tput setaf 3)\]"
P_BLUE="\[$(tput setaf 4)\]"
P_MAGENTA="\[$(tput setaf 5)\]"
P_CYAN="\[$(tput setaf 6)\]"
P_WHITE="\[$(tput setaf 7)\]"
P_RESET="\[$(tput sgr0)\]"
# Setting a fancy prompt for the current user
export PS1="$P_GREEN\u$P_RED@$P_YELLOW\h:$P_CYAN\w$P_BLUE\\$ $P_RESET"
# Setting aliases
alias e='exit'
alias ll='ls -l'
alias lla='ls -al | less'
alias mkdir='mkdir -pv'
alias rm='rm -i'
alias 1.='cd .. ; pwd'
alias 2.='cd ../.. ; pwd'
alias 3.='cd ../../.. ; pwd'
alias 4.='cd ../../../.. ; pwd'
alias h='history'
alias eq='alsamixer -D equal'
alias emc='emacs -nw'
alias org='emacs -nw /home/user/data/todo.org'
alias ci3='vim /home/user/.i3/config'
alias psp='ps aux | grep'
alias wic='nmap -sP 192.168.1.0/24'
alias dl='cd /home/user/data/downloads/ ; ls'
alias mftp='lftp sftp://user@ftp.server.com'
alias mylaptop='ssh user@ip_address'
alias myserver='ssh user@ip_address'
alias t='task'
alias r2j='mkdir jpg; ufraw-batch --out-type=jpeg --out-path=./jpg ./*.NEF'
#######################################################################
#                       Additional settings:                          #
#######################################################################
# Specify an NNTP Server
export NNTPSERVER='aioe.org'
# To take advantage of multicore CPUs you can use the MAKEFLAGS variable.
# For example the equivalent of "make -j2" would be:
# export MAKEFLAGS="-j2"
# Uncomment the above line to use it.

Other configuration files

~/.bash_logout

~/.inputrc

~/.netrc

Wildcards

Shell history

Useful Keybindings

Sources

Originally written by Marcin Herda[2138]

work in progress, author sycamorex

³⁴⁾

When a shell is invoked with the -l or –login flags, it acts as a login shell

CLI Introduction

A command line interface (CLI) is a way of interacting with an operating system or programs using text commands. As opposed to graphical user interfaces (GUI), CLI, due to its nature, is heavily keyboard oriented. Despite a steeper learning curve, this way of interaction has a wide range of benefits and is therefore preferred by many users.

Since most Slackware configuration and administration is performed using the command line interface, it is highly recommended to understand and feel comfortable using them. An additional advantage is that 99% of the commands are universal for most Linux distributions. Things you learn here will most probably be applicable elsewhere.

CLI is Good - Do Not Fear It

The following are some of the advantages to using CLI:

CLI commands are more precise and powerful than GUI interaction.

GUI tools are often just frontends for command line tools. This brings another layer of complexity and is more difficult to troubleshoot.

Most commands are distro agnostic: they work on other Linux systems as well.

CLI commands are building blocks that can be glued together to create complex commands or custom scripts that are tailored to your needs.

CLI commands can be used to automate repetitive tasks

CLI commands do not change often.

Commands make a universal language that is easy to communicate and follow by other internet users.

CLI scripts can include comments that can act as notes and internal documentation explaining the functionality and simplifying future modifications.

CLI based instructions are easier to document for sharing with others as opposed to long how-tos and screenshots necessary for GUI instructions.

CLI commands let you easily access and manage remote systems.

CLI is Powerful - Use it Wisely

Being very powerful and flexible, CLI commands can also be unforgiving and potentially harmful to your system. Please remember about the following:

Do not run commands as root unless it is absolutely necessary

For learning and everyday tasks issue commands as a normal user

Some commands cannot be undone - test your commands and read the associated manuals carefully before you run them on your system

Avoid running commands that you do not understand (especially as root)

CLI Offers You Choice

A program that provides a command line interface is called a shell and is loaded when a user logs in to a system. The default shell in Slackware is called Bash (Bourne-again shell). Although other shells will be briefly discussed in Chapter 3[2139], the CLI manual will focus predominantly on Bash, the most common shell on today's Linux systems. Once you've started the X window system, you can access the shell via virtual terminals which can be opened by pressing Alt+F2 through F6 (the 7th being the current X session).

Terminals

Terminal Emulators

A more convenient and common solution, however, is to access the shell via terminal emulators. Slackware ships with the following terminal emulators:

xterm

Konsole (KDE)

Terminal (Xfce)

rxvt

There are many more terminal emulators available from Slackbuilds.org[2140]. Some popular ones are:

aterm[2141]

eterm[2142]

rxvt-unicode (urxvt)[2143]

sakura[2144]

terminator[2145]

Despite the fact that ultimately they all provide access to the shell, some of them offer unique features that may be appealing to you so it is worth doing some research on them.

Terminal Multiplexers

Another CLI tool that may come in handy, especially if you are working on remote systems, are terminal multiplexers[2146] which make it possible to run multiple terminal sessions within one virtual terminal or terminal emulator window. Two most popular terminal multiplexers are screen (comes with Slackware) and tmux (available from SlackBuilds[2147]).

Chapter Navigation

Next Chapter: First Steps[2148]

Sources

Originally written by Marcin Herda[2149]

Contributions by Matthew Fillpot[2150]

cli, author sycamorex

Command Line Interface (CLI) Manual

Work in Progress

Intended Audience

This guide is intended to help new Linux users understand the power of the shell, and how to use it to enhance their productivity or just have a little more fun with their Linux based installation.

Experienced users can also use this guide to learn new tricks or just serve as a reference for little used functions.

Conventions Used

The following conventions are used to format the contents of this guide.

Content contributors can see the flags in the source of this page.

Emphasis
All emphasized text will be presented in BOLD text.

Footnotes³⁵⁾
Footnotes will be noted ³⁶⁾

Filenames
All filenames including references to filename will be monospaced text.

Application
All application names and references to application manuals will be underlined.

Commands
All commands and optional arguments will be represented in bold + italic text.
When a command contains output, it will be displayed in a code block, user executed command will be displayed with the “$” prompt such as

user@darkstar:~$pwd
/home/user

root executed command will be displayed with a “#” prompt such as

root@darkstar:~#pwd
/home/root

File Contents
All file contents will be displayed in unformatted content boxes like:

This is a file
Yes, it is a file

Code
All scripts and code will be presented in a code box, in which the text will be formatted with color when available such as is displayed below.

echo "This is sample code"

Notes
All notes about use will be presented in note boxes, we will be using note, important and warning boxes as shown below.

This is a Note

This is an important note

This is a warning note

Author Notes
When applying content you can choose to omit formatting characters with two percent symbols to display the text as displayed below.

http:%%//docs.slackware.com

will properly display a web address since the double forward slashes are normally used to make text italic.

Please document the source with internal questions and placeholders to note your intentions, this is accomplished with the start and end flags as shown in

<!-- This is a Note -->

Manual Chapters

Introduction[2151]

First steps[2152] (work in progress: — Andrew Daniel[2153] 2012/09/23 13:39)

Basic commands[2154]

Choosing a text editor[2155]

nano[2156]

emacs[2157]

vim[2158]

Shells[2159] (work in progress: — Marcin Herda[2160] 2012/09/23 15:29)

Configuring your environment

Configuring a shell prompt

Using variables

Building aliases

Relevant dot files

Useful parameters and variables

Wildcards

Shell history

Getting help (man/info pages)

Searching man pages

Help files

Web sources

Locating commands

which

whereis

apropos

Basic directory navigation

Working with directories (relative vs absolute pathnames, brace/tilde expansion,

Working with files (file types, file management, comparing files)directory structure)

Compressing and archiving files

tar

gz

bz2

xz

zip

rar

User/Group permissions

Users and groups

Permissions and ownership

Standard input and output / Redirection

Sorting output and pipes

Job control

Locating content

Finding files

Finding text in files

Text processing tools

Common keybindings

Searching and replacing

Managing filesystems (checking/creating/mounting)

Introduction to CLI filesystem tools

Using mount

How to read and edit fstab

Monitoring available resources (disk space/ memory / processes)

Monitor filesystem disk space usage with df

Monitor files / directories size with du

Monitor processes and system information with top / htop

Monitor available memory with free.

Getting information / troubleshooting network

Using ifconfig

Using iwconfig

Using netstat

Automating and scheduling tasks

Introduction to cron daemons

Schedule a job for later withat

Writing and executing shell scripts

Shell script arguments

Tests and Conditional Statements

Flow control (eg. running a command on a number of files)

Running scripts on boot and shutdown

System Maintenance and troubleshooting

Gathering system information to get help

Development tools

Introduction to CLI development tools

Using gcc

Common tasks

downloading files

downloading torrents

sending and receiving emails

listening to music

tagging your music

Getting things done

reading news

Talking on irc channels

burning a cd

CLI glossary

Sources

work in progress, author mfillpot, author sycamorex, author b1ueb1aze

³⁵⁾

this is a footnote

³⁶⁾

like this

Work in Progress

Please, feel free to edit/add to this article, or contact me if you need to discuss something about it.

First steps

Now that you have been introduced to the CLI, let’s get started. The first thing you need to do is either open up a terminal emulator, or start your system in runlevel 3. Once you are in a terminal, the next section lists some basic commands that you will frequently be using:

I. Basic commands

TAB: This is the TAB key on your keyboard, pressing this will auto-complete commands, and file or directory paths. This is a great time saver.

pwd: This command prints the current working directory which assists the user to know which directory they are working in.

ls: This command lists all the files and directories in a folder.

cd: This command changes the directory.

su: This command switches the user of the currently running virtual console. Running this without giving any other option switches you to the root user.

rm: This removes files or folders

Use the rm command with extreme caution and never run this as root unless you are absolutely sure you need to, and know what will be deleted

man: This command opens up the manual for a program, for example running “man cd” will give you the manual for the cd command. A HOWTO is here How to search and read Manpages efficiently[2161]

Now that you know what the commands are, I recommend reading the manual for each of them by using the correct command above. Once you have completed that, you can move onto text editors.

II. Choosing a text editor

In this section we will talk about the different text editors, so let's get started.

The following text editor applications are included with the “Full Installation” of Slackware.

App Name | Description | Difficulty
ed | Advanced
elvis
sed | Advanced
jed
joe
jove
nano | A simple CLI text editor with no mode and easy to locate on-screen commands | Simple
vim | Advanced
emacs | Advanced
kate | Simple
gvim | Advanced

In general the editors in Linux/Unix can be divided into three categories: vi derivatives, emacs derivatives and those which are similar to the typical Windows editors. Ed and sed are ancestors of vi; vim/gvim and elvis are its successors (please note that in Slackware vi is actually a symlink to elvis.) Jed, joe and jove are emacs derivatives whereas nano and kate have their roots in the Windows-world. Both Emacs and vi (and their clones) are worth the effort of learning because it helps you to get your work done. Note that sed (the stream editor) works in a completely different way.

a. Nano

Nano is a very easy to use CLI text editor, that I recommend for beginners. To start Nano, you simply type in the command nano. Once nano is up, you can just begin typing into the document. To save your work, you simply press Ctrl+X on the keyboard, give the file a name, and press enter. While nano is open, you will notice along the bottom of your screen several letters preceded by ^. These are the different keyboard shortcuts within Nano. ^ represents the Ctrl key, while the letter represents the corresponding key on your keyboard. One more thing to cover is how to open up an existing file in Nano, to do this you run Nano as shown below.

nano /path/to/text/file

Doing this opens the text file you entered the path to in Nano.

b. Emacs

Emacs is a highly customisable text editor. Thanks to a wide range of extensions, it offers other functionalities, such as IDE, a project planner, news and mail reader, file manager with an ftp client built in. This section, however, will guide you through a basic usage of Emacs.

Emacs Initialisation

Emacs can be started from a menu of your desktop environment[2162] or window manager[2163]. If you want to run without the X Server, you need to start it with the -nw flag:

user@darkstar:~$ emacs -nw

or to create a new file:

user@darkstar:~$ emacs -nw my_new_file

As Emacs relies heavily on keyboard shortcuts, it is essential to cover them first to get you started.

Emacs Keybindings

In the Emacs world, a widely used convention is to refer to Ctrl and Alt as C and M respectively. Consequently, the C-h combination denotes clicking Ctrl+H simultaneously, whereas M-x means pressing the Alt+X keys at the same time. You will also encounter more complex keybindings, such as C-x s which means pressing Ctrl+X and then s. Similarly, C-x C-c refers to pressing Ctrl+X and then Ctrl+C. Other commonly used keys are S ( = Shift ) and Esc. Here's a list of most basic keybindings in Emacs:

Keys | Description
C-h | Access help
C-h t | Start Emacs tutorial
C-h r | Read Emacs manual
C-x C-f | Create a new file
C-x C-s | Save
C-x C-w | Save as
C-x u | Undo
M-w | Copy
C-y | Paste
C-x C-c | Exit Emacs

The above information should get you started with Emacs. For more advanced usage, please visit this link[2164].

c. Vim

Vim and the other vi-clones are very different from other types of editors. vi has two modes, insert-mode and command-mode.
This means, the editor distinguishes between inserting text and moving and making changes.
One needs only the alphanumeric keys to work with vi. Therefore vi and it's clones are primarily useful for people who can touchtype.

When you start vi you're in command-mode, with i you switch to insert-mode. From insert-mode you get with ESC back to command-mode. Leave vi with :q in command-mode.

Vim comes with a very useful tutorial which I strongly recommend for newbies. Open a terminal and simply type

vimtutor

Useful external links

After you've made the first steps you may want to use the vi cheat-sheet[2165]

A nice interactive vim tutorial[2166]

More information is in the wikibook[2167]

this page[2168] will give you an even deeper insight.

Here's a very helpful text about efficient text editing[2169]

The help system

Vim has it's own very large help-system. When you're using Vim and need help, you can (in command-mode) type

:help

If you need help regarding special subject (here as an example macros), simply type

:help macro

For an overview of the Vim-help type

:help help

and if you're totally confused the command

:help!

will surely help you.

The dokuwiki Plugin

If you use Vim when writing pages for this dokuwiki, you can find a helpful plugin[2170] which you'll only have to copy into the /usr/share/vim/vim73/syntax/ directory.

You can load this plugin when editing a dokuwiki file with the command:

set ft=dokuwiki

If you need syntax highlighting for the <key> plugin of dokuwiki (which is not by default supported by the dokuwiki plugin), you can insert the lines:

syn region dokuwikiKeyboard start="<key>" end="</key>"
hi link dokuwikiKeyboard Comment

to the plugin.

Chapter Navigation

Previous Chapter: Introduction[2171]

Next Chapter: Shells[2172]

Sources

Originally written by Andrew Daniel[2173]

Contributions by Markus Hutmacher[2174] and Marcin Herda[2175]

work in progress, author b1ueb1aze

Install Slackware on a VPS based on Proxmox VE or SolusVM

I've been faced with the challenge to install Slackware as a VPS at a hosting provider that had Proxmox VE[2176] as virtualization platform.

Proxmox VE is a complete open source virtualization management solution for servers. It is based on KVM virtualization[2177] and container-based virtualization and manages virtual machines, storage, virtualized networks, and HA Clustering. Further information is contained in the Proxmox Wiki[2178].

Recently I've had to migrate to a SolusVM[2179] based infrastructure, using KVM virtualization. This does not apply to Xen virtualization by SolusVM which officially supports Slackware. Assuming your is configured with virtio type disk, all the instructions below apply the same.

SolusVM is a commercial virtualization infrastructure able to provide KVM virtualization, OpenVZ containers and Xen. Further information is contained in the SolusVM Documentation[2180].

Prerequisites

This guide is valid for Slackware-14.1 only. Slackware-14.2 already has the virtio support in the default kernel that is deployed at installation. (verified at least with >4.4.190 kernel build)

If you build your own kernel make sure to include virtio* drivers built-in, not modules.

You must ask your hosting provider to add the Slackware install DVD ISO image to the virtual CD/DVD device of the virtual machine.

Also, you must have a local machine (either physical or virtual by other means) with a running copy of the same Slackware version that you will be installing on the Proxmox VE.

Preparing a custom initrd

On your own running Slackware installation (I've done this using Slackware64-14.1) you must prepare an initrd for your virtual server.
Make sure you have the proper kernel version, if your installation was updated you may need to temporarily downgrade the kernel to match the version in the installation disk.
Alternately, you may through in a quick installation in VMware Player, build your initrd there, then deploy it to a FTP server.

It is very simple, with mkinitrd tool.

# mkinitrd -m virtio_pci:virtio_mmio:virtio_balloon:virtio_blk -k 3.10.17 -f ext4 -r /dev/vda1

This creates an initial ramdisk (initrd.gz) with the virtio* modules, for booting a root partition /dev/vda1 formatted using etx4 filesystem.
Adjust according to your needs and use the same partition name and fs when you install your VM.

The resulting ramdisk will be here: /boot/initrd.gz Upload this file to a FTP or HTTP server so that it may be downloadable using wget. That server's IP address must be accessible to the hosted VM.
It must be a direct download link, so don't use a filesharing system like Rapidshare, etc.
Remember, the Slackware installation disk has a minimum set of utilities.
Also note that you may not have the resolver library working, so I recommend using plain FTP server and call it by IP instead of hostname.

Installation

Booting from the ISO image presents no problems.

After booting, as usual, start by partitioning the (virtual) disk. You will discover that instead of the usual sda or hda, you are presented with devices such as:

/dev/vda

Not to worry, it's the same as /dev/sda, but it is the source of several issues that need to be solved later.

Partition your disk, run setup and perform the installation.

Configuration

Upon configuring lilo, choose Advanced.
Simple lilo autoconfiguration defaults to /dev/sda and won't generate the proper lilo.conf.
Using *Advanced* you will manually tell lilo to install itself on dev/vda.
Configure the rest of the parameters as needed.

Installing lilo will fail due to unrecognized block device 0xfc00. Accept the error and proceed with the rest of the configuration process.

DO NOT REBOOT after the configuration process ends.

Exit the setup program and configure your networking.

# ip a add IP_ADDRESS/NETMASK dev eth0
# ip link set eth0 up
# ip ro add default via GATEWAY dev eth0

Go to the /boot directory of the installation and download the initrd.gz file

# cd /mnt/boot
# wget URL_TO_YOUR_SERVER/initrd.gz

Go to the /etc directory of your installation and edit lilo.conf

# cd /mnt/etc
# vi lilo.conf

Right under boot= add the following (without the comments):

disk=/dev/vda              # your disk device
bios=0x80                  # first disk according to BIOS
max-partitions=15          # as usual for SCSI disks, this refers to no. of disks
# on a controller, see man lilo.conf

Scroll down to where the bootable partition is configured and add below root = :

initrd = /boot/initrd.gz

Save and run lilo:

lilo -C lilo.conf

You will get some warnings, but it will work.

Now you can reboot your system.

Important: you must rebuild the initrd.gz file every time you upgrade or change the kernel.

Sources

Originally written by Andrei B.

howtos, virtualization, kvm, proxmox, solus, solusvm

How to configure fstab and lilo.conf with persistent naming

Have you ever had your /dev/sda and /dev/sdb drives switch order? Has plugging in a USB device before booting your computer caused a kernel panic? Do you frequently unplug or plug in new devices into your computer, thus changing the order of the device names? If you said yes to any of those, you might be a good candidate to use persistent naming within your bootloader and fstab.

What is persistent naming?

Persistent naming allows you to reference your drive by something that doesn't change. There are several different methods available for persistent naming and we'll be covering the following: ID, Label, and UUID, as well as the GPT-based PartLabel and PartUUID. The most frequently used are labels and UUIDs, mainly because they have been around for a long time. GPT partition tables introduced an updated version of labels and UUIDs called partlabel and partuuid that are directly stored in the partition table. However, starting with the 3.8 kernel, PartUUID has been expanded to generate shorter unique identifiers (UID) for MBR partitions as well, essentially allowing MBR drives to use PARTUUID.

Now, let's go more in depth on the various methods:

ID

/dev/disk/by-id/ is a dynamically generated folder under the /dev/ filesystem. This will change depending on the devices that are plugged into the computer. The IDs are generally comprised of the harddrive's model number, serial number, and specific partitions. ls -la /dev/disk/by-id/ will show all the IDs and the device it points to under the /dev/ filesystem (e.g. /dev/sda, /dev/sdc3, etc).

slackware@darkstar:~$ ls -la /dev/disk/by-*
/dev/disk/by-id:
total 0
drwxr-xr-x 2 root root 680 Jul 31 13:17 ./
drwxr-xr-x 8 root root 160 Jul 31 13:17 ../
lrwxrwxrwx 1 root root 9 Jul 31 17:18 ata-Crucial_CT480M500SSD1_13440956798B -> ../../sda
lrwxrwxrwx 1 root root 10 Jul 31 17:18 ata-Crucial_CT480M500SSD1_13440956798B-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 31 17:18 ata-Crucial_CT480M500SSD1_13440956798B-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 31 17:18 ata-Crucial_CT480M500SSD1_13440956798B-part3 -> ../../sda3
lrwxrwxrwx 1 root root 9 Jul 31 17:18 ata-WDC_WD1001FALS-00J7B1_WD-WMATV1953756 -> ../../sdb
lrwxrwxrwx 1 root root 10 Jul 31 17:18 ata-WDC_WD1001FALS-00J7B1_WD-WMATV1953756-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 9 Jul 31 17:18 ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1021582 -> ../../sdc
lrwxrwxrwx 1 root root 10 Jul 31 17:18 ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1021582-part1 -> ../../sdc1

So, if you want to always reference the Crucial drive (just the drive, not any partitions within it it), you can use the filename /dev/disk/by-id/ata-Crucial_CT480M500SSD1_13440956798B. (You will see an example of this in the lilo.conf section below.) This will always point to that drive, regardless of whether it is /dev/sda or /dev/sdq. To reference a specific partition, just match the current device name (/dev/sdb1) with its associated ID, /dev/disk/by-id/ata-WDC_WD40EZRX-00SPEB0_WD-WCC4E1050616-part1.

Label

Labels are an optional, user configured name for the drive. Most filesystems support this, but they aren't always created automatically. All labels can be found under /dev/disk/by-label/ and can be easily viewed using ls -la /dev/disk/by-label/.

/dev/disk/by-label:
total 0
drwxr-xr-x 2 root root 80 Jul 31 13:17 ./
drwxr-xr-x 8 root root 160 Jul 31 13:17 ../
lrwxrwxrwx 1 root root 10 Jul 31 17:18 Backup -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jul 31 17:18 Data -> ../../sdb1

Labels can be quite advantageous over IDs due to their ability to be extremely short and memorable. However, if you're not careful or move disks between systems, you can easily run into issues with duplicate names causing conflicts. Both lilo and fstab support using LABEL=“Backup” to reference the drive directly rather than needing to use /dev/disk/by-label/Backup, making this a much simpler option to reference drives.

If you want to add a label to your partition, the ArchWiki[2181] page has instructions for most filesystems.

UUID

UUIDs[2182] (Universally Unique IDentifiers) are a unique identifier generated for a partition. All Linux filesystems will generate UUIDs when they're formatted. FAT and NTFS filesystems do not support UUIDs, however, a short UID is used in place of a regular UUID. All UUIDs can be found under /dev/disk/by-uuid/ and can be viewed using ls -la /dev/disk/by-uuid/

/dev/disk/by-uuid:
total 0
drwxr-xr-x 2 root root 200 Jul 31 13:17 ./
drwxr-xr-x 8 root root 160 Jul 31 13:17 ../
lrwxrwxrwx 1 root root 10 Jul 31 17:18 226f1db3-2f14-4862-9998-8be1e8f7cdc9 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jul 31 17:18 23bce2c2-996d-449e-89cc-0e5029cc6d8d -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 31 17:18 bc4538e5-9387-4e5c-877b-d15744acb6ce -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 31 17:18 cd554cf8-c346-4bd5-ba6a-84ac99af571f -> ../../sdc1
lrwxrwxrwx 1 root root 10 Jul 31 17:18 2ef6e776-c2eb-4e56-bc7e-dfe083559d8f -> ../../sdb1
lrwxrwxrwx 1 root root 10 Jul 31 17:18 126AC3506AC32EF3 -> ../../sdq1                      #Example NTFS UID -- not really in my system

UUIDs can also be referenced by using just UUID=226f1db3-2f14-4862-9998-8be1e8f7cdc9 in your /etc/lilo.conf and /etc/fstab files.

GPT (PartLabel and PartUUID)

The MBR[2183] (Master Boot Record) has been the primary partition table for harddrives for the past few decades (it was introduced in 1983). However, it is unable to be used on disks larger than 2TBs. That is where GPT[2184] (GUID Partition Table) comes in. This was developed as part of the UEFI[2185] spec but can be used without using UEFI.

In addition to the limitations of the MBR, there are also limitations of using UUIDs and Labels, mainly being that if you use those in your bootloader, you are required to use an initrd[2186]. While it is recommended by Pat to use an initrd, many users prefer using a kernel that doesn't require one (either using the huge kernel or building a custom kernel with the required hardware support compiled in). The GPT spec added PartLabel and PARTUUID as a way to save that information directly to the partition table (the “part” stands for partition). While both PartLabel and PartUUID are included in the GPT spec, the kernel only supports booting PARTUUIDs, so you can't use PartLabel in your bootloaders. If you want to use PartUUID, you don't need any initrd to be able to read this data, which makes it much easier to use on systems that aren't already using an initrd. Initially, since PARTUUID was introduced as part of the GPT spec, MBR-based devices could not be referenced using PARTUUID; however, basic support for PartUUID on MBR partitions was added starting with the 3.8 Linux kernel, so now any drive can be referenced by its “PARTUUID”.

PartLabel

This is almost identical to the regular Label option. It is located under /dev/disk/by-partlabel/ and can be viewed with ls -la /dev/disk/by-partlabel. PARTLABEL can only be used in the fstab. Due to lack of support in the kernel, you will need to use one of the other persistent naming conventions in your lilo.conf

/dev/disk/by-partlabel:
total 0
drwxr-xr-x 2 root root 60 Jul 31 17:18 ./
drwxr-xr-x 8 root root 160 Jul 31 13:17 ../
lrwxrwxrwx 1 root root 10 Jul 31 17:18 Linux\\x20filesystem -> ../../sdc1

Also, this will only show official PARTLABELs. It will not show any labels from disks using MBR. If you need to view those, you can use blkid.

slackware@darkstar:~$ su -
Password:
root@darkstar:~# blkid
/dev/sdc1: LABEL="Backup" UUID="cd554cf8-c346-4bd5-ba6a-84ac99af571f" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="62c372af-e868-4571-8ab4-db612c0fb38f"
/dev/sdb1: LABEL="Data" UUID="2ef6e776-c2eb-4e56-bc7e-dfe083559d8f" TYPE="ext4" PARTUUID="71b70c68-01"
/dev/sda1: UUID="bc4538e5-9387-4e5c-877b-d15744acb6ce" TYPE="swap" PARTUUID="6f47c81b-01"
/dev/sda2: UUID="23bce2c2-996d-449e-89cc-0e5029cc6d8d" TYPE="ext4" PARTUUID="6f47c81b-02"
/dev/sda3: UUID="226f1db3-2f14-4862-9998-8be1e8f7cdc9" TYPE="ext4" PARTUUID="6f47c81b-03"

As you can see in the case of /dev/sdc1, you can have a different LABEL and PARTLABEL. That is because these are stored independently of one another. LABEL is a filesystem trait, whereas PARTLABEL is a partition trait. Also note, based on how I created my filesystem, it has a generic “Linux filesystem” PARTLABEL, so if I were to create a new filesystem on a new drive without changing anything, I would have two drives with the same PARTLABEL. This is not an issue unless you try to reference the disk as a PARTLABEL.

If you want to add or change your PARTLABEL, you can do so using gdisk or cgdisk.

PartUUID

This is similar to PartLabel in that it is almost identical to it's not-“Part” counterpart (regular UUID). This UUID is generated automatically whenever you create/resize/move a partition. This will be a different UUID than the one provided by the filesystem. All PartUUIDs can be found under /dev/disk/by-partuuid/ and can be viewed using ls -la /dev/disk/by-partuuid/.

/dev/disk/by-partuuid:
total 0
drwxr-xr-x 2 root root 120 Jul 31 13:17 ./
drwxr-xr-x 8 root root 160 Jul 31 13:17 ../
lrwxrwxrwx 1 root root 10 Jul 31 17:18 468a6e66-39e3-4072-8997-0550dd12ad8e -> ../../sdb1

As you can see, this is just like PartLabel in that it only shows official PartUUIDs on GPT disks. If you need to view the system generated PartUUID for MBR partitions, you need to use blkid.

slackware@darkstar:~$ su -
Password:
root@darkstar:~# blkid
/dev/sdc1: LABEL="Backup" UUID="cd554cf8-c346-4bd5-ba6a-84ac99af571f" TYPE="ext4" PARTLABEL="Linux filesystem" PARTUUID="62c372af-e868-4571-8ab4-db612c0fb38f"
/dev/sdb1: LABEL="Data" UUID="2ef6e776-c2eb-4e56-bc7e-dfe083559d8f" TYPE="ext4" PARTUUID="71b70c68-01"
/dev/sda1: UUID="bc4538e5-9387-4e5c-877b-d15744acb6ce" TYPE="swap" PARTUUID="6f47c81b-01"
/dev/sda2: UUID="23bce2c2-996d-449e-89cc-0e5029cc6d8d" TYPE="ext4" PARTUUID="6f47c81b-02"
/dev/sda3: UUID="226f1db3-2f14-4862-9998-8be1e8f7cdc9" TYPE="ext4" PARTUUID="6f47c81b-03"

For non-GPT filesystems, the PARTUUID is generated from the Disk Identifier, followed by the partition number. You can view your Disk Identifier using fdisk.

root@darkstar:~# fdisk -l /dev/sda | grep identifier
Disk identifier: 0x6f47c81b

Due to the newness of GPT support, lilo does not have direct support of calling it, rather you need to use an addappend option (see the lilo.conf section below for further information). For PartUUIDs on MBR disks, the only time they'll change is if additional partitions are created. Keep that in mind if you're using them in your fstab and/or lilo.conf.

fstab

Your /etc/fstab is the easiest file to change. You simply replace any entries that pointed to your device names with TYPE=value (TYPE can be LABEL, UUID, PARTLABEL, PARTUUID). The original device names are listed as comments for your reference, they don't need to be in the final file. (Personally, since I like it to look nice and neat, I will make everything spaced out evenly.)

slackware@darkstar:~$ cat /etc/fstab
# /dev/sda1
UUID=bc4538e5-9387-4e5c-877b-d15744acb6ce      swap            swap    defaults,discard                     0 0
# /dev/sda2
UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d      /               ext4    defaults,noatime,discard             0 1
# /dev/sda3
PARTUUID="6f47c81b-03"                         /home           ext4    defaults,noatime,discard             0 2
# /dev/sdb1
LABEL=Data                                     /share/Data     ext4    defaults                             0 2
# /dev/sdc1
PARTLABEL="Linux filesystem"                   /share/Backup   ext4    defaults                             0 2
#/dev/cdrom                                    /mnt/cdrom      auto    noauto,owner,ro,comment=x-gvfs-show  0 0
devpts                                         /dev/pts        devpts  gid=5,mode=620                       0 0
proc                                           /proc           proc    defaults                             0 0
tmpfs                                          /dev/shm        tmpfs   defaults                             0 0

lilo.conf

Your /etc/lilo.conf takes a bit more finesse to change. Not everything is properly supported like the fstab options, so we need to throw in a few workarounds, depending on what you want to use.

To start out, we need to set up the top of your /etc/lilo.conf. This mainly includes the boot entry. This is what lilo uses to determine where to write the bootloader code into the partition table. This is only referenced when you run lilo to install the bootloader, so it won't be as affected as other drives if they're moved. However, if you've already taken the time to get this far, you might as well ensure you don't run into any issues by referencing your drive using persistent naming.

To do this, we would need to replace /dev/sda (or whatever your default boot drive is) with a reference that doesn't change. Since we need to reference the drive itself, and not any specific partitions, we need to use the ID method. Once you find the disk ID for your main drive, replace your boot with the full path to the ID. (NOTE: the original /dev/sda is commented out and only there for reference, you don't need to keep it.)

#boot = /dev/sda
boot = /dev/disk/by-id/ata-Crucial_CT480M500SSD1_13440956798B

Once you have the boot portion set up, you can then move onto the root partitions for your OSes.

LABEL and UUID

To use Labels and UUIDs, you need to use an initrd[2187]. It won't work without it. Since PARTLABEL in your lilo.conf isn't supported, if you want to use a label there, you will have to use this method. When building your initrd, you need to make sure you pass the -r option to specify your root partition, and set it to either your label or UUID. You can use the /usr/share/mkinitrd/mkinitrd_command_generator.sh script, although, if you're building it for a kernel version that you're not currently running (but have installed), make sure you pass the kernel version you intend to use to the script using the -k option. It will then spit out a mkinitrd command you can use, which you would just need to adjust the -r option.

root@darkstar:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 4.4.14
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 4.4.14 -f ext4 -r /dev/sda2 -m jbd2:mbcache:ext4 -u -o /boot/initrd.gz
root@darkstar:~# blkid
/dev/sda2: UUID="25a4dafe-bbf2-413f-a60c-8c38efc0a122" TYPE="ext4" PARTUUID="1ae0ebfe-02"
/dev/sda1: UUID="d21b5f69-6d0c-48fb-b67c-912ebb0fd18e" TYPE="swap" PARTUUID="1ae0ebfe-01"
root@darkstar:~# mkinitrd -c -k 4.4.14 -f ext4 -r "UUID=25a4dafe-bbf2-413f-a60c-8c38efc0a122" -m jbd2:mbcache:ext4 -u -o /boot/initrd-4.4.14.gz
OK: /lib/modules/4.4.14/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.4.14/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.4.14/kernel/fs/jbd2/jbd2.ko added.
OK: /lib/modules/4.4.14/kernel/fs/mbcache.ko added.
OK: /lib/modules/4.4.14/kernel/fs/ext4/ext4.ko added.
35942 blocks
/boot/initrd-4.4.14.gz created.
Be sure to run lilo again if you use it.
root@darkstar:~#

As you'll notice, the command provided by mkinitrd uses /dev/sda2 as the root drive, so we need to change that to match the UUID of the drive before running the mkinitrd command. By default, it will output the /boot/initrd.gz file, but I prefer to call mine based on the kernel version (which is helpful to ensure you don't overwrite a known-good initrd). When including the root partition in your initrd, it can be removed from lilo, since it won't use it (however, I've left it in but commented it out for visual reference).

Once you generate an initrd, you need to reference it in your stanza. I don't have any labels set for my primary drive, so I added an example that is commented out. You can use one or the other. As before, I commented out the original device, but it doesn't have to remain in the conf file.

Instead of changing your original stanza, it might be beneficial to keep it there in case you accidentally screw something up and your system doesn't boot, then you can just select your original config and go and fix things and try it again. Once you have verified your system boots properly with your new stanza, if desired, you can remove the old one.

image = /boot/vmlinuz-generic-3.10.17
initrd = /boot/initrd-3.10.17.gz
#root = /dev/sda2
#root = "UUID=23bce2c2-996d-449e-89cc-0e5029cc6d8d"
#root = "LABEL=Mylabelhere"
label = Slack-generic
read-only
image = /boot/vmlinuz
root = /dev/sda2
label = Slack-default
read-only

PARTUUID

Now, as mentioned above, PARTUUID does not require an initrd (although, it works fine if you do use one). However, lilo is old enough that it doesn't have proper support for it, so there is a workaround to get it working. Instead of referencing root like we did above, we need to replace the root option within an “addappend”. This will add anything extra to the initial append line at the top of lilo.conf. Keep in mind your spaces, as it will be placed directly afterwards, so it might be wise to include an extra space at the beginning of the line to ensure it doesn't accidentally combine words (which would likely cause a kernel panic and prevent you from booting). For me, since my root partition is on a drive with an MBR, I'll have the shortened PARTUUID instead of the regular 32 character length of a proper PARTUUID.

image = /boot/vmlinuz-generic
addappend = " root=PARTUUID=6f47c81b-02"
label = Slack-partuuid
read-only
image = /boot/vmlinuz-generic
initrd = /boot/initrd-4.4.14.gz
root = "UUID=25a4dafe-bbf2-413f-a60c-8c38efc0a122"
label = Slack-UUID
read-only
image = /boot/vmlinuz-huge
root = /dev/sda2
label = Slack-default
read-only

As noted above, PARTLABEL is not supported with lilo.

Finishing Up

Once you have your /etc/lilo.conf file updated, we should test it to make sure there aren't any glaring errors. Lilo has the ability to test a config using the -t option.

root@darkstar:~# lilo -t
Warning: LBA32 addressing assumed
Added Slack-partuuid  +  *
Added Slack-UUID  +
Added Slack-default  +
The boot sector and the map file have *NOT* been altered.
One warning was issued.

The LBA32 warning is normal with Slackware's lilo.conf and can be ignored (however, you can get rid of it by added LBA32 in the Global section of your lilo.conf). The main thing we're looking for is that all of our stanzas were added and no errors were issued. If that worked, then we can run lilo by itself to finish the process.

root@darkstar:~# lilo
Warning: LBA32 addressing assumed
Added Slack-partuuid  +  *
Added Slack-UUID  +
Added Slack-default  +
One warning was issued.

If you got this far, go ahead and reboot. Your system should now no longer rely on device names that can easily change.

Final thing to remember, is your device names can change at any time. As should always be the case, whether or not you're using persistent names, before you do anything that may wipe a drive (e.g. dd, fdisk, etc), ensure you are using the correct drive name. You don't want to assume your thumbdrive is /dev/sdc (because that's what it's always been) before using dd to write that shiny new Slackware64-current iso on there. If your device names have changed, you could be writing that iso to your root partition and take out your whole OS. Use the tools provided above (the various folders under /dev/disk/, blkid, and/or dmesg) to verify what device name you want to use before running the command.

Sources

Originally written by Jeremy Hansen aka bassmadrigal[2188]

howtos, author bassmadrigal

Chroot From Installation Media

Slackware is full of tools that can help when the system becomes unstable and cannot boot. One example is upgrading the kernel image and forgetting to run lilo afterwards.

In order to gain access to your system without booting directly to it, it is possible to use an installation media such as Slackware CD1 or the DVD. Once the installation media loads and starts, you can change the media's root directory into a mounted hard-disk partition and use it as the root directory, thus running commands directly from it and affecting it.

Volume Preparation

The examples here are very basic and expect that the entire system is located in a single partition. If you have a different partition table, please make sure that you mount all the needed partitions with care.

In the simplest of examples, a single hard disk was partitioned locally, normally and it is not encrypted in any way. In this case, all you need to do is to make sure what is the partition's 'name' is and continue to the mounting section.

If this is not the case, and you are using LVM/EVMS or an encrypted volume you will need to prepare the volumes before you can mount and chroot into them:

To unlock your LUKS partition, you will need to 'open' it and give it a name with this command (sdxn as example):

cryptsetup luksOpen /dev/sdxn crypted (any name will do)

At this point you will be prompted to insert the pass-phrase to unlock the volume. This partition will be mapped to '/dev/mapper/crypted'.

For LVM volumes you need to make sure that the system can recognize and activate the volume. This is done by running the commands:

vgscan --mknodes : searches for logical volumes, this might take a while

vgchange -ay : activates the found volumes

If more than one group was found, you can select which one to activate with vgchange -ay groupName

Volume Mounting

After the preparation stage we can continue to mount the volume(s). You can use /mnt as it is only needed if you are planning to run the setup program.

After we make sure which partitions are needed, we need to mount them:

mount /dev/<location> /mnt

Here are 3 common examples.

1. The first is just a simple installation with everything installed under / mounted under /dev/sda1. No LVM or additional drives.

mount /dev/sda1 /mnt

2. In the next example we have two drives. The user has set up his or her Slackware system to use /dev/sdb1 for /home and /dev/sda1 for everything else.

mkdir /mnt/home # We need a directory to mount which needs to be under the directory we intend to chroot into.
mount /dev/sda1 /mnt
mount /dev/sdb1 /mnt/home

3. For the third example the user has used LVM and has already made their volume group known to the kernel. The user is using the logical volumes “root, usr, home, opt, var, srv” all under one volume group labeled “myvg”. In addition, this user has used LUKS encryption and therefore has placed a small /boot under /dev/sda1.

mkdir /mnt/{boot,usr,home,opt,var,srv} # Create the necessary directories.
mount /dev/myvg/root /mnt
mount /dev/myvg/usr  /mnt/usr
mount /dev/myvg/home /mnt/home
mount /dev/myvg/opt  /mnt/opt
mount /dev/myvg/var  /mnt/var
mount /dev/myvg/srv  /mnt/srv
mount /dev/sda1      /mnt/boot

We could have also used a for loop for everything except /boot (/dev/sda1) and / (/dev/myvg/root) in this example:

for dir in usr home opt var srv
do
mount /dev/myvg/$dir /mnt/$dir
done

Next, we need to prepare three virtual directories to be used by the environment. Those are /dev, a directory with virtual files that represent hardware devices, /proc, a directory with virtual files that represent processes and /sys which contains the kernel and other system files:

mount -o bind  /dev /mnt/dev
mount -o bind /proc /mnt/proc
mount -o bind /sys  /mnt/sys

Chrooting

Once the partition is mounted, we can chroot to it:

chroot /mnt /bin/bash

If LVM preparation was involved it might be necessary to re-run vgscan --mknodes and vgchange -ay as they were created inside the installation media's ramdisk and not in the mounted partition.

The bash prompt that you see here is a bash prompt started on your system. You can now work on this environment naturally. For example editing /etc/lilo.conf and executing /sbin/lilo will happen on your system, not from the installation media.

Sources

* Originally written by cmyster[2189].
* LVM and LUKS information comes primarily from Eric[2190]'s READMEs on your installation disc.

howtos, slackware administration, chroot, recovery, author cmyster

Building the Linux kernel using git

Author's note: I am writing this in as impartial a way as I can, because I think the user should decide what is best for them.

Where to build

There are two common places to build the kernel. It is important that wherever you build the kernel, it must be a location that does not change nor risk deletion or corruption. For example do NOT build it in /tmp.

1. You can build the kernel in /usr/src and then you will have to be root in order to build the kernel. This has the advantage that it works well for multi-user systems.

mkdir -p /usr/src
cd /usr/src
su

2. You can build the kernel in your home directory to a directory that you should not delete. For example you can use ~/.local/src or something similar. You can build the kernel as a regular user. The disadvantage is that other users on a multi-user system will not have access to the source.

mkdir -p ~/.local/src
cd ~/.local/src

Where to get the kernel source

There are two ways to get the kernel source. We will assume the version is as follows.

version=3.10.24
base=3.10

1. You can use git to get the kernel source. This has the advantage that it will avoid issues if linux.org is cracked[2191]. A disadvantage is that the source directory may get large as new releases are pulled.

git clone --depth 1 git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git # this only needs to be run once at the very beginning
cd linux-stable
git pull # run this every time to update the source
git checkout v$version # you MUST checkout a kernel version or you will get the base version, i.e. 3.10
git log # just check to make sure the top of the log says the version you want
git tag -v v$version # this is not necessary, but it validates the source using gpg public key, which you need to import

To easily import a gpg key, you need the RSA key ID 0000000E. Run

gpg --search 0000000E

and choose the key you want to import, or if that doesn't work then run

gpg --keyserver wwwkeys.pgp.net --recv-keys 0000000E

The key here is just an example.

2. You can download the source tarball from http://kernel.org/[2192]. The best way to stay up-to-date is to download the base version tarball and then download the individual version patch that you want, and apply it before compiling.

kernelsite="ftp://www.kernel.org/pub/linux/kernel/v3.x"
lftp -c "open $kernelsite; get linux-$base.tar.xz linux-$base.tar.sign"
unxz -k "linux-$base.tar.xz"
gpg --verify "linux-$base.tar.sign"
# the following is done with every new kernel update
tar -xf "linux-$base.tar.xz"
mv "linux-$base" "linux-$version"
cd "linux-$version"
lftp -c "open $kernelsite; get patch-$version.xz patch-$version.sign"
unxz "patch-$version.xz"
gpg --verify "patch-$version.sign"
patch -p1 < "patch-$version"

Patching a kernel can be confusing, because patches are relative to the base kernel version. Lets say you currently have the kernel source for 3.10.24, and you want to upgrade to 3.10.25. You can either revert the 3.10.24 patch (getting you back to 3.10), or you can download kernel version 3.10 and apply the 3.10.25 patch. If you try to apply the 3.10.25 patch over 3.10.24, it will fail. Thus, it is recommended to keep the source tarball for the base version in the kernel build directory, especially if you plan on regularly upgrading your kernel for security fixes.

Here is a script that downloads the latest patch for the current running kernel. It assumes you already have an xz compressed tarball in the kernel build directory.

kernupd

#!/bin/sh

error () # error
{
echo "$1"
exit 1
}

kerneldir="$HOME/.local/src"
kernelsite="ftp://www.kernel.org/pub/linux/kernel/v3.x"
currentver="$(uname -r)"
basever="$(uname -r | rev | cut -d. -f1 --complement | rev)"
newver="$(lftp -c "open $kernelsite; ls" | awk '{ print $9 }' | grep "patch-$basever.*\.xz" | sort -V | tail -n1 | sed 's/patch-//' | sed 's/\.xz//')"

if test "$currentver" = "$newver"
then
echo 'Kernel is up to date.'
else
echo "Updating kernel to $newver"
cd "$kerneldir"
tar -xf "linux-$basever.tar.xz" || exit 1
mv "linux-$basever" "linux-$newver" || exit 1
cd "linux-$newver"
lftp -c "open $kernelsite; get patch-$newver.xz patch-$newver.sign" || exit 1
unxz "patch-$newver.xz"
gpg --verify "patch-$newver.sign" || exit 1
patch -p1 < "patch-$newver" || exit 1
make mrproper
zcat /proc/config.gz > .config
make oldconfig
echo "cd $PWD"
fi

exit 0

How to build

First run the following to make sure everything is setup properly for a build.

make clean
make mrproper # note that this deletes any .config file in the current directory

You have many choices when it comes to how to build the kernel. It is best to read the README file in the kernel source directory to get all the current options, as well as Documentation/kbuild/kconfig.txt for details on all the options.

README

 - Alternative configuration commands are:

"make config"      Plain text interface.

"make menuconfig"  Text based color menus, radiolists & dialogs.

"make nconfig"     Enhanced text based color menus.

"make xconfig"     X windows (Qt) based configuration tool.

"make gconfig"     X windows (Gtk) based configuration tool.

"make oldconfig"   Default all questions based on the contents of
your existing ./.config file and asking about
new config symbols.

"make silentoldconfig"
Like above, but avoids cluttering the screen
with questions already answered.
Additionally updates the dependencies.

"make olddefconfig"
Like above, but sets new symbols to their default
values without prompting.

"make defconfig"   Create a ./.config file by using the default
symbol values from either arch/$ARCH/defconfig
or arch/$ARCH/configs/${PLATFORM}_defconfig,
depending on the architecture.

"make ${PLATFORM}_defconfig"
Create a ./.config file by using the default
symbol values from
arch/$ARCH/configs/${PLATFORM}_defconfig.
Use "make help" to get a list of all available
platforms of your architecture.

"make allyesconfig"
Create a ./.config file by setting symbol
values to 'y' as much as possible.

"make allmodconfig"
Create a ./.config file by setting symbol
values to 'm' as much as possible.

"make allnoconfig" Create a ./.config file by setting symbol
values to 'n' as much as possible.

"make randconfig"  Create a ./.config file by setting symbol
values to random values.

"make localmodconfig" Create a config based on current config and
loaded modules (lsmod). Disables any module
option that is not needed for the loaded modules.

To create a localmodconfig for another machine,
store the lsmod of that machine into a file
and pass it in as a LSMOD parameter.

target$ lsmod > /tmp/mylsmod
target$ scp /tmp/mylsmod host:/tmp

host$ make LSMOD=/tmp/mylsmod localmodconfig

The above also works when cross compiling.

"make localyesconfig" Similar to localmodconfig, except it will convert
all module options to built in (=y) options.

You can find more information on using the Linux kernel config tools
in Documentation/kbuild/kconfig.txt.

Yet another option is to start with one of the slackware kernel configs found in the source/k directory of your slackware install media. Just copy the config file in, rename it to .config and run one of the configuration commands, typically make oldconfig if you are compiling a kernel version newer than the config file you copied in.

You can also use the kernel config of your currently running kernel located at /proc/config.gz by running

zcat /proc/config.gz > .config

Note, however, that /proc/config.gz may not exist if the kernel was not configured to expose it.

If you choose to build in /usr/src and use xconfig or gconfig please read howtos:slackware_admin:kernelbuilding#x_and_su[2193]

What to build

First, make sure you understand the difference between built-in and module. Built-in means that the driver or feature is included in the kernel, and is loaded into RAM by the bootloader on boot. Module means that the driver is built as a module and is loaded by the kernel once it mounts the filesystem. This is very important, because in order to load a module from the filesystem, the kernel needs drivers to handle the IDE or SATA controller as the well as the filesystem on the HDD or SDD. You MUST either build-in the IDE/SATA controller modules (PATA/SATA/AHCI) needed to access your HDD/SDD as well as the filesystem driver needed to mount the filesystem on which the modules are located OR you can make an initrd[2194]. Failing to do so will result in the Kernel Panic-not syncing: VFS: unable to mount root fs on unknown block(8,2) error.

So, should you build anything as a module, why not just make everything bulit-in. Certainly this is an option, and this is what is done for the slackware huge kernel, because it doesn't have access to the modules. However, on an old machine you will notice a difference between booting the huge kernel (slow) and booting the generic kernel (fast). This is because loading a large kernel into RAM takes longer than a smaller one. There is another issue with building everything into the kernel in that some drivers may conflict with one another and you won't be able to unload the modules because they are built-in. You can usually prevent built-in drivers from working on boot using the kernel command line which you can set in you bootloader config, for example /etc/lilo.conf.

Highlights of the kernel config

What follows is a documentation of some of the more important or interesting features of the kernel. This will not be comprehensive, because there are tons and tons of options to configure. It will be just highlights of the options considered to be more interesting or important than the rest. Read the Help on each option for more info. They are presented in the same order as they are in the kernel config along with where to find them.

General setup

Local version - append to kernel release

This option lets you add a string to the end of the kernel version, in case you want to install more that one kernel of the same version.

Kernel compression mode

This lets you select the kernel compression mode. LZMA is the good default choice. Higher compression (LZMA/XZ) requires more RAM and processor usage, but is faster to load from disk to RAM. Lower compression (Gzip/LZO) requires less RAM and processor usage, but is slower to load from disk to RAM.

Kernel .config support

Enable access to .config through /proc/config.gz

Make sure to enable this so you can have easy access to your current kernel config at /proc/config.gz

Automatic process group scheduling

This option can greatly improve the performance of responsiveness of multi-threaded machines. So you can run make -j4 without causing other programs to stutter.

Initial RAM filesystem and RAM disk (initramfs/initrd) support

Make sure to enable this if you are going to make an initrd.

Disable heap randomization

This option should be disabled on machines make after the year 2000 for security reasons.

Optimize very unlikely/likely branches

Can increase kernel performance.

Enable the block layer

Partition Types —>

EFI GUID Partition support

Enable this if you plan on using the new GPT partition scheme and want to boot from UEFI.

IO Schedulers —>

Deadline I/O scheduler

Causes performance improvement if you use the JFS filesystem.

CFQ I/O scheduler

CFQ Group Scheduling support

This option allows CFQ to recognize task groups and control disk bandwidth allocation, and can improve performance.

You can enable both and test each one out by running

cat /sys/block/sd?/queue/scheduler
echo deadline > /sys/block/sd?/queue/scheduler
echo cfq > /sys/block/sd?/queue/scheduler

Processor type and features

Symmetric multi-processing support

This should be enabled for multi-core and multi-processor machines.

Intel Low Power Subsystem Support

Enable if you have a newer system with Intel Lynxpoint PCH. Check the output of lspci for Lynx Point.

Processor family

For maximum performance you should choose the right processor family.

To identify an unknown processor, first run

cat /proc/cpuinfo

If you still cannot tell what processor family to choose, then look up the cpu family and model online or on the gentoo wiki[2195].

Maximum number of CPUs

Set this to the number of CPUs you have.

SMT (Hyperthreading) scheduler support

This is for Hyperthreading machines, i.e. virtual cores.

Multi-core scheduler support

This is for multi-core machines, i.e. real cores.

You can enable both to be safe, in case you don't know.

Preemption Model

Your selection depends on how you use your computer, and will make a difference performance-wise.

No Forced Preemption (Server)

High latency, Maximum throughput. Good for data servers.

Voluntary Kernel Preemption (Desktop)

Medium latency, Medium throughput. Apps will still run smoothly when the system is under load.

Preemptible Kernel (Low-Latency Desktop)

Low latency, Low throughput. Good for media servers, or low-latency embedded systems.

Reroute for broken boot IRQs

Enable if you have problems with spurious interrupts.

Machine Check / overheating reporting

Make sure to enable this along with Intel or AMD. This allows the kernel to respond to system overheating.

Low address space to protect from user allocation

65536 for most architectures, 32768 for ARM. This can help with NULL pointer deference bugs.

Transparent Hugepage Support

This can increase the performance of apps that require lots of RAM at once, such as p7zip, LZMA, LZMA2 (xz).

Transparent Hugepage Support sysfs defaults

Selecting always will allow hugepages to work without needing to mount hugepages or configure the application to use them, unlike madvise.

Enable cleancache driver

Can increase performance by reducing disk I/O. However, I don't know how stable it is.

MTRR cleanup support

Can improve performance.

MTRR cleanup enable value (0-1)

1 to enable it

MTRR cleanup spare reg num

This is the number of disabled/unused/spare MTRR registers.

As an example, run dmesg and look for

MTRR variable ranges enabled:
0 base 000000000 mask F80000000 write-back
1 base 07EF00000 mask FFFF00000 uncachable
2 base 07F000000 mask FFF000000 uncachable
3 disabled
4 disabled
5 disabled
6 disabled

Here, registers 3,4,5,6 are disabled/unused/spare, so MTRR cleanup spare reg num = 4 total unused registers.

EFI runtime service support

Enable if you want to boot from UEFI.

EFI stub support

Enable if you want to boot from UEFI.

Enable -fstack-protector buffer overflow detection

Can prevent buffer overflows on systems with gcc version 4.2 and up.

Timer frequency

Always pick 1000Hz for systems that need to run multimedia. This number is proportional to interactive responsiveness. You want lower frequencies on servers and higher frequencies on desktops. However, if you have Tickless System enabled timer interrupts will only trigger as-needed, so it may be best to round up.

Power management and ACPI options

ACPI

Always enable: Button, Fan, Processor, Thermal Zone. Without these, your computer (especially laptops) may overheat because ACPI cannot access thermal monitoring or fans.

CPU Frequency scaling

CPU Frequency scaling

Enable this if you have frequency scaling enabled in the UEFI/BIOS (Speedstep or similar).

'performance' governor

This sets CPU frequency to the maximum available.

'powersave' governor

This sets CPU frequency to the minimum available.

'userspace' governor for userspace frequency scaling

This allows userspace programs to set the CPU frequency.

'ondemand' cpufreq policy governor

This governor is recommended for desktops.

'conservative' cpufreq governor

This governor is recommended for laptops/netbooks. Although similar to the 'ondemand' governor, frequency is gracefully increased and decreased rather than jumping to 100% when speed is required.

x86 CPU frequency scaling drivers

Intel P state control

This driver is mutually exclusive with the ACPI Processor P-States driver. It is a newer driver for Sandy Bridge processors and may cause problems[2196].

Processor Clocking Control interface driver

This is only required for HP ProLiant servers, which use this interface. Otherwise, disable it.

ACPI Processor P-States driver

This is the recommended driver for newer CPUs Intel (Enhanced) Speedstep enabled and AMD K10 and newer.

AMD Opteron/Athlon64 PowerNow!

This is for K8/early Opteron/Athlon64 processors.

Intel Enhanced SpeedStep (deprecated)

This is a deprecated option that has been superseded by the ACPI Processor P-States driver, so leave this disabled.

Intel Pentium 4 clock modulation

This is a hack for Pentium 4s that may cause severe slowdowns and noticeable latencies, so disable it.

Bus options

Message Signaled Interrupts (MSI and MSI-X)

This can offload IRQ interrupts by using MSI instead. However, if your BIOS is buggy this may need to be disabled.

Executable file formats / Emulations

Kernel support for scripts starting with #!

You MUST say yes here or you will not be able to run script that start with #! and then the interpreter.

IA32 Emulation

Allows 32-bit emulation via multi-lib on 64-bit systems.

Device Drivers

Block devices

Normal floppy disk support

Should be module or the floppy drive may malfuction.

Loopback device support

Required by some disk encryption methods.

SCSI device support

Asynchronous SCSI scanning

Will speed up booting, but all SCSI drivers must be built-in for it to work properly.

Serial ATA and Parallel ATA drivers

AHCI SATA support

If you enable AHCI in the BIOS this must be built-in or part of initrd. If you don't use AHCI, then do the same but for your SATA or PATA driver.

Multiple devices driver support (RAID and LVM)

Device mapper support
Crypt target support

Required by cryptsetup.

Input device support —>

Keyboards —>

AT keyboard

Enable this if you have a standard AT or PS/2 keyboard.

Mice —>

PS/2 mouse

Enable this if you have a PS/2 mouse.

Multimedia support —>

Media USB Adapters —>

USB Video Class (UVC)

UVC input events device support

If you have a newer webcam, you should enable this or it won't work.

Graphics support

/dev/agpgart (AGP Support)

Intel 440LX/BX/GX, I8xx and E7x05 chipset support

Enable this if you have an integrated Intel card.

Direct Rendering Manager

This should almost always be enabled.

Nouveau (nVidia) cards

If you use nouveau, you only need this driver, because it has framebuffer support.

Support for frame buffer devices

VESA VGA graphics support

This should almost always be enabled.

EFI-based Framebuffer Support

You should enable this if you want to boot from UEFI.

nVidia Framebuffer Support

Again this is NOT needed by nouveau.

Sound card support

Advanced Linux Sound Architecture

PCI sound devices

Intel HD Audio

Pre-allocated buffer size for HD-audio driver

A larger buffer (e.g. 2048) is preferred for systems using PulseAudio.

USB support

xHCI HCD (USB 3.0) support

You should enable this for newer systems.

EHCI HCD (USB 2.0) support
Improved Transaction Translator scheduling

Can greatly improve transfer speeds over USB 2.0 in some cases.

Real Time Clock

PC-style 'CMOS'

Enable this or you won't be able to set the clock from Linux. It is often accidentally omitted.

Staging drivers —>

Avoid drivers in this section if you value system stability.

Generic Dynamic Voltage and Frequency Scaling (DVFS) support

This provides frequency scaling support for devices. It also has governors similar to those for CPU frequency scaling. I'm not sure what devices require this.

Firmware Drivers

EFI (Extensible Firmware Interface) Support —>

EFI Variable Support via sysfs

This option is deprecated in favor of EFI Variable filesystem. It can cause data inconsistency issues[2197]

File systems

You MUST either build-in the driver for the filesystem on which the kernel modules reside OR create an initrd, or the kernel will NOT boot. You should also build-in the driver for the filesystem on which the kernel itself resides in case it resides on a different filesystem type than the modules e.g. EFI VFAT partition.

DOS/FAT/NT Filesystems

MSDOS fs support
VFAT (Windows-95) fs support

You need these built-in if you use EFI. The kernel will boot if they are modules, but catch22 type situations can easily result.

NTFS file system support
NTFS write support

You need this if you want to write to NTFS filesystems.

CD-ROM/DVD Filesystems

UDF file system support

You need this if you plan on reading or writing disks with the UDF filesystem.

Miscellaneous filesystems —>

EFI Variable filesystem

You should enable this if you want to boot from UEFI.

Kernel hacking

Magic SysRq key

Enable if you want to use SysRq REISUB (p.cogx on dvorak) to safely shutdown a hung system.

Allow gcc to uninline functions marked 'inline'

Enable for gcc 4.x but not for gcc 3.x

Security Options

Restrict unprivileged access to the kernel syslog

Disable this if you want users to be able to use the 'dmesg' command.

Cryptographic API

Make sure to build-in all algorithms you plan to use for cryptography using cryptsetup, especially if you plan on full disk encryption, otherwise you won't be able to decrypt your disk and thus will not be able to boot. Note that there are optimized and 64-bit versions to choose from.

Parallel crypto engine

Converts an arbitrary crypto algorithm into a parallel algorithm that executes in kernel threads. It allows multi-threading of any crypto algorithm.

Library routines

JEDEC DDR data

You should probably enable this so that the JEDEC data from your RAM is available to drivers that need it.

If you are wondering what drivers you need, make sure to take a look at the output of these commands.

lsmod
/sbin/lspci -k
lsusb
dmesg

You may want to consider disabling Staging drivers and EXPERIMENTAL and OBSOLETE drivers if you want a stable, modern kernel. Some can be left on for good reason.

Building

To speed up building, you can use the -j option for make. The maximum it can be set to is the number of cores or processors plus one. However, if you want to do something while the kernel is building, like browse the web, you may want to use just the number of cores or processors.

cores=4

make -j$cores

Installing

Before installing the kernel, you may want to uninstall Slackware packages containing the default kernels, modules, and source. You can also choose to leave these packages installed if you plan on using these default kernels. Whatever you do, do NOT uninstall the old kernel headers. See Alien Bob's guide[2198] for more on these topics.

First, you should make sure to remove any previously installed kernel modules at /lib/modules/$version.

su
rm -r /lib/modules/$version # make sure you know what is being removed

Now, you can install the new modules.

make modules_install

Next you should install the kernel itself. This script will install the kernel and make sure it is installed properly.

installkernel.sh

#!/bin/sh
# installs kernel only, this should be run only from the kernel source directory

error() # error
{
echo "ERROR: $1"
exit 1
}

# make sure we are root
if test ~ != '/root'
then
error 'This script must be run as root'
fi

# remove the old
rm -f /boot/config.old
rm -f /boot/System.map.old
rm -f /boot/vmlinuz.old

# rename the present
mv /boot/config /boot/config.old
mv /boot/System.map /boot/System.map.old
mv /boot/vmlinuz /boot/vmlinuz.old

# copy in the new
cp arch/x86/boot/bzImage /boot/vmlinuz
cp System.map /boot
cp .config /boot/config

# for elilo
bootdir="/boot/efi/EFI/Slackware"
if test -d "$bootdir"
then
cp arch/x86/boot/bzImage "$bootdir"/vmlinuz
fi

# change permissions of vmlinuz
chmod a-rwx,u+r /boot/vmlinuz

# check install
echo
if cmp arch/x86/boot/bzImage /boot/vmlinuz
then
echo 'Kernel installed correctly'
else
error 'Kernel install failed'
fi
if cmp System.map /boot/System.map
then
echo 'System.map installed correctly'
else
error 'System.map install failed'
fi
if cmp .config /boot/config
then
echo 'Kernel config installed correctly'
else
error 'Kernel config install failed'
fi
if test -d "$bootdir"
then
if cmp arch/x86/boot/bzImage "$bootdir"/vmlinuz
then
echo 'kernel installed to EFI correctly'
else
error 'kernel install to EFI failed'
fi
fi
echo
echo 'Kernel install completed successfully'
echo 'Remember to run lilo if you use it'
echo

exit 0

lilo

If you chose not to build-in the IDE/SATA controller modules (PATA/SATA/AHCI) needed to access your HDD/SDD as well as the filesystem driver needed to mount the filesystem on which the modules are located, you MUST make an inird[2199].

If you use lilo, which is the default bootmanager on Slackware, you should edit /etc/lilo.conf and then run

lilo

Here is an example lilo.conf

# append options here if you need any kernel parameters on boot
append=" vt.default_utf8=0"
# this should point to the device you want to boot
boot = /dev/sda
# not necessary, but lilo complains if it is not here
lba32
# the compact option speeds up boot time significantly, but may not work on all systems
compact
# This is needed if you want lilo to prompt you for what to boot
prompt
# This is given in tenths of a second, so 600 for every minute. You can comment this out if you single-boot.
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console, the safest choice.
# You can choose others if you want a framebuffer console, but you must have framebuffer support or the screen will go black.
vga = normal
# End LILO global section
# Linux bootable partition config begins
# the path to the Linux kernel boot image
image = /boot/vmlinuz
# the partition where the Linux kernel is located
root = /dev/sda1
# how this entry is shown on the boot screen
label = Linux
read-only
# Linux bootable partition config ends

Sources

The howto was written by H_TeXMeX_H[2200]

The README is an excerpt from the README included with the kernel source.

The installkernel.sh script was written by H_TeXMeX_H[2201]

The lilo.conf excerpt is from the default lilo.conf that comes with Slackware plus a few options.

Thanks to Alien Bob[2202] for his kernel building howto[2203]. It inspired me to write a restructured and updated kernel building guide.

Updated by metaschima[2204]

howtos, author htexmexh, kernel, software

Querying Installed Packages

Sometimes you might want to check whether a particular package is installed or which version of a package is installed on your system. If the package is part of the Slackware installation you could use the slackpkg tool:

# slackpkg info emacs
PACKAGE NAME:  emacs-24.1-x86_64-6.txz
PACKAGE LOCATION:  ./slackware64/e
PACKAGE SIZE (compressed):  36704 K
PACKAGE SIZE (uncompressed):  110720 K
PACKAGE DESCRIPTION:
emacs: emacs (GNU Emacs)
emacs:
emacs: Emacs is the extensible, customizable, self-documenting real-time
emacs: display editor. If this seems to be a bit of a mouthful, an
emacs: easier explanation is that Emacs is a text editor and more. At
emacs: its core is an interpreter for Emacs Lisp, a dialect of the Lisp
emacs: programming language with extensions to support text editing.
emacs: This version supports X.
emacs:
emacs: http://www.gnu.org/software/emacs/
emacs:

This works fine for Slackware core packages. Some of us, however, install additional programs from a number of sources (eg. SlackBuilds[2205]), which are not taken into account by slackpkg. Another method which includes all correctly installed* packages is as follows:

ls /var/log/packages | grep i3
i3-4.2-x86_64-1_SBo
i3status-2.5.1-x86_64-1_SBo

First we list the contents of the /var/log/packages directory which includes the names of all the currently installed packages. Then we pipe it to grep to narrow down the results and only display packages matching our pattern.

Another example showing all packages installed from Slackbuilds:

ls /var/log/packages | grep SBo

If you don't want to type it each time, you could create a very short script and add it to your path:

pkg.sh

#!/bin/sh
packages_dir=/var/log/packages/

if [ "$#" -eq 1 ]; then
ls $packages_dir | grep $1
else
echo "Please, provide one argument"
fi

$ pkg.sh cairo
cairo-1.10.2-x86_64-2
cairomm-1.9.8-x86_64-1_SBo
pycairo-1.8.10-x86_64-2

Another way to find out the installed packages

installed_pkgs_info

#!/bin/sh
#Save this script as "installed_pkgs_info" probably in /usr/local/bin

pkgdir="/var/lib/pkgtools/packages/"

printf "\n\n\b\t Getting the information about installed pkgs...\n\n"

cd $pkgdir

for i in *;do slackpkg info $i | grep "PACKAGE NAME:"; sleep 1;done

 And the output should look like this :
root@Slackware_16:45:19_Tue Jun 16:~#installed_pkgs_info
Getting the information about installed pkgs...
PACKAGE NAME:  ConsoleKit2-1.2.1-x86_64-4.txz
PACKAGE NAME:  Cython-0.29.20-x86_64-1.txz
PACKAGE NAME:  GConf-3.2.6-x86_64-4.txz
PACKAGE NAME:  LibRaw-0.18.12-x86_64-1.txz
PACKAGE NAME:  M2Crypto-0.35.2-x86_64-5.txz
PACKAGE NAME:  MPlayer-20200103-x86_64-2.txz
PACKAGE NAME:  MPlayer-20200103-x86_64-2_alsa.txz
..snipped output for brevity!

*Please note that if you directly run binary installers (eg. VirtualBox), a program will not have an entry in /var/log/packages/.

Sources

Originally written by sycamorex[2206]

howtos, software, package management, package tracking, author sycamorex

Setting up a Recovery Boot Option

Overview and Purpose

Currently most Linux based distributions install a recovery/safe option and a memory test option in the default bootloader. While Slackware does not install such options by default, they can be easily added to any system.

The recovery prompt that will be installed in this tutorial will be an on-disk option to enter the Slackware usbboot image. This image currently includes a basic command line mode that is used to fix boot issues, the capability to run the setup application for new Slackware installations and access to the memtest86 application.

File Preparation

Before you begin to make changes to your system you will need to obtain the file usb-and-pxe-installers/usbboot.img, this location is on the root of all installation media or distribution mirrors. It is recommended to place the file into the /tmp directory so it is easily located.

Enter the root prompt by issuing the command su or signing into the system as the root user.

Mount the usbboot.img file using the loopback option into an unused directory such as /mnt/tmp with the command

mount -o loop /tmp/usbboot.img /mnt/tmp

Create a separate directory in your /boot directory to contain the necessary files such as /boot/recovery with the command

mkdir /boot/recovery

Copy the files from the usbboot.img mounted directory into the newly created recovery directory with the cp command such as

cp -rv /mnt/tmp/* /boot/recovery/

Unmount the mounted usbboot.img file by issuing the command

umount /mnt/tmp

lilo Configuration

In various cases the installed lilo application may not support the image sizes that are used for the installation medium, such as when attempting to reference the Slackware 14.0 usbboot image from lilo in Slackware 13.37.

In those cases you can either upgrade lilo (which may not be possible) or enter the standard prompt from within an installation CD, DVD or USB stick.

Before we begin modifying the lilo configuration you must first understand why the various options are being used.

image points to the kernel image which will be booted.

For 32-bit Slackware the options are hugesmp.s and huge.s.

For 64-bit Slackware the only option is huge.s.

label lists the label that will be presented for the option in the bootloader menu.

initrd lists the initial RAM disk that is used to load the temporary file system.

password, no explanation needed, enter the password that you wish to use to lock down entry into the boot option.

read-only is used to tell the system to mount the file system as read-only.

Using your favorite text editor modify the /etc/lilo.conf file to include the entry as shown below:

image = /boot/recovery/huge.s
label = slackware-recovery
initrd = /boot/recovery/initrd.img
password = newpassword
read-only

Once the new entry has been applied and saved in lilo.conf you will issue the command lilo, upon completion you will see an output similar to the following which will show that the new option has been successfully applied to the bootloader:

root@darkstar:~# lilo
Added linux  *
Added recovery

Since passwords are being applied within the /etc/lilo.conf file, it is recommended to modify the permissions of the file so that only root can read the contents. You can apply the recommended permissions by issuing the following command:

chmod 600 /etc/lilo.conf

Adding a memtest Option

The memtest option can currently be executed through the recovery command line prompt by issuing the command memtest, but to decrease the memory footprint of the loaded system we will setup a bootloader option to boot directly into the memtest application.

We will assume that you have already followed the instructions above to create a recovery option, if the instructions were not followed you can follow the basic steps above but only copy the file called memtest from the usbboot.img file into the recovery directory.

If you followed the recovery option instructions above, the memtest binary will already be present in the /boot/recovery directory.

The file memtest will be referenced as the image for a new lilo entry as shown below.

image = /boot/recovery/memtest
label = memtest
password = newpassword
read-only

Once the new lilo entry has been saved and the lilo command has been run you will see see an output like the following confirming that the new option is available.

root@darkstar:~# lilo
Added linux  *
Added recovery
Added memtest

Sources

Originally written by mfillpot[2207]

howtos, slackware administration, usbboot, recovery, memtest, lilo, author mfillpot

Setting up GRUB 2 on install (without rebooting)

There is GRUB in A series of Slackware-14.1. If you want to install GRUB immediately after install (and before restarting), below is a simple method that assumes you use traditional BIOS and MBR partitioning (if you plan to use GPT instead of MBR partitioning, refer to Grub 2 with GPT and a BIOS motherboard[2208] instead):

After the message: “Installation of Slackware Linux is complete.”

chroot in:

# chroot /mnt

Then install GRUB:

# grub-install /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg

This assumes you are using the disk /dev/sda, adjust if this is not the case.

# exit
# reboot

Enjoy!

P.S. Make sure to run:

# grub-mkconfig -o /boot/grub/grub.cfg

After every kernel upgrade.

Sources

Originally written by ryanpcmcquen[2209]

Link to GPT article by ruario[2210]

howtos, grub, author ryanpcmcquen

Slackware Automation Using Ansible

Rationale, and What Is Ansible, Anyway?

Like everyone else, I used to write Perl and bash scripts to automate things, but decided to learn the modern way of doing such things. I looked at Puppet initially but decided to learn Ansible instead. I wrote a simple collection of Perl scripts and Ansible playbooks to be run on a fresh Slackware install, and was told in Freenode #slackware that I ought to write something for the wiki, which brings us up to date.

So what is Ansible[2211]? It's a buzzword-compliant IT automation platform, comparable to Chef, Puppet, Saltstack and whatever else the cool kids are using this week. Ansible's advantages over its competitors is that it's lightweight (it runs over SSH) and it's simple to understand and use. If you're new to Ansible, you might want to take a look at the official docs[2212] first.

Bootstrap A Fresh Slackware Install

Let's say you have a brand-new Slack 14.2 install… now what? You have to log in and make sure all the software you want is installed, copy over your .bashrc and whatnot, and generally get your shiny new desktop or server ready to be used. You can use my ansible_slackware_bootstrap scripts and playbooks to automate some of that for you.

There are prerequisites, of course… you need git and ansible installed on a Linux machine (perhaps your Ubuntu desktop, maybe), plus you need to set up SSH keys, so that you can log in as root to the Slackware machine you want to set up. Lastly, you need to list your target machine in the /etc/ansible/hosts inventory file on your desktop. Once that's done, you can begin.

The latest code can be found on GitHub[2213]. All you have to do is click the green “Clone or download” button and copy the link provided, get root on your Linux box, and type “git clone $URL”, then cd to the directory it creates and you've got the code.

The README file[2214] from GitHub will give you more information, but what you want to do is run slackware-bootstrap-perl-and-python.pl, which will install Perl and Python on your target Slackware machine. After that, run the slackware-installsets.yaml and slackware-admin-setup.yaml playbooks, in that order. You can use my runplaybook.pl script for these if you like. Once you're run the scripts and playbooks, log in to your target Slackware machine and verify that slackpkg, sbopkg and your favorite dotfiles are installed.

howtos

Set up Grub as boot loader on UEFI hardware

Installation and running of Slackware on computers that use Unified Extensible Firmware Interface (UEFI) rather than traditional BIOS poses problems. It may be impossible to boot the official install media via UEFI directly and the installation discs do not include a UEFI bootloader.

Installation of Slackware on UEFI systems is described in the page http://docs.slackware.com/howtos:slackware_admin:installing_on_uefi_hardware[2215]

That page describes production of a USB disk which can used to boot slackware.

This page describe installation of Grub2 as bootloader for UEFI based systems. Grub2 has the advantage that it brings up a menu on booting and it is possible to use the menu to dual boot with Windows. It is assumed that Slackware has been installed and it is being booted through a UEFI based system.

The sequence followed is that of

Installation of Grub2-efi to a USB boot stick (This stage can be bypassed but it might be safer to check carry out the installation to a USB stick first)

Once booting from the USB stick is working Grub2-efi is installed on the hard drive

Modification of the UEFI boot menu

Install Grub2-efi

Install grub2 using the slackbuild but modifying it by adding

--with-platform=efi \

to ./configure

Then follow some of the instructions at https://wiki.archlinux.org/index.php/Grub#UEFI_systems_2[2216]

starting with mounting the usb stick at /boot/efi

#mount /dev/sdc1 -t vfat /boot/efi (where sdc1 is your USB stick)
#modprobe dm-mod
#grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub --recheck --debug
#mkdir -p /boot/grub/locale
#cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo

Configure grub.cfg with

#grub-mkconfig -o /boot/grub/grub.cfg

This process should have created a file on the USB stick

/EFI/grub/grubx64.efi.

At this point it is advisable that to check that it is possible to boot from the USB stick with grubx64.efi. If the UEFI system does not see it copy it to /EFI/BOOT/bootx64.efi

Installation of grubx64.efi to the hard drive

The EFI partition on the hard drive should be mounted. The partition will have a structure like this:

/EFI/Boot/bootx64.efi

There may be a folder /EFI/Microsoft/Boot and the efi file booting windows may be bootmgr.efi

The safest way of proceeding at this stage is to create a new folder, for example /EFI/Linux/ and place grubx64.EFI in there.

At this point it may be worth testing if the UEFI system is able to see the new Linux boot option or not, usually by pressing F8 on booting the computer. If it does then it should be straightforward to set this as a default option. It is also likely that it is not seen. If that is the case the choice it to either replace the working .efi (for example /EFI/Boot/bootx64.efi or /EFI/Microsoft/Bootbootmgr.efi) or to modify the UEFI boot menu. Replacing the existing file is likely to make it impossible to boot into Windows. If the intention is to set up a dual boot system then the UEFI boot menu has to be modified.

Modifying the UEFI boot menu

Download efibootmger from http://linux.dell.com/efibootmgr/[2217]

untar it, change into the folder and run make

Copy src/efibootmgr/efibootmgr into /usr/sbin and chown it to root.

Mount the efi partition of the hard drive to /boot/efi

# mount /dev/sdXy -t vfat /boot/efi
where X = drive and y = partition
# modprobe efivars
# efibootmgr -c -g -d /dev/sdX -p Y -w -L "Linux" -l '\EFI\Linux\bootx64.efi'
assuming that the grubx64.efi file had been copied to \EFI\Linux\bootx64.efi

On next reboot Linux with Grub comes up as an option on the boot menu.

Sources

* Originally written by arubin[2218]

howtos, grub, uefi, author arubin

Building and Installing Packages with sbopkg

Sbopkg[2219] is a command-line and dialog-based tool to synchronize with the SlackBuilds.org[2220] (“SBo”) repository, a collection of third-party SlackBuild scripts to build Slackware packages. The program has a curses based interface which lets you pick and assemble the programs which you want to compile from source into packages. It can also be used non-interactively in case you know beforehand what your goal is - in that case it is “fire and forget”.

The following information will assist you in getting sbopkg installed, and running on Slackware.

Note that sbopkg builds Slackware packages. As with any Slackware package management program, you will have to be root to use the program! Execute

su -

to get a root command prompt with the correct environment configured.

Download sbopkg:

Download sbopkg from: https://www.sbopkg.org/downloads.php[2221]
You can get the sources and build a package yourself, or just grab th ready-made Slackware package. The following section of this article assumes that you downloaded the ready-built package.

Install sbopkg

Assuming that the sbopkg package file name you downloaded to the current directory is sbopkg-0.38.0-noarch-1_wsr.tgz, the installpkg command to install sbopkg (or upgrade it if it was already present on your system) is as follows:

$ su -
# cd /path/to/downloaded/file/
# upgradepkg --install-new sbopkg-0.38.0-noarch-1_wsr.tgz

Configure sbopkg

Read the sbopkg documentation! See https://www.sbopkg.org/docs.php[2222] , and also do not forget there is a man page for sbopkg.

The first time sbopkg is executed, you will be asked if it is OK that the program creates the necessary configuration files:

# sbopkg
The following directories do not exist:
Variable                   Assignment
--------                   ----------
REPO_{ROOT,NAME,BRANCH} -> /var/lib/sbopkg/,SBo/,14.2
LOGFILE directory -------> /var/log/sbopkg
QUEUEDIR ----------------> /var/lib/sbopkg/queues
SRCDIR ------------------> /var/cache/sbopkg
TMP ---------------------> /tmp/SBo
You can have sbopkg create them or, if these values are incorrect, you can
abort to edit your config files or pass different flags.
(C)reate or (A)bort?:

. Select C to create these required directories.
The program will then present its main screen:

Your first task is to synchronize with the SlackBuilds.org repository - i.e. you let sbopkg create a local copy of all the SlackBuild entries on the remote server, for the Slackware release which you are running. You either use the first menu item in the curses-based main screen, or else you can do this from the commandline:

# sbopkg -r
Syncing with the remote repository into /var/lib/sbopkg/SBo/14.2.
receiving incremental file list
<long list of filenames...>
sent 451288 bytes  received 36904793 bytes  371702.30 bytes/sec
total size is 35271012  speedup is 0.94
Rsync with the SBo repository for Slackware 14.2 complete.
Importing SBo repository for Slackware 14.2 GPG Key...
Import done.
***SYNC COMPLETE***

You are now ready to select the packages you want sbopkg to build from source.

Using Queuefiles with sbopkg

The sbopkg program itself allows a great deal of automation: the interactive curses interface helps you manage the burden of downloading source code archives, and allowing you to select multiple programs and then compile and package all of those in one go.
But you can automate this process even further, by using sqg - sbopkg queueu generator (included in main package since 0.38.0).

sqg can generate queuefile for each or all packages in SBo repository:

sqg -p <filezilla> # this will only generate queue file for filezilla package only
sqg -a # this will generate queue files for all packages in SBo repository

Note that everytime a public update is announced or new repository is available, it's recommended to run sqg -a to generate an updated queue files as deps may be added or removed.

Example of Using sbopkg

As an example, let's install Gramps[2223]. The queuefile for Gramps lists the following dependencies, in order of install:

orbit2
pyorbit
libbonobo
gnome-mime-data
gnome-vfs
libgnome
gnome-python
gramps

Load the “gramps.sqf” queue file in sbopkg's curses interface, and Gramps will be successfully built on your Slackware 14.2 system and installed, along with all its dependencies.

Alternatively you can use the less interactive command-line interface:

sbopkg -i gramps
Both a queuefile and a package were found with the name "gramps".
Use (Q)ueuefile, (P)ackage, or (A)bort?: q
###########################################
New queue process started on:
Fri Aug 19 04:57:12 WIB 2016
###########################################
+++++++++++++++++++++++++++++++++++++++++++
PRE-CHECK LOG
Using the SBo repository for Slackware 14.2
Queue Process:  Download, build, and install
ORBit2:
Checking GPG for ORBit2.tar.gz ... OK
Processing ORBit2 2.14.19-3
Using original .info file
Using original SlackBuild file
No build options selected.
pyorbit:
Checking GPG for pyorbit.tar.gz ... OK
Processing pyorbit 2.24.0-1
Using original .info file
Using original SlackBuild file
No build options selected.
libbonobo:
Checking GPG for libbonobo.tar.gz ... OK
Processing libbonobo 2.32.1-3
Using original .info file
Using original SlackBuild file
No build options selected.
gnome-mime-data:
Checking GPG for gnome-mime-data.tar.gz ... OK
Processing gnome-mime-data 2.18.0-2
Using original .info file
Using original SlackBuild file
No build options selected.
gnome-vfs:
Checking GPG for gnome-vfs.tar.gz ... OK
Processing gnome-vfs 2.24.4-3
Using original .info file
Using original SlackBuild file
No build options selected.
libgnome:
Checking GPG for libgnome.tar.gz ... OK
Processing libgnome 2.32.1-2
Using original .info file
Using original SlackBuild file
No build options selected.
gnome-python:
Checking GPG for gnome-python.tar.gz ... OK
Processing gnome-python 2.28.1-1
Using original .info file
Using original SlackBuild file
No build options selected.
gramps:
Checking GPG for gramps.tar.gz ... OK
Processing gramps 3.4.3-1
Using original .info file
Using original SlackBuild file
No build options selected.
+++++++++++++++++++++++++++++++++++++++++++
Pre-check complete.
Do you wish to proceed based on the search results above? Packages not
found will be skipped during the process.
(P)roceed or (Q)uit?: P

etcetera.

References for sbopkg

https://www.sbopkg.org[2224]

https://www.sbopkg.org/docs.php[2225]

https://www.sbopkg.org/downloads.php[2226]

https://www.sbopkg.org/queues.php[2227]

Sources

Originally written by ldkraemer[2228]

Contributions by Eric Hameleers[2229]

Contributions by Willy Sudiarto Raharjo[2230]

howtos, software, sbo, package management, author ldkraemer

Creating a Package Using a SlackBuild Script

Overview

Occasionally, you will find that there is an application that you would really like to utilize, but it is not available in Slackware's repository. For times like this you have options[2231], one of which is using a SlackBuild[2232] script to build an application package for installation on your own system. That is what this tutorial will endeavor to teach you.

Using a SlackBuild Script

One of the first things I do on any of my Linux installations is to create a hidden directory called .build in my /home directory that I use primarily for manual compiling of applications, or in this case in Slackware, installation of SlackBuild scripts (see Fig 1).

Figure 1 – /home/<user>/.build

OK, let’s get started. The first thing you’ll need to do is navigate to SlackBuilds.org[2233] in your favorite browser. In the small search window in the upper right hand corner, type in the application you’re looking for. For this tutorial, we're going to use PysolFC, a multi-game package. Once the search is completed, you’ll be on the pysolfc SlackBuild page[2234] (see Fig 2).

Figure 2 – Pysolfc SlackBuild Page

Now, the next thing you’ll need to do is download the source (PySolFC-1.1.tar.bz2[2235]) and the SlackBuild (pysolfc.tar.gz[2236]) into your .build directory (or wherever you want to build your stuff). Untar the SlackBuild script from the command line using this command:

$ tar -xvf pysolfc.tar.gz

Or you can unpack it using your favorite graphical decompression application, like Ark or Xarchiver… use whatever you’re comfortable with.

You’ll now have an uncompressed directory called “pysolfc”. Move the source directory (PySolFC-1.1.tar.bz2) that you downloaded previously into your newly uncompressed pysolfc directory. That’s right. Just grab and drag that source directory right on into the pysolfc directory (see Fig 3).

Figure 3 – Inside the Pysolfc Directory

Open your terminal application (Gnome Terminal, Konsole, etc.)

Type the following command to make the pysolfc SlackBuild script executable:

$ chmod +x pysolfc.SlackBuild

As root (to install globally on your Slackware system so all users can access), type the following command:

# ./pysolfc.SlackBuild

If all went well, the SlackBuild script will have created a .tgz package in your /tmp directory. Navigate to the /tmp directory in the terminal:

# cd /tmp

Check to see what’s there:

# ls

You should see a file called pysolfc-1.1-i486-2_SBo.tgz. Install it using Slackware’s native pkgtool:

# installpkg pysolfc-1.1-i486-2_SBo.tgz

That's it. You'll now find PysolFC in your menu (in Xfce).

Sources

Originally written by V. T. Eric Layton[2237]

This how-to is an edited version of THIS[2238] original source. Copyrights may apply to the original. Author grants permission for use on this site in this modified form.

howtos, software, slackbuild, author nocturnal.slacker

Cross Compiling The Linux Kernel

Introduction

I freely admit there are other HOWTOs on this subject, but I wanted to show you a neat way that rides on the back of the great Buildroot project, instead of doing all the compiler setup by hand. As a bonus you can target different architectures pretty easily.

For this demonstration I will build a 32-bit Slackware kernel on a 64-bit machine. Yes I know you can potentially do this with Multilib (though I've never tried) and other methods, however this method is quite simple, will allow targeting MIPS, m68k, Microblaze, PowerPC, SPARC and God knows what else, all with the same technique, and you don't even need to be root to do it. Interested? Read on.

About Buildroot

The Buildroot project has been running for some years and allows one to, quite literally, build a root filesystem (duh), however we will completely ignore the rootfs building part of the equation and just use the cross-compiler which it builds first. Since I have a fast machine I didn't even bother working out how to skip the rootfs generation step. You only have to build your cross-compiler once after all.

Slackware Install

My test cross-compiler build machine is Slackware64 14.2 with disk sets A,AP,D,K,L,N. I'm sure you can install a lot less to build Buildroot, in fact I'd expect only A and D to be needed, however the spirit of the Slackware community is that you install everything so the risk is yours.

Cross-compiler

Grab Buildroot latest stable version from https://buildroot.org[2239], unpack and configure it:

$ cd /usr/src
$ wget https://buildroot.org/downloads/buildroot-2018.02.2.tar.gz
$ tar xf buildroot-2018.02.2.tar.gz
$ cd buildroot-2018.02.2
$ make menuconfig

You will see a configuration system much like the kernel config. For building 32-bit kernels with maximum compatibility I generally select the 486 output option, (586 is the default):

Target options -> Target Architecture Variant (i486)

To make the compiler we are about to build behave more like the Slackware one we want to use glibc instead of the default uClibc-ng (which is more suited to embedded applications):

Toolchain -> C library (glibc)

If you don't do this you will need to disable stack protection in your kernel config when we come to compile that and we want to keep a standard Slackware config, because we're true Slackers heart-and-soul right? :).

You can play around with many other options like kernel header versions however for building the kernel itself none of these matter. The only option that may conceivably make a difference is the GCC version, particularly if you are building an old kernel version which doesn't support later versions of GCC. For this demonstration we can leave the defaults though. Save the config and then:

$ make

While that's running we'll configure the kernel so it's ready to compile.

Kernel preparation

Pull down a kernel config appropriate to building a 32-bit Slackware kernel:

$ cd /usr/src/linux
$ wget https://mirrors.slackware.com/slackware/slackware-14.2/kernels/hugesmp.s/config -O .config

You should now have a .config in /usr/src/linux which says 'CONFIG_64BIT is not set' at the top. That will replace your old 64-bit kernel .config that you had before (included from the 'K' disk set). Obviously copy the kernel someplace else if you wanted to keep that!

Kernel compilation

When the Buildroot build is done, you need to include the generated cross-compiler in your path.

export PATH=/usr/src/buildroot-2018.02.2/output/host/bin:$PATH

The compiler executable has the architecture prefix in it's name to avoid collision with the system GCC, you can now run it and test if it works:

$ i486-linux-gcc --version

If you are interested, you can find all the other toolchain tools like ld, ar and so on with similar prefixes. Now configure your kernel if you want to:

$ cd /usr/src/linux
$ make menuconfig CROSS_COMPILE=i486-linux- ARCH=i386

I'm leaving the default options here, just appending a '-buildroot' to the kernel name. Finally make the kernel:

$ make bzImage CROSS_COMPILE=i486-linux- ARCH=i386

Copy the built kernel to a 32-bit machine and it should boot. If you want to compile/install the modules as well, just make sure you don't forget to use the same CROSS_COMPILE and ARCH variables every time you specify the make commands, everything should use the cross-compiler:

$ make modules CROSS_COMPILE=i486-linux- ARCH=i386
$ make modules_install CROSS_COMPILE=i486-linux- ARCH=i386

and so on. You will probably get away without these appended for some commands like 'make clean', but it's safest to just include them whenever you do any work on that kernel, they certainly won't hurt.

Sources

Originally written by User bifferos[2240]

howtos, nfs, author bifferos

Install Slackware on a CloudVPS by ArubaCloud

ArubaCloud offers excellent low-cost VPS services, starting at 2.79 € / month (updated May 2020; was 1€/month in feb. 2018, see ArubaCloud offers and limitations). This article refers to installing Slackware on CloudVPS[2241] hosting service, which is based on VMware virtualization hypervisor and uses several OS templates, Slackware not being among them. As a low-cost service, custom OS installation, management with VMware Client are not available.

This guide does not cover Cloud Pro or other services by ArubaCloud, as these services may offer additional tools that make this guide unnecessary. Alternately, this guide may be used for other similar services.

Prerequisites

Assuming you want a Slackware server hosted at ArubaCloud, here is what you need:

ArubaCloud account

enough credit to creat the CloudVPS you want.

a FTP hosting space with several GB of available space and reasonable speed.

VMware Player on your computer and at least as much free space as the CloudVPS virtual HDD

Initialization

Once you get your free trial voucher or you purchased credit, you can follow ArubaCloud's web interface to create the CloudVPS of your choice. Using the free trial voucher you can get 2 months free trial for CloudVPS Small (1xCPU, 1GB RAM, 1xETH, 20GB HDD, 2TB traffic/month).

load credit into your account (free trial voucher or purchase credit)

create VPS based on predefined OS template

This guide has been written using an Ubuntu Server 16.04 LTS 64bit template. (updated May 2020)

Information gathering

Having the VPS up and running, and after receiving your access credentials, first write down some key information:

HDD size and layout

Public IP (of the VPS), including netmask, gateway

Preparations

Log in to the CloudVPS using SSH.

Show IP and netmask (write it down):

ip addr list

Show default gateway (write it down):

ip route list

Show nameservers (write it down):

cat /etc/resolv.conf

Show disk layout (write down the total disk size in blocks):

fdisk -l /dev/sda

Install ncftp package:

apt-get install ncftp

Optimize disk by overwriting all free space with zeros (helps with compression):

dd if=/dev/zero of=/ZERO bs=1M; rm /ZERO

Export an image of the Aruba created server

This step is optional. It will familiarize you with the transfer operation, will test your connection and FTP account storage, but it is not required.

Perform it if you want to play at home with the Aruba generated server

Aruba has predefined OS installations as templates, and such a template is deployed into your VPS upon creation. It is personalized with IP address, hostname and you are given an automatically generated password.

Make sure you have enough free space in your FTP account. This will take up several GB of data.

cat /dev/sda | bzip2 | ncftpput -u USERNAME -p PASSWORD -c FTP_SERVER_ADDRESS /path/to/aruba_image_file.bz2

This may take a while, even hours, depending on the available bandwidth between Aruba's datacenter and your FTP server.

It is a rather dirty trick, but it works. The template contains only a bare-bones installation with minimal services running. You may check and see if there is any background daemon that might write much to the disk and stop it, but other then a few log entries, there isn't anything worth mentioning.

Make sure the process finishes without error before proceeding!

You can use this image to make tests on your local VMware Player, and also as a test for the FTP transfer. You need either a Linux Live CD or a running virtual machine with an installed Linux that includes ncftp package and a separate virtual HDD to fill with the image.

Slackware virtual machine

Create your own, local, virtual machine with VMware Player.

Start Vmware Player

Create new virtual machine

“I will install the operating system later”

Choose “Linux” and “Other Linux 3/4.x 64bit”

Name it (ie. aruba_slack)

Maximum disk size: same as VPS HDD size (in GB); store as single file

proceed to finish.

Modify the virtual machine you just created as follows:

Memory = 1GB

Processors = 1 core

CD/DVD = use ISO image (select slackware64-14.2-install-dvd.iso locally), connected at power-on

Network adapter = NAT, connected at power-on

Sound card = REMOVE

Printer = REMOVE

Start the virtual machine.

Enter the console (click in the VM display area)

Proceed to install Slackware as you would on a physical server with the same characteristics of your cloud server. There are no exotic hardware or settings.

For example, you could use a single partition for both system and data, and a small partition (ie. 1-4GB) for swap. Or you could use about a partition for the system, a partition for swap, a partition for data. Your choice.

For a server installation you might want to skip KDE, T, TCL, X, XAP, XFCE package series

After you finish your installation I strongly recommend you add your SSH public key for the root user for remote access. Follow this How to use SSH keys to connect without a password.[2242] Either use the Virtual Machine's console, or ssh from your local machine to do it. Note: you may want to temporarily allow root login via SSH into the Virtual Machine, but remember to restore the default config afterwards.

You are running locally, with the machine behind a NAT router (done by VMware Player) with regards to the internet. You have connectivity, but it is different then the one you'll have at Aruba.

During the configuration phase, assign the proper hostname, but set it to obtain IP address via DHCP.

After the first start of your fresh Slackware installation, you should set up slackpkg[2243] and perform an update.

I'll leave additional software for later, to minimize the data transfer.

Exporting Slackware VM image

Make sure you have enough free space in your FTP account. This will take up several GB of data.

In your Slackware virtual machine:

Stop all unneccesary services (inetd,sendmail,saslauthd,ntpd,httpd,sshd,syslog, etc)

Optimize disk by overwriting all free space with zeros (helps with compression, the resulting image, as described here will be about 1.5GB):

dd if=/dev/zero of=/ZERO bs=1M; rm /ZERO

Export disk image

cat /dev/sda | bzip2 | ncftpput -u USERNAME -p PASSWORD -c FTP_SERVER_ADDRESS /path/to/aruba_slack_image_file.bz2

This may take a while, even hours, depending on the available bandwidth between your computer and the FTP server.

It is a rather dirty trick, but it works.

Make sure the process finishes without error before proceeding!

Importing Slackware VM image into ArubaCloud

With the above step completed without error, you can proceed to inject the image into the ArubaCloud VPS.

Log in to your ArubaCloud Control Panel.

Go to “Cloud servers” → Management

If your VPS is turned off, turn it on and wait until startup is completed (see progress indicator)

Under “Actions”, select “Manage → Sign in”

Open the recovery console. You'll get to see your server's console.

log in to your server, as root

ALTERNATELY you could ssh into it. Also use this method if you encounter problems with recovery console key-mappings.

check running processes and stop any unnecessary daemons (cron, acpid, atd, fail2ban, rsyslog, open-vm-tools)

you must also disable swap memory.

run the following command:

ncftpget -u USERNAME -p PASSWORD -c FTP_SERVER_ADDRESS /path/to/aruba_slack_image_file.bz2 | bzip2 -d > /dev/sda

This may take a while, even hours, depending on the available bandwidth between Aruba's datacenter and your FTP server. At the end of the transfer, ncftpget will report the number of bytes transfered and speed. Make sure “bytes transfered” is exactly equal to the size of the compressed image (see your FTP account). You may get a “Segmentation fault” after the end of the transfer. This is acceptable and expectable.

Make sure the process finishes without any other errors before proceeding!

IMMEDIATELY after it finished successfully:

Go to “Cloud servers” → Management

Under “Actions”, select “Manage → Force switch off”

Very important: just “switch off” will try to perform a normal shutdown procedure, which won't work properly and might even damage the disk data you injected.

Start your Slackware ArubaCloud server:

Go to “Cloud servers” → Management

Under “Actions”, select “Manage → Switch on”

wait for it to start (if it takes apparently too long reload the page. Apparently sometimes the UI doesn't update adequately)

Under “Actions”, select “Manage → Sign in”

Open the recovery console. You'll get to see your server's console.

log in to your server, as root

run netconfig to set up the network according to ArubaCloud IP settings (your wrote them down earlier)

just to make sure everything works properly, reboot your machine.

restart the recovery console after reboot

check that everything is ok

check that you can log in remotely

Slackware default configuration won't allow remote root login without SSH key, so take the appropriate steps to ensure your remote access.

Now you have a running Slackware64-14.2 in an ArubaClould VPS.

Additional configuration

Since it runs under VMware hypervisor, it is useful to have the VMware-tools installed. I recommend you install the open-source version from Slackbuilds: open-vm-tools[2244].

After your install the package and start the tools, you can verify that it works properly by:

Go to “Cloud servers” → Management

Under “Actions”, select “Manage → Switch off”

This is the normal shutdown procedure initiated at the request of the hypervisor, received by open-vm-tools and performed in the guest OS to obtain a clean system shutdown.

The “Force switch off” is equivalent to pressing the power button on a physical computer.

Enjoy your Slackware VPS!

References

ArubaCloud[2245] by Aruba S.p.A. (IT) - cloud services provider.

open-vm-tools[2246] from Slackbuilds.org

Sources

Originally written by Andrei B.[2247]

howtos, slackware, VPS, virtualization, ArubaCloud, Aruba

Building A Package

This is a rough outline for building Slackware packages. Some steps may not be neccessary, some steps might be missing. Use the discussion page for side-notes such as using slacktrack[2248] (when DESTDIR fails) and other utilities like checkinstall.

The good and decent way

Configure and compile the source as you usually do:

./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc
make

Make a temporary destination directory available:

mkdir /tmp/build

Install into the temporary directory:

make install DESTDIR=/tmp/build

Now strip libs/bins within the temporary directory:

strip -s /tmp/build/usr/lib/* /tmp/build/usr/bin/*

You also want to make sure that anything in <tt>/usr/man</tt> is gzipped before you make the package:

gzip -9 /tmp/build/usr/man/man?/*.?

Create the <tt>install</tt> directory, this is where the description and install script will be stored:

cd /tmp/build
mkdir install
cd install

One-liner (for the copy & paste people):

cd /tmp/build; mkdir install; cd install

Using a text editor (or a tool[2249]), create a file called slack-desc[2250] and fill it with the following contents:

slack-desc

       |-----handy-ruler------------------------------------------------------|
appname: appname (Short description of the application)
appname:      <this line is generally left blank>
appname: Description of application  -  this description should be fairly
appname: in-depth; in other words, make it clear what the package does (and
appname: maybe include relevant links and/or instructions if there's room),
appname: but don't get too verbose.
appname: This file can have a maximum of eleven (11) lines of text preceded by
appname: the "appname: " designation.
appname:
appname: It's a good idea to include a link to the application's homepage too.
appname:

The “appname” string must *exactly* match the application name portion of the Slackware package (for example, a package titled “gaim-1.5-i486-1.tgz” must have a slack-desc file with the <appname> string of “gaim: ” rather than “Gaim: ” or “GAIM: ” or something else.

The first line must show the application name followed by a short description (enclosed in parentheses).

Create the actual package:

cd /tmp/build
makepkg ../app-version-arch-tag.tgz

(The dashes should appear as above, so if the version has a subversion like say “1.0 RC2” make sure you use 1.0_RC2 not 1.0-RC2. The arch should be something like “i486” for example. The tag should consist of the build number and your initals, e.g. 1zb for Zaphod Beeblebrox's first build, 2zb for his second build, etc. Official slackware packages have only numbers as tags.)

When prompted to recreate symbolic links, say <tt>yes</tt><br> When prompted to reset permissions, say <tt>no</tt>

Note: Using makepkg -l y -c n will give you the same behaviour as answering yes to the symlinks question, and no to the permissions question.

If all went well, you can now install the package. cd .. installpkg app-version-arch-tag.tgz

The "I don't have time" way

Fortunately, Slackware are pretty flexible too. If you don't mind much about what is the source (beware!) that you're compiling you can burn some stages and do something like this:

./configure --prefix=/usr
make install DESTDIR=$(pwd)/PACKAGE
cd $(pwd)/PACKAGE
makepkg -l y -c n ../app-version-arch-tag.tgz
installpkg ../app-version-arch-tag.tgz

Of course, you will have a package without description, (probably) uncompressed man pages and unstripped binaries.

Sources

* Original source: http://www.slackwiki.com/Building_A_Package[2251]
* Contributions by arfon[2252]

howtos, software, makepkg, package management, author slackwiki

Yet Another Kernel Compile Guide

Why and How?

A few years ago I wrote a couple of HowTos on compiling and packaging a complete kernel+modules package. Recently, I decided to look at how the stock Slackware kernel packages are built. I put this guide together from what I picked up.

There are already a few kernel compile guides around, but I haven't seen one yet that looks at using Slackware's own kernel build scripts.

A “build-all-kernels.sh” script executes all the Slackbuilds, one after the other, passing all relevant variables to them, and creating a set of packages. As you'd expect, the script needs to be run as root.

At the end of this document I have an example of a custom “setup.sh” file that can be used to set various options and then run the main build script.

The point of using a setup file is:

To save us some typing and, more importantly, to avoid typos.

To make it easier to see and change the settings we want to use.

Perhaps use different setup files to create different “recipes”.

(A recipe dictates the arch of the package set.)

The Slackware kernel build scripts can be found in the k/ source directory on any mirror of Slackware -current. This contains the 64 and 32 bit generic and huge configs, and a kernel source tarball. The 14.2 source directories have a different setup, but the scripts in -current can be used for 14.2.

There isn't a firmware build script in there so I won't be looking at making a package for that.

The build routine looks like this:

Build a package using the newest version source found

Move the package to $OUTPUT

Install the package

Loop to the next package…

At its simplest, you can mirror the k/ directory and then run the build script. This will build and install a set of kernel packages, using the newest version source archive found in the current directory. There is no need to manually set the kernel version.

We can change a few things in the build routine, such as:

The local version (explanation below.)

The number of make jobs.

The build directory.

The directory that packages are moved to on completion.

Whether the packages are installed on the build system.

Some minor tweaking of the scripts is necessary if we change the default build directory, and we may not want to clobber the existing symlinks in /boot if we are making a custom kernel.

For this example I will build packages for linux-5.0.8, with “jabberwok” as a local version, and /home/kernels/jabberwok as the output directory.

The resulting packages will be named:

kernel-generic-jabberwok-5.0.8_jabberwok-x86_64-1.txz
kernel-headers-5.0.8_jabberwok-x86-1.txz
kernel-huge-jabberwok-5.0.8_jabberwok-x86_64-1.txz
kernel-modules-jabberwok-5.0.8_jabberwok-x86_64-1.txz
kernel-source-5.0.8_jabberwok-noarch-1.txz

It's worth noting here that the kernels and modules have “jabberwok” in their names and versions, while headers and source only have it in their versions. This means that the kernels and modules are distinct and apart from the stock Slackware packages, and shouldn't affect them. I.E. a huge local version kernel will only upgrade another huge kernel with the same local version. However, the headers and source packages will upgrade the currently installed stock packages.

If you use slackpkg then the kernel-source and kernel-headers will need blacklisting to avoid being downgraded back to the stock versions.

If upgrading the stock kernels then you would also need to blacklist those for the same reason.

Assumptions:

A Slackware 14.2 or -current install with all the build tools.

Access to a slackware(64)-current/source/k/ directory.

A source tarball for the linux kernel in tar.xz or tar.gz format.

Root.

But:

This guide doesn't go into making kernel configs in any depth. Typing “make help” in the kernel source directory will show the various methods available. If you are going to stray far from the default Slackware configs then you ought to know what hardware you have, or enjoy testing random configurations and frequent reboots : - )

Build Variables

Some variables that can be used to change the behaviour of the build script:

OUTPUT:

Optional. Where the build script will move the completed packages to.
Default if unset: auto from $TMP, recipe and version. E.G.: ${TMP}/output-x86_64-${VERSION}

INSTALL_PACKAGES:

Optional. Whether to install the packages. Set this to anything other than “YES” or “” to not install the packages, which is useful when building packages to use on a different machine.
Default if not set: YES

NUMJOBS:

Optional. Number of make jobs. If make fails with this then it is run again with no jobs number set.
Default if not set: -j7

TMP:

Optional. Package build directory. If changing this then the modules Slackbuild must be adjusted (see below.)
Default if not set: /tmp

RECIPES:

Optional: The ARCH list to build for. Values can be any of x86_64, IA32_NO_SMP, IA32_SMP. Anything else will cause the build script to disown you.
Default if not set: automatic from `uname -m`

There are other variables used in the Slackbuilds but these are the most significant for our purpose.

Mirroring The Kernel Slackbuild Directory

There are a few ways of mirroring the directory - lftp, wget, or rsync if the mirror supports it.

With lftp:

lftp https://mirrors.slackware.com -e \
"mirror -v /slackware/slackware64-current/source/k"

If you don't want to download the source tarball (e.g. because you already have one ready to use) then instead do:

lftp https://mirrors.slackware.com -e \
"mirror -v -X *xz -X *sign \
/slackware/slackware64-current/source/k"

Note that I am using the -current source folder here because it contains the newest configs, and they are closest to the target kernel version.

When the mirror is created, untar the kernel source archive in k/ and cd into the source directory:

cd k
tar xf linux-5.0.8.tar.xz
cd linux-5.0.8

Creating Kernel Configs

I will make both a “generic” and “huge” config, because the build script uses those by default. If you wish to build only one of those, comment out or remove the section for the unwanted config from the main build script.

The config files have the following naming convention:

config-<type>-<version>[suffix]

Where:

<type> is “generic” or “huge”.
<version> matches the kernel source version.
[suffix] is either “.x64” or nothing.

E.G. a generic 64 bit kernel config for linux-5.0.8 would be:

config-generic-5.0.8.x64

Copy two existing configs:

cp ../kernel-configs/config-generic-4.19.36.x64 \
../kernel-configs/config-generic-5.0.8.x64
cp ../kernel-configs/config-huge-4.19.36.x64 \
../kernel-configs/config-huge-5.0.8.x64

Edit the new files and customise CONFIG_LOCALVERSION. E.G.:

CONFIG_LOCALVERSION=“-jabberwok”

Note that the preceding '-' is needed.

As noted above, setting a local version will ensure that the new kernel packages won't upgrade the currently installed stock packages, unless of course you want them to, in which case leave it empty. The kernel-headers and source packages will upgrade those though, regardless of what we do here, but if the new kernel is expected to be the main kernel then this shouldn't be a problem.

The local version will also show in `uname` output:

Linux thing 5.0.8-jabberwok #1 SMP Sun Apr 21 20:38:51 BST 2019 x86_64 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz GenuineIntel GNU/Linux

The configs need to be in a state so that they will build without prompting when the build is started. The easiest way to do this is by copying the two new configs one at a time into the kernel source directory as .config, run “make olddefconfig”, and then copy them back:

Generic:

cat ../kernel-configs/config-generic-5.0.8.x64 > .config
make olddefconfig
cat .config > ../kernel-configs/config-generic-5.0.8.x64

Huge:

cat ../kernel-configs/config-huge-5.0.8.x64 > .config
make olddefconfig
cat .config > ../kernel-configs/config-huge-5.0.8.x64

The output of both of these make commands should be:

scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#

If you get different output then something is probably wrong.

The two configs now have all of Slackware's kernel settings, and with any new settings set to their default values.

You can customise them as much as you like of course. Just use your favourite make command on them, set them up however you like, and then copy them back as I did above.

The Simplest Build

Caveat Maybe?

There is a bit of a problem in that the generic and huge kernel packages will have doinst.sh files that overwrite the symlinks in /boot, which normally point to the stock kernel, system map, and config.

If you want to keep the stock kernels untouched and usable in lilo, then the build script needs so be edited to not make those symlinks. Leaving the original symlinks in place means the stock kernel is there as a fallback in lilo if it's needed.

This will fix it:

sed -i "/ln -sf/d" kernel-generic.SlackBuild

(The generic script is also used to make the huge kernel.)

Setting The Variables

After placing the relevant configs in k/kernel-configs/ and the kernel source tarball in k/, it is only necessary to set any variables we want in the environment and then run the build script. You will want to set INSTALL_PACKAGES=NO if you don't want to install the packages as they are being built.

Examples to export $OUTPUT in the environment:

In bourne type shells (sh, bash, ksh, zsh, ash etc):

export OUTPUT=/home/kernels/jabberwok

Or alternatively:

OUTPUT=/home/kernels/jabberwok
export OUTPUT

In csh:

setenv OUTPUT /home/kernels/jabberwok

If you don't want to install the packages, use one of the above methods to export INSTALL_PACKAGES as anything other than empty or YES. E.G.:

export INSTALL_PACKAGES=NO

The Build

Then run the build script:

sh build-all-kernels.sh

Depending on the recipes, at the start you will see something like:

*************************************************
* Building kernels for recipe x86_64...
*************************************************

(Insert appropriate knuckle biting and cheek clenching here.)

And at the end:

x86_64 kernel packages done!

If something went awry, then a build log may be useful. It may be large, probably over 100,000 lines for a single recipe, but could be useful for debugging failed builds if there isn't anything immediately obvious in the terminal:

sh build-all-kernels.sh 2>&1 | tee build.log

Viewing large build logs in 'less' ought to be reasonably faster than, say, a text editor with syntax highlighting, like vim, for example.

Not Only But Also

In addition to the packages being created, we also have the kernels, system maps, and configs copied to $KERNEL_OUTPUT_DIRECTORY which is set to:

$OUTPUT/kernels/<type>$(echo ${LOCALVERSION} | tr -d -).s

Which in this example produced for generic:

ls -l /home/kernels/jabberwok/kernels/generic.s/
total 6664
-rw-r--r-- 1 root root  725466 Apr 22 04:50 System.map.gz
-rw-r--r-- 1 root root 5902624 Apr 22 04:50 bzImage
-rw-r--r-- 1 root root  186961 Apr 22 04:49 config

$LOCALVERSION is unset before creating that directory, in case you were wondering.

After the packages are built they can be installed using installpkg or upgraded using upgradepkg. A useful command to remember which deals with anything is:

upgradepkg --install-new --reinstall <package>

After installing or upgrading the generic kernel, don't forget to recreate your initrd. Lilo must also be run after upgrading, unless using grub.

A Setup Script

An example setup.sh:

#!/bin/sh

# setup script for build-all-kernels.sh

# The is an example kernel package build script.

########### SETTINGS ##########

LOCALVERSION=jabberwok
CONFIG_SUFFIX=.x64
export OUTPUT=/home/kernels/$LOCALVERSION
export INSTALL_PACKAGES=NO
#export TMP=/mnt/tmpfs
#export NUMJOBS=-j1

####### END OF SETTINGS ######

set -e

# From build-all-kernels.sh.
VERSION=$(/bin/ls -1 linux-*.tar.?z | sort -V | tail -n 1 \
| rev | cut -f 3- -d . | cut -f 1 -d - | rev)
OLD_CONFIG=$(/bin/ls -1 kernel-configs/config-generic-*${CONFIG_SUFFIX} \
| sort -V | tail -n 1 | rev | cut -f 2- -d . | cut -f 1 -d - | rev)

# Bail out if no VERSION found.
if [ -z "$VERSION" ]; then
printf "%s\n" "Error: \$VERSION is not set."
exit 1
fi

GENERIC_CONFIG=config-generic-${VERSION}${CONFIG_SUFFIX}
HUGE_CONFIG=config-huge-${VERSION}${CONFIG_SUFFIX}

# copy configs if they don't exist already for the version
if ! [ -e kernel-configs/$GENERIC_CONFIG ]; then
printf "\n%s\n" "Copying generic kernel config:"
cp -v kernel-configs/config-generic-${OLD_CONFIG}${CONFIG_SUFFIX} \
kernel-configs/$GENERIC_CONFIG
fi

if ! [ -e kernel-configs/$HUGE_CONFIG ]; then
printf "\n%s\n" "Copying huge kernel config:"
cp -v kernel-configs/config-huge-${OLD_CONFIG}${CONFIG_SUFFIX} \
kernel-configs/$HUGE_CONFIG
fi

# Use olddefconfig instead of oldconfig so make doesn't prompt us.
sed -i "s,make oldconfig,make olddefconfig,g" *SlackBuild

# Set local version.
sed -i 's/CONFIG_LOCALVERSION=.*/CONFIG_LOCALVERSION="-'$LOCALVERSION'"/' \
kernel-configs/$GENERIC_CONFIG kernel-configs/$HUGE_CONFIG

# Don't clobber the symlinks in /boot.
sed -i "/ln -sf/d" kernel-generic.SlackBuild

# ONLY if we use a custom $TMP.
# sed -i "s,/tmp/package-kernel-source/,$TMP/package-kernel-source/,g" \
# kernel-modules.SlackBuild

# Speed up find - optional tweak.
# sed -i "s,-exec chmod 644 {} \\\\;,-exec chmod 644 {} \\\\+," \
# kernel-source.SlackBuild

# Run the build script.
sh build-all-kernels.sh

In a nutshell:

Set the variables at the top of the script.

sh setup.sh

Tweaks in a nutshell:

“oldconfig” is changed to “olddefconfig”.

The local version is set in each config.

The symlinks are removed from the kernel Slackbuild.

The hard-coded /tmp path is replaced. Only needed if setting $TMP.

$VERSION is found automatically from the highest version source archive. The configs are found in a similar way. They will be created if none are found for $VERSION. If the versions aren't what you expect, you may need to remove the other files, leaving the ones you need.

If $VERSION is unset it will bail out with an error.

Lilo

When using a local version the image name would be formatted like:

/boot/vmlinuz-<type>-<local version>-<version>-<local version>

Without a local version, e.g. an upgrade to a stock kernel, it would be:

/boot/vmlinuz-<type>-<version>

However, if the /boot symlinks are created then only:

/boot/vmlinuz

This saves having to re-edit /etc/lilo.conf at every upgrade, although lilo still needs running afterwards.

Example using a local version:

image = /boot/vmlinuz-generic-jabberwok-5.0.8-jabberwok
initrd = /boot/initrd-5.0.8-jabberwok.gz
root = /dev/sda2
label = 5.0.8-jabberwok
read-only

Substitute the initrd file name for your own. I tend to name them after the specific kernel they were made for, which is helpful with more than one kernel installed.

Final Thoughts

Once a setup file is made, it is a very simple and straightforward way to build kernels in a reproducable manner. No doubt my example setup file can be improved, but it shows enough to get started.

This is the way that the kernel packages are made in Slackware -current, albeit with a few tweaks added, so it has does have a history of reliability behind it.

Link to some example scripts:

http://tty1.uk/scripts/kernel/[2253]

Consider these as works in progress, so they may be updated from time to time.

Sources

* Originally written by dive[2254]

howtos, kernel

Linux kernel options for UEFI and ELILO

The purpose of this article is to inform the user about necessary kernel options for booting from UEFI, and some info about how ELILO and perhaps other EFI bootloaders work, as this is currently difficult to find and understand online.

Required kernel options for UEFI support

The following options are required for booting a kernel from UEFI. These are already set in the stock Slackware kernels.

Booting from UEFI requires that the kernel be the same bitness as the UEFI firmware. This usually means 64-bit, with the exception of new Intel Atom System-on-Chip (2013), older (pre-2008) Apple Macs and Intel Server boards using EFI v1.10 in 32-bit mode, and some Intel Cloverfield ultrabooks. However, you can still enable 32-bit emulation in the kernel and run 32-bit programs in Linux using multilib.

Enable the block layer

Partition Types

Advanced partition selection

EFI GUID Partition support (CONFIG_EFI_PARTITION [=y])

Processor type and features

EFI runtime service support (CONFIG_EFI [=y])

EFI stub support (CONFIG_EFI_STUB [=y])

Build a relocatable kernel (CONFIG_RELOCATABLE [=y])

Device Drivers

Graphics support

Support for frame buffer devices (CONFIG_FB [=y])

EFI-based Framebuffer Support (CONFIG_FB_EFI [=y])

File systems

Miscellaneous filesystems

EFI Variable filesystem (CONFIG_EFIVAR_FS [=y])

You should DISABLE the old efivars sysfs interface found at:

Firmware Drivers

EFI (Extensible Firmware Interface) Support

EFI Variable Support via sysfs (CONFIG_EFI_VARS [=n])

as it is deprecated in favor of CONFIG_EFIVAR_FS, because it has a 1024-byte variable size limit, and because it can cause data inconsistency issues[2255]. However, if you do disable this, you will need a fork of the efibootmgr program that supports the new EFI Variable filesystem.

Using the new EFI variable filesystem

In order to use the new EFI variable filesystem interface, you need to remove the old efibootmgr program and replace it with a new one that supports the EFI variable filesystem.

Download and install: https://github.com/vathpela/efivar[2256]

Download and install: https://github.com/rhboot/efibootmgr[2257]

Run:

modprobe efivarfs
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
efibootmgr

The EFI System Partition (ESP)

In order to boot from UEFI you need to create an EFI System Partition (ESP) using gdisk or cgdisk instead of the old fdisk and cfdisk. The Slackware README_UEFI.TXT[2258] recommends a size of 100M, which is also the minimum partition size (except for 4K native drives, where it is 260M). You also need to set the partition hex code to EF00, which identifies it as the ESP.

UEFI and ELILO

During the install procedure of Slackware 14.1 or above for ELILO (the eliloconfig script), the following happens and is required for booting from UEFI using ELILO.

The EFI System Partition (ESP) is located and mounted. On a running system it is usually found already mounted at /boot/efi. This is a special FAT partition that is basically the UEFI firmware replacement of what the MBR was for BIOS. However, it can not only hold a bootloader (all the MBR was capable of), but also config files, the kernel, and other things you might want to access using the UEFI firmware.

The three items required by ELILO (and other bootloaders) are copied onto the ESP to /boot/efi/EFI/Slackware. These include:

The bootloader. In the case of ELILO it is elilo.efi

The config file. In the case of ELILO it is elilo.conf

The kernel, usually titled vmlinuz

A boot entry variable is registered in the UEFI firmware using efibootmgr. The exact command that is run is

EFIDISK=$(df  /boot/efi/ |awk 'END{printf("%s\n",$1)}')
EFI_DEVICE=$(sed 's%[0-9]\+$%%;s%\([0-9]\)p%\1%' <<< $EFIDISK)
EFI_PARTITION=$(sed 's%.*[a-z]\([0-9]\+\)$%\1%' <<< $EFIDISK)
efibootmgr -q -c -d $EFI_DEVICE -p $EFI_PARTITION -l "\\EFI\\Slackware\\elilo.efi" -L "Slackware"

so if mount outputs

/dev/sda1 on /boot/efi type vfat (rw)

EFI_DEVICE would be /dev/sda and EFI_PARTITION would be 1, each components of /dev/sda1, which is the ESP.

If for some reason you cannot register a boot entry with the UEFI firmware, you should put the bootloader at /EFI/boot/bootx64.efi. This special location allows the UEFI firmware to run the bootloader without any boot entry.

Upgrading your kernel

This task is now much easier than it used to be. All you really need to do is copy vmlinuz onto the ESP on top of the old kernel. No need to edit any configs or add any boot entries, unless you want to. Note that you can edit the config in place and ELILO will pick up the changes on next boot, no need to run any commands like with the old lilo.

Updating your UEFI firmware

As all UEFI firmware has a flashing utility built-in, it is now much easier to update the firmware. All you have to do is copy the new firmware onto the ESP and the UEFI firmware should recognize it when you go to the flashing utility menu. However, remember that flashing the firmware can still potentially brick the system, especially if it is interrupted during the flashing process.

Updating your UEFI firmware may reset your settings and prevent you from booting unless you plan ahead.

My UEFI settings were reset and I can't boot, or planning ahead to avoid surprises

This can happen either after updating the UEFI firmware or after replacing the CMOS battery. There are three main ways to fix it:

Probably the easiest and most convenient way is to use the default boot location. Note that some UEFI firmwares do NOT support the default boot location, so this will not work. However, if it does, you won't have to worry about the system not booting again. To do this you can boot into the Slackware install DVD, mount the ESP and copy the files to the following places:

elilo.efi → /EFI/boot/bootx64.efi

elilo.conf → /EFI/boot/elilo.conf

vmlinuz → /EFI/boot/vmlinuz

You can boot into the Slackware install DVD, run through the menus, and reinstall elilo.

You can download and install one of the following EFI shells to the root directory of your ESP (that is / NOT /EFI).

This version supports only UEFI version 2 and up[2259]

This version may support earlier UEFI versions[2260]

Boot into the shell and run:

bcfg boot add 0 fs0:\EFI\Slackware\elilo.efi Slackware

External Links

A comprehensive analysis of the ESP and default boot behavior.[2261]

Sources

Original author: metaschima[2262]

https://wiki.archlinux.org/index.php/UEFI[2263]

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt[2264]

eliloconfig bash script by Patrick Volkerding

howtos, author metaschima

Installing Slackware on UEFI-based hardware

Slackware setup supports UEFI installs. To get Slackware to boot on UEFI machines, bypass the LILO installation and select ELILO installation when prompted during the install.

Installing Older Slackware on UEFI-based hardware

Some modern computers have started to offer motherboards that use Unified Extensible Firmware Interface (UEFI) as a replacement for the traditional BIOS. Slackware is perfectly capable or running on such machines, albeit with the provisos that before Slackware 14.1 the official install media could not be booted via UEFI directly and no UEFI bootloader was provided as part of the official selection of packages.

If you do wish to install Slackware on a UEFI based machine it is strongly recommended that you use Slackware64 14.1 or above, thus allowing you to simply boot the official install media.

If you have a requirement for Slackware 14.0, you will need to follow one of our approaches:

Enabling legacy BIOS support

Creating your own install media and booting from this

Using another distro's install media to bootstrap the Slackware installation (this includes using modern Slackware 14.1 or above media to install Slackware 14.0)

(Note: These last two methods are unsupported!

Legacy BIOS support

The majority of new UEFI-based machines have options to simulate a traditional BIOS. This is often referred to Legacy BIOS support. If your machine supports this it should be your first choice, as once enabled you can continue to install Slackware as you have always done, using the official install media and setup instructions. How you enable this mode varies from manufacturer to manufacturer. Refer to your vendor's documentation on how to enable this mode.

Creating your own install media for older Slackware releases

The easiest way to make your own Slackware UEFI-capable install media is to create a USB boot disk. To do so you may need to use a second machine. Alternatively you can use the target machine directly if it has another OS installed that provides a GPT (GUID Partition Table) capable partitioning tool or you have UEFI-capable Live media (CD, DVD, USB, etc.) provided by another Linux distro, which includes such a utility. Suitable partitioning tools include GPT fdisk (a.k.a gdisk) and GNU parted, both of which are provided by recent versions of Slackware.

The USB disk you are going to use as install media will need to be partitioned with a GPT scheme. It will need to have a UEFI System Partition as a bare minimum. This system partition is used by UEFI to hold a UEFI-capable bootloader(s) and configuration file(s), along with one or more kernels. The system partition must use a FAT32 filesystem (or it can be HFS+ if your machine is using Apple-based hardware) and must be big enough to hold the Slackware install media's huge kernel, initrd and a boot loader. It is therefore recommended that you make the partition at least 50Mb in size (slightly less could be used but 50Mb gives you a little extra free space to work with). Of course more space will allow for a greater range of options (e.g. including additional kernels or alternative bootloaders). The system partition must be marked as such via the partitioning tool. If you use GPT fdisk this is done by using the partition type code EF00. If you are using Slackware to create this partition, formatting can be done via the mkdosfs utility.

Once the system partition has been created add a ./EFI/BOOT/ directory structure to this partition, into which you place an EFI-capable bootloader, which should be named BOOTX64.EFI if your PC is x86_64 capable. This exact naming (./EFI/BOOT/BOOTX64.EFI) is not an absolute requirement. You can use a different directory structure and name for your bootloader, however conforming to this suggestion will simplify things for you as UEFI systems consider a bootloader named in this way to be the default.

Whilst you can use any EFI-capable bootloader, it is recommend that you use Elilo. Elilo is very simple to use and configure, it is reliable and works in a similar manor to Lilo. As such it should feel familiar to most Slackware users, given that Lilo is Slackware's default bootloader. Elilo does not need to be compiled as the binaries provided by the upstream project should work directly. For example, if you plan to install Slackware64, download elilo-3.14-all.tar.gz[2265], extract elilo-3.14-x86_64.efi and place it on your system partition as ./EFI/BOOT/BOOTX64.EFI.

Into the same directory on your system partition (./EFI/BOOT) copy over the following two files from the official install media: kernels/huge.s/bzImage and isolinux/initrd.img (just the files, not their directory structures). Plus create an elilo.conf, that looks like this:

prompt
timeout=50
default=install
image=bzImage
label=install
initrd=initrd.img
append="load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s"

You should now have a USB disk that you can boot from, though you may need to configure your UEFI to consider this the first boot disk (refer to your manufacturer's documentation on how to do this) or use the EFI Shell to specify this disk and/or bootloader.

In addition to the system partition you may wish to have a second partition that holds the rest of the Slackware installation files. This can be formatted with any filesystem supported by the the huge.s kernel. This partition can be mounted after you have booted from your install media and used as a source of packages during installation. Alternatively you can insert an official Slackware CD or DVD once setup is up and running, or perform a network installation.

Bootstrap the Slackware installation environment via another distro's install media

Making your own boot media is almost always preferable but if this does not suit you for some reason, you can often use the UEFI-capable install media from another distro. The steps are as follows:

Boot the other distro's install media

Switch to a virtual terminal

Bring up the network if a connection is not already configured

Use wget or curl to fetch the initrd.img from the isolinux subdirectory of the Slackware version you wish to install, using a nearby mirror

Unpack initrd.img (using zcat and cpio) into a newly created directory (e.g. /Slackware)

Chroot into that directory (after first using mount to bind /dev, /sys and /proc from the host system and copying over /etc/resolv.conf)

Setup the $PATH and other variables needed to run the installer (by sourcing the chooted Slackware profile, i.e. “. /etc/profile”)

Note: If you use Slackware64 14.1 install media, you could opt to do a network install and select the mirror for an earlier release. Be aware however that this remains unsupported!

Tips on install when not using BIOS legacy mode

Once you have the Slackware installation environment up and running, remember to use a GUID Partition Table rather than MBR Partitioning and include a suitable system partition on the primary local hard disk. During the setup phase you should skip Lilo configuration, since you will not be using it. Instead configure your EFI-capable bootloader after setup has finished and before your first reboot. To do this mount the local system partition and setup your boot environment by adding an EFI-capable bootloader, kernel and any configuration files. If you used the above instructions for creating your own install media, simply copy over the files from your boot media to your local system partition, then adjust the local elilo.conf as follows (this assumes you placed Slackware's root partition on /dev/sda2):

prompt
timeout=50
default=huge
image=bzImage
label=huge
read-only
root=/dev/sda2

After umounting and removing the install media you should now be able to reboot into your new Slackware install (you may need to change the boot order in your UEFI again if you adjusted it previously).

Finally, after booting into Slackware remember to configure an initrd for the generic kernel and copy both over to the local system partition. A further adjustment to the elilo.conf to account for this could look something like the following (assuming a 3.2.29 kernel):

prompt
timeout=50
default=generic
image=vmlinuz-generic-3.2.29
label=generic
initrd=initrd.gz
read-only
root=/dev/sda2
image=bzImage
label=huge
read-only
root=/dev/sda2

Sources

Originally written by ruario[2266]

Further UEFI Linux booting options: http://www.rodsbooks.com/efi-bootloaders/[2267]

howtos, uefi, efi, boot, install, hardware, author ruario

Hibernation

Hibernation (also known as suspend-to-disk) is a method used to power down a computer while preserving the state of the operating system. Once powered up, the operating system will be in the exact state as it was at the time of hibernation.

In Slackware, hibernation works out-of-the-box. However, in order to resume successfully from a hibernated state, you need to configure the bootloader so it knows where to locate the resume data.

Hibernating

Desktop Environments

KDE, XFCE and other desktop environments[2268] offer hibernation from logout screen/menu.

Lightweight Window Managers

You can hibernate your system from console. Either as root via pm-utils or D-Bus with additional programs as regular user.

pm-utils

Hibernation is done via pm-hibernate command.

D-Bus

Slackware offers two services to control power management in it's recent releases. UPower and HAL. Since HAL is deprecated in Slackware 14.0, use HAL in older Slackware releases (from 12.0 to 13.37), otherwise use UPower.

Use one of these command to hibernate your system.

UPower

 $ dbus-send --system --print-reply --dest="org.freedesktop.UPower" \
/org/freedesktop/UPower org.freedesktop.UPower.Hibernate

HAL

$ dbus-send --system --print-reply --dest="org.freedesktop.Hal" \
/org/freedesktop/Hal/devices/computer org.freedesktop.Hal.Device.SystemPowerManagement.Hibernate

Bootloader configuration

Booting from LVM

LILO doesn't support booting from LVM, therefore you have to create initial ramdisk (initrd). You need one even though your kernel has build-in support for LVM.

You don't have to specially adjust lilo.conf because you can set everything resume-related in initrd.

mkinitrd -c -k <kernel-version> -f <fs_type> -m <modules_required_to_boot> -r <root_partition> -h /dev/volumegroup/swap -L

-h set your hibernation/swap logical volume

-L activate LVM

LILO configuration

Next step is to make sure your lilo.conf contains following snippet

image = /boot/vmlinuz
root = /dev/sdaX
initrd = /boot/initrd.gz
label = Slackware
read-only # Partitions should be mounted read-only

If you don't use LVM, you can simply tell kernel where to resume from by adding append line:

append="resume=/dev/sdaX"

Replace /dev/sdaX with your actual swap partition.

Afterwards, run lilo to save changes.

$ lilo

Lock your computer upon resuming

You may have noticed that when your computer resumes, there is no protection to ensure no one can use your computer. As pm-hibernate must be run as root, any user that powers up your computer will be granted a root terminal! I'll show you some tricks to ensure a proper lock of the system.

Security warning: whether you are using the trick from the command-line or from an X session, don't forget to logout from all other ttys! None of them will get locked, so people issuing CTRL+ALT+F1 (ar any Fx key) upon resuming will be able to access them, rendering the lock trick totally useless!

With pm-utils

From the command line

If you dont have an X session open, the only way to lock your computer is to logout from your session before hibernation. You can use the following command:

pm-hibernate & logout (OR pm-hibernate & exit)

It's important to logout from every tty prior to hibernation! logout will only log you out from the terminal from where you launched the command. Please read the warning in the following section.

This trick may not work on fast systems, as logout may not have enough time to complete. You may think that using ; instead of & could do the trick (as it will log out the user after resuming), but it allows the user doing a CTRL+Ctrl upon resuming, killing the logout command.

From an X session

If you want to lock the computer prior hibernation, you can issue the following command (as root of course):

# xlock & sleep 5 ; pm-hibernate

You can also create the following script:

#!/bin/bash
echo 'Hibernating in 5 seconds'
xlock &
sleep 5
pm-hibernate

xlock is a command that locks your X session. Upon rebooting, you will be asked for the root password. The sleep command may be omitted, but I think it's safer to leave it, so you are sure that xlock has enough time to run properly. You don't have to use exit (or logout) at the end of the command or the script, as it has no use concerning security. You may want to use it though to automatically close the xterm on resuming.

Security warning: this “trick” will only lock the X system! If you are logged on as root in any of the other ttys, xlock can be killed, leaving full access to the X session.
For people using init3 (no automatic X startup), remember to also logout from the tty from where you launched the X system with startx: hit CTRL+Z (to suspend the task), then bg (to resume the task in the background), then CTRL+D (or logout) to logout.

An alternate

If one is a sudoer, ie, can use sudo, then the following can also be used:

sudo /usr/sbin/pm-hibernate

Further reading

Hibernate to encrypted swap - README_CRYPT.TXT[2269]

Sources

Original source: http://www.slackwiki.com/Hibernate[2270]

Original author unknown - original submissions 1[2271],2[2272]

Otherwise rewritten[2273] by Martin Matějek[2274] (also on Slackwiki)

Hibernate trick by zithro[2275]

howtos, hardware, hibernation, power saving, author yenn, author zithro

Booting the Installation Environment from HDD

This article shows how to boot the Slackware installation environment from a hard drive instead of the usual installation media.

The Slackware installation environment is a small live Linux system with busybox, partitioning and some other useful utilities, and the setup program. It starts automatically when you boot your system from Slackware install media: CD, DVD, USB stick or PXE.

In order to boot the Slackware installation environment without creating install media you need an image of this boot environment, a suitable Linux kernel, and a boot loader.

With grub2 you can also boot from the iso file by adding it to the grub menu.

Image of the Environment

All software that you can use after booting the Slackware installation media resides in an initial ramdisk image[2276]. You can find it as /isolinux/initrd.img on any installation media or at the same location on any of the Slackware mirrors.

Linux Kernel

Slackware uses (at least now) one of its huge kernels to run the installation environment. You can find the kernel's bzImage files in sub-directories of the /kernel directory on the installation media or at the same location on any Slackware mirror.

Getting The Files

If you already have an ISO image of the Slackware install media you can mount this image with the loop option and copy the files, for example to a /boot/swsetup directory which you create yourself first.

This is how that looks for a Slackware 14.0 64-bit ISO image:

# mkdir -p /mnt/tmp /boot/swsetup
# mount -o loop /tmp/slackware64-14.0-install-dvd.iso /mnt/tmp
# cp /mnt/tmp/isolinux/initrd.img /mnt/tmp/kernel/huge.s/bzImage /boot/swsetup/
# umount /mnt/tmp

And for Slackware 14.0 32-bit:

# mkdir -p /mnt/tmp /boot/swsetup
# mount -o loop /tmp/slackware-14.0-install-dvd.iso /mnt/tmp
# cp /mnt/tmp/isolinux/initrd.img /mnt/tmp/kernel/hugesmp.s/bzImage /boot/swsetup/
# umount /mnt/tmp

You can also download the kernel and initrd image from one of the Slackware mirrors. There are some examples below.

Slackware 14.0 64-bit:

kernel: http://slackware.osuosl.org/slackware64-14.0/kernels/huge.s/bzImage[2277]

initrd: http://slackware.osuosl.org/slackware64-14.0/isolinux/initrd.img[2278]

Slackware 14.0 32-bit:

kernel: http://slackware.osuosl.org/slackware-14.0/kernels/hugesmp.s/bzImage[2279]

initrd: http://slackware.osuosl.org/slackware-14.0/isolinux/initrd.img[2280]

Boot Loader

There are many boot loaders around. Slackware uses SYSLINUX to boot from the install media, installs LILO to boot the installed system, and provides a GRUB-legacy package in /extra (32 bit only). Many distributions use GRUB (renamed from GRUB2) as their main boot loader. If you use a Linux system you probably already have a suitable one. You need to put the bzImage and initrd.img files in a suitable place and instruct the boot loader to boot them.
Note that some parameters are passed to the kernel in /isolinux/isolinux.cfg; you need them to configure your boot loader properly.

LILO

Add to /etc/lilo.conf something like:

image = /boot/swsetup/bzImage
initrd = /boot/swsetup/initrd.img
addappend = "load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s"
label = SwSetup

and run

# lilo

GRUB

Add to /boot/grub/grub.cfg something like:

menuentry 'SwSetup' {
set root='(hd0,2)'
linux /boot/swsetup/bzImage  load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
initrd /boot/swsetup/initrd.img
}

(hd0,2) means “the second partition on the first drive” (i.e. /dev/sda2). You can find the right value in the “set root” command of the menu entry used to boot your system, or else consult with GRUB manual[2281].

If you use a separate partition for /boot, then you must remove “/boot” from any pathnames.

GRUB-legacy

Add to /boot/grub/menu.lst something like:

title SwSetup
root (hd0,1)
kernel /boot/swsetup/bzImage  load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
initrd /boot/swsetup/initrd.img

(hd0,1) means the second partition (this is not a typo, GRUB-legacy numbers partitions from 0) on the first drive (i.e. /dev/sda2). You can find the right value in the “root” command in the section used to boot your system; or else consult with GRUB-legacy manual[2282].

If you use a separate partition for /boot, then you must remove “/boot” from any pathnames.

Boot ISO with GRUB2

Add to /etc/grub.d/40_custom:

menuentry "Slackware 14 install (DVD)" {
insmod loopback
insmod iso9660
set isofile="/slackware64-14.0-install-dvd.iso"
loopback loop (hd0,2)$isofile
linux (loop)/kernels/huge.s/bzImage  load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 SLACK_KERNEL=huge.s
initrd (loop)/isolinux/initrd.img
}

(hd0,2) means “the second partition on the first drive” (i.e. /dev/sda2). You can find the right value in the “set root” command of the menu entry used to boot your system, or else consult with GRUB manual[2283].

Then update grub with:

 grub-mkconfig -o /boot/grub/grub.cfg

On Slackware before running grub-mkconfig you have to run ln -s /dev/sda2 /dev/root where for sda2 you have to enter your root device.

Test It

Reboot your system and select SwSetup at boot prompt.

If you have an unused partition you can install Slackware on it right now.

Using an ISO Image as Source

If you downloaded the Slackware DVD ISO image you can use it as package source.

In the “SOURCE MEDIA SELECTION” step select “2 Install from hard drive partition”,

enter the name of the disk partition containing the ISO image file, for example /dev/sda2,

then type in the full path on that partition's filesystem to the directory with the DVD ISO image, for example /tmp/,

and agree with the prompt to use the ISO image as package source:

┌──────────────────────SOURCE MEDIA SELECTION────────────────────────┐
│ Please select the media from which to install Slackware Linux:     │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │           1  Install from a Slackware CD or DVD                │ │
│ │           2  Install from a hard drive partition               │ │
│ │           3  Install from NFS (Network File System)            │ │
│ │           4  Install from FTP/HTTP server                      │ │
│ │           5  Install from Samba share                          │ │
│ │           6  Install from a pre-mounted directory              │ │
│ └────────────────────────────────────────────────────────────────┘ │
├────────────────────────────────────────────────────────────────────┤
│                   <  OK  >          <Cancel>                       │
└────────────────────────────────────────────────────────────────────┘

┌────────────────────INSTALLING FROM HARD DISK───────────────────────┐
│ In order to install directly from the hard disk you must have a    │
│ partition (such as /dev/sda1, /dev/sdb5, etc) with the Slackware   │
│ distribution's slackware/ directory like you'd find it on the FTP  │
│ site.  It can be in another directory.  For example, if the        │
│ distribution is in /stuff/slackware/, then you have to have        │
│ directories named /stuff/slackware/a, /stuff/slackware/ap, and so  │
│ on each containing the files that would be in that directory on    │
│ the FTP site.  You may install from FAT or Linux partitions.       │
│                                                                    │
│ Please enter the partition (such as /dev/sda1) where the Slackware │
│ sources can be found, or [enter] to see a partition list:          │
│ ┌────────────────────────────────────────────────────────────────┐ │
│ │/dev/sda2                                                       │ │
│ └────────────────────────────────────────────────────────────────┘ │
├────────────────────────────────────────────────────────────────────┤
│                   <  OK  >          <Cancel>                       │
└────────────────────────────────────────────────────────────────────┘

┌───────────────────SELECT SOURCE DIRECTORY─────────────────────┐
│ Now we need to know the full path on this partition to the    │
│ slackware/ directory where the directories containing         │
│ installation files and packages to be installed are kept.     │
│ For example, if you downloaded Slackware into the /stuff      │
│ directory on your hard drive (so that you have the            │
│ directories /stuff/slackware/a, /stuff/slackware/ap, and so   │
│ on each containing the files that would be in that directory  │
│ on the FTP site), then the full path to enter here would be:  │
│                                                               │
│       /stuff/slackware                                        │
│                                                               │
│ What directory are the Slackware sources in?                  │
│ ┌───────────────────────────────────────────────────────────┐ │
│ │/tmp/                                                      │ │
│ └───────────────────────────────────────────────────────────┘ │
├───────────────────────────────────────────────────────────────┤
│                 <  OK  >         <Cancel>                     │
└───────────────────────────────────────────────────────────────┘

┌────────────────────────USE ISO IMAGE──────────────────────────┐
│                                                               │
│ An ISO image of Slackware's install DVD was found.            │
│ Do you want me to mount the ISO image and use this as the     │
│ package source?                                               │
│                                                               │
├───────────────────────────────────────────────────────────────┤
│                   < Yes >          < No  >                    │
└───────────────────────────────────────────────────────────────┘

Then continue as usual.

Slackware setup (starting with version 13.0) automatically finds an ISO image if it is named as slackwar*-install-dvd.iso.

You can also mount your image manually.

Before starting setup or later from another console (use Alt+F# to switch to a different console number “#”), execute

# mkdir /hd /iso
# mount /dev/sda2 /hd
# mount -o loop /hd/tmp/slackware64-14.0-install-dvd.iso /iso

In the “SOURCE MEDIA SELECTION” step select “6 Install from a premounted directory”,

In the next dialog window, enter the path to the directory containing the “package series”, meaning the subdirectories “a”, “ap”, …, “y”. This path would be /iso/slackware64 for a 64 bit system or /iso/slackware for 32-bit.

Then continue with the installation as usual.

Sources

Originally written by Serg Bormant[2284]

howtos, author bormant

UEFI dual or more boot using rEFInd

Machines are now coming in with the UEFI standard. It presents some advantages like the ability to boot from disks over 2TiB and flexible pre-OS environments as drivers can be loaded in the UEFI firmware. But Linux users found that, suddenly, it was more difficult to multi-boot as we used to do in the past. However, Linux users have a variety of resources and we found a way to work with the new standard. It is not as straightforward as in the past, but it is not that hard either.

rEFInd is principally a tool to manage bootloaders, i.e. a boot manager. Some advantages of using rEFInd are

Manage and boot various different EFI binaries (.efi files),

Boot Linux kernels placed on the EFI partition; so rEFInd can also be a bootloader in itself,

There might be no need to install GRUB or ELILO onto EFI partition,

A GUI screen with multiple pre-defined options to boot EFI binaries or kernels at boot,

We can potentially have an ambitious multiboot for example with Windows orMac OS X, Slackware with ELILO and Ubuntu with GRUB2.

In this article, we will have a little summary of multi-booting on UEFI machines, going over the steps to make sure installation is done properly and how we can access our Linux distro(s); then we will describe the installation of rEFInd and how to use it. We will explain configuration of rEFInd carefully, as this will define the options and behaviour of our boot manager.

Installation of Linux distros

From now on, we will assume we have a hard disk using GPT with the following configuration:

sda1 (FAT) - OEM software for security or any kind of maintainance software,

sda2 (FAT) - EFI partition

sda3 (NTFS) - Windows 10

sufficiently unallocated space

Usually, we buy a machine and it comes with a hard disk having a huge partition with Windows or another OS on it. It is kind of bad practice to keep such a hard disk layout. So, we always advise people to partition their hard disks (PC or laptops) whenever they use it for the first time, whether they will dual boot or not. We shrink our main OS partition to an appropriate size and the rest of unallocated space can have partitions for our data. In this way, the OS is not hindered as the disk fills up with our personal files, so it continues to run and read the disk at a fairly high speed. Also, this avoids the risk of losing data if the OS crashes.

It is recommended to shrink the Windows partition from inside Windows itself using its disk manager and then do the other partitions with GPartEd or gdisk/cgdisk using any Linux bootable disk. Windows is notorious for placing files anywhere on a partition; so if you need to shrink it to a smaller space than it allowed, use a trusted third party software, or Windows might crash due to missing files and then you'll have to repair the Windows installation with a repair disk.

We will now proceed with our example. We assume we used gdisk and made the following partitions:

sda4 - swap

sda5 (Linux) - to install Slackware

sda6 (Linux) - to install Ubuntu

We consider the installation of Slackware first, and then Ubuntu.

Slackware UEFI install

As from version 14.1 and onwards, Slackware64 supports EFI. It incorporates both ELILO and also an EFI-capable GRUB; you can choose between the two but ELILO is default.

ELILO

During the installation Slackware prompts you about installing ELILO to the EFI partition. If you choose to install it, a directory will be created on the EFI partition (EFI/Slackware) and the ELILO EFI binary (elilo.efi) will be placed there. The directory will also hold an elilo.conf file and a copy of the kernel image (vmlinuz). You should be able to boot into your Linux system right away.

GRUB

If ELILO was not installed then we need to initialize GRUB in order to have a bootable system. So, just after the installation process, do not reboot. We will chroot into our newly installed system right away.

Normally the newly installed system is mounted at /mnt. Use the df command to see what else is mounted and where.

→ Mount some useful filesystems (if they are not already present):

# mount -t vfat /dev/sda2 /mnt/boot/efi
# mount -t proc /proc /mnt/proc
# mount --rbind /sys /mnt/sys
# mount --rbind /dev /mnt/dev
# mount --rbind /run /mnt/run

→ chroot into newly installed system:

# chroot /mnt env -i HOME=/root TERM=$TERM PS1='\u@\h:\w# ' PATH=/usr/bin:/usr/sbin:/bin:/sbin bash --login +h

→ Then we install the GRUB bootloader on the EFI partition.

# modprobe efivars
# modprobe efivarfs
# modprobe dm-mod
# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB --recheck --debug
# mkdir -p /boot/grub/locale
# cp /usr/share/locale/en\@quot/LC_MESSAGES/grub.mo /boot/grub/locale/en.mo
# grub-mkconfig -o /boot/grub/grub.cfg

The modules efivars and efivarfs need to be loaded everytime before we use the efibootmgr command, here called by grub-install. Actually, it would have been loaded by grub-install automatically but we are mentioning this explicitly for completeness.

The grub-install command above generates lots of output. You can redirect it to a log file to check it out later. Among the last lines of the output we should observe the use of the efibootmgr command to register the EFI binary into the UEFI firmware settings. I strongly recommend reading the man pages for efibootmgr to understand the command.

One interesting thing here is that, in case Windows is installed, grub-mkconfig says it detects the Windows bootloader (bootmgfw.efi) but does not support it. So it will not be able to generate an entry for it in the grub.cfg. Then we should either put an entry manually in grub.cfg. This is something we can work around with rEFInd.

At this point we have the file EFI/GRUB/grubx64.efi and the /boot/grub tree. The grubx64.efi is registered in the firmware settings, so we can boot it. You can use the “-v” option with efibootmgr to see if everything is alright. If you need to change the order of some bootloaders, you can use the “-o” option. An example is shown below:

# efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0001,3002,0000,2001,2002
Boot0000* Slackware     HD(2,145800,82000,366fa6fd-9e79-4904-a879-fe0ef1ee349c)File(\EFI\Slackware\elilo.efi)
Boot0001* Windows Boot Manager  HD(2,145800,82000,366fa6fd-9e79-4904-a879-fe0ef1ee349c)File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot3002* Internal Hard Disk or Solid State Disk        RC
# efibootmgr -o 0000,0001,2001,2002,3002
# efibootmgr -v
BootCurrent: 0000
Timeout: 0 seconds
BootOrder: 0000,0001,2001,2002,3002
Boot0000* Slackware     HD(2,145800,82000,366fa6fd-9e79-4904-a879-fe0ef1ee349c)File(\EFI\Slackware\elilo.efi)
Boot0001* Windows Boot Manager  HD(2,145800,82000,366fa6fd-9e79-4904-a879-fe0ef1ee349c)File(\EFI\Microsoft\Boot\bootmgfw.efi)
Boot2001* EFI USB Device        RC
Boot2002* EFI DVD/CDROM RC
Boot3002* Internal Hard Disk or Solid State Disk        RC

Two more tips, in case you mess up anything ;-)

If you need to remove an entry from the list of EFI binaries, you can use the “-B” option. Let's say you want to remove EFI binary 0001:

efibootmgr -b 0001 -B

And if you need to add an EFI binary (let's say EFI/Slackware/elilo.efi) into the firmware settings:

efibootmgr -c -g -d /dev/sda -p 2 -w -L "ELILO" -l '\EFI\Slackware\elilo.efi'

Just observe that our EFI partition is /dev/sda2; that is why there are “-d /dev/sda” and “-p 2”. These two arguments tell efibootmgr that our EFI partition is the 2nd partition on the device /dev/sda.

Ubuntu

Installation of Ubuntu is fairly straightforward. We boot into the DVD/USB and proceed with installation, since partitioning has already been done. Just be careful with Ubuntu where it asks where to install it. Ubuntu will detect Windows and will ask whether we want Ubuntu alongside, thus erasing the rest. So, be sure to stay in manual mode as much as possible. Choose “Something else” when prompted about the partitions. Also, make sure it detected the EFI partition.

At the end of installation, Ubuntu will have installed its GRUB on the EFI partition in directory EFI/ubuntu and it would have run grub-mkconfig and efibootmgr.

Installing rEFInd

For Slackware users, the easiest way to get rEFInd is to look at https://slackbuilds.org/[2285]. The SlackBuilds script repackages the pre-compiled binary for Slackware. After installing the package, we must go through a last step to have refind placed on the EFI partition. As root,

# /usr/share/refind-${VERSION}/install.sh

${VERSION} should be replaced with the version. This command will normally detect the EFI partition and system architecture, and copy the necessary files. It might prompt if it did not get some information automatically.

As for Ubuntu or other Linux distros, refind is most probably part of the official package repositories. Anyway, we only need to install refind on any one distro.

rEFInd Manual Install

Actually, the good thing with refind is that it does not have to be hosted on any OS. It can as well be copied directly to the EFI partition, provided you know which files to copy. So, you can download a refind archive from https://sourceforge.net/projects/refind/[2286], and extract it. Normally, we would be using a 64-bit system, so create the directory /boot/efi/EFI/refind and copy the appropriate files there:

# mkdir /boot/efi/EFI/refind
# cp -R PATH_TO_REFIND_SOURCE/refind/drivers_x64 /boot/efi/EFI/refind/
# cp -R PATH_TO_REFIND_SOURCE/refind/icons /boot/efi/EFI/refind/
# cp -R PATH_TO_REFIND_SOURCE/refind/refind.conf-sample /boot/efi/EFI/refind/refind.conf
# cp -R PATH_TO_REFIND_SOURCE/refind/refind_x64.efi /boot/efi/EFI/refind/
# cp -R PATH_TO_REFIND_SOURCE/keys /boot/efi/EFI/refind/

But, then we have to manually register our refind EFI binary into the firmware with efibootmgr:

# efibootmgr -c -g -d /dev/sda -p 2 -w -L "rEFInd" -l '\EFI\refind\refind_x64.efi'

Again, our EFI partition is found on /dev/sda2.

Note that both ways of installing rEFInd can be done just after installation of Slackware (before rebooting). We just have to mount the necessary filesystems and chroot into the newly installed system. Then either install the refind Slackware package or manual install. There are many possibilities.

Configuring rEFInd

This is the most important part. Refind normally searches most directories on the EFI partition at boot and automatically detects all your EFI binaries or kernels, refind also scans volumes and will detect kernels, and lists them as options to boot from. But this is considered hazardous as it enables booting into Single User Mode or other recovery boot loaders. So, we will go for a manual configuration of the EFI/refind/refind.conf script for better control over the boot process.

rEFInd does not scan its own directory on the EFI partition (EFI/refind/).

If you boot into refind without modifying refind.conf, you'll see many boot entries on the start screen. We will modify refind.conf to remove much of these entries and place our custom entries there. The default refind.conf file placed by the install script at EFI/refind/ contains examples and some explanations.

Tidying up

Omit scanning volumes

We can disable the scanning of certain volumes by using the dont_scan_volumes command. We use the command with volume labels. The entry in refind.conf is

dont_scan_volumes "WINRE","Windows"

Omit scanning specific directories

We do not want refind to detect all the EFI binaries automatically, because then, we will not be able to control the number of entries. So we do not want refind to scan the directories where the EFI binaries are found. refind.conf already has the entry

dont_scan_dirs ESP:/EFI/boot,EFI/Dell,EFI/memtest86

We will add the following:

(we need to begin the list of directories with "+")
dont_scan_dirs + EFI/Boot,EFI/Microsoft,EFI/Slackware,EFI/ubuntu

Omit scanning specific files

This will ultimately avoid listing certain specific EFI binaries, since we will add a single entry for each one later.

dont_scan_files shim.efi,MokManager.efi,elilo-x86_64.efi,bootmgfw.efi,bootmgr.efi

This will prevent listing of the ELILO from the Slackware installation or from any other directory on the EFI partition. And, it will omit the Windows binaries.

Omit scanning Linux kernels

scan_all_linux_kernels false

Scan directory for drivers

Normally, drivers should be placed in the tools/ directory on the EFI partition. Some drivers are found in refind's shared directory at /usr/share/refind-${VERSION}/refind/drivers_x64/. To enable scanning of EFI/tools:

scan_driver_dirs EFI/tools

Booting EFI binaries

Let us say we have the following directory tree on the EFI partition:

EFI/
|
|_ Boot/
|     |_ bootx64.efi
|
|_ Microsoft/
|     |_ Boot/
|          |_ bootmgfw.efi
|
|_ Slackware/
|     |_ elilo.efi
|
|_ ubuntu/
|     |_ grubx64.efi
|
|_ refind/
|_ refind_x64.efi

We should add custom entries for each of the EFI binaries we want to appear in the refind menu.

→ Entry for Windows:

menuentry Windows {
icon EFI/refind/icons/os_win8.png
loader EFI/Microsoft/Boot/bootmgfw.efi
}

Note that we can choose any of the icons from the EFI/refind/icons/ directory. Later we describe the use of custom made icons.

→ Entry for Slackware:

menuentry Slackware {
icon EFI/refind/icons/os_win8.png
loader EFI/Slackware/elilo.efi
}

→ Entry for Ubuntu:

menuentry Ubuntu {
icon EFI/refind/icons/os_ubuntu.png
volume 9f5b153d-d103-4314-bc98-455fa5d0c625
loader EFI/ubuntu/grubx64.efi
}

Had to put the volume there as GRUB will have to access that volume for its configuration file.

Apple Mac

For a Mac, refind will automatically detect the EFI binary. It is most probably named “boot.efi”, so just make sure boot.efi is not in the list of files not to scan for. You might also need to place an hfs driver in the EFI/tools directory:

# cp /usr/share/refind-${VERSION}/refind/drivers_x64/hfs_x64.efi /boot/efi/EFI/tools/

Booting Kernels

The nice part of refind is that we can also use it as a boot loader. So, we do not need GRUB or ELILO. We have to place the kernel we want to boot on the EFI partition. For this part we will use an example with the following directory tree under EFI/:

EFI/
|_ Slackware14.1/
|         |_ vmlinuz-generic-3.10.104
|         |_ initrd-3.10.104.gz
|
|_ Slackware14.2/
|         |_ vmlinuz-generic-4.4.29
|         |_ initrd-4.4.29.gz
|
|_ Ubuntu16.04/
|_ vmlinuz-4.4.16-21.generic
|_ initrd.img-4.4.16-21.generic
|_ vmlinuz-4.4.0-31.generic
|_ initrd.img-4.4.0-31.generic

Note that neither Slackware nor Ubuntu place their generic kernels on the EFI partition by default. We made these directories manually and placed selected kernels there. A kernel (huge) is placed in directory EFI/Slackware only in the case where we install ELILO.

→ Entry for Slackware 14.1:

menuentry Slackware14.1_with_kernel_generic-3.10.104 {
icon EFI/refind/icons/os_slackware.png
volume cac2f895-6c8e-414c-8bc7-876519e828c0
loader EFI/Slackware14.1/vmlinuz-generic-3.10.104
options "ro root=UUID=cac2f895-6c8e-414c-8bc7-876519e828c0"
initrd EFI/Slackware14.1/initrd-3.10.104.gz
}

The label of this menuentry is used as a short description and it is displayed at the bottom of the refind menu when hovering over the icons. The volume id for a particular filesystem can be obtained by using the blkid command:

# blkid /dev/sda12
/dev/sda12: UUID="9f5b153d-d103-4314-bc98-455fa5d0c625" TYPE="ext4"

→ Entry for Slackware 14.2:

menuentry "Slackware14.2 on sda12" {
icon EFI/refind/icons/os_slackware.png
volume 9f5b153d-d103-4314-bc98-455fa5d0c625
loader EFI/Slackware14.2/vmlinuz-generic-4.4.29
initrd EFI/Slackware14.2/initrd-4.4.29.gz
submenuentry "Linux 4.4.29 generic" {
options "ro root=UUID=9f5b153d-d103-4314-bc98-455fa5d0c625"
}
submenuentry "Linux 4.4.29 generic (recovery mode)" {
options "ro root=UUID=9f5b153d-d103-4314-bc98-455fa5d0c625 single"
}
}

This time we made an entry with submenu entries so that we have the option to boot into single user mode. Also note how we quoted the label because we used spaces. In the refind menu at boot, we will need to place the selection on this icon and press F2 in order to access the options. If ENTER is pressed right away on the icon, it will boot the default, that is the first submenu entry. The refind.conf entry could be made more concise using the add_options command. Since the only difference between the two options is the parameter “single”, we can just append it to the recovery mode's entry:

menuentry "Slackware14.2 on sda12" {
icon EFI/refind/icons/os_slackware.png
volume 9f5b153d-d103-4314-bc98-455fa5d0c625
loader EFI/Slackware14.2/vmlinuz-generic-4.4.29
initrd EFI/Slackware14.2/initrd-4.4.29.gz
options "ro root=UUID=9f5b153d-d103-4314-bc98-455fa5d0c625"
submenuentry "Linux 4.4.29 generic" {
}
submenuentry "Linux 4.4.14 generic (recovery mode)" {
add_options "single"
}
}

For Slackware users: we noticed that an initrd was needed even to boot the huge kernels because certain drivers are needed. In order to boot a huge kernel without an initrd, the drivers must be loaded from an EFI shell. Many drivers were placed in EFI/tools but when refind scanned the directory, it did not load all the drivers automatically. So, it is easier to simply make an initrd to accompany every kernel.

→ Entry for Ubuntu 16.04:

menuentry "Ubuntu 16.04" {
icon EFI/refind/icons/os_ubuntu.png
volume d3c5b9fa-53d7-42df-889f-78630cb9acea
submenuentry "Linux 4.4.16-21 generic" {
loader EFI/Ubuntu16.04/vmlinuz-4.4.16-21.generic
options "ro root=UUID=d3c5b9fa-53d7-42df-889f-78630cb9acea"
initrd EFI/Ubuntu16.04/initrd.img-4.4.16-21.generic
}
submenuentry "Linux 4.4.0-31 generic" {
loader EFI/Ubuntu16.04/vmlinuz-4.4.0-31.generic
options "ro root=UUID=d3c5b9fa-53d7-42df-889f-78630cb9acea"
initrd EFI/Ubuntu16.04/initrd.img-4.4.0-31.generic
}
}

Here we used submenu entries to have options between two different kernel versions. Further submenu entries could have been added in order to have single user modes, like above, for each kernel versions.

Using a refind_linux.conf file

If we have placed a kernel on the EFI partition, like above, we can also place a file called refind_linux.conf, holding the booting options, in the same directory as the kernel. For example,

→ EFI/Slackware14.2/refind_linux.conf :

"Boot with standard options" "ro root=UUID=9f5b153d-d103-4314-bc98-455fa5d0c625"
"Boot into single-user mode" "ro root=UUID=9f5b153d-d103-4314-bc98-455fa5d0c625 single"
"Boot with minimal options"  "root=UUID=9f5b153d-d103-4314-bc98-455fa5d0c625"

→ Then the refind.conf entry for Slackware 14.2 becomes:

menuentry "Slackware14.2 on sda12" {
icon EFI/refind/icons/os_slackware.png
volume 9f5b153d-d103-4314-bc98-455fa5d0c625
loader EFI/Slackware14.2/vmlinuz-generic-4.4.29
initrd EFI/Slackware14.2/initrd-4.4.29.gz
}

The options will appear only after pressing F2 on the icon at the refind menu. ENTER on the icon will automatically boot the first set of options, i.e. “Boot with standard options”.

If we place two or more kernels in the same directory, then we need to have a separate entry like the above for each kernel. Then, the options from refind_linux.conf will be applied to each one.

Default selection and timeout

When the refind menu appears, if no keys are pressed before the timeout time, refind will boot the default selection. If it is not defined explicitly in refind.conf, refind will boot the first entry on the screen. The timeout time is set with timeout and the default is set with default_selection.

timeout 10
default_selection 2  (will boot the second entry by default after timeout)
default_selection +  (will boot the loader most recently booted)
default_selection "Slackware14.1"  (will boot Slackware 14.1)

Concerning the last option, any substring that corresponds to the loader's title or volume will work. But we have to be careful when having similar entry titles like our two Slackware's above.

Non-bootloader tools

In the refind menu, below the icons for bootloaders and kernels selection, there is a set of icons for useful tools/options, e.g. EFI shell, memtest, partitioning program, about, shutdown, reboot. We can choose which options to be visible in the menu using the showtools command:

showtools reboot,shutdown,about

Options available are:

shell : the EFI shell

memtest : memtest86 program

gdisk : partitioning software

apple_recovery

windows_recovery

mok_tool : Machine Owner Key (MOK) maintainance tool

shutdown

reboot

firmware : reboots the computer into the UEFI firmware settings

about : information about rEFInd

Modifying Appearance of rEFInd

Now that we got our boot entries sorted out, we can play around and modify the appearance of the refind menu.

Resolution

We can set the resolution manually, to make sure that the banners/background will be well scaled. The system default resolution is usually 800×600.

resolution 1920 1080

Using custom icons

As we saw above with the custom menu entries we can choose icons for each entry with the icon option. So we can make our own icons and place them in directory EFI/refind/icons/. The default type of icons is bmp or png. There are two types of icons, small ones for the non-bootloader options (e.g. shutdown, reboot, …), and large ones for the bootloaders/kernel entries. All icons are square and default sizes are 48×48 for the small icons and 128×128 for the large icons. All icons must be more than 32×32 in size. The size of icons can be set using:

large_icon 128
small_icon 48

If the icons are physically smaller, they will be stretched to match the set size.

When the cursor is moved in the refind menu, a selection background switches from icon to icon. We can create our own selection backgrounds and copy them to the EFI/refind directory and then change refind.conf:

selection_big   myselectionbig.png
selection_small myselectionsmall.png

The formats accepted are again bmp and png. png is used mostly to have support for transparency. The default sizes are 64×64 for the small one and 144×144 for the big one.

And finally, to include our icon in our menu entry:

menuentry "Bootloader title" {
icon EFI/refind/icons/mycustom_icon.png
...
...
}

Background

We can also create our own background and place it in the EFI/refind/ directory. The lines required in refind.conf are:

banner mybackground.bmp
banner_scale noscale

With noscale the image will be cropped if it is too large. The other possibility is fillscreen. Default is noscale.

Sources

Originally written by aragorn2101[2287]

More information at:

http://www.rodsbooks.com/refind/[2288]

howtos, uefi, efi, boot, slackware administration, author aragorn2101

Installing Slackware Using GPT with a BIOS motherboard

It is possible to install Slackware to a disk that uses a GUID Partition Table (GPT), even on a machine that uses BIOS (i.e. you do not need a UEFI-based machine). Using GPT allows you to install Slackware onto very large disk drives (the theoretical maximum addressable disk size is 2 ZiB). As always, partitioning should be done prior to starting the 'setup' script, however you must use a GPT aware partitioning tool, e.g. gdisk, cgdisk or parted (all of which are included with Slackware). The main sections below explain how to setup various popular boot loaders.

LILO

LILO should be configured by the installer and just work. However some people have reported issues with liloconfig not detecting GPT partitions. If you encounter this issue skip automatic LILO configuration. Then after installation is complete, enter your local Slackware install. From here, customize /etc/lilo.conf_example and save it as /etc/lilo.conf. You will need to set LILO to install to the protective MBR of your primary disk and add entries for your chosen kernel(s), in addition to any other changes you see fit. Once you have done this, issue the 'lilo' command.

Whilst LILO works well with any file system format that is compatible with the FIBMAP ioctl (required to map files to block numbers), you are likely to have issues when /boot is located on XFS, Btrfs or Nilfs2. You can avoid this by making an ext2 /boot partition or using a different bootloader.

Grub 2

If you want to use Grub 2, make sure you have a 'BIOS boot partition' (partition type EF02 in gdisk or cgdisk). This can be anywhere on disk though putting it at the start seems sensible. It is recommended that it be at least 1MiB. Skip the bootloader (LILO) section during install. After installation is complete, enter your local Slackware install. Finally, issue the following to actually install Grub 2 as your bootloader:

# grub-install --modules=part_gpt /dev/sda
# grub-mkconfig -o /boot/grub/grub.cfg

This assumes you are using the disk /dev/sda, adjust if this is not the case.

Extlinux (Syslinux)

The final alternative is to use Extlinux (part of the Syslinux package included with Slackware). It is also capable of booting a system with GPT and like LILO, it doesn't need a 'BIOS boot partition'. To use Extlinux, the partition containing /boot must be formatted to ext2, ext3, ext4, or btrfs.

Before you begin Slackware installation, set one of the partitions as the boot partition. For example, presuming that /boot was on /dev/sda, you could issue the following from the shell prompt of the install media, after partitioning is complete:

# sgdisk /dev/sda --attributes=1:set:2

You can also use sgdisk to confirm it was indeed set correctly:

# sgdisk /dev/sda --attributes=1:show
1:2:1 (legacy BIOS bootable)

During actual Slackware installation, skip the bootloader (LILO) section. After installation is complete, enter your local Slackware install. You can then install Extlinux as your bootloader as follows:

# mkdir -p /boot/extlinux
# extlinux --install /boot/extlinux
# cat /usr/share/syslinux/gptmbr.bin > /dev/sda

All of the above assumes you are using the disk /dev/sda, adjust if this is not the case.

Assuming you wanted a simple boot menu, copy menu.c32 over into /boot/extlinux/ as well:

# cp /usr/share/syslinux/menu.c32 /boot/extlinux/

Finally create a /boot/extlinux/extlinux.conf file along the following lines:

UI menu.c32
PROMPT 0
MENU TITLE Boot options
TIMEOUT 50
DEFAULT huge
LABEL huge
MENU LABEL Slackware (Huge)
KERNEL /boot/vmlinuz-huge-smp-3.10.17-smp
APPEND root=/dev/sda1 ro
LABEL generic
MENU LABEL Slackware (Generic)
KERNEL /boot/vmlinuz-generic-smp-3.10.17-smp
APPEND root=/dev/sda1 ro
INITRD /boot/initrd.gz

The assumes Slackware is installed on your /dev/sda1 partition and you are using the 3.10.17-smp kernels, adjust as needed.

Accessing the Slackware install, prior to bootloader installation

In all of the bootloader installation examples above, final installation of the bootloader is done from within the installed Slackware system. There are two ways to get into your Slackware install, prior to the installation of the bootloader. You can use chroot ('chroot /mnt') from the shell prompt provided by the install media, after you have finished the basic installation, i.e. after the message “Installation of Slackware Linux is complete”. Alternatively Slackware's install media 'boot: ' prompt includes help text explaining how to boot the installed Slackware system, rather than the install environment (i.e. at the boot prompt type something like 'hugesmp.s root=/dev/sda1 rdinit= ro').

The final example assumes Slackware is installed on your /dev/sda1 partition and you wish to boot with the hugesmp.s kernel, adjust as needed.

Sources

Originally written by ruario[2289]

LILO tips from jtsn on LQ: http://www.linuxquestions.org/questions/slackware-14/fresh-install-64-14-1-with-gpt-without-efi-in-a-bios-motherboard-4175484184/#post5062475[2290]

howtos, gpt, grub, syslinux, exlinux, boot, install, hardware, author ruario

This document is a draft proposal for a guidelines towards Slackware service files.

Slackware uses a simple BSD style init script system.

Following the Slackware philosophy, init scripts are quite simple and do not perform any kind of black magic. For example, there are no dependencies between init scripts or monitoring.

In this section we will cover the creation of a usual script. Please follow the template as much as possible for consistency with all scripts.

Style

The following guidelines applies to the init scripts.

Write pure POSIX shell scripts,

Use two spaces indents,

Put braces on their own lines,

Use CAPITALIZED global variables,

Put user controllable options at the top of the file,

Start all functions with the program name (same as file name too),

Avoid braces in variables expansions unless necessary,

Don't indent case labels.

Functions

At least, a init script should support at least *start* and *stop* arguments.

The recommended list of commands are defined as following:

start: start the script (may perform sanity checks before),

stop: stop the script gracefully,

restart: calls stop and start,

reload (optional): do some reload if applicable,

status (optional): check wether the service is running.

Return 1 from the service file if you were unable to perform the operation requested.

Message formats

For consistency purposes, use the following message formats in your scripts.

Usage

When the script is ran without arguments, use the following message.

Usage: /etc/rc.foo {start|stop}

Add all commands between braces in alphabetical order.

Command: start

It's usually preferred to show exactly what the command is started with its arguments to help debugging. Thus, please follow the following format for starting scripts:

Starting foo: /usr/bin/foo --argument --option

If the program is already running, use the following message:

foo is already running: 1234

Command: stop

The preferred format is:

Stoping foo...

Don't write any message if the service is already down.

Command: status

Use the following forms if running or not running respectively:

foo is running: 1234

foo does not seem to be running

Errors

If your script is unable to perform its operation, use the following form:

Simple error message. Aborting.

Topics

Handling pid file

If your daemon is able to store its process id from, please honor the default pid location with the init script to increase the out of the box experience.

Note that /var/run is not writable by anyone and some programs try to write the pid file after dropping privileges. If this is the case, use a dedicated subdirectory (e.g. /var/run/program/program.pid) and change permissions/owners on it.

Example, check if a process is running

PID=/var/run/$PRGNAM.pid

program_status()
{
if [ -s $PID ]; then
echo "$PRGNAM seems to be running"
fi
}

Killing the process

To kill the process, refer to the documentation of your program. It's usually safe to rely on kill -QUIT though.

Template

Example and template file for any new service. Substitute NAME and remove # NOTE: comments.

#
# run control file for NAME
#
# User options:
#
# USER: set an alternative uid (default: www)
# GROUP: set an alternative group (default: www)
#

USER=www
GROUP=www
PRGNAM=magicd
BIN=/usr/bin/prog
CONF=/etc/prog.conf
ARGS=-c $CONF -u $USER -g $GROUP
PID=/var/run/prog.pid

magicd_start()
{
if [ ! -r $CONF ]; then
echo "No configuration file available. Aborting"
exit 1
fi

if [ -s $PID ]; then
echo "$PRGNAM is already running: $(cat $PID)"
exit 1
fi

if [ -x $BIN ]; then
echo "Starting $PRGNAM: $BIN $ARGS"
fi
}

magicd_stop()
{
if [ -s $PID ]; then
kill -QUIT $(cat $PID)
fi
}

magicd_restart()
{
magicd_stop
sleep 3         # NOTE: adjust or remove if possible
magicd_start
}

magic_status()
{
if [ -s $PID ]; then
echo "$PRGNAM is running: $(cat $PID)"
else
echo "$PRGNAM does not seem to be running"
fi
}

case $1 in
restart)
magicd_restart
;;
start)
magicd_start
;;
status)
magicd_status
;;
stop)
magicd_stop
;;
*)
echo "Usage: $0 {restart|start|status|stop}"
;;
esac

howtos

(works on Slackware 14.2+, not tested on 14.1 and before)

View EFI boot menu contents

sudo efibootmgr

Will return something like:

BootCurrent: 0001
Timeout: 10 seconds
BootOrder: 0000,0001,0004,9999
Boot0000* Windows Boot Manager
Boot0001* Slackware
Boot0004* Internal Hard Disk
Boot9999* USB Drive (UEFI)

Change EFI boot order

sudo efibootmgr -o 0001,0000,0004,9999

Will return something like:

BootCurrent: 0001
Timeout: 10 seconds
BootOrder: 0001,0000,0004,9999
Boot0000* Windows Boot Manager
Boot0001* Slackware
Boot0004* Internal Hard Disk
Boot9999* USB Drive (UEFI)

Remove old EFI menu items

When you remove/replace old OS installs, the EFI boot menu retains references to them. To remove these old references:

List the current boot entries:

sudo efibootmgr

Then delete the desired entry:

sudo efibootmgr -Bb 0000

WHERE: 0000 is the menu entry number.

Sources

Originally written by arfon[2291]

UEFI, EFI, author arfon

Runit

Introduction

runit is a UNIX init scheme with service supervision. It is a cross-platform Unix init scheme with service supervision, a replacement for sysvinit, and other init schemes and supervision that are used with the traditional init. runit is compatible with djb's daemontools.

In Unix-based computer operating systems, init (short for initialization) is the first process started during booting of the computer system. Init is a daemon process that continues running until the system is shut down. Slackware comes with its own legacy init (/sbin/init) from the sysvinit package, that used to be included in almost all other major Linux distributions.

The init daemon (or its replacement) is characterised by Process ID 1 (PID 1).

To read on the benefits of runit, see here: http://smarden.org/runit/benefits.html[2292]

* Unless otherwise stated, all commands in this article are to be run by root.

Use runit with traditional init (sysvinit)

runit is not provided by Slackware, but a SlackBuild is maintained on https://slackbuilds.org/[2293]. It does not have any dependencies.

As we do not want yet to replace init with runit, run the slackbuild with CONFIG=no:

CONFIG=no ./runit.SlackBuild

Then install the resulting package and proceed as follows:

mkdir /etc/runit/ /service/
cp -a /usr/doc/runit-*/etc/2 /etc/runit/
/sbin/runsvdir-start &

Starting via rc.local

For a typical Slackware-stlyle service, you can edit /etc/rc.d/rc.local file

if [ -x /sbin/runsvdir-start ]; then
/sbin/runsvdir-start &
fi

and then edit write /etc/rc.d/rc.local_shutdown

#!/bin/sh
RUNIT=x$( /sbin/pidof runsvdir )
if [ "$RUNIT" !=  x ]; then
kill $RUNIT
fi

Then give rc.local_shutdown executive permission:

chmod +x /etc/rc.d/rc.local_shutdown

and reboot

Starting via inittab (supervised)

Remove the entries in /etc/rc.d/rc.local and /etc/rc.d/rc.local_shutdown described above.

Edit /etc/inittab

cat >>/etc/inittab <<EOT
SV:123456:respawn:/sbin/runsvdir-start
EOT

and tell init to re-read its configuration, e.g.:

init q

or reboot

How to replace init with runit

runit provides runit-init which can be used to boot up the system.

If you followed the previous chapter, then stop runsvdir and reverse all the changes that you made on your system.

So, remove the last line from /etc/inittab

rm -rf /etc/runit /service

And reboot:

shutdown -r now

Also, it is best to re-build and re-install runit

This time, when running slackbuild, do pass not any value for CONFIG, or set it to yes:

unset CONFIG
sh runit.SlackBuild

and upgrade with the resulting runit package.

Disable services that are already provided by the traditional init:

cd /service/
rm *

Create a new TTY service for runit:

cd /etc/sv/
cp -ar agetty-tty1/ agetty-tty8/
sed -i 's/tty1/tty8/g' agetty-tty8/*
ln -s /etc/sv/agetty-tty8 /service

Start runit's stage 2 for testing:

/etc/runit/2 &

And check that the agetty is running, by logging in as an unprivileged user (not as root!)

CTRL+ALT+F8

If this has been successful, then reverse the last intervention:

kill $( pidof runsvdir )
rm /service/agetty-tty8
rm -rf /etc/sv/agetty-tty8
for N in {1..6}; do
ln -s /etc/sv/agetty-tty${N} /service
done

Then, to boot in runit, reboot and enter init=/sbin/runit-init in the Lilo prompt. To do this, hit the tab key when you are presented with the Lilo menu as shown in Images 1 and 2 below.

Image 1.: Hit the Tab key on the Lilo Menu before the counter times out.

Image 2: Add init=/sbin/runit-init in the OS Selection Prompt

Confirm that runit has taken PID 1:

ps -o comm= -p 1
runit

If you do not have a multi boot system, you may append the init selection in /etc/lilo.conf

For example:

append="vt.default_utf8=0 init=/sbin/runit-init"

Then run lilo:

lilo -v

Or just replace /sbin/init with /sbin/runit-init like this:

cp /sbin/init /sbin/init.sysv
cp /sbin/runit-init /sbin/init

However, with the last alternative, be warned that if you had booted with the original init, the system may refuse to reboot, therefore boot from runit-init first.

Startup and Shutdown

The BSD style init scripts provided by Slackware are used to bring up the system.

Initially the single user script /etc/rc.d/rc.S runs. If set in the default runlevel 3, it follows it with /etc/rc.d/rc.M. In runit the initialisation script is located in /etc/runit/1 for all runlevels. By default /etc/runit/2 is restricted to the TTY services.

The script /etc/rc.d/rc.6 is the rebooting script for the traditional init, while /etc/rc.d/rc.0 (symlinked to the former) is the halting script. In runit, these scripts are called by /etc/runit/3

Note that the shutdown command provided by sysvinit package will not work in runit. To reboot you enter

/sbin/runit-init 6

and to halt enter

/sbin/runit-init 0

A convenient script is provided with the configuration files which is placed in /usr/sbin/shutdown that determines whether the system has booted with the traditional init or runit and then calls the relevant command accordingly.

The halt, reboot and poweroff commands provided by the sysvinit package would still work with runit.

Desktop Environments call /sbin/shutdown so they will not work until you move this file and symlink it to /usr/sbin/shutdown

mv /sbin/shutdown /sbin/shutdown.sysv
ln -s /usr/sbin/shutdown /sbin/shutdown

However consider that shutdown would not work for the original init.

runsv

Although runit may replace init as the PID 1 daemon, there is not much benefit unless other services are migrated from Slackware's BSD style to runsv(8). While this is not a complicated task, some familiarisation with runit's characteristics is recommended and makes the task easier. This short example should help illustrate runsv to new users.

Make an arbitrary directory under /etc/sv/

mkdir /etc/sv/example/

As a non-priviliged user (say user bob), create some directories:

mkdir -p /home/bob/runit/logs

Then edit a /home/bob/runit/service.sh script that simulates a (finicky) service in a convenient directory; say

#!/bin/bash
echo "Started service..."
for i in {1..10}
do
echo "Doing stuff..."
sleep 1
done
echo "Oh no I crashed..." >&2
exit 1

Give it executable permission:

chmod +x /home/bob/runit/service.sh

Run it to check and appreciate its execution:

/home/bob/runit/service.sh

Log in back as root and edit a file called /etc/sv/example/run and give it executable permissions:

#!/bin/sh -e
exec 2>&1
exec chpst -u bob /home/bob/runit/service.sh

chmod +x /etc/sv/example/run

Note the exec in the last line, it tells the shell that interprets the script to replace itself with the service daemon

Naturally edit as necessary.

Create another directory:

mkdir /etc/sv/example/log/

and edit another file under it, also called /etc/sv/example/log/run

#!/bin/sh
exec chpst -u bob svlogd -tt /home/bob/runit/logs

Give it executable permission:

chmod +x /etc/sv/example/log/run

Run the service to ensure that it works:

/etc/sv/example/run

Finally, we are ready to deploy the service. Create a symbolic link in /service to our staging location.

ln -s /etc/sv/example /service

Watch how your “service” works, crashes, but it is recovered by runit:

As your non-privilged user:

tail -f /home/bob/runit/logs/current

Hit CTRL+C to exit.

Finally, login back as root and let bob take the ownership of the whole /etc/sv/example/ directory:

chown -R bob.users /etc/sv/example/

Now bob can manage this service with the sv command. Note that in most cases, services should belong to root, and only to root.

Managing Services with sv

To see the status of a supervised service use sv s <service_name>, for example,

sv s example

returns

run: example: (pid 42) 1587s

To see the status of all services, use

sv s /service/*

Stop/Start/Restart

Start a service

sv u example

Stop a service

sv d example

Restart a service

sv t example

Each of these is a shortcut, for 'up', 'down', and 'terminate', respectively. Only the first letter of each word is recognised.

More verbose forms of the above:

sv start example
sv stop example
sv restart example

Each of these will also return the status of the service upon exit.

Enabling a service

Service directories are placed under /etc/sv/. To enable a service in the current runlevel, create a symlink from it to /service.

ln -s /etc/sv/example /service/

Once a service is linked it will always start on boot and restart if it stops (unless this is disabled).

Disabling a service

To disable a service in the current runlevel remove the symlink to its service directory from /service.

rm /service/example

Removing the symlink will also stop the service.

Check out the sv man page to see additional options.

man sv

If you do not want a service to start upon bootup, or when enabled, just touch an empty file called down in the appropriate service directory.

touch /etc/sv/service/down

Dependencies

Dependencies of service are supported by starting the dependent run script as follows:

#!/bin/sh
sv start dependent-service || exit 1
.
.
exec ...

Runlevels

If you installed the slackbuild configuration files, you have two runlevels: default and single. The current runlevel is default. You can verify by looking under /etc/runit/runsvdir/, you will see that /etc/runit/runsvdir/current is a symbolic link /etc/runit/runsvdir/default/.

Change runlevel to another runlevel; single:

runsvchdir single

You will see that /etc/runit/runsvdir/current is now symlinked to /etc/runit/runsvdir/single and /etc/runit/runsvdir/previous is symlinked to /etc/runsvdir/default. If you reboot, you will boot again on the default runlevel as you have this entry in /etc/runit/2

runsvchdir default >/dev/null

You can create any other runlevel and name them as you like. To start, you can copy an existing runlevel directory and modify as you wish.

cp -ar /etc/runit/runsvdir/default /etc/runit/runsvdir/custom/

You can edit the runsvdir line of /etc/runit/2 to your requirements.

Run scripts

Only one executable can be called for a service (the last line) and it must be called by the exec command. There are some generic runit run scripts on the Internet and on other Linux distributions. Also, other Slackers may post them on publicly available repositories. The author of this article has placed his here: https://gitlab.com/chrisabela/runit_scripts_for_slackware[2294]

Another set of installable run scripts are available at SBo[2295].

In direct contrast to Slackware's BSD style service scripts, runit run scripts must not must run in the foreground, otherwise runit would think that they have crashed and restart them.

For some services, this may not be possible, but there are workarounds. You can forcefully terminate them by ending the run script like this:

sv d service_name

Or you can use the pause command to keep the service alive. pause is a trivial command that will simply not exit, until it is killed (akin to tail -f /dev/null). A SlackBuild for pause is available at SBo[2296]. Then end the run script with:

exec chpst -b service_name pause

Migrating Services

It is suggested that services are migrated from stage 2 (which are still under the Slackware's BSD init scheme) to stage 3 carefully. Start from the bottom of /etc/rc.d/rc.M and work up. This means that you should start with any entries under /etc/rc.d/rc.local

Then continue for /etc/rc.d/rc.S

Proceed with other services to benefit's from runit features. Note that for some services, such as atd and crond, you would need to edit /etc/rc.d/rc.M as they are hard-coded.

Let's take the popular NetworkManager service as an example. According to the permission of /etc/rc.d/rc.networkmanager this script is called by /etc/rc.d/rc.M The latter is called by /etc/runit/2 (stage 2).

Stop the service:

/etc/rc.d/rc.networkmanager stop

Disable it:

chmod -x /etc/rc.d/rc.networkmanager

Create a suitable directory for runit

mkdir /etc/sv/networkmanager/

Write a runit run script: /etc/sv/networkmanager/run

#!/bin/sh
prefix=/usr
exec_prefix=/usr
sbindir=${exec_prefix}/sbin
NETWORKMANAGER_BIN=${sbindir}/NetworkManager
export XDG_CACHE_HOME=/root/.cache
exec $NETWORKMANAGER_BIN -n > /dev/null 2>&1

Symlink the /etc/sv/networkmanager directory to /service to enable under current runlevel and it will start in a few seconds:

ln -s /etc/sv/networkmanager /service

If run exits and /etc/sv/<service name>/finish exists (typically when the service is switched off), runsv runs finish if it has executable permission.

It is stuggested to let udev under runit's stage 2, but you can setup its monitoring for stage 3.

Using runit-init with other init scripts

OpenRC

Here runit-init is used for booting, which then transfers control to the OpenRC for things like mounting the filesystem, loading modules, running udev, etc.

It requires a working OpenRC system. Check the openrc[2297] page for instructions. The level 1 runit service uses the OpenRC boot and sysinit runlevels.

The gentoo wiki[2298] has more information, and runit-init-openrc[2299] details how to install and set it up.

void-runit

Here the scripts provided by the void-runit[2300] project are used to mount the filesystem, load modules, etc.

Currently this is the most independent way to setup runit.

Sources

http://smarden.org/runit/[2301]

https://en.wikipedia.org/wiki/Init[2302]

https://voidlinux.org/usage/runit/[2303]

https://www.youtube.com/watch?v=jiBlIhFxNJo[2304]

http://kchard.github.io/runit-quickstart/[2305]

https://www.slackbook.org/beta/[2306]

https://gitlab.com/chrisabela/runit_scripts_for_slackware[2307]

https://github.com/aadityabagga/runit-services[2308]

https://wiki.gentoo.org/wiki/Runit[2309]

https://github.com/void-linux/void-runit[2310]

Written for Slackware 14.2 in December 2018

Originally written by Chris Abela[2311]

init, runit

Upgrading Slackware to a New Release

Upgrade or Install from Scratch

Installing Slackware fresh and from scratch is always the best method if you are running a fairly old release of Slackware and want to skip a few releases. Too many intrusive changes to the distro will have occurred if your Slackware is relatively old. It will make a manual upgrade process painful and will not guarantee success.
It is better in such cases to make a backup of your package list (“ls -lart /var/log/packages”), a backup of your “/etc” directory and (you did this already of course) a backup of your personal data. Formatting your disk and installing from the Slackware boot medium, and an hour later you could already be back in business.

If you want to upgrade to the next Slackware release, you can do this manually by following the instructions in the file “UPGRADE.TXT” which you will find in the root of the Slackware DVD/CD1. Advanced instructions and further hints can be found in “CHANGES_AND_HINTS.TXT” in the same location. There is also a semi-automated procedure for this type of upgrade, using slackpkg[2312]. It will take away a lot of the hard labour from you.
I always use slackpkg (with care) to upgrade my Slackware systems from one stable release to the next. I call this process a “system upgrade”.
You can use the same procedure to migrate to slackware-current, keep a slackware-current system up to date, or upgrade from a slackware-not-so-current to a freshly released stable version.

Considerations about the Kernel

Just running slackpkg and hoping for the best is not going to work. Some considerations have to be cared for. One important thing to remember:

Never upgrade your working kernel.

Why is that? Simple - you will be upgrading potentially hundreds of packages and should be prepared for the unlikely event that your computer does not work properly anymore after a system upgrade. One thing you don't want to get hit by is a system which does not boot at all. A new Slackware release may install a kernel that refuses to boot your computer (small chance but nevertheless… be prepared). For that reason, you need to keep your “old” working kernel installed, and keep a section for it in your /etc/lilo.conf file. That way, if the new kernel fails to boot, you can fall-back to the old kernel and start investigating what went wrong.
Basically, these are the same precautions you must take when you are compiling a new kernel[2313] yourself.

Video driver considerations

If your computer is equipped with a video card powered by an Nvidia[2314] or Ati[2315] graphics processor and you have installed these companies' accelerated graphics drivers (closed-source and binary-only), you should not attempt start an X session after upgrading to the next Slackware release.
These drivers depend on kernel version, Mesa version and the X.Org server. You must re-install the binary driver before starting graphical mode. Also, the mesa and xorg-server packages of Slackware overwrite essential files of these closed-source accelerated graphics drivers anyway.

If you want to know how to deal with these binary drivers, we have more detailed instructions in the “Proprietary Graphics Drivers[2316]” article on this Wiki.

Slackpkg considerations

If you upgrade Slackware (see below for the procedure), you will upgrade slackpkg[2317] as one of the first steps. The upgradepkg command will install a file /etc/slackpkg/mirrors.new. This is the file which contains the URLs for mirrors carrying the new Slackware release. You will have to compare this to the original version and merge the contents.

Be sure to have exactly one line uncommented which points to a mirror for the desired Slackware release version and architecture.

System Upgrade using SlackPkg

The following steps should work for all situations:

Blacklist[2318] the following kernel packages in “/etc/slackpkg/blacklist”:

kernel-generic
kernel-generic-smp
kernel-huge
kernel-huge-smp
kernel-modules
kernel-modules-smp

This will prevent an accidental upgrade of your working kernel.

Blacklist packages from 3rd party repositories by adding appropriate lines for their repo tags. Examples for SlackBuilds.org, AlienBOB and multilib:

[0-9]+_SBo
[0-9]+alien
[0-9]+compat32

If new kernel(s) have been added to the Slackware release you are upgrading to, then use “installpkg” to install those new kernel packages first (do not use “upgradepkg” because that will wipe your existing kernel).
You will have to install at least one kernel (kernel-generic, kernel-generic-smp, kernel-huge, or kernel-huge-smp) and the corresponding kernel modules package (kernel-modules or kernel-modules-smp).
You can not use slackpkg for this step.

Now that we have the new kernel(s) plus modules in place, we can start upgrading the rest of the packages. First, update the slackpkg package database:

# slackpkg update

When slackpkg has updated its internal database, the first thing to do is to upgrade slackpkg itself to the latest version (including the URL's for the new Slackware release and any package upgrade rules that apply to the new release). If you fail to perform this step, slackpkg will upgrade itself in the middle of the system upgrade, and abort immediately after that…

# slackpkg upgrade slackpkg
# slackpkg new-config

That final new-config command is there so that you can view the difference betweeen your old and the new slackpkg configuration files, in particular /etc/slackpkg/mirrors and /etc/slackpkg/blacklist are files you have to check. Overwriting /etc/slackpkg/slackpkg.conf is usually recommended.

A new Slackware release usually has a newer version of the GNU C libraries. The new packages are compiled against that new glibc version. In order to prevent an upgrade failure, you need to upgrade the glibc-solibs package manually, immediately after upgrading slackpkg:

# slackpkg upgrade glibc-solibs

Let me give an example of such potential failure: when slackpkg install-new installs the libusb-compat package, your gpg command stops working because it links against libusb.so which will be overwritten with the version from the new libusb-compat package. The new library needs the new glibc package, gpg stops working because of the library linking error, and slackpkg will stop the system upgrade because it wants to check every package's gpg signature before upgrading it. Upgrading the glibc-solibs package prevents the library linking errors by providing the correct “GLIBC” symbols.

Let slackpkg update the computer to the new Slackware release:

# slackpkg install-new
# slackpkg upgrade-all
# slackpkg clean-system

The first of those three commands (slackpkg install-new) will install every package which is marked in the Slackware ChangeLog.txt file with the string “Added.” This command will not install any other packages which are not yet installed.
For instance if you did not have KDE installed before, the “slackpkg install-new” command will not add KDE packages to your computer all of a sudden.

The second command (slackpkg upgrade-all) will compare every official Slackware package which you currently have installed, with the package list on your Slackware mirror. If a different version is available, that version will be (downloaded and) upgraded. ³⁷⁾

The third commmand (slackpkg clean-system) will show you an overview of all packages that you currently have installed and are not part of the Slackware Linux release you are upgrading to. This means, the list will show all packages which has been removed from Slackware. Examples for Slackware 14 are kdeaccessibility, kdebase, … Another example of such abandoned package in Slackware 14 is ntfsprogs. Actually this package was not removed but renamed… for Slackware that is equal to a package removal plus addition.
The command will also show you every 3rd party package which you have installed! Use this command wisely: you must de-select every package which you want to keep (i.e. all 3rd party packages) and then click “OK” to let slackpkg remove all obsolete packages.

A massive upgrade like this will have installed several “.new” files. Some packages contain configuration files which have been renamed (inside the package) with a “.new” extension so that an existing configuration file (containing your customizations) will not be recklessly overwritten during the upgrade. Slackpkg will do a check for the existence of these “.new” files at the end of an upgrade or install and prompt you to do something with them.
You are advised to upgrade to the new versions of configuration files where possible, because they will often bring improvements to your software configuration. Slackpkg allows you to view the differences between old and new files and even, to merge the two files. Alternatively you can decide to keep the “.new” file, leaving the old file in place, so that you can investigate the differences at a later time if these are too intrusive.
You can force a check on “.new” files at any time, by running the command

  * # slackpkg new-config

and using the easy user interface of slackpkg to merge the changes.

You should probably decide at this moment to use a generic kernel, especially if you are using LVM or RAID, or installed Slackware to a LUKS-encrypted disk. This is also being recommended in the Slackware README on the DVD/CD. On the other hand - if your system setup is straight-forward and your hardware is fairly new, you could decide to stick with a “huge” kernel.
Remember that you cannot use an initial ramdisk in combination with a “huge” kernel, but you have to create a new initial ramdisk if you are going to use a generic kernel!
If you are uncertain at this point how that must be accomplished, then you should make sure that you are booting a “huge” kernel which won't require an initial ramdisk.
However, the “mkinitrd_command_generator.sh” script can help you here. Run this script with the new kernel version as a parameter and it will show you an example “mkinitrd” command which will work for your particular hardware setup and system configuration:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -k 3.2.29

will give this as output (the kernel version 3.2.29 is that of Slackware 14)

#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz

You can copy and paste this command line in your console, and let it create an initial ramdisk for you.

If you were already running a generic kernel and therefore already have an initrd, we strongly advise you to create a new initrd with a new unique name! For instance, you can copy the above example and modify the name of the initrd file as follows:

mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd_3.2.29.gz

After you decided what kernel you are going to use and have created an initial ramdisk, you must update your “/etc/lilo.conf” file with a section for the new kernel (don't remove your running kernel!). The “mkinitrd_command_generator.sh” script can help you finding the right block to append to /etc/lilo.conf. For instance, the command:

# /usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-3.2.29

will result in the following output which you can copy/paste:

# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 3.2.29 -f ext4 -r /dev/sdb2 -m usb-storage:pcmcia_core:pcmcia:mmc_core:ssb:modprobe:usbhid:ehci-hcd:ohci-hcd:mbcache:jbd2:ext4 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-3.2.29
initrd = /boot/initrd.gz
root = /dev/sdb2
label = 3.2.29
read-only
# Linux bootable partition config ends

Note that this command adds a “initrd” line to the kernel section. If you let mkinitrd create a unique name for your initial ramdisk, then be sure to apply that name in the above section.
The “initrd” line is not needed if you are going to run a “huge” kernel.

Finally, run the “lilo” command to make the change permanent and add the new kernel to the lilo boot menu. You can just run “eliloconfig” if you are using EFI after upgrading Slackware and that will itself install the latest kernel on the EFI partition.
Remember, you should always be able to boot back into a previous kernel in case the new Slackware kernel gives you a hard time.

Bottom-line: you can trust slackpkg to perform a system upgrade safely, but it will need your brains and care.

Multilib considerations

If you are upgrading a multilib 64-bit Slackware computer, there are additional considerations to make.

A multilib installation means that you have replaced Slackware's 64-bit gcc and glibc packages with multilib versions (ie.e. supporting both 32-bit and 64-bit binaries). Also, you have installed a set of “converted” 32-bit Slackware packages on your 64-bit multilib Slackware. These modifications are all needed to allow you to run and compile 32-bit software.

When upgrading such a system, you must of course upgrade the standard Slackware packages, but separately you must upgrade the multilib-specific packages with new versions which you can obtain from http://slackware.com/~alien/multilib/[2319]

First (if you use slackpkg), you must blacklist all these multilib packages so that they will not be accidentally replaced or removed during a system upgrade. If you don't blacklist them, you will face a lot of manual de-selections in “slackpkg clean-system”.
Starting with the release of compat32-tools[2320] for Slackware 14.0 you can simply add two lines to the /etc/slackpkg/blacklist file:

[0-9]+alien
[0-9]+compat32

Then you will manually have to download and upgrade the multilib packages. In the below example I will use Slackware 14.0 as the release to which you will be upgrading.

Download the multilib packages suitable for your new Slackware release from a mirror, like this:

# rsync -av rsync://taper.alienbase.nl/mirrors/people/alien/multilib/14.0/ multilib-14.0/

This command will create a new subdirectory “multilib-14.0” in your current directory with all packages inside

install/upgrade the existing gcc and glibc packages, and compat32-tools:

# cd multilib-14.0
# upgradepkg --install-new *.t?z

Upgrade the set of converted 32-bit Slackware packages (often referredto as the “compat32” packages):

# upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z

Alternatively you can run the “massconvert32.sh” script which will have been installed as part of the compat32-tools package. Pass it a 32-bit Slackware package directory (or a 32-bit Slackware mirror URL) as parameter and that will create a set of converted “compat32” packages which you can then install. You would only have to do this if you suspect that the content of the “slackware64-compat32” directory is not up to date.

Java considerations

Slackware used to install a Java Run-time Engine prior to the 14.0 release (the JRE binaries were originally Sun's and later distributed by Oracle after it bought Sun).
But Oracle changed the re-distribution license so that Slackware (just like all other distributions) was no longer permitted to ship these Java binaries as part of the distribution. When you perform a system upgrade to Slackware 14.0, an old version of the JRE will stay behind on your system. This version “6u25” has several critical vulnerabilities and you should remove it manually from your computer as fast as possible, using the command

removepkg jre

If you need Java then please have a look in the “/extra/source/java” directory of the Slackware 14 release. You will find a script there to create a Slackware package from the most recent Java software from Oracle, which you can then install using the “installpkg” command. See also our Wiki article “Java in Slackware[2321]”

Sources

Originally written by Eric Hameleers[2322]

howtos, slackpkg, author alienbob

³⁷⁾

Slackware's package manager does not work with the concept of “lower version” and “higher version”. The package tools only look at “different version” and thus downgrading packages (reverting to an earlier version) is just as easy as upgrading to a newer version!

Building a Linux Kernel from Source

This is how I build my 2.6 kernels.
It will apply almost completely to the 3.x kernels in Slackware 14 and onwards.

X and su

I run the commands from an X terminal, and at some point start the X based kernel configurator. I run my desktop as “myself” but I build my kernels as root. In order to let root use my X display, I do the following in my X terminal: get root rights; merge my own (alien's) Xauthority file with the one from the root user, and set the DISPLAY variable. After doing that, I can run X applications from the “su” terminal.

echo $DISPLAY                  # you'll be needing this value 3 lines below
sudo -i                        # or "su -" on older Slackware
xauth merge ~alien/.Xauthority # use your own username here instead of "alien"
export DISPLAY=:0.0            # use the value of DISPLAY you've seen 3 lines before

Alternatively, you can run the following two commands which will give you the same end result:

sudo -s                        # a side effect of '-s' is that it allows root to run X programs
. /etc/profile                 # sourcing the global profile ensures
# that root has the ''sbin'' directories in the $PATH

Downloading and configuring

Now that the build environment is set up, let us continue with obtaining the sources.

Download a new kernel, unpack it into /usr/src and create the “linux” link so that the commands are a little more generic. I will take a kernel version of “2.6.37.6” as an example. If yours is a different version, you'll know where to change the version strings in the rest of the story below. If you want to know how to verify the integrity of the source code archive using the kernel GPG key, read the last chapter below.

wget http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.6.tar.bz2
tar -C /usr/src -jxvf linux-2.6.37.6.tar.bz2
cd /usr/src
rm linux                     # remove the existing symlink
ln -s linux-2.6.37.6 linux   # create a symlink pointing to your new linux source

Changing the “linux” symbolic link is safe to do. No applications will break if you let it point to another kernel than the one Slackware installed for you. You will probably notice more linux-* directories in /usr/src. It is common to let the “linux” link point to the kernel you are currently working with. It is however no requirement to have this symbolic link. Modern software that needs to know the location of the source code of an installed kernel will look at where the symbolic link /lib/modules/<kernelversion>/build points to instead.

There is a debate whether you should build your kernels in the /usr/src tree or somewhere entirely else.
The cause is an old post by Linus Torvalds[2323] (from July 2000) where he advises people to build from within their home directory. I believe this advice is irrelevant for Slackware and the way it has its kernel headers and glibc package setup. So, my advice is to ignore this old post by Linus and install your kernel sources into /usr/src if you want. The kernel building location is purely a matter of personal preference.

Now, get a Slackware kernel config file for a head start during your own configuring. Pat's config files are pretty generic. By the time you read this, there might be a config for a newer 2.6 release available:

wget http://slackware.mirrors.tds.net/pub/slackware/slackware-13.37/source/k/config-generic-smp-2.6.37.6-smp
cp config-generic-smp-2.6.37.6-smp /usr/src/linux/.config

Alternatively, you can grab the configuration for the kernel which is currently running:

zcat /proc/config.gz > /usr/src/linux/.config

Run make oldconfig in the kernel source directory so that the defaults are used from the .config file you just installed. Because your kernel sources are probably newer than the .config, there will be new options to choose from. You will only have to answer these (press ENTER for the default answers which are mostly fine, or M to build new drivers as modules).

cd /usr/src/linux
make oldconfig

You now have configured a pretty generic kernel (that is the reason why Pat calls them “kernel-generic” probably but you will want to change some of the defaults to suit your needs. Run the X based configurator (if you do not run X but are at a text console, just run “make menuconfig” to get the curses-based dialog program instead)

make xconfig

Walk through the forest of options. What I usually change (this is for Slackware 13.37 and older) are things like:

Build the ext3 and ext4 (needs the jbd driver as well) and reiser/xfs/jfs fileystem drivers into the kernel instead of compiling them as modules - that way I do not need to create an additional “initrd“
(see under “Filesystems” in the configurator).

Enable 64GB of RAM.
(under “Processor type and features” > “High Memory Support (64GB)”). Use this if you have a system with 4GB of RAM or more.

Enable the “low-latency” kernel if you run a desktop/laptop computer - multimedia apps will run much smoother
(under “Processor type and features” > “Preemption model” > “Preemptible kernel”). If you run a desktop system with a lot of multimedia applications, then this is an useful option for you because it will keep your system more responsive even under high load.

Set a 1000 Hz timer (under “Processor type and features” > “Timer Frequency” > “1000 Hz”). A higher tick count can be beneficial to multimedia 'desktop' systems.

Or set a tickless timer (dynamic ticks - under “Processor type and features” > “Tickless System (Dynamic Ticks)”).

If you are (re-)building a Slackware kernel, you should make sure that installing your new kernel will leave the original kernel modules intact. You do this by changing the local-version part of the kernel's release number to an unique string (under “General setup” > “Local version - append to kernel release”). This kernel option corresponds to CONFIG_LOCALVERSION in your .config file. Slackware sets that value to ”-smp” for a SMP kernel to give you an idea.
The resulting kernel release value (as returned by “umake -r”) for a kernel version “2.6.37.6” with a local-version of “-alien” would be “2.6.37.6-alien”

… and more I can't think of right now. You can decide to disable a lot of the modules that the default config will build, to cut down on compilation time, if you don't have the hardware in your computer. You could also look at software suspend and CPU frequency scaling (under “Processor type and features”) if you own a laptop.

And finally save your configuration if you're satisfied.

Building your kernel

Now, start the build of kernel and modules, and install them to the proper places.

make bzImage modules            # compile the kernel and the modules
make modules_install            # installs the modules to /lib/modules/<kernelversion>
cp arch/x86/boot/bzImage /boot/vmlinuz-custom-2.6.37.6  # copy the new kernel file
cp System.map /boot/System.map-custom-2.6.37.6          # copy the System.map (optional)
cp .config /boot/config-custom-2.6.37.6                 # backup copy of your kernel config
cd /boot
rm System.map                                           # delete the old link
ln -s System.map-custom-2.6.37.6 System.map              # create a new link

With 2.6.x kernels, running “make” or “make all” instead of “make bzImage modules” should be sufficient. This will build the default targets, being vmlinux (the uncompressed kernel), bzImage (the compressed kernel which we will be using) and modules (all of the kernel modules). Since we do not need the uncompressed kernel I usually stick to the “make bzImage modules” command.
If you want to know more about the available make targets, you can run “make help” and examine the output. The default build targets are marked by an asterisk (*).

Modifying lilo.conf

Edit /etc/lilo.conf and add a new section for your new kernel. Remember, your new kernel may not even boot if you made a mistake somewhere, so you will want to leave the existing sections for your current kernel(s) intact. Your current /etc/lilo.conf will have a section somewhat like this, near the bottom of the file:

image = /boot/vmlinuz
root = /dev/sda1
label = linux
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

Add another section just below (adding it below will guarantee that your current - working - kernel will stay the default to boot):

image = /boot/vmlinuz-custom-2.6.37.6
root = /dev/sda1
label = newkernel
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

After you have added a section for your new kernel to /etc/lilo.conf you should save the file, and then run lilo to activate your changes:

lilo

Now is the time for a reboot, and test that new kernel! When the lilo boot screen appears, select the “newkernel” option instead of the default “linux” option.
If your new kernel boots fine, you can make it the default kernel by adding the following line to the top of /etc/lilo.conf and re-run “lilo”:

default = newkernel

Slackware kernel-headers package

You are going to build and use a new kernel. You may wonder what you need to do with the Slackware kernel-headers package.
The answer is: do not remove this package!

There are two places where you will find kernel headers; one place is inside the kernel source directory (in our case, the /usr/src/linux-2.6.37.6 directory) and the other place is /usr/include/linux. The kernel-headers package usually contains the headers taken from the source of the default Slackware kernel. These particular headers are used when the glibc package is built. The fact that the kernel-headers package installs these files to /usr/include/linux makes them independent of the header files you find in the kernel source directory.

As long as you do not upgrade your glibc package, you should not upgrade or remove the kernel-headers package.

How do the kernel-headers and glibc packages relate?
At some point in time you will want to upgrade (recompile!) parts of your system's software. If that software links against glibc (as most core software does), it's successful compilation relies on the presence of the correct kernel headers in /usr/include/linux. It does not matter that you are propably running an entirely different kernel than Slackware's default kernel. The kernel-headers package reflects the state of the system at the time glibc was built. If you delete the kernel-headers package, your running system will in no way be affected, but you will not be able to (re-)compile most software.

Do the kernel sources still serve a purpose after you have built your new kernel?
In the previous bullet point I told you that the compilation of system software uses the headers located in /usr/include/linux. Likewise, the kernel source tree is required any time you want to compile a 3rd-party kernel module (madwifi, linux-uvc, ndiswrapper, … the list is endless). You are not limited to compiling a driver for your running kernel. You can build drivers for any kernel as long as its modules tree (below /lib/modules) and sources are present.
Let's say you are going to build a module for a kernel whose version you have specified in an environment variable $KVER. For instance, by running

export KVER=2.6.38.2

During the driver's compilation you will need to have this particular kernel's header files available in the location /lib/modules/$KVER/build/include/linux. The symbolic link /lib/modules/$KVER/build is created at the time when you install your new kernel and modules.
If you delete the kernel sources after you build a kernel, you will not be able to build any “out-of-kernel” (other word for 3rd-party) drivers afterwards.

Other packages that contain kernel modules

Most certainly you will have installed one or more packages containing kernel modules that are not part of the default kernel. Slackware installs the “svgalib-helper” package for instance, and if you installed any wireless driver, these are basically kernel modules too.
Be aware that by installing and booting into your new kernel, you will no longer have these out-of-kernel modules available. You have to recompile their sources so that the resulting kernel modules match the version of your new kernel.
You can get an overview of all packages that have installed a kernel module for your current kernel by running this command (note that you must run this command while still running your old kernel):

cd /var/log/packages
grep -l "lib/modules/$(uname -r)" *

All the listed packages will need a recompile if you want to have their modules available for your new kernel as well.

If you rebuild a package containing a kernel module, use installpkg rather than upgradepkg to install this new package without removing the original version.
If you used upgradepkg this would remove the old kernel module and you may still need this if you ever want to reboot into your old kernel. This trick works under the assumption that the version of the kernel is part of the VERSION of your package, like here: svgalib_helper-1.9.25_2.6.37.6-i486-1.txz (I know, lame example since this package no longer exists)

The method described above will leave you unaware of any kernel modules that you may have compiled manually instead of creating a package for them. Typically, proprietary graphics drivers such as those from Nvidia or Ati will cause a few anxious moments if you forget to recompile them for your new kernel before starting X Window… especially when your computer boots into the graphical runlevel 4 by default.

In that case, reboot into runlevel 3, download the latest version of your graphics driver and compile/install the driver. This will enable you to reboot into your graphical logon.
For those who forget, booting into another than the default runlevel is easy: when the LILO screen appears, type the label of your kernel (which was newkernel in our example above) and after that, type the runlevel number: Newkernel Space3Enter

Creating an initrd

In case your kernel does not include the driver for your root filesystem, or a driver for your SATA bus, or other stuff that is only built as modules, your kernel will panic if it boots and can not access the necessary disks, partitions and/or files. Typically, this looks like

VFS: Cannot open root device "802" or unknown-block (8,2)
Please append a correct "root=" boot option
Kernel Panic-not syncing: VFS: unable to mount root fs on unknown block(8,2)

and this means you will have to build an initrd or “Initial Ram Disk” containing the required modules. The location of the initrd is then added in the appropriate section of /etc/lilo.conf so that the kernel can find it when it boots, and is able to load the drivers it needs to access your disks. Creating an initrd is quite simple, and I will show two cases here, one in case you have a Reiser filesystem on your root partition, and the second for the case you have an ext3 filesystem. I assume a 2.6.37.6 kernel in these example commands, if your new kernel is different, change the version number as appropriate.

Change into the /boot directory:

cd /boot

Run “mkinitrd” to create the /boot/initrd file containing a compressed filesystem with the modules you tell it to add on the commandline:

mkinitrd -c -k 2.6.37.6 -m reiserfs

for a Reiser filesystem, or

mkinitrd -c -k 2.6.37.6 -m ext3

in case you installed an ext3 filesystem on your root partition..

Add the line “initrd = /boot/initrd.gz” to the newkernel's section in the file /etc/lilo.conf, save your changes and then re-run lilo; I will use the lilo.conf example section I already used in a previous paragraph:

image = /boot/vmlinuz-custom-2.6.37.6
root = /dev/sda1
initrd = /boot/initrd.gz
label = newkernel
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

then run

lilo

On next boot, your new kernel will not panic.

If you are already using an initrd image with your current kernel, you can choose between two options:

Create a second initrd image using the command above but with an explicit name for the resulting initrd file (which should be different from the default in order not to overwrite the old one:

mkinitrd -c -k 2.6.37.6 -m ext3 -o /boot/initrd-custom-2.6.37.6.gz

and then change the lilo.conf section to look like this:

image = /boot/vmlinuz-custom-2.6.37.6
root = /dev/sda1
initrd = /boot/initrd-custom-2.6.37.6.gz
label = newkernel
read-only # Non-UMSDOS filesystems should be mounted read-only for checking

Add the kernel modules for your new kernel to the existing initrd file. That way, you have a single initrd image containing modules for multiple kernels. All you need to do is leave out the option “-c” which is the option to wipe the directory /boot/initrd-tree and start from scratch:

mkinitrd -k 2.6.37.6 -m ext3

I have written a shell script (mkinitrd_command_generator.sh[2324]).
The script actually does nothing to your system. It will examine your running Slackware system and show you an example mkinitrd command. If you run that mkinitrd command, it will produce an initrd image that contains all the kernel modules and support libraries so that your system can boot with the Slackware generic kernel.
Here is an example of how to run the command with it's output shown as well:

/usr/share/mkinitrd/mkinitrd_command_generator.sh /boot/vmlinuz-generic-2.6.37.6
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 2.6.37.6 -f ext3 -r cryptslack -m mbcache:jbd:ext3 -C /dev/sda8 -u -o /boot/initrd.gz
# An entry in 'etc/lilo.conf' for kernel '/boot/vmlinuz-generic-2.6.37.6' would look like this:
# Linux bootable partition config begins
# initrd created with 'mkinitrd -c -k 2.6.37.6 -f ext3 -r cryptslack -m mbcache:jbd:ext3 -C /dev/sda8 -u -o /boot/initrd.gz'
image = /boot/vmlinuz-generic-2.6.37.6
initrd = /boot/initrd.gz
root = /dev/mapper/cryptslack
label = 2.6.37.6
read-only
# Linux bootable partition config ends

You may notice that it detect my LUKS-encrypted root partition.
This script is included in the mkinitrd package of the Slackware releases after 12.2.

Loading modules on boot

Prior to Slackware 11.0, modules for your kernel were loaded either by the hotplug subsystem, or by explicit modprobe commands in the file /etc/rc.d/rc.modules. Having the same rc.modules file for 2.4.x and 2.6.x kernels was not an optimal situation.
Slackware 12.0 and newer no longer have 2.4 kernels. The loading of kernel modules is now handled by udev and by explicit modprobe commands: the modules that are not loaded by udev can still be put in a rc.modules file. Only, there can now be more than just one file. Slackware will look for the existence of the following (executable) files in this order:

If /etc/rc.d/rc.modules.local exists, it will be run

Else, if /etc/rc.d/rc.modules-$(uname -r) exists, it will be run

Else, if /etc/rc.d/rc.modules exists, it will be run

The $(uname -r) is the current kernel release. If your kernel version is 2.6.37.6-smp, then Slackware will look for a file /etc/rc.d/rc.modules-2.6.37.6-smp to run. This way, specific rc files for different kernels can be present, allowing an optimal tuning for your system.

The Slackware 13.37 package /slackware/a/kernel-modules-smp-2.6.37.6_smp-i686-1.txz will install the file /etc/rc.d/rc.modules-2.6.37.6-smp. You can use that as an example if you want to build your own kernel and need explicit modprobe commands for specific kernel modules.

If you decide to build your own 2.6 kernel from source, you might get bitten by the fact that there will not be a file called /etc/rc.d/rc.modules-$(uname -r) - you will have to create it yourself. The rc.modules usually is a symlink to the rc.modules-2.6.37.6-smp. A typical result from the absence of a rc.modules file for your specific kernel is that your mouse will not be working. Take that behaviour as a hint to create the rc.modules file! You can take a full copy of any existing rc.modules-2.6.xx file. If your system does not have any rc file for a 2.6 kernel you can take the one on the Slackware CD as an example:
/source/k/kernel-modules-smp/rc.modules.new.
Here's an example in case you would have built a new kernel with version 2.6.38.2.alien and you already had installed a Slackware kernel 2.6.37.6-smp:

cp -a /etc/rc.d/rc.modules-2.6.37.6-smp /etc/rc.d/rc.modules-2.6.38.2.alien

The file /etc/rc.d/rc.modules-2.6.38.2.alien will then be used when your new kernel 2.6.38.2.alien boots.

GPG signature

The Linux kernel source archives are signed with the OpenPGP “Linux Kernel Archives Verification Key”. This is a means to verify that the source code you downloaded is the original archive and has not been tampered with. The steps for this validation are outlined in this chapter.

First, import the OpenPGP key into your GnuPG keyring; either by copying the key from the signature page[2325] or by importing it from a keyserver. The kernel key ID is 0x517D0F0E. An example goes like this:

gpg --keyserver wwwkeys.pgp.net --recv-keys 0x517D0F0E

The resulting output will be somewhat like this:

gpg: key 517D0F0E: public key "Linux Kernel Archives Verification Key <ftpadmin@kernel.org>" imported
gpg: Total number processed: 1
gpg:               imported: 1

Next, get the signature file for the kernel archive you've downloaded:

wget http://www.us.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37.6.tar.bz2.sign

and make sure it is in the same directory as the kernel archive itself.

The final step is to run gpg on this signature file, and check what it has to report:

gpg --verify linux-2.6.37.6.tar.bz2.sign linux-2.6.37.6.tar.bz2

The output will be like this:

gpg: Signature made Mon Mar 28 01:08:08 2011 CEST using DSA key ID 517D0F0E
gpg: Good signature from "Linux Kernel Archives Verification Key <ftpadmin@kernel.org>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: C75D C40A 11D7 AF88 9981  ED5B C86B A06A 517D 0F0E

If you would have told gnupg to trust this key, the last part would have looked different. To me, adding a trustlevel to this key makes no real sense, except when you've met one of the kernel developers who had the key with him and could present thrustworthy credentials.

Nevertheless, the outcome is that the source code archive was indeed signed with the key that you just imported. So, that is good news.

Translations

This article has been translated into Spanish by Jorge Courbis: http://coredump.cl/wiki/doku.php?id=compilaci%C3%B3n_de_kernel[2326]

Sources

Original source: http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding[2327]

Originally written by Eric Hameleers[2328]

Also see

If you wish to automate the process, you may want to pull a shell script following the instructions above from here[2329]

howtos, software, kernel, author alienbob

HOWTO articles - Slackware Administration

Although Slackware tries to limit distribution specific tools compared to other distributions, there are a few cases where specific tasks are unique to Slackware. This section contains those special cases.

Inspired? Want to write a Slackware Administration HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Administration HOWTOS

Page
Description
Tags

Booting the Installation Environment from HDD
Booting the Installation Environment from HDD This article shows how to boot the Slackware installation environment from a hard drive instead of the usual installation media. The Slackware installation environment is a small live Linux system with busybox, partitioning and some other useful utilities, and the
howtos, author bormant

Building A Package
Building A Package This is a rough outline for building Slackware packages. Some steps may not be neccessary, some steps might be missing. Use the discussion page for side-notes such as using slacktrack (when DESTDIR fails) and other utilities like checkinstall.
howtos, software, makepkg, package management, author slackwiki

Building and Installing Packages with sbopkg
Building and Installing Packages with sbopkg Sbopkg is a command-line and dialog-based tool to synchronize with the SlackBuilds.org (“SBo”) repository, a collection of third-party SlackBuild scripts to build Slackware packages. The program has a curses based interface which lets you pick and assemble the programs which you want to compile from source into packages. It can also be used non-interactively in case you know beforehand what your goal is - in that case it is
howtos, software, sbo, package management, author ldkraemer

Building the Linux kernel using git
Building the Linux kernel using git Author's note: I am writing this in as impartial a way as I can, because I think the user should decide what is best for them. Where to build There are two common places to build the kernel. It is important that wherever you build the kernel, it must be a location that does not change nor risk deletion or corruption. For example do
howtos, author htexmexh, kernel, software

Creating a Package Using a SlackBuild Script
Creating a Package Using a SlackBuild Script Overview Occasionally, you will find that there is an application that you would really like to utilize, but it is not available in Slackware's repository. For times like this you have options, one of which is using a
howtos, software, slackbuild, author nocturnal.slacker

Cross Compiling The Linux Kernel
Cross Compiling The Linux Kernel Introduction I freely admit there are other HOWTOs on this subject, but I wanted to show you a neat way that rides on the back of the great Buildroot project, instead of doing all the compiler setup by hand. As a bonus you can target different architectures pretty easily.
howtos, nfs, author bifferos

Setting up GRUB 2 on install (without rebooting)
Setting up GRUB 2 on install (without rebooting) There is GRUB in A series of Slackware-14.1. If you want to install GRUB immediately after install (and before restarting), below is a simple method that assumes you use traditional BIOS and MBR partitioning (if you plan to use GPT instead of MBR partitioning, refer to
howtos, grub, author ryanpcmcquen

Hibernation
Hibernation Hibernation (also known as suspend-to-disk) is a method used to power down a computer while preserving the state of the operating system. Once powered up, the operating system will be in the exact state as it was at the time of hibernation.
howtos, hardware, hibernation, power saving, author yenn, author zithro

Chroot From Installation Media
Chroot From Installation Media Slackware is full of tools that can help when the system becomes unstable and cannot boot. One example is upgrading the kernel image and forgetting to run lilo afterwards. In order to gain access to your system without booting directly to it, it is possible to use an installation media such as Slackware CD1 or the DVD. Once the installation media loads and starts, you can change the media's root directory into a mounted hard-disk partition and use it as the root …
howtos, slackware administration, chroot, recovery, author cmyster

How to configure fstab and lilo.conf with persistent naming
How to configure fstab and lilo.conf with persistent naming Have you ever had your /dev/sda and /dev/sdb drives switch order? Has plugging in a USB device before booting your computer caused a kernel panic? Do you frequently unplug or plug in new devices into your computer, thus changing the order of the device names? If you said yes to any of those, you might be a good candidate to use persistent naming within your bootloader and fstab.
howtos, author bassmadrigal

Installing Software
Installing Software Overview There are three basic ways to install software in Slackware: install a pre-build binary package, make your own package, or compile the sources and install the resulting binaries manually. If you need to compile a program from source code, making it into your own package is easy and useful. Here's how these methods work.
howtos, software, installing, package management, author peterwwillis

Install Slackware on an online.net Dedibox BareMetal Server
Install Slackware on an online.net Dedibox BareMetal Server This tutorial explains on how to install and boot Slackware Linux on online.net Dedibox BareMetal Server Start Family. It is focused on servers that you don't have the physical access to and those that don't support remote exposure of the hardware (i.e. no KVM over
howtos, author atelszewski

Installing Slackware on UEFI-based hardware
Installing Slackware on UEFI-based hardware Slackware setup supports UEFI installs. To get Slackware to boot on UEFI machines, bypass the LILO installation and select ELILO installation when prompted during the install. Installing Older Slackware on UEFI-based hardware
howtos, uefi, efi, boot, install, hardware, author ruario

Installing Slackware Using GPT with a BIOS motherboard
Installing Slackware Using GPT with a BIOS motherboard It is possible to install Slackware to a disk that uses a GUID Partition Table (GPT), even on a machine that uses BIOS (i.e. you do not need a UEFI-based machine). Using GPT allows you to install Slackware onto very large disk drives (the theoretical maximum addressable disk size is 2 ZiB). As always, partitioning should be done prior to starting the 'setup' script, however you must use a GPT aware partitioning tool, e.g. gdisk, cgdisk or p…
howtos, gpt, grub, syslinux, exlinux, boot, install, hardware, author ruario

Building a Linux Kernel from Source
Building a Linux Kernel from Source This is how I build my 2.6 kernels. It will apply almost completely to the 3.x kernels in Slackware 14 and onwards. X and su I run the commands from an X terminal, and at some point start the X based kernel configurator. I run my desktop as
howtos, software, kernel, author alienbob

Linux kernel options for UEFI and ELILO
Linux kernel options for UEFI and ELILO The purpose of this article is to inform the user about necessary kernel options for booting from UEFI, and some info about how ELILO and perhaps other EFI bootloaders work, as this is currently difficult to find and understand online.
howtos, author metaschima

Querying Installed Packages
Querying Installed Packages Sometimes you might want to check whether a particular package is installed or which version of a package is installed on your system. If the package is part of the Slackware installation you could use the slackpkg tool:
howtos, software, package management, package tracking, author sycamorex

Setting up a Recovery Boot Option
Setting up a Recovery Boot Option Overview and Purpose Currently most Linux based distributions install a recovery/safe option and a memory test option in the default bootloader. While Slackware does not install such options by default, they can be easily added to any system.
howtos, slackware administration, usbboot, recovery, memtest, lilo, author mfillpot

Style
Slackware uses a simple BSD style init script system. Following the Slackware philosophy, init scripts are quite simple and do not perform any kind of black magic. For example, there are no dependencies between init scripts or monitoring. In this section we will cover the creation of a usual script. Please follow the template as much as possible for consistency with all scripts.
howtos

Set up Grub as boot loader on UEFI hardware
Set up Grub as boot loader on UEFI hardware Installation and running of Slackware on computers that use Unified Extensible Firmware Interface (UEFI) rather than traditional BIOS poses problems. It may be impossible to boot the official install media via UEFI directly and the installation discs do not include a UEFI bootloader.
howtos, grub, uefi, author arubin

Set up SYSLINUX as boot loader on UEFI based hardware
Set up SYSLINUX as boot loader on UEFI based hardware SYSLINUX is a boot loader that loads Linux (among other things) from FAT filesystem. The Syslinux Project, of which SYSLINUX the boot loader is a part, contains also ISOLINUX, EXTLINUX and PXELINUX, basically its variants to boot from optical media, ext2/3/4, Btrfs, XFS, UFS/FFS and NTFS or from network.
howtos, syslinux, uefi

Install Slackware on a CloudVPS by ArubaCloud
Install Slackware on a CloudVPS by ArubaCloud ArubaCloud offers excellent low-cost VPS services, starting at 2.79 € / month (updated May 2020; was 1€/month in feb. 2018, see ArubaCloud offers and limitations). This article refers to installing Slackware on
howtos, slackware, vps, virtualization, arubacloud, aruba

Install Slackware on a VPS based on Proxmox VE or SolusVM
Install Slackware on a VPS based on Proxmox VE or SolusVM I've been faced with the challenge to install Slackware as a VPS at a hosting provider that had Proxmox VE as virtualization platform. Proxmox VE is a complete open source virtualization management solution for servers. It is based on
howtos, virtualization, kvm, proxmox, solus, solusvm

Slackware Automation Using Ansible
Slackware Automation Using Ansible Rationale, and What Is Ansible, Anyway? Like everyone else, I used to write Perl and bash scripts to automate things, but decided to learn the modern way of doing such things. I looked at Puppet initially but decided to learn Ansible instead. I wrote a simple collection of Perl scripts and Ansible playbooks to be run on a fresh Slackware install, and was told in Freenode #slackware that I ought to write something for the wiki, which brings us up to date.
howtos

Upgrading Slackware to a New Release
Upgrading Slackware to a New Release Upgrade or Install from Scratch Installing Slackware fresh and from scratch is always the best method if you are running a fairly old release of Slackware and want to skip a few releases. Too many intrusive changes to the distro will have occurred if your Slackware is relatively old. It will make a manual upgrade process painful and will not guarantee success.
howtos, slackpkg, author alienbob

UEFI dual or more boot using rEFInd
UEFI dual or more boot using rEFInd Machines are now coming in with the UEFI standard. It presents some advantages like the ability to boot from disks over 2TiB and flexible pre-OS environments as drivers can be loaded in the UEFI firmware. But Linux users found that, suddenly, it was more difficult to multi-boot as we used to do in the past. However, Linux users have a variety of resources and we found a way to work with the new standard. It is not as straightforward as in the past, but it is …
howtos, uefi, efi, boot, slackware administration, author aragorn2101

Yet Another Kernel Compile Guide
Yet Another Kernel Compile Guide Why and How? A few years ago I wrote a couple of HowTos on compiling and packaging a complete kernel+modules package. Recently, I decided to look at how the stock Slackware kernel packages are built. I put this guide together from what I picked up.
howtos, kernel

howtos, topic page

Set up SYSLINUX as boot loader on UEFI based hardware

SYSLINUX is a boot loader that loads Linux (among other things) from FAT filesystem. The Syslinux Project[2330], of which SYSLINUX the boot loader is a part, contains also ISOLINUX, EXTLINUX and PXELINUX, basically its variants to boot from optical media, ext2/3/4, Btrfs, XFS, UFS/FFS and NTFS or from network.

UEFI support seems to have been added in version 6 of SYSLINUX, while Slackware comes with version 4, which means it can not be set up during Slackware installation, unless one prepares SYSLINUX files on another machine.

Why SYSLINUX

That being said, why bother with SYSLINUX? A couple of reasons:

LILO/ELILO is reportedly no longer maintained, the time may come we will have to switch to something else.

Learning SYSLINUX may be worthwhile, because aside from serving as LILO/ELILO replacement, it can do many other things (e.g. PXE)

Compared to GRUB, it is, well, less humongous and intimidating. After all, configuration files resemble those of LILO/ELILO.

Why UEFI

It is not as though there is some choice; machines nowadays are UEFI. One can, however, choose to set UEFI to so called “CSM” or sometimes “Legacy” mode. In this mode, UEFI acts as BIOS, i.e. reads the first sector (MBR) of a hard drive and loads and executes non-UEFI boot loader such as LILO from there. As opposed to UEFI in, say, UEFI mode, when it reads, loads and executes UEFI-aware boot loader from EFI boot partition.

Frankly, there are no compelling reasons not to use CSM (note that it is possible to use GPT partitions without UEFI[2331]). On the contrary, there are reasons to avoid UEFI booting, because:

On some machines, it is not possible to turn off secure boot without also turning off UEFI booting (i.e. without turning on CSM).

On some machines, it is possible to turn off secure boot, but anything but what came with the machine will not boot anyway.

On some machines, UEFI tries really hard to boot Windows and ignores or resets boot order.

On some machines, installing Linux in UEFI mode may brick the machine.

But, as with LILO, the day may come we will need to move on.

Installation

There are basically two steps: first, preferably before you even install Slackware, partition the disk using GPT[2332] and create EFI boot partition, second, compile and install SYSLINUX.

But before you begin:

back up your data, if you have anything of value on any of drives in the machine

boot to UEFI setup (“BIOS”) and verify that boot method is set to “UEFI”, not “CMS” or “Legacy”

and also that Secure Boot is turned off

Create EFI Boot Partition

It is the place where UEFI will look for a boot loader. Several tools can be used to partition a drive and create EFI boot partition,:

cfdisk (new versions; older do just DOS partitions)

gdisk, an interactive tool and GPT counterpart to fdisk

cgdisk, a menu-based tool and GPT counterpart to cfdisk

sgdisk, apparently scriptable version of gdisk

Let's assume you have empty 10GB drive /dev/sda.

Just in case, erase all previous MBR or GPT partitions.

# sgdisk -Z /dev/sda

Verify the drive is clean.

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.0
Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present
Creating new GPT entries.
Disk /dev/sda: 20971520 sectors, 10.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 8C026A41-F188-4521-A72C-D2B826EAA1D1
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 20971486
Partitions will be aligned on 2048-sector boundaries
Total free space is 20971453 sectors (10.0 GiB)
Number  Start (sector)    End (sector)  Size       Code  Name

Partition the drive (using sgdisk or any above mentioned tool). Three partitions will be created, one for EFI, one for data and one for swap.

# sgdisk -n 1:0:+512M /dev/sda
# sgdisk -n 2:0:+9G /dev/sda
# sgdisk -n 3 /dev/sda

Do not forget to set correct partition codes. EFI boot partitions has code 'ef00'.

# sgdisk -t 1:ef00 /dev/sda
# sgdisk -t 2:8300 /dev/sda
# sgdisk -t 3:8200 /dev/sda

Verify layout.

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 1.0.0
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 20971520 sectors, 10.0 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 3F2101FB-0D6B-481F-98B9-1C6621DB0981
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 20971486
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)
Number  Start (sector)    End (sector)  Size       Code  Name
1            2048         1050623   512.0 MiB   EF00
2         1050624        19924991   9.0 GiB     8300
3        19924992        20971486   511.0 MiB   8200

Create FAT32 filesystem on EFI boot partition.

# mkfs.vfat -F 32 /dev/sda1

That is pretty much it for EFI boot partition. You can do whatever you like with /dev/sda2 (RAID, LUKS, LVM, any filesystem) and install Slackware there, but leave EFI partition alone, that partition needs to be unencrypted and FAT32 formatted.

Set up SYSLINUX

Compilation

Download sources[2333] and compile.

$ unxz -c syslinux-6.03.tar.xz | tar -x
$ cd syslinux-6.03/
$ make
$ make INSTALLROOT=/some/where install

Set up boot loader

Now copy the boot loader and a few modules, as well as kernel and initrd to EFI boot partition created earlier. Let's asssume /dev/sda1 is mounted as /boot/efi.

Copy the boot loader and a module for loading Linux. That is the bare minimum. And double check you are copying efi64 files.

# cd /boot/efi
# mkdir EFI
# mkdir EFI/SYSLINUX
# cd EFI/SYSLINUX
# cp /some/where/usr/share/syslinux/efi64/syslinux.efi .
# cp /some/where/usr/share/syslinux/efi64/ldlinux.e64 .

Copy some other modules, e.g. for creating cute boot menu. For full list of modules and dependencies, see the list[2334].

# cp /some/where/usr/share/syslinux/efi64/libutil.c32 .
# cp /some/where/usr/share/syslinux/efi64/menu.c32 .

Create configuration file /boot/efi/EFI/SYSLINUX/syslinux.cfg. Bellow is an example of simple boot menu with two items.

TIMEOUT 100 tells the boot loader to wait 100 hundredths of second, i.e. 10 seconds for user input.

If user selects nothing within 10 seconds, whatever is set as DEFAULT will be launched.

The first menu entry is Slackware 14.2.

LABEL is a name that can be used for DEFAULT.

MENU LABEL is a description.

LINUX vmlinuz-huge-4.4.14 tells the boot loader to boot kernel vmlinuz-4.4.14 from the same directory (i.e. EFI\SYSLINUX\vmlinuz-4.4.14)

APPEND /dev/vgroot/V_ROOT 4 is kernel command line telling the kernel to mount /dev/vgroot/V_ROOT as / (root). Obviously that is a logical volume in this case, but it could be e.g. plain /dev/sda2. The second argument, '4', will be in fact passed by kernel to init, which will start to runlevel 4 instead of default 3 (as per /etc/inittab), i.e. will start to graphical multi-user mode with X window system.

INITRD initrd.gz-4.4.14 is an initrd image that is mounted as temporary / before the final / is mounted. Typically, an initrd is needed if kernel has to load some additional modules to access the root device, or has to perform some actions to make it accessible (think of RAID, LUKS, LVM). If you do not need initrd, simply delete this line.

The second menu entry is largely the same, except that there is no '4' in APPEND /dev/vgroot/V_ROOT. Simply put, this is non-graphical safe mode. If X window system fails to start for whatever reason, you may end up with not only black screen, but also blocked keyboard and mouse and therefore unable to fix the cause. So it is a good idea to have this option prepared beforehand (another method to use otherwise unusable machine with broken X is to SSH-in, though it is a less reliable method).

/boot/efi/EFI/SYSLINUX/syslinux.cfg

UI menu.c32
PROMPT 0
TIMEOUT 100
DEFAULT Slackware 14.2
MENU TITLE Machine Boot Menu
LABEL Slackware 14.2
MENU LABEL Slackware 14.2
LINUX vmlinuz-huge-4.4.14
APPEND /dev/vgroot/V_ROOT 4
INITRD initrd.gz-4.4.14
LABEL Slackware 14.2 no X
MENU LABEL Slackware 14.2 no X
LINUX vmlinuz-huge-4.4.14
APPEND /dev/vgroot/V_ROOT
INITRD initrd.gz-4.4.14

Still in /boot/efi/EFI/SYSLINUX, copy kernel here. Huge is the safer option. Generic may require initrd and more modules in it. If you do not know which they are, the machine might not boot, so go with the huge.

# cp /boot/vmlinuz-huge-4.4.14 .

Create initrd if needed and copy here too. Man for options, but basically the command bellow creates an initrd that will contain some USB-related modules to enable keyboard input (because /dev/sda2 is encrypted (LUKS) and user will have to type in a passphrase).

# mkinitrd -c -k 4.4.14 -C /dev/sda2 -L -R -f xfs -m xfs:hid:hid-generic:usbhid:xhci-hcd:xhci-pci:ehci-hcd:ehci-pci:ohci-hcd:ohci-pci:uhci-hcd:uhci-pci:usb-storage -r /dev/vgroot/V_ROOT -o /boot/initrd.gz-4.4.14
# cp /boot/initrd.gz-4.4.14 .

Finally, add SYSLINUX to UEFI boot menu. Note that there will be in fact two boot menus. The first is UEFI boot menu that will typically onyl show up if you press some key (e.g. F12 on Dell, F9 on HP, F11 with AsRock mainboard, often just Esc) and will present you with a list of devices or boot loaders to boot. Depending on how crappy your UEFI is, SYSLINUX may or may not show up there.

The second boot menu is that of SYSLINUX, i.e. what you typed to syslinux.cfg and will show up either if you do not tigger UEFI boot menu or trigger it and then select either SYSLINUX or device (hard drive) it is on.

# efibootmgr -c -d /dev/sda -p 1 -l \\EFI\\SYSLINUX\\syslinux.efi -L "SYSLINUX"
Timeout: 2 seconds
BootOrder: 0000,0001,0002
Boot0000* SYSLINUX
Boot0001* UEFI: IP4 Realtek PCIe GBE Family Controller
Boot0002* UEFI: IP6 Realtek PCIe GBE Family Controller

Syslinux has been added with code 0000 (Boot0000) and is 1st in boot order. If it was not, order would have to changed:

# efibootmgr -o 0000,0001,0002

On some machines, it may be possible to change order also in UEFI (meaning its GUI/setup utility).

Troubleshooting

If your machine complains it has nothing to boot, that may indicate efibootmgr command was incorrect or somehow did not register. You may then try to force it to boot SYSLINUX by moving and renaming it to EFI\Boot\bootx64.efi, which is kind of fallback option; the machine will try to boot that at some point.

# cd /boot/efi/EFI
# mv SYSLINUX Boot
# cd Boot
# cp syslinux.efi bootx64.efi

Sources

http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project[2335]

https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface[2336]

howtos, syslinux, uefi

Install Slackware on an online.net Dedibox BareMetal Server

This tutorial explains on how to install and boot Slackware Linux on online.net[2337] Dedibox BareMetal Server Start Family[2338]. It is focused on servers that you don't have the physical access to and those that don't support remote exposure of the hardware (i.e. no KVM over IP). The setup of this kind of servers is possible through a Web interface[2339]. Fortunately or not, this interface doesn't natively support Slackware installation. No worries, we will manage nonetheless.

Although the very first parts of the tutorial are Dedibox server specific, the rest is more generic. This means that the information provided here applies equally to other hosting offers, which just must provide similar rescue OS (more on the rescue OS down below). Conversely, the first parts apply well to Linux distributions other than Slackware. If you need fine grained control over the installation process on the Dedibox server, you're in good place.

1. Dedibox rescue OS

The rescue OS is an operating system that you can boot your server into using the Web interface[2340]. This OS allows you to perform maintainability tasks, should your main operating system fail to boot or should you need to access the server, while bypassing your main OS. There are multiple versions of the rescue OS to choose from; we will be using Linux based one.

You can (and should) connect to the rescue OS over SSH. One of the characteristics of the rescue OS is that it is volatile, meaning that changes made to it are lost after reboot. But more importantly, the SSH host keys are regenerated every time the rescue OS is booted, which results in the SSH host's key fingerprint being changed too, whenever you reboot. This makes checking the authenticity of the server a bit cumbersome.

One of the ways to verify the host's authenticity is to open online.net technical support ticket, asking to provide you with the rescue OS host's key fingerprint. And because the fingerprint changes with every reboot, it is not desirable to reboot the machine during Slackware installation. No big drama, it is possible to successfully install and then boot Slackware into its full glory with only a single reboot at the end of the journey. You can also connect without ensuring the host's authenticity, have a play and even trial installation. Once you are familiar with the environment, you can reboot again into the rescue OS, ask the technical support for the fingerprint, cleanup the hard drive and perform the final installation and setup. Just beware that without verifying the host's authenticity you are susceptible to MITM attacks. Although the rescue filesystem is volatile and you can wipe the disk content to make sure it is clean and safe, still, the hardware itself might be the target of the attack. And nowadays, hardware is actually running software (firmware) more often than not.

Fortunately, there is an alternative method that does not involve the engagement of the technical support. You can read the full details on LinuxQuestions.org[2341]: Verifying host authenticity (SSH) after logging in, over then accessible secure serial terminal[2342]. In the tutorial itself, I will only focus on how to get the thing done.

2. Serial console

The Web interface provides a serial console option, which allows you to interact with the server hardware. It is of somehow limited use with the rescue OS (i.e. no login possible), but can be fully utilised with the main OS. If properly configured, it will allow you to see the boot process of the main OS and also to have a terminal login, should the SSH connection be not available for whatever reason. (But don't expect anything fancy, it's just a serial console after all).

It turns out that, it is actually possible to log in into the rescue OS using the serial console. At least it works when Ubuntu 16.04 amd64 is selected as rescue OS. Unfortunately, this tutorial was written with the assumption that it was not possible (which actually was the case!). For that reason, some steps are more complex than they would be if the serial console was available from the beginning. This applies especially to the server's SSH authenticity verification step. Unfortunately, I won't update the tutorial to accommodate for this discovery.

3. Making the rescue OS available

If you've just purchased a fresh server, it should come with no operating system pre-installed. Unfortunately, it means also that the rescue OS is not available yet.

To enable the rescue OS: using the Web interface, go to your server management page: Server → Server list → (server name) Manage. If the only option you see is [INSTALL], then the rescue OS is not available and you have to first install one of the offered operating systems. (Purist's note: choose the operating system wisely, as the icon associated with this OS is going to represent your Slackware system thereafter). Once the OS installation is complete, you are going to be presented with more options: [REBOOT], [RESCUE], [SERIAL_CONSOLE] and [INSTALL]. You're ready to go now. Just don't boot the rescue OS yet.

4. Preparing rescue OS access over SSH

Be careful not to overwrite your workstation's SSH keys in ~/.ssh

We are now about to create two SSH keys pairs. One pair is going to be used to login into the rescue OS and the other (only public key part) for rescue OS authentication. Type the following on your workstation:

$ mkdir dedibox_rescue_os_keys
$ cd dedibox_rescue_os_keys
$ ssh-keygen -t rsa -f login_key -N ''
$ ssh-keygen -t rsa -f auth_key -N ''

Using the Web interface, go to your SSH keys management page: logged in as (username) → SSH keys and add the auth_key.pub and login_key.pub public keys. Note that after the successful addition, the page is not automatically refreshed and to actually see the keys, you have to click SSH keys link on the left hand side.

Uploading the keys through the Web interface has the effect of making them available to the rescue OS. When the rescue OS boots, the keys are simply appended to the ~/.ssh/authorized_keys file for the particular user.

These keys might be safely removed from the Web interface once you are done with the Slackware installation.

5. Booting and connecting to the rescue OS

Using the Web interface, go to your server management page: Server → Server list → (server name) Manage. Enable the serial console by clicking on the [SERIAL_CONSOLE] button and follow the guide. The console will be opened in a new browser tab. Note that the console connection has expiration time, so it won't stay there forever. Also, there are not many messages appearing related to the rescue OS booting, but it's still better than nothing. Rescue OS takes some time to boot and being able to see it can let you calm down a bit (just keep in mind that there is some time between the moment the messages stop appearing and the moment you can actually connect over SSH). The reason you need to start [SERIAL_CONSOLE] before [RESCUE] is that, the [SERIAL_CONSOLE] button disappears once you boot with the rescue OS.

It is still possible to access the serial console, even if the [SERIAL_CONSOLE] button is not visible. You just need to go to https://console.online.net/en/server/state/XXXXX/bmc[2343] address, replacing XXXXX part with the actual number of your server.

Now go back to server management page and click on [RESCUE]. When prompted for the operating system selection, choose [Ubuntu_16.04_amd64] and then click on [CLICK_HERE_TO_LAUNCH_THE_RESCUE_SYSTEM]. After a while, you will be presented with the details needed to connect to the rescue OS over SSH. You can also switch to the [SERIAL_CONSOLE] output window to monitor what is happening.

Once the rescue OS is fully booted, connect to it from your workstation:

$ ssh username@x.y.z.w -i ./login_key

When asked Are you sure you want to continue connecting (yes/no)?, answer yes.

It might be a good idea to temporarily add the rescue OS SSH host's key fingerprint to the ~/.ssh/known_hosts file on your workstation. This will allow you to re-login back (e.g. in the case of a broken connection) into the rescue OS without the need for repeating the authentication procedure described below. Just remember to remove the fingerprint after you are done or if the authentication procedure described below fails.

Once logged in, to authenticate the rescue OS, on the server side type the following:

$ cat ~/.ssh/authorized_keys

and then compare the public keys printed on the terminal with auth_key.pub and login_key.pub public keys you generated previously. If both the keys between the server and the workstation match, you are secure to go. (Again, if you want to understand the details, refer to the aforementioned LinuxQuestions.org thread[2344]).

Now, on the server side, I suggest you to first start the screen program and then log in as root (the password is given on the rescue OS connection details page):

$ screen
$ sudo su -

(Being paranoid, I change the user and root passwords provided by online.net).

I will not go into details of screen program, but the reason we want to use it, is its ability to maintain the remote terminal opened, even if the SSH (or rather network) connection breaks or you accidentally close the terminal window on your side. Normally, such an event would break the installation process. If that happens to you, and you use screen, then you can regain the remote terminal (with all the started commands still executing!), by simply connecting over SSH and then re-attaching to the so-called screen session:

$ screen -r
$ # Sometimes, detaching the session first is needed:
$ screen -rd SESSION_PID

All of the above means also that you cannot stop remote command execution by just closing the local terminal window; screen session will be maintained on the remote end until you explicitly close it. BTW, you can also use this functionality to lower the network traffic during installation phase, i.e. once the packages started installing and need no attention, you can detach from the session and then re-attach some time later to check the status. You use Ctrl+AD keyboard combination to detach from screen session. Check the Internet on how to use the screen program (the man page is actually enormously long).

6. Setting-up Slackware installer environment (chroot)

The main motivation behind this HOWTO is the fact that online.net does not provide direct method of Slackware installation on their Dedibox servers. And that is great! The point is, if such a method existed, it would be something unfamiliar to a Slackware user: a GUI/Web based installer. Whereas being dropped to the Slackware's installer shell allows you to install and configure the system the way you want (TM). All the advanced options are available without much hassle. And we're going to use them all. :-^

The procedure detailed below is known and common. We're going to chroot into the unpacked Slackware initrd image and run setup from within there.

Our Slackware chroot will be running out of Ubuntu rescue OS, which is running out of RAM based filesystem. The size of the RAM filesystem is ~8.0 GiB (that depends on the total amount of system RAM). Hint: 8.0 GiB is more than enough to hold the full Slackware packages tree, if need be (i.e. if you want to download the packages before running setup).

Now, let's setup the Slackware installer chroot:

$ mkdir -p ~/slackware-chroot
$ cd ~/slackware-chroot
$ wget https://slackware.osuosl.org/slackware64-14.2/isolinux/initrd.img
$ gunzip -cd initrd.img | cpio -dvim
$ mount --bind /proc proc
$ mount --bind /sys sys
$ mount --bind /dev dev
$ mount --bind /dev/pts dev/pts
$ mount --bind /run run
$ touch etc/resolv.conf
$ mount --bind /etc/resolv.conf etc/resolv.conf

And run the chroot:

$ chroot ~/slackware-chroot /bin/bash --login
$ cd

Mounting /etc/resolv.conf provides DNS to the chroot.

Once you chrooted, you might want to play with the TERM environment variable, which is going to influence the way that dialogs are displayed. By default, TERM=linux and it does not work well if you use screen or are connecting from terminal emulator running under X.

For best results with screen, use the following:

$ export TERM=screen

and if you do not use screen, but are connecting from within X:

$ export TERM=xterm

Finally, for the bare virtual terminal (VT), leave the default:

$ export TERM=linux

Welcome to the Slackware Linux installation disk!

7. Partitioning

You can now partition the disk to your liking, with two exceptions. In this tutorial, I'm going to use separate partition to be mounted on /boot directory. This directory will hold the kernel, initrd and bootloader config file. Which brings us to the second exception: as the bootloader, I'm going to use syslinux installed to MBR, which means the disk has to use MBR label type. If you need GPT, you're on your own.

The filesystem of the /boot partition has to be supported by syslinux. ext4 will do the job just fine. And when it comes to the size, 128 MiB is sufficient.

The following instructions will destroy the data on the disk.

You can use your favourite partitioning tool, e.g. fdisk, cfdisk, etc. I'm going to use parted. Note that the disk should be in “unmanaged” state, that is, services like LVM2 or software RAID (mdadm) should be deactivated. I had a lot of headache releasing the disk from the control of LVM2, when I was playing with it (but I managed ).

By the way, the disk is already going to contain the partition table, which was created when we were installing one of the stock OS-es in order to enable the rescue OS. The partition table can be wiped with the following commands:

$ dd count=1 bs=512 conv=notrunc if=/dev/zero of=/dev/sda
$ partprobe

The following parted commands will create the MBR label and the /boot partition:

$ parted /dev/sda mklabel msdos
$ # Start at 1 MiB in the hope of a correct alignment:
$ parted -a optimal /dev/sda mkpart primary 1MiB 129MiB
$ # Set bootable flag:
$ parted /dev/sda set 1 boot on

Having the /boot [/dev/sda1] partition in place, you can partition the remaining space in the way that suits your needs. I'm going to use LVM2 to manage the disk, so I create one big partition [/dev/sda2] that is going to be passed to LVM2. The setup procedure for enabling LVM2 is described in Appendix A. The following parted command will create the required partition:

$ # Passing "-a optimal" automatically aligns at the last sectors of the disk.
$ # The start and end offsets have to be given explicitly:
$ parted -a optimal /dev/sda mkpart primary 129MiB 100%
$ # Set the 'lvm' flag only if you plan to use LVM2 for managing the disk.
$ parted /dev/sda set 2 lvm on

Let the kernel know about the partition changes:

$ partprobe

Let's verify the result:

$ parted /dev/sda print
Model: ATA SAMSUNG MZ7LN256 (scsi)
Disk /dev/sda: 256GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number  Start   End    Size   Type     File system  Flags
1      1049kB  135MB  134MB  primary  ext4         boot
2      135MB   256GB  256GB  primary               lvm

8. Slackware installation (setup program)

If you prefer to download the required packages yourself, instead of letting the setup program do it for you (I actually prefer it that way), now is the time.

I want to use rsync to download the packages beforehand. Since Slackware chroot does not provide rsync command, we have to leave Slackware chroot for a moment, use rsync from Ubuntu rescue OS and then come back:

$ # Exit from Slackware chroot:
$ exit
$ mkdir -p ~/slackware-chroot/packages
$ cd ~/slackware-chroot/packages
$ # Download only: a, ap, d, l, n packages series (I don't need GUI apps),
$ # pay !attention! to the "." at the end of command line:
$ rsync -vaz rsync://rsync.osuosl.org/slackware/slackware64-14.2/slackware64/{a,ap,d,l,n} .
$ wget https://slackware.osuosl.org/slackware64-14.2/slackware64/CHECKSUMS.md5
$ # Verify the checksums of the downloaded packages:
$ grep -P "\./(a|ap|d|l|n)/" CHECKSUMS.md5 | md5sum -c --quiet
$ mkdir -p ~/slackware-chroot/patches
$ cd ~/slackware-chroot/patches
$ Download patches, pay !attention! to the "." at the end of command line:
$ rsync -vaz rsync://rsync.osuosl.org/slackware/slackware64-14.2/patches/packages .
$ wget https://slackware.osuosl.org/slackware64-14.2/patches/CHECKSUMS.md5
$ # Verify the checksums of the downloaded patches:
$ grep -P "\./packages" CHECKSUMS.md5 | md5sum -c --quiet
$ # Return to Slackware chroot:
$ chroot ~/slackware-chroot /bin/bash --login
$ cd
$ # Remember to update TERM as described earlier:
$ export TERM=screen

Having all the partitions in place, it's now time to run the setup program and perform the installation as you know it. Just remember to format and mount the /boot partition when prompted by setup. When prompted, skip LILO installation, as we're going to use syslinux instead. If you downloaded the packages beforehand, point the setup to the pre-mounted /packages directory. Otherwise, use setup to download the packages for you.

Don't reboot the machine when the setup program offers to at the end of the installation.

9. Freshly installed Slackware chroot

Yes, one more chroot to deal with. The configuration of the freshly installed system is best performed from the actual system itself. And we're going to do exactly that. When the setup program finished its job, it has left the Slackware root filesystem (and some additional ones) mounted on /mnt. And there is nothing preventing us from chrooting into this directory, meaning that we can actually “log in” into the freshly installed system without rebooting.

This system is somehow limited (i.e. there are no services running), but has all the tools needed to perform the final configuration steps before rebooting the server.

To avoid any unpleasant surprises, we mount some possibly needed filesystems, before chrooting:

$ cd /mnt
$ mount --bind /run run
$ mount --bind /dev/pts dev/pts
$ # Only needed if you downloaded the patches and want to apply them:
$ mkdir run/patches
$ mount --bind /patches/packages run/patches
$ # Enter Slackware Chroot (tm):
$ chroot /mnt /bin/bash --login
$ cd
$ # Remember to update TERM as described earlier:
$ export TERM=screen

10. Applying patches

The following set of commands will apply all the available patches and let you know of any .new files to deal with:

$ find /run/patches -name \*.txz -exec upgradepkg {} \;
$ find /etc -name \*.new

11. Bootloader (syslinux)

The following set of commands will install the syslinux bootloader:

$ extlinux --install /boot
$ dd count=1 bs=440 conv=notrunc if=/usr/share/syslinux/mbr.bin of=/dev/sda

Then, create the syslinux config file:

$ cat << EOF > /boot/syslinux.cfg
PROMPT  0
TIMEOUT 0
DEFAULT vmlinuz-generic
SERIAL  1 9600
LABEL vmlinuz-generic
KERNEL vmlinuz-generic
APPEND console=ttyS1,9600 printk.time=0 quiet ipv6.disable=1 ro
INITRD initrd-generic.gz
EOF

This configuration will enable the messages to appear on the serial console. I also specify some kernel parameters (printk.time=0 quiet) to considerably silence its output (error messages would still appear). As I do not want to bother with IPv6, I disable it at kernel level (ipv6.disable=1). As you can see, we will be using the generic kernel with initrd. This is the only way (that is, by means of initrd) the LVM2 can be made functional.

Note that the kernel and initrd paths specified in syslinux.cfg have to be relative to the /boot directory. This is because syslinux is unable to read from LVM2 based root partition, so something like /boot/vmlinuz-generic would not work (/ is on LVM2 partition in my case).

12. Initial RAM disk (initrd)

Create the initrd config file:

$ cat << EOF > /etc/mkinitrd.conf
# mkinitrd.conf
# See "man mkinitrd.conf" for details on the syntax of this file
#
#SOURCE_TREE="/boot/initrd-tree"
#CLEAR_TREE="0"
OUTPUT_IMAGE="/boot/initrd-generic.gz"
KERNEL_VERSION="$( readlink /boot/vmlinuz-generic | rev | cut -f1 -d- | rev )"
#KEYMAP="us"
MODULE_LIST="ext4"
#LUKSDEV="/dev/sda2"
#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
ROOTDEV="/dev/vg0/rootfs"
ROOTFS="ext4"
#RESUMEDEV="/dev/sda2"
#RAID="0"
LVM="1"
#UDEV="1"
#MODCONF="0"
#MICROCODE_ARCH="/boot/intel-ucode.cpio"
WAIT="0"
EOF

As the comment says, refer to the mkinitrd.conf man page for details. In particular, make sure your MODULE_LIST, ROOTDEV and ROOTFS are defined correctly. If you don't need LVM2 support, you can set LVM=“0” (or comment it out).

The notable thing is how the KERNEL_VERSION is automatically derived, not for the running kernel, but rather for the installed kernel (which might be newer or older than the running one). /etc/mkinitrd.conf is sourced by the /sbin/mkinitrd script, so it is possible to use shell commands within the config file. On standard Slackware installation, you will find that /boot/vmlinuz-generic is actually a symlink:

$ ls -l /boot/vmlinuz-generic
lrwxrwxrwx 1 root root 22 Dec 13 00:44 /boot/vmlinuz-generic -> vmlinuz-generic-4.4.38

So the following code:

KERNEL_VERSION="$( readlink /boot/vmlinuz-generic | rev | cut -f1 -d- | rev )"

will simply extract the version number from the installed kernel image.

And finally, to create the initrd, run the following command:

$ mkinitrd -c -F

Note that it is not necessary to run any syslinux related commands after creating or updating the initrd image. This is different from LILO, where you have to run lilo command after changing the initrd image.

13. Enabling serial console access

As of now, the serial console configuration in /boot/syslinux.cfg allows for interacting with the bootloader and also to see the kernel messages, but it does not allow for root login over serial port. If you want to enable it, then uncomment the following line in /etc/inittab:

s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100

and the following line in /etc/securetty:

ttyS1

You might also want to comment out the follwing lines in /etc/inittab:

#c1:12345:respawn:/sbin/agetty --noclear 38400 tty1 linux
#c2:12345:respawn:/sbin/agetty 38400 tty2 linux
#c3:12345:respawn:/sbin/agetty 38400 tty3 linux
#c4:12345:respawn:/sbin/agetty 38400 tty4 linux
#c5:12345:respawn:/sbin/agetty 38400 tty5 linux
#c6:12345:respawn:/sbin/agetty 38400 tty6 linux

and the following lines in /etc/securetty:

#tty1
#tty2
#tty3
#tty4
#tty5
#tty6

tty[1-6] are for the standard VT login prompts, but since we have no keyboard and no display, we cannot make any use of them.

14. Finalising the installation

We're done with the installation and initial configuration of the Slackware Linux. You can now prepare the system for reboot and, well, reboot. Before doing that, you might also consider looking at the Appendix B, where I explain how to prepare the SSH stuff, so that after rebooting, you can connect to the server with SSH right away. (Otherwise, you will have to log in over serial console to perform the other configuration tasks).

First, prepare the hard disk to safely survive the reboot phase. Note that, I only (u)mount /mnt/boot and /mnt partitions as these are the only hard disk partitions I have. If you have more mounted disk partitions, you should umount them too:

$ # Exit freshly installed Slackware chroot:
$ exit
$ umount -v /mnt/boot
$ mount -v -o remount,ro /mnt
$ # This never hurts:
$ sync
$ # Only needed if LVM2 is used:
$ vgchange -an --ignorelockingfailure
$ # This never hurts again:
$ sync
$ # Shouldn't be needed, but just in case:
$ sleep 3

Now, go to the server management page and press [BOOT_IN_NORMAL_MODE] button. You can observe the reboot process on the serial console.

A. Setting up LVM2 disk management

The following instructions will destroy the data on the disk.

Before continuing to LVM2 partitioning, if the disk is already under LVM2 control, it has to be first deactivated. I use the following set of commands to do so:

$ lvscan
$ ( cd /dev/mapper && lvchange -an $(pvs --noheadings -o vg_name) )
$ vgscan
$ vgchange -an $(pvs --noheadings -o vg_name)
$ pvscan
$ pvremove -ffy $(pvs --noheadings -o pv_name)
$ partprobe

To find out more about LVM2, go to https://wiki.archlinux.org/index.php/LVM[2345]

Remember that the disk has already been partitioned using MBR in the “Partitioning” chapter and /dev/sda2 already exists. The following set of commands will activate LVM2 on /dev/sda2 and create the partitions (the LVM2 partitions are going to sit on top of /dev/sda2 partition):

$ pvcreate /dev/sda2
$ pvdisplay
$ vgcreate vg0 /dev/sda2
$ vgdisplay
$ # Create the partitions (logical volumes):
$ lvcreate -L 12G vg0 -n rootfs
$ lvdisplay
$ vgchange -ay

NOTE:

The good thing about LVM2 is that you can easily add more partitions later on.

I have chosen partition sizes that suit my current needs, leaving significant free space. LVM2 can easily grow the sizes later on if needed.

I haven't created the swap partition. The server has more than enough of RAM. But if needed, it can be easily added later on.

B. SSH server configuration (before rebooting)

You have to be in the chroot of the freshly installed Slackware system to perform the configuration steps detailed below.

If you enabled the sshd service during setup, it'll be automatically started the next time the Slackware system boots. Unfortunately, you won't be able to connect to it for two reasons:

the host keys are not generated yet, so you won't be able to verify host's authenticity and of course you don't want to connect without being able to verify it,

user's public key authentication is not set up and of course you don't want to be logging in using password authentication.

To solve the first issue, we need to manually perform the task that would normally be done by the Slackware init scripts when the system boots for the first time. Generating the host keys basically boils down to the following command:

$ ssh-keygen -A

And then to obtain the host's key fingerprint (I stick to RSA):

$ ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key

Setting up public key authentication is a bit more cumbersome, but still far from being rocket science. :-^ First, you need to upload your public key from your workstation to the server. Run the following command on the workstation:

$ scp -i ./login_key ~/.ssh/id_rsa.pub user@x.y.z.w:~

NOTE: The above command uploads ~/.ssh/id_rsa.pub public key, but for the transfer authentication, it uses the very same key you uploaded earlier using the Web interface.

Now, back to the server, create the required ~/.ssh directory:

$ mkdir ~/.ssh

I told you to use the screen program at the beginning, right? Now we will make use of it. The public key that you uploaded above has been placed in the user home directory of the Ubuntu rescue OS. We need to rename it to the authorized_keys file in the ~/.ssh directory of the fresh Slackware installation:

$ # Detach from screen session, you'll be dropped to Ubuntu rescue OS:
(keyboard) Ctrl+a d
$ # Login as root:
$ sudo su -
$ mv /home/user/id_rsa.pub /root/slackware-chroot/mnt/root/.ssh/authorized_keys
$ # Exit root login:
$ exit
$ Re-attach to screen session:
$ screen -r

Ensure correct ownership and permissions, otherwise sshd won't let us in:

$ chown root:root ~/.ssh
$ chown root:root ~/.ssh/authorized_keys
$ chmod 0700 ~/.ssh
$ chmod 0600 ~/.ssh/authorized_keys

NOTE:

If you haven't used screen, you would just open second SSH connection to perform the above task. Alternatively, you could exit all the chroots and then run them again, but who would want to do that?

Remember that the correct server's network configuration has to be in place for you to be able to connect over SSH after reboot.

At this point, all the pieces should be in place and you should be able to successfully login to your fresh Slackware installation after the server is rebooted.

NOTE: I know I allow for root login over SSH. I have to live with that. :-^

Sources

Originally written by Andrzej Telszewski[2346]

howtos, author atelszewski

Installing Software

Overview

There are three basic ways to install software in Slackware: install a pre-build binary package, make your own package, or compile the sources and install the resulting binaries manually. If you need to compile a program from source code, making it into your own package is easy and useful. Here's how these methods work.

Installing Pre-built Binary Packages

To install a package you first need to get the package.

Official packages can be found on the Slackware CD-ROM or the Slackware FTP/HTTP mirrors. The package browser can be found at http://packages.slackware.com/[2347].

Unofficial, community contributed binaries can be searched for at http://slackfind.net/[2348] which indexes the most well-known community repositories and Slackware-compatible spin-offs like http://slacky.eu/[2349] http://salixos.org/[2350] and more.
Usually a package file name ends with .tgz or .txz and looks something like “mozilla-firefox-14.0-x86_64-1.txz”. The more universal naming scheme is “PRGNAM-VERSION-ARCH-BUILD.txz” where ARCH denotes the architecture for which the package was built (examples are x86_64, i486. armv6l, armv7hl, noarch) and the BUILD number is not just used to mark incremental package updates but also allows community packagers to add their own build tag³⁸⁾ which makes them unique.
Make sure you get the Slackware package built for the correct architecture and made for your version of Slackware!

To install the package you need to change to the root user. Run either the command su - or sudo -i and enter your root password. Now run the command

  upgradepkg --install-new your-long-package-file-name

You should see a bunch of text running across your screen telling you about the package being installed, and possibly about an old package it might be replacing.

Make a Package

From Source

The recommended way to build packages from source is to use or create SlackBuild scripts[2351].

However, there are other utilities such as slacktrack[2352] (part of Slackware itself), src2pkg[2353] and checkinstall[2354] which automate the package creation process entirely (with a few user inputs), but these are not guaranteed to work with all possible kinds of source projects.

From third-party package formats

Binary packages from other distributions can be converted to Slackware packages by using conversion tools. Although building packages from source is always better, there are some situations which might warrant the use of these tools.

rpm2tgz which is part of Slackware can be used to convert .rpm packages to Slackware packages.

deb2tgz[2355] converts .deb packages to Slackware packages.

alien[2356] is a tool used to convert packages to and from different distribution package formats.

Compiling from scratch

Some users still prefer the traditional method of compiling from source directly and installing using make install or a similar command.

The generic steps for standard GNU Autotools Makefiles are:

 ./configure
make
make install # as root

The configure script may take additional switches to enable or disable features or configure other build options.

Other build systems may involve different steps, depending on how the source project is set up. As always, it is best to read the upstream developer documentation to figure out how to compile and build a program for your system, including which dependencies to fulfill.

Community Repositories

Slackware Team:

Eric Hameleers regular packages[2357]; packages with patent restrictions[2358]; KDE bleeding edge[2359]; multilib[2360]

Robby Workman[2361]

Wider Community:

Dropline Gnome[2362]

Micro Linux Enterprise Desktop (MLED)[2363]

MATE SlackBuilds (MSB)[2364]

Ponce's Pimp My Slack[2365]

http://slacky.eu/[2366]

http://salixos.org/[2367]

Sources

Originally written by peterwwillis[2368] for the SlackDocs Wiki Project

Additional contributions by V.Harishankar[2369]

Additional contributions by Eric Hameleers[2370], with input from maciuszek

howtos, software, installing, package management, author peterwwillis

³⁸⁾

-Well-known tags are “_SBo” (slackbuilds.org), “alien” (Eric Hameleers), “_rlw” (Robby Workman), “ponce” (Matteo Bernardini)-

Hibernation with LVM, LUKS and a Swapfile

With this How To you can use a swap file instead a swap partition as described here[2371].

First create a swap file (you can choose another name and / or size if you want):

dd if=/dev/zero of=/swapfile bs=1M count=4096
mkswap /swapfile

Activate the swap:

swapon /swapfile

Check if the swap file is recognized by the system:

cat /proc/swaps
Filename                                Type            Size    Used    Priority
/swapfile                               file            4194300 0       -1

Add to the fstab

/swapfile        none             swap        defaults         0   0

For suspend/resume you need to append 2 kernel parameter in /etc/lilo.conf resume and resume_offset.

resume is the partition where the swap file is located (e.g /dev/sda, /dev/cryptslack/root) resume_offset is the beginning of the swap file on the resume partition, you can get the offset with:

sudo /sbin/filefrag -v /swapfile | head -n -3 | tail -n 1 | awk ' {print $3 }'

Your lilo entry should look like this:

# Append any additional kernel parameters:
append="vt.default_utf8=1 resume=/dev/cryptslack/root resume_offset=1134591"

You need to patch the initrd to recognize the resume_offset parameter

init-swapfile.patch

--- init.orig   2012-12-01 14:03:39.344538490 +0100
+++ init        2012-12-01 14:01:12.526373970 +0100
@@ -69,6 +69,7 @@
LUKSDEV=$(cat /luksdev)
LUKSKEY=$(cat /lukskey)
RESUMEDEV=$(cat /resumedev)
+RESOFFSET=$(cat /resoffset)
WAIT=$(cat /wait-for-root)
KEYMAP=$(cat /keymap)
INIT=/sbin/init
@@ -269,18 +270,35 @@
umount -l /mountkey
rmdir /mountkey 2>/dev/null
fi
-
-  # Resume state from swap
-  if [ "$RESUMEDEV" != "" ]; then
-    if ls -l $RESUMEDEV | grep -q "^l" ; then
-      #RESUMEDEV=$(ls -l $RESUMEDEV | awk '{ print $NF }')
-      RESUMEDEV=$(readlink -f $RESUMEDEV)
-    fi
-    echo "Trying to resume from $RESUMEDEV"
-    RESMAJMIN=$(ls -l $RESUMEDEV | tr , : | awk '{ print $5$6 }')
-    echo $RESMAJMIN > /sys/power/resume
-  fi
-
+
+if [ "$RESUMEDEV" != "" ]; then
+       # be lvm aware
+        RESUMEDEV=$(readlink -f ${RESUMEDEV} | awk -F '/' '{ print $3 }')
+       if [ -r "/sys/class/block/${RESUMEDEV}/dev" ] ; then
+       # try sysfs
+               read RESMAJMIN < "/sys/class/block/${RESUMEDEV}/dev"
+       elif [ -r "/proc/partitions" ] ; then
+       # otherwise run through /proc/partitions
+               while read m n b d jnk ; do
+                       if [ "$d" = "${RESUMEDEV}" ] ; then
+                               RESMAJMIN="$m:$n"
+                               break
+                       fi
+               done < "/proc/partitions"
+               fi
+       if [ -z "${RESMAJMIN}" ] ; then
+               # Device does not exist (not found in /proc/partitions)
+               exit 99
+       fi
+
+       if [ -n "${RESOFFSET}" ]; then
+                echo "Try resume from ${RESMAJMIN}:${RESOFFSET}"
+               echo "${RESMAJMIN}:${RESOFFSET}" > /sys/power/resume
+       else
+               echo "${RESMAJMIN}" > /sys/power/resume
+       fi
+fi
+

mkdir patched_initrd
cd patched_initrd
cp -r /boot/initrd-tree .
echo "1134591" > resoffset
patch < init-swapfile.patch

After successful patching, pack the initrd to /boot/initrd-swapfile.gz:

find . -print0 | cpio -ov -0 --format=newc | gzip -9 > /boot/initrd-swapfile.gz

I recommend to test this initrd first with another boot entry

image = /boot/vmlinuz
initrd = /boot/initrd-swapfile.gz
root = /dev/cryptslack/root
label = "Linux Swapfile"
read-only

Then you need to run lilo to save the changes

lilo

After a reboot you can suspend to your swap file as with your swap partition

You need the reboot, suspend also uses resume_offset to find the swap file

Sources

https://wiki.archlinux.org/index.php/Swap[2372]

https://answers.launchpad.net/ubuntu/+source/initramfs-tools/+question/193862[2373]

Originally written by fl0[2374]

howtos,swapfile,hibernation,suspend

Setting up a Slackware chroot

There are multiple reasons why you might want to set up a Slackware chroot:

building 32-bit packages on a 64-bit multilib system

building -stable packages on a -current system

building (and testing) packages for SBo on a clean system

For this guide, we'll create a chroot at /chroot_folder from slackware-14.1-install-dvd.iso.

Obtaining a Slackware installation of your desired architecture

Start with a Slackware installation DVD. Download it from from http://www.slackware.com/getslack/[2375] via torrent.

Installing the packages

Automatically

You can create your chroot and install Slackware into it using the following elegant script: http://tty1.uk/scripts/slackware/mkchroot[2376]

Manually

First, create a folder which will contain the chroot:

mkdir /chroot_folder

Mount the installation ISO:

mount -o loop slackware-14.1-install-dvd.iso /mnt/cdrom
cd /mnt/cdrom

After the ISO has been mounted, the packages (found under the slackware or slackware64 folder) can be installed to the chroot folder with:

installpkg --root /chroot-folder */*.t?z

Then unmount the ISO:

umount /mnt/cdrom

Setting up required files

fstab

The following minimal snippet can be used for /chroot_folder/etc/fstab

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
tmpfs           /dev/shm        tmpfs    defaults        0      0
devpts          /dev/pts        devpts   noexec,nosuid,gid=tty,mode=0620  0      0
sysfs           /sys            sysfs    defaults        0      0
proc            /proc           proc     defaults        0      0

Entering the Chroot

Automatic mount

To have the chroot mounted permanently, add the following to your host system's /etc/fstab:

/dev             chroot_folder/dev             none bind,auto 0 0
/proc            chroot_folder/proc            none bind,auto 0 0
/sys             chroot_folder/sys             none bind,auto 0 0
/etc/resolv.conf chroot_folder/etc/resolv.conf none bind,auto 0 0

And reboot. Then run the following command to mount the chroot folder:

mount /chroot_folder

Manual mount

Refer to: (volume_mounting[2377]).

Entering the Chroot

Now that the chroot is set up, one can chroot into it:

chroot /chroot_folder /bin/bash

Note

Wrote a small script to automate the chroot steps.

https://raw.githubusercontent.com/aadityabagga/scripts/master/chroot.sh[2378]

Updating packages

After that, you can run slackpkg and update the packages: (configure_a_package_manager[2379]).

Exiting

When you're done, exited the chroot by pressing Ctrl+d.

Usecase: Building 32-bit Packages

Mounting partitions

I use a chroot to build 32-bit packages on a 64-bit system. I needed to mount the partition which contained the SlackBuilds for which I wanted to make a package, As my Slackware host mount point is (in this example) at /slackware_host_mount_point, I used the command:

mount -B /slackware_host_mount_point /chroot_folder

(http://www.thegeekstuff.com/2013/01/mount-umount-examples/[2380])

Then I built the package by executing the Slackbuild as follows:

ARCH=i686 ./my_package.SlackBuild

An alternative way to build other ARCH packages

Instead of using `ARCH=i686' before running a slackbuild, we can use a program called `setarch', which, among other things, can set the ARCH and the kernel version in the shell. It has some handy symlinks, such as linux32 or i586, which saves some typing. The `linux32' command will set the reported kernel's ARCH as `i686'.

SYNOPSIS

  setarch arch [options] [program [argument...]]

When we run `linux32' it starts a new shell, so we can also use it to chroot:

  chroot /path/to/chroot linux32 /bin/zsh

or it could be run after chrooting into our new root. Settings will revert to normal when we exit the new shell. One useful option is to change the kernel's reported version:

  chroot /path/to/chroot linux32 --uname-2.6 /bin/zsh

That `–uname-2.6' isn't a typo, there has to be a dash between the flag and the version. The setarch(8) man page shows all the options.

– Dave

See also

https://wiki.archlinux.org/index.php/Chroot[2381]

http://www.linuxquestions.org/questions/slackware-installation-40/install-slackware-to-a-folder-using-chroot-825598/#post4093831[2382]

Sources

* Originally written by Aaditya[2383]

howtos

Install Fonts

AS ROOT:

Copy your font files (.ttf and/or .otf) to their respective directories:

/usr/share/fonts/TTF
/usr/share/fonts/OTF

Run the following commands, with the directory where you copied the fonts as argument:

mkfontdir /usr/share/fonts/{TTF,OTF}
mkfontscale /usr/share/fonts/{TTF,OTF}
fc-cache -f -v

Restart X.

Sources

Originally written by arfon[2384]

howtos, software, fonts, truetype, opentype, author arfon

rdiff-backup

If you care about your data, you must back it up. The best backup scheme is one that is always on, and that happens without human interaction.

There are many tools for backing up systems, some with centralised management, others with fancy user interfaces, and others that are designed to be simple, easy to configure, and easy to use. The rdiff-backup tool falls into the latter category.

In this article, you will learn to:

Install rdiff-backup

rdiff-backup –exclude-globbing-filename $HOME/.excludes $HOME /path/to/drive

Automate rdiff-backup with cron

Restore from a backup

Requirements

To backup your machine properly, you should have:

A client machine you want to backup, capable of running rdiff-backup

A server to receive backup data, capable of running rdiff-backup

Passwordless SSH access to your server

If you do not have a server that you can use as a backup server, you can just backup to an external or networked hard drive. It's not off-site, so it's not ideal, but it's better than not backing up at all.

Install

The rdiff-backup project is hosted at http://rdiff-backup.nongnu.org/[2385] but the easiest way to install it is from SlackBuilds.org

You must install rdiff-backup on both the client computer being backed up and the server to which it is sending backup files. This means you are preforming two installs of rdiff-backup.

The server to which you backup does not need to also be running Slackware, as long as rdiff-backup is available for it, it will work as an rdiff-backup server.

To install rdiff-backup:

Install its dependency, librsync, from https://slackbuilds.org/result/?search=librsync[2386]

Install rdiff-backup from https://slackbuilds.org/result/?search=rdiff-backup[2387]

Configure

Unlike many popular UNIX backup applications, rdiff-backup requires no configuration. It is ready to use immediately after installation.

Backing up your data to a remote server

With rdiff-backup installed on both the client machine and the destination server, and assuming that your server is using SSH keys for access, start your first backup:

$ rdiff-backup -v 8 $HOME username@your-server.com::/path/to/backup/dir

username on the server must be a valid user name for that server (this might be different from your local user name).

dir on the server must already exist, and it should be a safe place meant to contain all of your user's backup files.

The initial backup takes longer than subsequent backups, because it is generating backups for your entire home directory. In future backups, only diffs are generated.

Backing up to a local drive

If you do not have access to any off-site server for your backups, then you should still back up using an external hard drive.

Your hard drive must be formatted such that you have read and write permissions. Ideally, it should be formatted with a good open source file system, such as EXT4, JFS, or UDF.

To start your first backup, attach your hard drive and mount it. Create a destination directory on the hard drive to hold your backup files.

Start your backup:

$ rdiff-backup -v 8 $HOME /path/to/backup/dir

The initial backup takes longer than subsequent backups, because it is generating backups for your entire home directory. In future backups, only diffs are generated.

Backing up a single file

Sometimes you might want to just backup a single file:

$ rdiff-backup --include $HOME/foo.txt --exclude '**' $HOME username@your-server.com::/path/to/backup/dir

Excludes

There are often things in your home directory that aren't important enough to back up. You can (and arguably should) exclude these files from being backed up.

Create a file to contain a list of your excluded locations. Open the file in a text editor and list each directory or file you want excluded from the rdiff-backup process. Such a file is easy to create: you can just echo the path of a directory or file into, for instance, ~/.excludes. If the file does not exist, the file will be created for you, and the entry added.

$ echo '$HOME/.local/share/Trash' >> ~/.excludes

As you find more files that you want to exclude, use the same command.

$ echo '$HOME/downloads' » ~/.excludes $ echo '$HOME/tmp' » ~/.excludes

Add the file containing your excludes to your rdiff-backup command. For instance:

rdiff-backup --exclude-globbing-filelist \
$HOME/.excludes \
$HOME \
username@your-server.com::/path/to/dir \

Automating backups

Although you can backup manually with the rdiff-backup command, it's important to automate backups to buffer against human forgetfulness. Automate rdiff-backup with cron.

For example, to run a backup once a day at 23:00:

0 23 * * * rdiff-backup --exclude-globbing-filelist $HOME/.excludes $HOME username@your-server.com::/path/to/dir

To run backups every other hour only during 9:00 to 17:00 (business hours):

0 9,11,13,15,17 * * * rdiff-backup --exclude-globbing-filelist $HOME/.excludes $HOME username@your-server.com::/path/to/dir

And so on. If you are unclear, there are several good examples online, probably for the exact schedule you are planning.

Recovering lost data

You should periodically verify your backups to make sure that what you think is happening is actually happening. The easiest way to do this is to recover a file.

Create a test file called ~/back.up

$ date >> ~/back.up

Let the file get backed up by your backup script.

Once your script has run, remove the file and attempt to restore it.

Restore the most-recently backed-up version of a file:

$ rdiff-backup --restore-as-of now username@your-server.com::/path/to/dir/back.up $HOME/back.up

If you are using a hard drive for backups, use the path to the hard drive:

$ rdiff-backup --restore-as-of now /path/to/dir/back.up $HOME/back.up

Continue to check the health of your backups periodically. For instance, to recover a file from 3 days ago:

$ rdiff-backup --restore-as-of 3D /path/to/dir/back.up $HOME/back.up

Other acceptable time formats include 21m34s (21 minutes and 34 seconds ago) and full dates like 2017-01-11.

For more options, see the TIME FORMATS section of the rdiff-backup man page.

Incremental recovery

If you know even more detail about your file, you can use rdiff-backup to restore directly from an incremental backup file.

Increment files are stored in your backup destination (your server or backup drive) in the location rdiff-backup-data/increments

Incremental backups hold previous versions of changed files. You can specify one directly to get an exact iteration of a file:

$ rdiff-backup /path/to/dir/rdiff-backup-data/increments/craft.2017-10-31T18:06:06-01:00.diff.gz $HOME

Sources

* Originally written by User klaatu[2388]

howtos, template

How to copy files \ directories \ filesystems via network.

The article describes ways of copying content over network.

When upgrading a home server, I copy all the data from the old server to a new system. In the examples below, I work from the new server and both servers are on the same subnet:

New server (IP: 192.168.0.14)

Old server (IP: 192.168.0.1)

Both the ssh and scp commands communicate over a secure connection (TCP port 22). Please note that you need to enable the sshd daemon on the remote host.

Copy Files / Directories

If you need to copy single files or directories, you can use the scp command:

scp -r -v -p root@192.168.0.1:/etc /local_dir

Flag explanation:

-r: recursive (copy all the content of /etc including its subdirectories)

-p: preserve file attributes (eg. file creation or modification times)

-v: verbose output

In the example above we copy the /etc directory located on a remote host (the old server: 192.168.0.1) to /local_dir on the local host (“new” server).

Please note that the scp command cannot copy the whole file system hierarchy including /proc, /dev or /lost+found. Fortunately, there is a workaround which was provided[2389] by Patrick Volkerding.

Copy whole filesystem hierarchy

The following command should successfully copy a whole filesystem hierarchy:

ssh root@192.168.0.1 "(cd / ; tar cf - . )" | (mkdir -p /local_dir ; cd /local_dir ; umask 000 ; tar xvf -)

Sources

Originally written by John Ciemgals[2390] 2013/02/10 03:51

With help from Patrick Volkerding

howtos, copy, ssh

Free your space

Sometimes you can find yourself in a situation where you are suddenly faced with a message telling you that there’s no more free space on your system. There might be a few things you can do to free some of it.

/tmp directory

The first reason can be a /tmp directory which doesn’t get cleaned automatically. I create my own temporary files in my home directory so I can safely delete the contents of /tmp every time I shut down the system. You don’t have to do it manually, though.

The following command should be placed in /etc/rc.d/rc.local_shutdown.

/etc/rc.d/rc.local_shutdown.append

/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -exec /bin/rm -rf {} +;

This will delete ALL the files in the /tmp directory every time the system shuts down, so be careful what you put there!

The rc.local_shutdown file can also be useful in other ways. If you need to perform any other tasks on shutdown, you can put them here. As this file doesn’t exist on the default installation of Slackware, you need to create it first and make it executable:

root@darkstar# touch /etc/rc.d/rc.local_shutdown
root@darkstar# chmod +x /etc/rc.d/rc.local_shutdown

Remember to test your commands well before you include them in the shutdown file.

Alternatively, if you have enough RAM, you may mount the /tmp in tmpfs by adding the following to /etc/fstab.

/etc/fstab.append

tmpfs	/tmp		tmpfs	size=4G,nodev,nosuid	0	0

You can restrict the size of /tmp (max. 4GB in the example above) to avoid running out of memory.

There is also a more prudent way of cleaning up your tmp directory; this method consists of allowing the temporary files to exist for more than the amount of time between startup and shutdown. The following script selects files which haven't been touched for a certain amount of time and doesn't remove sockets for X. One could decide to run this script using cron on a regular basis.

cleanstale.sh

#!/bin/sh
# Cleanup /tmp however, do not remove sockets for X

# No lost+found with reiserfs
find /tmp/lost+found -exec /bin/touch {} \;
find /tmp -type s -exec /bin/touch {} \;
find /tmp -type d -empty -mtime +37 -exec /bin/rmdir {} \;
find /tmp -type f -mtime +37 -exec rm -rf {} \;

Again, please test scripts very carefully before deploying them on your system. As always: your mileage may vary.

sbopkg

root@darkstar# sbopkg -o
[ Checking for obsolete sources ]
This may take a few moments. Press <ESC> to abort.
100%[====================================================]
It appears there are no obsolete sources in /var/cache/sbopkg.

If you do not need the sources of packages installed via sbopkg, you may also want to clean the whole sbopkg cache. You can do it in sbopkg’s utility menu.

Finding files/directories taking up most space

It’s also good practice to find directories/files that take up most space. The following command will display 20 largest files/directories in a specified place (in this example Fred's home directory):

find_largest.sh

du -a /home/fred/ | sort -n -r | head -n 20

You can go through the list and decide whether you want to delete any of them.

A quicker approach might be to use ncdu[2391], du's ncurses frontend. Not only does it display directories in your chosen order (ascending/descending, by size/name), but also lets you interactively browse (and be careful: delete) them.

To make sure you don’t delete something by accident, you can run the program in the read-only mode calling it with the -r flag.

Apart from ordering the files/directories by size or name, there are also a number of interesting display options like showing percentage or graph, showing/hiding hidden or excluded files and directories (you can exclude certain directories or files if you want.)

Although it is not part of the stock Slackware, it can be easily installed from SlackBuilds.org[2392] (it does not have any additional dependencies.)

Remove unnecessary programs

Another way of freeing some space is by uninstalling the apps that you no longer need. If you don’t know what you are doing, it is NOT recommended to uninstall anything from the Slackware’s default installation. You might break some parts of the system . A safer approach would be to uninstall some 3rd party applications. Long time ago you may have installed some applications from SlackBuilds[2393] that you no longer use. You can remove 3rd party programs using the following command:

root@darkstar# slackpkg clean-system

This will list all 3rd party packages and let you select the ones you want to remove. In order for an application to be included in slackpkg list it must have been built and installed the Slackware way, ie. by using a SlackBuild[2394]. Otherwise, it will not be part of the Slackware package management system.

If there's no SlackBuild for a program you want to install, try to create one[2395] or use the excellent src2pkg[2396] tool.

Disk Cleanup Utilities

Here are a list of disk cleanup utilities you might find useful to remove unnecessary or temporary files from your system.

Sweeper[2397] - A KDE disk cleanup application.

BleachBit[2398] - BleachBit quickly frees disk space and tirelessly guards your privacy. Free cache, delete cookies, clear Internet history, shred temporary files, delete logs, and discard junk you didn't know was there. A Slackbuild is available at SlackBuilds.org[2399].

Sources

Originally written by sycamorex[2400]

Based on sycamorex's blog article here [2401]

Additional inputs by Harishankar[2402] (Disk Cleanup Utilities section)

Contrbutions by cpt[2403] (cleanup script), original script has been copied from a mail-list, cpt does explicitly not claim to be the original author of this script.

howtos, software, free, space, author sycamorex

KVM and libvirt

With the combination of KVM and libvirt, you have an easy way of creating and managing virtual machines.

According to the official homepage[2404], libvirt is: A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It provides management of virtual machines, virtual networks and storage; both local and remote. Since libvirt acts as an intermediate between a hypervisor and client applications, you must have a supported hypervisor installed. Examples are: KVM/QEMU, Virtualbox, Xen and VMware ESX.

Quote[2405]: KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (Intel VT or AMD-V). It consists of a loadable kernel module, kvm.ko, that provides the core virtualization infrastructure and a processor specific module, kvm-intel.ko or kvm-amd.ko.

Installation

Libvirt can be installed using a slackbuild script from slackbuilds.org[2406]. It provides a daemon that interacts between applications and virtual machines. It also provides a command-line shell, virsh, that can be used to manage virtual machines and to configure the libvirt environment. Virsh can also be used in shell scripts to start and stop virtual machines.

The slackware kernel has the KVM module enabled. The libvirt startup script will check the CPU and modprobe the correct driver. User-space tools are supplied with QEMU, which is available from slackbuilds.org[2407]. Previously, a modified QEMU, qemu-kvm, was used. Since version 1.3 however, QEMU incorporates those changes and qemu-kvm is depricated.

A graphical desktop management tool, virt-manager, is also available on slackbuilds.org. This provides an overview of all virtual machines and has a nice wizard to create new virtual machines in an easy way.

Configuration

Automatic startup

If you want to have the libvirt daemon started automatically, add the following section to /etc/rc.d/rc.local:

# start libvirt
if [ -x /etc/rc.d/rc.libvirt ]; then
/etc/rc.d/rc.libvirt start
fi

Make sure /etc/rc.d/rc.libvirt is executable.

Managing storage pools

Storage in libvirt is handled in terms of storage pools and storage volumes. A pool is a generic container for various storage objects. It can be a local directory, physical partition, or a network share. A storage volume is the virtual representation of a disk for a guest system. On the guest, this volume is seen as a local disk. An iso image of an installation cd or dvd is also considered a volume.

When libvirt is installed, a default storage pool (called default) is created with local directory /var/lib/libvirt/images. Any newly created volumes are created in this directory.

Create a new directory-based storage pool using virsh

Virsh commands can be passed as parameters to virsh on the command line, or you can start an interactive virsh shell by calling virsh without parameters :

# virsh
Welcome to virsh, the virtualization interactive terminal.
Type:  'help' for help with commands
'quit' to quit
virsh #

To create a new directory-based storage pool, first make sure the target directory exists. Then use the pool-define-as command. The basic syntax for this command is : pool-define-as <pool-name> dir - - - - <directory-name>. For example, to create pool disks for directory /srv/virtualmachines/disks, use the following command:

# virsh pool-define-as disks dir - - - - /srv/virtualmachines/disks
Pool disks defined

For more complex examples of this command, check the man-page for virsh.

Check that the pool exists with the pool-list command. The -all option shows both active and inactive pools :

# virsh pool-list --all
Name                 State      Autostart
-----------------------------------------
default              active     yes
disks                inactive   no

Now, build the actual pool with the pool-build command :

# virsh pool-build disks
Pool disks built

When the pool is built, it can be started with the pool-start command :

# virsh pool-start disks
Pool disks started

Now the new pool can be used. At this point, the pool must always be started manually. In order for libvirt to start the pool when the daemon is started, you must check the autostart flag with the pool-autostart command:

# virsh pool-autostart disks
Pool disks marked as autostarted

Display information about the pool with the pool-info command :

# virsh pool-info disks
Name:           disks
UUID:           4ae08c3d-4622-9f2a-cfa9-9dea4d1eb465
State:          running
Persistent:     yes
Autostart:      yes
Capacity:       697.92 GiB
Allocation:     250.89 GiB
Available:      447.04 GiB

Create a new directory-based storage pool using virt-manager

First, make sure the target directory exists. Then start virt-manager.

Select the host machine (default is localhost). Select Edit, Connection Details from the menu, or right-click the machine and select Details, or double-click the machine. The Connection Details window appears. Select the Storage tab.

Press the + button on the bottom left. The Add Storage Pool window appears.

Enter the name of the new pool. The default type is dir, which is the correct type. Press Forward and enter the system directory in the Target Path entry field. Press Finish to create the pool.

Creating a new virtual machine

Creating a new virtual machine using virt-manager

Select the host on which you want to create the new virtual machine. This will be localhost by default. Either right-click the host and select New, or click the Create button to start the Creation wizard.

Step 1: Name the new machine and select the method of OS installation and press Forward.

Step 2: Depending on the method of installation, you are asked here to enter more details, such as the name of the dvd iso image used.

Also choose the OS type and version. When choosing Linux, choose Show all OS options at the Version prompt to get more options. When Choosing Generic 2.6.x kernel, the wizard will assume an IDE type hard disk. You can change this at step 5.

If you choose Generic 2.6.25 or later kernel with virtio, the new machine will use the virtio kernel driver to emulate a hard disk controller. The Slackware installation image will boot, but you need to create an initrd with the virtio kernel drivers included, otherwise your new machine won't boot.

Step 3: Select the amount of RAM and CPUs.

Step 4: Set up storage for the new machine. This option is checked by default. If you deselect this option, you will have a diskless machine that can still boot live distros.

You can let the wizard create a new disk image on the fly. Enter the size and a new disk image (type raw) will be created in the default storage pool. If you select Allocate entire disk now, the full size of the new disk is allocated in advance. Otherwise, a smaller image is created that will grow when data is written to the disk.

Alternatively, you can select another disk image (volume) from a storage pool. You can also use this option to create a new storage volume. This method will give you more flexibility, because you have more options on the type of disk you can create. Lastly, you can use this option to browse the local filesystem and select a disk image you created earlier.

Step 5: This will give an overview of the new machine

If you check Customize configuration before install, you will be presented with the hardware configuration page of virt-manager. Here you can make changes to the machine before installing.

The default network option on step 5 is Virtual network 'default' : NAT. This virtual network will use the virbr0 bridge device to connect to the local host using NAT. Libvirt will start dnsmasq to provide DHCP for this network.

Finally, you can change the type of virtual machine (KVM or QEMU) and the architecture (x86_64, i686, arm, etc.). Press Finish to create the virtual machine. It will be created and booted.

Networking

A virtual machine can be set up in one of two ways: connected to a virtual network or connected to a shared physical device (bridged).

Virtual networks

Virtual networks are implemented by libvirt in the form of virtual switches. A virtual machine will have it's network card plugged into this virtual switch. The virtual switch appears on the host as a network interface.

The virtual network can operate in 3 different configurations:

NAT: the virtual switch is connected to the host LAN in NAT mode. The host can connect to the VM's but other machines on the host network cannot. This is the default configuration.

Routed: the virtual switch is connected to the host LAN without NAT.

Isolated: the virtual switch is not connected to the host. Virtual machines can see each other and the host, but network traffic does not pass outside the host.

Dnsmasq and iptables

DHCP and DNS on the virtual networks is handled by Dnsmasq. For every virtual network that is started, a separate instance of Dnsmasq is started by libvirt.

When starting a virtual network, libvirt will also add iptables rules to handle routing and NAT between the host and the virtual network. It will also enable ip_forward.

Default network

After installation, one network (appropriately called default) is already created. It is configured as type NAT and this is the default network that is linked to new virtual machines. The network is setup to start automatically when libvirt is started, so it is immediately available when libvirt is running.

The network is visible on the host as bridge virbr0.

Do not add physical interfaces to this bridge. It is handled by libvirt.

Creation and maintenance

Virtual networks are visible on the Virtual Networks tab of the Host Connection Details window in Virtual Machine Manager. The + key can be used to add a new virtual network. Enter the name, IPv4 network address, DHCP range and the type of network.

Once the virtual network is created, it can be used in the virtual machine maintenance screens.

Shared folders using VirtFS

It is possible to share folders between the guest and host system using VirtFS (Plan 9 folder sharing over Virtio). This is available from kernel version 2.6.36 onwards. VirtFS is a passthrough filesystem, which means that a directory on the host can be directly accessed from the guest through the virtualization layer.

Prepare host kernel

Make sure the following options are set in the host kernel:

CONFIG_NET_9P=y
CONFIG_NET_9P_VIRTIO=y
CONFIG_NET_9P_DEBUG=y (Optional)
CONFIG_9P_FS=y
CONFIG_9P_FS_POSIX_ACL=y

On the guest system, modules 9p, 9pnet and 9pnet_virtio are needed. These should be available in the standard Slackware kernel.

Guest configuration

In virt-manager, edit the guest virtual machine and add new hardware. Select Filesystem and fill the required fields as shown below.

Mode. Select one of the following:

Passthrough: the host share is accessed with the permissions of the guest user.

Mapped: the host share is accessed with the permissions of the hypervisor (QEMU process).

Squash: Similar to passthrough except that failure of privileged operations like chown are ignored. This makes a passthrough-like mode usable for people who run the hypervisor as non-root.

Driver: use Path.

Write Policy (only available for path driver): use Default.

Source path = directory on the host which is shared.

Target path = mount tag that is made available on the guest system. This doesn't have to be an existing path.

Option Export filesystem as readonly mount does what it suggests.

Mounting the share

To mount the filesystem with tag hostshare on the guest at /mnt/share, logon to the guest and use:

# mount -t 9p -o trans=virtio,version=9p2000.L hostshare /mnt/share

Now the /mnt/share folder is available and changes are visible on the host and the guest. When permission errors occur, try sharing the host directory with a different mode.

Remote access

Work in progress

Advanced topics

Mount qcow image using nbd

Raw disk images can be mounted outside the virtual machine using a loopback device. To mount other image types like qcow, the qemu-nbd command can be used, which comes with qemu-kvm. It relies on the nbd (network block device) kernel module.

Start by loading the kernel module. The only parameter is the maximum partitions to be accessed. If this parameter is omitted, the default value is 0, which means no partitions will be mapped.

# modprobe nbd max_part=8

This will create various new devices /dev/nbdxx. Now the disk image can be connected to one of them:

# qemu-nbd -c /dev/ndb0 slackware.img

This will create additional devices /dev/nbd0pxx for the partitions on the disk. Partitions are numbered sequentially starting with 1. You can use the nbd0 device to access the whole disk, or the nbd0pxx devices to access the partitions:

# fdisk /dev/nbd0
# mount /dev/nbd0p1 /mnt/hd

Make sure the virtual machine is not running when you mount the disk image. Mounting the disk of a running machine will damage it.

To remove the connection:

# qemu-nbd -d /dev/nbd0

Setup PXE boot in libvirt

To enable PXE booting for the guest machines, a PXE boot server and a TFTP server are needed. Libvirt can be configured to handle both internally. These configuration options are not available in virt-manager, so virsh must be used to set this up.

Create a directory /tftpboot and fill with the required files for the tftp boot service. See the article PXE: Installing Slackware over the network[2408] by AlienBOB for more details.

Stop the default network and edit the network definition:

# virsh net-destroy default
# virsh net-edit default

This will open the network configuration in a vi session. Add the tftp and bootp parameters in the ip section and save the file:

  <ip address='192.168.122.1' netmask='255.255.255.0'>
<tftp root='/tftpboot' />
<dhcp>
<range start='192.168.122.2' end='192.168.122.254' />
<bootp file='pxelinux.0' />
</dhcp>
</ip>

Now restart the network:

# virsh net-start default

Now the libvirt DHCP server will allow guests to PXE boot.

Troubleshooting

Remove password prompt in virt-manager

When you start virt-manager as a regular user, you may still be asked for the root password, even when you have setup the correct unix socket permissions (notification: “system policy prevents management of local virtualized systems”). This is because older versions of libvirt were using PolicyKit by default. Disable the use of PolicyKit by editing /etc/libvirt/libvirtd.conf. Uncomment the following options and change them to none :

auth_unix_ro = "none"
auth_unix_rw = "none"

Improve mouse movement

In graphics mode, the mouse movement can be erratic and difficult to change in the settings of your VM. To solve this, add a virtual tablet.

In virt-manager, open the VM by double-clicking on the machine and select the hardware info screen (the blue i button). Now, press +Add Hardware and select Input. Select Type EvTouch USB Graphics Tablet and press Finish. The next time the VM is started, the mouse movement is synchronized with your desktop cursor.

Change screen resolution to higher than 1024x768

The default emulated video card is of type Cirrus. This has a maximum resolution of 1024×768. The vga type can achieve a higher resolution, but for that to work, the X configuration in the guest OS needs to be changed as well.

To change this, open the VM and select the hardware info screen. Select the Video card and change the type to vga.

Start the VM. If a file /etc/X11/xorg.conf exists, change that. Otherwise create a new text file in /etc/X11/xorg.conf.d with extension conf, for example /etc/X11/xorg.conf.d/monitor.conf.

Add or change the following sections:

Section "Monitor"
Identifier "Monitor0"
HorizSync   30 - 80
VertRefresh 40 - 90
EndSection
Section "Device"
Identifier "Card0"
Driver     "vesa"
Endsection
Section "Screen"
Identifier "Screen0"
Device     "Card0"
Monitor    "Monitor0"
SubSection "Display"
Viewport 0 0
Modes "1440x900"
EndSubSection
EndSection

You can change the screen resolution (the Modes line) depending on your needs.

Resources

Official pages for libvirt[2409], virt-manager[2410], QEMU[2411], KVM[2412].

Red Hat Virtualization Administration Guide[2413].

Sources

This page originally written by Frank Donkers[2414]

howtos, kvm, libvirt, virtualization, virt-manager, qemu, author fdonkers

Task Scheduling in Linux

Overview

This article discusses some tools used in a Linux system to schedule tasks to run automatically at specified time intervals or at any given point of time in the future. This primer will not cover these commands in-depth; this is just a brief introduction to using these commands. See the individual HOWTOS for each command for an in-depth look at all relevant options and configurations.

Some task-scheduling daemons used in Linux/UNIX are:

at[2415] – schedule one-time tasks for the future

cron[2416] – the periodic scheduler most commonly used

anacron[2417] – anachronistic cron; a periodic scheduler that doesn't rely on the system being left on 24×7

Using at

The at command allows a user to execute commands or scripts at a specified time (required) and date (optional). The commands can be entered via standard input, redirection, or file.

darkstar:~% at

Interactive at

Using the command at with standard input (keyboard) is a little more complicated than typing one line in at the prompt. The command uses an internal “sub-shell” to gather the required information. Once the command information entry is complete, Ctrl+D (EOT) will signify entry completion. The -m flag specifies a mail message will be sent to the user when the job is finished, regardless if any output was created.

darkstar:~% at 12:01 -m
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
at> ./my_script.sh
at> <EOT>
job 4 at 2015-06-22 12:01
darkstar:~%

File-driven at

Commands can also be contained within a file and run by at:

darkstar:~% at 12:32 -m -f /usr/local/bin/my_script.sh
warning: commands will be executed using (in order) a) $SHELL b) login shell c) /bin/sh
job 8 at 2015-06-22 12:10

The -m flag will email the user after completion of the command; the -f flag specifies the command will read the job from a file, not from standard input. After the command is typed in (and the appropriate warning is displayed), the at job number³⁹⁾ is displayed.

at Internal Scheduling

The job numbers provided after a command is typed in, or when a file is read, allow the user to know which internal job will be run in sequential order. If a user wants to delete a specific task, all that needs to be known is this internal job number. To remove the job, the command atrm (at remove) is used:

darkstar:~%  at -l
7      2015-06-22 12:10 p tux
8      2015-06-22 12:15 p root

The command atq (at queue) is the same as at -l:

darkstar:~%  atq
7      2015-06-22 12:10 p tux
8      2015-06-22 12:15 p root

To remove the user job, use atrm with the job number:

darkstar:~%  atrm 7

Using cron

cron is a daemon that runs tasks in the background at specific times. For example, if you want to automate downloads of patches on a specific day (Monday), date (2 July), or time (1300), cron will allow you to set this up in a variety of ways. The flexibility inherent in cron can allow administrators and power users to automate repetitive tasks, such as creating backups and system maintenance.

cron is usually configured using a crontab file. The following command will open your user account crontab file:

darkstar:~% crontab -e

To edit the system-level crontab, first log into the root account:

darkstar:~# crontab -e

If your system has sudo installed, type in:

darkstar:~% sudo crontab -e

The crontab file syntax is:

 # * * * * *  command to execute
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ └───── day of week (0 - 6) (Sun(0) /Mon (1)/Tue (2)/Wed (3)/Thu (4)/Fri (5)/Sat (6))
# │ │ │ └────────── month (1 - 12)
# │ │ └─────────────── day of month (1 - 31)
# │ └──────────────────── hour (0 - 23)
# └───────────────────────── min (0 - 59)

Using an asterisk in any placeholder location, will match any value. For example, the following will run example_script.sh at noon (1200) everyday during the first three months of the year:

#For more information see the manual pages of crontab(5) and cron(8)
#
# min hr day month weekday command
#
#
0 11 * 1-3 * /home/user/example_script.sh

Using anacron

anacron is not installed in Slackware by default.⁴⁰⁾

anacron is unique from cron in the respect that it does not expect the operating system to be running continuously like a 24×7 server. If the time of execution passes while the system is turned off, anacron executes the command automatically when the machine is turned back on. The reverse is not true for cron - if the computer is turned off during the time of scheduled execution, cron will not execute the job. Another key difference between anacron and cron is the minimum chronological “granularity” - anacron can only execute jobs by day, versus the ability of cron to execute by the minute. Finally, anacron can only be used by root, while cron can be used by root and normal users.

Sources

Originally written by vharishankar[2419]

Contrbutions by mfillpot[2420], tdrssb[2421]

Example crontab example modified from en.wikipedia.org/wiki/cron[2422]

howtos, task scheduling, needs attention, author vharishankar, author mfillpot

³⁹⁾

As distinct from a process ID (PID) known to the operating system

⁴⁰⁾

See Slackbuilds.org[2418] for more information on anacron on Slackware

Todo Lists in TaskWarrior

Taskwarrior[2423] is a powerful command-line todo list manager which can be installed from SlackBuilds.org[2424]. Please note that it depends on Lua[2425].

Managing Your Todo List

You can use TaskWarrior in 2 ways:

1. By invoking the Task Shell and issuing TW commands:

% task shell
task 2.1.1 shell
Enter any task command (such as 'list'), or hit 'Enter'.
There is no need to include the 'task' command itself.
Enter 'quit' (or 'bye', 'exit') to end the session.
task>

2. By typing TW commands directly from a system shell (eg. Bash) preceded with the task command. This is the approach we are going to take in this tutorial. In order to limit the amount of typing we could create a shell alias. If you use Bash, please edit (or create) the following file ${HOME}/.bashrc:

/${HOME}/.bashrc

alias t=task

In this HOWTO we are going to use the full task command.

Adding Tasks

% task add Email Bob
Created task 1.
% task add priority:H Book a ticket
Created task 2.

We have just created 2 tasks with the second one being of high priority.

Adding Due Dates

% task 1 modify due:09/09/2012
% task 4 modify due:today
% task 5 modify due:3days

Displaying Tasks

% task
ID Project Pri Due        A Age Urgency Description
2         H                            Book a ticket
1             09/09/2012               Email Bob
2 tasks

Please note that because of high priority, task 2 is at the top of the list. There are a few ways you can list your tasks: * task * task minimal * task ls * task list * task long

Each method differs in terms of the amount of displayed information.

Starting a Task

% task 1 start

Marking Tasks as Done

% task 2 done
Completed task 2 'Book a ticket'.
Completed 1 task.
% task ls
ID Project Pri Description
1             Email Bob
1 task

Deleting Tasks

% task 1 delete

Alternatively, you can undo the task you've just created:

% task undo

Duplicating Tasks

We have got the following task:

ID Project Pri Due A Age Urgency Description
4         H          3s       6 Phone Lennart about the code

You can duplicate the task with some modifications

% task 4 duplicate /Lennart/Linus/

ID Project Pri Due A Age Urgency Description
4         H          1m       6 Phone Lennart about the code
5         H          7s       6 Phone Linus about the code

Modifying Tasks

You have just realised that one of your tasks contains a spelling mistake:

ID Project Pri Due A Age Urgency Description
...
6                   16s       0 Install Slakware on the lappy

We can modify an existing task:

% task 6 modify /Slakware/Slackware/g

ID Project Pri Due A Age Urgency Description
4         H         14m       6 Phone Lennart about the code
5         H         14m       6 Phone Linus about the code
1                   43m       0 Email Bob
2                   33m       0 Install Opera
3                   31m       0 Upgrade Angband
6                   12m       0 Install Slackware on the lappy
7                    6m       0 Create a SlackBuild for my new program
8                    4m       0 Buy a present for Billy
9                    4m       0 Test my SlackBuilds on Slackware 14
10                    2m       0 Feed the dog
11                    2m       0 Change my email address on SlackBuilds.org
12                   28s       0 Tax Return
13                    1s       0 Upgrade SlackBuilds

% task 1-6 modify project:misc
% task 7,9,11,13 modify project:SB
% task 8,10 modify project:home

ID Project Pri Due A Age Urgency Description
13 SB      H         13m       7 Upgrade SlackBuilds
10 home    H         16m       7 Feed the dog
4 misc    H         28m       7 Phone Lennart about the code
5 misc    H         28m       7 Phone Linus about the code
12         H         14m       6 Tax Return
9 SB      M         18m     4.9 Test my SlackBuilds on Slackware 14
11 SB      M         16m     4.9 Change my email address on SlackBuilds.org
8 home    M         18m     4.9 Buy a present for Billy
1 misc    M         57m     4.9 Email Bob
6 misc    M         26m     4.9 Install Slackware on the lappy
7 SB      L         20m     2.8 Create a SlackBuild for my new program
2 misc    L         47m     2.8 Install Opera
3 misc    L         44m     2.8 Upgrade Angband
13 tasks

You can display a breakdown of your projects:

% task projects
Project Tasks Pri:None Pri:L Pri:M Pri:H
(none)      1        0     0     0     1
SB          4        0     1     2     1
home        2        0     0     1     1
misc        6        0     2     2     2
3 projects (13 tasks)

Adding / Removing Tags

You can add tags by:

% task 3,5,7-10 modify +work

You can remove tags by:

% task 7 modify -work

Please note that tags are only displayed when you list your tasks with the long option.

Selective Display of Tasks

Display your tasks by priority:

% task priority:H
[task next priority:H]
ID Project Pri Due A Age Urgency Description
13 SB      H         15m       7 Upgrade SlackBuilds
10 home    H         18m       7 Feed the dog
4 misc    H         30m       7 Phone Lennart about the code
5 misc    H         30m       7 Phone Linus about the code
12         H         16m       6 Tax Return
5 tasks

Display your tasks by project:

% task project:SB
[task next project:SB]
ID Project Pri Due A Age Urgency Description
13 SB      H         16m       7 Upgrade SlackBuilds
9 SB      M         20m     4.9 Test my SlackBuilds on Slackware 14
11 SB      M         18m     4.9 Change my email address on SlackBuilds.org
7 SB      L         22m     2.8 Create a SlackBuild for my new program
4 tasks

Display your tasks by tag:

% task +work

Adding annotations

You can annotate a task:

% task 9 annotate i3 builds fine

ID Project Pri Due A Age Urgency Description
...
9 SB      M          1h     5.8 Test my SlackBuilds on Slackware 14
9/1/2012 yajl works fine
9/3/2012 i3 builds fine
...

Displaying Statistics

% task stats

Colours in TaskWarrior

You can enable one of the colour themes in ~/.taskrc by uncommenting one of the lines:

/${HOME}/.taskrc

# Color theme (uncomment one to use)
#include /usr/share/doc/task/rc/light-16.theme
#include /usr/share/doc/task/rc/light-256.theme
#include /usr/share/doc/task/rc/dark-16.theme
#include /usr/share/doc/task/rc/dark-256.theme
#include /usr/share/doc/task/rc/dark-red-256.theme
include /usr/share/doc/task/rc/dark-green-256.theme
#include /usr/share/doc/task/rc/dark-blue-256.theme
#include /usr/share/doc/task/rc/dark-violets-256.theme
#include /usr/share/doc/task/rc/dark-yellow-green.theme
#include /usr/share/doc/task/rc/dark-gray-256.theme

The dark-green-256 theme looks as follows:

You can display current colours (variables + colour values) with:

% task color legend

Colour themes can be easily customised by editing theme files. All the theme files are located in /usr/share/doc/task/rc/.

Displaying a Calendar

All the tasks that have a due date assigned will be marked on the calendar. Additionally you can enable the display of holidays by specifying a country in ~/.taskrc:

/${HOME}/.taskrc

include /usr/local/share/doc/task/rc/holidays-GB.rc

The /usr/share/doc/task/rc/ directory contains holidays for other countries as well.

TaskWarrior Integration

TaskWarrior is a very flexible and powerful tool. What makes it even more useful is the possibility of integrating it into your working environment.

TaskWarrior and i3

1. You issue TaskWarrior commands from dmenu. Simply press Alt+D and start typing a TW command, eg:

task add priority:H due:2days Mom's birthday

2. Assign basic keybindings.

display_tasks.sh

#!/bin/sh
task ls
read -p "Press Enter to close the window."

~/.i3/config:

${HOME}/.i3/config

...
for_window [title="taskwin"] floating enable
bindsym $ms+t exec urxvt -title taskwin -e sh ~/.i3/path/to/display_tasks.sh
bindsym $ms+Shift+D exec task $(task ls | awk 'NR==4  { print $1 }') done
...

This will enable the floating mode for any window entitled taskwin. The Win+T combination will display the list of your tasks in a floating mode in the middle of the screen. The Win+Shift+D keybinding will mark your top task as completed (Please see configuring i3 modifier keys[2426]).

3. Displaying the top task[2427] in i3status.

Sources

Originally written by Marcin Herda[2428]

howtos, software, taskwarrior, todo, gtd, author sycamorex

Resizing a QEMU raw image with an NTFS filesystem

This is a quick guide to increasing the disk space available to your Windows virtual machine with an NTFS file system. The example is based on increasing a partition from 5GB to 6GB.

Backup your original file first in case something goes wrong.

Use qemu-img to resize the QEMU raw disk image

This command increases the size of the disk image in the file Windows_XP_Professional_SP_3.img by 1GB.

qemu-img resize Windows_XP_Professional_SP_3.img +1G

After this command, if you boot your virtual machine, you will see that there is an additional 1GB of free disk space available.

Find the offset into the image

Loop mount the image.

losetup /dev/loop0 Windows_XP_Professional_SP_3.img

Inspect the partition table (here parted is used but fdisk or cfdisk can also be used).

parted /dev/loop0

Within parted, set the units to sectors, then print the current partition table.

(parted) unit s
(parted) print

The output will look something like this:

Model: Loopback device (loopback)
Disk /dev/loop0: 12582912s
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number  Start  End        Size       Type     File system  Flags
1      63s    11718798s  11718736s  primary  ntfs         boot

Note the Sector size and Start sector numbers in the output.

Now quit parted.

(parted) quit

Delete the loop device.

losetup -d /dev/loop0

Use ntfsresize to resize the NTFS partition

Loop mount the NTFS partition to be resized, using an offset calculated from the sector size and start sector.

losetup -o$((512*63)) /dev/loop0 Windows_XP_Professional_SP_3.img

First do a dry run.

 ntfsresize -n -s 6G /dev/loop0

If all is OK, do it for real.

ntfsresize -s 6G /dev/loop0

Delete the loop device.

losetup -d /dev/loop0

Update the partition table

Loop mount the image.

losetup  /dev/loop0 Windows_XP_Professional_SP_3.img

Update the partition table using parted (both fdisk and cfdisk appear to fail here).

parted /dev/loop0

This seems like a backward step, but now use parted to remove the existing partition.

(parted) rm 1

Use the parted rescue command to find the partition again, with the END option set to the size of the partition in MB.

(parted) rescue 1 6000
Information: A ntfs primary partition was found at 32.3kB -> 6000MB.  Do you want to add it to the partition table?
Yes/No/Cancel? Yes

Set the boot flag on the rescued partition.

(parted) set 1 boot on

The partition table is written when you quit parted.

(parted) quit

Delete the loop device.

losetup -d /dev/loop0

Finish up

Boot the virtual machine and allow the Windows chkdsk program to run.

Sources

* Original source: http://cauldrondevelopment.com/blog/2009/02/26/resize-qemu-ntfs-image/[2429]

howtos, Resize, QEMU, raw, image, NTFS, filesystem, author allend

Automounting usb drives is udev

I've a GoFlexNet that runs Slackware Arm that I like to use as NAS (nice to be able to do software raid with the 2 sata drives). Along with having an array I also wanted to be able to share any usb disk really quickly without having to interact in any way with the appliance: this is what I came up with:

The idea is to use the volume labels to have the usb drive mounted and exported via NFS. Any partition that has no label or that is linux swap will be ignored. Well the umounting upon drive unplug is pointless but it also cleans up the exported filesystems avoiding writes in the parent directory.

I wrote a couple of really simple udev rules to call the management program:

root@nas:~# cat /etc/udev/rules.d/99-persistent-personal.rules
ACTION=="add",KERNEL=="sd[a-z][1-9]", PROGRAM="automount"
ACTION=="remove",KERNEL=="sd[a-z][1-9]", PROGRAM="automount"
root@nas:~#

And this is the management script

root@nas:~# cat /lib/udev/automount
#!/bin/bash
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
#echo "$(date) " >> /tmp/env.txt
#/usr/bin/env >> /tmp/env.txt
#id >> /tmp/env.txt
DEV=$(basename $DEVNAME)
LABEL=$(ls -l /dev/disk/by-label/ |grep $DEV |awk '{print $(NF-2)}')
[ "$LABEL" = "" ] && LABEL=$ID_FS_LABEL
[ "$LABEL" = "" ] && exit
[ "$ID_PART_ENTRY_TYPE" = "0x82" ] && exit
echo "$DEV $LABEL $ACTION" >> /tmp/env.txt
case $ACTION in
add) mkdir -p /mnt/exports/$LABEL
logger "automount: add $LABEL"
exportfs -u *:/mnt/exports/$LABEL
mount LABEL=$LABEL /mnt/exports/$LABEL
[ $(grep -c "^/mnt/exports/$LABEL" /etc/exports) -eq 0 ] && \
echo "/mnt/exports/$LABEL *(rw,no_root_squash,no_subtree_check,nohide)" >> /etc/exports
exportfs -r -a
;;
remove)
logger "automount: remove $LABEL"
exportfs -u *:/mnt/exports/$LABEL
mount -o remount,ro /mnt/exports/$LABEL
umount /mnt/exports/$LABEL
rmdir /mnt/exports/$LABEL
;;
esac
root@nas:~#

This is what my /etc/exports looks like initially:

root@nas:~# cat /etc/exports
# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.
/mnt/exports *(rw,no_root_squash,no_subtree_check,crossmnt)
root@nas:~#

it gets populated with new lines as the usb drives come and go. The only thing you may want to do before unplugging any usb drive is remounting the filesystem ReadOnly on the nas manually. There aren't any buttons on the GoFlexNet that can be used to tigger this unfortunately,

Sources

howtos, author , louigi600

(Handy) udev RULES

chmod ttyUSB and ttyACM

(handy for running things like Arduino IDE as a regular user)

1) Create the udev rules file:

as root:

vi /etc/udev/rules.d/50-usb.rules and add one of the following
Allow access by everyone (kinda un-safe)

KERNEL=="ttyUSB[0-9]*",MODE="0666"
KERNEL=="ttyACM[0-9]*",MODE="0666"

Allow access by members of the 'wheel' group-

KERNEL=="ttyUSB[0-9]*",GROUP="wheel",MODE="0660"
KERNEL=="ttyACM[0-9]*",GROUP="wheel",MODE="0660"

Sources

Originally written by arfon[2430]

howtos, software, udev, author arfon

HOWTO articles - General Administration

This section contains How-To articles for system administration tasks that exist in multiple Linux and Unix based distributions

Inspired? Want to write a System Administration HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Administration HOWTOS

Page
Description
Tags

Automounting usb drives is udev
Automounting usb drives is udev I've a GoFlexNet that runs Slackware Arm that I like to use as NAS (nice to be able to do software raid with the 2 sata drives). Along with having an array I also wanted to be able to share any usb disk really quickly without having to interact in any way with the appliance: this is what I came up with:
howtos, author, louigi600

CLI constructs and useful info
CLI constructs and useful info The purpose of this article is not to be a CLI tutorial, but rather to be an exposition of common constructs used in shell scripting for efficiently achieving a goal. There are also sections which simply help one understand a certain topic.
howtos, software, author htexmexh

How to copy files \ directories \ filesystems via network.
How to copy files \ directories \ filesystems via network. The article describes ways of copying content over network. When upgrading a home server, I copy all the data from the old server to a new system. In the examples below, I work from the new server and both servers are on the same subnet:
howtos, copy, ssh

Free your space
Free your space Sometimes you can find yourself in a situation where you are suddenly faced with a message telling you that there’s no more free space on your system. There might be a few things you can do to free some of it. /tmp directory
howtos, software, free, space, author sycamorex

Install Fonts
Install Fonts AS ROOT: * Copy your font files (.ttf and/or .otf) to their respective directories: /usr/share/fonts/TTF /usr/share/fonts/OTF * Run the following commands, with the directory where you copied the fonts as argument: mkfontdir /usr/share/fonts/{TTF,OTF} mkfontscale /usr/share/fonts/{TTF,OTF} fc-cache -f -v
howtos, software, fonts, truetype, opentype, author arfon

KVM and libvirt
KVM and libvirt With the combination of KVM and libvirt, you have an easy way of creating and managing virtual machines. According to the official homepage, libvirt is: A toolkit to interact with the virtualization capabilities of recent versions of Linux (and other OSes). It provides management of virtual machines, virtual networks and storage; both local and remote. Since libvirt acts as an intermediate between a hypervisor and client applications, you must have a supported hypervisor insta…
howtos, kvm, libvirt, virtualization, virt-manager, qemu, author fdonkers

OpenRC
OpenRC OpenRC is a dependency based service management system. It works with the system provided init program, normally /sbin/init. Features OpenRC provides a number of features like hardware initiated initscript run and cgroups support, without requiring large layout changes.
howtos, init, author aaditya

Resizing a QEMU raw image with an NTFS filesystem
Resizing a QEMU raw image with an NTFS filesystem This is a quick guide to increasing the disk space available to your Windows virtual machine with an NTFS file system. The example is based on increasing a partition from 5GB to 6GB. Use qemu-img to resize the QEMU raw disk image
howtos, resize, qemu, raw, image, ntfs, filesystem, author allend

How to search and read Manpages efficiently
How to search and read Manpages efficiently Manpages are pages in the online Unix Manual. I hope this Howto can help some of you to use them more effectively, although I'm aware that many of the readers are already familiar with this subject. Searching for a Manpage
howtos, manpages, searching, documentation, information, author markush

Serial Console
Serial Console Slackware can be installed on various embedded devices. A lot of those don't have a traditional console, like a monitor and keyboard. Instead, the console is often routed to the serial port. In order to take advantage of this, some post-install configuration is necessary.
howtos, console, serial, embedded, author fdonkers

Setting up a Slackware chroot
Setting up a Slackware chroot There are multiple reasons why you might want to set up a Slackware chroot: * building 32-bit packages on a 64-bit multilib system * building -stable packages on a -current system * building (and testing) packages for SBo on a clean system
howtos

Task Scheduling in Linux
Task Scheduling in Linux Overview This article discusses some tools used in a Linux system to schedule tasks to run automatically at specified time intervals or at any given point of time in the future. This primer will not cover these commands in-depth; this is just a brief introduction to using these commands. See the individual HOWTOS for each command for an in-depth look at all relevant options and configurations.
howtos, task scheduling, needs attention, author vharishankar, author mfillpot

Todo Lists in TaskWarrior
Todo Lists in TaskWarrior Taskwarrior is a powerful command-line todo list manager which can be installed from SlackBuilds.org. Please note that it depends on Lua. Managing Your Todo List You can use TaskWarrior in 2 ways: 1. By invoking the Task Shell and issuing TW commands:
howtos, software, taskwarrior, todo, gtd, author sycamorex

(Handy) udev RULES
(Handy) udev RULES chmod ttyUSB and ttyACM (handy for running things like Arduino IDE as a regular user) 1) Create the udev rules file: as root: vi /etc/udev/rules.d/50-usb.rules and add one of the following Allow access by everyone (kinda un-safe)
howtos, software, udev, author arfon

howtos, topic page

CLI constructs and useful info

The purpose of this article is not to be a CLI tutorial, but rather to be an exposition of common constructs used in shell scripting for efficiently achieving a goal. There are also sections which simply help one understand a certain topic.

Constructs

rev | cut | rev

It is often useful to reverse a string and then use cut. For example, take a Slackware package and get its name:

echo dejavu-fonts-ttf-2.33-noarch-1 | rev | cut -d - -f 1-3 --complement | rev
ls -1 /var/log/packages | rev | cut -d - -f 1-3 --complement | rev

Or if you wanted to get the full path of a file, minus the suffix.

echo /proc/config.gz | rev | cut -d. -f1 --complement | rev

replace a suffix

Say you wanted to make a video conversion script, and you needed to change the suffix.

input=test.mkv
output="$(basename "$input" .mkv).avi"

find | xargs

This is a special interaction between find and xargs that allows one to deal with spaces in file names. It is very fast because many commands like rm, rmdir, and shred take multiple file inputs on the command line. A generic construct is something like:

find . -type f -print0 | xargs -0 "$command"

You can replace $command with whatever command you need to run on the files as long as it supports multiple file input. If you have a list of files you can still preserve spaces:

tr '\n' '\0' < "$file" | xargs -0 "$command"

comm before and after

This construct is useful for package management applications. From the comm man page:

With  no  options,  produce  three-column  output.
Column one contains lines unique to FILE1,
column two contains lines unique to FILE2, and
column three contains lines common to both files.

The options -1 -2 -3 suppress the respective columns. Say you wanted to log files that were added to /usr after running command $1:

# before, make install, after
find /usr > "$tmp/before"
$1
find /usr > "$tmp/after"

# sort
sort "$tmp/before" > "$tmp/before-sorted"
sort "$tmp/after" > "$tmp/after-sorted"

# create log
comm -13 "$tmp/before-sorted" "$tmp/after-sorted" > "$log/$name"

Note that comm requires sorted files. Here -1 suppresses lines unique to before, -3 suppresses lines present in both files, so you are left with column 2 which contains files unique to after i.e. the files added. Many people would like to use diff to compare files, but it's mostly for creating patches.

while read line

This construct is common and is useful for reading files or stdin one line at a time. Here is an example that can be used to concatenate split files in order:

base="$(echo "$@" | rev | cut -d. -f1 --complement | rev)"

ls -1 "$base".* | sort -V | while read line
do
cat "$line" >> "$base"
done

Also note that sort -V is a version sort and is useful in cases where ls sorts suffixes incorrectly. The usual way to prevent this is to name numbered suffixes with 0 padding like file.001, but it may overflow and this is why sort -V is useful.

for i in

Here is an example for extracting all rpms in a directory:

for i in *.rpm
do
rpm2cpio "$i" | cpio -id --quiet
done

You can also use seq to make i a loop counter:

for i in $(seq 1 100)
do
echo "$i"
done

Note that there are no quotes around $(seq) because otherwise it would quote the entire expanded number sequence and that wouldn't work right.

External Links

http://www.commandlinefu.com/commands/browse[2431]

Quoting

Quoting may seem complicated, and reasons for it obscure, but there is a purpose to it and it is not that complicated.

Double quoting

The reason for double quoting is to preserve spaces, like spaces in file names. Double quoting a variable or command substitution makes it into a single argument. An example:

bash-4.2$ ls
file with spaces.txt  filewithoutspaces.txt
bash-4.2$ rm -f file with spaces.txt
bash-4.2$ ls
file with spaces.txt  filewithoutspaces.txt
bash-4.2$ rm -f "file with spaces.txt"
bash-4.2$ ls
filewithoutspaces.txt
bash-4.2$ rm -f filewithoutspaces.txt
bash-4.2$ ls
bash-4.2$

Clearly you need to quote a file with spaces. You could use single quotes here, because no variables were inside the quotes. You should not quote in this case:

bash-4.2$ for i in $(seq 1 10); do printf "$i "; done; echo;
1 2 3 4 5 6 7 8 9 10
bash-4.2$ for i in "$(seq 1 10)"; do printf "$i "; done; echo;
1
2
3
4
5
6
7
8
9
10
bash-4.2$

Nor should you quote in any case where a command requires multiple variables and you give them to it inside one quoted variable. A quoted variable is then taken as the only argument, rather than multiple arguments. An example:

bash-4.2$ ls
file with spaces.txt  filewithoutspaces.txt
bash-4.2$ file1="file with spaces.txt"
bash-4.2$ file2="filewithoutspaces.txt"
bash-4.2$ rm -f "$file1 $file2"
bash-4.2$ ls
file with spaces.txt  filewithoutspaces.txt
bash-4.2$ rm -f "$file1" "$file2"
bash-4.2$ ls
bash-4.2$

Also note that you can and should quote within command substitutions, as shown by the replace a suffix example above and:

mkdir "$(basename "$(pwd)")"

This makes a directory within the current directory called the same name as the current directory. If pwd expands into something with spaces, the command will work.

Single quoting

The reason for single quoting is to escape special characters from the shell, while passing them to a command so it can use them. You should use single quotes for every argument passed to another program that contains shell characters to be interpreted by that program and NOT by the shell. Example:

bash-4.2$ find -name *.txt
./list.txt
bash-4.2$ find -name '*.txt'
./list.txt
./results/002.txt
./results/006.txt
./results/013.txt
./results/wipe.txt
bash-4.2$

Here the shell expands * before find sees it. You should single quote input to awk, find, sed, and grep, as each of these uses special characters that overlap with the shells', and thus they must be protected from shell expansion.

External Links

http://www.grymoire.com/Unix/Quote.html[2432]

Regular expressions

Basic

. matches any single character.

\ escapes the next character.

Remember to escape the . using \. if you want an actual .

bash-4.2$ cat test.txt
testtxt
test.txt
bash-4.2$ sed 's/.txt//g' test.txt
tes
test
bash-4.2$ sed 's/\.txt//g' test.txt
testtxt
test

[] is a class and matches anything inside the brakets for a single character. Examples:

[Yy] matches Y or y.

[a-z0-9] includes a range, and in this case matches a through z and 0 through 9.

[^a-z] negates the range, so in this case it matches anything but a through z.

^ matches the beginning of a line. Example: ^a matches an a at the beginning of a line.

$ matches the end of a line. Example: a$ matches an a at the end of a line.

\< matches the beginning of a word. Example: \<a matches an a at the beginning of a word.

\> matches the end of a word. Example: a\> matches an a at the end of a word.

Example: \<[tT]he\> matches the word the or The.

* matches any number of the previous character or nothing = no character. Example: [0-9]* which will match any number of numbers. .* matches any number of anything.

Extended regular expressions

The following must be supported by the program for them to work. For example for grep you must run egrep or grep -E.

+ matches any number of the previous character, like *, but there must be at least one to match, so it will not match nothing or no character.

? makes the previous character optional (it can be missing), and is matched at most once.

(|) acts like an OR statement. Example: (it|her|this) matches any of those words.

a{3} matches aaa = 3 a's.

a{4,8} matches an a at least 4 times and at max 8 times, so aaaa, aaaaa, aaaaaa, aaaaaaa, and aaaaaaaa.

{0,} = *

{1,} = +

{,1} = ?

External Links

http://www.grymoire.com/Unix/Regular.html[2433]

http://www.regular-expressions.info/[2434]

Useful commands and info

stat

Stat is the most accurate way to determine:

File size in bytes:

stat -c '%s' file.txt

File permissions in octal:

stat -c '%a' file.txt

awk variable defaults

An important point is that awk variables are set to zero by default. This may cause problems in some situtations. Example:

echo -ne '-321\n-14\n-1\n-34\n-4\n' | awk 'BEGIN{max=""}{if ($1 > max) max=$1; if ($1 < min) min=$1;}END{print min"\t"max}'

This works properly because max is set to an empty string and thus has a lower value than any number. Try removing the BEGIN clause and see what happens. Also note that adding min=“” to the BEGIN clause fails as well.

no data directory test

You can use this to test if a directory contains no data. For example, it will say 0 if the directory only contains empty files and directories = no data.

du -s directory

cmp

This can compare two files byte by byte, and can be more useful than checksums. For example, after you burn a CD/DVD, you can run:

cmp slackware.iso /dev/sr0

It should say the following if the disk burned correctly:

cmp: EOF on slackware.iso

shell math

Remember that shell utilities like let and expr only do integer math. For floating point use either bc or awk.

shell GUI

There are numerous programs that allow you to create GUIs from a shell script.

Xdialog is fully dialog compatible.[2435]

A function library that increases shell GUI portability.[2436]

Gtkdialog has advanced features for customized GUIs.[2437]

External Links

Guide to awk, bash, sed, find, and more[2438]

Advanced bash guide[2439]

Cheat sheets on Linux CLI programs, the main site is also useful[2440]

Guide to file permissions[2441]

Sources

I quoted man comm

I used man grep for the regex section.

Written by H_TeXMeX_H[2442]

howtos, software, author htexmexh

How to search and read Manpages efficiently

Manpages are pages in the online Unix Manual. I hope this Howto can help some of you to use them more effectively, although I'm aware that many of the readers are already familiar with this subject.

Searching for a Manpage

In order to search for information about anything in the manpages you can use one of the following commands:

apropos

man -k

whatis

apropos is only an alias for man -k; there is no difference between them. The difference between whatis and the other commands is that whatis searches for whole words whereas apropos (or man -k respectively) searches for parts of strings.

If you don't know how exactly a word, for example a command, is written, you can use apropos. If you know exactly the word to search for, whatis would be more efficient because it results in fewer lines of output.

Example

Searching for information about DHCP:

With the apropos command:

user@darkstar$ apropos dhcp
dhclient []          (8)  - script - DHCP client network configuration script
dhclient.conf []     (5)  - DHCP client configuration file
dhclient.leases []   (5)  - DHCP client lease database
dhcp []              (5)  - eval - ISC DHCP conditional evaluation
dhcp []              (5)  - options - Dynamic Host Configuration Protocol options
dhcpcd []            (8)  - an RFC 2131 compliant DHCP client
dhcpcd []            (8)  - run-hooks - DHCP client configuration script
dhcpcd.conf []       (5)  - dhcpcd configuration file
dhcpctl_initialize [] (3)  - dhcpctl library initialization
dhcpctl_initialize [] (3p)  - dhcpctl library initialization
dhcpd []             (8)  - Dynamic Host Configuration Protocol Server
dhcpd.conf []        (5)  - dhcpd configuration file
dhcpd.leases []      (5)  - DHCP client lease database
dnsmasq []           (8)  - A lightweight DHCP and caching DNS server

With the whatis command:

user@darkstar$ whatis dhcp
dhcp []              (5)  - eval - ISC DHCP conditional evaluation
dhcp []              (5)  - options - Dynamic Host Configuration Protocol options

For both commands, the search is case-insensitive!

Updating the ''whatis'' Database

The whatiscommand has its own database. The manpages for any packages of the stock Slackware installation are already present in the database. This is also true if you upgrade such packages. But if you build your own packages from source, for example from SlackBuilds.org[2443], the manpages for these packages are not yet present in the whatis database. In order to update the database after installing new packages, Slackware provides the makewhatis command. It has to be executed as root.

Please note that some other distributions use the mandb command for this purpose.

Sections in the Manual

Don't confuse these sections with the sections within the structure of each manpage; they are described in the paragraph below.

The manpages manual is divided into eight different sections. Here is an extract from the manpage for the man command.

MANUAL SECTIONS
The standard sections of the manual include:
1      User Commands
2      System Calls
3      C Library Functions
4      Devices and Special Files
5      File Formats and Conventions
6      Games et. Al.
7      Miscellanea
8      System Administration tools and Daemons

If the manual pages for a topic are divided over different sections, one can pass the section number as an additional argument to the man command.

Example

user@darkstar$ apropos man
...
makecontext []       (3)  - manipulate user context
makedev []           (3)  - manage a device number
man []               (1)  - format and display the on-line manual pages
man []               (7)  - macros to format man pages
man []               (7)  - pages - conventions for writing Linux man pages
man.conf []          (5)  - configuration data for man
man2html []          (1)  - format a manual page in html
manuals with []      (7)  - mdoc

Now if you want to read the manpage about “macros to format man pages” in section 7 you'll have to execute the following command:

user@darkstar$ man 7 man

The Structure of the Manpages

The manpages all have (or should have) the same structure:

Name

Name of the command and a short description of its function(s)

Synopsis

A usage statement including a short list of the options

Description

A detailed explanation of the command

Options

Detailed explanation of the command line options for the command

Bugs

Known Bugs

Author

The author(s) of the package and maybe the author of the manpage

See also

Advice for manpages about similar or related programs

If one searches for information about a subject rather than a single command the “see also” line is very interesting.

Searching within a Manpage

The reader for the manpages is the program less. Its keybindings are very similar to the vi editor.

/ searches the document forward

? searched the document backwards

n the cursor jumps to the next match.

The − key has no special meaning in the search patterns, so it is possible to search (for example) for the -k option with /-k

Example

Searching for the -h option in the manpage for the ls command with -h gives us

 -h, --human-readable
with -l, print sizes in human readable format (e.g., 1K 234M 2G)

Navigation within a Manpage

Navigation commands are like those in vi:

G end of the manpage

G,G first line of the manpage

n,G nth line of the manpage

One can also set marks at a line of the manpage

M,a sets mark a in the current line

', a jumps to mark a in the manpage

Unfortunately these marks are lost when you leave the manpage (which is done with Q).

Formatting a Manpage as a PDF-document

If you want to have a manpage as a PDF document you can use the command:

man -t ls | ps2pdf - > ls-manpage.pdf

which formats the manpage for the ls command into a pdf document named “ls-manpage.pdf”.

Further Reading

For more information read the manpage for the man command and the manpages listed in “see also”.

Sources

Originally written by Markus Hutmacher[2444]

howtos, manpages, searching, documentation, information, author markush

OpenRC

OpenRC is a dependency based service management system. It works with the system provided init program, normally /sbin/init.

Features

OpenRC provides a number of features like hardware initiated initscript run and cgroups support, without requiring large layout changes.

Installation

Two Slackbuilds[2445] are available, openrc[2446], which contains the OpenRC init system, and openrc-services[2447], which contains various services for use with OpenRC.

Post installation

After installation, some steps are needed to boot with OpenRC.

Setup the agetty services

# main tty
ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.tty1
/sbin/rc-update add agetty.tty1 default
cp /etc/openrc/conf.d/agetty /etc/openrc/conf.d/agetty.tty1
echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.tty1
# additional ttys
for i in {2..6}; do
ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.tty${i}
/sbin/rc-update add agetty.tty${i} default
done
# serial tty (for servers)
ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.ttyS0
/sbin/rc-update add agetty.ttyS0 default
cp /etc/openrc/conf.d/agetty /etc/openrc/conf.d/agetty.ttyS0
echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.ttyS0

Update boot parameters

Add the following to your boot parameters (via /etc/lilo.conf for lilo or /etc/default/grub for grub):

init=/sbin/openrc-init

Regenerate boot configuration ('lilo -v' or 'grub-mkconfig -o /boot/grub/grub.cfg').

Enable boot logging

The main configuration file for OpenRC is /etc/openrc/rc.conf, and contains various options.

A common option that could be changed is to enable boot logging by setting rc_logger=“YES”, this way any errors encountered via booting could be logged and examined later (default log location is /var/log/rc.log).

On reboot

On rebooting, one is booted to a command line with only the bare minimum of services enabled.

It may show a warning about deprecated support for /etc/mtab as a file, and how to correct it:

# cp /etc/mtab /etc/mtab.bkp
# ln -snf /proc/self/mounts /etc/mtab

It may also complain about missing /etc/sysctl.conf file which can be created as:

# touch /etc/sysctl.conf

Enabling some services

Services can be enabled as:

# rc-service add <service> <runlevel>

They can be disabled as:

# rc-service del <service> <runlevel>

Some common services that could be enabled:

# rc-update add dbus default
# rc-update add sysklogd default
# rc-update add dcron default
# rc-update add alsasound boot  # for desktop
# rc-update add consolekit default  # for desktop
# rc-update add sshd default  # for server

Enabled services in current runlevel can be queried with:

$ rc-status

Enabled services across all runlevels can be queried with:

$ rc-update

Some services that are enabled by default for the sysinit runlevel include udev and udev-postmount.

Users who use dmcrypt, lvm, or mdraid could add the following services respectively to the boot runlevel:

# rc-update add dmcrypt boot        # dmcrypt
# rc-update add device-mapper boot  # lvm
# rc-update add lvm boot            # lvm
# rc-update add mdraid boot         # mdraid

Network

If using ethernet via DHCP, the dhcpcd service could be enabled:

# rc-update add dhcpcd default

If using wifi with laptops the NetworkManager or wicd service could be enabled. The combination of dhcpcd and wpa_supplicant (along with a frontend like wpa_gui or wpa_cli) could also be used as a lightweight alternative.

A static network can be configured by editing /etc/openrc/conf.d/network.

Display manager

To boot to a graphical display manager, /etc/openrc/conf.d/xdm can be edited to specify the display manager, and the xdm service could be enabled:

# rc-update add xdm default

If using a laptop, the acpid service could be enabled as well.

Migrating existing enabled services

To check existing enabled services, following code could be used:

for file in /etc/rc.d/*; do
if [ -x "${file}" ]; then
echo "enabled ${file}"
fi
done

For these services corresponding OpenRC services could be enabled, for example:

# rc-update add acpid default
# rc-update add cgmanager default
# rc-update add gpm default
...

All services present can be queried via:

$ rc-update -v

Configuration

OpenRC services are present in the /etc/openrc/init.d folder, and corresponding configuration files are present in /etc/openrc/conf.d

Some common configuration files include:

/etc/openrc/conf.d/modules    # modules to be loaded at boot
/etc/openrc/conf.d/hostname   # hostname of the system
/etc/openrc/conf.d/keymaps    # console keymap

Service management

Services can be started/stopped/restarted as:

# rc-service <service> <action>

For example,

# rc-service sshd start

Shutdown/reboot

To shutdown or reboot, one will need to use openrc-shutdown. To shutdown from a desktop environment using ConsoleKit2, check out this PR[2448].

Note

The ck-system-stop and ck-system-restart files in the PR[2449] can be saved to /usr/local/sbin/poweroff and /usr/local/sbin/reboot respectively. This allows using the poweroff and reboot commands like before.

Troubleshooting

At the moment only a subset of the included services have been tested, so some of them may not run correctly.

If some service does not work, try the system provided one in /etc/rc.d (if available).

mysqld

Try adding the following lines to /etc/my.cnf

[mysqld]
user = mysql
basedir = /usr
datadir = /var/lib/mysql
pid-file = /run/mysql/mysql.pid
socket = /var/run/mysql/mysql.sock

Dealing with crashed services

Sometimes openrc reports a service's status as “crashed”. The process may have died or its pid file disappeared/changed.

If one tries to start a crashed service, `rc-service` reports:

WARNING: <service> has already been started

So one tries to stop it before starting again.

However in some situations, the service does not stop. This leads to a deadlock where one can neither stop the service nor start it. For such cases:

# rc-service <service> zap
* Manually resetting <service> to stopped state

zap resets the service state, allowing us to start it again.

openrc-init

Since version 0.25, openrc provides openrc-init which can be used to boot the system.

This allows switching between OpenRC and other init systems, for example sysvinit, just by changing boot parameters.

For more info, check out the Gentoo wiki[2450].

Migrating from /etc/init.d to /etc/openrc/init.d

OpenRC 0.39+, as shipped via SBo, changes the service and configuration directory to /etc/openrc instead of /etc.

This is being done to maintain greater compatibility with a vanilla Slackware install.

Existing services will need to be migrated, details below on how it can be done.

1. Install openrc-0.39.2 and openrc-services-20181107

These packages ship the configuration and service files in /etc/openrc.

2. Migrate existing services

This involves 4 steps:

# migrate existing services
for service in /etc/init.d/*; do
svcname=$(basename "$service")
if [ ! -e "/etc/openrc/init.d/${svcname}" ]; then
if [ -f "/etc/init.d/${svcname}" ] && grep -q openrc "/etc/init.d/${svcname}"; then
cp -v "/etc/init.d/${svcname}" "/etc/openrc/init.d/${svcname}"
elif [ -L "/etc/init.d/${svcname}" ]; then
# check if symlink is of a service
service_target=$(readlink -f "$service")
service_target_name=$(basename "$service_target")
if [ $(dirname "$service_target") = "/etc/init.d" ]; then
ln -sv "/etc/openrc/init.d/${service_target_name}" "/etc/openrc/init.d/${svcname}"
fi
fi
fi
done
# enable existing services
for runlevel in /etc/runlevels/*; do
for service in ${runlevel}/*; do
svcname=$(basename "$service")
rvlname=$(basename "$runlevel")
if [ ! -e /etc/openrc/runlevels/${rvlname}/${svcname} ] && [ -e /etc/openrc/init.d/${svcname} ]; then
ln -sv /etc/openrc/init.d/${svcname} /etc/openrc/runlevels/${rvlname}/${svcname}
fi
done
done
# check config changes
for file in /etc/conf.d/*; do
filename=$(basename "$file")
extension="${filename##*.}"
if [ "$extension" = orig ] || [ "$extension" == new ]; then
continue  # dont need to check extra
fi
if [ -e "/etc/conf.d/${filename}" ] && [ -e "/etc/openrc/conf.d/${filename}" ]; then
diff -Nupr "/etc/conf.d/${filename}" "/etc/openrc/conf.d/${filename}"
fi
done
# main config file
diff -Nupr /etc/rc.conf /etc/openrc/rc.conf
# check local.d changes
for file in /etc/local.d/*; do
filename=$(basename "$file")
if [ ! -e "/etc/openrc/local.d/${filename}" ]; then
cp -v "/etc/local.d/${filename}" "/etc/openrc/local.d/${filename}"
elif [ -e "/etc/local.d/${filename}" ] && [ -e "/etc/openrc/local.d/${filename}" ]; then
# show changes
diff -Nupr "/etc/local.d/${filename}" "/etc/openrc/local.d/${filename}"
fi
done

Config changes found above can be updated by hand or copy pasted in new location.

3. Check and reboot

Verify if rc-status is showing all services (it may show them as stopped).

Reboot and check whether things are working expected, make changes as necessary.

The old files and folders can be renamed (or removed).

mv /etc/init.d /etc/init.d-openrc-bkp
mv /etc/conf.d /etc/conf.d-openrc-bkp
mv /etc/local.d /etc/local.d-openrc-bkp
mv /etc/runlevels /etc/runlevels-openrc-bkp
mv /etc/rc.conf /etc/rc.conf-openrc.bkp

Finally, any changes done to the default Slackware system can be reverted:

mv /etc/init.d-bkp /etc/init.d

See Also

Wikipedia[2451]

Gentoo Wiki[2452]

Github[2453]

User guide[2454]

LQ thread[2455]

openrc-services repo[2456]

Sources

* Originally written by Aaditya[2457]

howtos, init, author aaditya

Serial Console

Slackware can be installed on various embedded devices. A lot of those don't have a traditional console, like a monitor and keyboard. Instead, the console is often routed to the serial port. In order to take advantage of this, some post-install configuration is necessary.

This howto can also be used to setup a serial console on an existing headless server as a backup for administering the machine.

Preparation

You need to know the serial device and the speed. The device will mostly be ttyS0, the first serial device. If you are using a serial to USB adapter, it will likely be ttyUSB0. Consult the documentation of your board if you are not sure.

Some devices have an option in the BIOS to change the speed and other serial settings. Make sure you know the speed that is currently set.

In the below examples we will assume ttyS0 with speed 38400.

Host configuration

Activate serial port

Edit /etc/inittab and uncomment the correct serial console line. Change the speed setting when required.

/etc/inittab

# Local serial lines:
s1:12345:respawn:/sbin/agetty -L ttyS0 38400 vt100
#s2:12345:respawn:/sbin/agetty -L ttyS1 9600 vt100

Allow root login

Edit /etc/securetty and uncomment your serial device to allow root to login via the serial console. You can omit this step if you will access the machine with a normal user id.

/etc/securetty

# These are some remote ttys, and uncommenting them might be less than fully secure:
ttyS0
#ttyS1

Setup LILO boot loader

Edit /etc/lilo.conf. Add a line to the general section:

/etc/lilo.conf

serial=0,38400n8

The 0 refers to the first serial device, ttyS0.

Add the following parameter to the kernel line:

/etc/lilo.conf

append="console=ttyS0,38400n8"

If the append line already exists, add the parameter as follows:

/etc/lilo.conf

append="mem=1024M console=ttyS0,38400n8"

Now run /sbin/lilo to write the new bootloader configuration.

To have the console on normal tty as well as serial port, adjust the kernel line as follows:

/etc/lilo.conf

append="console=tty0 console=ttyS0,38400"

Setup GRUB-legacy boot loader

Edit /boot/grub/menu.lst and change it as follows:

Add lines to the general section as follows:

/boot/grub/menu.lst

serial --speed=38400
terminal serial

Add the following parameter to the kernel line:

/boot/grub/menu.lst

console=ttyS0,38400n8

The complete kernel line might look like this (substitute your root partition and vmlinuz file):

/boot/grub/menu.lst

kernel /boot/vmlinuz root=/dev/sda2 ro vga=normal console=ttyS0,38400n8

To have the console on normal tty as well as serial port, adjust the terminal and kernel lines as follows:

/boot/grub/menu.lst

terminal --timeout=5 serial console

/boot/grub/menu.lst

kernel xxx console=tty0 console=ttyS0,38400n8

When the terminal timeout expires, the first option (in this case serial) will be chosen as the console. The normal bootloader timeout will start when the terminal timeout ends.

Setup GRUB2 boot loader

Edit file /etc/default/grub and change the following line to define the console:

grub

GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0,38400n8"

Add the following lines to define the console settings:

grub

GRUB_TERMINAL=serial
GRUB_SERIAL_COMMAND="serial --speed=38400 --unit=0 --word=8 --parity=no --stop=1"

Now rebuild the GRUB2 configuration:

# grub-mkconfig -o /boot/grub/grub.cfg

Connect from a remote computer

To use the serial console, you need to attach a second computer to the serial port of the host. Use a null modem cable. Most modern computers no longer have a serial port so you might need a serial to USB connector as well.

Once you have physically connected the machines, you need a communications package to interact with the console. Two popular options are screen and minicom.

Connect using screen

This is the easiest option because it doesn't need any configuration. Start screen and specify the serial device and the desired speed on the command line.

user@darkstar$ screen /dev/ttyUSB0 38400

Connect using minicom

Before using minicom, you need to configure it. Start with the -s switch as follows:

user@darkstar$ minicom -s

You will see the main menu.

 +-----[configuration]------+
| Filenames and paths      |
| File transfer protocols  |
| Serial port setup        |
| Modem and dialing        |
| Screen and keyboard      |
| Save setup as dfl        |
| Save setup as..          |
| Exit                     |
| Exit from Minicom        |
+--------------------------+

Select Serial port setup. You will see the serial port settings.

    +-----------------------------------------------------------------------+
| A -    Serial Device      : /dev/ttyS1                                |
| B - Lockfile Location     : /var/lock                                 |
| C -   Callin Program      :                                           |
| D -  Callout Program      :                                           |
| E -    Bps/Par/Bits       : 115200 8N1                                |
| F - Hardware Flow Control : Yes                                       |
| G - Software Flow Control : No                                        |
|                                                                       |
|    Change which setting?                                              |
+-----------------------------------------------------------------------+

Use the A to G keys to change various settings. Make sure the device and Bps/Par/Bits settings are correct. Hit Enter to return to the main screen and select the Modem and dialing option. On the detail screen, make sure the Init string and Reset string options are empty. Hit Enter again to return to the main screen. Now you can save your options. Use Save setup as dfl to save this as your new default. Use Save setup as.. to save as a certain profile.

Call minicom again and the new options will take effect.

user@darkstar$ minicom

Or you can start with a certain configuration

user@darkstar$ minicom myprofile

Use Ctrl+A, Z for help. Use Ctrl+A,X to quit.

Troubleshooting

Garbled characters in terminal

When you see progress in the terminal but the characters are garbled and unreadable, make sure you have the same speed set in the following sections: BIOS, bootloader and inittab. Also make sure your client connects with the same speed.

Unable to sign on as root

Check the securetty settings. See section above.

Unable to use screen or minicom as a regular user

When you get authorization problems using the serial device, make sure your user is in the dialout group.

Further reading

Check the official Remote Serial Console HOWTO[2458] for much more details.

screen manual[2459]

man 1 minicom

Sources

Originally written by Frank Donkers[2460].

howtos, console, serial, embedded, author fdonkers

RTAI

Under construction. This page needs a bit of research on my part to complete. Please obtain example code from the RTAI[2470] website for the moment.

Introduction

RTAI is a system that allows your Linux operating system to run so-called 'hard' realtime tasks. By 'hard' we mean that it isn't just 'best effort' it really will do something regularly, to a schedule dictated by you, no matter how heavily loaded the system. RTAI comes in two parts: a set of patches for your kernel and a library you can link your programs against which allows them to become realtime tasks. It may feel like you're running your program under Linux just like any other normal user-mode program, however under the hood you are taking full control of the hardware, and any other processes will only run as the remaining CPU time permits.

The above is a gross over-simplification of what is actually happening and is simply a lay-person's introduction. Please investigate the RTAI documentation for discussion of things like jitter, latency and so on

Getting RTAI

You can download the latest version of RTAI from the website:

# wget https://www.rtai.org/userfiles/downloads/RTAI/rtai-5.1.tar.bz2
# tar xvf rtai-5.1.tar.bz2
# cd rtai-5.1

Identifying the HAL patch

RTAI requires the application of kernel patches, but carries patches only for certain kernel versions. You can find out which ones like this:

# find ./ -name hal\*.patch
./base/arch/x86/patches/hal-linux-3.10.32-x86-8.patch
./base/arch/x86/patches/hal-linux-3.18.20-x86-6.patch
./base/arch/x86/patches/hal-linux-4.4.71-x86-10.patch
./base/arch/x86/patches/hal-linux-4.9.80-x86-4.patch
./base/arch/x86/patches/hal-linux-4.4.115-x86-10.patch
./base/arch/x86/patches/hal-linux-4.1.18-x86-9.patch
./base/arch/x86/patches/hal-linux-3.16.7-x86-5.patch
./base/arch/x86/patches/hal-linux-3.14.44-x86-12.patch
./base/arch/x86/patches/hal-linux-4.9.51-x86-4.patch

Now check your own kernel version:

# uname -r
4.4.14

We can see that the closest kernel with a HAL patch after this is 4.4.71, so that's the one to aim for. For now just copy the patch to the kernel source location:

# cp base/arch/x86/patches/hal-linux-4.4.71-x86-10.patch /usr/src

Switching Kernel Version

We need to get ourselves on a kernel of the correct version (above) before we do anything else. Start by downloading and uncompressing the new version:

# cd /usr/src
# wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.71.tar.xz
# tar xvf linux-4.4.71.tar.xz
# cd linux-4.4.71

Now use the existing configuration as a base and 'make oldconfig'. There may be some new config options that get prompted for, it's likely you can accept the defaults though.

# zcat /proc/config.gz > .config
# make oldconfig

If you have a more obscure filesystem for your root partition you may now want to 'make menuconfig' to ensure it's compiled into your kernel [*] instead of a module [m], or you may want to investigate using initrds. For anyone using the default EXT4, you're good to just make now:

# make

And then copy the results to install:

# make modules_install
# cp arch/x86_64/boot/bzImage /boot/vmlinuz-rtai
# cd /boot

Edit the lilo config:

# vi /etc/lilo.conf

And ensure there's a section added like this:

image = /boot/vmlinuz-rtai
root = /dev/sda1
label = Linux-4.4.71
read-only

Leave the other kernel image section in there as a second option in case something goes wrong with the boot, but you want to make the new one the default (the first entry).

Patching the Kernel

When you're sure that new kernel works and your system boots and functions, now's the time to add the RTAI patches:

# cd /usr/src/linux-4.4.71
# patch -p1 < /usr/src/hal-linux-4.4.71-x86-10.patch

And now you can make the kernel again. This may take some time:

# make

If there are any prompted questions about the RTAI it's safe to leave them as defaults. Next install the new kernel.

# make modules_install
# cp arch/x86_64/boot/bzImage /boot/vmlinuz-rtai

You've already configured LILO, so just re-run it to reference the newly copied kernel:

# lilo

Reboot the machine to ensure that the new kernel works.

Compiling/Installing RTAI

Before compiling RTAI itself we must ensure /usr/src/linux points to the new RTAI kernel.

# cd /usr/src
# rm linux
# ln -s linux-4.4.71 linux

Next just compile in the normal way:

# cd rtai-5.1
# ./configure
# make
# make install

At this point, some kernel modules should have arrived in /usr/realtime/modules/ For now you can load them manually, however in the future you can add them to /etc/rc.d/rc.local:

# /sbin/insmod /usr/realtime/modules/rtai_hal.ko
# /sbin/insmod /usr/realtime/modules/rtai_sched.ko
# /sbin/insmod /usr/realtime/modules/rtai_fifos.ko

Check they are there:

# lsmod | grep rtai
rtai_fifos             39941  0
rtai_sched            118855  1 rtai_fifos
rtai_hal             1762779  2 rtai_fifos,rtai_sched

Now we need to ensure we can link to the libraries:

vim /etc/ld.so.conf

Add the line:

/usr/realtime/lib

and then run (as root):

# ldconfig

Finally, we are ready to write our first RTAI program.

Example Program

Here's an example Makefile to compile a really simple realtime program. It uses the rtai-config utility to set everything up:

CC = $(shell /usr/realtime/bin/rtai-config --cc)
LXRT_CFLAGS = $(shell /usr/realtime/bin/rtai-config --lxrt-cflags)
LXRT_LDFLAGS = $(shell /usr/realtime/bin/rtai-config --lxrt-ldflags)
all:: rtai-example
rtai-example: rtai-example.c
$(CC) $(LXRT_CFLAGS) -o $@ $< $(LXRT_LDFLAGS) -llxrt
clean::
$(RM) -f rtai-example *~
.PHONY: clean

And here is the demo program, rtai-example.c:

TODO

Dedication

This page is dedicated to the memory of captain@captain.at whos pages have been a great source of information in kernel and realtime programming. You can still find his stuff in various archives, e.g. here[2471].

RIP Captain.

Sources

* Originally written by User bifferos[2472]

howtos, rtai, realtime

man2html

Introduction

man2html can generate on the fly HTML pages from man documentation. This makes it a useful addition to asciidoc[2473] based notes. ⁴¹⁾ One of the advantages it offers is that when man pages are converted to HTML they become navigable through hyperlinks. A similar script exists for info, info2www[2475].

man2html can be used from the command line, for example, to read in lynx the html-formatted man page of grep:

$ zcat $(man --path 1 grep) | man2html -l | lynx -stdin

It is more useful, however, to setup a cgi-bin infrastructure which will allow the on the fly operation, see man2html(1).

http

This is the most versatile mode, as it works from any browser.

# mkdir /var/www/cgi-bin/man

# $EDITOR /etc/lynx.cfg

# NB: <TAB> must be a real tab.
TRUSTED_LYNXCGI:<TAB>/var/www/cgi-bin/man/

# $EDITOR /var/www/cgi-bin/man/man2html

#!/bin/bash
# $1 is the man section
# $2 is the command name
zcat "$(man --path $1 $2)" | /usr/bin/man2html

# chmod 0755 /var/www/cgi-bin/man/man2html

# /etc/rc.d/rc.httpd start

See asciidoc Mini HOWTO[2476] for how to use in an asciidoc file.

The steps are intended for localhost, or at most a LAN. cgi-bin may need some hardening for a public web server.

lynxcgi

This works only from lynx. Make sure lynx is compiled with enabled cgi-bin, the default for Slackware.

$ mkdir -p /home/httpd/cgi-bin/man

$ $EDITOR /etc/lynx.cfg

# NB: <TAB> must be a real tab.
TRUSTED_LYNXCGI:<TAB>/home/httpd/cgi-bin/man/

$ $EDITOR /home/httpd/cgi-bin/man/man2html

#!/bin/bash
# $1 is the man section
# $2 is the command name
zcat "$(man --path $1 $2)" | /usr/bin/man2html -l

$ chmod 0755 /home/httpd/cgi-bin/man/man2html

A link in an asciidoc file for grep will be:

lynxcgi:/home/httpd/cgi-bin/man/man2html?1+grep[grep(1)]

Sources

* Originally written by pdi[2477] * Contributions by markand[2478]

howtos, man2html

⁴¹⁾

The HTML from man2html is formatted differently from that of asciidoc, and a possible, but heavy-handed, solution might be the use of pandoc[2474], available from Slackbuilds.org.

How to merge PDF-files

Introduction

PDF (Portable Document Format) is a file format invented by Adobe. PDF is useful to present documents independent of hardware, operating system and application software. Each PDF file has a fixed layout, including page size, fonts, graphics and other information. It is also possible to encrypt a PDF file for security, or create a digital signature for authentication.

Work in Progress!!!

PDF documents are created from traditional text documents via a printer driver, or as with LaTeX, created directly from source-code. One important consequence is that one cannot convert a PDF-document “back” into it's original format such as a Microsoft Word document.

This article describes how you can merge several PDF documents into a single PDF document. For example, this is useful if you have several pages from a scanner in PDF format and want to put these files into one file. There are several tools available; some are included in the stock Slackware install as well as others that can be readily installed.

Default Tools

Tools which are already available on your Slackware computer if you have a complete installation.

imagemagick (convert)

The convert tool comes in Slackware's imagemagick package from the xap-series.

The convert tool uses the -adjoin option to achieve this.

convert -adjoin file1.pdf file2.pdf merged.pdf

Thanks to jlinkels for the contribution.

To increase the quality of the output, it is better to read the input PDF files with a higher density (in dots per inch (DPI)) and then resize the output density back to common DPI, 96 for example. I usually use an input density of 600 (after many trial and errors), and then resize with 93.75% (if you dont resize you will get a huge output file).

convert -density 600 fileinput_1.pdf fileinput2_.pdf -resize 93.75% output.pdf

Thanks to eXpander_ for the contribution.

ghostscript (gs)

The ghostscript package resides in Slackware's ap-series.

With GhostScript you can merge PDF files on the command line.

gs -q -sPAPERSIZE=a4 -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=<newfilename>.pdf <inputfilenameshere>

Thanks to mrclisdue for the contribution.

pdfconcat

The pdfconcat tool comes in Slackware's xpaint package from the xap-series.

pdfconcat -o <output.pdf> <input1.pdf> [...]

Thanks to BroX for the contribution.

pdfunite

The pdfunite tool comes in Slackware's poppler package from the l-series.

pdfunite [options] PDF-sourcefile1..PDF-sourcefilen PDF-destfile

Thanks to nivieru for the contribution.

Additional tools

Additional tools that can be easily installed.

pdftk

pdftk is available at slackbuilds.org[2479]. It is also a command line tool and the usage is:

pdftk first.pdf second.pdf third.pdf cat output altogether.pdf

pdftk can do more things than joining PDF files, for example rotating a document by 180 degrees is done this way:

pdftk upsidedown.pdf cat 1-endsouth output rotated.pdf

Thanks to brianL and michaelk for pointing me to pdftk.

pdfshuffler

pdfshuffler is also available at slackbuilds.org[2480]. It comes with a graphical user interface and is written in Python, therefore pyPdf[2481] and pypoppler[2482] are required in order to get this program to work. It is very convenient because it comes with a document-viewer and shows what you're doing. It has additional features like rotating or splitting PDF files.

pdfjam

pdfjam is a LaTeX-package which is unfortunately not included in tetex. But those of us who have installed texlive instead already have pdfjam. It is also a command line tool (like LaTeX). The documentation is available with the texdoc command

texdoc pdfjam

Thanks to joghi for pointing me to pdfjam.

TODO: handling bookmarks in PDF-files, which of the above tools can handle those bookmarks?

Sources

Originally written by Markus Hutmacher[2483]

http://www.linuxquestions.org/questions/slackware-14/which-tool-for-merging-pdf-files-4175453632/[2484]

howtos, PDF, commandline

Firefox

Firefox is an opensource web browser from Mozilla.

Installation

Firefox is distributed with Slackware.

Tips

Make firefox understand downloaded files

It is quite annoying that Mozilla Firefox always forgets what application to use for “opening” a file which you just downloaded. Also, the context menu “Open containing folder” in the Downloads overview does not work.

Using “xdg-open” you can improve the integration of Firefox into your Desktop Environment a lot:

Stop firefox if it is running

Delete or rename the mimetypes cache (where firefox keeps its file association settings):

$ rm ~/.mozilla/firefox/<yourprofile>/mimeTypes.rdf

Start firefox again

Download any file if you had not done this before

Open that file from the “Tools > Downloads” menu (by right-clicking on it and selecting “Open“).
When asked to choose the application for opening the file, browse to (or type) “/usr/bin/xdg-open“, then check the checkbox to “Remember your choice“.

After you’ve configured Firefox like that, both the “Open” and “Open containing folder” context menus will work. If you are running KDE then you can then change the preferred programs through KDE’s “file associations” settings.

The same trick works for Mozilla Seamonkey as well.

Enable the builtin PDF viewer in Firefox

The “pdfjs[2485]” PDF viewer is built-in in Firefox since version 15.0, this means that there is no need to install a PDF viewer plugin like Adobe Reader additionally. The built-in PDF viewer renders PDF using HTML5 and JavaScript.

The PDF viewer is disabled by default, but that is likely going to change in the future, when the functionality has proven itself. In the meantime, you can enable it as follows:

In “about:config” set the property “browser.preferences.inContent” to “true”:
.

Also in “about:config” set the property “pdfjs.disabled” to “false”:
.

Finally, in the Firefox “Preferences > Applications” menu, search for the extension “PDF” and make sure the associated action is set to “preview in firefox”.

That's it! You don't even have to restart Firefox. Try opening a PDF, or even drag a PDF file from a filemanager into the Firefox window.

Troubleshooting

“Open folder containing” opens Audacious instead of a file manager

Known to work with: [Slack 14.1]

Edit /usr/share/applications/mimeinfo.cache

Find the line containing

inode/directory=

Delete the following string

audacious.desktop;

This should fix the problem.

Here's a one-liner to do it:

sudo sed -i 's|inode/directory=audacious.desktop;|inode/directory=|' /usr/share/applications/mimeinfo.cache

(I made an icon on my desktop with it in the COMMAND line)

Sources

Originally written by arfon[2486]

Originally written by Eric Hameleers[2487]

Taken from an Alien Pastures[2488] article.

Based on a hint in a discussion at LinuxQuestions.org[2489]

Contributions by markand[2490]

howtos, software, firefox, author arfon, author alienbob

Phoronix Test Suite

Introduction

Wondering if it's time to upgrade your Slackware box? Look no further than the Phoronix Test Suite[2491] to benchmark it against other people's systems. Here is a quick guide to get it up and running, we'll use timed kernel compilation as an example because that seems like as good a benchmark as any.

Installing the Software

There already exists a SlackBuild[2492] for Phoronix. Download the file phoronix-test-suite.tar.gz, unpack it and build it like this (as root):

# wget https://slackbuilds.org/slackbuilds/14.2/system/phoronix-test-suite.tar.gz
# tar xvf phoronix-test-suite.tar.gz
# cd phoronix-test-suite
# wget http://www.phoronix-test-suite.com/releases/phoronix-test-suite-7.8.0.tar.gz
# ./phoronix-test-suite.SlackBuild
# installpkg /tmp/phoronix-test-suite-7.8.0-x86_64-1_SBo.tgz

Running the tests

Back as a normal user, you can list the available tests with:

# phoronix-test-suite list-available-tests

The first run of this command will take a little time as it is caching the lists. Subsequent runs will be far quicker. To run the kernel compilation benchmark it's just a matter of passing the 'benchmark' argument and the name of the test:

# phoronix-test-suite benchmark pts/build-linux-kernel

You will need to accept a license agreement and answer some questions. The test will run three times to get a representative result. At the end of it you will be invited to view the results in your web browser.

Comparing the results

Once it's done you can check some published benchmarks[2493].

Have fun!

Sources

* Originally written by User Bifferos[2494]

howtos, phoronix, benchmark

Installing and using tmux in Slackware

tmux is a terminal multiplexer. It enables a number of terminals (or windows) to be accessed and controlled from a single terminal. It is intended to be a simple, modern, BSD-licensed alternative to programs such as GNU Screen.

tmux uses a client-server model. The server holds multiple sessions and each window is an independent entity which may be freely linked to multiple sessions, moved between sessions and otherwise manipulated. Each session may be attached to (display and accept keyboard input from) multiple clients. Major features include:

A powerful, consistent, well-documented and easily scriptable command interface.

A window may be split horizontally and vertically into panes.

Panes can be freely moved and resized, or arranged into preset layouts.

Support for UTF-8 and 256-colour terminals.

Copy and paste with multiple buffers.

Interactive menus to select windows, sessions or clients.

Change the current window by searching for text in the target.

Terminal locking, manually or after a timeout.

A clean, easily extended, BSD-licensed codebase, under active development.

Installation

A tmux SlackBuild is available at your favorite SlackBuilds repository[2495]. The installation is pretty straightforward. First, make sure all the dependencies are installed (at the time of this writing, libevent is the only dependency). Download the SlackBuild archive for tmux, extract it in your build environment. Next, download the source of tmux from their website[2496] and place it in the extracted directory. Run the script ./tmux.SlackBuild and finally use installpkg to install the finished package that should be located in /tmp. You can consider sbopkg as a helper tool for installing the SlackBuild.

Configuration

You can configure tmux through a user specific configuration file, ~/.tmux.conf, or a system configuration file, /etc/tmux.conf. Sample configuration files are available in /usr/share/doc/tmux-X.X/examples/, where X.X depends on the version of tmux you installed. You might find just what you need in there.
Tmux is very flexible and the ability to customize its behavior through scripting is pretty neat. This is a tmux screenshot showing four panes:

The tmux man page is pretty extensive and has very good documentation for those of us enjoying heavy customization. If you have used GNU Screen before, you must be familiar with the concept of prefix key: the same concept applies to tmux. It is a combination of keys you use to control tmux from an attached client. In GNU Screen, the default prefix key is Ctrl+A while tmux has Ctrl+B as default prefix. So, for users with long term GNU Screen addiction, you can redefine tmux prefix by adding the command below to your configuration file ~/.tmux.conf:

set -g prefix Ctrl-a

Few tmux key bindings:

Ctrl+B C Create a new window.

Ctrl+B D Detach the current client.

Ctrl+B & Kill the current window.

Ctrl+B % Split the current window vertically into two panes.

Ctrl+B “ Split the current window horizontally into two panes.

Ctrl+B O Select the next pane in the current window.

Ctrl+B { Swap the current pane with the previous pane.

Ctrl+B } Swap the current pane with the next pane.

Ctrl+B ? List all key bindings.

The tmux man page contains more detailed information about tmux usage and customization. It has every thing to get you started.

Sources

tmux FAQ[2497]

tmux website[2498]

A tmux tutorial (Part 1)[2499]

Another tmux tutorial[2500]

Yet another tmux tutorial[2501]

Originally written by escaflown[2502]

howtos, software, tmux, author escaflown

WIP = Work in Progress

Efficient CLI Navigation

The CLI (Command Line Interface) is a very powerful, flexible and programmable environment. If you use the command line interface on a regular basis, you know how important it is to customise your working environment and develop shortcuts to ensure efficient workflow. Below are some tips on navigating through directories in an quick and easy way.

Go Back Home

The cd command changes the current working directory to your /home:

$ pwd
/home/user/data/documents/work
$ cd
$ pwd
/home/user

Go Back to the Previous Directory

To go back to the previous directory, you can use cd -:

$ pwd
/home/user/.i3/config
$ cd ~/data/projects/dotfiles/i3
$ pwd
/home/user/data/projects/dotfiles/i3
$ cd -
/home/user/.i3/config
$ pwd
/home/user/.i3/config

Use the Last Argument of the Previous Command

The $_ variable returns the last argument of the previous command. This can be helpful in a variety of scenarios:

$ pwd
/home/user/downloads/
$ cp i3status.tar.gz ~/data/builds/i3/i3status
$ cd $_
$ pwd
/home/user/data/builds/i3/i3status

$ chmod +x /path/to/my/script/script.sh
$ $_
(This will execute script.sh)

The same can be achieved using the combination Alt+. or Esc+..

Bash Completion

Bash offers TAB completion, a very useful feature that reduces the number of keystrokes you are required to type to navigate to a directory.

$ cd d[TAB]

It will expand the path with a directory starting with d. Please note that Linux is case-sensitive so ~/Desktop or ~/Downloads will be ignored. If there are more than 1 directory starting with d, you need to press the TAB twice to get the possible completions listed below:

$ cd d[TAB][TAB]
data/    downloads/

Now press o and TAB to expand the path to downloads.

It can greatly reduce the number of keystrokes when accessing directories. For example:

$ cd data/projects/python-dir/euler/completed/

The keystrokes I used:

cd da[TAB]p[TAB]p[TAB]e[TAB]c[TAB]

If each directory contained only one subdirectory, I could have done the following:

cd [TAB][TAB][TAB][TAB][TAB]

Not only does the bash completion reduce the number of key strokes, but it also comes handy if you do not remember directory names.

Please note that bash completion works also on files:

$ cp data/projects/scripts/sync-script.sh .

Keystrokes used:

$ cp d[TAB]p[TAB]s[TAB]s[TAB] .

The dot (.) represents the current directory so the command will copy sync-script.sh to the current directory.

Programmable Bash Completion

To take advantage of all Bash completion features, you need to install an additional package from /extra:

# slackpkg install bash-completion

CDPATH

If you work in certain directories on a regular basis, you might want to include them in the $CDPATH variable. Suppose you often work in the slackbuilds directory which contains some builds:

$ cd ~/data/projects/slackbuilds/
$ ls
i3 i3status yajl dmenu libev

Add it to the $CDPATH variable by modifying ~/.bashrc:

CDPATH=$CDPATH:~/data/projects/slackbuilds/

Please note the path included in the CDPATH variable is the path to the parent directory where the said directories are located.

After you have sourced .bashrc (source ~/.bashrc), you can cd to any of those directories from any place:

$ pwd
/home/user/.config/xfce4
$ cd yajl
/home/user/data/projects/slackbuilds/yajl

If you would like to enable Tab completion within the directories added through the CDPATH variable, you need to install bash-completion from Slackware's /extra directory.

It is NOT recommended to give your directories names similar to the system ones, eg. usr, etc, which can result in unpredictable behaviour.

Symlinks

In some situations you may consider using symlinks[2503] to create shortcuts to regularly visited directories:

$ ln -s /home/user/data/projects/scripts/slackbuilds ./slackbuilds

Bash Aliases

You can make your life easier by creating aliases (= shortcuts) for commands that you use often. The syntax is very simple:

name_of_the_alias='value'

You can place your aliases in ~/.bashrc. You might need to create this file. Each time you edit this file you need to source it afterwards for the changes to take effect:

source ~/.bashrc

or

. ~/.bashrc

When it comes to navigation, one could, for example, create a few aliases to speed up navigating up the directory tree:

alias 1.='cd .. ; pwd'
alias 2.='cd ../.. ; pwd'
alias 3.='cd ../../.. ; pwd'
alias 4.='cd ../../../.. ; pwd'

The value of an alias can be quite complex. As you can see, 4. will first change directories cd ../../../.. and then print the current working directory - pwd. Please note a semi-colon (;) separating the commands.

$ cd data/projects/python-dir/euler/
$ 4.
/home/user
$ cd -
/home/user/data/projects/python-dir/euler
$ 3.
/home/user/data

Aliases can be used in a number of different ways. A few more examples:

alias epyt='emacs -nw /home/user/data/projects/python-dir/euler/32-problem.py'
alias slacktop='ssh user@slacktop'

Directory Stack

BASH features some helpful directory stack buildins that help you navigate recently visited directories.

pushd - push a directory into the directory stack and cd to it.

popd - remove a directory from the directory stack and cd to it.

dirs - display the list of the directories in the stack.

How does it work in practice?

First of all, add a directory to the stack. Please note that it also automatically switches to the directory (the -n flag suppresses this behaviour).

user@darkstar:~$ pushd data/projects/programming/
~/data/projects/programming ~
user@darkstar:~/data/projects/programming$

Alternatively, you can cd to a given directory and issue:

pushd .

After adding a few directories you can display the content of the stack:

user@darkstar:~$ dirs -v
0 ~/projects/web-develop/project-eden/includes
1 ~/projects/web-develop/project-eden/includes
2 ~/projects/web-develop/project-eden/pages/en
3 ~/projects/web-develop/project-eden/css
4 ~/projects/designs
5 ~/projects/notes
6 ~/public_html/project_eden

Please note that the first entry always displays the current working directory so if it also sits at the top of the stack, you'll see what seems like duplicate lines. The -v flag is responsible for a nicely indexed output.

To switch to one of the directories in the stack you could issue:

user@darkstar:~$ cd $(dirs +2 -l)
user@darkstar:~/projects/web-develop/project-eden/pages/en$

Admittedly, this is not the most concise way of changing directories. To make it shorter we can add an alias and a function to the ~/.bashrc file.

alias dv='dirs -v'

List the current stack by simply typing dv.

cdd()
{
position=$1
if [ -z $position ]; then
echo "You need to specify the position of the directory in the stack"
else
cd $(dirs +$1 -l)
fi
}

The cdd function⁴²⁾ makes it possible to cd to a given directory from the stack by typing:

cdd 3

Sources

Original source: Blog Post[2505] written by sycamorex[2506]

howtos, cli, cd, bashrc, completion, work in progress, author sycamorex

⁴²⁾

Based on this function[2504].

Install nfdump/nfsen on Slackware

Concepts you should know:

A device is setup to constantly send out netflow information, it is not polled.

A receiver listens for the netflow information 'streams' from devices and processes them.

How to install

A) Install/configure Apache 1) enable php

B) Configure the Cisco router to send netflow

1) Login to the Cisco router:

 # telnet <YOUR ROUTER IP>
gw>enable

2) Configure the desired interface:

 nm-gw# configure terminal
nm-gw(config)# interface S0/0
nm-gw(config)# ip route-cache flow
nm-gw(config)# exit

3) Repeat for all interfaces you want.

 nm-gw# configure terminal
nm-gw(config)# interface F0/1
nm-gw(config)# ip route-cache flow
nm-gw(config)# exit

4) Set the flow destination and break long flows into 5 minute segments:

 nm-gw# ip flow-export destination <YOUR NFSEN BOX IP> 9996
nm-gw# ip flow-export version 5
nm-gw# ip flow-cache timeout active 5

5) Make the changes permanent:

 nm-gw# snmp-server ifindex persist
nm-gw# ^Z
nm-gw# write mem

6) Verify that it works:

 nm-gw# show ip flow export
nm-gw# show ip cache flow

C) Install NFDUMP

1) Install nfdump. MAKE SURE “–enable-nfprofile” is set during .configure.

   At the time of this writing, there is a nfdump SBo pending approval. It has nfprofile enabled.

D) Install NFSEN

1) Install RRDTool via SBo

2) Install MailTools (Perl) via SBo

3) Install Socket6 via CPAN

   perl -MCPAN -e 'install Socket6'

4) tar -svf nfsen-1.3.6p1.tar.gz

5) cd nfsen-1.3.6p1

6) Add nfsen dirs

   mkdir /data
mkdir /data/nfsen

7) cp ./etc/nfsen-dist.conf /etc

8) Edit /etc/nfsen-dist.conf

   FROM: $HTMLDIR    = "/var/www/nfsen/";
TO:   $HTMLDIR    = "/var/www/htdocs/nfsen/";
FROM: $USER    = "netflow";
TO: $USER    = "apache";
FROM: $WWWUSER  = "www";
TO: $WWWUSER  = "apache";
FROM: $WWWGROUP = "www";
TO: $WWWGROUP = "apache";
FROM: $PREFIX  = '/usr/local/bin';
TO: $PREFIX = '/usr/bin/';
FROM: 'upstream1'    => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
and
FROM: 'peer1'        => { 'port' => '9996', 'IP' => '172.16.17.18' },
TO: 'sitename' => { 'port' => '9995', 'col' => '#0000ff', 'type' => 'netflow' },
and/or
TO: 'sitename' => { 'port' => '9996', 'IP' => '172.16.17.18' },
If you use the 'port only' version, each device will have to come in on it's own port.
If you use the 'IP' version, all devices can come in on the same port.
You can send all the flows in on one port and use filters to separate them.

7) cd /data/nfsen/bin/nfsen start

If installed correctly, you should be able to open your web browser and see stuff

   http://<YOU NFESENBOX>/nfsen/nfsen.php

Sources

howtos, software, nfsen, nfdump, network monitoring, needs attention, author arfon

The native TeX Live integration

Tex Live is nowadays the last maintained TeX distribution. Due to its size, it is not provided in the Slackware's official repository. That's why many (most of?) people use the dedicated SlackBuild from SlackBuilds.org[2507] to get it as a huge complete monolithic package.

Of course, this solution is a good one, as everybody will then get a perfectly integrated package, able to feed far more needs than you would look for. Nevertheless, as always there are two faces on the coin. First, it's huge, really huge, easily more than a whole customized system. Second, it's not flexible: once it's installed, you can't update its contents, which means you are stuck with the potential bugs you may encounter until the next major release, possibly for a whole year.

That's why this tutorial will try to show you how to obtain a more updatable and customizable installation, using the native upstream TeX Live distribution. The idea is to put it in its dedicated directory, then manage it with its own tools. Of course it will not be as proper as an orthodox package, but, we will see, not as dirty as it sounds first.

Prepare the TeX Live sanctuary

Here, we will make a place for the future TeX Live installation. The first thing we need is someone to manage it, a user which will be the only one to deal with the TeX package repositories. We could of course use root for this, but this is not a good idea, because granting the right to write everywhere to a third party system is not secure at all. That's why we'll create a dedicated system user (ie. a user without any shell to login):

# useradd -rU -c "The TeX Live user" -d / -s /bin/false tluser

Right. Now, we make the unique place where our new tluser will be allowed to write (YYYY refers to the TeX Live's version, which is the year each one is released, replace it with the one you aim):

# mkdir /opt/texlive-YYYY/
# chown tluser:tluser /opt/texlive-YYYY/
# ln -sf texlive-YYYY /opt/texlive

The last command creates a generic symlink, which will be useful when upgrading the installation, allowing the old release to temporarily stand beside the new.

Installed here though, our TeX Live will be almost useless, because no one will have it in his PATH. We therefore add the two suitable scripts into /etc/profile.d, respectively named texlive.sh and texlive.csh:

texlive.sh

#!/bin/sh
if [ ! "$(id -u)" = "0" ]; then
PATH=$(echo $PATH | sed 's#:\.\?$##;s#$#:/opt/texlive/bin/i386-linux:.#')
export PATH
fi

texlive.csh

#!/bin/csh
if ( `id -u` != "0" ) then
setenv PATH `echo $PATH | sed 's#:\.\?$##;s#$#:/opt/texlive/bin/i386-linux:.#'`
endif

As you can see, in both we insert the new directory at the end of the PATH. This is because we want to use our system's binaries rather than the ones shipped by the TeX live distribution.

You've maybe also noticed this addition won't be made to the root's PATH. It's once again normal, because root is not intended to execute these binaries, we want to use him only to administer our TeX Live installation. More precisely, we want him to use the tluser we created to perform this. That's why the only thing root should have in his path is a wrapper for tlmgr, the native TeX Live manager. Here it is:

tlmgr

#!/bin/sh

if [ $(id -u) -ne 0 ]; then
echo "(E) Only root can use this script." >&2
exit 1
fi

# tluser must use the TeX Live binaries rather than the system's ones.
export PATH=/opt/texlive/bin/i386-linux:/bin:/usr/bin
exec sudo -u tluser tlmgr "$@"

We put it in /usr/sbin, then we ensure it is executable:

# chmod 755 /usr/sbin/tlmgr

This completes the last step to setup our sanctuary. Now let's see how to get the lion into it.

Install the native TeX Live

As you probably don't plan to install all of its components, it is better to perform a network installation. Get the Unix network installer tarball[2508], untar it, enter the directory and run it as tluser (this last step requiring to be root):

$ tar xf install-tl-unx.tar.gz -C /tmp
$ cd /tmp/install-tl-YYYYMMDD
$ su
Password:
# sudo -u tluser ./install-tl

A text menu will be displayed, providing configuration items you select by passing letters or numbers. The only required setting is the final installation directory: enter the directories section then specify our sanctuary (/opt/texlive-YYYY) as TEXDIR. Beyond, you're the cook! Personally, I select the basic scheme in installation scheme, deselect all the languages except mine in language collections, and disable source and doc tree installation in option. Once I've installed the few packages and fonts I need over this, I get a ~80M big TeX Live installation. If you nevertheless prefer a more complete thing, you can pick up in installation scheme a replacement for the teTeX historically provided by Slackware. Once you are done, order to start installation to hard disk.

Manage the native TeX Live

It is time to learn a little bit more about tlmgr, the TeX Live Manager. This section is just a kick-starter explaining how to perform the more common tasks, though. To get a complete description, read tlmgr --help.

The first thing you may want to have is a list of the installed packages. Try:

$ tlmgr info --only-installed

To get an extension you miss, first identify the package it belongs to (here we look for the fullpage extension):

$ tlmgr search --global --file fullpage
tlmgr: package repository http://...
context-fullpage:
texmf-dist/doc/context/third/fullpage/README
texmf-dist/doc/context/third/fullpage/fullpage-doc.pdf
texmf-dist/tex/context/interface/third/t-fullpage.xml
texmf-dist/tex/context/third/fullpage/t-fullpage.mkii
texmf-dist/tex/context/third/fullpage/t-fullpage.mkiv
context-gnuplot:
texmf-dist/doc/context/third/gnuplot/fullpage-example.pdf
texmf-dist/doc/context/third/gnuplot/fullpage-example.tex
preprint:
texmf-dist/doc/latex/preprint/fullpage.pdf
texmf-dist/tex/latex/preprint/fullpage.sty
texmf-dist/source/latex/preprint/fullpage.drv
texmf-dist/source/latex/preprint/fullpage.dtx
texmf-dist/source/latex/preprint/fullpage.ins

Then, once you've found (in our example, we need the preprint package), install it (remember you have to be root to add or modify anything):

# tlmgr install preprint

To make a general update, first check for the potential ones:

$ tlmgr update --list

If there are some, order to first update tlmgr itself (it's always better), then to perform the general updating of the packages:

# tlmgr update --self --all

In the case you don't want to update all the packages, replace the --all option with the name(s) of the package(s) you aim. Last, removing a package is trivially done with:

# tlmgr remove <package>

As you can see, there's not much to know in order to deal with a native TeX Live installation, and it allows to really precisely specify what should be done.

Getting it packaged however

Let's rather call this a snapshot then, a package you will keep for you, to perform quick re-installations (keep in mind it doesn't make sense to distribute it as long as it ships tlmgr). Assuming you've rigourously followed the instructions given all along this tutorial, here is a tlshot named script, which should do the job:

tlshot

#!/bin/sh
#
# TLSHOT - make a package from the current native TeX Live installation.
#

# Copyright (c) 2012, Sébastien Boillod <sbb at tuxfamily dot org>.
#
# Permission to use copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
# IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE

snapvrs () {
ls -1 "/var/log/packages/$1" 2>/dev/null | \
awk -F- -v s="abcdefghijklmnopqrstuvwxyz" \
'($2 ~ /[a-z]$/){sub(/[0-9]+/,"",$2);l=substr(s,index(s,$2)+1,1)}
END{print "'"$1"'" ((l"") ? l : "a")}'
}

export LC_ALL="C"
umask 022
set -e
tl="$(ls -l /opt/texlive | awk '{print $NF}')"
echo "Packaging /opt/$tl..."

root="$(mktemp -d /opt/pkg-XXXXXX)"
mkdir -p "$root/opt" "$root/usr/sbin" "$root/etc/profile.d" "$root/install"
ln -s "$tl" "$root/opt/texlive"
cp /usr/sbin/tlmgr "$root/usr/sbin"
cp /etc/profile.d/texlive.*h "$root/etc/profile.d"
chmod +x "$root/etc/profile.d"/* "$root/usr/sbin"/*
cat >"$root/install/slack-desc" <<EOF
|-----handy-ruler------------------------------------------------------|
texlive: texlive (native TeX Live distribution)
texlive:
texlive: This is a snapshot of the current native TeX Live installation.
texlive:
texlive:
texlive:
texlive:
texlive:
texlive:
texlive:
texlive:
EOF
cd "$root"
# The installation might be *huge*. That's why we just move it
# in the FS (rename) instead of copying it.
mv "/opt/$tl" "$root/opt"
if ! /sbin/makepkg -l y -c n "${TMPDIR:-"/tmp/"}/$(snapvrs "$tl")-i386-1.txz"; then
mv "$root/opt/$tl" /opt # ^^^ we ALWAYS move back the Tex Live.
else
mv "$root/opt/$tl" /opt
fi
rm -rf "$root"

# EoF

The result should be a package in /tmp (or the directory you've specified through the TMPDIR environment variable), named texlive-YYYYX-i386-1.txz, where YYYY is as usual the TeX Live's version, and X is a lower letter dynamically attributed to distinguish a snapshot from another. The TeX Live directory packaged is the one pointed by the /opt/texlive symlink.

If you choose to use snapshots, you'll probably want to disable the automatic backups performed by tlmgr (it won't be very useful, while consuming space and making the snapshots bigger):

# tlmgr option autobackup 0

This time, we have reached the end of this tutorial. I hope you've found something useful here, at least as a basis for your own cleverer solutions. If what you've read so far has globally convinced you, it should not require too much work to tune it according to your tastes. So, play with it and find your perfect TeX Live installation!

Sources

Originally written by Sébastien Boillod[2509] for the Slackware Documentation Project.

howtos, texlive, LaTeX, author vaporseb

cacti

Cacti is an opensource monitoring application.

Prerequisites

MySQL or Mariadb

Apache

rrd, install from SBo[2510].

Installation

Cacti is available at SBo[2511].

1) Enable httpd[2512]

   vi /etc/httpd/httpd.conf
CHANGE:
#Include /etc/httpd/mod_php.conf
TO:
Include /etc/httpd/mod_php.conf
CHANGE:
DirectoryIndex index.html
TO:
DirectoryIndex index.html index.php index.pl

   fix php time zone:
vi /etc/httpd/php.ini
UNCOMMENT: date.timezone = America/Chicago <--and change to the right timezone

2) Add a user if needed:

   adduser cacti

3) Get MySQL[2513] working:

   NOTE: In /etc/rc.d/rc.mysqld COMMENT OUT: SKIP="--skip-networking"

4) Setup the cacti database:

   shell> mysqladmin -u root -p create cacti
shell> locate cacti.sql  (should find cacti.sql)
shell> mysql -u root -p cacti < $(locate cacti.sql)
HINT: If you get: "locate: fatal error: Could not find user database", run updatedb then retry.
shell> mysql -u root -p cacti
mysql> update user_auth set password=md5('admin') where username='admin'; <---may not be needed
mysql> flush privileges;
mysql> exit

   shell> use mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'cactiuser';
mysql> flush privileges;
mysql> exit

5) VERIFY /var/www/htdocs/cacti/include/config.php:

$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "cactiuser";

6) Give the user ownership of the data directories:

   shell> chown -R cacti /var/www/htdocs/cacti/rra
shell> chown -R cacti /var/log/cacti

7) Set up the poller cron job:

   AS USER cacti:
crontab -e
*/5 * * * *  php /srv/www/htdocs/cacti/poller.php > /dev/null 2>&1

8) Run the web install: Open a web browser and go to: http://YOUR_MACHINE/cacti/install.php[2514]

Sources

Originally written by arfon[2515]

howtos, software, cacti, network monitoring, author arfon

Network Monitoring with Arpwatch

Arpwatch allows a system to track IP[2516] address pairings. It maps the MAC Addresses[2517] on a network by tracking ARP[2518] requests to each device on the LAN[2519] and recording the response in a database. All network cards are manufactured with a unique MAC address and this allows Arpwatch to identify each device. The main purpose of mapping a network like this is so the system administrator can keep track of the devices on a network and identify when there are networking issues. Arpwatch is commonly used to identify when an ARP Man in the Middle attack[2520] is being conducted by notifying the system administrator when a duplicate MAC address is being used on the network. Arpwatch is most commonly ran on routers, but it can also useful on a managed network switch.

Install

Arpwatch is not apart of the standard Slackware Linux distribution. It can be obtained by downloading the SlackBuild from SlackBuilds.org[2521] for your desired Slackware release. SlackBuilds.org has a great HOWTO[2522] discussing how to install a SlackBuild. The SlackBuilds.org FAQ[2523] is also very helpful for Slackware users struggling to install a SlackBuild.

Configuration

The included start up script allows the administrator to configure Arpwatch for one or more network cards. The start up script is also where the administrator can configure the run time settings for Arpwatch. Open up /etc/rc.d/rc.arpwatch on your system and edit the OPTIONS variable to your satisfaction. By default the root account gets all Arpwatch emails. Let's try changing the email account Arpwatch will use for email notifications. Make sure you use a user account or an email address that exists or Arpwatch will not send notifications to you.

The line you are looking for is:

OPTIONS="-i $IFACE -f $ARPDIR/arp-$IFACE.dat -u root -e root -s root"

The Arpwatch man page indicates that the -e switch manages the email account. Let us change it to the user darkstar.

OPTIONS="-i $IFACE -f $ARPDIR/arp-$IFACE.dat -u root -e darkstar -s root"

Or we can use a remote email address if sendmail is configured to do so:

OPTIONS="-i $IFACE -f $ARPDIR/arp-$IFACE.dat -u root -e user@randomdomain.com -s root"

Update MAC Address Database

The README.ethercodes installed with the Arpwatch SlackBuild indicates that the MAC Address database that comes with the source tarball can be outdated. This database is only updated when there is a new release of Arpwatch, which has not happened in quite a while.

These steps are covered in greater detail if you read /usr/doc/arpwatch-$VERSION/README.ethercodes

su -
cd /var/lib/arpwatch
wget http://standards-oui.ieee.org/oui.txt
./massagevendor oui.txt > ethercodes.dat
rm -f oui.txt

Start and Stop at Boot

The file /etc/rc.d/rc.arpwatch controls start up and shut down of Arpwatch. In order to use this script you need to add a few lines to /etc/rc.d/rc.local and /etc/rc.d/rc.local_shutdown. Be sure to use the appropriate order if you have any other network services starting or stopping in these scripts. As an example, you should start Arpwatch before you bring up hostapd if you are running a Wireless Access Point[2524], and shutdown Arpwatch after hostapd exits. Using such ordering assures that Arpwatch identifies all ARP requests on your network.

Continuing with the above example lets assume you are running a wireless access point. Add this to /etc/rc.d/rc.local

if [ -x /etc/rc.d/rc.arpwatch ]; then
/etc/rc.d/rc.arpwatch start wlan0
fi

If you wish to run Arpwatch on multiple network cards adjust /etc/rc.d/rc.local like this:

# Change eth0 and wlan0 to match your configuration
if [ -x /etc/rc.d/rc.arpwatch ]; then
/etc/rc.d/rc.arpwatch start eth0
/etc/rc.d/rc.arpwatch start wlan0
fi

It's important that Arpwatch is stopped cleanly when your system is shutdown or rebooted. If you haven't already done so, create /etc/rc.d/rc.local_shutdown as root:

touch /etc/rc.d/rc.local_shutdown

Next you need to edit rc.local_shutdown like so:

if [ -x /etc/rc.d/rc.arpwatch ]; then
/etc/rc.d/rc.arpwatch stop
fi

Finally, mark rc.local and rc.local_shutdown as executable. This tells Slackware to automatically execute these scripts during the boot process.

chmod +x /etc/rc.d/rc.local
chmod +x /etc/rc.d/rc.local_shutdown

Wrap Up

Assuming all steps were followed you should have received an email for each device Arpwatch discovered on your network. If you opted to use the root user for notifications, you can view them by using the mail command as root user.

mail -f /var/spool/mail/root

Here is an example of what you may find in your inbox:

            hostname: <unknown>
ip address: 192.168.151.170
ethernet address: XX:XX:XX:XX:XX:XX
ethernet address: XX:XX:XX:XX:XX:XX
ethernet vendor: <unknown>
timestamp: Monday, April 9, 2018 12:01:39 -0600

Sources

* Arpwatch Home[2525]

* Originally written by mralk3[2526]

howtos, network, monitoring, arpwatch, user mralk3

irssi

Irssi is a ncurses based IRC client.

The IRC (Internet Relay Chat) protocol has been designed for use with text based conferencing.

Installation

irccd is distributed with Slackware.

Using with tor

This paragraph shows a method you can follow to “torify” irssi for an IRC session on Freenode with Slackware Linux.

What is Freenode

The Freenode IRC network provides discussion facilities for the Free and Open Source Software communities. Amongst its channels one finds those that cater for discussion on Slackware, e.g. the ##slackware , #slackbuilds and #slackdocs channels.

What is tor

tor (The Onion Router) provides anonymity for dissidents and whistle blowers on the Internet. It also channels traffic through port 443, thus it can be used to penetrate through some dumb firewalls that block some services to the users relying only on the destination port information.

A SlackBuild for tor is maintained on the slackbuilds.org[2527] repository. You will also need torsocks[2528], as you will be using torify.

If you are using a desktop, I recommend to install also vidalia. A SlackBuild for vidalia is also found on the slackbuilds.org[2529] repository. If you choose to use vidalia, then do not start tor manually, as otherwise vidalia will get confused and quit. If on the other hand you do not want vidalia, then you will need to start tor manually. As root perform the following commands to start tor:

# chmod +x /etc/rc.d/rc.tor
# /etc/rc.d/rc.tor start

I recommend to install the latest releases of tor (and optionally vidalia) from the official download sites, as the SlackBuilds are not always updated. Modify the scripts to target the updated source code if needed.

Misuse

Some sorry individuals might pursue this option for trolling purposes. Although I am not going to deviate on this subject, trolling is a sure sign of a personality disorder. Seek professional help as trolling is not going to ease your frustrations! Also note that you will need to register you nick before starting so you will be banned after you get detected for misbehavior anyway.

Register your Nick

You will need to register your nick with freenode.net. You will need a valid e-mail address to do that. The procedure to register your nick may be followed from here: http://freenode.net/faq.shtml#nicksetup[2530] so I will not repeat it.

SASL Authentication

Then you will need to logon Freenode via SASL authentication.

Install cpan2tgz[2531]. You will need Version 0.6.7 or later. Look also at the git[2532] repository for the most recent release. A SlackBuild for cpan2tgz is available from slackbuilds.org[2533]

Then proceed to install some required CPAN perl modules:

As root, execute the following commands. Note that you will need an Internet connection

# cpan2tgz --build-tag=me Crypt::Blowfish
# cpan2tgz --build-tag=me Math::BigInt::GMP
# cpan2tgz --build-tag=me Crypt::DH Crypt::OpenSSL::Bignum
# cpan2tgz --build-tag=me Math::BigInt
# cpan2tgz --build-tag=me Math::BigInt::FastCalc

Note that the argument “–build-tag=me” will cause a “build tag” to be added to the resulting package (like “perl-crypt-blowfish-2.12-i486-1me.txz”) which makes it easier to exclude from slackpkg[2534] package management.

Now as your chosen non-privileged user, rename your irssi configurations files, to ensure consistency:

$ mv -i $HOME/.irssi $HOME/.irssi.orig
$ irssi

Quit irssi by entering

/quit

Edit the 3rd last line of the file $HOME/.irssi/config which will have been created, to accomodate your nick. For example:

From:

core = { real_name = "Chris"; user_name = "chris"; nick = "chris"; };

To:

core = { real_name = "Chris"; user_name = "Chris Abela"; nick = "ChrisAbela"; };

Then proceed as follows:

$ mkdir -p $HOME/.irssi/scripts/autorun
$ cd $HOME/.irssi/scripts/
$ wget http://scripts.irssi.org/scripts/cap_sasl.pl
$ ln -s ../cap_sasl.pl autorun/
$ cd
$ irssi

In the irssi session, enter the following commands:

/network add Freenode
/server add -auto -ssl -ssl_verify -network Freenode irc.freenode.net 7000
/save
/script load cap_sasl.pl
/sasl set Freenode <nick> <password> PLAIN

Naturally enter your actual nick and password where indicated.

Proceed like this:

/sasl save
/save
/quit

Next time you run irssi, you will automatically logon to Freenode without being asked for the password, this indicates that your SASL authentication has been succesful.

Torifying irssi

Note that Freenode hidden service is offline until further notice. The rest of this wiki will not work.

If you have an installation with multilib packages, it may be necessary to create this symbolic link as root for the torify command to work:

# cd /usr/lib
# ln -s ../lib64/torsocks/ .

To connect to freenode with tor, start it as follows:

$ http_proxy=http://127.0.0.1:6677/ torify irssi

and it will fail miserably!

This is my result:

20:45 -!- Irssi: Looking up irc.freenode.net
20:45 -!- Irssi: SASL: auth loaded from /home/chris/.irssi/sasl.auth
20:46 -!- Irssi: Connecting to irc.freenode.net [195.148.124.79] port 7000
20:46 -!- Irssi: warning SSL handshake failed: Connection reset by peer
20:46 -!- Irssi: Connection lost to irc.freenode.net

You will need to connect to the Freenode's tor's hidden service address: frxleqtzgvwkv7oz.onion

/server frxleqtzgvwkv7oz.onion

Be aware that the connection will be slow. If you are using vidalia, you may try changing your proxy server for a better connect. Eventually, you should manage to log in but you have to be patient and accept some latency. Should you still fail, consider reporting your problems to the #freenode channel.

You may check that you are chatting anonymously:

/whois <nick>

I obtained the following result:

20:18 -!- ChrisAbela [~Chris@gateway/tor-sasl/chrisabela]
20:18 -!-  ircname  : Chris
20:18 -!-  server   : zelazny.freenode.net [internal]
20:18 -!-  hostname : gateway/tor-sasl/chrisabela 255.255.255.255
20:18 -!-  idle     : 0 days 0 hours 0 mins 9 secs [signon: Fri Jan 10 20:18:40 2014]
20:18 -!-  account  : ChrisAbela
20:18 -!- End of WHOIS

Note that the user_name is leaked!

Then proceed as usual:

/j ##slackware

If you need assistance, you may join the freenode channel to seek guidance:

/j #freenode

Sources

http://www.irssi.org/[2535]

https://tools.ietf.org/html/rfc1459[2536]

http://freenode.net/[2537]

https://www.torproject.org/[2538]

http://www.andrews-corner.org/irssi.html[2539]

Originally written by Chris Abela[2540]

Contributions by markand[2541]

howtos, tor, irssi, author chrisabela

Install snmptrapd on Slackware

NOTE: 'public' should be changed to your correct community string.

1) Install the official Slackware net-snmp package.

2) Create /etc/snmp/snmptrapd.conf

   authCommunity log,execute,net public
WHERE:
"log" & "execute" are the actions to take
"net redrock" is to listen for any traps with redrock as the community string

3) Start snmptrapd by:

   snmptrapd -Lf /var/log/snmptrapd.log -c /etc/snmp/snmptrapd.conf
WHERE:
"-Lf" is log to file /var/log/snmptrapd.log
"-c" is use /etc/snmp/snmptrapd.conf as the config file.

4) Test:

   snmptrap -v 1 -c public localhost .1.3.6.1.6.3.1.1.5.3 localhost 2 0 ' ' 1.3.6.1.2.1.2.2.1.1 i 1
cat /var/log/snmptrapd.log

Sources

* Contributions by markand[2542] –>

howtos, software, snmptrapd, snmp, snmp traps, needs attention, author arfon

Asciidoc

Introduction

Keeping notes is an integral part of using any Linux distribution. Keeping them in plain text allows one to use them from a console during initial setup; using a consistent markup for plain text adds to the readability of the notes.

asciidoc is one of the tools that provide such a consistent markup. Source highlighting, for those who prefer it, can add to the readability of the text file.

asciidoc can produce HTML files, an added bonus as it allows to interlink notes and makes browsing them with lynx more effective. It can also work in tandem with man2html[2543] to provide HTML access to all installed man pages on the fly.

For an interesting read about asciidoc see Living the Future of Technical Writing[2544].

Helper Packages and Files

Asciidoctor

Consider installing Asciidoctor[2545].

Dblatex

To convert asciidoc files to PDF, install dblatex[2546] from SlackBuilds.org. See documentation[2547], PDF.

Source-highlight

To highlight source listings, install source-highlight[2548] from SlackBuilds.org. See online manual[2549]. This:

[source,bash]
---------------------------------------------------------------------------
#!/bin/bash
export LANG=en_US.UTF-8
---------------------------------------------------------------------------

renders as (this is DokuWiki's GeSHi highlighting, but gives the general idea):

#!/bin/bash
export LANG=en_US.UTF-8

Vim Syntax Highlighter

If asciidoc.vim is not available locally, download[2550]. Otherwise:

$ mkdir -p $HOME/.vim/syntax

$ cp /usr/share/vim/vimVERSION/syntax/asciidoc.vim $HOME/.vim/syntax/

and see Appendix E. Vim Syntax Highlighter[2551].

Highlighting can also work by inserting at the bottom of the file:

// vim: set syntax=asciidoc:

User Guide

The user guide file is found in /usr/doc/asciidoc-VERSION/doc/asciidoc.txt. To make the AsciiDoc User Guide:

$ asciidoc -b xhtml11 -a icons -a iconsdir=/etc/asciidoc/images/icons FILENAME

and see /usr/doc/asciidoc-VERSION/doc/asciidoc.html. For more see asciidoc.org[2552].

Source Files

TXT

It is a convention for asciidoc files to have a .txt extension.

Common Variables

To organize the use of common variables in all files, make a directory include. Common paths, for example, can be put in a paths.txt as a series of:

:pathname: {pathname=/path/to/somewhere}

Then, at the header of each file put:

include::/path/to/include/paths.txt[]

and in text use as:

{pathname}/remaining/path

System Attributes

Any variable that can be defined in bash with NAME=“$(commands)” can also be defined in asciidoc as a system attribute[2553]. First define the attribute in the header section:

:NAME: {sys:commands}

then use in text as:

{NAME}

Man

Linking to man pages in HTML is very useful. See man2html Mini HOWTO[2554] on how to set the infrastructure. To see grep(1) use

http://localhost/cgi-bin/man/man2html?1+grep[grep(1)]

Output

XHTML

To make an HTML file:

$ asciidoc -b xhtml11 FILENAME

To use icons, mainly for admonition paragraphs, add the options:

-a icons -a iconsdir=/etc/asciidoc/images/icons

To have a fixed-width HTML, add:

-a max-width=45em

To use additional custom CSS, add:

-a stylesheet=/path/to/stylesheet.css

It may be helpful to put an alias in .bashrc:

alias ad="/usr/bin/asciidoc.py \
  -b xhtml11 \
  -a icons -a max-width=45em \
  -a iconsdir=/etc/asciidoc/images/icons \
  -a stylesdir=/etc/asciidoc/stylesheets \
  -a stylesheet=/path/to/stylesheet.css"

PDF

To make a PDF file, first install dblatex. Then:

$ asciidoc -b docbook45 FILENAME

$ dblatex FILENAME.xml

DokuWiki

The asciidoc files can be converted to DokuWiki format for the Slackware Documentation Project. There are various ways to do this, and one of the more straightforward ones is to convert the HTML files produced by asciidoc using the perl module HTML::WikiConverter::DokuWiki[2555], see also HTML::WikiConverter[2556].

# cpan

cpan[1]> install HTML::WikiConverter::DokuWiki

$ html2wiki –dialect DokuWiki input.html > output.wiki

Sources

Original source: asciidoc mini howto[2557]

Originally written by pdi[2558]

Contributions by markand[2559]

howtos, asciidoc

Zabbix

Zabbix is an open source network monitoring application capable of monitoring network devices, servers, databases and web services on a wide variety of operating systems.

Website: www.zabbix.com[2560]

Prerequisites

MySQL[2561]

httpd[2562]

Installation

Zabbix is available at zabbix_agentd (SBo)[2563], zabbix_proxy (SBo)[2564], zabbit_server (SBo)[2565]

1) Create the zabbix user and group

root@darkstar# groupadd -g 228 zabbix
root@darkstar# useradd -d /dev/null -s /bin/false -u 228 -g 228 zabbix

3) Install the necessary version of Zabbix from SBOPKG/Slackbuilds

zabbix_agentd[2566]

zabbix_proxy[2567]

zabbit_server[2568]

4) Create the MySQL database

4a) On your MySQL server, connect with full privileges:

root@darkstar# mysql -u root -p

4b) Create the zabbix database & user:

mysql> create database zabbix character set utf8;
mysql> use mysql;
mysql> grant all on zabbix.* to zabbix@localhost identified by
'<zabbix_password>';
mysql> flush privileges;
mysql> quit

4c) On your Zabbix server, connect to the new database, create the schema & add initial data:

root@darkstar# cd /usr/share/zabbix_server/create
root@darkstar# mysql -u zabbix -p <zabbix_password>
mysql> use zabbix;
mysql> source schema/mysql.sql;
mysql> source data/data.sql;
mysql> source data/images_mysql.sql;
mysql> quit

5) Configure PHP:

5a) Zabbix requires some parameters in /etc/httpd/php.ini to be altered:

post_max_size = 16M               (Default = 8M)
max_execution_time = 300          (Default = 30)
max_input_time = 300              (Default = 60)
date.timezone = America/Chicago   (Default = blank)
***NOTE*** the ";" in front of date.timezone MUST be removed

5b) Enable PHP in /etc/httpd/httpd.conf:

ADD: index.php to the “DirectoryIndex index.html” line.

UNCOMMENT: “Include /etc/httpd/mod_php.conf” line.

After changing the php.ini file, you'll need to restart httpd for the changes to have effect:

root@darkstar# /etc/rc.d/rc.httpd restart

6) Edit the zabbix_server configuration file (/etc/zabbix/zabbix_server.conf):

DBUser=zabbix                    (Default is "root" and it's not a good idea)
DBPassword=<zabbix_password>     (Change as defined above)

7) Make /etc/rc.d/rc.zabbix_server executable:

root@darkstar# chmod +x /etc/rc.d/rc.zabbix_server

8) Start the Zabbix server

root@darkstar# /etc/rc.d/rc.zabbix_server start

The Zabbix server can be accessed via a web browser at http://your_server/zabbix/

Follow the setup instructions.

Default login is:

   USER: Admin
PASS: zabbix

Sources

* Originally written by arfon[2569]
* Contributions by mfillpot[2570] * Contributions by markand[2571]

howtos, software, zabbix, network monitoring, author arfon

ntop

Installation

A) Enable httpd web server

B) Install ntop dependencies

1) Install RRDTool via sbopkg

2) Install Graphviz via sbopkg

3) Install GeoIP via sbopkg

C) Install and configure ntop

1) Add ntop user and group

   groupadd -g 212 ntop
useradd -u 212 -g ntop ntop

2) Install ntop via sbopkg

3) Make rc.ntop executable

   chmod 755 /etc/rc.d/rc.ntop

4) Set ntop admin password

   /usr/bin/ntop -P /var/lib/ntop -u ntop -A

5) start ntop

   /etc/rc.d/rc.ntop start

You should be able to browse to http://ntopmachine:3000[2572] and it should be working.

Sources

howtos, software, ntop, network monitoring, needs attention, author arfon

monit

monit is a free open source utility for managing and monitoring, processes, programs, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.

website: monit.com/monit/[2573]

How to install monit on Slackware

1) Download the latest SlackBuild script from slackbuilds.org[2574].

2) Edit configuration file /etc/monitrc

3) Make /etc/rc.d/rc.monit executable

chmod +x /etc/rc.d/rc.monit

4) Start monit

/etc/rc.d/rc.monit start

The file is setup to start Monit's http server so you have something interesting to look at. After you have started monit, point your browser to http://127.0.0.1:2812/[2575] and log in with the username admin and password monit.

Make monit start at boot

To make monit auto-start at boot you just need to add the following lines to your /etc/rc.d/rc.local file.

if [ -x /etc/rc.d/rc.monit ]; then
/etc/rc.d/rc.monit start
fi

Useful manuals/HowTo Guides

* Configuration examples can be found at mmonit.com/wiki/Monit/ConfigurationExamples[2576]
* How to Enable SSL on monit's web interface mmonit.com/wiki/Monit/EnableSSLInMonit[2577]
* Sending alerts to Gmail mmonit.com/wiki/Monit/Gmail[2578]
* Making custom checks mmonit.com/wiki/Monit/CustomTests[2579]

Sources

* Written by lamerix[2580]

howtos, software, monit, author lamerix

Set Up BOINC with ATI (AMD) Videocard under Slackware

This howto is used based on Slackware64 14.0 and boinc 7.2.33 x64, and ATI HD 4350 (RV710) videocard.

Firstly - install a fresh slackware64 14.0. Then we download the latest BOINC client from here[2581]

Put the file boinc_7.2.33_x86_64-pc-linux-gnu.sh in your user home directory, from who we plan start the boinc client/

note: from the same user we must start x window system, because otherwise BOINC will not see GPU

Then do:

sh boinc_7.2.33_x86_64-pc-linux-gnu.sh

After that in our home directory there will be the “BOINC” subdirectory, which contains all the binaries we want. Now is the time to prepare a video card.

Download catalyst 13.1 drivers from AMD/ATI site (the latest version is 13.1 - it supports legacy old 4350 video cards)

http://www2.ati.com/drivers/linux/amd-driver-installer-catalyst-13.1-linux-x86.x86_64.zip

Then we must also download SDK 2.9 from here[2582] to get OpenCL support for video card:

Now under root unzip catalyst 13.1 and type:

sh  amd-driver-installer-catalyst-13.1-legacy-linux-x86.x86_64.run

and install it.

After that untar AMD-APP-SDK-v2.8-lnx32.tgz, and install it.

Now you need to run a window manager from selected user (startx from a command line interface), then in KDE (or whichever window manager you choose), open a terminal, cd into ~/BOINC/ and type

./boinc

You should see something like:

bash-4.2$ boinc
boinc: /lib64/libssl.so.1.0.0: no version information available (required by boinc)
boinc: /usr/lib64/libcurl.so.4: no version information available (required by boinc)
boinc: /lib64/libcrypto.so.1.0.0: no version information available (required by boinc)
31-Jan-2014 15:42:41 [---] cc_config.xml not found - using defaults
31-Jan-2014 15:42:41 [---] Starting BOINC client version 7.2.33 for x86_64-pc-linux-gnu
31-Jan-2014 15:42:41 [---] log flags: file_xfer, sched_ops, task
31-Jan-2014 15:42:41 [---] Libraries: libcurl/7.27.0 OpenSSL/1.0.1c zlib/1.2.6 libidn/1.25
31-Jan-2014 15:42:41 [---] Data directory: /home/someuser/BOINC
boinc: /lib64/libssl.so.1.0.0: no version information available (required by boinc)
boinc: /usr/lib64/libcurl.so.4: no version information available (required by boinc)
boinc: /lib64/libcrypto.so.1.0.0: no version information available (required by boinc)
31-Jan-2014 15:42:41 [---] CAL: ATI GPU 0: ATI Radeon HD 4350/4550 (R710) (CAL version 1.4.1734, 512MB, 439MB available, 192 GFLOPS peak)
31-Jan-2014 15:42:41 [---] OpenCL: AMD/ATI GPU 0: ATI Radeon HD 4350/4550 (R710) (driver version CAL 1.4.1734, device version OpenCL 1.0 AMD-APP (937.2), 512MB, 439MB available, 192 GFLOPS peak)
31-Jan-2014 15:42:41 [---] OpenCL CPU: Intel(R) Core(TM)2 Duo CPU     E4500  @ 2.20GHz (OpenCL driver vendor: Advanced Micro Devices, Inc., driver version 2.0 (sse2), device version OpenCL 1.2 AMD-APP (937.2))
getaddrinfo: Success
31-Jan-2014 15:42:41 [---] Host name: TESTslk64_14
31-Jan-2014 15:42:41 [---] Processor: 2 GenuineIntel Intel(R) Core(TM)2 Duo CPU     E4500  @ 2.20GHz [Family 6 Model 15 Stepping 13]
31-Jan-2014 15:42:41 [---] Processor features: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm
31-Jan-2014 15:42:41 [---] OS: Linux: 3.2.29
31-Jan-2014 15:42:41 [---] Memory: 3.79 GB physical, 1.91 GB virtual
31-Jan-2014 15:42:41 [---] Disk: 36.67 GB total, 17.73 GB free
31-Jan-2014 15:42:41 [---] Local time is UTC +2 hours
31-Jan-2014 15:42:41 [rosetta@home] URL http://boinc.bakerlab.org/rosetta/; Computer ID 777; resource share 100
31-Jan-2014 15:42:41 [Milkyway@Home] URL http://milkyway.cs.rpi.edu/milkyway/; Computer ID 7777; resource share 100
31-Jan-2014 15:42:41 [Einstein@Home] URL http://einstein.phys.uwm.edu/; Computer ID 777777; resource share 100
31-Jan-2014 15:42:41 [Poem@Home] URL http://boinc.fzk.de/poem/; Computer ID 77777777; resource share 100
31-Jan-2014 15:42:41 [SETI@home] URL http://setiathome.berkeley.edu/; Computer ID 777777777777; resource share 100
31-Jan-2014 15:42:41 [---] General prefs: from http://www.worldcommunitygrid.org/ (last modified 01-Jan-1970 03:00:01)
31-Jan-2014 15:42:41 [---] Host location: none
31-Jan-2014 15:42:41 [---] General prefs: using your defaults
31-Jan-2014 15:42:41 [---] Reading preferences override file
31-Jan-2014 15:42:41 [---] Preferences:
31-Jan-2014 15:42:41 [---]    max memory usage when active: 1163.31MB
31-Jan-2014 15:42:41 [---]    max memory usage when idle: 1744.96MB
31-Jan-2014 15:42:41 [---]    max disk usage: 2.00GB
31-Jan-2014 15:42:41 [---]    max CPUs used: 1
31-Jan-2014 15:42:41 [---]    suspend work if non-BOINC CPU load exceeds 50%
31-Jan-2014 15:42:41 [---]    (to change preferences, visit a project web site or select Preferences in the Manager)
31-Jan-2014 15:42:41 [---] Not using a proxy
31-Jan-2014 15:42:42 Initialization completed
31-Jan-2014 15:42:42 [Milkyway@Home] Restarting task de_modfit_16_3s_bpl_128wrap_1_1390392603_1849719_0 using milkyway_separation__modified_fit version 128 in slot 1
getaddrinfo: Success
31-Jan-2014 15:42:42 [Milkyway@Home] Sending scheduler request: To fetch work.
31-Jan-2014 15:42:42 [Milkyway@Home] Requesting new tasks for CPU and ATI
31-Jan-2014 15:42:45 [Milkyway@Home] Scheduler request completed: got 1 new tasks
getaddrinfo: Success

How to attach BOINC to project manager

After that you have a working BOINC installation. To start participating in projects, go to setiathome.berlkeley.edu, or bam.boincstats.com (if you plan to participate with more than one project), and register. In the second case (via bam.boinc.com) you can attach your project as follows:

In one terminal window run ./boinc .

Open another terminal window with the same user, and in the BOINC directory type:

./boinccmd --join_acct_mgr http://bam.boincstats.com boincstats_username boincstats_password

in first console (where you ran ./boinc) you see messages like “account manager attached, project xxx attached, start to download,etc”….

If you want to edit boinc preferences, you can create the file global_prefs_override.xml in your boinc directory containing the following:

<global_preferences>
<run_on_batteries>0</run_on_batteries>
<run_if_user_active>1</run_if_user_active>
<run_gpu_if_user_active>1</run_gpu_if_user_active>
<suspend_cpu_usage>50.000000</suspend_cpu_usage>
<start_hour>0.000000</start_hour>
<end_hour>0.000000</end_hour>
<net_start_hour>0.000000</net_start_hour>
<net_end_hour>0.000000</net_end_hour>
<leave_apps_in_memory>0</leave_apps_in_memory>
<confirm_before_connecting>0</confirm_before_connecting>
<hangup_if_dialed>0</hangup_if_dialed>
<dont_verify_images>0</dont_verify_images>
<work_buf_min_days>2.100000</work_buf_min_days>
<work_buf_additional_days>0.250000</work_buf_additional_days>
<max_ncpus_pct>75.000000</max_ncpus_pct>
<cpu_scheduling_period_minutes>300.000000</cpu_scheduling_period_minutes>
<disk_interval>360.000000</disk_interval>
<disk_max_used_gb>2.000000</disk_max_used_gb>
<disk_max_used_pct>75.000000</disk_max_used_pct>
<disk_min_free_gb>0.950000</disk_min_free_gb>
<vm_max_used_pct>10.000000</vm_max_used_pct>
<ram_max_used_busy_pct>30.000000</ram_max_used_busy_pct>
<ram_max_used_idle_pct>45.000000</ram_max_used_idle_pct>
<max_bytes_sec_up>0.000000</max_bytes_sec_up>
<max_bytes_sec_down>0.000000</max_bytes_sec_down>
<cpu_usage_limit>80.000000</cpu_usage_limit>
<daily_xfer_limit_mb>0.000000</daily_xfer_limit_mb>
<daily_xfer_period_days>0</daily_xfer_period_days>
</global_preferences>

ATI GPU without X window manager

If you do not want to use X Window manager (say, on a server), but want to use ATI GPU in boinc, you can go that way:

In the home directory of the account you want to run boinc from, make a script called dummy_wm.boinc:

#!/bin/sh
/home/boinc/BOINC/boinc --dir /home/boinc/BOINC >/home/boinc/BOINC/boinc.log 2>/home/boinc/BOINC/berror.log

make that script executable:

chmod +x dummy_wm.boinc

Then in the same directory create a script called xserv_boinc.scr:

xinit /home/boinc/dummy_wm.boinc

Make it executable too:

chmod +x xserv_boinc.scr

Now you must run that script (dummy_wm.boinc) as shown below to keep it running. If you log in in your server via ssh, for example, and run that script, boinc will be running, but when you log out, it will stop. To keep the task running after you log out, start it as follows:

at -v -f /home/boinc/xserv_boinc.scr now+1min

It will start the task after 1 minute from now.

You can check the running status by checking log files:

/home/boinc/BOINC/boinc.log

and

/home/boinc/BOINC/berror.log

You can always get some info about tasks with the following command:

 /home/boinc/BOINC/boinccmd --get_simple_gui_info
/home/boinc/BOINC/boinccmd --get_tasks

ATI VideoCard stats info

You can also get some info about your video card state via commands (must be executed under the root account):

 DISPLAY=:0 aticonfig --odgc

and

 DISPLAY=:0 aticonfig --odgt

Sources

Originally written by John Ciemgals[2583]

howtos,, boinc,, ati,amd,, catalyst,, opencl,4350,slackware, author wisedraco

Google Chrome Browser in Slackware

According to Google, the chrome browser is a web browser built for speed, simplicity, and security. Note that this package has little to do with chromium[2584] as this is a pre-compiled package by Google, instead of a package that a user can compile locally from the open-source project[2585].

Google Chrome is not installed as a default application in Slackware but it is provided instead as an installation-ready application through a Slackbuild, created by Patrick Volkerding that is available in the extra folder of the Slackware folder tree. At the time of this writing, the Google Chrome Slackbuild is available in the extra directory of Slackware13.37, and 14.

Stable Google Chrome Release Installation on Slackware 14.1 & 14

In the Slackware directory tree, the google-chrome folder inside the extra directory contains a README[2586] file that provides simple instructions to follow for this installation. Using a Slackware mirror[2587], the Google Chrome Slackbuild folder can be easily downloaded online.

The following simple steps illustrate the installation of a Stable release of Google Chrome in Slackware 14:

1. Visit the official Google Chrome download page[2588].

2. Click the download button, and select either:

32 bit .deb (for Debian/Ubuntu).

Or 64 bit .deb (for Debian/Ubuntu).

3. Select a download package that is appropriate for your architecture:

32 bit .deb (for Debian/Ubuntu) for a 32-bit version of Slackware.

64 bit .deb (for Debian/Ubuntu) for a 64-bit version of Slackware.

4. Read and accept the license terms.

5. Download the .deb package.

6. Copy the extra/google-chrome Slackbuild folder into a temporary location (/tmp for example).
http://slackbuilds.org/mirror/slackware/slackware-14.1/extra/google-chrome/[2589]

7. Move or copy the downloaded .deb package (google-chrome-stable_current_i386.deb or google-chrome-stable_current_amd64.deb) package in the same folder (/tmp/google-chrome).

8. In a terminal log in as root:

su -

9. Change into the temporary directory:

cd /tmp/google-chrome

10. Edit the Slackbuild-

   vi google-chrome.Slackbuild

The .deb packages no longer use lzma compression so you must change the line that says:

   ar p $CWD/google-chrome-${RELEASE}_current_${DEBARCH}.deb data.tar.lzma | lzma -d | tar xv || exit 1

to:

   ar p $CWD/google-chrome-${RELEASE}_current_${DEBARCH}.deb data.tar.xz | xz -d | tar xv || exit 1

11. Make the Slackbuild executable:

   chmod 755 google-chrome.Slackbuild

12. Run google-chrome.SlackBuild script as root:

sh google-chrome.SlackBuild

13. At completion of the SlackBuild execution, a message similar to the following one will appear:

Slackware package /tmp/google-chrome-42.0.2311.152-x86_64-1.txz created.

The exact version number in the package filename will depend on the version of Google Chrome found in the .deb package, but it will be something like google-chrome-21.0.1180.81-i386-1.txz (32-bit architecture) or google-chrome-21.0.1180.81-x86_64-1.txz (64-bit architecture).

14. Install the newly created package as root. It will be located in the /tmp directory:

upgradepkg --install-new /tmp/google-chrome-42.0.2311.152-x86_64-1.txz

Note that OLD VERSIONS of Google Chrome requires the PAM library libpam.so.0. A google-chrome-pam-solibs package is available in the same folder (extra/google-chrome) as the Google Chrome Slackbuilds. Installing the google-chrome-pam-solibs package allow newer versions of Chrome to run without having to actually switch the system to using PAM. To install the google-chrome-pam-solibs package, run the following code as root within the downloaded or copied Google Chrome Slackbuild directory (/tmp/google-chrome) :

upgradepkg --install-new /tmp/google-chrome/google-chrome-pam-solibs-1.1.3-i486-1.txz

If you need real PAM (to compile Chromium for example), you can find it in extra/source/pam/ from the Slackware directory tree.

Installing Google Chrome browser in Slackware 13.37 requires the installation of the packages GConf and ORBit2. These packages are also available in the extra/google-chrome directory and can be easily installed with the upgradepkg command.

Beta and Unstable Google Chrome Release Installation on Slackware 14.1 & 14

Installing Beta or Unstable[2590] release of Google chrome follows the same steps as installing the Stable release installation with minor tweaks:

Download a Beta or Unstable[2591] release of Google Chrome.

In step 10, execute the Slackbuild script as follow:

RELEASE=beta sh google-chrome.SlackBuild

for a Beta release.

RELEASE=unstable sh google-chrome.SlackBuild

for an Unstable release.

Sources

Original source: google-chrome.SlackBuild readme[2592]

Contributions by escaflown[2593]

howtos, software, google-chrome, author escaflown

HOWTO articles - Software

This section contains How-To articles for software that does not fit into the following categories:

Slackware Admin[2594]

General Admin[2595]

Cloud[2596]

Databases[2597]

Emulators[2598]

Multimedia[2599]

Network Services[2600]

Security[2601]

Window Managers[2602]

Inspired? Want to write a Software HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Administration HOWTOS

Page
Description
Tags

Network Monitoring with Arpwatch
Network Monitoring with Arpwatch Arpwatch allows a system to track IP address pairings. It maps the MAC Addresses on a network by tracking ARP requests to each device on the LAN and recording the response in a database. All network cards are manufactured with a unique
howtos, network, monitoring, arpwatch, user mralk3

Asciidoc
Asciidoc Introduction Keeping notes is an integral part of using any Linux distribution. Keeping them in plain text allows one to use them from a console during initial setup; using a consistent markup for plain text adds to the readability of the notes.
howtos, asciidoc

at - Task Scheduling
at - Task Scheduling at is a task scheduling tool which one-time enables tasks to be performed on your system. The batch is like at but permforms the one-time tasks when system load permits it, all command and functions of at can be replicated by
howtos, task scheduling, author mfillpot

Set Up BOINC with ATI (AMD) Videocard under Slackware
Set Up BOINC with ATI (AMD) Videocard under Slackware This howto is used based on Slackware64 14.0 and boinc 7.2.33 x64, and ATI HD 4350 (RV710) videocard. Firstly - install a fresh slackware64 14.0. Then we download the latest BOINC client from
howtos, boinc, ati amd, catalyst, opencl 4350 slackware, author wisedraco

cacti
cacti Cacti is an opensource monitoring application. Prerequisites * MySQL or Mariadb * Apache * rrd, install from SBo. Installation Cacti is available at SBo. 1) Enable httpd vi /etc/httpd/httpd.conf CHANGE: #Include /etc/httpd/mod_php.conf TO: Include /etc/httpd/mod_php.conf CHANGE: DirectoryIndex index.html TO: DirectoryIndex index.html index.php index.pl
howtos, software, cacti, network monitoring, author arfon

Efficient CLI Navigation
Efficient CLI Navigation The CLI (Command Line Interface) is a very powerful, flexible and programmable environment. If you use the command line interface on a regular basis, you know how important it is to customise your working environment and develop shortcuts to ensure efficient workflow. Below are some tips on navigating through directories in an quick and easy way.
howtos, cli, cd, bashrc, completion, work in progress, author sycamorex

Firefox
Firefox Firefox is an opensource web browser from Mozilla. Installation Firefox is distributed with Slackware. Tips Make firefox understand downloaded files It is quite annoying that Mozilla Firefox always forgets what application to use for “opening” a file which you just downloaded. Also, the context menu “Open containing folder” in the Downloads overview does not work.
howtos, software, firefox, author arfon, author alienbob

Google Chrome Browser in Slackware
Google Chrome Browser in Slackware According to Google, the chrome browser is a web browser built for speed, simplicity, and security. Note that this package has little to do with chromium as this is a pre-compiled package by Google, instead of a package that a user can compile locally from the open-source
howtos, software, google-chrome, author escaflown

How to merge PDF-files
How to merge PDF-files Introduction PDF (Portable Document Format) is a file format invented by Adobe. PDF is useful to present documents independent of hardware, operating system and application software. Each PDF file has a fixed layout, including page size, fonts, graphics and other information. It is also possible to encrypt a PDF file for security, or create a digital signature for authentication.
howtos, pdf, commandline

irssi
irssi Irssi is a ncurses based IRC client. The IRC (Internet Relay Chat) protocol has been designed for use with text based conferencing. Installation irccd is distributed with Slackware. Using with tor This paragraph shows a method you can follow to
howtos, tor, irssi, author chrisabela

Java in Slackware
Java in Slackware Oracle Java Due to recent changes in Oracle's Java licensing, Slackware, or any other distribution, is no longer allowed to distribute Java binary packages with the operating system. What it means for us is that although we will still be able to install Java on our system, as of Slackware 14 we will be required to manually download the binary package.
howtos, software, java, jdk, jre, author sycamorex

man2html
The HTML from man2html is formatted differently from that of asciidoc, and a possible, but heavy-handed, solution might be the use of
howtos, man2html

monit
monit monit is a free open source utility for managing and monitoring, processes, programs, files, directories and filesystems on a UNIX system. Monit conducts automatic maintenance and repair and can execute meaningful causal actions in error situations.
howtos, software, monit, author lamerix

How to use MPlayer on the Command-line
How to use MPlayer on the Command-line As suggested by kikinovak as a slackdoc topic. What is mplayer? Basically, mplayer is a command-line movie player packaged into most slackware installations; It happens to work like a champ with music files in addition to watching movies. Because mplayer doesn't strictly require a desktop environment to be running while playing music, it is quite light and is ideal for wimpier machines such as netbooks.
howtos, software, work in progress, author aschyiel

Nagios
Nagios Installation * Create the nagios group and user: groupadd -g 213 nagios useradd -u 213 -d /dev/null -s /bin/false -g nagios nagios * Add the 'apache' user to the 'nagios' group, so that it can write to the /var/nagios/rw directory ('a' option prevents the user to be removed from other groups, the member of which he is already):
howtos, software, nagios, network monitoring, author arfon

Install nfdump/nfsen on Slackware
Install nfdump/nfsen on Slackware Concepts you should know: A device is setup to constantly send out netflow information, it is not polled. A receiver listens for the netflow information 'streams' from devices and processes them. How to install
howtos, software, nfsen, nfdump, network monitoring, needs attention, author arfon

ntop
ntop Installation A) Enable httpd web server B) Install ntop dependencies 1) Install RRDTool via sbopkg 2) Install Graphviz via sbopkg 3) Install GeoIP via sbopkg C) Install and configure ntop 1) Add ntop user and group groupadd -g 212 ntop useradd -u 212 -g ntop ntop
howtos, software, ntop, network monitoring, needs attention, author arfon

Pale Moon Browser in Slackware
Pale Moon Browser in Slackware From the Pale Moon website: Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use. Make sure to get the most out of your browser!
howtos, software, author khronosschoty

Phoronix Test Suite
Phoronix Test Suite Introduction Wondering if it's time to upgrade your Slackware box? Look no further than the Phoronix Test Suite to benchmark it against other people's systems. Here is a quick guide to get it up and running, we'll use timed kernel compilation as an example because that seems like as good a benchmark as any.
howtos, phoronix, benchmark

RTAI
RTAI RTAI Introduction RTAI is a system that allows your Linux operating system to run so-called 'hard' realtime tasks. By 'hard' we mean that it isn't just 'best effort' it really will do something regularly, to a schedule dictated by you, no matter how heavily loaded the system. RTAI comes in two parts: a set of patches for your kernel and a library you can link your programs against which allows them to become realtime tasks. It may feel like you're running your program under Linux ju…
howtos, rtai, realtime

Install snmptrapd on Slackware
Install snmptrapd on Slackware NOTE: 'public' should be changed to your correct community string. 1) Install the official Slackware net-snmp package. 2) Create /etc/snmp/snmptrapd.conf authCommunity log,execute,net public WHERE: "log" & "execute" are the actions to take "net redrock" is to listen for any traps with redrock as the community string
howtos, software, snmptrapd, snmp, snmp traps, needs attention, author arfon

program name
program name Prerequisites Installation program name is distributed with Slackware since <VERSION> as <category/name>. program name is available at SBo. Usage Documentation howtos software
howtos, software

The native TeX Live integration
The native TeX Live integration Tex Live is nowadays the last maintained TeX distribution. Due to its size, it is not provided in the Slackware's official repository. That's why many (most of?) people use the dedicated SlackBuild from SlackBuilds.org to get it as a huge complete monolithic package.
howtos, texlive, latex, author vaporseb

Installing and using tmux in Slackware
Installing and using tmux in Slackware tmux is a terminal multiplexer. It enables a number of terminals (or windows) to be accessed and controlled from a single terminal. It is intended to be a simple, modern, BSD-licensed alternative to programs such as GNU Screen.
howtos, software, tmux, author escaflown

XPDF
XPDF Print from xpdf (with CUPS) If you haven't set a default printer in cups, * 1. set a printer as default. In xpdf: * 2. hit print * 3. select PRINT WITH COMMAND * 4. enter “lpr” (no quotes) Your document should print. Sources * Originally written by
howtos, software, xpdf, cups, author arfon

Zabbix
Zabbix Zabbix is an open source network monitoring application capable of monitoring network devices, servers, databases and web services on a wide variety of operating systems. Website: www.zabbix.com Prerequisites * MySQL * httpd Installation Zabbix is available at
howtos, software, zabbix, network monitoring, author arfon

ZoneMinder
ZoneMinder ZoneMinder is an opensource monitoring tool. Prerequisites * ffmpeg * mariadb Installation ZoneMinder is available at SBo. ONVIF cameras If you want to use ONVIF cameras * Install perl-Data-UUID (from Slackbuilds) * Install other Perl modules via CPan:
howtos, software, zoneminder, multimedia, author arfon

howtos, topic page

XPDF

Print from xpdf (with CUPS)

If you haven't set a default printer in cups,

1. set a printer as default[2603].

In xpdf:

2. hit print

3. select PRINT WITH COMMAND

4. enter “lpr” (no quotes)

Your document should print.

Sources

Originally written by arfon[2604]

howtos, software, xpdf, CUPS, author arfon

program name

Prerequisites

Installation

program name is distributed with Slackware since <VERSION> as <category/name>.

program name is available at SBo[2605].

Usage

Documentation

howtos, software

ZoneMinder

ZoneMinder is an opensource monitoring tool.

Prerequisites

ffmpeg[2606]

mariadb[2607]

Installation

ZoneMinder is available at SBo[2608].

ONVIF cameras

If you want to use ONVIF cameras

Install perl-Data-UUID (from Slackbuilds)

Install other Perl modules via CPan:

# perl -MCPAN -e 'install Class::Std::Fast, Data::Dump, SOAP::WSDL::Transport::HTTP, IO::Socket::Multicast'

Database

# mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
# mysql -u root -p
grant select,insert,update,delete,lock tables,alter,create on zm.* to 'zmuser'@localhost identified by 'zmpass'; #NOTE: zmuser and zmpass is found in /etc/zm.conf
select User,Host from mysql.user;  #Check and make zmuser was created
quit

The SELECT command (above) should reply:

  MariaDB [(none)]> select User,Host from mysql.user;
+--------+------------+
| User   | Host       |
+--------+------------+
| root   | 127.0.0.1  |
| root   | ::1        |
|        | localhost  |
| root   | localhost  |
| zmuser | localhost  |
|        | zoneminder |
| root   | zoneminder |
+--------+------------+

Web server

Change America/Chicago to your correct timezone.

# sed -i 's|#Include /etc/httpd/mod_php.conf|Include /etc/httpd/mod_php.conf|' /etc/httpd/httpd.conf
# sed -i 's|DirectoryIndex index.html|DirectoryIndex index.html index.htm index.pl index.php|' /etc/httpd/httpd.conf
# sed -i 's|;date.timezone =|date.timezone = America/Chicago|' /etc/php.ini

Then Add “Include /etc/httpd/extra/zm.conf” to httpd.conf

# sed -i '|Include /etc/httpd/extra/httpd-vhosts.conf|a Include /etc/httpd/extra/zm.conf' /etc/httpd/httpd.conf

Run

# chmod 755 /etc/rc.d/rc.httpd; /etc/rc.d/rc.httpd start

# chmod 755 /etc/rc.d/rc.zm; /etc/rc.d/rc.zm start

Installation should be complete, open a web browser and go to:

http://YOUR_ZM_MACHINE/zm

Sources

Originally written by arfon[2609]

Contributions by markand[2610]

howtos, software, ZoneMinder, multimedia, author arfon

Nagios

Installation

Create the nagios group and user:

     groupadd -g 213 nagios
useradd -u 213 -d /dev/null -s /bin/false -g nagios nagios

Add the 'apache' user to the 'nagios' group, so that it can write to the /var/nagios/rw directory ('a' option prevents the user to be removed from other groups, the member of which he is already):

     usermod -aG nagios apache

Install the Nagios::Plugin Perl module:

     cpan -i Monitoring::Plugin

Use sbopkg[2611] or install the individual packages using scripts from SlackBuilds.org[2612], and install the following in this order:

RRDTool

nagios (currently, the package which can be built using a SlackBuilds.org script[2613] is nagios-4.0.8)

nagios-plugin package

nagios-graphing

Edit /etc/nagios/nagios.conf and turn off the logging:

CHANGE:
use_syslog=1
TO:
use_syslog=0
CHANGE:
log_notifications=1
TO:
log_notification=0

Edit /etc/httpd/extra/nagios.conf, after the <Directory “/var/www/htdocs/nagios”> line:

CHANGE:
Options None
TO:
Options FollowSymLinks

Edit /etc/httpd/http.conf

COMMENT:
LoadModule mpm_event_module lib64/httpd/modules/mod_mpm_event.so
UNCOMMENT:
#LoadModule mpm_prefork_module lib64/httpd/modules/mod_mpm_prefork.so
UNCOMMENT:
#LoadModule cgi_module lib64/httpd/modules/mod_cgi.so
(or #LoadModule cgi_module lib/httpd/modules/mod_cgi.so on 32bit installs)
CHANGE:
<IfModule dir_module>
DirectoryIndex index.html
</IfModule>
TO:
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
CHANGE:
# Uncomment the following line to enable PHP:
#
# Include /etc/httpd/mod_php.conf
TO:
# Uncomment the following line to enable PHP:
#
Include /etc/httpd/mod_php.conf
RIGHT AFTER:
DocumentRoot /srv/httpd/htdocs
ADD:
Include /etc/httpd/extra/nagios.conf

Make sure apache starts at boot and start/restart apache:

     chmod 755 /etc/rc.d/rc.httpd
/etc/rc.d/rc.httpd restart

Set the password for nagiosadmin :

     htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

(Not sure if this is necessary but, leaving it in until I can test)
Make sure nagios starts at boot and start/restart nagios:

Edit /etc/rc.d/rc.local and add:

# Start nagios:
if [ -x /etc/rc.d/rc.nagios ]; then
echo "Starting nagios..."
/etc/rc.d/rc.nagios start
fi

Edit /etc/rc.d/rc.local_shutdown (you may have to create this file if it does not exist, and make it executable) and add:

# Stop nagios:
if [ -x /etc/rc.d/rc.nagios ]; then
echo "Stopping nagios..."
/etc/rc.d/rc.nagios stop
fi

Make rc.nagios executable:

# chmod 755 /etc/rc.d/rc.nagios

Start nagios:

# /etc/rc.d/rc.nagios restart

Check That Nagios Is Running

Goto http://YOUR_MACHINE/nagios/[2614] and you should see Nagios working.

Add Users

Run the htpasswd command for each user:

     htpasswd -c /etc/nagios/htpasswd.users bob
htpasswd -c /etc/nagios/htpasswd.users sue

Edit /etc/nagios/cgi.cfg and add the user(s) too:

authorized_for_all_services=nagiosadmin,bob,sue
authorized_for_all_hosts=nagiosadmin,bob,sue

(or add “*” to allow all authenticated users)

TROUBLESHOOTING

ERROR: When browsing to the nagios webpage (as nagiosadmin) you get “You do not have permission”

HINT: Check /var/log/httpd/error_log to see what is failing.

FIX1: Make sure that /srv/www/htdocs/nagios is “drwxrwxr-x nagios nagios”

FIX2: In /etc/http/httpd.conf make sure:

  UNCOMMENT: Include /etc/httpd/mod_php.conf
Do the "<IfModule dir_module>" change listed above.

—–

ERROR: When clicking on Nagios cgi pages, they are downloaded and not executed.

FIX: Make sure the “LoadModule cgi_module” is uncommented as described above.

ERROR: “stderr: execvp(/usr/libexec/monitoring-plugins/check_ping, …) failed. errno is 2: No such file or directory”

FIX: vi /etc/nagios/resource.cfg

   CHANGE: $USER1$=/usr/libexec/monitoring-plugins
TO: $USER1$=/usr/libexec/nagios

ERROR: I've done the FIXes above and it's still not working…

FIX: Didya restart httpd and/or nagios?

   /etc/rc.d/rc.httpd restart
/etc/rc.d/rc.nagios restart

Install NRPE On A Target Machine

ON THE TARGET MACHINE (as root):

groupadd -g 213 nagios
useradd -u 213 -d /dev/null -s /bin/false -g nagios nagios

Install nagios via SBo (Required by Nagios-plugins)

Install nagios-plugins via SBo (Required by NRPE)

Install nrpe via SBo

Ignore the xinetd stuff, you have to run NRPE as a daemon on Slackware (unless you want to go through the headache of replacing inetd with xinetd)

So, start NRPE in Daemon mode:

chmod 755 /etc/rc.d/rc.nrpe
/etc/rc.d/rc.nrpe start

Test NRPE

/usr/libexec/nagios/check_nrpe -H localhost
NRPE v2.15
/usr/libexec/nagios/check_nrpe -H localhost -c check_users
USERS OK - 1 users currently logged in |users=1;5;10;0

Add your Nagios server's IP into the allowed_hosts list:

vi /etc/nagios/nrpe.cfg
allowed_hosts=127.0.0.1,192.168.1.77  (WHERE: 192.168.1.77 is the IP of your Nagios server)

chown nagios:nagios /etc/nagios/nrpe.cfg

ON THE NAGIOS SERVER MACHINE:

Add the client machine into one of the .cfg files

I did this:

vi /etc/nagios/nagios.cfg

ADD:

# Definitions for monitoring a linux machine
cfg_file=/etc/nagios/objects/linux.cfg

chown nagios:nagios /etc/nagios/nagios.cfg

vi /etc/nagios/objects/linux.cfg_file
#########################################################
# Linux  configuration file
#########################################################
define host {
use	  	  linux-server
host_name	  MyLinuxBox
alias	  	  LinuxBox1
address	  192.168.1.110
register	  1
}
define service{
host_name			MyLinuxBox
service_description		PING
check_command			check_ping!100.0,20%!500.0,60%
max_check_attempts		2
check_interval		2
retry_interval		2
check_period			24x7
check_freshness		1
contact_groups		admins
notification_interval		2
notification_period		24x7
notifications_enabled		1
register			1
}
#########################################################
# END OF FILE
#########################################################

chown nagios:nagios /etc/nagios/objects/linux.cfg_file

Restart Nagios

  /etc/rc.d/rc.nagios restart

Sources

* Originally written by arfon[2615]

howtos, software, nagios, network monitoring, author arfon

Pale Moon Browser in Slackware

From the Pale Moon website:

Pale Moon is an Open Source, Goanna-based web browser available for Microsoft Windows and Linux (with other operating systems in development), focusing on efficiency and ease of use. Make sure to get the most out of your browser!

Pale Moon offers you a browsing experience in a browser completely built from its own, independently developed source that has been forked off from Firefox/Mozilla code a number of years ago, with carefully selected features and optimizations to improve the browser's stability and user experience, while offering full customization and a growing collection of extensions and themes to make the browser truly your own. [1][2616]

So Why Pale Moon Browser anyway?

Many prefer to use Pale Moon over FireFox, because, they feel Pale Moon is what FireFox ought to have been. Many claim that Pale Moon is faster than FireFox, because, it has less “garbage”; but instead has continued to polish an already winning formula. Moreover, many feel they can trust the Pale Moon community over communities such as Apple, Google, Mozilla, and Microsoft, because, it does not have the same history of spying on its users – that these communities do.

Some prerequisites.

According to the Pale Moon Linux developer(s), gcc 4.9.4, or alternatively a few other older versions of gcc, is required to produce a fully optimized (and still stable) Pale Moon Slackware package. A gcc-4.9.4 SlackBuild, to compile and package gcc-4.9.4 your self, can be found at SlackBuilds.org, here[2617]; and already built Slackware packages can be found here[2618].

Installation instructions

Already built Slackware packages:

Arguable, the easiest way to install Pale Moon, would be to grab Pale Moon already compiled and packaged. You can find the Pale Moon Slackware package that is built with the following SlackBuild here [2619]

Alternatively, you can find packages built by alienBOB here[2620]. Note: aleinBOB's packages have been built in an alternative fashion, which may be better for older hardware, but, at least in theory, fails to take advantage of all of Pale Moon's development.

Compile, and package Pale Moon from source.

The following instructions shows how to compile and install Pale Moon web browser using scripts found at SlackBuilds.org. There is currently, at the time of writing this, two SlackBuilds that can be found at SlackBuilds.org: One that builds from source, and, one that repackages the officially pre built binary provided by the Pale Moon community. This guide focuses on the SlackBuild that builds Pale Moon from source.

Although, this guide primarily focuses on Pale Moon 27.9.3 and Slackware 14.2 and later, there is no reason that this SlackBuild cannot be used unmodified to build Pale Moon on earlier versions of Slackware, such as 14.1 or earlier. There also is no reason that this SlackBuild cannot be modified to build other versions of Pale Moon, such as Pale Moon 26.5.0 and earlier; in fact, the SlackBuild used in this guide, with very little alteration, has been fully tested, and confirmed to work, with Pale Moon 26.5.0 and 26.4.1 source trees – be that as it may, “your millage may very”.

Current, past, and possible future versions of the SlackBuild covered here, can also be found here.[2621].

If you desire to compile palemoon with gcc-4.9.4 and g++-4.9.4 (a good idea), a script to build and package them, can be found here[2622]

Installation instructions for Slackware 14.2 +

The steps are slightly different when downloading the SlackBuild off the notabug.org repo vs SlackBuilds.org

Although, the files used in this guide should be the same as the files found at SlackBuilds.org, we, in the interest of making this guide easier to maintain, grab the actual SlackBuild from the SlackBuild notabug.org git repository, found here[2623], rather than the files hosted on SlackBuilds.org; therefore we advise favoring whats in the notabug repository over whats found on SlackBuilds.org

In a terminal log in as root:

su -

Change to the temporary directory:

cd /tmp/

Download the SlackBuild from the Pale Moon SlackBuild git repository – we grab the SlackBuild from here rather than from SlackBuild.org for the sake making this guide easy to maintain – for 14.2 this can be found Here[2624]:

wget https://notabug.org/khronosschoty/SlackBuilds/archive/master.tar.gz -O SlackBuilds-master.tar.gz

Untar the Pale Moon SlackBuild archive:

tar -xvf SlackBuilds-master.tar.gz

Note: if the slackbuild is downloaded using a web browser the tar archive's name might not be correct; and will need to be adjusted.

Change to the SlackBuild Pale Moon directory:

cd slackbuilds/network/palemoon

Download the necessary files indicated in the palemoon.info

wget https://github.com/MoonchildProductions/Pale-Moon/archive/27.9.3_Release/Pale-Moon-27.9.3_Release.tar.gz \
http://ponce.cc/slackware/sources/repo/autoconf-2.13.tar.xz

Make the Slackbuild executable:

chmod +x palemoon.SlackBuild

Run palemoon.SlackBuild script as root:

./palemoon.SlackBuild

At completion of the SlackBuild execution, a message similar to the following one will appear:

Slackware package /tmp/palemoon-27.9.3-x86_64-1_SBo.tgz created.

Install the newly created package as root. It will be located in the /tmp directory:

upgradepkg --install-new /tmp/palemoon-27.9.3-x86_64-1_SBo.tgz

Resources for earlier versions of Pale Moon, and why

Why use an earlier version of Pale Moon?

With the introduction of Pale Moon 27.0.0, Pale Moon and FireFox have continued to significantly deviate from their common code origins; this deviation has caused many FireFox add-ons that used to work in Pale Moon, to no longer work in Pale Moon. Ideally there is no good reason to install an earlier version of Pale Moon, but, for those of us who feel that they must use an earlier version of Pale Moon, this is how, to do it, using the SlackBuild used in this guide.

Modifying the SlackBuild manually

This guide modifies the SlackBuild script used in this guide to compile and install Pale Moon 26.5.0… the same methods can presumable be used to compile and install even earlier versions of Pale Moon; by simple changing the version number to the desired value.

Follow steps 1 - 5 of this guide, "Installation instructions for Slackware 14.2 +" (found above)[2625].

Edit the palemoon.info file so that every instance of 27.9.3 is changed to 26.5.0.

Edit the palemoon.SlackBuild so that every instance of 27.9.3 is 26.5.0

Resume following the remaining step of this guide, "Installation instructions for Slackware 14.2 +" (found above)[2626]. (That is follow steps 6 - 10). Except modify all the commands above so that 27.9.3 is replaced with 26.5.0. Here is an example:

Instead of downloading 27.9.3, like in step 6:

wget https://github.com/MoonchildProductions/Pale-Moon/archive/27.9.3_Release/Pale-Moon-27.9.3_Release.tar.gz \
http://ponce.cc/slackware/sources/repo/autoconf-2.13.tar.xz

Simple modify the version number so that the desired version is downloaded, like this:

wget https://github.com/MoonchildProductions/Pale-Moon/archive/26.5.0_Release/Pale-Moon-26.5.0_Release.tar.gz \
http://ponce.cc/slackware/sources/repo/autoconf-2.13.tar.xz

Tips on installing Pale Moon and FireFox add-ons in Pale Moon Browser

Where to get Pale Moon add-ons

Pale Moon is capable of installing many add-ons that were made for FireFox, albeit not all FireFox add-ons will work; ideally one would install and use Pale Moon specific add-ons that can be found here[2627]. The Pale Moon add-on site recommends looking here[2628], if you are unable to locate a desired Pale Moon specific add-on.

Sometimes older versions of a FireFox add-on, that otherwise won't work, will work in Pale Moon. Sometimes you can experiment via trial and error and find a version of the desired add-on that works. It is recommended that you explore the Pale Moon add-on site[2629] to learn more.

Additional suggestions on installing FireFox specific add-ons in Pale Moon

Although, the FireFox add-on website might be difficult when trying to install FireFox add-ons, there are several ways FireFox add-ons can be installed. One method of installation is to download and manually install the desired add-on. To do this go to the “add-ons” page in Pale Moon; by typing in the Pale Moon address bar about:addons and then pressing the enter key. You will then be presented with the Pale Moon add-on page. At the top of the screen you will notice a search box, with the text “search all add-ons”; to the immediate left of that search box is a small box; which if left clicked, will present you with a number of options – one such option is to install an add-on from file – select this option and the installation of the add-on will begin.

Some recommended FireFox add-ons and why

All add-ons recommended here have been tested and found working in Pale Moon versions 27.0.0 - 27.9.3.

User Agent add-ons

Most versions of Pale Moon have a “Firefox Compatibility Mode” enabled by default; the need, therefore, for customizing the Pale Moon user agent is not dire – the defaults that Pale Moon 27.9.3 ship with, should be sufficient for most users.

Some websites will block access to their site if Pale Moon's user agent does not indicate its one of the big 4 – Chrome, Internet Explorer, FireFox, or Safari. One solution is to install an add-on that allows you to modify Pale Moon's user agent on the fly, and, then if you wish, back again; one such add-on is “PrefBar”, which can be found here[2630].

Password Manager add-ons

Some users like to use third party password managers, instead of their browser's built in password manager; there is several advantages for doing so, which we will not get into here. “KeePass” is an example of a password manager that can be used with Pale Moon or other browsers via an add-on – in this case, “KeeFox”, which allows a user to use KeePass with their Firefox browser. Unfortunately the newest versions of the add-on do not work with Pale Moon; fortunately “Version 1.4.8.1-signed” does work and can be found here[2631].

KeePassXC a fork of KeePass, is possible a better solution for Slackware users wishing to use an advanced secure password manager with Pale Moon. The plugin KeePassHttp which can be found here[2632], used in combination with add-ons like PassIFox, found here[2633], might prove more enjoyable then the before mentioned KeePass and KeeFox combination – the reason being, among many possible reasons, is that KeePassXC is a Linux native port of KeePass; and the most recent versions of PassIFox add-on work with current versions of Pale Moon. It should be noted that, PassIFox and KeePassHttp should also work with the before mentioned version of KeePass.

Bugs, crashes, etc; affecting Pale Moon

If you are having issues with Pale Moon, a potentially good resource to start with is, the Pale Moon "known issues" webpage.[2634]

Oxygen gtk segfaults etc

The theme "Oxygen gtk" (liboxygen-gtk.so) has been known to cause crashes in FireFox [2635], and, in my experience does cause random crashes in Pale Moon. In my experience, the likelihood of crashing increases when an attempt to access history is made. As far as I know, this bug only affects FireFox and Pale Moon if the gtk 2 version of this theme is used. There is some question as to whether or not this is a palemoon bug (old FireFox bug), or a bug in the theme itself.

It appears that the Oxygen theme in KDE when used causes Pale Moon to crash; apparently, if the appearance in KDE is changed from “Oxygen” to something else the crashes cease to happen.

Possible workarounds

Arguably the best solution would be to install a patched oxygen theme that does not suffer from the bug that causes Pale Moon to crash. alienBOB provides a patched oxygen theme; which can be found here[2636].

The most obvious work around is to use a theme other than Oxygen, or at the very least, find a version of the Oxygen theme that does not cause Pale Moon to crash or segfault (if there is such a version).

Anther possible work around is to only change the theme Pale Moon is using (so that only Pale Moon is not using the Oxygen gtk theme) – to do this, enter the following command into a terminal (for example):

GTK2_RC_FILES=/usr/share/themes/Adwaita/gtk-2.0/gtkrc palemoon-27.9.3

Sources

[1] = https://www.palemoon.org/[2637]

Stylistic infleunce howtos:software:google-chrome[2638] (1431854086[2639])

Originally written by khronosschoty[2640]

howtos, software, author khronosschoty

at - Task Scheduling

at is a task scheduling tool which one-time enables tasks to be performed on your system. The batch is like at but permforms the one-time tasks when system load permits it, all command and functions of at can be replicated by batch with the same arguments.

Related Commands

The following commands are included to monitor the at command:

at - The program used to submit a one-time task.

atq - The program used to review the queue of jobs submitted with at

.

atrm - The program used to remove jobs from the at queue.

at Command Use

The at command can be issued to allow you to write a custom script or point it to a pre-built script. In addition, the broad time specifications allowed increase the complexity.

The -m argument can be added to any command telling the daemon to mail the user on the local system advising of the completion of the task.

Scheduling an Existing Script

This example will tell the at application to run the script /home/user/testscript.sh at 4PM today and e-mail the user upon completion.

user@darkstar$ at 16:00 -m -f /home/user/testscript.sh

As you can see the -f argument means file as it points to the file that will be executed.

Scheduling a New Action

As seen below, when no file is specified the at application opens a prompt for the user to enter the new script.

user@darkstar$ at 19:40 -m
warning: commands will be executed using /bin/sh
at> ping -c 4 www.google.com
at> echo $?
at> <EOT>
job 4 at Sun Dec 30 19:40:00 2012

The user will need to type the sequence of commands that will be issued within the prompt, upon completion you close the prompt with the Ctrl+d

The command above instructed at to ping google 4 times at 7:40PM, return the application status and e-mail the results to the user.

Be sure to note the job number, it is the only visible identifier for the job and must be referenced if you wish to remove the job later.

Reviewing Queued Tasks

The command atq lists the user's pending jobs. The output is Job Number, date, hour, queue and username.

user@darkstar$ atq
4 Sun Dec 30 19:40:00 2012 a user

Once the task number has been noted you can review the commands that are included in the job by issuing the command at -c {jobnumber}, and example is shown below.

user@darkstar$ at -c 4
#!/bin/sh
# atrun uid=1000 gid=1000
# mail user 1
umask 22
....Environment Details....
cd /home/user || {
echo 'Execution directory inaccessible' >&2
exit 1
}
ping -c 4 www.google.com
echo $?

Removing Queued Tasks

The command atrm removes jobs from the pending queue, it does not present any confirmation that the job is removed so it may be advisable to run atq after atrm to confirm the job has been removed.

user@darkstar$ atrm 4

Further Resources

at manual page[2641]

BrunoLinux[2642]

http://sathyaphoenix.wordpress.com/2009/01/18/using-at-command-to-schedule-jobs-in-linux/[2643]

Sources

* Originally written by mfillpot[2644]

howtos, task scheduling, author mfillpot

Java in Slackware

Oracle Java

Due to recent changes in Oracle's Java licensing, Slackware, or any other distribution, is no longer allowed to distribute Java binary packages with the operating system. What it means for us is that although we will still be able to install Java on our system, as of Slackware 14 we will be required to manually download the binary package.

Oracle offers two packages:

JRE (Java Runtime Environment) - required to run Java applications.

JDK (Java Development Kit) - required to develop and run Java applications (it includes the JRE).

As the JRE is included in the JDK, the Java Development Kit (JDK) is a recommended package to install.

Please do NOT install both packages and make sure you remove any previously installed Java packages before you start the installation

Java (JDK) Installation on Slackware 14 and newer

Follow the steps below to install Java on your system:

1. Visit the official download page[2645].

2. Right under Java Platform, Standard Edition click the JDK Download and accept the license agreement.

3. Download a binary package that is appropriate for your architecture:

Linux x86 for a 32-bit version of Slackware.
Linux x64 for a 64-bit version of Slackware.

Make sure you have chosen the .tar.gz version.

At the time of writing this, the latest version (64-bit) was:

jdk-7u7-linux-x64.tar.gz

4. In a terminal log in as root:

su -

5. Go to the /extra/source/java directory on a Slackware installation DVD or change to the local directory if you downloaded it from a Slackware mirror (in which case, don't forget to download all the files and subdirectories in that “java“directory!).

6. Run the java SlackBuild specifying the path to the downloaded Java binary package.

./java.SlackBuild /path/to/jdk-7u7-linux-x64.tar.gz

Once the SlackBuild finishes, you should get a similar message:

Slackware package /tmp/jdk-7u7-x86_64-1.txz

If you get the following message, you can disregard it.
WARNING: zero length file usr/lib64/java/lib/security/trusted.libraries

7. Install the newly created package:

upgradepkg --install-new /tmp/jdk-7u7-x86_64-1.txz

8. Restart a web browser and try if Java has been detected by visiting the following website[2646].

9. You may need to reboot the computer for the system to recognize Java:

$ which java
/usr/lib64/java/bin/java

10. If you want slackpkg[2647] to ignore the jre and jdk packages on clean-system, add them to the blacklist in /etc/slackpkg/blacklist

OpenJDK

If you prefer the fully Open Source alternative of OpenJDK instead of Oracle's pre-compiled and partly closed-source binaries, then you can get sources, SlackBuild scripts and/or native Slackware packages here: http://slackware.com/~alien/slackbuilds/openjdk/[2648].

If you decide you want to use OpenJDK, the same rules apply that were written above for the Oracle Java packages: only install one of the two, either JRE or JDK! If you want a web-browser plugin like Oracle's binaries have, then install the additional icedtea-web[2649] package. Oracle kept its browser plugin closed-source. The icedtea-web package is an open-source alternative.
You will also need rhino[2650], the JavaScript engine for OpenJDK.

If you decide you want to compile OpenJDK from source, then use the README[2651] for guidance.

Java not found after installation

Help! I installed Java but when I try to use it, I get “command not found”!

What you need to know is that the Java package installs two files in your profile directory ”/etc/profile.d/”. Depending on which login shell you use, one of these is executed whenever you login. The profile script adds the Java directory to the $PATH variable (so that you can start the java command) and sets the $JAVA_HOME variable (needed by other programs that try to locate your Java installation).

Here follows the content of such a script on 64-bit Slackware:

#!/bin/sh
export JAVA_HOME=/usr/lib64/java
export MANPATH="${MANPATH}:${JAVA_HOME}/man"
export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"

This means that right after installing the Java package, you need to logout and login again in order to load the Java profile script. If it is inconvenient to logout right now, there is an alternative: you can “source[2652]” the script by running the following command in your console, or in every terminal where you want to use Java without logging out and in again (example for OpenJDK and a bash-compatible shell):

. /etc/profile.d/openjdk.sh

Note the dot character at the start of the line, that dot is the “source” command of the shell.

Sources

Original source: java.SlackBuild readme[2653]

Contributions by sycamorex[2654]

Contributions by Eric Hameleers[2655]

howtos, software, java, jdk, jre, author sycamorex

How to use MPlayer on the Command-line

As suggested by kikinovak as a slackdoc topic[2656].

What is mplayer?

Basically, mplayer is a command-line movie player packaged into most slackware installations; It happens to work like a champ with music files in addition to watching movies. Because mplayer doesn't strictly require a desktop environment to be running while playing music, it is quite light and is ideal for wimpier machines such as netbooks.

How to invoke mplayer

Below are a couple of basic ways of calling mplayer.

$ mplayer ~/music/foo.mp3 # Tell mplayer to play your favourite song.

$ mplayer ~/music/*.mp3  # Tell mplayer to play all of your mp3 files under your music directory.

Useful shortcut keys

While running, mplayer can be controlled by additional keyboard input.

Some simple but memorable shortcuts:

spacebar - Toggles pause/play.

return - Next track.

ctrl+c - Escape/Quit.

Gotchas

Don't accidentally hit the arrow keys while mplayer is running; It will alter the audio playback speed (quite annoying).

Playlists

You can also tell mplayer to play tracks from a playlist.

First you need to create a playlist file.

$ find . -type f -iname *.mp3 > my_list.txt

And then you can take the playlist and feed it into mplayer.

$ mplayer -playlist my_list.txt

If you're feeling frisky, you can also tell mplayer to shuffle your playlist as well.

$ mplayer -shuffle -playlist my_list.txt

Example Playlist Demonstration

The below terminal output demonstrates mplayer playlists in action.

[ roach@sepsis:msk ]$ find SchoolyardHeroes/Abominations/ -type f -iname *.mp3 > abominations.txt
[ roach@sepsis:msk ]$ mplayer -playlist abominations.txt
MPlayer 20101218-4.5.1 (C) 2000-2010 MPlayer Team
Playing SchoolyardHeroes/Abominations/04 - Violence Is All The Rage.mp3.
Audio only file format detected.
Clip info:
Title: Violence Is All The Rage
Artist: Schoolyard Heroes
Album: Abominations
Year: 2007
Comment: Amazon.com Song ID: 20884756
Track: 4
Genre: Unknown
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 256.0 kbit/18.14% (ratio: 32000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  20.8 (20.8) of 189.0 (03:09.0)  0.3%

Note: The above example's find command creates an unsorted playlist (which might not be what you're after).

Here's a nifty article on creating sorted playlists and then some.[2657]

Sources

Written by aschyiel[2658]

howtos, software, work in progress, author aschyiel

ZFS /home Partition/Drive

This tutorial/HOWTO is about installing/setup/using ZFS (file system, fs) such as for your /home partition/drive, for advanced/large storage or shared with a Unix operating system (OS) distribution (distro.) Feel free to expand.

ZFS Introduction

ZFS is a journalling fs created on Solaris Unix, then made Free/Libre/Opensource Software (FLS[1045], OSS[1046], FOSS, FLOSS) as OpenSolaris' OpenZFS[1047]. ZFS was ported to classic/most *BSD Unix (NetBSD, FreeBSD, OpenBSD, …,) Slackware & other GNU/Linux distros, as ZFSonLinux[1048], and has more features than EXT*. ZFS is more a fs & RAID manager than just fs. If you have large amount of storage, you may want ZFS for that (and helpful features, such as compression, snapshots) or may want to use it for a /home partition (also possible to share with a real Unix, but some things, such as more complex X window managers (WM) & desktop environments (DE,) and some/many their programs, almost certainly won't work well between them… arecordednd there's a real chance some shells & command-line programs might not either, if different configurations/versions/variants.

If you just want multi-/dual-boot OS (including Unix) with same /home, ZFS is the only realistic solution… another maybe being NTFS, but has certain problems, such as maybe no to use Unix-like, rather than Windows-like, file-names so also utilities, and ZFS is safer. ZFS may be the only journalling fs Unix and GNU/Linux can both write to safely.

Of course, Xen (a hypervisor virtual machine) is another excellent option for multiple native-on-hardware OS, including Unix, but you might just have to copy between fs and not all OS write well… so you could even try Xen with ZFS storage…)

Always Backup /home Regularly

Here's how you can prepare to create a ZFS /home.

If you have a current /home with files you'll use, make a backup (preferably more than one!)

Build/install zfs-on-linux from SlackBuilds.org[1049] (SBo, such as with sbopkg, available on SBopkg.org[1050].) If you update Linux (kernel) you must build zfs-on-linux again! (before you can access ZFS.)

If you created any new /home/user initial/‘skeleton’ directory on the root filesystem partition, you can move it to /root temporarily, because it's just going to get mounted over (not seen) but still take space (inaccessible until unmounting.) One might have a new /home if using a Unix and Slackware, so later you'll want any skeleton directory (default user files like .*shrc, .profile, etc. for that OS distro.)

Research/read At Least A Little

Before first actual ZFS commands, you may want to view /usr/doc/zfs-on-linux-* , cat or more (or less, most) /var/log/packages/zfs-on-linux-* , ‘man zpool,’ ‘man zfs.’ A zpool holds and manages one or more zfs and has many options, which for advanced/large storage, you will want some/all (maybe depending on compatibility with other systems accessing)… that case would be for new sections or advanced storage HOWTO… here it's assumed one may not use most/any extra options because might not be a data-centre (but one feature will be mentioned) rather than wanting to share /home with a Unix, which many may not have all options (as OpenSolaris/IllumOS' ZFS and zfs-on-linux are slightly different–at different stages of overall ZFS design, so some versions have things older ones don't, and won't even be readable with… you should check/view those project sites (linked here sooner or later,) even though zfs-on-linux people didn't bother to address the most long-time/influential GNU/Linux–Slackware–some/many command/option examples for others–even if not Unix-like–will be similar/same.)

Create & Start ZFS

Once you installed ZFS and all various /home files are backed up, start ZFS with rc script (run it or reboot)… login root (or su -) or use sudo for those commands below. Remember, this will be with no extra options (-d option is ‘no options’ unless specified) other than use a ‘modern’ sector size (unless you have a drive so old it should probably be replaced if even still working, this size should be reasonable)… ‘-o ashift=12’ option creates 2¹², i.e., 4KB sectors (you shouldn't actually use larger/8KB unless using older solid state drive, SSD designed 8KB.) You can read zpool & zfs manpages to find/add more options. If you do and share a /home, install ZFS on both OSes, dump zpool option list sets on each to see what's usable (only the set intersection[1051].) Most likely both will have compression and snapshots, so if you want those, read examples/manpages.

Below is to create a ZFS drive (replace L with drive block device letter you want.)

zpool create -d -o ashift=12 home /dev/sdL

Alternatively, if not using an entire drive (but normally a GPT partition) below is to create a ZFS partition (replace L,N with drive partition block device letter,number you want.)

zpool create -d -o ashift=12 home /dev/sdLN

Start/mount zpool/ZFS.

/etc/rc.d/rc.zfs start
zpool import home

Your ZFS should now be ready. However, you can create multiple ZFS (even levels/hierarchies, ‘datasets’) in each zpool, such as for swap, each user, other/server purposes (SBo's zfs-on-linux maintainer could explain datasets if you ask, and documented by Oracle, OpenZFS, ZFSonLinux for various distros, usually similar/same commands.) Move back any Slackware & Unix/etc. initial/skeleton user directories and/or (maybe after installing/testing ZFS on other/optional OS sharing it, first, just to make sure it'll work, before a potentially hours-long copy/restore/rysnc/etc. back) your /home from the backups. You will probably want something such as the following.

#!/bin/sh
#/etc/rc.d/rc.local
#... (your other lines)
#Activate zpool & its zfs.
#If only using on one OS, you shouldn't need the ‘-f.’
zpool import -f home
# ON LINES BELOW, YOU CAN START ALL PROCESSES ACCESSING THAT FS.
#... (your other lines)

Speed Up ZFS

If you don't need access time (atime) logged for files, disable atime to speed up ZFS.

zfs set atime=off home

How to Stop ZFS

#!/bin/sh
#/etc/rc.d/rc.local_shutdown
#... (your other lines)
# Unmount/stop ZFS.  may not actually need this if rc.zfs iss stopped automatically and does it, but be safe or find out.
# ON LINES ABOVE, STOP ALL PROCESSES ACCESSING THIS FS.
# Can be either unmount or umount.
zfs unmount home
#... (your other lines)

If after Slackware, you initially managed to read & write to a ZFS on a Unix, then copied your /home back on Slackware, you may soon see messages and think it's not going to mount on one or the other, but as rc.local above, you will probably actually have to ‘zpool -f home’ on both OS. Some Unixes do ‘-f’ automatically if you enable to merely use ZFS software as an option in a configuration file.

Repairs/restarts

If you mess up making a ZFS or want to delete one, it can be hard. If you want to delete one, you can't just delete and overwrite, but must wipefs, or just dd 4MB at beginning & end to zero and remove its zpool cache… those can take a long time, but on a SSD, you can also just use the tool like the Unix trim, that is blkdiscard.

Sources

* Originally written by David Chmelik[1052]

howtos

Netflix

How to watch Netflix on Slackware

1) Install the current version of Google Chrome.

2) Watch Netflix.

How install Google Chrome on Slackware

howtos:software:google-chrome[2659]

Sources

howtos, netflix, chrome, author arfon

Steam

Steam[2660] is a digital distribution platform developed by Valve Corporation offering digital rights management (DRM), multiplayer gaming and social networking services.

Installation

Note

Steam requires multilib[2661] if using a 64 bit system.

The steam installer can be be had by installing the steamclient[2662] package from AlienBob. On running Steam the first time it downloads some libraries and and sets itself up.

Troubleshooting

Sound does not work (pulseaudio)

Slackware-14.2 switched to pulseaudio; if pulseaudio is not working as expected sound may not work in steam. The following fix could be tried if sound is not working:

# mv /var/lib/dbus/machine-id /var/lib/dbus/machine-id.bak
# ln -s /etc/machine-id /var/lib/dbus/machine-id

Source: https://github.com/ValveSoftware/steam-for-linux/issues/1179#issuecomment-26445442[2663]

Glitch in graphics

Steam (and games) may require certain libraries for functioning correctly, like OpenAL[2664] and libtxc_dxtn[2665] (for multilib the compat32 versions would need to be installed as well).

Controller does not work

You may need to map the controller buttons by going to Steam Big Picture mode → Settings → Controllers.

Source: http://steamcommunity.com/app/238460/discussions/1/540741858956217983/?ctp=2#c540741859210052192[2666]

Further reading

https://wiki.archlinux.org/index.php/Steam[2667]

Sources

http://alien.slackbook.org/blog/valves-steam-client-for-linux/[2668]

http://alien.slackbook.org/blog/steam-games-in-slackware/[2669]

howtos, games

PulseAudio Rationale

With the release of the first beta of what will be version 14.2, PulseAudio has been introduced as default audio server in Slackware Linux.

This historical change comes out mostly from necessity, as the bluetooth stack BlueZ[2670] has dropped the ALSA plugin for audio output, making the presence of PulseAudio mandatory for playing any audio coming from Bluetooth devices.

From Slackware's Changelog[2671]:

After upgrading to BlueZ 5 recently, everything seemed to be working great,
but then it was pointed out that Bluetooth audio was no longer working.
The reason was that the newer BlueZ branch had dropped ALSA support and now
required PulseAudio. So with some trepidation, we began investigating adding
PulseAudio to Slackware. Going back to BlueZ 4 wasn't an option with various
dependent projects either having dropped support for it, or considering doing
so. After several iterations here refining the foundation packages and
recompiling and tweaking other packages to use PulseAudio, it's working well
and you'll likely not notice much of a change. But if you're using Bluetooth
audio, or needing to direct audio through HDMI, you'll probably find it a lot
easier to accomplish that.
Best of all, we're finally a modern, relevant Linux distro! ;-)

Before this moment, there was no technical need for introducing PulseAudio as a basic component of the distribution, and linking the audio components directly to ALSA devices gave all the features needed by users without PA's known backsides.

Removing PulseAudio Completely

It should be noted that, as PulseAudio is now a basic system component, with many applications directly linked to it, the following procedure for removing PulseAudio is unsupported. It did work for me, though.

In order to remove PulseAudio from your system completely, follow these steps:

su
mv /etc/asound.conf /etc/asound.conf.disabled
removepkg pulseaudio

However, after you do this, you will find many applications (mplayer etc) no longer work, because they are linked to libpulse.so.0. This issue is remedied with the following:

git clone https://github.com/i-rinat/apulse
cd apulse
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ..
make
su
mv libpulse* /usr/lib64 #or /usr/lib if you are on a 32-bit machine

Now your pulseaudio-linked programs will find a fake libpulse.so.0 that nevertheless provides all the symbols they expect and everything that can use ALSA will use ALSA just like it used to. Additionally, any program insisting on trying to use the libpulse.so.0 API should theoretically still work as the libpulse.so.0 you have installed is a wrapper to make PulseAudio programs (Skype specifically) work on ALSA-only systems.

Using Pulseaudio as non-default audio manager

PulseAudio has become the default audio manager in the distribution, and it is configured for taking ownership of the audio card in the system so that all the components needing access to audio must refer to it.

For this reason, multiple software packages have already been recompiled to enable dependency on PulseAudio, and others will probably follow before the release cycle of 14.2 is complete. This equates Slackware to all other Linux distributions that had previously adopted PulseAudio.

The goal of this guide is giving instructions on how to configure PulseAudio in Slackware-current and upcoming 14.2 as an additional audio system while keeping direct access to ALSA devices as the default.

It is possible to configure PulseAudio as a "dumb pipe"[2672] that streams audio to ALSA's dmix device, without directly grabbing the audio card and allowing other software to stream into dmix device as well, so that all audio sources are mixed together.

I will also try to keep track of the changes in compilation parameters of various packages that must be reverted in order to have them use ALSA as their default output.

The final result should be having /usr/bin/pulseaudio process started as less as possible, ideally only when the components that cannot work without it are in use, while the rest of the system will use ALSA.

Basic Pulseaudio configuration

Steps to revert ALSA configuration to playing directly to audio hardware instead of using Pulseaudio are:

Remove /etc/asound.conf file that has been installed by the alsa-lib package

You may want to create a dummy /etc/asound.conf file so that future upgrades of alsa-lib package will not install it again and will rather place a /etc/asound.conf.new

Remove alsa-plugins package

# removepkg alsa-plugins

The rationale for this is:

l/alsa-plugins-1.1.0-x86_64-1.txz: Added.
This provides a plugin to redirect ALSA output to PulseAudio.

Edit /etc/pulse/default.pa
Find and uncomment lines which load back-end drivers. Add device parameters as follows. Then find and comment lines which load autodetect modules.

load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop
# load-module module-udev-detect
# load-module module-detect

Edit /etc/pulse/daemon.conf

Add configuration for having Pulseaudio daemon immediately exit as soon as the audio source triggering it has ended:

exit-idle-time = 0

Optional: add configuration for keeping Pulseaudio from altering volume levels that ALSA is handling

flat-volumes = yes

Changes related to X11

The pulseaudio package will install /etc/xdg/autostart/pulseaudio.desktop. This file contains configuration responsible for registering Pulseaudio with the current X11 session and making it available to all programs running in X11 environment.

An XSMP connection between Pulseaudio daemon and the X11 session will be created, and this will make the daemon stay started during all the session, even if no Pulseaudio clients are actually in use.

$ pactl list clients
Client #0
Driver: module-x11-xsmp.c
Owner Module: 4
Properties:
application.name = "XSMP Session on KDE as 10d7cad6d0000145322327400000022300109"
xsmp.vendor = "KDE"
xsmp.client.id = "10d7cad6d0000145322327400000022300109"

But without this connection no audio software running in the graphical session will be able to connect to Pulseaudio daemon even if it correctly starts on demand.

If you are fine with having /usr/bin/pulseaudio running idle in the system and being occasionally used by the clients depending on it, you can leave things untouched.

If you want it to start and stay running only for the time it's actually needed and exit right after closing any related client then you can take this solution into consideration:

remove or rename the file /etc/xdg/autostart/pulseaudio.desktop. This will avoid PA being pre-started at each user login to an X11 session.

Create a script /usr/local/bin/pa-unreg with the following:

#!/bin/bash
if [ "$(pidof pulseaudio)" ]
then
/usr/bin/pactl unload-module module-x11-xsmp 1>/dev/null 2>/dev/null
fi

Install the following line in user's personal crontab:

$ crontab -l
# Unregister Pulseaudio XSMP module
*/10 * * * * /usr/local/bin/pa-unreg

This command running every 10 minutes will unregister any Pulseaudio daemon currently running from the XSMP session. When Pulseaudio daemon starts it will initially register itself and the client triggering it will be able to connect. Then within the following 10 minutes the registration will be removed, but currently established client connections will stay active until when necessary. When clients will exit, the daemon will exit as well because no kind of session is still alive.

You may be using applications that can dynamically detect the presence of Pulseaudio daemon and connect to it, while they fallback to using ALSA when it's not detected. For example, multimedia components of Mozilla Firefox and Google Chrome have this behaviour. If you are using any of these programs during the time that PA's XSMP registration is active, they will open a session with it and they will trigger it to stay started even after the session is unregistered and other audio clients have been closed.

Changes related to Desktop Environments

KDE 4

As of the current date (January 2016), Slackware-current and upcoming release 14.2 include KDE 4.14.3. This version is known as being the last official release of KDE 4. No further releases are planned, and no further packages should arrive in the distribution, unless any recompilation should be required because of dependency changes.

With the arrival of Pulseaudio, some packages related to KDE have been recompiled to enable PA support by linking them to its libraries.

Notably these packages are:

phonon-4.8.3 (the abstraction layer for multimedia streams)

kmix-4.14.3 (the mixer for handling volume levels)

kde-runtime-4.14.3 (probably for the Control Panel tabs related to audio configuration)

This means that as soon as the user logs into a KDE session the /usr/bin/pulseaudio will be started and will stay running even after we have applied the previously listed changes.

Phonon

It handles all audio streams coming from KDE programs (including Amarok, for example). Now it is linked to Pulseaudio libraries and sends all them through it. Reverting it to the previous condition will make all KDE multimedia applications go through ALSA again, without any individual change.

There is no runtime option for making it use ALSA output when it's compiled for Pulseaudio, so you will need to recompile it with explicit exclusion of Pulseaudio support, and then replace the official Slackware package with your own.

You will need this addition to CMake configuration parameters:

cmake \
[...]
-DWITH_PulseAudio=FALSE \
-DPHONON_PULSESUPPORT=OFF \
[...]

You can replace the PA-dependant package with this other one with the command:

# upgradepkg --reinstall phonon-4.8.3-x86_64-1.txz

KMix

The audio mixer has been recompiled for controlling volume levels provided by Pulseaudio devices, but in this case it is possible to configure it at runtime for hooking to ALSA devices like it did in the past.

The required configuration is:

$ echo export KMIX_PULSEAUDIO_DISABLE=1 > ~/.kde/env/kmix_disable_pulse.sh
$ chmod +x ~/.kde/env/kmix_disable_pulse.sh

The executable script kmix_disable_pulse.sh will be started at user's login to alter the default behaviour.

KDE 5

KDE 5.x is currently not officially part of Slackware Linux. It is unofficially provided and mantained by Eric Hameleers[2673], and now it has been configured for using Pulseaudio by default.

For the goals of this guide, the required steps for having it use ALSA as standard output device are the same as for KDE 4[2674].

Please notice that environment startup scripts that in KDE4 were previously placed in ~/.kde/env must now be placed in ~/.config/plasma-workspace/env, so in order to configure KMix for ALSA mixer management you will now have:

$ echo export KMIX_PULSEAUDIO_DISABLE=1 > ~/.config/plasma-workspace/env/kmix_disable_pulse.sh
$ chmod +x ~/.config/plasma-workspace/env/kmix_disable_pulse.sh

Remember to avoid using the PulseAudio based volume control Plasmoid for your system tray.

Configuration of specific applications

Some of the multimedia software present in Slackware can be configured for using ALSA output or PulseAudio output at run-time, but there is software where the output selection is hardcoded and it can be changed only by means of a recompilation.

All the software that is using KDE's phonon for their output (eg: Amarok) will not require any further changes besides those listed above.

Here is an evolving list of common software and required actions:

mpg123

This software has been compiled for using Pulseaudio as default output but you can change this by simply adding an option on command-line:

 $ mpg123 <...> -o alsa <...> file.mp3

Clementine

Clementine audio player requires being compiled with the following cmake options:

cmake \
[...]
-DENABLE_LIBPULSE=NO
[...]

Audacious

Also Audacious can be configured to use ALSA even if it's been compiled with PA support.

In Settings→Audio you can define Output Plugin to ALSA Output.

Sources

* Originally written by LoneStar[2675]

howtos, pulseaudio, sound

How To Build A Slackware Mediacenter (HTPC) With Kodi (formerly: XBMC)

My Situation

I wanted a stand alone media center and everything pointed to XBMC. I tried the various LiveCD versions of XBMC but each had problems that either prevented the system from working or were too annoying. The solution turned out to be a S lackware 14 box that boots right into XBMC.

Here's What I Did

Install Slackware. Optionally, use an old PC; you might be surprised at how powerful even an older PC can be for media playback.

Install Kodi[2676] (formerly known as XBMC), ffmpeg[2677], and dependencies. For automated installs, use sbopkg[2678] or a similar SlackBuilds.org frontend.

To keep the install as light as possible, use a lightweight GUI environment. You probably don't need a traditional desktop; copy /etc/X11/xinit/xinitrc.twm to ~/.xinitrc to set twm as the default window manager.

Create a user named kodi and login as the user kodi to create the essential window manager configuration files.

Edit ~/.xinitrc to simplify the window manager even further. At the bottom, change:

/usr/bin/twm &
/usr/bin/xclock -geometry 50x50-1+1 &
/usr/bin/xterm -geometry 80x50+494+51 &
/usr/bin/xterm -geometry 80x20+494-0 &
exec /usr/bin/xterm -geometry 80x66+0+0 -name login

to:

/usr/bin/twm &
#/usr/bin/xclock -geometry 50x50-1+1 &
#/usr/bin/xterm -geometry 80x50+494+51 &
#/usr/bin/xterm -geometry 80x20+494-0 &
#exec /usr/bin/xterm -geometry 80x66+0+0 -name login
exec /usr/bin/xbmc -geometry +0+0

Edit /etc/rc.d/rc.local and add:

sudo -u kodi startx

this is instructing the system to login as the kodi user on boot and start the default window manager.

After you reboot the machine, it should boot right into kodi, and you should have a working media center/HTPC.

Some Other Things to Configure

If you keep your media files on other machines and they are accessible via Samba or NFS, make sure you enable file sharing:

To enable Samba file sharing:

chmod 755 /etc/rc.d/rc.samba;/etc/rc.d/rc.samba start

To enable NFS file sharing:

chmod 755 /etc/rc.d/rc.nfsd;/etc/rc.d/rc.nfsd start

For NFS, you'll have to do some other configuration but all that is explained in the NFS wiki pages[2679].

Sources

* Originally written by arfon[2680]

howtos, software, htpc, media center, xbmc, author arfon

PulseAudio

PulseAudio is a sound server running on top of some other sound system, usually ALSA. The original purpose was to get software mixing and transmit sound over network. Now PulseAudio is more than that, but it came at cost of increased complexity, which is not very good, considering the Linux sound system is already overly complex. But despite that the sound server is widely used by most Linux distributions. Slackware is not one of them because of its KISS principle and the fact that ALSA does its job fairly well in majority of cases. However, there are some programs (cough, Skype v4.3+, cough) that require PulseAudio in order to have working sound. There is a project called apulse[2681] that tries to emulate PulseAudio, but it doesn't work for everyone. This article will describe how to install and use PulseAudio in case you have/want to use it.

Installation

SlackBuilds.org is a great place to obtain packages missing on the stock system. Luckily for us, it has PulseAudio[2682]. It has very few dependencies (PA itself, at least), but there might be a few caveats.

Besides PulseAudio itself, you'll need alsa-plugins in order to get sound from non-pulse applications. Also, pavucontrol is highly recommended, because PA's config files are pain.

You can build the packages either directly using SBo, or using sbotools, or using sbopkg. There are more tools available, but I mainly use these two. The manual method is more tedious, but you have more control. sbotools can resolve dependencies and are able to build compat32 packages on x86_64 multilib systems. sbopkg gives you more control than sbotools, but requires more intervention. It doesn't matter which method you use, it's down to a personal preference.

You can also use pre-compiled packages in order to install all necessary applications, but it's so trivial I won't cover it here. You can use, for example, Slacky[2683] repo.

It's worth mentioning that if you need PulseAudio and/or multilib for Skype only, there's a package by zerouno[2684] with statically linked PA and necessary libraries that doesn't require you to install neither PA, nor multilib (for x86_64 systems).

Installation on a x86 or pure x86_64 system

This part used to be as easy as “install speex and json-c, then pulseaudio, then alsa-plugins”. Unfortunately, with the realease of speex-1.2rc2 there's a bug preventing alsa-plugins to build correctly even if you disable speex support. The solution for the time being is to add -DHAVE_STDINT_H to apulse-plugins' CFLAGS by editing the SlackBuild.

Other than that the installation part is pretty straightforward and SlackBuilds work perfectly.

For pavucontrol you need to resolve more dependencies, so sbotools or queue files for sbopkg are recommended, because building everything by hand is very tedious.

Installation on a x86_64 multilib system

Here I'll assume you know how to set up a multilib system and how to build 32bit packages on it. In case you don't, read this article[2685] carefully.

If you want 32bit applications (like Skype) on a multilib system to have sound through PulseAudio, you'll have to build compat32 package. And this is where things get complicated and manual intervention is needed.

First, install 64bit package of PulseAudio as described above.

Second, you need to compile 32bit package. Unfortunately, you can't use sbotools to do that for you because of a few errors that require you to edit SlackBuild for PA. You can compile speex and json-c as compat32 packages without any problem, but PulseAudio for some reason doesn't want to compile with 32bit version of libxcb and libcap, so, if it fails to compile as is, you'll need to edit SlackBuild to add --disable-x11 --without-caps for it to build successfully. Sometimes you need to disable more options, inspect the output in case compilation fails. It doesn't matter here, because all we are after is 32bit libpulse. Next, for some reason even after importing 32dev.sh PA still tries to use some 64bit libraries. So you'll need to start SlackBuild like this:

  PKG_CONFIG_PATH=/usr/lib/pkgconfig PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig LDFLAGS="-L/usr/lib" ./pulseaudio.SlackBuild

This will force PA to use the correct libraries and allow it to compile. Make compat32 package and install it. You don't need 32bit pavucontrol. 32bit alsa-plugins is needed only for 32bit applications, usually wine, to work properly.

Using PulseAudio

Actually, it's difficult to not use it, because it just keeps spawning. If you want to use PulseAudio exclusively as you sound server, then that's fine. If not, I'll cover what to do a bit later.

PulseAudio as the main sound system

All you need to do now it just create /etc/asound.conf (or ~/.asoundrc) with this content:

  pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

That'll make ALSA-only applications play sound through PA. The basic configuration of PulseAudio is done, because it tries to be smart and doesn't require much configuration if you want to use it.

PulseAudio as an additional sound system

It is possible to have PulseAudio not use ALSA exclusively for itself. For that you'll need to comment out all strings about udev in default.pa config file, uncomment the ones with ALSA and use device=dmix. Now pulse-only applications can use PulseAudio, while the rest of the system will continue to use ALSA.

If you are annoyed by PA constantly spawning, define autospawn = no in client.pa config file. Then you'll have to start PulseAudio manually each time you want sound from a pulse-only application.

The downside of this approach is that you are limited to only one device at a time, while udev allows PulseAudio to use all sound devices it finds. You'll have to configure your devices manually through ALSA's asoundrc config file.

In case of sound capturing, you have two options. First, use device=dsnoop. You can read about dsnoop here[2686]. Second, you specify your actual capture device for PA to use exclusively, like device=hw:2,0.

When using PA as an additional sound system, you'll need to choose it as an output sound device in applications you want to use PA, while other will use the default sound system.

Starting PulseAudio

XDG-compliant DEs will start PulseAudio automatically thanks to /etc/xdg/autostart/pulseaudio{,-kde}.desktop files.

In case you aren't using those, you can use start-pulseaudio-x11 command. Just add it to your DE/WM autostart. Plain pulseaudio --start will also work. To stop PA use pulseaudio --kill command. Be warned, that if you didn't disable autospawning, it'll respawn as soon as some application requires the sound.

PulseAudio in Xfce

If you use PA as the default sound system, everything will work just fine, except the multimedia keys. For them to work correctly, install xfce4-volumed-pulse[2687]. At the moment of writing, the autostart .desktop file is located in the wrong place: /etc/xfce/xdg/autostart/xfce4-volumed-pulse.desktop. Move it to /etc/xdg/autostart/ for it to start automatically. For the mixer to work, choose your default sound card and 'Master' channel.

PulseAudio in KDE

KDE uses GStreamer to play sound. ALSA applications will work fine, as they'll be using asoundrc config file. Phonon/GStreamer applications may have some problems.

While start-pulseautio-kde.desktop file re-routes the sound from Phonon to PA, the PA server is not set as the default device. You'll need to move it to the top everywhere in the Phonon settings.

Gstreamer applications will try to use ALSA, which re-routes the sound to PA, but in some rare cases it may not work. For them to use PA directly, you'll need to rebuild gst-plugins-good package. Since this package is provided by the system, you can get the sources and the SlackBuild from the Slackware tree.

PulseAudio mixers

The main mixer for PulseAudio is pavucontrol, although it doesn't provide neither tray icon/applet, nor keyboard shortcuts. For that you'll have to use other mixers.

In case you are running PA as your main sound system and set up asoundrc as I described above, any ALSA mixer will do just fine. Just make sure it's configured to use the default (or “pulse”, or your default output sound card) device and “Master” channel.

If you like CLI commands, there's ponymix[2688]. Actually, it does the same thing you can achieve with pactl, but you can never have too much pony in Linux

Speaking of pactl. These are commands to define your own keybindings, e. g. in ~/.fluxbox/keys:

  pactl set-sink-volume 0 +5% #raise the main sink's volume by 5%
pactl -- set-sink-volume 0 -5% #lower the main sink's volume by 5%; notice the "--"
pactl set-sink-mute 0 toggle #mute/unmute the main sink

For more commands and options see man pactl.

By the way, by default PA also installs bash completion script, which may come in very handy when using pactl, so bash-completion package from extra set is recommended.

Sources

Some information was taken from ArchLinux Wiki[2689].

Originally written by fsLeg[2690]

howtos, multimedia, sound, pulseaudio, needs attention

Slackware Live DAW: Compensating Latency

Overview of Latency and its Sources

Audio data is moved in “chunks”, called buffers, which contain a number of audio samples. The buffer takes time to fill up, due to the fact that a system runs at a fixed sample rate. The size of the buffer is determined by the “Frames/Period” and “Periods/Buffer” settings given to the audio server.

E.g. A Frames/Period setting of 512, and Periods/Buffer of 3:
512 x 3 = 1536 Frames/Buffer (i.e. Samples/Buffer)
If the sample rate is set at 48000Hz, then the buffer fills in:
1536/48000 = 0.032 seconds, or 32 milliseconds

Larger buffers end up being audible as delay when playing a monitored instrument. For example, playing a chord on a MIDI piano and hearing it after a delay in headphones. The buffer settings can be reduced to find an acceptable amount of delay for playing, at trade-off of risk of xruns. Alternatively the buffer can be increased to allow more latency which gives more stable audio performance.

xruns are audible glitches or pops that occur when the computer can't keep up with the task of filling up the buffer with samples. They occur more easily at lower buffer sizes and/or higher sampling rates, since it is more work for the CPU to write these smaller buffers at a quicker rate.

In any case, the audio server knows how it is configured and can compensate for the known delay of the buffer size and sample rate. This compensation is done by delaying when recorded tracks are written to file, keeping all the timing of a multi-track recordings in sync.

However, there is still additional delay from the audio interface hardware (ADC's and DAC's) and remaining audio chain. These delays can be measured and input to the audio server to completely compensate signal latency. Several ways to achieve this will be outlined below.

Using QJackCtl and jack_iodelay

Slackware Live DAW come with QJackCtl to manage the jackd server, and starts this automatically at boot/login. This can be configured else-wise, but to work with the stock setup you can use “jack_iodelay” and QJackCtl to compensate your hardware latency.

Once QJackCtl is running the JACK server, open up a terminal and run “jack_iodelay”, which is a utility that comes with JACK to measure hardware latency. Once jack_iodelay is running it will start looping and reporting its information in the terminal (you can exit at anytime with Ctrl+c).

Open up the connection graph in QJackCtl and you will find a “jack_iodelay” program running. Connect its input to a physical input on your interface. Then connect the output of 'jack_iodelay' to a physical output.

The last step is to connect the physical output back to the physical input that jack_iodelay is using. Also don't use an output with speakers, the program uses a series of tones to measure latency and you probably don't want to hear them.

After all connections are made, jack_iodelay will report the full loop latency, in milliseconds, frames (samples), how much of the latency is due to hardware (it does this by subtracting the known latency from the total measured), and also recommends values to set for input and output ports.

Quit jack_iodelay (Ctrl+c), stop the server in QJackCtl, and enter the “Setup menu”. On the advanced tab there are entry spots for Input and Output latency. Enter the values from jack_iodelay here, then restart the server.

Now the jack server will be able to report the latency of its hardware ports as well, allowing programs to properly sync up overdubbed tracks when recording.

Using Ardour

Ardour comes with latency compensating tools built into its GUI (which are a little easier to use than first method). Note that Slackware Live DAW comes pre-configured to automatically start jackd/QJackCtl at startup, so running Ardour will just connect to this running instance. To use Ardour's built in tools you must start the server from Ardour. You can open QJackCtl from the tray in KDE Plasma and stop the server from there. Then launch Ardour and the program will prompt you to set up the audio server when you start a new session.

Note that Ardour can use ALSA directly, or start its own JACK instance as well. In any case, select your audio interface for the Input and Output device and choose an acceptable sample rate, buffer size, and period size for your audio work. Then wire a loop back cable from an output to an input on your interface (the same as done in the first method). Once the hardware interface is looped, you can use the “Calibrate Audio” feature on Ardour's “Audio/MIDI Setup” page.

Select the appropriate ports that are looped, and click measure. The latency is measured, and the results are derived, the same as the first method (it is in fact running jack_delay in the back-end here).

You can set the latency compensation by clicking “Use Results”, at which point the server will start.

An Alternative Test (and Visualizing Latency)

Both of the latency compensation techniques discussed in this article have used a loop back connection from the audio interface to send a signal through an output port and back to an input port. This return signal is delayed by the hardware latency, which can then be measured. You can also record this latency and see it for yourself by using a click track.

This example will use Ardour to show how to achieve this, since it its the primary DAW program that comes with Slackware Live DAW. Similar steps could be carried out with other recording programs.

Start a new recording session, without any latency compensation in place. Also loop an output back to an input on your audio interface, with the same technique as in the other latency compensating methods above.

Create a new audio track to record the click. Disconnect the input of this track. Then open up the “Audio Connections” Window. Route the “Click out” (Ardour's metronome) to the output. Then route the looped input to the track so you can record the click, through your hardware interface.

Then record a few seconds onto the track (with the metronome enabled).

Zoom into a single impulse (Ctrl+Scroll-wheel). You will see that the impulse starts later than the grid-line, which is where the red play-head is in the image below. The metronome is sounded at each quarter note on the grid, but doesn't get recorded until later, due to hardware latency. For reference the image below was taken on a system running at a buffer size of 64, and 3 periods, and shows an offset of 511 samples.

This works out to 511/48000 = 10.64 milliseconds of latency.

Stop the audio server and repeat the audio setup, but this time add the latency compensation. Once that is done, record another section of clicks, and zoom in again.

Now the impulse should line up on the grid line, or very close. This is because the audio server has compensated for the hardware delay, allowing the timing to be precise. In my case here my “observable latency” went down to 12 samples. This works out to a delay of 12/48000 = 0.25 milliseconds.

References

https://wiki.linuxaudio.org/wiki/jack_latency_tests[2723]
https://www.systutorials.com/docs/linux/man/1-jack_iodelay/[2724]
https://manual.ardour.org/synchronization/latency-and-latency-compensation/[2725]

Sources

Originally written by Bob Funk[2726]

Converted from latex sources using pandoc and sed by Eric Hameleers[2727]

howtos, multimedia, daw, audio, author 0xbf

Slackware Live DAW: Minimizing Latency

When is Minimal Latency Actually Needed?

Low latency in a digital audio workstation is needed when providing live playback to the artist. If audio coming from the monitor is delayed from the action of playing an instrument or singing, it interferes with the artist's ability to keep in time. This applies to recording a musician or vocalist with live monitoring, playing a live show with software instruments, mixing a live show through a DAW, or any other work where audio is being created while listening to it.

The threshold for latency being audible is around 10 msec (from playing until hearing through the monitor), and can also depend on the instrument played. A decent audio interface can be pushed below 10 msec round trip latency, whether its PCI, Firewire, or USB.

In other cases like editing and mixing tracks, the latency doesn't matter as much and it can be compensated[2728] easily. It is better to run the audio server with a larger buffer size, reducing the demand on the system. This allows you to work with more plugins, instruments, tracks, etc. and have a much lower risk of hitting buffer xruns.

This article assumes that you are interested in reducing latency in the Slackware Live DAW for the purpose of live playing, and will provide some ideas on how to achieve xrun free and stable operation at these demanding settings.

Slackware Live DAW as a Starting Point

The Slackware Live DAW Edition is a pre-configured Slackware distribution that has been optimized for audio work. Eric (aka AlienBOB[2729]) has already set up the typical prerequisites for real-time audio work, including:

A real-time configured kernel (using the 'threadirqs' boot option)

CPU governor set to maximum performance

Real-time priority scheduling and unlocked memory for the audio group (using PAM)

HPET and RTC access set up with udev rules

sysctl tweaks

KDE Plasma 5 GUI tweaks

As a live distribution, getting the system set up just involves plugging in a USB stick and rebooting. There's no need to maintain two separate installs, or risk running real-time privileged applications on your day to day machine.

Of course the performance of the system is also dependent on the user's hardware. A USB, Firewire, or PCI audio interface makes all the difference in getting xrun free, low latency audio.

By default, the Slackware Live DAW will boot using the JACK audio server, managed by QJackCtl. The default settings are already lowered for real-time work and offers 10.7 msec of “calculated buffer latency”, which gives anywhere between 10msec - 20msec round trip latency when including the hardware's delay. The buffer settings can be lowered further, but the limit on how far depends on the hardware. PCI devices generally achieve the lowest latency, although USB and Firewire can still work well.

Audio Server Settings

The key settings that will adjust the latency of the system for the audio server are as follows:

Sample Rate

This sets the speed of how many audio samples (called frames) are taken per second. A higher sample rate will be fill up the buffer faster, leading to lower latency. The sample rate of 48000Hz is default. Other typical sample rates are 44100Hz, 88200Hz, 96000Hz, and 192000Hz. Note that higher sample rates will load the CPU more than lower rates.

Frames/Period

This setting determines the size of the buffer, in conjunction with the Periods/Buffer setting. The default settings use base 2 numbers (i.e 16, 32, 64, 128, 256, etc.), although custom values can be entered. Just be aware that some plugins are hard-coded to only work with base 2 values for Frames/Period, and will throw errors if set to anything otherwise. E.g. guitarix's cabinet simulator wont work and gives errors if the audio server isn't running a base 2 frames/period setting.

Custom values come in useful for some USB interfaces, which perform better with a buffer latency that is a whole number multiple of milliseconds, For example, a setting of 48000Hz, 48 frames/period, and 2 periods/buffer will use a buffer of 48 x 2 = 96 samples, and at 48000Hz, this takes 96/48000 = 2 milliseconds to fill. Applying this logic, the optimal settings for USB devices have been documented here: https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface[2730]

Lower size buffers require the CPU to work harder to keep up with the sample rate.

Periods/Buffer

This setting works with the Frames/Period to set the size of the buffer. Values of either 2 or 3 are used here. The man page for jackd recommends using 3 for USB and Firewire interfaces, and 2 for everything else (note: that is just a recommendation, not a rule). Values of 3 provide more combinations for whole numbers of millisecond buffer latency, but there are several combinations with 2 that also work. E.g. 48000Hz/48/2 can be used with a USB interface, providing the computer is sufficient for the task. A table of optimal USB interface settings can be found at the link in the previous section, or the references of this article.

Synchronous Mode

In synchronous mode a cycle of the JACK server reads the inputs, executes the graph, and writes the outputs. In asynchronous mode the server doesn't wait for the graph to execute, writing the outputs in the next cycle. The end result is that asynchronous mode adds an extra period to the buffer, making the buffer latency of asynchronous mode slightly higher than synchronous mode.

Testing Audio Server Settings

Having a variety of setting options leads to a number of possible combinations that can work with the audio server. When testing out different settings to find what works best, examine the DSP load when you start the server at the new settings. DSP load will be low at server startup, since there is no load yet. On a well configured machine DSP load will be under 1% while idle. Running applications and plugins increases the load, and at a high enough load the system will xrun. If the DSP load is higher at no-load, that means you can expect less plugins and higher chances for xruns for that setting.

A program called 'xruncounter' was developed by the linuxmusicians.com[2731] community that can be used to more thoroughly test a JACK audio server. After starting the server, 'xruncounter' is run from a terminal. (note: 'xruncounter -s' runs a multicore test), which then builds up DSP load over time, and exits automatically once it detects xruns. This provides an indication of how well the system will perform under load for a given setting. A well configured system will get into the high 90% range of DSP load before hitting xruns.

The xruncounter program also provides an indication of the amount of programs or plugins from the cycle count hit by the first xrun. A higher number of cycles before xruns occur indicate that more plugins can be used at that setting. The best settings will run up to a high DSP load, have a higher cycle count, and still have acceptable round trip latency.

The following image shows an example of xruncounter's output, with good results:

Further Tuning Options

There are a number of options that can be taken to increase your hardware's stability at low latency settings. In general, these measures are taken to either reduce DSP load, or to increase stability of the computer, since this is where we can make changes. In no particular order, some things that can help are:

Limit CPU C-States to C1

CPU C-states are the various levels of power saving modes that the CPU can enter when idling. C-states are useful for day to day computer usage, since they reduce energy consumption. However, the time taken for the CPU to switch in and out of higher C-states can reach into the millisecond range, which can be longer than the audio server's buffer time at low latency settings. This will manifest itself as occasional xruns occurring on the system, even when the DSP load is low. Limiting C-states to C1 will keep the CPU cores running at full speed, and will remove these xruns, at the expense of a slightly warmer CPU.

CPU clock frequency will also run more consistently when limited to C1, which gives good stability and xrun free audio for longer live sessions. CPU clock speed can be monitored from a terminal with a command like “watch -n 0.1 grep MHz /proc/cpuinfo”. When limited to C1, the frequency reported here will not vary beyond a 1 MHz difference. Without the limit the CPU frequency will bounce around more, which can cause occasional xruns.

C-states can be limited to C1 by booting with 'intel_idle.max_cstate=1' on the kernel command line.

Alternatively the max C-state can be adjusted at run time by opening the /dev/cpu_dma_latency file and writing a lower value (in microseconds) to the file. A value less than 10 will limit to C1, with lower values improving CPU frequency stability (down to 0). Note that the limit will be removed when the file is closed.

A simple C program to handle the /dev/cpu_dma_latency file is “cpudmalatency.c” and can be found in the references of this article. Note that the program must be run as root, to get write access to the /dev/cpu_dma_latency file.

Monitor Temperature & Limit CPU Frequency If Needed

It is a good idea to monitor CPU temperatures with something like “watch -n 1 sensors” if you are planning on using the DAW for extended lengths of time at low latency settings. The CPU governor is set to performance, which drives the CPU at its maximum clock frequency. This is needed to keep up with the real-time audio work, but it also leads to higher power consumption (and heating) when DSP load is added. Critical level temperatures will cause CPU throttling and xruns in the audio server.

If temperatures reach critical levels, it is a good idea to inspect and clean the cooling system. The maximum CPU clock frequency can also be lowered to make the performance governor run the machine at a lower limit. This reduces the temperature of the CPU and can provide a more stable clock frequency, which in turn provides long session stability.

The maximum clock frequency of the performance governor can be changed by echoing new values into /sys/devices/system/cpu/cpu{0,1,2,etc}/cpufreq/scaling_max_freq. E.g. A machine defaults to a value of 2800000 (in kHz, which is 2.8 GHz) maximum. Echoing a value of 1800000 for example will set the new limit to 1.8Ghz, which reduces system temperature and increases stability for long sessions.

Utilize 'toram'

The Slackware Live DAW can be run at very low latency settings while operating from the USB drive. However, operations that read/write to the USB drive can cause xruns (e.g. recording audio to the USB drive, or opening programs which have to be read from the USB drive to memory). If you have enough RAM (8GB or more), the USB can be copied to RAM by booting with the parameter 'toram', which means that the USB drive is not read/written afterwards (unless you remount it of course).

Write to SSD

Recorded audio has to be written somewhere. Having a fast storage device like an SSD will ensure that disk writes don't bottleneck the system at the storage device.

Kill Pulseaudio

The default setup from boot of Slackware Live DAW has pulseaudio running and available to the JACK server. Having pulseaudio enabled is useful for getting audio out of programs that connect to pulseaudio instead of JACK (like a browser). However, if you don't need it, it can be stopped and will reduce the DSP load a little. E.g. On the author's machine, the JACK server idles at no-load around 3%-5% DSP when pulseaudio is running. Killing pulseaudio drops the DSP load down to between 0.1% - 0.2%

Pulseaudio is designed to auto-spawn when you log in and will re-spawn if it dies. To disable it you can disable auto-spawning in your user profile by creating or editing the file /home/live/.config/pulse/client.conf and adding “autospawn=no”. Then you can kill the pulseaudio process and it will not restart. If this change is made on a persistent USB, then subsequent reboots will keep pulseaudio disabled.

Close Extraneous Programs

Running additional programs (e.g. a web-browser) takes away from your available headroom for real-time audio work. Close what you don't need to give the minimal CPU load and more headroom.

Example Setup

Author's Setup:
Laptop: Dell XPS13 (9350), Focusrite Scarlett 18i8 (2nd Gen) USB, JACK @ 48000/48/2/Sync, toram, writing to SSD, and limited to C1. This setup can run long term without xruns, while recording multiple tracks at once. CPU temperature averages around 80C under load, but could have the frequency max limit reduced to run cooler, while still maintaining stability. Round trip latency (including hardware on USB) measures at 5.13 ms, which is good enough for live performing.

References

https://alien.slackbook.org/blog/configuring-slackware-for-use-as-a-daw/[2732]
https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface[2733]
https://github.com/jackaudio/jackaudio.github.com/wiki/Differences-between-jack1-and-jack2[2734]
https://github.com/Gimmeapill/xruncounter[2735] (xruncounter program)
https://linuxmusicians.com/viewtopic.php?f=27&t=19268[2736] (xruncounter information)
https://linuxmusicians.com/viewtopic.php?f=27&t=19858&start=15[2737] (some info on C-state performance with audio work)
https://gist.github.com/SaveTheRbtz/f5e8d1ca7b55b6a7897b[2738] (cpudmalatency program)

Sources

Originally written by Bob Funk[2739]

howtos, multimedia, daw, audio, author 0xbf

What is a DAW?

In simple terms, a Digital Audio Workstation is a device where you create and manipulate digital audio.

Before the era of personal computing, a DAW would be a complex piece of (expensive) hardware which was only within reach of music studios or artists of name and fame.
A good example of an early DAW is the Fairlight CMI (Computer Musical Instrument), released in the late 70’s of the previous century. This Fairlight was also one of the first to offer a digital sampler. The picture at the left of this page is its monitor with a light-pen input.

These days, the name “DAW” is often used for the actual software used to produce music, like the free Ardour[2740], LMMS[2741], or the commercial Ableton Live[2742], FL Studio[2743], Cubase[2744], Pro Tools[2745], etcetera.

But “Digital Audio Workstation” also applies to the computer on which this software is running and whose software and hardware is tailored to the task of creating music. To make it easier for musicians who use Linux, you can find a number of custom distributions with a focus on making electronic music, such as StudioWare[2746] (Slackware based), AV Linux[2747] (Debian based), QStudio64[2748] (Mint based), so that you do not have to spend a lot of time configuring your Operating System and toolkits.

Overview of DAW related content

Page
Description
Tags

Slackware Live DAW: Compensating Latency
Slackware Live DAW: Compensating Latency Overview of Latency and its Sources Audio data is moved in “chunks”, called buffers, which contain a number of audio samples. The buffer takes time to fill up, due to the fact that a system runs at a fixed sample rate. The size of the buffer is determined by the
howtos, multimedia, daw, audio, author 0xbf

Slackware Live DAW: Connecting MIDI Devices
Slackware Live DAW: Connecting MIDI Devices Introduction MIDI devices can be connected using a MIDI cable into a MIDI port of an audio interface, or with a USB cable directly to a computer. In either case the MIDI connection will be handled by ALSA so the MIDI connections may not be present in JACK/QJackCtl's connection graph. There are several methods of bridging MIDI from ALSA into JACK.
howtos, daw, multimedia, midi, author 0xbf

Slackware Live DAW: Minimizing Latency
Slackware Live DAW: Minimizing Latency When is Minimal Latency Actually Needed? Low latency in a digital audio workstation is needed when providing live playback to the artist. If audio coming from the monitor is delayed from the action of playing an instrument or singing, it interferes with the artist's ability to keep in time. This applies to recording a musician or vocalist with live monitoring, playing a live show with software instruments, mixing a live show through a DAW, or any other wo…
howtos, multimedia, daw, audio, author 0xbf

What is a DAW?
What is a DAW? In simple terms, a Digital Audio Workstation is a device where you create and manipulate digital audio. Before the era of personal computing, a DAW would be a complex piece of (expensive) hardware which was only within reach of music studios or artists of name and fame.
howtos, daw, audio, multimedia, author alienbob

Sources

Originally written by Eric Hameleers[2749]

howtos, daw, audio, multimedia, author alienbob

Slackware Live DAW: Connecting MIDI Devices

Introduction

MIDI devices can be connected using a MIDI cable into a MIDI port of an audio interface, or with a USB cable directly to a computer. In either case the MIDI connection will be handled by ALSA so the MIDI connections may not be present in JACK/QJackCtl's connection graph. There are several methods of bridging MIDI from ALSA into JACK.

Bridging ALSA to JACK

The Slackware Live DAW defaults to running a JACK server that is configured with QJackCtl. Bridging ALSA MIDI to JACK can be done within QJackCtl using the built in “raw” or “seq” modes. The other option is to run a2jmidid, which is a daemon that bridges ALSA MIDI connections to JACK.

Using raw or seq can be selected from the JACK server settings in QJackCtl:

Note that there is also a checkbox for enabling the ALSA sequencer under the “misc” tab of QJackCtl.

Once the JACK server is started with raw or seq enabled, MIDI ports will be exposed for the detected hardware devices.

JACK running in raw mode

However, the built-in modes of JACK are worse in terms of timing error and jitter (according to the developers of Ardour, see references for details). An alternative with better performance is “a2jmidid” which is a program that runs as a daemon and exposes ALSA MIDI devices to JACK.

a2jmidid Connections

The “a2jmidid” daemon is shipped with the Slackware Live DAW and can be started from the command line with “a2jmidid -e” (the -e option exposes hardware interfaces from ALSA). Alternatively, the a2jmidid daemon can be started automatically when the JACK server is started. This is achieved by adding “a2jmidid -e &” to the startup scripts section of QJackCtl.

Note that if using the a2jmidid daemon, the MIDI setting in QJackCtl should be set to “none”.

Compensating MIDI Latency (Ardour Only)

MIDI devices connected through hardware will also incur latency due to hardware delays. This latency can be measured and compensated for when using the built in audio setup menu in Ardour. Presently this type of compensation can't be done for a JACK server.

To compensate latency in Ardour, stop the JACK server from QJackCtl (and exit the program if desired). Then use the “Audio/MIDI Setup” menu of Ardour to set up ALSA directly.

Selecting an ALSA option for the MIDI system will enable the “MIDI Device Setup” option which includes features for measuring and compensating latency in Ardour.

Note that to calibrate MIDI latency, your interface must have a MIDI input and output port. The two ports are bridged with a MIDI cable. Then a MIDI signal can be sent through the hardware ports and looped back, measuring the latency of the signal upon return. Also note that the ALSA audio server must be started to make the MIDI calibration utility available.

Once latency is measured, the utility will split the measurement into equal parts for input and output port latency, and fill the values into the fields.

The MIDI latency can also be measured with the program “jack_midi_latency” (noted in references) when running a JACK server. However, there is no way to compensate MIDI port latency within JACK at this time.

A Visual Measurement of MIDI Latency

To get an idea of how MIDI latency can affect a MIDI signal, a MIDI track can be routed through the MIDI cable loop and recorded to another track. The original track has some test MIDI notes, put down on the beat markers.

In this example the MIDI 1 track in Ardour is routed to output its MIDI signal through the hardware MIDI output port, around the looped back cable to the MIDI input port, and into MIDI 2. By routing the signal through the hardware ports, their latency will added. Note that this test is only to “see” how much latency is present. In normal circumstances you would route the MIDI for two tracks like this in software MIDI connections, which would add no latency at all.

When no latency compensation is in place, the MIDI notes will be noticeably delayed on the recorded track:

Once the systemic latency of the MIDI hardware is compensated, the MIDI recording will be better aligned with the original track:

Note that the latency pictured includes both output and input port latency. If the MIDI signal is coming from a keyboard to the interface, only the input latency has an effect. This is why the compensation settings are split for input and output latency.

If using Ardour as your primary DAW program, it may be beneficial to use Ardour's audio setup utility with ALSA, instead of QJackCtl running a jackd server. The advantage being the ability to compensate both audio and MIDI latency easily with automated test tools.

References

https://manual.ardour.org/setting-up-your-system/setting-up-midi/midi-on-linux/[2750]
http://linux-audio.4202.n7.nabble.com/Is-Xalsarawidi-the-same-as-Xraw-or-Xseq-td106370.html[2751]
https://discourse.ardour.org/t/midi-latency-measurement/87829[2752]
https://github.com/x42/jack_midi_latency[2753]

Sources

Originally written by Bob Funk[2754]

howtos, daw, multimedia, midi, author 0xbf

HOWTO articles - Multimedia

This section contains how to articles intended to guide users to setup and maintain multimedia apps on Slackware based systems.

Inspired? Want to write a Multimedia HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Multimedia HOWTOS

Page
Description
Tags

Slackware Live DAW: Compensating Latency
Slackware Live DAW: Compensating Latency Overview of Latency and its Sources Audio data is moved in “chunks”, called buffers, which contain a number of audio samples. The buffer takes time to fill up, due to the fact that a system runs at a fixed sample rate. The size of the buffer is determined by the
howtos, multimedia, daw, audio, author 0xbf

Slackware Live DAW: Connecting MIDI Devices
Slackware Live DAW: Connecting MIDI Devices Introduction MIDI devices can be connected using a MIDI cable into a MIDI port of an audio interface, or with a USB cable directly to a computer. In either case the MIDI connection will be handled by ALSA so the MIDI connections may not be present in JACK/QJackCtl's connection graph. There are several methods of bridging MIDI from ALSA into JACK.
howtos, daw, multimedia, midi, author 0xbf

How To Build A Slackware Mediacenter (HTPC) With Kodi (formerly: XBMC)
How To Build A Slackware Mediacenter (HTPC) With Kodi (formerly: XBMC) My Situation I wanted a stand alone media center and everything pointed to XBMC. I tried the various LiveCD versions of XBMC but each had problems that either prevented the system from working or were too annoying. The solution turned out to be a S lackware 14 box that boots right into XBMC.
howtos, software, htpc, media center, xbmc, author arfon

Slackware Live DAW: Minimizing Latency
Slackware Live DAW: Minimizing Latency When is Minimal Latency Actually Needed? Low latency in a digital audio workstation is needed when providing live playback to the artist. If audio coming from the monitor is delayed from the action of playing an instrument or singing, it interferes with the artist's ability to keep in time. This applies to recording a musician or vocalist with live monitoring, playing a live show with software instruments, mixing a live show through a DAW, or any other wo…
howtos, multimedia, daw, audio, author 0xbf

Netflix
Netflix How to watch Netflix on Slackware 1) Install the current version of Google Chrome. 2) Watch Netflix. How install Google Chrome on Slackware howtos:software:google-chrome Sources howtos netflix chrome author_arfon
howtos, netflix, chrome, author arfon

PulseAudio
PulseAudio PulseAudio is a sound server running on top of some other sound system, usually ALSA. The original purpose was to get software mixing and transmit sound over network. Now PulseAudio is more than that, but it came at cost of increased complexity, which is not very good, considering the Linux sound system is already overly complex. But despite that the sound server is widely used by most Linux distributions. Slackware is not one of them because of its
howtos, multimedia, sound, pulseaudio, needs attention

PulseAudio Rationale
PulseAudio Rationale With the release of the first beta of what will be version 14.2, PulseAudio has been introduced as default audio server in Slackware Linux. This historical change comes out mostly from necessity, as the bluetooth stack BlueZ has dropped the ALSA plugin for audio output, making the presence of PulseAudio mandatory for playing any audio coming from Bluetooth devices.
howtos, pulseaudio, sound

What is a DAW?
What is a DAW? In simple terms, a Digital Audio Workstation is a device where you create and manipulate digital audio. Before the era of personal computing, a DAW would be a complex piece of (expensive) hardware which was only within reach of music studios or artists of name and fame.
howtos, daw, audio, multimedia, author alienbob

Steam
Steam Steam is a digital distribution platform developed by Valve Corporation offering digital rights management (DRM), multiplayer gaming and social networking services. Installation Note Steam requires multilib if using a 64 bit system. The steam installer can be be had by installing the
howtos, games

howtos, topic page

hosts.allow, hosts.deny

These two files in /etc are a common place for storing rules about who you want to allow to connect to the services on your machine.

While a firewall can be considered as hiding a door, these files control who is allowed to open the door.

Used in combination, these two files can be used to create either

default open with exclusions (ban list)

default closed with allowances (invite list)

By default Slackware ships with both these files empty, this means the door is unlocked with no-one banned.

This document will guide you through changing that default open to a more secure default closed setup.

Contents

Making sure you have a key yourself

Locking the door

Writing the guest host list

Adding a second host

Adding lots of hosts

Adding other services

Talking to yourself!

Notes

See also

Making sure you have a key yourself

If you are connecting to the machine by ssh you will want to make sure that subsequent connections are allowed. If the machine you are sitting in front of is 192.168.0.10, edit /etc/hosts.allow and add

sshd:	192.168.0.10

If you are using dns you may also refer to your machine by name, eg

sshd:	wibble.mynet.invalid

Locking the door

This is simply done by editing /etc/hosts.deny and adding the line

All:	All

Connections which are in use will still be usable, only new connections via ssh from 192.168.0.10 will be allowed.

Writing the guest list

Adding a second host

We have already allowed connections only to the sshd server from 192.168.0.10, if we want to allow a second host to connect, it is as simple as

sshd:	192.168.0.10 192.168.0.11

or

sshd:	wibble.mynet.invalid wobble.mynet.invalid

You may have just a space between them or add a comma for clarity.

Adding lots of hosts

It is possible to allow blocks of addresses to connect by either shortening the address or using a netmask.

sshd:	192.168.0.

sshd:	192.168.0.0/255.255.255.0

Both have the same effect.

You can allow all within a domain name to connect, eg.

sshd:	.mynet.invalid

Adding other services

In the main, the name of the service you are connecting TO eg sshd, in.telnetd, vstfpd, proftpd should be placed in hosts.allow, but as with all things there are exceptions… NFS, with NFS we are making rules for what services we are allowing connections FROM.

If for example the machine we are locking down is an nfs server, and you want to mount it on 192.168.0.10 we would put in /etc/hosts.allow

portmap:	192.168.0.10
mountd:		192.168.0.10

Likewise, similarly back to front, if you want it to mount an nfs export we would put in the address of the nfsd we want to mount

portmap:	192.168.0.10
nfsd:		192.168.0.10

Talking to yourself

Sometimes it's not a bad idea, for example the rndc process for reloading bind might be on the same machine running named, in this case we want to allow connections from the same machine we are on.

rndc:	127.0.0.1

Again, note it is the name of the proccess we want to talk to, not the name of the listening process.

Notes

This does not cover all the variations in grammar of these two files nor will it secure all services that open ports but should hopefully give you a taste of what can be done.

See also

man (5) hosts_access

Sources

howtos, security, slackware allversions, inetd

Improving OpenSSH security

OpenSSH[2762] is the swiss-army knife of remote-access programs: it provides you with a shell on your distant machine, and transmits data in a secure and encrypted way - including commands, file transfer, X11 and VNC sessions, rsync data, etc.

OpenSSH[2763] is so advanced that it can be considered as a simplified VPN (Virtual Private Network).

Slackware contains OpenSSH[2764] of course, and the default configuration is already pretty secure. This page has been created to show you a few simple configuration tweaks that can be applied to the default configuration to improve its security.

You will need to know how to use a text editor to be able to follow this HOWTO. If you are a complete beginner, try nano. Once you are more advanced, and more at ease with Linux, feel free to use something more powerful…

The SSH configuration files and finding more information

The OpenSSH[2765] configuration files reside in the directory /etc/ssh/. The most important one is the /etc/ssh/sshd_config that we are going to modify here.

The OpenSSH[2766] documentation is very good, so feel free to enter the command: apropos openssh or man -k openssh and read the different man pages, which are much more detailed than this wiki page.

Modifying the sshd_config file

The first rule, before you modify an important configuration file is to make a backup copy of it. For instance:

# cp -v /etc/ssh/sshd_config /etc/ssh/sshd_config.ORIG.20120826

The command shown above will make a copy of the sshd_config file, and append the extension .ORIG (for original, of course) and include a modification date. While not perfect, this system insures that you can always go back to the previous version of an important file by entering the following:

# cp -v /etc/ssh/sshd_config.ORIG.20120826 /etc/ssh/sshd_config

Please note that this is a suggestion, of course, and system administrators that have to manage large installation, with hundreds of servers, are strongly advised to investigate better solutions, such as Puppet[2767] or other distributed system configuration managers.

Now, edit the /etc/ssh/sshd_config file with your favourite editor and tweak the following lines:

Change the SSH default port

By default, OpenSSH listens on port 22. It is sometimes advised to change this default port to something different, such as 2222 or 4242. This is not a bad idea, but you have to remember that scanning your machine with a program such as nmap will obtain this new port very quickly. So, while it may slow down some attacks on your machine, it will not prevent them entirely.

If you'd like to change the port, search for the Port option in sshd_config, which is usually at the top of file, and change the value.

For instance:

Port 22

Can be changed to:

Port 4242

Alternate method of Changing the SSH default port without changing

This suggestion is completely lifted from another site http://null.redcodenetwork.ro/changing-the-ssh-port-without-changing-it/[2768] The idea here is add a call to this script in rc.local so it will run at start up.

To use Download sample at the bottom change as you like and save it in /etc/rc.d/ (make it executable to use) Add this sample below to /etc/rc.d/rc.local

#add ssh_hide to port 8889

if [ -x /etc/rc.d/rc.ssh_hide ]; then
/etc/rc.d/rc.ssh_hide
fi

What it is doing is making it look like you changed the port ssh is using and provide some additional security. What happens is scanners will continue to see port 22 open and try to go there while your server drops those packets, because the header is not mangled. Real packets come in on port 8889 and are redirected by iptables to port 22 with mangle in the header so they don't get dropped.

rc.ssh_hide

#!/bin/bash

######First, set SSHD back to the default port 22.
######Next, figure out what port or ports you want to do SSH over.
######Were going to use 99, 88, and 8889 here.
######Now we take care of the Hypothetical Evil Unprivileged User
######by not accepting anything over those ports in the first place.
######This is only effective for port 8889 but well do all three ports for the sake of completeness.

/usr/sbin/iptables -t filter -A INPUT -p tcp -m multiport --dports 99,88,8889 -j REJECT --reject-with tcp-reset

######Then, pick a number between 1 and 4294967295 Ill use 0x13F ()
######Were going to tell iptables to reject anything without this mark coming into port 22.

/usr/sbin/iptables -t filter -A INPUT -p tcp -m tcp --dport 22 -m connmark ! --mark 0x13F -j REJECT --reject-with tcp-reset

######Now well tell iptables what ports we will accept for ssh.

/usr/sbin/iptables -t filter -A FORWARD -p tcp -m multiport --dports 99,88,8889 -j ACCEPT

######In the mangle table we slap our mark on these packets.

/usr/sbin/iptables -t mangle -A PREROUTING -p tcp -m multiport --dports 99,88,8889 -j CONNMARK --set-mark 0x13F

######Finally in the nat table we tell iptables to send the marked packets back to port 22

/usr/sbin/iptables -t nat -A PREROUTING -p tcp -m multiport --dport 99,88,8889 -j REDIRECT --to-ports 22

exit 0

Note not ipv6 compatible, due to nat (ip6tables not supporting nat)

Forbid root access to your machine

This is probably the single most important change you can do to improve the security of your machine: forbid the root user to access your machine. To do this, look for the following line in sshd_config:

PermitRootLogin yes

And change it to:

PermitRootLogin no

If you apply the changes above, make sure you have at least one user on your machine that can su (switch user) to root or use sudo for more fine-grained system administration permissions. The best way to administrate a server through SSH is to have a user in the wheel group, who can use both sudo and su to become root when need be.

Since most people who try to get into your machine uninvited use brute-force scripts that target the root login, you can already rest a lot easier, knowing this access is locked.

Improve login security and timing

Above and below the PermitRootLogin option, you will find other permissions, that we are going to detail quickly here:

- LoginGraceTime is used to increase, or decrease, the time left to a user to log into the machine. This can be safely be restricted to 5 minutes, with the following:

LoginGraceTime 5m

- MaxAuthTries is used to increse, or decrease, the number of tries allowed to a user to authentify correctly to the machine. This can be restricted to 3 attempts by using:

MaxAuthTries 3

Deny X11 forwarding

Unless you need to use X11 over SSH, you can safely disable it by using the following option:

X11Forwarding no

Please note that disabling X11 does not disable VNC over SSH, for instance. In most cases, it is always a good idea to disable un-needed services.

Restrict SSH login to approved users

If you are sure only specific users need to connect through SSH to your machine, you can declare them using the AllowUsers option. All the users - and only the users - mentioned after the option will be able to connect through SSH to the machine.

AllowUsers jack backup betty

In the example shown above, only user jack, betty and backup will be able to use SSH to connect to the machine. All other users will be denied access. Of course, you should use this option with caution and make sure the (or “a”) default user is included…

Restart the SSH server

The last thing to do, to make sure the SSH server takes the new configuration into account, is to restart the SSH server with the command:

# /etc/rc.d/rc.sshd restart

Your new, and slightly more secure OpenSSH configuration is now in effect. Congratulations!

See Also

OpenSSH manual pages (on-line)[2769]

Sources

Originally written by User Noryungi[2770]

howtos, security, ssh, author Noryungi

Installing Tor Using a SlackBuild Script

Overview

From torproject.org[2771]:

Tor is a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet. It also enables software developers to create new communication tools with built-in privacy features. Tor provides the foundation for a range of applications that allow organizations and individuals to share information over public networks without compromising their privacy.

Installing Tor

Download the libevent SlackBuild and source from SlackBuilds.org[2772].

Build and install libevent from the SlackBuild script.

Download the Tor SlackBuild and source from SlackBuilds.org[2773].

Build and install the Tor package using the SlackBuild script as you did with libevent above.

See Creating a Package Using a Slackbuild Script[2774] for more details on using SlackBuilds[2775].

Start Tor at startx using Xfce’s Session Manager GUI front end. (or start Tor as a service in Slack – /etc/rc.d)

Download and install the Foxy Proxy Basic[2776] addon for FF and Seamonkey.

Add new proxy in Foxy Proxy – Socks v5, 127.0.0.1, port 9050.

That’s it. You can start the Tor service by typing “tor” in Run Program (Xfce) or at the command line in terminal. Once it’s running, you can use the Foxy Proxy button to turn on the Tor proxy. Once you’ve done that, you can test by using THIS[2777] site.

This howto has been modified to reflect the fact that SlackBuilds.org now has a Tor SlackBuild in its repositories. When this was first written, a Tor pre-made package was used. See original source below for previous method.

UPDATED METHOD FOLLOWS (Amended 050220 - V. T. Eric Layton[2778])

Nowadays, there's a much easier way to get Tor up and running on your Slackware system. All you have to do is visit the TOR site and download the Linux binary package[2779]. Unpack and install it either in /opt or in your /home directory. Create a launcher on your panel for the executable and you're all set.

The TOR binary is a self-contained package; everything the browser needs to run is included. Any mods or preferences you set in your new TOR browser will be saved in its own default profile document. It will NOT affect your regular Firefox ESR settings in any way.

I advise you to read the TOR User Manual[2780] in order to gain an understanding of how it works and in what ways it protects your privacy.

Sources

Originally written by V. T. Eric Layton[2781]

This how-to is an edited version of THIS[2782] original source. Copyrights may apply to the original. Author grants permission for use on this site in this modified form.

howtos, software, tor, slackbuild, author nocturnal.slacker

Basic Security

These are things that every user can do to improve system security. Advanced topics will not be presented here, just the basics that every user can implement easily and will provide decent protection.

Use Strong Passwords

The strength of your password depends on three things:

Length: A longer password is a stronger password. Guides suggest at least 8 characters.

Complexity: The more varied the characters in the password, the stronger the password.

Deducibility: The harder it is for an attacker to derive a password the better.

Make sure to change your password often so that if someone is trying to crack it, they will have to start over. Also see the ultimate guide for creating strong passwords[2783].

Disable Unused Services

On Slackware, make unexecutable any rc files in /etc/rc.d that start services which you do not use. For example:

chmod a-x /etc/rc.d/rc.gpm-sample

The less services you use, the less chances that one has a bug that will allow an attacker to exploit it remotely.

Setup a Firewall

On Slackware, the easiest way to do this is by using Alien Bob[2784]'s adaptation of the Easy Firewall Generator[2785]. Just generate the firewall, copy the output to /etc/rc.d/rc.firewall, and make it executable.

chmod a+x /etc/rc.d/rc.firewall

Other options include GUI firewall generation programs such as Firewall Builder[2786].

X -nolisten tcp

By default, the Xorg server listens to port 6000 for remote connections. Sometimes you want remote connections, but if you don't, then disabling it is a good idea. The easiest way to do this is by creating this file at ~/.xserverrc OR /etc/X11/xinit/xserverrc.

xserverrc

#!/bin/sh

exec /usr/bin/X -nolisten tcp

You can specify more options to X in the same file if you need to.xserverrc

On Slackware, listening for incoming XDMCP requests is disabled by default in both xdm and kdm, so it is secure by default. One may ask, why bother stopping Xorg from listening if this is the case. It is always better not to trust config files, as exemplified by an old bug report when xdm ignored its config file[2787].

Check for open ports

Some ways to check for open ports are:

nmap localhost
nmap YOUR_EXTERNAL_IP_ADDRESS
netstat -luntp

Your external IP address can be found at sites like http://whatismyipaddress.com/[2788]. If you don't know what a port is used for check the wiki[2789].

Scan the system for malware

The following programs are useful for detecting rootkits and viruses:

rkhunter[2790]

ClamAV[2791]

Although not that much malware exists for Linux, it is a good idea to scan once in a while.

Sources

the ultimate guide for creating strong passwords[2792]

http://slackwiki.com/Basic_Security_Fixes[2793]

http://slackwiki.com/Security_Assessment_using_Nmap[2794]

security, software, author htexmexh

OpenVPN

OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (GPL).

OpenVPN allows peers to authenticate each other using a pre-shared secret key, certificates, or username/password. When used in a multiclient-server configuration, it allows the server to release an authentication certificate for every client, using signature and Certificate authority. It uses the OpenSSL encryption library extensively, as well as the SSLv3/TLSv1 protocol, and contains many security and control features.

How to use OpenVPN

It's very simple if you already got a ready-to-go config by any openvpn provider.

# openvpn --config yourconfig.ovpn

If you don't have a config that you can use you should have a look in /etc/openvpn. Slackware has a example config with some good hints in there.

Using OpenVPN with the i3 status bar

I'm using the i3 window manager[2795] with dmenu and the i3statusbar. You can configure the bar to show you if you're running openvpn or not. The i3status.conf lies in /etc/ if installed with the SlackBuild.

You have to start openvpn with an additional –writepid /path/to/your.pid.

For example:

openvpn --config /etc/openvpn/vpn.ovpn --writepid /var/run/pid/openvpn.pid

To use the build in feature you have to edit the config file. Look for the

run_watch VPN {
pidfile = "/var/run/something.pid"
}

block and change the something into your choosen pid name. In this case:

run_watch VPN
pidfile = "/var/run/openvpn.pid"
}

Rebuilding OpenVPN to read your login from file

Since I wanted my openvpn connection to start automatically when I connect my Thinkpad to the dock I thought it would be usefull to add the 'password safe' feature. ('password safe' setting allows you to store your username and password in a file for scripting) This feature is not installed by default. You have to add it to the slackbuild and recompile the package.

Start by grabbing the source and slackbuild from one of the Slackware mirrors.

http://mirrors.slackware.com/slackware/slackware64-14.0/source/n/openvpn/[2796]

Change the mirror for your needs, for example -current.

In the next step we will change the openvpn.SlackBuild file.

Open the slackbuild file with you editor of choice.

For vim do:

$ vim openvpn.SlackBuild

Now look for this block of code:

./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc/openvpn \
--localstatedir=/var \
--docdir=/usr/doc/openvpn-${VERSION} \
--enable-lzo \
--enable-iproute2 \
--build=$ARCH-slackware-linux

Add the marked line to it.

./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc/openvpn \
--localstatedir=/var \
--docdir=/usr/doc/openvpn-${VERSION} \
--enable-lzo \
--enable-iproute2 \
--enable-password-save \ #add this line!
--build=$ARCH-slackware-linux

Save the file, make it executable and rebuild the package with

$ chmod +x openvpn.SlackBuild && ./openvpn.SlackBuild

The new package should be in the /tmp directory.

Install it with:

# upgradepkg --install-new /tmp/yourpackage.tgz

Now you are able to load your login and password from a file. The file should contain two lines of text:

username
password

Save the file and make it only readable for the owner.

$ chmod 700 yourfile

Lastly add the line below to your openvpn config.

auth-user-pass /path/to/your/passwordfile

Now you should be able to login without typing your password everytime.

Sources

Wikipedia: http://en.wikipedia.org/wiki/Openvpn[2797]

Originally written by comfree[2798]

howtos, openvpn, slackbuild, security

Enabling Encrypted Swap

When available memory drops below a certain point, the Linux kernel will swap the contents of memory pages to swap space.

This content may include sensitive information such as passwords, usernames, PINS, banking or other identity information. This data is usually in plain text and so can be read without effort. Encrypting the system swap space protects its contents against unauthorized access and attack should access to the hard drive be compromised or physically removed.

Setting up Encrypted Swap

The following discussion will use several drive and partition designations. Be sure when implementing the procedures to adjust these to suit your own system.

The steps that follow can be used when initially setting up a system, or after a system is already running. If the latter, the first step required to encrypt the swap partition is to temporarily turn off swap. Close all unnecessary applications to free used memory and thereby discontinue the use of the swap space. While many applications can be configured to not use swap, this does not apply to the kernel. If the swap space is still being used, you will be unable to turn off swap.

Though not necessary, perhaps the simplest approach is to boot the system into single user mode. This results in minimal services running and a single root shell.

Swap can then be turned off using the following command:

# swapoff -a

To ensure a completely clean and sterile swap space, you must overwrite the previously used swap partition with random data. This will help prevent the recovery of any data written to swap before the encryption process. There are several ways to do this.

The following steps will destroy the current contents on the specified device/partition!

Perhaps the easiest is using the shred command which overwrites the specified file or device with random data:

# shred -v /dev/sdaX

Alternatively, overwriting the space with random data from either /dev/random or /dev/urandom:

# dd if=/dev/random of=/dev/sdaX bs=512

or

# dd if=/dev/urandom of=/dev/sdaX bs=512

Using /dev/urandom is not quite as secure, however it is significantly faster than using /dev/random.

The next step is to create a file, if it doesn't already exist, named crypttab in /etc. The specifics for crypttab can be found in the man page.

A crypttab entry as follows creates an encrypted block device named swap at /dev/mapper using the partition /dev/sdX as the base block device and /dev/random as the encryption password using AES encryption and variable initialization vectors.

swap /dev/sdaX /dev/random swap,cipher=aes-xts-essiv:sha256

You then need to edit /etc/fstab to point to the encrypted block device, /dev/mapper/swap as opposed to /dev/sdaX.

For example a current entry of:

/dev/sdaX swap swap defaults 0 0

becomes:

/dev/mapper/swap swap swap defaults 0 0

Activating Encrypted Swap

You can now enable encrypted swap either by rebooting the system or by issuing the following commands at the console prompt.

# cryptsetup -d /dev/random create swap /dev/sdaX

# mkswap /dev/mapper/swap

# swapon -a

For detailed information on specific commands please see the individual manual (man) pages.

Sources

Original source: Slackware Encrypted Swap[2799] Originally written by W. Dean Milner[2800]

howtos, security, encryption, swap

Enabling Secure Boot on Slackware

On Unified Extensible Firmware Interface (UEFI) based hardware, a system can operate in Secure Boot mode. In Secure Boot mode, only EFI binaries (i.e. boot managers, boot loaders) that are trusted by the platform owner, either explicitly or via a chain of trust, are allowed to run at boot time. This prevents unauthorised EFI binaries and operating systems from running on your system, which can improve security.

This article will teach you:

About Secure Boot keys and signature databases

How to enroll Secure Boot keys while booted into Slackware

How to sign EFI binaries for use in Secure Boot mode.

Make sure you can find and manipulate the Secure Boot settings with your system's UEFI firmware. That way, if you make a mistake, you can simply turn off Secure Boot to have a bootable system again.

Once you have changed your Secure Boot keys, signed your EFI binaries and have tested that Secure Boot is working, you should store your private keys in a safe location until the keys are required again. Anyone with access to your private keys can bypass the protection that Secure Boot offers.

Secure Boot Keys and Signature Databases

Two types of Secure Boot keys are used to create trust relationships:

Platform Key - This establishes the trust relationship between the platform owner and platform firmware. Only one Platform Key can be stored by the UEFI firmware. The public key is stored in the PK Secure Boot variable. This key allows the platform owner to manipulate all the Secure Boot keys and signature databases.

Key Exchange Key - This establishes the trust relationship between the operating system and platform firmware. Multiple Key Exchange Keys can be stored by the UEFI firmware. The public keys are stored in the KEK Secure Boot variable. Key Exchange Keys only allow the operating system to manipulate the signature databases.

There are two signature databases for authorising EFI binaries:

Forbidden signature database - This stores hashes and public signing keys of forbidden EFI binaries. This uses the dbx Secure Boot variable. EFI binaries with hashes present in this database or signatures that can be authenticated using a signing key stored in the database are forbidden from loading.

Authorised signature database - This stores hashes and public signing keys of trusted EFI binaries. This uses the db Secure Boot variable. EFI binaries with hashes present in this database or signatures that can be authenticated using a signing key stored in the database are permitted to run if there are no matches with any entries in the Forbidden signature database.

Requirements

You will need the efitools[2801] and sbsigntools[2802] packages before you begin. Slackbuilds are available at http://slackbuilds.org[2803].

If you do not already have your own Platform Key enrolled in the UEFI firmware, the howto assumes you have Secure Boot off and have cleared the PK variable in the UEFI firmware.

Enrolling Secure Boot Keys and Signature Database Entries

If you do not have an existing Platform Key pair and an EFI binary signing key pair, the easiest method to create the key pairs would be to create self signed keys. It is recommended to create 2048-bit RSA key pairs that use the sha256RSA signature algorithm. To generate self signed keys with the recommended properties, run:

openssl req -new -x509 -newkey rsa:2048 -subj "/CN=Platform Key Common Name/" \
-keyout PK.priv -out PK.pub -days 3650 -nodes -sha256
openssl req -new -x509 -newkey rsa:2048 -subj "/CN=EFI Binary Signing Key Common Name/" \
-keyout db.priv -out db.pub -days 3650 -nodes -sha256

which creates private keys with the .priv extension and public key certificates with the .pub extension. You may wish to adjust the key validity period and choose a different Common Name (CN) to help distinguish your keys.

It is not necessary to create or use your own Key Exchange Key as that is intended for use by operating systems. Key Exchange Key instructions, however, have been provided below so you understand how to enroll Key Exchange Keys for operating systems that require it.

To prepare a new Platform Key for writing to the PK variable:

Insert the public Platform Key into an EFI signature list:

cert-to-efi-sig-list -g owner_guid PK.pub PK.esl

replacing owner_guid with a hexadecimal GUID in the format 12345678-1234-1234-123456789abc. The owner GUID should be the same for all keys that you own. If an operating system cannot add a signature to a signature database due to a lack of resources, it may remove a signature with an owner GUID associated with the operating system.

Sign the EFI signature list. In Setup mode (Secure Boot off) the private half of the inserted key should sign the signature list. In User mode (Secure Boot on) the private key of the current Platform key should sign the signature list:

sign-efi-sig-list -k PK.priv -c PK.pub PK PK.esl PK.signed

A similar procedure applies for preparing a Key Exchange Key or a signature database entry for writing to the KEK, db, or dbx variables. Key Exchange Keys must be signed by the private half of the Platform Key:

cert-to-efi-sig-list -g owner_guid KEK.pub KEK.esl
sign-efi-sig-list -a -k PK.priv -c PK.pub KEK KEK.esl KEK.signed

And signature database entries must be signed by the private half of the Platform Key or any of the Key Exchange Keys:

cert-to-efi-sig-list -g owner_guid db.pub db.esl
sign-efi-sig-list -a -k PK.priv -c PK.pub db db.esl db.signed

Note that the -a option was used to prepare for an append write.

To update the Secure Boot variables you must have root privileges. You will need to load the efivarfs kernel module and mount the efivarfs filesystem beforehand if it has not been taken care of already:

modprobe efivarfs
mount -t efivarfs efivarfs /sys/firmware/efi/efivars

To enroll the Platform Key, run:

efi-updatevar -f PK.esl.signed PK

If the system was in Setup mode it will now be in User mode.

To add keys to the KEK, db or dbx variables, run (as appropriate):

efi-updatevar -a -f KEK.signed KEK

efi-updatevar -a -f db.signed db

efi-updatevar -a -f dbx.signed dbx

You can check that your keys have been properly enrolled using efi-readvar.

Signing EFI Binaries

My recommendation (at the time of writing) is that you either use a boot manager with an EFI stub kernel, or directly boot an EFI stub kernel. ELILO, efilinux and syslinux (and possibly GRUB but I do not know for sure) will allow unsigned kernels to run (or at least it does on my hardware and VM), which defeats the purpose of Secure Boot. If you do follow my recommendation, make sure you sign your kernel every time you change it.

You will need to sign all EFI binaries, up to, and including your bootloader and/or EFI stub kernel. To sign an binary, run:

sbsign --key db.priv --cert db.pub --output signed_binary.efi binary.efi

An example of how to add an EFI stub kernel entry using efibootmgr is:

efibootmgr -c -L SlackSecureBoot -l '\EFI\Slackware\vmlinuz-signed.efi' -u 'root=/dev/sda3'

If you see warning: gap in section table when signing an EFI binary (see below), the binary will probably not work in Secure Boot mode. This warning appears for EFI binaries built against earlier gnu-efi library versions. If you plan to use ELILO you will need to recompile it yourself, the version shipped with Slackware will not work.

warning: gap in section table:
.text   : 0x00000400 - 0x00017c00,
.reloc  : 0x00017ca1 - 0x000180a1,
warning: gap in section table:
.reloc  : 0x00017ca1 - 0x000180a1,
.data   : 0x00018000 - 0x00033000,
gaps in the section table may result in different checksums
warning: data remaining[225792 vs 242346]: gaps between PE/COFF sections?

Disabling Secure Boot

If you want to remove all Secure Boot keys and revert to Setup mode, the easiest way to do so is to sign an empty file with your Platform Key and write the signed file to all the Secure Boot variables:

touch empty
sign-efi-sig-list -k PK.priv -c PK.pub PK empty empty.signed
efi-updatevar -f empty.signed PK
efi-updatevar -f empty.signed KEK
efi-updatevar -f empty.signed db
efi-updatevar -f empty.signed dbx

Dual/Multi-booting with Windows

If Windows is one of your boot options, you will need the Microsoft KEK and db certificates. The certificates can be found at https://technet.microsoft.com/en-us/library/dn747883.aspx[2804] and will need to be converted from DER format to PEM format:

openssl x509 -in certificate.der -inform DER -out certificate.pem

The instructions that were provided above can then be used to enroll the certificates. The owner GUID you should use for Microsoft keys is 77fa9abd-0359-4d32-bd60-28f4e78f784b.

Sources

Originally written by turtleli[2805]

More information can be found at:

http://uefi.org[2806]

http://www.rodsbooks.com/efi-bootloaders/secureboot.html[2807]

http://blog.hansenpartnership.com/[2808]

https://technet.microsoft.com/en-us/library/dn747883.aspx[2809]

howtos, security, secure boot, uefi, author turtleli

HOWTO articles - Security

Securing your computer is an ongoing process. The following guides will help you secure your Slackware installation, be it for server, workstation or laptop needs. Make sure you subscribe to the slackware-security mailing list[2810]. All security announcements since 1999 are available on http://www.slackware.com/security/[2811].

This section contains articles related to securing your Slackware based system and network.

Inspired? Want to write a Security HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Security

Physical security

Network security

Firewall

Protecting SSH connections from brute-force attacks: Install DenyHosts on Slackware[2812]

Use only SSH keys instead of passwords for SSH connections: Using SSH keys[2813]

Network services: the following services can be tweaked:

inetd[2814]

OpenSSH[2815]

File System Security

Encryption

Encrypt swap space to protect sensitive contents Enabling Encrypted Swap[2816]

File Permissions

Track system changes with OSSEC

Overview of Security HOWTOS

Page
Description
Tags

Enabling Encrypted Swap
Enabling Encrypted Swap When available memory drops below a certain point, the Linux kernel will swap the contents of memory pages to swap space. This content may include sensitive information such as passwords, usernames, PINS, banking or other identity information. This data is usually in plain text and so can be read without effort. Encrypting the system swap space protects its contents against unauthorized access and attack should access to the hard drive be compromised or physically remov…
howtos, security, encryption, swap

Enabling Secure Boot on Slackware
Enabling Secure Boot on Slackware On Unified Extensible Firmware Interface (UEFI) based hardware, a system can operate in Secure Boot mode. In Secure Boot mode, only EFI binaries (i.e. boot managers, boot loaders) that are trusted by the platform owner, either explicitly or via a chain of trust, are allowed to run at boot time. This prevents unauthorised EFI binaries and operating systems from running on your system, which can improve security.
howtos, security, secure boot, uefi, author turtleli

hosts.allow, hosts.deny
hosts.allow, hosts.deny These two files in /etc are a common place for storing rules about who you want to allow to connect to the services on your machine. While a firewall can be considered as hiding a door, these files control who is allowed to open the door.
howtos, security, slackware allversions, inetd

Installing Tor Using a SlackBuild Script
Installing Tor Using a SlackBuild Script Overview From torproject.org: Tor is a network of virtual tunnels that allows people and groups to improve their privacy and security on the Internet. It also enables software developers to create new communication tools with built-in privacy features. Tor provides the foundation for a range of applications that allow organizations and individuals to share information over public networks without compromising their privacy.
howtos, software, tor, slackbuild, author nocturnal.slacker

OpenVPN
OpenVPN OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (
howtos, openvpn, slackbuild, security

Improving OpenSSH security
Improving OpenSSH security OpenSSH is the swiss-army knife of remote-access programs: it provides you with a shell on your distant machine, and transmits data in a secure and encrypted way - including commands, file transfer, X11 and VNC sessions, rsync data, etc.
howtos, security, ssh, author noryungi

How to use SSH keys to connect without a password.
How to use SSH keys to connect without a password. OpenSSH is a very secure way to connect remotely to a Slackware machine. But the easiest way to use SSH is to use its key facility. The concept of public/private keys can be hard to explain, we will try to go through it in as simple a manner as possible.
howtos, security, ssh, sshkeys, author noryungi

howtos, topic page

How to use SSH keys to connect without a password.

OpenSSH[2817] is a very secure way to connect remotely to a Slackware machine. But the easiest way to use SSH is to use its key facility.

The concept of public/private keys can be hard to explain, we will try to go through it in as simple a manner as possible.

Allow me to say this again, for all of you, crypto nerds out there: yes, I know this is a very simplified version of SSH. This is created for all the SSH newbies… mmmmkay?

Essentially, SSH keys are based on public key cryptography. This means you create two keys: one is called the public key, and it is used to encrypt data that only you can decrypt. You can give your public key to anyone, since its only function is to encrypt data - there is not much more you can do with it. The other key is called the PRIVATE key, and it is this key that is used to decrypt data encrypted with the public key.

So far so good… Now, how is this used with SSH?

Whenever you contact a Slackware machine (or any machine running OpenSSH, really) through the SSH protocol, your SSH client (the program, installed on the computer in front of you, that you use to connect) will talk to the SSH server installed on the distant machine. They will determine together the capabilities that they both can use, and the protocol version they should use to communicate securely.

Then, they will try to determine how you (the user) will login on the remote machine. If keys are not used, SSH will usually (but not always) default to asking you a password. On the other hand, if keys are used, the machines are going to use them in the following order:

The SSH server will encrypt a short message (technically a hash value) with your public key and send it to your computer.

Your SSH client will decrypt this message with the private key (whose only copy should be on your computer), and send it back to the SSH server.

The SSH server will then be satisfied that you “are you” so to speak, since you are theoretically the only person able to decrypt the message sent, and will grant you access immediately.

If this all seems a bit complicated, just remember this simple thing: you have a public key and a private key. The public key should be on the computer you want access to, or the “remote” computer. The private key should be on your computer.

Let's go through this process step by step!

Create the public/private key pair

To create a public and a private key, use the OpenSSH ssh-keygen utility. This will automatically generate a key pair, using the default values. Here is a small example:

noryungi@mypc:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/noryungi/.ssh/id_rsa): TEST.rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in TEST.rsa.
Your public key has been saved in TEST.rsa.pub.
The key fingerprint is:
1a:99:51:a6:12:69:53:aa:d8:f6:c2:56:66:6e:68:5a noryungi@udon
The key's randomart image is:
+--[ RSA 2048]----+
|    .o. o        |
|    +o +         |
|   .o.o          |
| o . . +         |
|. + + + S        |
| o B   o         |
|  E + .          |
| = o             |
|.                |
+-----------------+
noryungi@mypc:~$ ls TEST*
TEST.rsa  TEST.rsa.pub

OK, what is going on here? First, ssh-keygen is going to generate a key pair. So far, so good, please make sure you read the ssh-keygen man page[2818] to understand all the options, and there are many of them.

Next, ssh-keygen is going to respond that it is creating the RSA key pair (public and private key). RSA is the name of the encryption algorithm used. There are three such encryption possible: DSA, RSA and ECDSA. Which one is the best is left as an exercice for the reader…

It is then going to ask you where to save the key. Here, TEST.rsa is entered, since there are other keys on the system. Giving a proper name to the key is important, since it makes it much easier to remember which key connects to what.

For instance, if you had an account on a machine named: stang.slackware.com, a good name for the key pair would be stang_slackware_com.rsa or some such.

Next, ssh-keygen asks you for a passphrase. It is always a good idea to enter a passphrase! This allows you to protect your private key, even if it falls into the wrong hands. If you are absolutely, 100% sure that your private key is not going to fall into the wrong hands (how optimistic you are!), just press Enter here.

The rest are just informative messages, and you will note that the key pair has been saved as follows:

The private key is named TEST.rsa.

The public key - the one you want to copy on the remote machine - is named TEST.rsa.pub

Congratulations! You are halfway there!

Configure your public key on the remote computer

All right, now, how to use the public/private key? That's simple enough: copy the public key (named TEST.rsa.pub as we have seen) onto the remote computer. The best way to do this is to use scp the OpenSSH secure copy program. For instance:

noryungi@mypc$ scp TEST.rsa.pub nr@test.example.com:/home/nr/.ssh/authorized_keys

In the example above, I copy the public key TEST.rsa.pub on the remote machine named test.example.com, as user nr. The file is renamed authorized_keys which is the name of the file that contains all the public keys authorized to connect to the server.

A word of caution here: do not execute the scp command above if you already have an authorized_keys file on the remote computer! This will replace the content of the file with your public key!! If you already have an authorized_keys file, execute a cat TEST.rsa.pub » authorized_keys on the remote machine to add your public key at the end of authorized keys.

Since all the SSH keys you use should be placed in the .ssh directory, that's where it goes on the remote machine.

So, are we done? Not really, there is just one small thing to do, but it is truly important, since it is the source of a lot of problems…

Check the public key permissions on the remote machine

Since the private and public keys are very sensitive, they should be protected against prying eyes. To do this, on both the remote and the local machine, enter the following command:

nr@test.example.com$ chmod -R -v g-rwx,o-rwx ./.ssh/
mode of `./.ssh/' changed from 0755 (rwxr-xr-x) to 0700 (rwx------)
mode of `./.ssh/authorized_keys' changed from 0644 (rw-r--r--) to 0600 (rw-------)

This command allows you to make sure nobody (except you and the SSH server) can read the public key.

Please note: if the permissions on the authorized_keys file OR the .ssh directory are not correct OpenSSH won't use the keys! If you have any problem with a public/private key, check the permissions and/or run the above command to make sure they are correct!

Connect using your newly created SSH key

Let's try to connect, back on the local machine, to the remote server named test.example.com:

noryungi@mypc$ ssh -i TEST.rsa nr@test.example.com

Please note that I have entered the option -i right after the ssh command: this option selects the private key to be used to connect, as user nr, to the remote server named test.example.com.

If you have chosen to protect the private key with a passphrase, ssh will ask you this passphrase before connecting. If not… Well, if the permissions are correct (see above), you should see the equivalent of the following:

nr@test.example.com$

That's it! You are connected to a remote machine, without ever entering a password, and with a much better security than with a password - which can be guessed, while a key is way too long to be ever guessed.

What could go wrong at this point?

Well, not much, really, except the possibility that your system administrator does not want you to connect with a public/private key pair…

In which case, let's face it, he is not a very good system administrator. This can be checked, however, with the following command on the remote machine:

nr@test.example.com$ grep -i pubkeyauth /etc/ssh/sshd_config
#PubkeyAuthentication yes

Please note the #PubkeyAuthentication yes line: this is the default value for public key authentication, and, as you can see, it is set to yes. You are good to go and use your key! On the other hand, if you see something like this:

nr@test.example.com$ grep -i pubkeyauth /etc/ssh/sshd_config
PubkeyAuthentication no

Then you are not allowed to connect to the remote machine (test.example.com above) with a public key. Time to contact your system administrator or your security administrator and request politely to be able to use them.

(Yes, there are other, more sneaky, ways to connect without entering a password, but none of them are as secure as a public/private key pair - maybe in another documentation on this wiki?)

You have reached the end of this short documentation - go forth, and use OpenSSH keys!

See Also

The OpenSSH manual pages (online)[2819]

Sources

Originally written by Noryungi[2820]

howtos, security, ssh, sshkeys, author noryungi

BeagleBone Black HowTo

Note this is not how to install Slackware on a BeagleBone Black, this is simply a Slackware version of the BeagleBone getting-started[2821] guide.

This was written using Slackware x86_64 14.2

The flash drive access came up automatically just like in their Step 1

Setting up the USB networking took a couple extra steps though.

Installing Drivers

The driver install is the same as in the Beagle Getting Started guide Step 2

Download, make executable and run mkudevrule.sh[2822]

Next unplug the beaglebone if you plugged it in as specified in their step 1.

I do this to see what network adapters I have before:

root@darkstar:~# ls /sys/class/net
eth0@  lo@  wlan0@

Now plug the USB in and wait a few seconds for the BeagleBone to boot and see what you have:

root@darkstar:~# ls /sys/class/net
eth0@  eth1@  lo@  wlan0@

So now I know the BeagleBone appears on eth1

Here is the only difference from the BeagleBone instructions, I had to manually set the IP and turn eth1 up:

ifconfig eth1 192.168.7.1 up

Now you can open the web browser link as in their step 3

http://192.168.7.2[2823]

Sources

getting-started[2824]

BeagleBone

Slackware as a Xen DomU Guest

Introduction

This document explains how to create a guest virtual machine for a Xen environment using HVM (with PV drivers) virtualisation mode. Such a VM could be used on AWS (Amazon Web Services) or with an on-premise Xen setup but has the added advantage that it will still boot into Desktop virtualisation software like VirtualBox, KVM, VMWare as it uses a conventional MBR. There is no requirement to use Grub and we can stick with the familiar LILO.

Installation

First, we must prepare a Slackware install in a virtual machine. You could always do this in Xen itself, however I'm using VirtualBox because it's easier to setup.

Select at a minimum disk sets A, AP, D, K, L and N sets. Install everything. You can try with less if you like, but this is tested and working.

Make an Initrd

Now we must create an initrd. Any initrd. Yes, that's right it doesn't has to contain any modules just exist.

# cd /boot
# mkinitrd -c

And of course, add it to LILO

image = /boot/vmlinuz
root = /dev/sda1
label = Linux
read-only
initrd = /boot/initrd.gz

UUID Root device

Next, we must setup lilo to boot using the UUID of the root partition instead of the device name (/dev/sda1 etc…)

Run the blkid program to list the UUIDs of the partitions, copy the one that matches the above partition, e.g

# blkid
/dev/sda1: UUID="43b8f058-1f75-4944-af9a-ee33ecc297aa" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="c0baa0b2-01"

Add that UUID into your lilo.conf taking care to quote it correctly (the quotes go around the whole thing!)

image = /boot/vmlinuz
root = "UUID=43b8f058-1f75-4944-af9a-ee33ecc297aa"
label = Linux
read-only
initrd = /boot/initrd.gz

In /etc/fstab, change /dev/sda1 (or whatever your root partition was) in similar way, but you don't need any quotes this time:

UUID=43b8f058-1f75-4944-af9a-ee33ecc297aa     /                ext4        defaults
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro
...

After this you may wish to run lilo, check that your system still boots. All we have done is change the root device specification such that it's in terms of UUID, nothing else. This is explained more fully elsewhere[2825].

Configure the kernel

Get ready to recompile the kernel using the current config as a starting point.

# cd /usr/src/linux
# zcat /proc/config.gz > .config
# make menuconfig

Then select the following kernel options

Processor type
Processor type and features  --->
[*] Linux guest support  --->
[*] Xen guest support                  # sets CONFIG_XEN  and several others.
Device Drivers  --->
[*] PCI support  --->
<*>   Xen PCI Frontend (NEW)                 # sets CONFIG_XEN_PCIDEV_FRONTEND
[*] Block devices  --->
<*>   Xen virtual block device support (NEW)         # sets CONFIG_XEN_BLKDEV_FRONTEND
SCSI device support  --->
[*] SCSI low-level drivers  --->
<*>   XEN SCSI frontend driver        # sets CONFIG_XEN_SCSI_FRONTEND
-*- Network device support  --->
<*>   Xen network device frontend driver (NEW)      # sets CONFIG_XEN_NETDEV_FRONTEND

Those selections should give you the following extra kernel options. You may have more or less depending on your exact kernel version (similar options will work with the stock 14.2 kernel). Make sure you have at least the above five kernel options.

# cat .config | grep XEN | grep =y
CONFIG_XEN=y
CONFIG_XEN_PV=y
CONFIG_XEN_PV_SMP=y
CONFIG_XEN_DOM0=y
CONFIG_XEN_PVHVM=y
CONFIG_XEN_PVHVM_SMP=y
CONFIG_XEN_512GB=y
CONFIG_XEN_SAVE_RESTORE=y
CONFIG_PCI_XEN=y
CONFIG_XEN_PCIDEV_FRONTEND=y
CONFIG_XEN_BLKDEV_FRONTEND=y
CONFIG_XEN_SCSI_FRONTEND=y
CONFIG_XEN_NETDEV_FRONTEND=y
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
CONFIG_HVC_XEN=y
CONFIG_HVC_XEN_FRONTEND=y
CONFIG_XEN_FBDEV_FRONTEND=y
CONFIG_XEN_BALLOON=y
CONFIG_XEN_SCRUB_PAGES_DEFAULT=y
CONFIG_XEN_DEV_EVTCHN=y
CONFIG_XEN_BACKEND=y
CONFIG_XENFS=y
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_PRIVCMD=y
CONFIG_XEN_HAVE_PVMMU=y
CONFIG_XEN_EFI=y
CONFIG_XEN_AUTO_XLATE=y
CONFIG_XEN_ACPI=y
CONFIG_XEN_SYMS=y
CONFIG_XEN_HAVE_VPMU=y

Recompile the kernel

Compile the kernel with

make bzImage

Note we don't need the modules unless you formatted rootfs with some obscure filesystem :).

Test the kernel

Copy the new kernel to /boot, e.g.

cp arch/x86/boot/bzImage /boot/xen

Now create an extra /etc/lilo.conf section for the new kernel. It will be mostly a copy of the other section with the same initrd but different kernel.

image = /boot/xen
root = "UUID=43b8f058-1f75-4944-af9a-ee33ecc297aa"
label = Xen
read-only
initrd = /boot/initrd.gz

run lilo

# lilo
Warning: LBA32 addressing assumed
Added Linux  +  *
Added Xen  +
One warning was issued.

Now test that your system still boots when using the Xen kernel. Nothing much should have changed, but you can now import this virtual machine into a DomU environment, and it should detect and use paravirtualised hardware if available. You'll know if it has succeeded because device node /dev/xvda exists and various files are found in /sys/bus/xen/devices/.

Sources

* Originally written by User Bifferos[2826]

howtos, virtualisation, xen, domu

Fluxbox: Setting Different Wallpapers On Different Workspaces

I've seen several different ways come up with google search but here's the one I like most because it does not require adding anything to fluxbox itself and it's basically entirely documented in the fluxbox-keys man page, I just made a very minor change to match the image numbers with the workspace numbers.

Fluxbox keys has an interesting feature, it has some special “keys” that let you bind events to non-keyboard events. One such event is ChangeWorkspace.

By adding one simple line in ~/fluxbox/keys we can tell fluxbox to change the wallpaper every time the workspace changes. The snag is having it to load a different image for each workspace, but some unixcraft can be used to acheive that:

#This executes fbsetbg every time workspace is changed to loas <workspace number>.jpg from ~/.fluxbox/backgrounds/
ChangeWorkspace :Exec fbsetbg ~/.fluxbox/backgrounds/$(xprop -root _NET_CURRENT_DESKTOP |awk '{print $3+1}').jpg

Then just have numbered jpg images in ~/.fluxbox/backgrounds/

drao@darkstar:~/.fluxbox$ ls -l ~/.fluxbox/backgrounds/?.jpg
-rw-r--r-- 1 drao users 1482678 Feb  9 11:07 /home/drao/.fluxbox/backgrounds/1.jpg
-rw-r--r-- 1 drao users 2220217 Feb  9 11:08 /home/drao/.fluxbox/backgrounds/2.jpg
-rw-r--r-- 1 drao users 1487753 Feb  9 11:15 /home/drao/.fluxbox/backgrounds/3.jpg
-rw-r--r-- 1 drao users 2187858 Feb  9 11:15 /home/drao/.fluxbox/backgrounds/4.jpg
drao@darkstar:~/.fluxbox$

There may be times where at startup no wallpaper is loaded so you might like to add this to ~/.flucbox/init to reload the last wallpaper:

session.screen0.rootCommand: fbsetbg -l

Sources

Originally written by louigi600[2827]

howtos, template

Checking a Slackware Version

To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the /etc/ directory. For this you can run the 'cat' command indicating the input file, or simply open it with your favorite editor.

Slackware Version file

$ cat /etc/slackware-version
Slackware 14.2

The slackware-version file will also be updated if you upgrade your Slackware, since it is part of the “aaa_base” package.

If the slackware-version output is appended by a '+' it means that the system is running the Slackware -current (development) version.

$ cat /etc/slackware-version
Slackware 14.2+

os-release file

The second method is the most complete. There is a file containing a lot of basic system information which is present in practically all Linux distributions. IT was first introduced by systemd.

This file is called os-release and is also located in /etc/. To view it, you can use the same methods as above with the cat command or your favorite editor.

$ cat /etc/os-release
NAME=Slackware
VERSION="14.2"
ID=slackware
VERSION_ID=14.2
PRETTY_NAME="Slackware 14.2"
ANSI_COLOR="0;34"
CPE_NAME="cpe:/o:slackware:slackware_linux:14.2"
HOME_URL="http://slackware.com/"
SUPPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"
BUG_REPORT_URL="http://www.linuxquestions.org/questions/slackware-14/"

There is a lot of very valuable information in this file. This information can be easily used in your Shell script using the source command (also known as the 'dot' command “.”). A very simple example using bash:

$ source /etc/os-release
$ echo "Distribution: $NAME"
Distribution: Slackware
$ echo "Version: $VERSION"
Version: 14.2
$ echo "URL SITE: $HOME_URL"
URL SITE: http://slackware.com/

Unix Way

Or you can use a more UNIX way of handling things using old rice and beans … So you can also collect the necessary data. For this we execute a pipeline command storing the result inside a variable called version as an example.

$ version=$(grep '^VERSION=' /etc/os-release | cut -d '=' -f 2 | sed 's/"//g')
$ echo "$version"
14.2

Sources

Original source: http://slackjeff.com.br/artigos/verificando_versao_slackware.html[2828]

Originally written by Slackjeff[2829]

howtos, misc, slackware version, checking, author slackjeff

Slackware Docker Image Overview

Slackware docker images are available in the docker image registry.
They can be found in hub.docker.com/r/vbatts[2830]

Building the images

You can clone the git repository from github.com/vbatts/slackware-docker[2831]
Currently, using the installer bootstrap, the mkimage-slackware.sh can create an ultra-minimal Slackware filesystem. (does not even include pkgtools)

$ sudo docker -d &
$ make image

And then you'll be able to run

$ sudo docker run -i -t $USER/slackware-base /bin/sh

This will be the environment to build out the Dockerfile from ⁴³⁾

To build alternate versions of slackware, pass gnu-make the RELEASE variable, like:

$ make image RELEASE=slackware64-13.37 IMG_NAME=$HOME/my_slackware:13.37

Running Slackware in Docker

Running the Slackware docker image

$ docker run -i -t vbatts/slackware /bin/sh

Available tags/releases

Currently in the docker registry there are available images for:

Slackware64 13.37

Slackware64 14.0

Slackware64 14.1

Slackware64 14.2

Slackware64 current

Slackware64 latest

Examples

Slackware docker container with slackpkg+ ⁴⁴⁾

FROM vbatts/slackware
# install slackpkg+
# http://ufpr.dl.sourceforge.net/project/slackpkgplus/slackpkg%2B-1.6.1p2-noarch-2mt.txz
# should put the commands in oneline so that the 'rm' command will take effect
RUN wget http://ufpr.dl.sourceforge.net/project/slackpkgplus/slackpkg%2B-1.6.1p2-noarch-2mt.txz && installpkg slackpkg+-1.6.1p2-noarch-2mt.txz && rm slackpkg+-1.6.1p2-noarch-2mt.txz
# add repository: http://packages.slackonly.com/
RUN echo "MIRRORPLUS['slackonly']=http://slackonly.com/pub/packages/current-x86_64/" >> /etc/slackpkg/slackpkgplus.conf
RUN sed -i '/^REPOPLUS/s/)/slackonly )/' /etc/slackpkg/slackpkgplus.conf
# If your dockerfile based on this one, please add the following two commands
# RUN slackpkg update gpg
# RUN slackpkg update

Slackware docker container with nginx ⁴⁵⁾

FROM vbatts/slackware:current
MAINTAINER josemrb <work@josemrb.com>
# update slackpg
RUN slackpkg update
# install dependencies
RUN \
slackpkg -batch=on -default_answer=y install sasl rsync-* glibc-* perl && \
slackpkg -batch=on -default_answer=y install autoconf automake binutils gettext-tools intltool kernel-headers libtool m4 make libmpc gcc-[0-9] gcc-g[+] && \
slackpkg -batch=on -default_answer=y install pcre zlib libxslt libxml2 shadow
# update sbopkg and build
RUN \
mkdir -p /tmp/install && cd /tmp/install && \
wget -c http://sbopkg.googlecode.com/files/sbopkg-0.37.0-noarch-1_cng.tgz && \
installpkg sbopkg-0.37.0-noarch-1_cng.tgz && \
mkdir -p /var/lib/sbopkg/SBo/14.1 && \
mkdir -p /var/lib/sbopkg/queues && \
mkdir -p /var/cache/sbopkg && \
mkdir -p /var/log/sbopkg && \
mkdir -p /tmp/SBo && \
sbopkg -r && \
sbopkg -B -i sbotools && \
sbosnap fetch && \
sboinstall -r GeoIP && \
groupadd -g 8080 www-data && \
useradd -g 8080 -u 8080 -M -s /bin/false www-data && \
USE_GEOIP=yes NGINXUSER=www-data NGINXGROUP=www-data sboinstall -r nginx && \
chown -R www-data:www-data /var/lib/nginx
# update script | add exec | run in foreground
RUN \
chmod +x /etc/rc.d/rc.nginx
# copy config file
COPY ./nginx.conf /etc/nginx/nginx.conf
# define mountable directories
VOLUME ["/etc/nginx", "/etc/nginx/conf.d", "/var/lib/nginx"]
# set port
EXPOSE 80
# start server
ENTRYPOINT /etc/rc.d/rc.nginx start

Note that this dockerfile expects an nginx.conf in the local directory.

Sources

* Originally written by lamerix[2835]
* Based on Vincent Batts's github README github.com/vbatts/slackware-docker[2836]
* Docker registry page hub.docker.com/r/vbatts/slackware[2837]

howtos, docker, image, author lamerix

⁴³⁾

see http://docs.docker.com/reference/builder/[2832] for more info on that

⁴⁴⁾

File from https://github.com/lotabout/docker-slackware/blob/master/slackware-slackpkgplus/Dockerfile[2833]

⁴⁵⁾

File from https://github.com/josemrb/docker-slackware/blob/develop/nginx/Dockerfile[2834]

Slackware as a VMWare Guest

Introduction

These instructions apply to ESXi 5.5. It's highly likely they also apply to other versions of VMWare, unfortunately you have a lot to choose from taking into account Workstation, Fusion and even Player and I can't test them all. These instructions refer to Slackware 64-bit 14.2 as the guest, and assume Fluxbox WM.

VM Creation Options

Creating a virtual machine is pretty standard. If you want you can choose VMXNET3 as network interface card because Slackware supports that out of the box, and should give about 15% performance boost in some workloads. Alternatively you can play it safe and just use e1000. Don't choose paravirtualised disk controller which is often 'helpfully' selected by default for Linux: either SATA or LSI Logic SAS should work fine.

Guest Additions Install

Install of VMWare tools doesn't work without some fiddling. First of all, eject the virtual CD-ROM by (as root) typing:

# eject

Now you can 'Install VMWare tools' in the ESXi management interface. This will simply 'insert' the CD with the software, because Slackware won't auto-run anything unless you've set that up.

# mount /dev/dvd /mnt/dvd
# cd /usr/src
# tar xvf /mnt/dvd/vmware-tools-distrib.tar.gz

You may find the file is called something other than vmware-tools-distrib.tar.gz, there should only be one tarball.

Before we do anything else, we have one little patch to apply. Save this to a file called /usr/src/vmware.patch:

diff --git a/bin/vmware-config-tools.pl b/bin/vmware-config-tools.pl
index 9f64614..e14cb0d 100755
--- a/bin/vmware-config-tools.pl
+++ b/bin/vmware-config-tools.pl
@@ -4162,7 +4162,7 @@ sub setup32or64Symlinks {
# Install a pam.d vmtoolsd file on all but Solaris.
if (vmware_product() ne 'tools-for-solaris' && ($open_vm_compat == 0)) {
-     install_symlink($pamdfile, '/etc/pam.d/vmtoolsd');
+#     install_symlink($pamdfile, '/etc/pam.d/vmtoolsd');
}
if (vmware_product() eq 'tools-for-linux') {

Now patch the source:

# cd vmware-tools-distrib
# patch -p1 < ../vmware.patch

And finally run the installer:

bash-4.3# ./vmware-install.pl
warning: Generating 12 missing index(es), please wait...
Creating a new VMware Tools installer database using the tar4 format.
Installing VMware Tools.
In which directory do you want to install the binary files?
[/usr/bin]
What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc/rc.d]
What is the directory that contains the init scripts?
[/etc/rc.d/init.d]
In which directory do you want to install the daemon files?
[/usr/sbin]
In which directory do you want to install the library files?
[/usr/lib/vmware-tools]
The path "/usr/lib/vmware-tools" does not exist currently. This program is
going to create it, including needed parent directories. Is this what you want?
[yes]
In which directory do you want to install the common agent library files?
[/usr/lib]
In which directory do you want to install the common agent transient files?
[/var/lib]
In which directory do you want to install the documentation files?
[/usr/share/doc/vmware-tools]
The path "/usr/share/doc/vmware-tools" does not exist currently. This program
is going to create it, including needed parent directories. Is this what you
want? [yes]
The installation of VMware Tools 10.0.9 build-3917699 for Linux completed
successfully. You can decide to remove this software from your system at any
time by invoking the following command: "/usr/bin/vmware-uninstall-tools.pl".
Before running VMware Tools for the first time, you need to configure it by
invoking the following command: "/usr/bin/vmware-config-tools.pl". Do you want
this program to invoke the command for you now? [yes]
Initializing...
Making sure services for VMware Tools are stopped.
Stopping VMware Tools services in the virtual machine:
Guest operating system daemon:[ OK ]
VMware User Agent (vmware-user):[ OK ]
Unmounting HGFS shares:[ OK ]
Guest filesystem driver:[ OK ]
sh: : command not found
The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer.
The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer.
The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer.
The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer.
The VMware Host-Guest Filesystem allows for shared folders between the host OS
and the guest OS in a Fusion or Workstation virtual environment.  Do you wish
to enable this feature? [no] yes
The vmxnet driver is no longer supported on kernels 3.3 and greater. Please
upgrade to a newer virtual NIC. (e.g., vmxnet3 or e1000e)
The vmblock enables dragging or copying files between host and guest in a
Fusion or Workstation virtual environment.  Do you wish to enable this feature?
[no] yes
VMware automatic kernel modules enables automatic building and installation of
VMware kernel modules at boot that are not already present. This feature can
be enabled/disabled by re-running vmware-config-tools.pl.
Would you like to enable VMware automatic kernel modules?
[no]
Disabling timer-based audio scheduling in pulseaudio.
Do you want to enable Guest Authentication (vgauth)? Enabling vgauth is needed
if you want to enable Common Agent (caf). [yes]
Do you want to enable Common Agent (caf)? [yes]
Detected X server version 1.18.3
Distribution provided drivers for Xorg X server are used.
Skipping X configuration because X drivers are not included.
Creating a new initrd boot image for the kernel.
Nothing found at location /boot/initrd-tree, so we will create an
initrd directory structure there... done.
Now cd to /boot/initrd-tree and install some modules in your
module directory (lib/modules/4.4.14).  Then see init
for more information (there are a few other files to edit).
Finally, run mkinitrd again once the initrd-tree is ready,
and /boot/initrd.gz will be created from it.
Generating the key and certificate files.
Successfully generated the key and certificate files.
Checking acpi hot plug[ OK ]
Starting VMware Tools services in the virtual machine:
Switching to guest configuration:[ OK ]
Guest operating system daemon:[ OK ]
VGAuthService:[ OK ]
Common Agent:[ OK ]
The configuration of VMware Tools 10.0.9 build-3917699 for Linux for this
running kernel completed successfully.
You must restart your X session before any mouse or graphics changes take
effect.
You can now run VMware Tools by invoking "/usr/bin/vmware-toolbox-cmd" from the
command line.
To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.
Enjoy,
--the VMware team
Found VMware Tools CDROM mounted at /mnt/dvd. Ejecting device /dev/sr0 ...
bash-4.3#

I've enabled only two options that are by default disabled: Host-Guest Filesystem and vmblock. All other options are as per the default. I've included the complete typescript so you can compare with your own execution.

Guest Additions Configuration

Display

By this point, if you are in X, you won't see much effect from VMWare Tools. The first thing to do is run:

# vmware-user

Your display may flicker somewhat. In fact your display may end up being complete garbage. If it does, try to re-size the display window. It should then correct itself and you'll then find the X screen resizes appropriately as you change it's dimensions. You probably want to add vmware-user somewhere to start on login or when your X session starts.

Clipboard

At this point, copying between host and guest clipboards has been enabled, however with ESXi you may find it hasn't been configured at the Virtual Machine level. Follow the VMWare instructions[2957] to get it enabled.

Sources

* Originally written by User bifferos[2958]

howtos, vmware, virtualisation, emulation

Virtualisation Section

SSH on TOR

One may find many methods how one may tunnel SSH inside TOR on the Internet, but this is my preferred method as it is the least intrusive.

1. Download connect

$ cd /tmp/
$ hg clone https://bitbucket.org/gotoh/connect

2. Archive the source

$ tar cvf connect.tar connect/

3. Compile and install connect

$ cd connect/
$ make
$ su -
# cd /tmp/connect/
# cp -r doc/ /usr/local/share/connect/
# cp connect /usr/local/bin/
# cp /tmp/connect.tar /usr/src/

4. Start TOR

Install Tor and optionally also Vidalia. Slackbuilds for these two applications may be found in http://slackbuilds.org[2840].

Start Tor from Vidalia or from the CLI:

# sh /etc/rc.d/rc.tor start
# exit

5. Connect from SSH over TOR

$ ssh -p <SSH_SERVER_PORT> <SSH_SERVER_URL_OR_IP> -o ProxyCommand="connect -4 -S localhost:9050 %h %p"

If the SSH server uses the default port 22, then you do need to enter the -p <SSH_SERVER_PORT>, otherwise enter the appropriate port. Then also enter the correct SSH server URL or IP in the indicated field

6. Sources

* Original source: https://www.antagonism.org/anon/ssh-tor.shtml[2841]

Web Dev primarily HTML and PHP

I'm going to give an overview of web development for users of Slackware.It's going to be from the perspective of approaches for a budding web developer who uses Slackware, the problems you might face due to using Slackware Linux and an eclectic look at what tools are available to help you, starting simplest first.

There will be some embedded information on HTML and PHP, what they do and what they do not do. I will probably throw in some anecdotal info from my experience.

Structure of HTML & PHP

HTML evolved from a need to easily share digital documents between researchers working at CERN (Conseil Européen pour la Recherche Nucléaire). Lets have a look at a HTML document as it used today 2020:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>  </title>
</head>
<body>
<h1>Hello World  </h1>
</body>
</html>

If you're good at geometric progressions, you will straight away see common re-occurring elements <> and </>; HTML is not programming code but merely about how things should be presented or markup. Its a web browser that does the interpretation of the tags and then presents the content according to the markup.

<> designates the start of markup and </> the end of the markup. The file is conveniently organized into head and body areas and the whole text wrapped by which indicates start of a HTML document and by which indicates a HTML document has come to an end.

So as a developer, you have two perspectives working with HTML; the text if the file is opened with a text editor and how it looks after a web browser has digested what's written and then presented it (also called has rendered document).

HTML is not the only text document that has associated with it instructions of how it should look. When you use a word processor like LibreOffice you see the text as you type, but behind the scenes the text has associated with it instructions such as font type, font size, and so on. For this reason, never use a word processor when constructing HTML documents, since you will have to edit out the accessory info.

There are many alternatives to working with HTML documents using a text editor, but as good as any in my opinion is geany available from slackbuilds.org[2842].It has basic text highlighting and gets the job done.

Using Built in PHP dev Server to render HTML

Now, if we were working with geany and saved the above text as a file say index.html to your Desktop, you then have two choices; open and edit with a text editor or open it as intended with a web browser. If you do that, all you will see is “hello world”.

You could, if you want, have several thousand files on your Desktop and right click each one with the mouse to look at them. That's rather inconvenient and making poor use of a web browser. Inside let's organize things and put files together in a directory on the Desktop; let's call it webPlay.

So, this is what we now have on our Desktop:

webPlay
└── index.html

We only have one file at the moment in our directory ; we could put 1000's in that single directory and right click to open each with a web browser. When Tim Berners-Lee came up with the idea of HTML (hypertext markup language), he also had a vision of an architecture of how researchers at one institute would request a document “get” it and view it.

Software that can be leveraged to make things convenient involves being able to “listen” to requests made by a browser and to respond to that request or, to put it another way, deliver the document.

We can make use of the basics of the system utilizing what's referred to as the built in PHP development server. PHP, which we will discuss later, are other files that are processed by web architecture. The important point is that it is more than capable of working with HTML as well.

The key thing about web development is that if you have the means to get the basics up and running then you can progress.

So, a few things to mention; PHP is included with a standard Slackware installation; like everything else nothing stays still and the version of PHP is associated with the version of Slackware you have. We can find that out by opening a Terminal Emulator. I use XfCE, so all I have to do is left click the terminal Emulator icon bottom of screen.

At the prompt, I type as follows:

bash-5.0$ php -v
PHP 7.4.1 (cli) (built: Dec 19 2019 00:29:31) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.1, Copyright (c), by Zend Technologies
bash-5.0$

So, I have PHP version 7.4.1 available, which is very useful since most modern web software like CodeIgniter require PHP 7 and above as stated on the documentation of CodeIgniter4. That version of PHP came with Slackware -current which I upgraded to early last year (5.4.12) - a very good vintage!

Let's fire up the dev server and “point it” to where our HTML files are:

bash-5.0$ cd Desktop
bash-5.0$ pwd
/home/andrew/Desktop
bash-5.0$ php -S localhost:8080 -t webPlay
[Sun Nov 15 14:23:18 2020] PHP 7.4.1 Development Server (http://localhost:8080) started

When I open up the Terminal Emulator, it opens with the “context” that it is at ~ i.e home

So, I change directory to Desktop, because that's where my directory containing my HTML file is. I also tell PHP, via the terminal, that I would like to use localhost and port 8080.

If I now open up any web browser and type into the “address bar” (the address bar is NOT the text box where you search for stuff, a la Google but the thin top text space) http://localhost:8080[2843], I wonder what we will see?

Well it's 2 words: hello world

How did that work? I didn't stipulate any file name. Well, we called our HTML document index.html; the suffix designates that it is an HTML file and index is significant as well. Web server software is configured to look for files to open as a starting point that are called index.php or index.html.

To put it another way, index.html is the default file that the PHP dev server will look for and render, so we didn't have to state the filename specifically. You would get the same result with:

 http://localhost:8080/index.html

A single index.html is about as simple as you can get; if you uploaded it say via cPanel on hosting, and then you pointed your website domain to your hosting, as instructed by your hosting company then you will have a simple, but working one page web site.

More sophisticated web systems such as WordPress still have somewhere within them one or more index.php (with WP its located at the web root). In these cases, the index.php file is often referred to as the “bootstrap” not to be confused with front-end Twitter Bootstrap.

Before we move on to PHP let's have a last look at HTML and how to link one page to another. Go to geany →file→new with template→file_html5.html. That produces a ready made html5 template. All you have to do is name it and save it somewhere. Save it to /Desktop/webPlay as about_me.html.

Open it up and in the <body> </body> write a few words. Now let's see how we can link our index.html to it.

In index.html I have added a line starting <a href

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>  </title>
</head>
<body>
<h1>hello World</h1>
<a href ="about_me.html">link to about me  </a>
</body
</html>

Now, in your web browser, re-fresh to http://localhost:8080/[2844]

Click on the line that says about_me and you will see that the HTML document about_me.html is now rendered. You now have the basis for a few pages on your web site. Some will pooh-pooh this, but it's better than the option of no web site, if you are a small business. Without a web site in today's world, you can't be found.

Making use of HTML presentation but with PHP functionality

HTML documents are fine. Their purpose is to display content as you intend. Nothing changes unless you edit them live via your hosting cPanel, or you edit them local and upload via cPanel with “overwrite all” clicked. Thus, HTML pages are often referred to as “static” pages. Now lets have a look at PHP still using dev inbuilt server, for now, and still using directory webPlay.

Open a terminal Emulator and change directory (cd) to webPlay.

Type this code:

mv index.html index.php

What the code does is rename index.html to index.php Refresh the browser and what do you see? Exactly the same. So what's the difference? Well, PHP documents use HTML layout, but the .php suffix tells web servers and our built in dev server that, due to the suffix, look out for, and process any PHP code within the documents.

Let's do a quick example:

type <?php echo phpinfo(); ?> somewhere within the body tags eg:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>  </title>
</head>
<body>
<h1>hello World</h1>
<a href ="about_me.html">link to about me  </a>
<?php echo phpinfo();?>
</body
</html>

Refresh your browser and now what do you see? Quite a lot of information concerning PHP! When I first did this it demonstrated the potential of PHP.

Introducing Databases into the mix

Next we will have a simple look at using a database.When you mention anything about databases most people immediately think MySQl or Maria;so you can't do anything with a database on your Desktop since you need a daemon. Well actually you can since sqlite3 is server-less. Assuming our Terminal Emulator is in webPlay lets create a database from the command line. Actually lets first check we have the tools in place:

bash-5.0$ ls /var/log/packages | grep sqlite
sqlite-3.30.1-x86_64-1
//yes we are in luck !

 bash-5.0$ sqlite3 myDatabase.db

The above line will create an sqlite3 database file and then it will go to the sqlite prompt i.e

sqlite>
//using the sqlite prompt lets confirm our database was created:
sqlite> .databases
main: /home/andrew/Desktop/webPlay/myDatabase.db
sqlite> .exit

The command line is all well and good but sometimes a gui is a better approach.We could install a table, then populate but instead why not make use of sqlitebrowser in my case i have sqlitebrowser-3.9.1-x86_64-2_SBo

To fire that up from a command line just type “sqlitebrowser”.

With sqlitebrowser its just a case of using file open and navigating to where the database is, its quite intuitive and from the image you can see that a table can be created, with fields and even data typed into the fields. We will just populate with a couple of entries for demonstration. Probably the only two things you have to remember when typing in is “apply” and then finally “write changes”. Also notice i have a table with a field called “Id” which is primary key and auto increment.

Now back to out index.php file.

Take out the php function phpinfo() and add the following :

<?php
$db = new SQLite3('myDatabase.db');
$res = $db->query('SELECT * FROM products');
while ($row = $res->fetchArray())
{
echo "{$row['Name']} {$row['Price']} <br>";
}
$db->close();
?>

So your index.php should now look like:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title> connect to db example </title>
</head>
<body>
<h1>hello World</h1>
<br>
<a href ="about_me.html">link to about me  </a>
<br>
<?php
$db = new SQLite3('myDatabase.db');
$res = $db->query('SELECT * FROM products');
while ($row = $res->fetchArray())
{
echo "{$row['Name']} {$row['Price']} <br>";
}
$db->close();
?>
</body
</html>

if you refresh your browser this is what you should see.

Now lets have a look at the code :

$db = new SQLite3('myDatabase.db'); //this gives us a connection to our database file
$res = $db->query('SELECT * FROM products'); //this is a simple sql query of selecting all entries in the table products
while ($row = $res->fetchArray() //this is a run through of an array

So here we just did a retrieval of data; its one small step from there to insert, update all part of what is referred to as “crud” operations. HTML files are just static files that have markup on how the static content is presented. php on the other hand is a rich fully functional programming language that you can either use in an OOP way. In other words create classes which have methods or in a procedural way.

A couple of other things to mention PHP, is a scripting language; an “engine” such as Zend processes the code, then renders output to the browser.

So what i have demonstrated here is that you can go a long way developing PHP on your Desktop.You may have noticed that no mention was made of the word chmod nor permissions. Everything we did was in user space, so you don't have to worry about that. With files located in our user space we have both read and write permissions to them. I mention it here, since later that's going to be a problem when we look at xampp and apache, which is another approach for working with web development.

PHP framework

Before we look at xampp and apache i'm going to mention composer composer [2845]

When your working with single HTML or PHP files, you will find you the need to update them that's not too much of a problem. When you work with more complicated web applications say CodeIgniter, new releases come out and then you have 3rd party software installed as well which have dependencies.Things can soon get out of hand. The use of composer helps updating and managing dependencies.

I've used it in 2 ways.

1)Download composer.phar to Desktop. Give it 777 permissions via su→# chmod 777 composer.php Then move it to /usr/local/bin and rename it via: # mv composer.phar /usr/local/bin/composer

I found when you at a terminal Emulator run command “composer” its up and running

2)I noticed its available on slackbuilds, so you can run the slackbuild and install the _SBo;looking at the slackbuild it seems to work in a similar way, putting composer in /usr/bin and also renames composer.phar to composer.

Now that we have composer working lets use it, to download a php framework to our Desktop.Later we will move it.

$ cd Desktop
bash-5.0$ composer create-project codeigniter4/appstarter CI4 --no-dev

In the above,the first word “composer” composer invokes the binary; “codeigniter4/appstarter” is a key pair of words that you will see on Packagist[2846] and CI4 is the name i want of the directory to be called which will contain CodeIgniter. This is the structure i get after issuing the command:

CI4
├── README.md
├── app
├── builds
├── composer.json
├── composer.lock
├── env
├── license.txt
├── phpunit.xml.dist
├── public
├── spark
├── tests
├── vendor
└── writable

Its quite compact and by using –no-dev I told composer not to download extras like Kint. Now codeigniter inside it spark which we can use to fire up the framework:

bash-5.0$ php spark serve
CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2020-11-17 08:45:01am
CodeIgniter development server started on http://localhost:8080
Press Control-C to stop.
[Tue Nov 17 14:45:01 2020] PHP 7.4.1 Development Server (http://localhost:8080) started

A little bit about PHP frameworks. A few HTML or PHP files is ok for a small website but PHP frameworks come in handy where you are going to do a lot of work with data. Frameworks have a design of logic that splits what you see, what does the processing, and what connects to database into whats called MVC (model,view,controller).

PHP built in server or using spark have their limitations; if you insist on wanting to use MySQl or Maria then you have to consider something like xampp or apache.

Now xampp from apachefriends xampp [2847]is basically a bundled unit of a web server and supporting files.

It comes with an installer and I have previously tried it on Slackware. Although it comes with an installer it is not installed on your system but is put in /opt and the way i view it is that it is an “embedded system” .

There are pro's and cons. Its doesn't use your system PHP as far as i understand it, so your own PHP might be more up to date than xampp, then there are issues like updating. From my limited understanding a web server does not come as default with other distros, so for them they have the choice: should I install apache or give xampp a go, maybe thinking at least I won't bork my system- its quite understandable.

Setting up a Development Environment using Apache

In slackware however, as default you should find a directory:

 htdocs at   /var/www/htdocs/

Thats where we are now going to move our CI4 to. I must at this point put in a disclaimer that I'm writing from my experience of getting things going. I have for a few months been writing a light C.M.S system on top of CodeIgniter 4.0.4; I've had no glitches, no crashes or anything else detrimental- so I'm assuming from empirical observation I must have half a clue- others might point out how it could be bettered.

Ok this is one way I use CodeIgniter in apache:

First we are going to our Desktop to zip up CI4 and them move it to /var/www/htdocs.

cd Desktop
bash-5.0$ zip -r CI4.zip CI4
//now we move it to /var/www/htdocs
su->password->#
# mv CI4.zip /var/www/htdocs

Approach To permission problems

Now i will talk generally about problems with permissions for developers. For those coming from Windows,who have done web development they get a bit of a shock when they move to Linux. As a “normal user” you don't have any authority to do any editing of code of a web app directory located within htdocs located at /var/www/htdocs . That's because they are within your root system.

Now this is where perhaps the bone of contention sets in;you want to get on editing and developing but you don't want to mess your system up either.You could do su→password→# i.e shift to root but that wouldn't be a good idea, when all sorts of strange things could happen. With root permission you could delete or edit something you didn't want to do. So whats the answer? Well there are a few approaches.

First lets have a look at httpd.conf

bash-5.0$ cat --number /etc/httpd/httpd.conf
// on line 192 and 193 i see:
192	User apache
193	Group apache
535	# Uncomment the following line to enable PHP:
536	#
537	Include /etc/httpd/mod_php.conf
//so on line 537 remove the # in front of Include /etc/httpd/mod_php.conf like I have
//you will have to fire up a editor to do that - nano is simple to use.
//just remember with nano ^ means ctrl key, so usually its change then ctrl + o,  ctrl + x

So we have seen thats its stating there is a owner called apache. You can use that and add yourself to the group.

// I'm going to add myself to the apache group (my user name is andrew)
# usermod -a -G apache andrew
//next cd to /var/www/htdocs
# cd /var/www/htdocs
# unzip CI4.zip
# chown apache:apache CI4  -R
# chmod 775 CI4  -R
# cd CI4
# chmod 777 writable -R
// writable directory needs   777 permissions.

A note on file and directory permission: on a live server directories normally have 755 permissions and files 644. The “execute bit is needed on a directory in order for something to enter a directory.

We are on our own system so we don't have to rigidly stick to that. Here is another approach: As a normal user I am part of users. You can see that when you run the code:

$ groups

So I will use the approach of leaving apache the owner but having the group set to “users”. Then I will endeavor to set directories to 755 and file permissions to 664 which should be Ok for our web dev purposes.

cd /var/www/htdocs
su->password->#
# chown apache:users CI4 -R
# cd CI4
find . -type d  | xargs chmod 775
find . -type f  | xargs chmod 664

Before i forget,a quick mention on databases.Most people or so it seems, just jump to MySQl and might quote its secure, since in the code to connect to the database it uses a database user name and password; grant all permissions and all that stuff. Well WordPress uses MySQl and has a table where it stores users, called wp_users; i have WP on local host and so not giving away any secrets when I show you my local WP ;it looks like this:

Its an extract of how WP uses Sqlite (yes you can opt for sqlite instead with WP) WordPress seems to be poorly written and a word of warning; in a default install its possible to display user login credentials via a simple get request to the domain!So the security of connecting to a database adds nothing to the security of your user credentials with WP

With CodeIgniter4 for security, everything accessible via the web is inside the public directory. Sqlite has a capacity of 281 Terra Bytes which should be enough for most web sites. So I will not be talking about setting up MySQl next, only how to get the httpd daemon going and set up virtual host so that we can view our app from an Ip of choice

We are going to edit /etc/httpd/extra/httpd-vhosts.conf , nano editor is as good as any for this purpose I have nano-4.7-x86_64-1 .You can check yours via:

bash-5.0$ ls /var/log/packages | grep nano

WE need root permissions so its :

# nano /etc/httpd/extra/httpd-vhosts.conf

I typed into :

<VirtualHost 127.0.0.9:80>
CustomLog "/var/log/httpd/CI4-error_log" common
<Directory "/var/www/htdocs/CI4">
Order allow,deny
Allow from All
AllowOverride All
Require all granted
</Directory>
ServerName CI4.org
ServerAlias CI4.0rg
DocumentRoot "/var/www/htdocs/CI4/public"
</VirtualHost>

you can check with :

# apachectl
httpd: Syntax error on line 506 of /etc/httpd/httpd.conf: Syntax error on line 137 of /etc/httpd/extra/httpd-vhosts.conf: /etc/httpd/extra/httpd-vhosts.conf:137: <VirtualHost> was not closed.
//i fixed that

Two things really to look at in the virtual host config:

<VirtualHost 127.0.0.9:80>
//what im doing here is that because i'm very lazy i just want to type 127.0.0.9 in web browser address bar to see  framework
DocumentRoot "/var/www/htdocs/CI4/public"
//the web root of codeigniter is the public directory so we set it up for apache to listen for requests at that directory

Next we will fire up apache daemon

# chmod a+x /etc/rc.d/rc.httpd
# /etc/rc.d/rc.httpd start

next lets check we can edit framework as normal user:

$ cd /var/www/htdocs/CI4/app/Views/
// next right click on welcome_message.php open with geany and edit

Note the 127.0.0.9 in address bar and that I can now work with framework and edit as user andrew , without risk of messing up system as root. If you follow this through and you get a problem its probably either your php version is < than 7.3 or I did something somewhere forgot about it and forgot to mention .

Sources

Originally written by captain_sensible[2848]

howtos

Linux HOWTOs

The Linux HOWTOs are a collection of documents which cover specific subjects related to GNU/Linux. Most Linux HOWTOs are not tailored to a specific distribution, therefore they are very useful for Slackware Linux users. The linux- howtos package in the “f” software set contains the HOWTO collection. After installing this package the HOWTOs are available from the /usr/doc/Linux-HOWTOs/ directory. Slackware Linux also contains a small collection of Linux-related FAQs (FAQs are documents that answer Frequently Asked Questions). The Linux FAQs are installed to the /usr/doc/Linux-FAQs/ directory, and are available from the linux-faqs package, which is also part of the “f” software set.

The /usr/doc/Linux-HOWTOs/ directory is large - the file /usr/doc/Linux-HOWTOs/HOWTO-INDEX is an excellent guide.

howtos, author etech3

How to run OpenXenManager On Slackware

( known to work with Slackware64 14.2)

1) Install Python from Slackware packages.
2) Install pygtk from Slackware packages (not needed for -current)
3) Install configobj from Slackbuilds.
4) Install gtk-vnc from Slackbuilds, use version 0.7.0, and get the corresponding slackbuild from git.

5) Download and unzip OpenXenManager (from: https://github.com/OpenXenManager/openxenmanager/archive/master.zip[2849] )
6) cd into the unzipped openxenmanager directory.
7) run ./openxenmanager

Note: This does *not* work with the latest XCP-ng (fails to connect). Version 7 seems OK.

Sources

* Original source: https://github.com/OpenXenManager/openxenmanager[2850]
* Originally written by arfon[2851]

howtos, software, virtualization, xen, openxenmanager, Slackware 14.2

Proxying Emails to Your Local Mail Relay Server

There may be times where you may need to send emails from a machine, that can not do so directly nor thought your local SMTP relay and you have no easy way out for mending the causes. Let's examine some scenarios that would allow you to work around the problem.

As far as I know SMTP protocol does not support proxy itself but I can think of several ways to work around the problem. Here are some scenarios with examples on how you could go about working around the problem.

Throughout the scenarios we will be referring to 3 machines:

Machine A with IP address 192.168.0.2 (cannot send mails directly via internet and cannot relay on Local Mail Relay)

Machine B with IP address 192.168.1.2

Local Mail Relay (LMR) with IP address 192.168.2.2

Scenario 1

Machine A cannot relay on any local or internet MTA

Machine A can reach Machine B on some unused port (1234 in the example below)

Machine B can relay thought LMR

Machine B can reach LMR's port 25

We can use nc on Machine B to proxy mail from A to LMR. In this example it will appear to LMR as if it was Machine B that is sending the email.

On machine B

mkfifo /tmp/f
nc -l  -p 1234 -s 192.168.1.2 < /tmp/f |nc 192.168.2.2 25 >> /tmp/f

The above command is a dirty way to get the output from LMR back to A. See NOTES below if it is not clear to you how it works.

On machine A

telnet 192.168.1.2 1234
Trying 192.168.1.2 ...
Connected to 192.168.1.2.
Escape character is '^]'.
220 smtp.localnet.com ESMTP Postfix
helo cicciobello
250 smtp.localnet.co
MAIL FROM:me@localnet.com
250 2.1.0 Ok
RCPT TO:dude@localnet.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
FROM:me@localnet.com
TO:dude@localnet.com
SUBJECT:test sending email from A trough B into smtp.localnet.com
If you get this it works.
.
250 2.0.0 Ok: queued as 1B1189AC
quit
221 2.0.0 Bye
exit
Connection closed by foreign host.

Scenario 2

Machine A cannot reach LMR's port 25

Machine A is allowed to relay thought LMR but firewall is preventing it from reaching port 25 on LMR

Machine A can reach the LMR but only on port 22.

We use a ssh tunnel between A and LMR to do the job for us. In this example we are bypassing firewall by using ssh to forward traffic trough a encrypted tunnel. For this to work properly the ssh client that is going to be forwarding needs to be executed by an administrative account.

This time we will be working exclusively on machine A

ssh -2 -D localhost:1024 -N  192.168.2.2 &
curl telnet://smtp.localnet.com:25 -p --socks4 localhost:1024
220 merak.invallee.it ESMTP Postfix
helo testme
250 smtp.localnet.co
MAIL FROM:me@localnet.com
250 2.1.0 Ok
RCPT TO:dude@localnet.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
FROM:me@localnet.com
TO:dude@localnet.com
SUBJECT:test using ssh tunnel
if you get this sending email trough ssh tunnel worked
.
250 2.0.0 Ok: queued as 29C549A7
quit
221 2.0.0 Bye
exit

Scenario 3

Machine B can relay emails trough LMR

Machine B cannot reach LMR's port 25

Machine B can access LMR via ssh

Machine A has access to Machine B on whatever port we choose to let ssh listen on for forwarding (1024 in the exaple).

This is a bit like Scenario 1 but we will be using ssh to forward stuff to LMR and Machine B needs not be able to reach LMR's port 25

We can then start the ssh socks proxy on Machine B listening on a port Machine A can access:

On machine B with a privileged user

ssh -2 -D 192.168.1.2:1024 -N  192.168.2.2 &

On machine A

curl telnet://smtp.localnet.com:25 -p --socks4 192.168.1.2:1024
220 merak.invallee.it ESMTP Postfix
helo testme
250 smtp.localnet.co
MAIL FROM:me@localnet.com
250 2.1.0 Ok
RCPT TO:dude@localnet.com
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
FROM:me@localnet.com
TO:dude@localnet.com
SUBJECT:test using ssh tunnel
if you get this sending email trough ssh tunnel worked
.
250 2.0.0 Ok: queued as 29C549A7
quit
221 2.0.0 Bye
exit

Scenario 4

Machine A cannot reach LMR's port 25

Machine A is not allowed to relay thought LMR

Machine A cannot proxy on any other machine that is allowed to relay trough LMR

Machine A can reach the LMR but only on port 22.

We can still get the whole command to run on the LMR via ssh:

This time we will be working exclusively on machine A

cat << EOF > send_this_mail
echo "helo testme
MAIL FROM:me@localnet.com
RCPT TO:dude@localnet.com
DATA
FROM:me@localnet.com
TO:dude@localnet.com
SUBJECT:test using ssh on remote server
it worked
.
quit
exit
" | curl telnet://localhost:25
EOF
cat send_this_mail |ssh 192.168.2.2

NOTES

The command we used in Scenario 1 is probably a good example of bad unixcraft, let me give a brief explanation on how it works. Let's momentarely get rid of the odd use of the fifo by just using this:

nc -l -p 1234 -s 192.168.1.2 | nc 192.168.2.2 25

If we repeat rest of Senario 1 we would see the output from LMR's MTA show up on Machine B and no feedback at all making it to Machine A. What we want to do is feed the output of “nc 192.168.2.2 25” (that connects to LMR) back into the nc that is in listening mode so that it can make it back to Machine A. The pipe itself is not bidirectional so we need some unixcraft to work around the problem: we create a fifo and have the output of “nc 192.168.2.2 25” fed into it

nc 192.168.2.2 25 >> /tmp/f

and we feed the other end of the fifo into the other nc that is listening

cat /tmp/f | nc -l -p 1234 -s 192.168.1.2

so now the whole command line looks like this:

cat /tmp/f | nc -l -p 1234 -s 192.168.1.2 | nc 192.168.2.2 25 >> /tmp/f

it is possible to do the same thing without having to use cat, it is a little neater but still bad unixcraft

nc -l  -p 1234 -s 192.168.1.2 < /tmp/f |nc 192.168.2.2 25 >> /tmp/f

Sources

Originally written by Louigi600[2852]

howtos, SMTP, proxy

How to connect mysql client over SSH tunnel to Mariadb server

For setting up your working Mariadb server, read this howto[2853].

You may want to connect clients to the database server over network securely. Instead of using TLS (which is available natively[2854]) for this, the same can also be achieved by tunneling over SSH by following the below steps.

On the database server

Ensure there is no blocking by firewall for the ports/protocols/hosts.. The default Mariadb port is TCP 3306.

Ensure that the SKIP=”..skip-networking…” line in /etc/rc.d/rc.mysqld is commented out. This will allow external client connections to the server.

Identify a user who will be the SSH tunnel user. This refers to the Linux user. You may use the command ‘adduser <username>’ to create a new user.

Edit /etc/ssh/sshd_config, if necessary, to ensure that key based authentication is allowed for this user. The /etc/rc.sshd service will of course have to be restarted if any edits had been made.

On the client machine

Generate keys for authentication using ssh-keygen without a passphrase as follows. You may use RSA also. The below command will create a private and public key after giving you file name option. Just hit enter to avoid using a passphrase. Create and login as a similar tunnel user when doing this.

ssh-keygen -t ecdsa -b 521 -C my-comments

The public key with filename extension .pub should be installed in the database server user’s authorized_keys. The contents of the .pub file can be copy pasted or you can use a command line utility like ssh-copy-id as shown below. Never copy the private key to other server.

ssh-copy-id -i ~/.ssh/mykey user@database-server-host

It is recommended to use autossh, which is available in slackbuilds[2855], to make persistent connections. Once autossh is installed, you can now create the tunnel with a command like below. The port 334 on the client machine can be any unassigned port you choose.

autossh -M 10984 -o "PubkeyAuthentication=yes" -o "PasswordAuthentication=no" -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -i ~/.ssh/mykey -L 334:127.0.0.1:3306 user@database-server-host

Connect the client

mysql -u root -p  --host=127.0.0.1 --port=334

You thus have a secure ssh tunneling for mysql client now.

Sources

Adapted from original source: https://mariadb.com/resources/blog/connecting-to-mariadb-through-an-ssh-tunnel/[2856]

Originally written by mahafyi[2857]

howtos, mariadb, mysql, tunneling, ssh, tunnel

Build A Slackware Router (Quick and Dirty Instructions)

On many occasions, I've needed a simple router that can do more [sub-netting] than your standard SOHO router but didn't need the complexity of something like pfSense. If you need a simple small router, a Raspberry Pi (with USB network adapters) + SlackwareARM (http://sarpi.fatdog.eu[2858]) works great. Regular Slackware on cheap x86 hardware works great also!

How to do it

1) Install Slackware/SlackwareARM and make sure you have at least TWO network interfaces. For our examples:

ETH0 will be the WAN NIC

ETH1 & WLAN0 will be the LAN

2) Setup the WAN network interface as DHCP [client] or STATIC IP (as needed) and the LAN(s) as static IPs. (We'll address setting up a DHCP server on the LAN further down).

3) Enable IP FORWARDING:

 sudo chmod 755 /etc/rc.d/rc.ip_forwarding

NOTE: I've had this not work in the past. What ALWAYS works is:

vi /etc/rc.d/rc.firewall

ADD:

echo 1 > /proc/sys/net/ipv4/ip_forward

4) Enable masquerading:

vi /etc/rc.d/rc.firewall

ADD:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

If you reboot at this point, you'll have a very basic working router.

Adding niceties

DHCP server on the LANs

You can set up DHCPD (included in Slackware) but using DNSMasq is SOOOOO much easier:

vi /etc/dnsmasq.conf

ADD/CHANGE:

port=0
interface=wlan0
interface=eth1
dhcp-range=10.3.2.0,10.3.2.254,12h
dhcp-option=6,8.8.8.8.8.8.4.4

WHERE:
port=0 disables DNS function and only allows DHCPD.
interface specifies which interfaces to listen to for DHCP requests.
dhcp-range specifies the DNS range start IP and end IP and the lease time.
dhcp-option=6,x.x.x.x specifies a DNS server IP to pass to connected clients.

Then enable DNSMasq:

chmod 755 /etc/rc.d/rc.dnsmasq

Firewall tricks

So much you can do here. Do a web search on iptable rules.

One useful rule is- DISABLE SMB/NETBIOS requests through the router:

iptables -A INPUT -p udp --destination-port 130:145 -i eth0 -j DROP

Sources

Originally written by arfon[2859]

router, ip forwarding, masquerade, author arfon

Policy based routing

By default networks packets are routed based on their destination address.

Linux supports routing policies, and this allows you to have multiple routing tables and make routing decisions based on other variables.

Kernel must be compiled with CONFIG_IP_ADVANCED_ROUTER (Networking/IP: Advanced Router) and CONFIG_IP_MULTIPLE_TABLES (Networking/IP: policy routing).

If you will use this in combination with iptables you will also need CONFIG_NETFILTER_XT_MARK & IP_NF_MANGLE from Network packet filtering framework (Netfilter).

Routing tables

By default you should have 3 routing tables: local, main & default. You can check what tables are currently existing by checking the content of /etc/iproute2/rt_tables.

By default the file should look something like this:

/etc/iproute2/rt_tables

#
# reserved values
#
255	local
254	main
253	default
0	unspec
#
# local
#
#1	inr.ruhep

You can check the routing table(s) with

ip route show table [Table name || Table ID]

Source based routing example

In order to start making routing based on source address you'll need to do just two simple things.

First you'll need to create a new routing table instance. Let's name it srcroute.

echo 200 srcroute >> /etc/iproute2/rt_tables

Then you need to create the policy routing rule. In the current case we'll match all traffic with srcip 10.10.10.1 and route it based on the srcroute routing table entries.

ip rule add from 10.10.10.1 lookup srcroute

You will probably need to add a default gateway to the new routing table(s) you are creating.

ip rule

Full list of the possible parameters you can get from the man page[2860].
You can combine ip-rule with fwmark that you can set with iptables, so can create an ip rule with every match iptables is capable of.
If you notice any packets getting lost, make sure to enable martian packages logging

net.ipv4.conf.default.log_martians=1
net.ipv4.conf.all.log_martians=1

If you notice any martian packets getting logged/dropped, you can disable the reverse path filer of the kernel

net.ipv4.conf.default.rp_filter=0

iptables mark

Simply use -j MARK –set-mark <MARK>. The target MARK only works in mangle.

For incoming packages use -t mangle -A PREROUTING

For outgoing packages -t mangle -A OUTPUT.

Sources

* Originally written by lamerix[2861]

howtos, network, routing, author lamerix

Software RAID troubleshoot

Once, after upgrading my desktop slackware64 from 14.1 to 14.2 (with kernel upgrade too),
i be done with system, who,after lilo menu,
write “loading kernel ………………………..”

and then stops completely - nothing more.

Initial configuration was:
Intel DG965SS motherboard, core 2 duo 2.2 gHz E4500 CPU, 8 Gb RAM,
2 x 1000 Gb Seagate SATA HDD ( as sda and sdb)
ST1000DM003-1CH1
dvd-writer on sata4 port

both seagate discs is partitioned as FD type ( linux autodetect raid) and 4 partitions ( mbr type) -

100 Gb root (md1)

2 Gb swap (md2)

350 Gb /home (md3)

550 Gb /Second (md4)

cat /proc/mdstat :

Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath]
md1 : active raid1 sda1[0] sdb1[1]
104857536 blocks [2/2] [UU]

md2 : active raid1 sda2[0] sdb2[1]
2097088 blocks [2/2] [UU]

md3 : active raid1 sda3[0] sdb3[1]
367001536 blocks [2/2] [UU]

md4 : active raid1 sda4[0] sdb4[1]
502805120 blocks [2/2] [UU]

unused devices: <none>

mdadm -Es :

ARRAY /dev/md1 UUID=7cc47bea:832f8260:208cdb8d:9e23b04b
ARRAY /dev/md2 UUID=cce81d3a:78965aa5:208cdb8d:9e23b04b
ARRAY /dev/md3 UUID=f0bc71fc:8467ef54:208cdb8d:9e23b04b
ARRAY /dev/md4 UUID=3f4daae2:cbf37a2a:208cdb8d:9e23b04b

# for p in 1 2 3 4; do mdadm --create /dev/md$p --name=$p --level=1 --raid-devices 2 /dev/sda$p /dev/sdb$p --metadata=0.90; done

My "fall" and "sucess" story

I have slackware64 14.1 system with raid1 on two discs.
no any mdadm.conf configuration, no any initrd -i use “huge” kernel, and all just works right.
Then i do massive system update via slackpkg update-all, including kernel update too.
check lilo.conf, restart - all looks ok. then i decide to upgrade system to 14.2 via the same slackpkg
( looks like live on macos is too boring, too predictable - all work, and so on…:D )
always, i check lilo.conf, check the new kernel is named right, have no old kernel for backup -
only one entry in lilo ( who was not good thing at all! ), and do reboot.
Then all interesting things start!!! :)

I have LiLo menu, kernel start loading…
it show lots of “…” but then all stop, and nothing more do.
That was indicated some problems with lilo updating, i suppose.
I want to boot, and re-run lilo -v
As so, i booting from Slackware64 Live CD http://bear.alienbase.nl/mirrors/slackware-live/[2862] from AlienBob, and try mount my root partition for run lilo again.

But - there was a big problem!
there no my /dev/md1, /dev/md2, /dev/md3 and /dev/md4 after i load via slackware live CD!
and my lilo.conf was that:

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" vt.default_utf8=1"
boot = /dev/sda
#compact        # faster, but won't work on all systems.
# Boot BMP Image.
# Bitmap in BMP format: 640x480x8
bitmap = /boot/slack.bmp
# Menu colors (foreground, background, shadow, highlighted
# foreground, highlighted background, highlighted shadow):
bmp-colors = 255,0,255,0,255,0
# Location of the option table: location x, location y, number of
# columns, lines per column (max 15), "spill" (this is how many
# entries must be in the first column before the next begins to
# be used.  We don't specify it here, as there's just one column.
bmp-table = 60,6,1,16
# Timer location x, timer location y, foreground color,
# background color, shadow color.
bmp-timer = 65,27,0,255
# Standard menu.
# Or, you can comment out the bitmap menu above and
# use a boot message with the standard menu:
#message = /boot/boot_message.txt
# Wait until the timeout to boot (if commented out, boot the
# first entry immediately):
prompt
# Timeout before the first entry boots.
# This is given in tenths of a second, so 600 for every minute:
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console
vga = normal
# Ask for video mode at boot (time out to normal in 30s)
#vga = ask
# VESA framebuffer console @ 1024x768x64k
#vga=791
# VESA framebuffer console @ 1024x768x32k
#vga=790
# VESA framebuffer console @ 1024x768x256
#vga=773
# VESA framebuffer console @ 800x600x64k
#vga=788
# VESA framebuffer console @ 800x600x32k
#vga=787
# VESA framebuffer console @ 800x600x256
#vga=771
# VESA framebuffer console @ 640x480x64k
#vga=785
# VESA framebuffer console @ 640x480x32k
#vga=784
# VESA framebuffer console @ 640x480x256
#vga=769
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/md1
label = Linux
read-only
# Linux bootable partition config ends

so i do some research, do

dmesg |grep md

and from array size found out, what number was my root partition ( it was 100 gb size). it was md126.
i mount it:

mount /dev/md126 /mnt/hd

Then i run mc, and check, i was really mount there my root partition.

Then i do in console :

chroot /mnt/hd /sbin/lilo -v 3

but - lilo command end with error - it was cannot find root partition - /dev/md1.

That was problem, because now /dev/md1 was become as /dev/md126 for whatever reason.
Then, i do some reading about RAID subsystems, forums and so on, made some mistakes and experiments, who resulted on these shortcuts:

I made array assembling strings in mdadm.conf via do these comands in terminal:

mdadm -Db /dev/md127 >> /mnt/hd/etc/mdadm.conf
mdadm -Db /dev/md126 >> /mnt/hd/etc/mdadm.conf
mdadm -Db /dev/md125 >> /mnt/hd/etc/mdadm.conf
mdadm -Db /dev/md124 >> /mnt/hd/etc/mdadm.conf

In a result i get something like that in end of mdadm.conf:

ARRAY /dev/md125 metadata=0.90 UUID=7cc47bea:832f8260:208cdb8d:9e23b04b  #this one is 100 gb partition: \ (md1)
ARRAY /dev/md124 metadata=0.90 UUID=f0bc71fc:8467ef54:208cdb8d:9e23b04b  # 375 gb partition - \home - md3
ARRAY /dev/md126 metadata=0.90 UUID=3f4daae2:cbf37a2a:208cdb8d:9e23b04b  # 514 Gb partition - \Second - md4
ARRAY /dev/md127 metadata=0.90 UUID=cce81d3a:78965aa5:208cdb8d:9e23b04b  # 2 Gb partition   - swap - md2

then, based on :

dmesg | grep md

and /mnt/hd/etc/fstab i found out which md12x must be md1, md2, md3 and md4, and write it there after # as shown above.

Then i edit it to become in right way:

ARRAY /dev/md1 metadata=0.90 UUID=7cc47bea:832f8260:208cdb8d:9e23b04b
ARRAY /dev/md2 metadata=0.90 UUID=cce81d3a:78965aa5:208cdb8d:9e23b04b
ARRAY /dev/md3 metadata=0.90 UUID=f0bc71fc:8467ef54:208cdb8d:9e23b04b
ARRAY /dev/md4 metadata=0.90 UUID=3f4daae2:cbf37a2a:208cdb8d:9e23b04b

also i wrote in mdadm.conf that string, just to be sure, hostname do not affect raid naming:

HOMEHOST <ignore>

then i made mdadm_stop_127.scr script:

#!/bin/sh
echo "stopping md127"
mdadm --stop /dev/md127

echo "stopping md126"
mdadm --stop /dev/md126

echo "stopping md125"
mdadm --stop /dev/md125

echo "stopping md124"
mdadm --stop /dev/md124

##mdadm --assemble --scan
#-As

I copy it to livesystem root, copy also my edited mdadm.conf from /mnt/hd/etc/mdadm.conf to livesystem /etc, and umount /dev/md125 !

And then i run it - my mdadm_stop_127.scr

I see, all that arrays be stopped, and then i run:

mdadm -As

then i see

cat /proc/mdstat

I see, all my RAID become as it must be - /dev/md1, md2, md3, and md4!

then i do mount my root hdd again:

mount /dev/md1  /mnt/hd

and do:

chroot /mnt/hd /sbin/lilo -v 3

all looks good. i do restart:

shutdown -r now

( or press ctrl +alt+ del)

after restart i see, system start loading, and went after previously dead point. i get to login screen, log in as root, and see, there is md1 ( root) and md2 ( swap), but no md3 and md4 ( instead of it i have these /home and /Second arrays as md125 and md124).

Thats look very strange and unlogical, as all raid arrays var create about same time, and was similar - but half of it get right numbers, and half - not. now i try different thing - disable raid autodetect on kernel, before root fs is mounted, and mdadm.conf is available for md module:

i restart machine, press tab on LiLo prompt, and use kernel parameters:

Linux raid=noautodetect md=1,/dev/sda1,/dev/sdb1

that says kernel not to autodetect raid arrays, but assemble md1 raid ( md=1) from /dev/sda1 and /dev/sdb1 partition, because without root kernel system cant start.
as i load system in that way, all looks right - there was /dev/md1, md2, md3 and md4.
then i just do system restart, without any kernel parameters, and all again going to be right - md1 till md4.
looks like, system writes something in RAID arrays superblock, or metadata, or something like that, about previously gived md name, because, if not, after restart i must get again situation as previously - with md1, md2, md125 and ,d124…

that was, in a most, all of story. yet, there is some another workarounds of that situation.

Workarounds for incorrect raid devices naming

1. Using UUID in lilo ( i do not check this), and in fstab for mounting partitions.

do a

ls /dev/disk/by-uuid/

or better, go in that location with midnight commander, and youl see, there is a “files” named as numbers - that was the raid array disk uuid - and symlink to /dev/mdx.

for automate info feed into fstab you can use this way:

cd /dev/disk/by-uuid
ls -d -l $PWD/* >> /etc/fstab

after that you must immediately edit /etc/fstab and make in a right way, otherwise you may have problems with mounting in next boot…

/dev/md2         swap             swap        defaults         0   0
/dev/md1         /                ext4        defaults         1   1
##/dev/md3         /home            ext4        defaults         1   2
/dev/disk/by-uuid/ef92814a-2db1-4d47-8d70-4c5a8d56e287   /home            ext4        defaults         1   2
/dev/md4         /Second          ext4        defaults         1   2
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro,comment=x-gvfs-show 0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0

take a note! disk UUID by

/dev/disk/by-uuid/

and that one, who you get via

mdadm -D
mdadm -Db
mdadm -Es

differ, not the same!!! in fstab ( lilo too?) you must use UID from /dev/disk/by-uuid/ !

2. Using initramd.

#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
#/usr/share/mkinitrd/
mkinitrd -c -k 3.2.29 -f ext4 -r /dev/md1 -m mbcache:jbd2:ext4 -R -u -o /boot/initrd.gz

rightly edited mdadm.conf then must be copied in/boot/tree??? before you run this mkinitrd conf.

after you run that mkinitrd, you must update lilo.

Useful commands in this case

show raid array info:

mdadm -Es

Assemble RAID array based on mdadm.conf

mdadm -As

show array info:

mdadm -D /dev/md127

show defined array another info:

mdadm -Db /dev/md127

show scsi devices info:

lsscsi

show assembled raid arrays status:

cat /proc/mdstat

show UUID info about discs ( or RAID arrays) in system:

ls /dev/disk/by-uuid/

dmesg |grep md

re-run lilo, when booted from another source.

chroot /mnt/hd /sbin/lilo -v 3

stop named RAID array:

mdadm --stop /dev/md127

kernel options:

$kernelname raid=noautodetect md=1, /dev/sda1,/dev/sdb1

turn on not to autodetect RAID arrays, and define raid array /dev/md1, from two partitions ( members? )

Useful Links:

http://www.linuxquestions.org/questions/slackware-14/repair-lilo-on-software-raid1-4175593663/[2863]

https://bugzilla.redhat.com/show_bug.cgi?id=606481[2864]

https://www.linux.org.ru/forum/admin/13033496?lastmod=1479927790872[2865] (in russian )

https://raid.wiki.kernel.org/index.php/Linux_Raid[2866]

https://www.kernel.org/doc/Documentation/md.txt[2867]

Sources

Originally written by — John Ciemgals[2868] 2016/11/28 04:50

Rewrited with used materials from “Links” and LinuxQuestions.org Slackware forum, especially user bassmadrigal and bormant from linux.org.ru help — John Ciemgals[2869] 2016/11/28 09:15

software, raid, raid1, /dev/md127, enumeration, broken, linux, slackware, author wisedraco

Anatomy Of a Slackbuild

Preamble

I guess all Slackware users will have used at sometime a SlackBuild script in order to create a package of software that could be easily and cleanly installed and removed later if needed. My experience was that I ran the SlackBuild script to create a package and never actually looked at the code it contained until one day the source version did not match that stated in the script.

Why would you bother looking at the code in a SlackBuild script? Well firstly you can use it if you are learning bash. Secondly you may not want to submit a SlackBuild script but perhaps you want to create a package that does not exists for software you want.

So here i would like to go through a SlackBuild script as best as I can (verbosely). I openly welcome edits from all others at all levels. In fact I think it important that people from all levels contribute. What is obvious to one person may need explaining to another person.

There are different approaches to a SlackBuild script and for instance Alien Bob has his very useful SlackBuild creator at : Aliens SlackBuild Toolkit[2870]

These days at SlackBuilds.org they prefer submissions using a SlackBuild template. I think it would be useful to go through a SlackBuild script which is currently on SlackBuilds.org. For this I will use the SlackBuild script I submitted for latex2html latex2html[2871] to SlackBuilds.org and which is currently available for Slackware 14.2 .

That way we are talking about a contemporary working SlackBuild script that you can actually download, use and hopefully relate to after reading this.

The other thing to mention is that the context of this page, when you read it, regarding a latex2html script is that a whole “slackbuild” from slackbuilds.org has been downloaded, is somewhere convenient (say on my desktop) that it is unpacked and into the unpacked directory called “latex2html” the software source called latex2html-2019.2.tar.gz has been placed.

Also that you have kick started the script :

bash-5.0# chmod a+x latex2html.SlackBuild
bash-5.0# ./latex2html.SlackBuild

Bash

In the days before Windows on Unix, a shell or Bourne Shell (Stephen Bourne, Bell Labs) was a way of communicating with the system. In a nod to Stephen Bourne , Brian Fox came up with a new version in 1989 and called it Bourne again Shell (bash).

If you open up a terminal in Slackware - say Menu → System → Console and type at the $ prompt:

bash --version

, you should get something like:

GNU bash, version 5.0.11(1)-release (x86_64-slackware-linux-gnu)
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

In simple terms , the input was received and acted upon. The input is somewhat short lived, since when you close the window the input has gone.

A bash script in simple terms is bash code that can be saved as a file on say a hard drive.

The first line of a bash script has this line:

#!/bin/sh

This is commonly referred to as a shebang. This defines that the file is a shell script and also the path to the shell interpreter.

SlackBuild Script

We have so far described that a SlackBuild script is in essence bash code presented in a more permanent presentation of a file.

At the top is the shebang.

After that in line with slackbuilds.org requirements the next lines are the name of the package, who wrote the script and optionally a copyright notice is added.

I will attempt to go through the 14.2 latex2html slackbuild line by line. If there are blanks, it's a prompt for others to chip in. It also probably means I don't fully understand that bit.

PRGNAM=latex2html
VERSION=${VERSION:-2019.2}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}

If I look at the package I have installed on my current 64 Bit Slackware it's : latex2html-2019.2-x86_64-1_SBo. Now if you look at the first line above you will see PRGNAM (program name). This is a variable and its value is set to the string latex2html.

The version is related to the software source release; if you go to the latex source[2872] web page, you will see that there was a source release on June 5th 2019. Thus I simply named the version after that release. For those learning bash (I still am): on the second line VERSION= on the left assigns a value to the variable called VERSION.

When assigning a value to VERSION, why use VERSION=${VERSION:-2019.2} and not simply VERSION=2019.2?
Take the expression ${VERSION}. This means “the value contained in variable VERSION”. The more complex notation ${VERSION:-2019.2} means “the value contained in variable VERSION, but if that variable does not yet have a value then use the default value of '2019.2'”.
So that second line simply boils down to VERSION=2019.2.
A value for VERSION can be set outside of the script: if you specified a value for VERSION on the SlackBuild command line or if it has been defined in your Bash environment.

In the same way the variable TAG is set to SBo and when the package is created this shows it's a “slackbuilt” package. If you look at packages in other repositories, you will see in the name eg chromium-77.0.3865.75-x86_64-1alien that the package is by Alien Bob.

The next block of code is as follows:

if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi

In computer programming languages such as php, python and others including bash there are common practices and logic. One common principle is the procedure of having a test in code. A test is applied and of course there will be a result depending on the outcome. An example of a bash “if” block statement is:

if[ test condition]
then
code to be executed depending on result
fi

In the above block, quite simply the “if” is the start of an If test condition and “fi” denotes the end of a If test condition.

Going back to bash for a minute you can set a bash variable like so

ARCH=something

and you can get the value of a variable and see what value the variable “ARCH” contains by putting a dollar sign in In front of it like so:

echo $ARCH

A -z flag can be used in an “if” statement to see if a string is empty. So lets have a look at the first line again and work out what it means.

if [ -z "$ARCH" ]; then

In the above we don't need to see the value of ARCH; as long as we can access its value and be able to use it in the script. So the first part before the “then” simply equates to , if the value of the variable ARCH is expressed as a string and its value is empty, do something. ARCH could represent a string value of the architecture of the PC the script is running on.

Another common algorithm is called in for instance php is the “switch statement” . This put in its simplest terms is a list and the test is to see if a certain value you have can be found in that list. If its not found you can place on the line last in the list would you would like to do, if nothing is matched.

In bash its in principle the same idea but its referred to as “case statement” .In principle you can put anything you like in the case block, but if you think about the fact we want to find out the “architecture” of a computer and already know there are only certain possibilities then it makes sense to try out a couple of known possibilities in the list first and if there is no match do something to get an answer. arm and i586 are of course two types of computer architecture.

Now if you try out this code in a terminal window:

uname -m

it should display the architecture of you PC, in my case its x86_64.

So to summarize regarding the block of code. First an “if” statement is run to see if the variable “ARCH” is empty. If there is a value for the ARCH variable nothing in the block of the “if” and inner “case” will run;but if an empty string is found (ARCH has no value) a “case statement” is run(within the if block of code) to find a match.If a match was found the variable ARCH would be set to the value of the match found, and the execution of the case would come to a stop. If the ARCH variable was empty and no match was found in the case list , then the bottom line comes int play which is:

uname -m

is used to get a result and ARCH set to the result.

Don't be fazed by the question mark in i?86 ,the question mark is a place holder that allows for possibilities via regex. it could be “3” (i386) , “6”( i686) etc.

Next block of code

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}

Before we go into this let me have a look in my slackware file system and see whats there at /tmp/SBo.Taking a quick look at the image will give you a clue that the slackbuild works, by using the /tmp/SBo/ directory and creates a directory with the syntax package-packagename.So if we now have a look at the code above. CWD (current working directory) is a variable and is set to the value of pwd. If you run that in a terminal window, it will tell you where you in a bash context where you are working from.

TMP is going to be set to /tmp/SBo. Now lets have a look at

PKG=$TMP/package-$PRGNAM

You might guess PKG is going to be set for latex2html to :

/tmp/SBo/package-latex2html

If you look closely at the image (taking into account /tmp/SBo/ at top of image) you will see exactly that in the image.OUTPUT is set to /tmp

Next block of code:

if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi

Probably we need, before we look at the rest of the code for latex2html slackbuild to introduce some basic concepts.

Historically computer software is installed in a three step process called configure, make, make install. Configure gets ready to build the software , see if everything needed is there and builds a new make file. A make file is a file that contains instructions to build a program.

You can from the command line install software just using configure, make and make install. A slackbuild does the job of creating a package so that the process of installing is more manageable and reliable fashion. When you have a slackbuild downloaded on your system should there be a new release of source code its a simple matter of putting that source in your unpacked slackbuild and a quick edit to the slackbuild script.

Computer program source are written in “high level “ languages but are converted into a form that the computer can readily understand.Code written in the C language involves a C compiler converted it to binary.

The whole goal of any system installing a program, is that it should involve the concept of making it “tailor made” for the computer its being installed. Obviously that is going to involve the computer Architecture. During the compile process the system can be tweaked by passing in options from variables.

So lets now have a look at the block of code above. The block of code is simply an “if , else block” , where the code is executed top to bottom and amounts to -if the architecture is i586 set SLKFLAGS to .. if not go to next line.

CFLAGS and CXXFLAGS are variables holding values that can be passed in at compile time. We will see later that the variable SLKFLAGS will be used to set them.

Next block of code:

set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

set -e: this stops the execution of the script if there is an error executing this code following this command
rm -rf $PKG: this deletes any previous directory (and contents) of package-latex2html at of /tmp/SBo/package-latex2html
mkdir -p $TMP $PKG $OUTPUT :mkdir with the “ -p ” flag creates directories, but only if they don't exist already.

that would be /tmp/SBo , /tmp/Sbo/package-latex2html, /tmp

Its unlikely that the SBo directory doesn't exist unless no other slackbuilds have been run in the past . /tmp should be there as default with the slackware installation.
cd $tmp : moves location where bash is working from to /tmp/SBo

rm -rf $PRGNAM-$VERSION will get rid of any previous directory entries(maybe failed) for latex2html-2019.2

tar xvf $CWD/$PRGNAM-$VERSION.tar.gz : This equated to unpacking of latex2html-2019.2.tar.gz , which would be inside the unpacked slackbuild from slackbuilds.org namely “latex2html”.

cd $PRGNAM-$VERSION : This is a “change directory” command. The bash shell will now be working from the context that is located inside the unpacked source, which is located $CWD. i.e We are back to the unpacked slackbuild but, inside the unpacked source.

chown -R root:root . : Notice the dot , with a space at the end of the line; this means all in current directory. -R is permission recursive. So here we are giving ownership to root and group root.

 find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;

If i understand the above block of code correctly its using the “find” on the basis of permissions and following symbolic links using the “-L flag”. If i understand this correctly its basically setting directories to 755 in order to enable a “cd” into them and files so that root can read write. If this is true I might have expected

-type d -exec chmod 775 {}

For directories and

-type f -exec chmod 644 {}

For files. Next block of code:

CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--with-perl=/usr/bin/perl \
--enable-eps \
--enable-gif \
--enable-png \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux
make
make install DESTDIR=$PKG

A couple of things to say here , the use of “\” is a way of using a long command over several lines. We have already mentioned CFLAGS and CXXFLAGS. We also previously mentioned the variable SLKFLAGS and here we use it to set the value of CFLAGS and CXXFLAGS.

In this latex2html slackbuild script we also utilize a three step process of configure, make, make install. But what about the likes of –enable-eps , where does that come from ?

Well if you take the source code latex2html source[2873]unpack it ( a quick way is right click , open with Ark) cd into it and run :

./configure --help

Then you will get some useful information from the developers. It tells you the option and how you can enable some of them.

make
make install DESTDIR=$PKG

Here, make, make install are carried out.Note DESTDIR is a flag to say where the package will go.

$PKG equates to /tmp/SBo/package-latex2html

Next Block of code:

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
FAQ INSTALL LICENSE MANIFEST README.md TODO  \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cp $CWD/manual.pdf  $PKG/usr/doc/$PRGNAM-$VERSION
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}

The first two lines of this block are a bit of a mouth-full:

find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

We can however pick out key words that are commands and that can help to make some sense of it. ind“ located at /usr/bin/find is a powerful utility that has around 50 options. It basically does what it says on the can.With the -print0 option it separates what it finds with “\000” - in a word NULL.

The “|” or pipe is used to pass the results of a command to another;in this case xargs which has a flag -0. This option is for xargs to accept input that has /000 between them. ELF is is Executable & Linkable Format.

To give a succinct answer the two lines are removing debugging symbols and other unnecessary stuff to make the binaries smaller, faster and take up less memory.

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

Here we are preparing a directory which will be called “latex2html-2019.2” located at /usr/doc. This is so we an put relevant documentation into a directory relevantly called, so that a user can access documentation on the package. The next lines put files such as README.md into the /usr/doc/latex2html-2019.2 directory.

cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

That line goes back to the original directory that Latex2html.SlackBuild was run from ( i previously quoted Desktop) opens up the SlackBuild with “cat” command and copies it to the documentation directory. Now before I submitted latex2html to slackbuilds obviously I did some testing and found that when the package was installed it had a fairly comprehensive output of what it could do just using:

$ latex2html --help

Also I had access to a comprehensive manual in pdf format; so in my case I did not write code for man pages. Instead I simply put a copy of “manual.pdf” into the /usr/doc/latex2html-2019.2 directory.

— andy brookes[2874] 2020/01/05 16:29 (UTC)

If you teach maths it doesn't stop you embedding a little English.

Blank slackbuild templates can be obtained from : https://slackbuilds.org/templates/[2875]

Sources

I am using a SlackBuild script that i submitted to slackbuilds.org: latex2html slackbuild[2876] * Originally written by andy brookes[2877]

howtos

Get acquainted with Slackware

Introduction

This document is intended to allow people who have already used another “Unix-like” system to get quickly acquainted with Slackware. We assume that the reader:

knows the main Unix commands and the associated concepts,

knows how-to edit a text file (such as a configuration file)

can read a simple shell script.

Resources

Slackware's website

The website slackware.com[2878] is an entry point to following resources:

The official Patreon page[2879] to financially support Slackware,

ISO images[2880], a mirrors list[2881], torrents[2882] to get the distribution,

Files trees[2883] from version 1.01,

The Packages browser[2884] allows to find packages for all versions since Slackware 8.1

Directories and documents at the root of the distribution's file trees

These documents are also available at the root of each of the ISO images[2885]

Here is an incomplete list of the main directories and documents useful to Slackware newcomers.

.
|-- CHANGES_AND_HINTS.TXT See the end: OTHER NOTABLE CHANGES AND HINTS
|-- README.TXT            présentation of the version, including the packages series
|-- README.initrd         how-to create an "initrd" to start the system[1]
|-- Slackware-HOWTO       requirements, installation and configuration
|-- EFI/                  installer for UEFI 64-bit from version 14.1
|-- extra/                additional packages and sources
|-- isolinux/             installer
|-- kernels/              kernels
|-- pasture/              obsolete packages and sources
|-- patches/              packages and sources updated after a release
|-- slackware/            base packages (if 32-bit)
|-- slackware64/          base packages (if 64-bit)
|-- testing/              packages intended for adventurous
`-- usb-and-pxe-installers/ alternate installation methods

[1] See also /usr/share/mkinitrd/mkinitrd_command_generator.sh after installation.

The names of the other documents with the TXT extension give a clue about their content.

Other information sources

The aim of community website SlackDocs[2886] is to be the main information source about Slackware. Visit it priority to deepen the topics covered in this document.

Slackware newcomers (and others) have their Slackware forum[2887] on the website LinuxQuestions.org, often abbreviated LQ.

You can find other sources of information following the Slackware-Links[2888] proposed by onebuck from LQ.

After installation, read the email from Patrick Volkerding, it contains additional information: just type mail as root, or read the file /var/spool/mail/root with less.

Installation, configuration, startup

Installation

The installation media can be obtained on Slackware's website (see above).

Slackware provides a text installer, the document Slackware-HOWTO presents the installation process.

The genuine installer is only available in English but the project Slint[2889] offers polyglot installers[2890], which also complement the system configuration: choosing the language, the keyboard layout and creating ordinary users. A Slint package[2891], also installed, provides polyglot versions of the main administration tools and/or their manual pages. Since version 14.1 the Slint installers can be controlled by a Braille terminal, that can also be used to control the installed system.

Configuration post-installation

The tasks of configuration and administration must be carried out as root. If you are logged in as a normal user, type su (to obtain root privileges) or su - (to become root). The sudo command, although available, is rarely used to administer Slackware.

To create “ordinary” users, type adduser

To change the font for the console type setconsolefont

To change the console keymap edit /etc/rc.d/rc.keymap and make it executable

To change the LANG edit /etc/profile.d/lang.sh and case occurring /etc/profile.d/lang.csh. Note: in Slackware /bin/sh is a symlink to /bin/bash.

To modify the keyboard settings for X (in graphical mode), copy usr/share/X11/xorg.conf.d/90-keyboard-layout.conf to /etc/X11/xorg.conf.d, hen edit the copy. The file /etc/X11/xkb/rules/evdev.lst lists all known alues for XkbModel, XkbLayout, XkbVariant and XkbOptions under the respective headings ! model, ! layout, ! variant and ! option

You can re-run the setup scripts (already used at the end of installation) using the command pkgtool, menu entry Setup.

Slackware includes the main text editors such as pico, nano, elvis and vim and file managers mc and thunar and, of course, all common utilities and shells, useful to configure and administer the system.

In general, Slackware does not prejudge how the system will be used. It is up to the administrator to customize it for its intended usage by editing the configuration files located in /etc or its sub-directories. It helps to read the comments in scripts for management of services located in /etc/rc.d as well as in the configuration files.

Startup

At first startup after installation your system will be in “console” mode, without a GUI. If you prefer to start in graphical mode, replace “id:3:initdefault:” with “id:4:initdefault:” (runlevel 4 instead of 3) in the file /etc/inittab

Otherwise, to switch from console to graphical mode, choose first your window manager or desktop by default through command xwmconfig either as root (for all) or as ordinary user (for that user). Then type startx to start this window manager or desktop from the console after system startup.

In Slackware the run levels configured in /etc/inittab are:

0: shutdown

1: single user

3: multi user (default level)

4: idem 3, but with a sessions manager for X

7: reboot

At these levels correspond scripts in /etc/rc.d:

rc.S runs at startup, it initializes the system, checks then mount the file systems.

rc.M in multi user mode starts most services (daemons launched by scripts in /etc/rc.d if executable).

rc.K goes into single user mode (run level 1 or S).

rc.4 starts a session manager: gdm, kdm or xdm, others can be added editing that script.

rc.0 shuts down the system (symlink to rc.6).

rc.6 reboots or shuts down (if called as rc.0) the system cleanly.

Note. The administrator can add services scripts (daemons manager) in /etc/rc.d. Place the start of the demons in /etc/rc.d/rc.local and the stop in /etc/rc.d/rc.local_shutdown. /etc/rc.d/rc.local is run by /etc/rc.d/rc.M, /etc/rc.d/rc.local_shutdown by /etc/rc.d/rc.6

In addition Slackware includes a structure for managing services by run level in a sysvinit fashion for the software not included in the distribution (commercial ones, noticeably) that need it.

The management of services to be launched at startup can be done:

manually making executable: (chmod 755 <script name>) or not: (chmod 644 <script name>) the corresponding script in /etc/rc/.d

using the command pkgtool (choose Setup then services in the menu).

Note. As all administration tools, pkgtool should be run as root.

Management of software packages

Presentation of Slackware software packages

Slackware is distributed as a set of software packages containing applications and associated documents, and if necessary scripts executed during installation, noticeably for creating symbolic links or manage the configuration files and services' management scripts.

A Slackware package consists in a file tree archived with tar and once compressed with gzip, nowadays with xz .

A shell script called “SlackBuild” compiles binaries to be shipped in the archive and installs them in the package's tree alongside other files. It usually ends with the execution of the makepkg command, which makes the archive from the package's file tree, including case occuring the appropriate installation scripts, cf. “man makepkg”.

The software packages are in the directories of installation media indicated above. Each of these directories contains following files:

PACKAGES.TXT ⇒ Name, size, and description of each package.

FILE_LIST ⇒ All files included in the directory.

MANIFEST.bz2 ⇒ The characteristics of each file (to be) installed by each package (file compressed with bzip2)

The directories slackware/ or slackware64/ gather package “series” like a/, ap/, d/, etc. These series are described in README.TXT and Slackware-HOWTO at the root of the installation media. They are presented during installation.

During a full installation, all the packages in slackware/ or slackware64/ are proposed.

Important: as Slackware does not automatically manage dependencies between software, it is recommended to beginners to perform a complete or “full” installation: all the files needed to run the applications are provided in Slackware packages, thus installing them all guarantees that all dependencies will be met.

To each software package corresponds a source directory, located:

in the source/ sub-directory of directories extra/, pasture/ et testing/

in the source/ directory of the files trees[2892] and in specific ISO images in directories (32-bit edition) of ISOs[2893] for the packages in slackware/ or slackware64/

For instance, for version 14.1 the contents of the directory source/ap/tmux/ is:

.
|-- slack-desc         application's description
|-- tmux-1.8.tar.xz    source archive
`-- tmux.SlackBuild    should be (made) executable

This allows in particular to build a package with other compilation options and/or for a newer version by editing the SlackBuild, and case occuring by copying in the package source directory a different version of the software's source archive.

In our example to modernize tmux, just download the most recent (at time of writing) source archive tmux-1.9a.tar.gz from the tmux website[2894], place it in source/ap/tmux/ and type as root from that directory 'VERSION=1.9a./tmux.SlackBuild' to build a/tmp/tmux-1.9a-i486-1.txz package that can replace the previous one with the command 'upgradepkg /tmp/tmux-1.9a-i486-1.txz'

The Slackware packages database

It consists of text files in the directory /var/log of installed system:

/var/log/packages/<package>: provides summary data about the package and lists installed files
/var/log/scripts/<package>: lists case occurring the commands run by installation scripts
/var/log/removed_packages/<package>: provide information about deleted package
/var/log/removed_scripts/<package>: lists the commands run by installation scripts of removed packages

As they are text files, you can read them with less or with a text editor. They are updated and used by package management programs. They allow for example to know the contents of a package, in which packages(s) is shipped an installed file or whether a file was modified or deleted since installation.

The files PACKAGES.TXT and FILE_LIST included in the package directories are also used for their management.

Installing, removing and updating software packages

These functions are provided respectively by the commands installpkg, removepkg, upgradepkg, cf. their man pages.

Caution: ugradepkg would be better named replacepkg as that command installs the specified package then removes the previously installed one, regardless of their respective versions.

The command pkgtool, menu driven, allows to install, remove, examine the content of packages and more generally administer the system: pkgtool is the “Swiss army knife” of Slackware. In addition to “man pkgtool”, get to know the tool browsing its menu.

The command slackpkg, build atop other Slackware package tools, provides in addition an access to a local or remote mirror of official Slackware packages. This allows e.g. to download and install a set of packages or keep the system up to date with a single command. Its operation is governed by the configuration files /etc/slackpkg/slackpkg.conf and /etc/slackpkg/mirrors, see “man slackpkg” and “man slackpkg.conf”.

The software package's database on Slackware's website

The Slackware Package Browser[2895] allows to make a search using following criteria:

Package

Label

Description

Content

in one or more packages directories, for all versions of Slackware from 8.1 up to “current”.
It also provides access to the files' tree of each of these versions.

Complete Slackware with third party packages

Slackware doesn't provide all existing software. As wrote Patrick Volkerding:

When I started this project, it really wasn't my intent to provide every possible package, application, desktop, etc. My goal was to make a platform upon which things could be built easily and that followed upstream as closely as was possible. Of course, some applications had to be included, but the idea was to try to stick to the essentials that everyone would miss if they weren't there.

Most of the applications missing from Slackware are available on the community website http://slackbuilds.org[2896] that offers, not third party packages, but everything needed to build them minus the sources files.

For information on using the provided materials, see http://slackbuilds.org/howto/[2897].

The sbopkg software available here: http://www.sbopkg.org/[2898] facilitates usage of Slackbuilds available in http://slackbuilds.org/[2899], automating the download of everything needed, then the construction and installation of packages. See “man sbopkg” and the configuration file /etc/sbopkg/sbopkg.conf.

Furthermore the sqg application, available after installing sbopkg in /usr/doc/sbopkg-<version>/contrib/sqg, eases usage of sbopkg in automatically forming ordered dependencies lists or “queue files”. Type 'sqg -h' for details. You should edit the beginning of the script sqg before use.

Finally, some trusted third party offer packages already built. See especially those offered by Eric Hameleers aka Alien BOB[2900], Robby Workman[2901] and Matteo Bernardini aka ponce[2902], Slackware contributors.

The website http://www.slackware.org.uk/[2903] also hosts packages or Slackbuilds such as those proposed by distributions derived from Slackware, as Salix[2904] maintained mainly by George Vlahavas, or desktops not included in Slackware, such as Mate[2905] proposed by Chess Griffin and Willy Sudiarto Raharjo, or provided by slacky.eu[2906]

Packages that can be installed on Slackware are also available elsewhere. Important warnings:

Know who proposes these packages and preferably trust contributors of Slackware or at least of http://slackbuilds.org[2907]

Carefully inspect the contents of packages before installation, including a check of the permissions of files and any changes to existing directories and files. Use less, tar and/or explodepkg, see “man explodepkg”.

Never install a package whose sources and SlackBuild are not available.

Finally, the unofficial plugin slackpkg+[2908] extends the use of slackpkg to directories containing “unofficial” Slackware packages.

Build your own packages

This is the recommended method if no SlackBuild is available, to benefit of the Slackware package management tools and maintain a “clean” system.

The software slacktrack, included in Slackware, can help you, as “man makepkg”. Inspecting existing Slackbuilds and templates[2909] proposed at slackbuilds.org can inspire you. Browse SlackDocs[2910] with the key word “package” or “install” to learn more.

Maintainance of the system

To be informed of the availability of software packages that meet security breaches, email majordomo@slackware.com with the phrase “subscribe slackware-security” in the body.

The page Slackware Changelogs[2911] gathers Changelogs of stable and current versions.

For a stable version updates are few, because they are only intended to fill a security breach or to correct a major bug and not just to provide a more recent version of software included in the distribution. Users are expected to modernize their software themselves if they wish, see previous chapter for how to do that: Slackware is not a rolling releases, but publishes a succession of stable versions.

Updating or reinstalling a package can lead to reinstall a file (usually a configuration file) already installed. In this case if they don't match the system will install a new file next to the precedent with a .new extension and you get to decide what to do on a case by case basis: merge the two files, keep the former as is or replace it with the new one.

The practice of installing on a system a software package shipped in another version of Slackware is discouraged and often fails. Better try to rebuild a package for the installed version, running the SlackBuild in a copy of the source directory of that package, gathered from the other version. And of course, it is strongly unadvised to install packages intended for or included in another distribution, unless it be deemed 100% compatible with Slackware's identical version.

The dissemination of “Slackware-current” fastens and helps to finalize the development of the future stable version, allowing those who wish to test the work in progress and report problems. It should neither be used in production nor considered as a proper way of updating a stable release.

Sources

Originally written by Didier Spaier[2912]

howtos

Devastator, Scroll Lock and I3WM keyboard

I recently received a donation from cryptographic friend Ayr, a Devastator CM-STORM keyboard from Cooler Master.

A keyboard that is beautiful, soft and enjoyable to use. However I faced a very annoying problem on my I3wm. Because it is a keyboard that has LEDs, its function works through Scroll Lock.

And each time I pressed Scroll Lock the keyboard was locked and I couldn't move through the Virtual Desktops with my bind (windows). That is, to get to work I needed to use the LED off.

This problem was not noticeable in Xfce and Kde, but in I3wm there was no way to continue with the game.

So I started thinking and banging my head what would be the best solution to solve my problem. The first idea was to remap the keyboard! But pissed work eh?

So I decided to appeal to Shell Script and with a few steps I was able to solve my problem temporarily.

With a simple Find Value Scroll Lock recipe and create a script, your problem will be solved!

Disabling Scroll Lock

The first joke is to use the xev command, you will need to enable and disable Scroll Lock to be able to see its value. To do this send the output to a file for better visibility. After that we will use grep to filter and awk to get only the fields we need.

$ xev > result
$ grep "Scroll" result | awk '{print $3,$4}'
keycode 78

Or if you prefer you can take the exit uncut.

$ grep "Scroll" result
state 0x30, keycode 78 (keysym 0xff14, Scroll_Lock), same_screen YES,

Note that the Scroll Lock Keycode is 78, let's now disable Scroll Lock, so you won't have any problems with it.

For this purpose we will use thexmodmap command, its syntax is: xmodmap -e 'keycode <value> = <action>' .

In <value> you will use the value captured with the xev command, and after the = sign you will leave it blank.

$ xmodmap -v -e 'keycode 78='
! 1:  keycode 78=
keycode 0x4e =
!
! executing work queue
!
keycode 0x4e =

The Colorful Script

To make our life easier I created a script which should be executed in the graphical interface auto-start! For TTY or Non-GUI environments, you will need another recipe.

In the led_off variable, notice that the value is 00000000. This returns when all keyboard LEDs are off!

If in case you need to find another return type use the command:

xset -q | grep "LED" | awk '{print $10}'

If not you can follow.

#!/usr/bin/env bash
#==================HEADER============================================|
#AUTOR
# Jefferson Rocha
#
# Resolve o problema para ativar o led no teclado CM-DEVASTATOR
# Cooler Master Devastator - LED Gaming Keyboard
#====================================================================|
#=======================VARS
led_off='00000000'
key_code='78'
# LED Mask
LED_STATUS=$(xset -q | grep "LED" | awk '{print $10}')
# Scroll Lock off
xmodmap -e 'keycode ${key_code}='
# On
if [[ "$LED_STATUS" = "${led_off}" ]]; then
xset led 3 # on LED
else
xset -led 3 # off LED
fi
exit 0

Give execute permission and send the script to /usr/bin for global access.

# cp led_devastator /usr/bin/

Now let's add in the i3 configuration file, .config/i3/config present in your user's home the following command:

exec led_devastator

And now, your keyboard will now have the led on without problems. Just restart your interface and have the led color your life.

Sources

Originally written by Slackjeff[2913]

howtos, misc, led devastator, scroll lock, author slackjeff

Script with autostart function and output to defined console.

There is instruction, how to do script output to console 2,3, or another, and autostart them on computer switch on.

In that case we cannot put script start in /etc/rc.d/rc.local file, as always, because in that stage agetty, and consoles not activated, and therefore, script at that stage cannot do output to non-existing at that time, console, therefore, we put it in crontab with special preffix:

crontab -e

and in crontab, we write:

@reboot /path/to/yourscript.scr

script itself have construction like that:

#!/bin/sh tail -f /data/recv.log > /dev/tty2

where /dev/tty2 is console 2, /dev/tty3 is console 3, and so on.

Sources

* Originally written by wisedraco[2914] — John Ciemgals[2915] 2013/10/01 22:29

howtos, script, console, output, autostart, cron, startup

Variables in bash

Understand the concept of a variable and how to do every process to create your own.

What is a variable?

A variable as its name implies is to store varied content in a memory location / space, instead of using numbers to make your call, we use tags / names! This makes it easier to make the call, isn't it? Shell variables can receive any content! from a simple string / text, numbers, output status of a command and return output.

When should we use a variable?

At any time! variables are cool to work with, let's suppose as an example i needed to call a specific directory 4 times! Would it be feasible for me to always type this manual directory? Wouldn't it be flawed if in the future I decided to change the directory itself? And if I forget to change any path is for sure fail! For this I use a variable to help me!

# Declaration
DIRECTORY="/home/slackjeff/local_directory"
# If directory does not exist, create.
if [! -d "$DIRECTORY"]; then
mkdir "$DIRECTORY"
fi
cd "$DIRECTORY"
echo "I'm in the directory '$DIRECTORY'"

Note that I made the same directory call 4 times! It was more feasible to use a variable for this, so if I need to, I just need to change the contents of the variable without having to touch anything else in the code. The same goes for a message for example where it is repetitive or even long! For this example I will use the dialog.

# HEREDOCUMENT
text=$(
cat << END
Hi, welcome to my site, man!
Here you will find everything but money.
END
)
# PRINT
dialog --msgbox "$text" 0 0

Variable Types

In shell there are no variables of type (char, int, float, double). Here is all merciless string! Don't worry … Just schedule it.

Declaring a variable

In shell we don't need to declare variables! but get used to the way you call: D The order to declare a variable is:. Note that the variable name cannot contain any special characters like: '@ - | & * # $ \ /' among others, they cannot also start with numbers and have spaces … If your variable name contains spaces replace with _ 'underline', yes! underline can. Do not use - 'dash' that will not roll, it is a special character. After declaring a GOOD variable name you must enter the '=' sign and the value / content. Let's go to some examples:

CORRECT STATEMENTS

size_calca_42="Lie or use 42"
name="Jefferson"
_my_street="Pedro dos Santos"
MyHomeNumber="1076552"
CPF_AND_RG = "CPF: xxxxxxxx-xxxxxx.xx RG: y.yyy.yyyy"

WRONG statements

echo="Jeffa" **Works more is booked.**
ls="Uoool" **Works more is booked**
*Nom&="Paula"
1name="Fernanda"
goat-street="Pedrino Nicolau"
language=favorite="shell"
MY YELLOW="this won't work"

Take care if you are beginner and making the wrong statement will not worka. The shell will complain, yes! he is a very angry guy with bad statements. Then it binds, without special characters, start numbers and spaces.

Sources

Originally written by Slackjeff[2916]

howtos, misc, variables bash, shell, author slackjeff

Interface bonding

Linux has a bonding driver that provides a method for aggregating multiple network interfaces into a single logical interface. Behavior of bonded interfaces depends on selected bonding mode.
For more details on the supported modes please check Documentation/networking/bonding.txt in Linux's kernel sources.

Configure interface bonding

It is recommended to configure bonding via iproute2 (netlink) or sysfs, the old ifenslave control utility is obsolete.

First you will need to load the bonding kernel module. You'll need to specify at least the mode you want the bonding to be created in.

modprobe bonding mode=balance-alb miimon=100

After that you need to set some IP address to the new bonding interface and bring is up

ip addr add 10.1.1.2/16 dev bond0
ip link set bond0 up

And the last step is to add the network interfaces to the new virtual bonding interface.

ip link set eth0 master bond0
ip link set eth1 master bond0

Alternative method of creating/manipulating the bonding interfaces via sysfs

echo balance-alb > /sys/class/net/bond0/bonding/mode
ip addr add 10.1.1.2/16 dev bond0
ip link set bond0 up
echo 100 > /sys/class/net/bond0/bonding/miimon
echo +eth0 > /sys/class/net/bond0/bonding/slaves
echo +eth1 > /sys/class/net/bond0/bonding/slaves

Bonding modes

mode 0 / balance-rr - Round-robin policy: Transmit packets in sequential order from the first available slave through the,last.This mode provides load balancing and fault tolerance.

mode 1 / active-backup - Active-backup policy: Only one slave in the bond is active.,A different slave becomes active if, and only if, the active slave fails., The bond's MAC address is externally visible on only one port (network adapter) to avoid confusing the switch.

mode 2 / balance-xor - XOR policy: Transmit based on the selected transmit,hash policy.,The default policy is a simple [(source MAC address XOR'd with destination MAC address XOR packet type ID) modulo slave count].,Alternate transmit policies may be,selected via the xmit_hash_policy option, described below. This mode provides load balancing and fault tolerance.

mode 3 / broadcast - Broadcast policy: transmits everything on all slave,interfaces.,This mode provides fault tolerance.

mode 4 / 802.3ad - IEEE 802.3ad Dynamic link aggregation.,Creates,aggregation groups that share the same speed and,duplex settings. Utilizes all slaves in the active,aggregator according to the 802.3ad specification.

mode 5 / balance-tlb - Adaptive transmit load balancing: channel bonding that,does not require any special switch support.In tlb_dynamic_lb=1 mode; the outgoing traffic is,distributed according to the current load (computed,relative to the speed)on each slave., In tlb_dynamic_lb=0 mode; the load balancing based on,current load is disabled and the load is distributed,only using the hash distribution.Incoming traffic is received by the current slave.,If the receiving slave fails, another slave takes over,the MAC address of the failed receiving slave.

mode 6 / balance-alb - Adaptive load balancing: includes balance-tlb plus,receive load balancing (rlb) for IPV4 traffic, and,does not require any special switch support.,The,receive load balancing is achieved by ARP negotiation.,The bonding driver intercepts the ARP Replies sent by,the local system on their way out and overwrites the,source hardware address with the unique hardware, address of one of the slaves in the bond such that,different peers use different hardware addresses for,the server.

mode 4 / 802.3ad and mode 5 / balance-tlb have some prerequisites. Check kernel docs for more information

Balancing algorithm modes

xmit_hash_policy option sets the balancing algorithm used.

The default value is layer2.

layer2 - Uses XOR of hardware MAC addresses to generate the hash. This algorithm will place all traffic to a particular network peer on the same slave.

layer2+3 - Uses XOR of hardware MAC addresses and IP addresses to generate the hash. This algorithm will place all traffic to a particular network peer on the same slave.

layer3+4 - This policy uses upper layer protocol information, when available, to generate the hash. This allows for traffic to a particular network peer to span multiple slaves, although a single connection will not span multiple slaves.

encap2+3 - This policy uses the same formula as layer2+3 but it relies on skb_flow_dissect to obtain the header fields which might result in the use of inner headers if an encapsulation protocol is used.

encap3+4 - This policy uses the same formula as layer3+4 but it relies on skb_flow_dissect to obtain the header fields which might result in the use of inner headers if an encapsulation protocol is used.

Alternative methods

libteam provides an alternative to bonding driver. The main difference is that Team driver kernel part contains only essential code and the rest of the code (link validation, LACP implementation, decision making, etc.) is run in userspace as a part of teamd daemon.

More information can be found at: libteam.org[2917]

Sources

* Originally written by User lamerix[2918]

howtos network bonding,network bonding,bonding

LXC (Linux Containers)

Introduction

Linux Containers, or LXC, is operating system-level method for running multiple separate isolated Linux installations (containers) on a single host. Rather than simulating the computer hardware as in true virtualization, LXC uses the cgroups and namespaces functionalities of the host's Linux kernel to provide strong isolation of the container. It is an intermediate solution between chroots and full virtualization, having a small impact on system resource usage similar to chroots, but providing better isolation. It provides a very convenient way to, among other things, maintain a clean build environment or test software against different [Linux] OS versions.

Setting up a Network Bridge

Before creating your first container, it is helpful to do some prep work. When the container is first created, only a minimal set of packages will be installed, so you will want to be able to use slackpkg or wget to round out your system. Typically, a bridge is created on the host, and the container connects to this bridge using a virtual ethernet interface.

While it is possible to set up the network manually, thankfully LXC contains a utility called lxc-net that can do it for you. As root, open up the file /etc/default/lxc-net, or create it if it doesn't exist, and add this line:

USE_LXC_BRIDGE="true"

Then, to bring up the network bridge, simply enter the command:

/usr/libexec/lxc/lxc-net start

Note that you may need to create the directory /var/lib/misc first for this to work. If it worked, there should not be any error messages or other output. You can check that it worked with ifconfig:

# ifconfig lxcbr0
lxcbr0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
inet 10.0.3.1  netmask 255.255.255.0  broadcast 0.0.0.0
inet6 fe80::7c17:8ff:fe09:cdcb  prefixlen 64  scopeid 0x20<link>
ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)
RX packets 818240  bytes 45813772 (43.6 MiB)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 1304901  bytes 3605721321 (3.3 GiB)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The name of the bridge, gateway, netmask, and many other parameters can be modified by setting the proper variables in /etc/default/lxc/lxc-net. For a complete list, simply open up /usr/libexec/lxc/lxc-net in your favorite editor or pager; there is a comment indicating which variables can be changed. Set them in /etc/default/lxc/lxc-net rather than modifying /usr/libexec/lxc/lxc-net directly.

To actually use this network within the container, there are a few steps that will need to be taken during the initial creation and setup of the container, which will be covered in the next section.

Creating a Container

To create a new container, the lxc-create command will be used. However, there are some initial configuration steps you may want to take first. By default, all containers will go in /var/lib/lxc. If you're like me, /var is mounted on / and doesn't have enough space for multiple full container installs of Slackware! You can change the container path in /etc/lxc/lxc.conf (e.g., by pointing it to /home):

lxc.lxcpath = /home/lxc_containers

The basic command to create a new container is as follows:

lxc-create -n container_name -t template_name -f /path/to/config

The config file, specified after the -f flag, can be fairly simple. Here is a sample, which sets only some network parameters:

lxc.network.type = veth
lxc.network.flags = up
lxc.network.link = lxcbr0

This sample config uses a virtual ethernet interface connecting to the bridge on the host called lxcbr0. For additional available configuration options, see the lxc.container.conf manpage. Note that once the container is created, a new config file will be created within the container's top-level directory containing the full range of config settings; this file is read upon container startup and can be edited to modify the container's behavior after creation.

The template file, specified after the -t flag, can be any of the ones present in /usr/share/lxc/templates. For example, for Slackware, you would use:

lxc-create -n container_name -t slackware -f /path/to/config

The Slackware template accepts a number of environment variables. The most important of these are release and arch. release defaults to current, and arch defaults to the architecture of the host machine. It is also possible to specify the slackpkg mirror as an environment variable. For example, here is how one could create a container for Slackware64-14.2 using a US mirror:

arch=x86_64 release=14.2 MIRROR=http://mirrors.us.kernel.org/slackware lxc-create -n Slackware64-14.2 -t slackware -f /path/to/config

When lxc-create is executed, the container will be created at $lxcpath/container_name, and slackpkg will download and install the packages needed for a minimal install. The mirror will also be appended to /etc/slackpkg/mirrors.

Container Configuration

After creating the container, you are almost ready to go. First start the container:

lxc-start -n container_name

To log in, use:

lxc-console -n container_name

or

lxc-attach -n container_name

The first variant will give you a login console on the container, whereas the second will just give you a root shell without asking for a password. The first thing to do is to create a new user; use the standard Slackware tools such as adduser. It makes sense to create a user with the same username as a regular user on the host, because it makes ownership of shared directories easier to manage (more on that later).

Network

Even if you successfully set up a bridge network on the host and configured your container to use a virtual ethernet interface as described above, at this point you will probably still not have network access in the container. The reason is that you still need to set up your container's startup scripts to use the network. If you use lxc-net to set up the bridge network on the host, then you can just have your container get an IP address via DHCP. Open /etc/rc.d/rc.inet1.conf and set this:

USE_DHCP[0]="yes"

If desired, it should be possible to use a static IP address in the container as well.

The minimal Slackware installation set up by lxc-create does not have a lot of choice in editors, but vi (symlink to elvis) is available. If that's not your cup of tea, you can always edit the container's config files from the host using whichever editor you prefer. The container's entire filesystem is at $lxcpath/container_name/rootfs.

Once you have edited /etc/rc.d/rc.inet1.conf, get out of the container using Ctrl+a then q. Stop the container and then restart it as follows:

lxc-stop -n container_name
lxc-start -n container_name

Wait a minute or so to give the container plenty of time to “boot” and connect to the network. Then, you can use lxc-ls to check on the status of the container, as follows:

# lxc-ls --fancy
NAME                STATE   AUTOSTART GROUPS IPV4      IPV6
Slackware-14.2      STOPPED 0         -      -         -
Slackware64-14.2    RUNNING 0         -      10.0.3.65 -
Slackware64-current STOPPED 0         -      -         -

If the container successfully connected to the network, you should see that an IP address has been assigned. Log into the container again, and you should be able to ping outside, use slackpkg, etc. At this point, you can install any additional software you desire on the container. If you are using the container as a build environment, for example, you can do a full install:

slackpkg install slackware

or

slackpkg install slackware64

Custom Container Boot Process

In order to customize the boot process you can add or modify the init scripts listed in /usr/share/lxc/scripts/slackware. Any changes you make to the existing scripts will be copied to /etc/rc.d/ in each freshly created LXC container. This will allow you to easily customize the boot process if you create many LXC containers. A good example is if you add a custom rc.inet1.conf. It can become a bit tedious if you wish to create several LXC containers that all use DHCP network addressing. The solution is to create your own rc.inet1.conf, set USE_DHCP[0]=“yes”, named it rc.inet1.conf.lxc, and save it in /usr/share/lxc/scripts/slackware. Your custom rc.inet1.conf will be copied to each new container.

Sharing Directories with the Host

Because an LXC container's filesystem is just a directory on the host, if you only need to transfer files from the host to the container, you can simply copy them over. However, often you will want to share the files both ways, or rather, be able to access the same files within the container without having to actually transfer anything, and this is a little more difficult due to the isolation of the container. LXC provides utilities to mount host directories on containers for this purpose. We will assume that the directory to be shared is at /home/username/foo on the host. To share a user directory with the host, first log into the container and create the top-level of the directory to be shared. Then log out and stop the container. Add the following lines to the container's config file ($lxcpath/container_name/config):

lxc.mount.entry = /home/username/foo home/container_user/foo none bind 0 0

Note that the second path intentionally lacks a leading slash. This is because it is a relative path – relative to the container's rootfs. Once you start the container again and log in, you should see that the directory has been mounted at /home/container_user/foo. In general, it is best if the username on the host is the same as the container's username, because it avoids any conflicts in file ownership between the host and container user.

Running GUI Applications

Without taking additional steps, it will not be possible to run GUI applications installed in the container. The simplest way to accomplish this is to run them using SSH with X forwarding to the host. However, there are still a few steps required to make this happen. In the container, in /etc/ssh/sshd_config, set the following:

X11Forwarding yes
X11UseLocalhost yes

This will allow X forwarding via SSH from the container. (Note: X11UseLocalhost yes is required; otherwise X will give an error about the DISPLAY not existing.) It is also necessary to bind-mount the host's /tmp/.X11-unix directory in the container. Add this line to the container's config file ($lxcpath/container_name/config):

lxc.mount.entry = /tmp/.X11-unix tmp/.X11-unix none bind,optional,create=dir

Next, restart the container. Upon restart, use `lxc-ls –fancy` to determine the container's IP address. You can then run GUI apps from the container as follows:

ssh -Y user@IP appname

This is probably the simplest way to run GUI apps in the container. However, more advanced usage is possible, including using LXC to “sandbox” applications in an unprivileged container and/or running GUI applications directly in the container without connecting over SSH. For more information, the following page is a good start:

LXC 1.0: GUI in containers [9/10][2919]

See Also

Wikipedia[2920]

LXC homepage[2921]

Debian wiki[2922]

LQ thread[2923]

LXC 1.0: GUI in containers [9/10][2924]

Sources

* Originally written by montagdude[2925]

howtos

Enabling Sudo on Slackware

Sudo, substitute user of (Super User) or Super user of (acting as super user) has a big role on UNIX Likes systems, sudo allows ordinary users to temporarily get privileges from another user, widely used for the privileges of the superuser root.

There are many advantages and disadvantages of using sudo over su, for example sometimes we just need to perform a task quickly, such as updating the system with a single command, such as 'slackpkg update && slackpkg upgrade-all' or simply opening a file that has write and read permission only for root, for example.

But every superhero pays his price, as sudo allows the user to have super powers temporarily, so anyone who knows the password of your average user can have these super privileges.

This is why it is extremely important that you have a secure password for root as well as your regular user, so you can use sudo with peace of mind.

Unlike other distributions Slackware comes by default with sudo disabled, and we will learn how to enable it.

The first step is to create a group called “sudo”, for this simple task we can do it in two ways. The first is by manually creating a group, and the second is by using the 'groupadd GROUPName' command.

Let's use manual mode for better learning and notion.

The first step is to log in as root, for that use the su command, and right after we will open a groups configuration file located in / etc / group, open it with your favorite editor:

$ su
# nano /etc/group

Let's navigate to the last line of the 'group' file and add a special line to sudo, my penultimate line contains the privoxy group, your file is sure to be different:

privoxy:x:206:

In this same format we will create the sudo group, the format should be as follows:

groupname:x:ID:USERNAME

To check your user ID run the 'id -u' command, remember to be sudo enabled with the user.

$ id -u
1000

We then add in the last line of the group file:

sudo:x:1000:Username

Example:

nobody:x:98:nobody
nogroup:x:99:
users:x:100:
console:x:101:
tor:x:220:
privoxy:x:206:
sudo:x:1000:slackjeff

After this process, save and close.

Now we will need to edit the 'sudoers' file, so open with your favorite editor the file / etc / sudoers.

# nano /etc/sudoers

Open the file, find the line #%sudo ALL=(ALL)ALL, this line is commented out with the trailing '#' in front of% sudo, we need to uncomment, remove # in front of% sudo to have effect … if you are using the nano editor, you can use the keys simultaneously CTRL + W, will open a search field in the lower left corner, just enter %sudo ALL=(ALL)ALL for the location to be made.

Commented sudo line:

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL) ALL

Uncommented sudo line:

## Uncomment to allow members of group sudo to execute any command
%sudo ALL=(ALL) ALL

Uncommented the line of sudo, save and close, to put the icing on the cake we need to make a last setting that is very important. We know that regular users have UID 1000, and some commands are special for the super user that contains UID 0, when we run a command the system looks in the $ PATH environment variable for the location of the command we ask.

There are directories like the example '/ sbin' which is accessible only with users of UID 0, an example is root itself. What happens if we try to execute a command like slackpkg for example that is inside directory? It will fail.

So we need to add two new lines to our PATH.

For this still as root user let's open the file 'profile' which is located in '/ etc / profile' and find the line:

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games"

Note that there is an established pattern, directories have their field separated by ':'. At the end of '/usr/games' we add ':' and we add '/sbin' and after that we add ':' again and '/usr/sbin'. Save and close.

# Set the default system $PATH:
PATH="/usr/local/bin:/usr/bin:/bin:/usr/games:/sbin:/usr/sbin"

Please note that your regular user (UID 1000) can now execute the maintenance commands that are found in /sbin and /usr/sbin, whereas before these commands in these directories were not even 'shown' to a regular user (UID). 1000). But even now seeing these commands we will need the super user to continue.

Simply put, it is the same as giving a read permission to a file, for a given user it can read but cannot write or execute, for example.

Reboot your system with the shutdown command with parameters -r now, or simply exit your user and return so that you can execute the exit command or simultaneously press the CTRL + D keys.

Run tests by adding sudo in front of the desired command (s). Also test by updating your list and checksuns with slackpkg.

$ sudo ls /root/
$ sudo slackpkg update

Sources

Originally written by Slackjeff[2926]

howtos, misc, sudo on slackware, enabling, author slackjeff

Biff's Slackware Tips for Noobs

Introduction

I was going to call this page 'Slackware for Dummies' however there's a book of the same name on Amazon . I've accumulated a few bits and pieces that I feel are useful for people starting out in Slackware but which are too small to warrant their own HOWTOs. If you feel I should break anything out into its own HOWTO please add comments in the discussion section. Please also be aware that some of this is about opinion, and just one person's opinion at that. Unless otherwise stated this guide refers to Slackware64 14.2.

Booting the Installer

1) How much memory does Slackware require?

To run the installer with the huge kernel you will require 206MB, largely because of the ramdisk that the installer uses. Post-install (for first boot) you can reduce this requirement to 64MB assuming you have no swap. 32MB with no swap is achievable if you compile your own kernel (== much more work). Your applications will obviously require more. A HOWTO regarding compiling kernels for very low RAM systems will follow, watch this space.

2) The installer just dropped me into a shell. What now?

You need to create a partition on your hard disk before continuing. Assuming you have only a single hard disk and don't have any data you want to keep on this disk, create a single large partition on your hard disk with e.g.:

# echo start=2048 | sfdisk /dev/sda

This will give you no swap. Use fdisk if you want a more complicated partition table. Now run 'setup' and follow the instructions.

How much disk space do I need for a full install?

You will need just under 10GB if you include all disk sets and use the default file system (EXT4).

What is the minimum set of packages I need to install with?

Just install everything. A lot of third-party software will rely on all packages being there and you will regret not doing so (apart from the KDE i18n packages).

No, really, I don't want the bloat

OK, if you must. Only select the 'A' series, and choose these packages: aaa_base aaa_elflibs bash bin coreutils devs e2fsprogs etc eudev glibc-solibs grep kernel-huge kernel-modules kmod lilo pkgtools sed tar xz shadow syslinux sysvinit sysvinit-scripts util-linux

C'mon, I want my system to actually *do* something!

If you want a headless system with networking, select disk sets A, AP, L, N. This will require a more respectable 3GB of disk space, and avoid you having to select individual packages.

Which window manager should I use?

KDE.

No, KDE has too much bloat, which one should I use?

Fluxbox.

Do I need to create a rescue disk?

No. If you mess up your bootloader you can still recover your system using the install media, the DVD boot screen even tells you how, so there's not much point unless you have a specific reason of your own.

First Boot After Install

How do I stop Slackware taking 2 minutes to boot?

If you are using LILO, edit /etc/lilo.conf. Change the line

timeout = 1200

to

timeout = 20

Save the file and run 'lilo'. That will reduce the boot delay to 2 seconds. The default 120 secs gets boring rather quickly.

How do I add a user?

Adding a user is probably the first thing you need to do on a newly installed Slackware system because you don't want to do everything as root. This isn't because you give a stuff about security, it's because lots of programs (including Xorg) will complain if you run them as root.

Run the 'adduser' command:

# adduser bob

Keep hitting the 'enter' key and accept all defaults as if you're a Noob you're unlikely to change any of them.

Xorg

There's no GUI! How do I start X?

Once upon a time X had to be configured before it worked in Slackware. This is fortunately no longer the case and X now detects almost all your settings. Simply type 'startx'.

My keyboard doesn't work properly!

That bit I said about X now detecting almost all your settings? Well keyboard is one of the exceptions! Run:

setxkbmap <variant>

Where <variant> can be found in /etc/X11/xkb/symbols

Your Window manager recommendation sucks. I hate Fluxbox already!

You just need to change one link in /etc/X11/xinit:

Login as root

cd /etc/X11/xinit

ls # to look at the WMs available.

rm xinitrc

ln xinitrc.<name> xinitrc

But I want X to start on boot, how?

Slackware already has a great guide[2927] for this. You need to change the runlevel in /etc/xinittab.

Networking

How can I see what's listening on my computer's ports?

# netstat -an | less

I changed my network card and now the new one comes up as eth1 instead of eth0

# rm /etc/udev/rules.d/70-persistent-net.rules

(reboot)

Slackware programs

How do I find which packages have been installed?

# ls /var/log/packages

How do I find out what libraries a program uses?

# ldd <exe path>

How do I find all the libraries on my system?

(as root)

# ldconfig -p

How do I find which Slackware package contains file XXX so I can install it on my system?

# wget http://ftp.slackware.com/pub/slackware/slackware-14.2/slackware/MANIFEST.bz2
# less MANIFEST.bz2

(search for the file)

USB

I can only access my USB device as root

Create a new file in /etc/udev/rules.d. It should contain the following:

ATTRS{idVendor}=="<vendor>",ATTRS{idProduct}=="<product>",MODE="0666",GROUP="users"

For <vendor> and <product> put the values obtained from running 'lsusb' when you inserted your usb device. Use 'lsusb -v' to get the long form of the information.

Worked example:

# lsusb
Bus 005 Device 003: ID 413c:2003 Dell Computer Corp. Keyboard

/etc/udev/rules.d/80-mydellcomputerkeyboard.rules:

ATTRS{idVendor}=="413c",ATTRS{idProduct}=="2003",MODE="0666",GROUP="users"

This will allow any users to access that device, which on a multi-user system could be considered insecure but will get you working.

CD/DVD-ROM drives

How do I write a CD/DVD, I don't understand cdrecord?

You're not the only one. To write the image myimage.iso, the command is:

# growisofs -Z /dev/dvd=myimage.iso

You may need to be root to run this.

Sources

* Originally written by User Bifferos[2928]

howtos, tips, noobs, dummies

Howto install slackware64 -current with full disk encryption, including swap on Linode

The task

To have a working virtual machine in Linode, running and tracking Slackware64 -current, with full disk encryption, including swap, using LUKS with a custom partitioning schematic using LVM.

The steps I followed

Linode offers Slackware64 14.2 out of the box. This can be upgraded to current in the normal fashion. See this linuxquestions.org post[2929], which is what inspired me to get started on this.

This howto can be used to make a fresh installation of slackware64 14.2 or current. The default image as provided by Linode is stripped down due to their size restrictions. As someone used to following the recommendation to do a full install, I realized it can be a pretty long haul to have this setup just like my local PC.

As an example of a little shocker that enlightened me about the image size restriction,

root@darkstar:~# which perl

no perl in (/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/qt/bin)

It is useful to be able to a full fresh install instead, in the following manner.

Spin up your Slackware 14.2 Linode in the usual manager. I did this via the Linode Cloud Manager.

Add a new Volume to hold the installation media. This is to be attached to the Linode created above. The details are of the Volume are available in the Linode Cloud Manager (their web portal). Note down the /dev/disk/path-to-volume. I added a Volume named Installer sized 10 GB, which is the default minimum available.

Similarly, add a new Volume for the new OS itself with size of your choosing. I added a Volume named Slack64curr.

Login to the Linode

Download the ISO (Thanks to AlienBob!)

wget https://slackware.nl/slackware/slackware64-current-iso/slackware64-current-install-dvd.iso

dd the ISO to the Volume named Installer. Example (replace the path/filenames with your actual)

dd if=/home/maha_d/slackware64-current-install-dvd.iso of=/dev/disk/by-id/scsi-0Linode_Volume_Installer

Create or edit the Linode's configuration profile (in the Linode Cloud manager, this is available as Linodes→My-Linode–label→Configurations→Add/Edit. There is also a Clone Profile option, which is very useful here), so that the two new volumes are added in 'Block device assignments'. Swap out the default and the Installer volumes & make the Installer volume /dev/sda and the default Slackware 14.2 that was created by Linode, as /dev/sdX (replace X appropriately).

Save and boot this configuration profile.

Launch the weblish from the Linode Cloud Manager.

The boot will fail and drop you a grub cli.

Type 'exit' from the grub prompt, and switch to the Glish console where you will now have the slackware installer.

Starting with fdisk /dev/sdX (Block device assigned to the Volume we created to be our primary Slackware64 -current OS disk), proceed with installation as usual. I followed this document and section named 'Combining LUKS and LVM'[2930]

For adding media source I used a slackware mirror[2931]. DHCP works to obtain internet connectivity.

I used the mkinitrd generator helper.

I used liloconfig to setup the bootloader in the MBR of /dev/sdd. I experienced this problem[2932] with grub.

In lilo.conf, I set boot = /dev/sdd which was the 4th block device assignment, in the Linode Configuration profile I booted. This resulted in a warning, that it is not the first device when issuing /sbin/lilo command, which can be safely ignored.

I issued a reboot from the command line.

I then created a new Configuration Profile, in which delete the Block device assignments of the Installer Volume, as well as the default Slackware 14.2. Enable custom root and point it to your new OS device. In my case, it was /dev/sdd.

Power recycling, and then using the Weblish / Glish launched from the Linode Cloud Manager, type 'exit' in the grub to login to your new installation!

I had to manually setup the networking. Using slackware's netconfig TUI to use dhcp also works.

Linode provides a 'Lassie' shutdown watch dog utility, that should be disabled via the Linode Cloud Manager Settings.

Linode provides a Caution in their doc here.[2933]

Happy to be slackin'!

I am very grateful to Slackware and Linode indeed!

— Mahadevan Rangarajan[2934] 2021/04/14 03:50 (UTC)

Sources

howtos, installation, lvm, luks, author mahafyi

Native Unreal Tournament 2004 ECE from gog.com

This guide walks through the steps necessary to install ut2004 ECE from gog.com using a SlackBuild that can be found at SlackBuilds.org.

Some manual preparation before using the script at SlackBuilds.org

In a terminal as root create the game directory and a directory where the CDKey will go; here is an example using the SlackBuild's default

mkdir -p /usr/share/games/ut2004/System

chgrp -R games /usr/share/games/ut2004

chmod -R 774 /usr/share/games/ut2004

exit

In a terminal as non root user, install ut2004 via wine. Here is an example (Note: on 64 bit systems replace “wine” with “wine64”):

wine setup_ut2004_2.0.0.6.exe

Find your UT2004 cdkey with wine regedit.

wine regedit

a windows registry window will open up; navigate via mouse to find the CDKey located in HKEY_LOCAL_MACHINE/Software/Unreal Technology/Installed Apps/UT2004/

In the terminal log back in as root, and, create a new text document called CDKey with the discovered digits inside of the correct directory.

su root

vim /usr/share/games/ut2004/System/CDKey

Copy over all the game data from the wine install to the correct directory (make sure you are still root during this step):

cp -rfv ~/.wine/drive_c/GOG\ Games/Unreal\ Tournament\ 2004/* /usr/share/games/ut2004/

Use the SlackBuild from SlackBuilds.org

Download the SlackBuild from SlackBuilds.org

wget https://slackbuilds.org/slackbuilds/14.2/games/ut2004.tar.gz

Extract the files

tar -xvf ut2004.tar

Change to the correct directory

cd ut2004

Download the required files found in the .info

wget https://liflg.reto-schneider.ch/files/final/ut2004_3369-english.midway.dvd-3.run

Execute the script

./ut2004.SlackBuild

Finally install the package it produces.

Sources

* Original source: https://www.linuxquestions.org/questions/blog/disturbed1-175451/native-ut2004-from-gog-com-3305/[2959]
* Originally written by khronosschoty

howtos>misc>games>ut2004

HOWTO articles - Miscellaneous

This section contains how to articles which do not fit within any of the other main HOWTO categories.

Inspired? Want to write a Miscellaneous HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Miscellaneous HOWTOS

Page
Description
Tags

Anatomy Of a Slackbuild
Anatomy Of a Slackbuild Preamble I guess all Slackware users will have used at sometime a SlackBuild script in order to create a package of software that could be easily and cleanly installed and removed later if needed. My experience was that I ran the SlackBuild script to create a package and never actually looked at the code it contained until one day the source version did not match that stated in the script.
howtos

Web Dev primarily HTML and PHP
Web Dev primarily HTML and PHP I'm going to give an overview of web development for users of Slackware.It's going to be from the perspective of approaches for a budding web developer who uses Slackware, the problems you might face due to using Slackware Linux and an eclectic look at what tools are available to help you, starting simplest first.
howtos

Biff's Slackware Tips for Noobs
Biff's Slackware Tips for Noobs Introduction I was going to call this page 'Slackware for Dummies' however there's a book of the same name on Amazon :-(. I've accumulated a few bits and pieces that I feel are useful for people starting out in Slackware but which are too small to warrant their own HOWTOs. If you feel I should break anything out into its own HOWTO please add comments in the discussion section. Please also be aware that some of this is about opinion, and just one person's opin…
howtos, tips, noobs, dummies

Checking a Slackware Version
Checking a Slackware Version To check which version of Slackware you are running, we have two means that are widely used and practical, the first is to read the slackware-version file, which is located in the /etc/ directory. For this you can run the
howtos, misc, slackware version, checking, author slackjeff

How to connect mysql client over SSH tunnel to Mariadb server
How to connect mysql client over SSH tunnel to Mariadb server For setting up your working Mariadb server, read this howto. You may want to connect clients to the database server over network securely. Instead of using TLS (which is available natively) for this, the same can also be achieved by tunneling over SSH by following the below steps.
howtos, mariadb, mysql, tunneling, ssh, tunnel

Devastator, Scroll Lock and I3WM keyboard
Devastator, Scroll Lock and I3WM keyboard I recently received a donation from cryptographic friend Ayr, a Devastator CM-STORM keyboard from Cooler Master. A keyboard that is beautiful, soft and enjoyable to use. However I faced a very annoying problem on my I3wm. Because it is a keyboard that has LEDs, its function works through Scroll Lock.
howtos, misc, led devastator, scroll lock, author slackjeff

The Cross Syntax Cheat Sheet: DokuWiki versus AsciiDoc Markups
The Cross Syntax Cheat Sheet: DokuWiki versus AsciiDoc Markups Introduction At time of writing, SlackDocs uses a DokuWiki engine to convert the wiki pages (plain text including markup) to xhtml text. Converting the DokuWiki markup to AsciiDoc markup can ease the work of translators of DokuWiki pages, as the application po4a, that allows to produce PO files ready for translation, can handle the AsciiDoc markup but not the DokuWiki markup.
howtos

Enabling Sudo on Slackware
Enabling Sudo on Slackware Sudo, substitute user of (Super User) or Super user of (acting as super user) has a big role on UNIX Likes systems, sudo allows ordinary users to temporarily get privileges from another user, widely used for the privileges of the superuser root.
howtos, misc, sudo on slackware, enabling, author slackjeff

Get acquainted with Slackware
Get acquainted with Slackware Introduction This document is intended to allow people who have already used another “Unix-like” system to get quickly acquainted with Slackware. We assume that the reader: * knows the main Unix commands and the associated concepts,
howtos

How-to translate a document in AsciiDoc format
How-to translate a document in AsciiDoc format Introduction According to its Home Page: " AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including
howtos, asciidoc, translation

Internationalization and localization of shell scripts
Internationalization and localization of shell scripts Presentation Purpose, scope and intended audience This document is intended to help developers, maintainers and translators to write/maintain/translate internationalized then localized shell scripts, using the tools provided by GNU gettext.
howtos, gettext, shell, scripts, internationalization, localization, i18n, l10n

Linux HOWTOs
Linux HOWTOs The Linux HOWTOs are a collection of documents which cover specific subjects related to GNU/Linux. Most Linux HOWTOs are not tailored to a specific distribution, therefore they are very useful for Slackware Linux users. The linux- howtos package in the “f” software set contains the HOWTO collection. After installing this package the HOWTOs are available from the /usr/doc/Linux-HOWTOs/ directory. Slackware Linux also contains a small collection of Linux-related FAQs (FAQs are docume…
howtos, author etech3

LXC (Linux Containers)
LXC (Linux Containers) Introduction Linux Containers, or LXC, is operating system-level method for running multiple separate isolated Linux installations (containers) on a single host. Rather than simulating the computer hardware as in true virtualization, LXC uses the cgroups and namespaces functionalities of the host's Linux kernel to provide strong isolation of the container. It is an intermediate solution between chroots and full virtualization, having a small impact on system resource usa…
howtos

Policy based routing
Policy based routing By default networks packets are routed based on their destination address. Linux supports routing policies, and this allows you to have multiple routing tables and make routing decisions based on other variables. IPIPIPIP IP
howtos, network, routing, author lamerix

How to run OpenXenManager On Slackware
How to run OpenXenManager On Slackware ( known to work with Slackware64 14.2) 1) Install Python from Slackware packages. 2) Install pygtk from Slackware packages (not needed for -current) 3) Install configobj from Slackbuilds. 4) Install gtk-vnc from Slackbuilds, use version 0.7.0, and get the corresponding slackbuild from git.
howtos, software, virtualization, xen, openxenmanager, slackware 14.2

Proxying Emails to Your Local Mail Relay Server
Proxying Emails to Your Local Mail Relay Server There may be times where you may need to send emails from a machine, that can not do so directly nor thought your local SMTP relay and you have no easy way out for mending the causes. Let's examine some scenarios that would allow you to work around the problem.
howtos, smtp, proxy

Script with autostart function and output to defined console.
Script with autostart function and output to defined console. There is instruction, how to do script output to console 2,3, or another, and autostart them on computer switch on. In that case we cannot put script start in /etc/rc.d/rc.local file, as always, because in that stage agetty, and consoles not activated, and therefore, script at that stage cannot do output to non-existing at that time, console, therefore, we put it in crontab with special preffix:
howtos, script, console, output, autostart, cron, startup

Howto install slackware64 -current with full disk encryption, including swap on Linode
Howto install slackware64 -current with full disk encryption, including swap on Linode The task To have a working virtual machine in Linode, running and tracking Slackware64 -current, with full disk encryption, including swap, using LUKS with a custom partitioning schematic using
howtos, installation, lvm, luks, author mahafyi

Slackware Docker Image Overview
Slackware Docker Image Overview Slackware docker images are available in the docker image registry. They can be found in hub.docker.com/r/vbatts Building the images You can clone the git repository from github.com/vbatts/slackware-docker Currently, using the installer bootstrap, the mkimage-slackware.sh
howtos, docker, image, author lamerix

Variables in bash
Variables in bash Understand the concept of a variable and how to do every process to create your own. What is a variable? A variable as its name implies is to store varied content in a memory location / space, instead of using numbers to make your call, we use tags / names! This makes it easier to make the call, isn't it? Shell variables can receive any content! from a simple string / text, numbers, output status of a command and return output.
howtos, misc, variables bash, shell, author slackjeff

Slackware as a VMWare Guest
Slackware as a VMWare Guest Introduction These instructions apply to ESXi 5.5. It's highly likely they also apply to other versions of VMWare, unfortunately you have a lot to choose from taking into account Workstation, Fusion and even Player and I can't test them all. These instructions refer to Slackware 64-bit 14.2 as the guest, and assume Fluxbox WM.
howtos, vmware, virtualisation, emulation

Configuring Wireless With wpa_cli
Configuring Wireless With wpa_cli This article is for folks who are choosing not to use NetworkManager for their wireless. If you are running FluxBox or some other lightweight window manager, you may find it useful to configure wireless in the manner described below.
howtos, author, slackwood

Slackware as a Xen DomU Guest
Slackware as a Xen DomU Guest Introduction This document explains how to create a guest virtual machine for a Xen environment using HVM (with PV drivers) virtualisation mode. Such a VM could be used on AWS (Amazon Web Services) or with an on-premise Xen setup but has the added advantage that it will still boot into Desktop virtualisation software like VirtualBox, KVM, VMWare as it uses a conventional MBR. There is no requirement to use Grub and we can stick with the familiar LILO.
howtos, virtualisation, xen, domu

howtos, topic page

Configuring Wireless With wpa_cli

This article is for folks who are choosing not to use NetworkManager for their wireless.
If you are running FluxBox or some other lightweight window manager, you may find it useful to configure wireless in the manner described below.
If you are interested in having wireless internet without having to run X at all, this article may also be of interest.

Make sure that NetworkManager is turned off.
Open your favorite terminal emulator, and make yourself root.
Then try this command in bash:

chmod 644 /etc/rc.d/rc.networkmanager

rc.wireless should also be turned off.
Run these commands:

chmod 644 /etc/rc.d/rc.wireless
chmod 600 /etc/rc.d/rc.wireless.conf

You might want to restart your machine at this point.
(Before doing so, you should ideally have another machine like a laptop or a tablet available so you can keep reading this documentation.)

After booting, log back in as a regular user and make yourself root again.

Check to ensure that wpa_supplicant is not currently running:

ps aux | grep wpa

You may get back something like:

root      1337  0.0  0.0  28268  1468 ?        Ss   14:23   0:00 wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf
root      4146  0.0  0.0   7136   968 pts/1    S+   16:53   0:00 grep wpa

In this case the process id or pid for wpa_supplicant is 1337.

This means you need to terminate the wpa_supplicant process:

wpa_cli terminate

Edit wpa_supplicant.conf with your text editor. The command with vim is:

vim /etc/wpa_supplicant.conf

It needs to look like:

ctrl_interface=/var/run/wpa_supplicant
update_config=1

Change it to that, removing all other lines and save it.

Start wpa_supplicant from the command line:

wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf

This will work for most people. There are other driver options like nl80211, but I have not had good luck with them.

wpa_supplicant should start up successfully. If you get a message about an RFKILL error you can probably ignore it.

Run wpa_cli from the command line:

wpa_cli

It should start up and report that wpa_supplicant is running.

Now configure your wireless setup, waiting a little between each command:

scan
scan_results

scan should return OK and scan_results should list your wireless router after a short wait.

If all is well, then continue.

add_network
set_network 0 ssid "Your_Wireless_SSID_Here"
set_network psk "Your_Password_Here"

add_network should return 0. If it returns some other number you may want to run “remove_network” on the numbers below the returned value and start over.

If you only have one wireless network, it really should be network zero.

store your new setup to the wpa_suppilcant.conf file:

save_config

The last command should save your config and return OK. If it says FAIL you may have a driver issue or have mistyped something in your wpa_supplicant startup command.
You can now quit wpa_cli by typing “quit” and hitting enter.

Remove the update_config line from wpa_supplicant.conf:

vim /etc/wpa_supplicant.conf

Just remove “update_config=1” from the file.
Your SSID and the password should now be written into the config file.

Run dhcpcd:

dhcpcd wlan0

That should get you online.

To automate this so it happens each time your system boots up:

Open your text editor:

vim /etc/rc.d/rc.local

add these two lines:

wpa_supplicant -B -i wlan0 -D wext -c /etc/wpa_supplicant.conf
dhcpcd

Save your changes.

Log out of your superuser session using Ctrl-D or exit.

Enjoy having wireless outside of X and in your window manager of choice.

Sources

Original source for some content: https://wiki.archlinux.org/index.php/WPA_supplicant[2936]

Originally written by User slackwood[2937]

howtos, author, slackwood

How-to translate a document in AsciiDoc format

Introduction

According to its Home Page[2938]:

AsciiDoc is a text document format for writing notes, documentation, articles, books, ebooks, slideshows, web pages, man pages and blogs. AsciiDoc files can be translated to many formats including HTML, PDF, EPUB, man page.

AsciiDoc is highly configurable: both the AsciiDoc source file syntax and the backend output markups (which can be almost any type of SGML/XML markup) can be customized and extended by the user.

Let's take an example: if you write mypage.txt in AsciiDoc format, then this command:

asciidoc -b xhtml11 mypage.txt

will process mypage.txt to generate mypage.html in XHTML 1.1 format

AsciiDoc is included in Slackware, in package linuxdoc-tools.

An AsciiDoc document contains both content and markup, in other words formatting instructions to be applied by the asciidoc command.

For instance Slint Project's Home Page[2939] has been generated with AsciiDoc from a text file that can be displayed clicking on Page Source[2940] in its menu.

As you can see, syntax of AsciiDoc markup is not very complicated.

But when translating documents in AsciiDoc format, it can seem difficult at times to preserve this markup, while translating all that may and should be translated, hence this How-To.

Intended audience is people wanting to translate documents in AsciiDoc format, in other words text files mixing content and AsciiDoc markup, to be processed by the asciidoc command.

Recommendations

Of course you'll need to get acquainted with AsciiDoc markup syntax. The reference document is the AsciiDoc User Guide[2941] but for a starter, you could just read this AsciiDoc cheatsheet[2942]. Even faster, assuming that asciidoc is installed this command, typed in a terminal:

asciidoc --help syntax > asciidoc.txt

will write the AsciiDoc Markup Syntax Summary in file asciidoc.txt that you can then display with a pager or print.

Preserve the markup

Be careful to preserve the markup as is, if you are not sure of the syntax. For instance, adding or removing spaces or “newline” characters can have unexpected effects. Here are a few examples :

Beginning a paragraph with a space will generate a 'literal paragraph' displayed with a specific font

'= some text' will generate a level 0 header (document title), but only if '=' is the first character of the line, there is a space after it and there is a blank line before.

' +' appended to a line will generate a 'line break' only if there is space before the '+', that should be the last character of the line

If you use a text editor to translate, just make a copy the genuine file and edit it.

If instead you use an on line editor like that of Transifex, begin with copying then paste in the translation field each genuine text string containing AsciiDoc markup.

Check the rendering of your translation

If you translate using a text editor, just issue an asciidoc command then display the generated file and compare it with the genuine one. For instance, assuming that your translation of genuine.txt is translation.txt:

asciidoc genuine.txt
asciidoc translation.txt
firefox genuine.html asciidoc.html

If you use an on line editor like that of Transifex instead, just download the translation first.

Translate or not translate, that is the question

Following words have a special meaning for Transifex and should not be translated when they begin an admonition paragraph (and are often replaced by icons): TIP, NOTE, IMPORTANT, WARNING and CAUTION.

Generally speaking, links and URLs should not be translated, but associated caption may, depending on the context. In following examples (taken from ascii doc –help syntax only value of caption may be translated:

Document links:
[[id]]                      (define link target)
<<id,caption>>              (link to target id)
link:filename#id[caption]   (link to external HTML file)
URLs:
http:address[caption]       (link to web page)
mailto:address[caption]     (link to mail recipient)
Images:
image:filename[caption]     (inline image)
image::filename[caption]    (block image)

Sources

Originally written by didierspaier[2943]

howtos, asciidoc, translation

The Cross Syntax Cheat Sheet: DokuWiki versus AsciiDoc Markups

Introduction

At time of writing, SlackDocs[2944] uses a DokuWiki engine to convert the wiki pages (plain text including markup) to xhtml text.

Converting the DokuWiki markup to AsciiDoc markup can ease the work of translators of DokuWiki pages, as the application po4a, that allows to produce PO files ready for translation, can handle the AsciiDoc markup but not the DokuWiki markup.

This conversion should be “bi-directional”:

DokuWiki source page ⇒ AsciiDoc source page ⇒ PO file ⇒ Translated PO file ⇒ AsciiDoc translated page ⇒ Dokuwiki translated page.

The convtags converter written by Didier Spaier is available here[2945]. This converter takes the form of a set of UTF-8 encoded sed scripts. For instance to convert a page from this wiki to AsciiDoc, display the result in Firefox, translate it then convert it back to DokuWiki:

create a new (empty) text file

click “edit this page” or “show pagesource” in the page you want to convert and translate

select the whole source text with Ctrl+Shift+A

copy and paste it in the text file

save the text file as e.g. genuine.txt then run:

convtags da genuine.txt genuine.asc # convert to AsciiDoc
convtags aw genuine.asc genuine.html # if you want to make a static web page (to run this command you need AsciiDoc)
firefox genuine.html # if you want to check the rendering of the static web page
po4a-gettextize -f asciidoc -m genuine.asc -M UTF8 -p genuine.po # to make a PO file containing only the text to translate
lokalize genuine.po # to translate. You could also use emacs or vim in PO mode, or poedit available @ slackbuilds.org
po4a-translate -f asciidoc -m genuine.asc -p genuine.po -l translated.asc # to make an asciidoc file from your translation
convtags ad translated.asc translated.txt # convert back your translation to DokuWiki

You can then copy/paste the text of translated.txt as the source of the translated page.

Asciidoc and Firefox are included in a full Slackware installation.
In addition, you will need to make and install a package source-highlight[2946].

There are some limitations to the conversion from DokuWiki to AsciiDoc, see the README[2947].

In addition to easing the translation, the converter could be used e.g. to convert a static website build from AsciiDoc source pages to a Wiki powered by DokuWiki or reverse.

The table below summarizes the rules set up for the conversion.

This table can not be used as an AsciiDoc Cheat Sheet because it includes only the markup needed for bi-directional conversion: the AsciiDoc syntax is far richer. This also implies that only this subset of the Asciidoc markup can be automatically converted to DokuWiki.

A few DokuWiki markups are not included in the table because they have no direct counterpart in AsciiDoc.

Setting this conversion table was not straightforward as AsciiDoc lacks a “real” formal definition of its syntax in the AsciiDoc User Guide[2948] and even worse the DokuWiki formatting syntax[2949] just provides examples.

In the “Notes” column, D: stands for DokuWiki and A: for AsciiDoc.

Conversion Table and Cheat Sheet

Item
Dokuwiki
Asciidoc
Notes

Emphasized
//
__
D: rendered as italic. Does not span across paragraphs.⁴⁶⁾
Several text decorations (emphasized, strong, monospaced, underlined, strike through) can be nested in both syntax. Quoting cannot be overlapped.

Strong
**
**
D: rendered as bold. Does not span across paragraphs.

Monospaced
''
++
A: other syntax ` but only on word boundaries, implies no further expansion.
Does not span across paragraphs.

Underlined
__
[underline]#text#
A: # can be replaced by markup for strong, monospaced and/or underlined. Does not span across paragraphs.

Strike through
<del>text</del>
[line-through]#text#
A: # can be replaced by a markup for strong, monospaced and/or underlined. Does not span across paragraphs.

Superscript
<sup>text</sup>
^text^
Does not span across paragraphs.

Subscript
<sub>text</sub>
~text~
Does not span across paragraphs.

Forced new line
\\⎕ or \\↲
⎕+↲
↲⁴⁷⁾ represents a <newline> and ⎕⁴⁸⁾ a space

Ruler
---- (at least 4 dashes)
↲''' (at least 3 single quotes)
draws an horizontal line

Footnote
((text))
footnote:[<text>]
A: also with reference ID

Double quotation marks
"text"
``text''
Rendering: “text”⁴⁹⁾.
D: replacement depends on 'typography' setting in configuration file.
A: only on word boundaries, no span across paragraphs.

Single quotation marks
'text'
`text'
Rendering: ‘text’⁵⁰⁾.
D: replacement depends on 'typography' setting in configuration file.
A: only on word boundaries, no span across paragraphs.

No formatting (passthrough)
%%text with markup%% or:
<nowiki>text with markup</nowiki>
$$text with markup$$
A: provides also a syntax for passthrough blocks of text, but useless for the conversion, as practically in Dokuwiki the markup should not span over paragraphs⁵¹⁾

Replacements
(c) (tm) (r) -> <- => <= ---
(C) (TM) (R) -> <- => <= --
Rendering : © ™ ® → ← ↔ ⇒ ⇐ —

Heading
======text======
= text
Heading level 1 (title)

Heading
=====text=====
== title
Heading level 2

Heading
====text====
=== text
Heading level 3

Heading
===text===
==== text
Heading level 4

Heading
==text==
===== text
Heading level 5

External links
http://resource
http://resource
cf. RFC3986
http can be replaced by https, ftp, ftps

External links
www.resource
http://www.resource
D: converted to http://www.resource

External links
[[http://resource|text]]
https://resource[text]
http can be replaced by https, ftp, ftps

External links
[[http://resource]]
https://resource
D: not documented but works
http can be replaced by https, ftp, ftps

Internal links
[[internal:link]]
internal:link

Internal links
[[internal:link|text]]
internal:link[text]

Email addresses
<local@domain>
local@domain or
mailto:local@domain[text]
A: other syntax mailto:local@domain[text]

Multi-level quoting
> quoted text
>> quoted text
>>> quoted text
│quoted text
││quoted text
│││quoted text
Feature not available in AsciiDoc but simulated by the converter.⁵²⁾

Unordered list
⎕⎕* item
* item

Unordered list
⎕⎕⎕⎕* item
** item

Unordered list
⎕⎕⎕⎕⎕⎕* item
*** item

Unordered list
⎕⎕⎕⎕⎕⎕⎕⎕* item
**** item

Unordered list
⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕* item
***** item

Ordered list
⎕⎕- item
. item

Ordered list
⎕⎕⎕⎕- item
.. item

Ordered list
⎕⎕⎕⎕⎕⎕- item
... item

Ordered list
⎕⎕⎕⎕⎕⎕⎕⎕- item
.... item

Ordered list
⎕⎕⎕⎕⎕⎕⎕⎕⎕⎕- item
.... item

Tables
| text | text |
[table and column spec]
|===
| text | text
|===

A:
[table and column spec] is optional
|=== delimit the table (at least three equal signs)

Cell header
^header
h|header
A: h can be preceded by other formatting instructions. If not before the leftmost column, a space must precede the first formatting instruction

Cell horizontal alignment
|left | center | right|
<|left ^|center >|right
A: <,^ or > possibly followed by “h” or another table style

Cell horizontal span
| cell merged with the two next right |||
3+| (3 cells merged)
D: the number of consecutive | on the right of the cell states the number of cells to be merged, that is converted to n+ in AsciDoc
D: same feature with consecutive ^ on the right of the cell

Cell vertical span
::: (merged with next up)
.m+| (m cells merged down)
A: possibly preceded by n (n cells merged on the right)
This feature is not provided by the converter.

Admonitions
<note><text></note>
[NOTE]
====
block
====
A: or NOTE: paragraph
D: with the NOTE plugin⁵³⁾

Admonitions
<note important><text></important>
[IMPORTANT]
====
block
====
A: Converted to an Admonition block
D: with the NOTE plugin

Admonitions
<note tip><text></tip>
[TIP]
====
block
====
A: Converted to an Admonition block
D: with the NOTE plugin

Admonitions
<note warning><text></warning>
[WARNING]
====
block
====
A: Converted to an Admonition block
D: with the NOTE plugin

Code block
⎕⎕line of text
⎕⎕line of text
----
block
----
A: converted to a Listing block
D: Actually, the Code block will be formatted as such only if it includes a line containing at least one character belonging to the POSIX character class graph. And the first line beginning with two spaces won't begin a Code block if the previous one included a closing </code> or </file> ot </note> only followed by one or several space(s)…

Code block
<code> block </code>
----
block
----
A: converted to a Listing block
D: the opening and closing tags can occur anywhere on the line, but in case of continuation of a list item

Code block
<file> block </file>
----
block
----
A: converted to a Listing block
D: the opening and closing tags can occur anywhere on the line, but in case of continuation of a list item

Highlighted source code
<code language> block </code>
[source,language]
----
block
----
D: If language is “-” or “.”, “txt' is assumed.
A: converted to a Listing block
A: needs a syntax highlighting plugin.⁵⁴⁾

Highlighted source code
<file language> block </file>
[source,language]
----
block
----
D: If language is ”-“ or ”.“, “txt” is assumed.
A: converted to a Listing block
A: needs a syntax highlighting plugin.⁵⁵⁾

Multiline list item
see this article[2950]
line of text
+
line of text
D: Code blocks can be embedded
A: Listing blocks can be embedded

Images
{{ <source>[?]<linking>&<width>x<height>|<title>] }}
image::<target>[<attributes>]
where <attributes> is a comma separated list
See the comments in the program convtags for the details

Sources

Originally written by Didier Spaier[2951]

howtos

⁴⁶⁾

If used across paragraphs, merges them. I consider this as a bug in DokuWiki – Didier Spaier.

⁴⁷⁾

↲ is U+21B2

⁴⁸⁾

⎕ is U+2395

⁴⁹⁾

“ is U+201C, ” is U+201D

⁵⁰⁾

‘ is U+2018, ’ is U+2019

⁵¹⁾

Because that results in a merge of these paragraphs

⁵²⁾

The light vertical │ is U+2502

⁵³⁾

The NOTE plugin is co-authored by Eric Hameleers & alii.

⁵⁴⁾ , ⁵⁵⁾

The feature “downloadable attached file” is not converted. The link is discarded

HOWTO Set up icecream

As some of you may have noticed, Pat V has added icecream (Tue Aug 14 00:10:54 UTC 2018) to -current. What others may not know is what purpose for which icecream was created. In a nutshell, icecream is a centralized model for distributed compilation of packages; similar to distcc, but uses a central “server” to coordinate compiling.

Why would someone want to use this?

A lot of users nowadays have lots of computers lying around their house with no purpose; just taking up space, but their owners are unwilling to throw away what still works.

There are some packages which users may want to compile themselves, but one machine won't cut it (takes too long). Sharing the load among multiple machines cuts down on the load that one machine had to do in the past.

We are a community-based distro; true to its roots, Slackware's strength lies in the willingness of its users to improve on deficiencies, such as compiling their own packages (Perhaps taking the load off of core members who need a break)?

How to set it up

Software

I would recommend using -current, and only selecting sets A,AP,D,K,L & N. Others may be added as desired, but this is the setup I use, and it has worked well for me on the client machines.

Networking

Post-install, set your machine hostname to whatever your fancy is; icecream ignores this and uses the domain name (next prompt), so make sure that all of the machines you intend to use for icecream are in the same domain! Next, select static IP and assign it an IP of the form 192.168.x.x, where the first x is usually 0, and the second x can be any number between 1 and 254. (0 and 255 are used for special purposes).

NOTE: If you are intending to connect your client machines to the Internet, please be sure to use a firewall. I highly recommend IPFire. It is simple to install and once you do the post-install configuration, all future interaction can be done using the Web interface.

The way I have my client machines configured to use the firewall is as follows: I edit /etc/resolv.conf to point to my ISP's DNS servers, and /etc/rc.d/rc.inet1.conf to assign an IP address and netmask to eth0. Then I configure the gateway address to point to the IP address I assigned to the green0 interface (Refer to the IPFire documentation for explanation). This works well, and effectively hides the client machines from direct access from the Internet.

Icecream Configuration

On first boot, the client machines should have the rc.iceccd startup script made executable. Select the machine you intend to use as a scheduler machine and make the rc.icecc-scheduler script executable. Only one machine can have this script executable! This is usually the main machine. I usually don't need to set up an additional user account, as these machines are on a private network and totally inaccessible from the Internet;and, per the icecream wiki, root access is necessary for it to run. No additional setup for icecream is necessary.

NOTE: The following section is via Pat V.:

…[I]f /etc/profile.d/icecream.sh sees either iceccd or icecc-scheduler running on the machine, it will add /usr/libexec/icecc/bin to the beginning of the $PATH, and this directory contains symlinks from all the usual compiler names to /usr/bin/icecc.

Really, all there is to do is make /etc/rc.d/rc.icecc-scheduler executable on one machine, and /etc/rc.d/rc.iceccd executable on all the machines that will be part of the compile cluster. And then set -j high enough.

Hardware

Icecream's effective power to parallelize compilation depends on having several client machines for it to utilize.

For example, I have 10 Mac Pros running Slackware, and the kernel compilation uses all of them (I launch htop to monitor the CPU usage pattern on select machines.)

I have all my machines hooked up to a keyboard and monitor (4 to 2 4-port KVM VGA switches; I use a DVI to VGA adapter, then connect the VGA cable to that) for local control, but if you like to ssh into your machines “remotely”, feel free to do so.

Obviously, what kind of setup you use is immaterial to icecream, but I highly recommend using a Gigabit Ethernet switch to interconnect them. They are inexpensive and will handle the bandwidth necessary easily.

Conclusion

You can use any number of packages to demonstrate icecream's effectiveness, but I usually use a kernel compile to demonstrate icecc's power. The number of jobs used will obviously be dependent on the total number of cores in your cluster.

Icecream is an easy way to parallelize computing, and is well worth checking out.

Happy Slacking!

Originally written by Matthew Miller (1337_powerslacker on LQ).

Mattermost

Installing PostgreSQL Database.

With Unix socket.

A SlackBuild for building and installing PostgreSQL can be found at SlackBuilds.org; follow the instructions there, and install PostgreSQL. After installing PostgreSQL perform the following steps:

Initialize the PostgreSQL database:

su postgres -c "initdb -D /var/lib/pgsql/10.2/data --locale=en_US.UTF-8 -A md5 -W"

Start the PostgreSQL database:

/etc/rc.d/rc.postgresql start

Switch to the postgres Linux user account that was created during the installation.

su -l postgres

Start the PostgreSQL interactive terminal.

psql

Create the Mattermost database.

CREATE DATABASE mattermostdb;

Create mattermost user and give it the rights on the database:

CREATE USER mattermost;

GRANT ALL PRIVILEGES ON DATABASE mattermostdb to mattermost;

Exit out of psql with \q.

Setup the Unix socket by editing file: /var/lib/pgsql/10.2/data/pg_hba.conf, replace

# "local" is for Unix domain socket connections only

local all all md5

with

local mattermostdb mattermost peer

Add the following to “/var/lib/pgsql/10.2/data/pg_ident.conf”

echo "mattermap mattermostdb mattermost" >> /var/lib/pgsql/10.2/data/pg_ident.conf

Restart PostgreSQL

exit

/etc/rc.d/rc.postgresql restart

Add the mattermost system user:

useradd --system --user-group mattermost

Verify things are working thus far

sudo -u mattermost psql --dbname=mattermostdb --username=mattermost

Sources

howtos, template

Internationalization and localization of shell scripts

Presentation

Purpose, scope and intended audience

This document is intended to help developers, maintainers and translators to write/maintain/translate internationalized then localized shell scripts, using the tools provided by GNU gettext.

The reference document is the manual entitled GNU 'gettext' utilities[2952].

The manual encompasses all programming languages usable with gettext, with a special focus on the C language.

The POSIX specification[2953] is a recommended reading, in particular volumes Base Definitions[2954] and Shell and Utilities[2955].

In contrast with the the manual, the present document's scope is restricted to shell scripts.

Theory of operation

The aim is that messages (usually text strings) output of shell scripts be displayed on user's screen in his or her preferred language.

The user indicates his or her preferences in setting the LANG or the LANGUAGE environment variable (the latter records a priorized list of languages for messages displaying).

Internationalization (abbreviated in I18N) process consists in:

marking in the shell scripts that make up the software messages to be translated,

then use gettext's tools to produce from the set of marked scripts a template messages catalog.

A template messages catalog is usually called a “Portable Object Template” or POT file.

A POT file, human readable, is mainly made up of extracted text strings, preceded by “msgid” for “message identifier”, each one to be followed by a translation of that message, which will be preceded by “msgstr”.

Localization (abbreviated in L10N) process consists in:

generating from the POT file one “Portable Object” or PO file for each target language,

feeding the “msgstr” strings with translated messages in each PO file,

checking these PO files after translation,

compiling each PO file to generate a “Machine Objet” or MO file.

The MO files, that are only machine readable hence the name, are customarily stored as:

/usr/share/locale/<locale>/LC_MESSAGES/<software name>.mo

In above path, <locale> is a locale code in the form <ll[_TT], where ll is the two letters code of the target language as defined in ISO 639-1 standard and TT, if present, the two letters country code of the locale as defined in ISO 3166.

Every marked script should include following command:

export TEXTDOMAIN=<software name>

During script's execution this allows 'gettext' to fetch the proper MO file in order to display each marked message in the preferred language as set by the LANG or LANGUAGE environment variable.

Processes diagrams

Let's assume that a given software comprises a set of shell scripts that we want to internationalize and localize.

Following diagrams give an overview of each of the involved processes: internationalization, localization, usage and maintenance.

These diagrams are hybrid, i.e. they exhibit data as well as actions.

Among these actions are execution of some programs of the gettext suite:

gettetxt: marks strings to be internationalized, then displays localized messages during scripts' execution

xgettext: extracts marked strings from a set of shell scripts to build a POT or a PO file

msgcmp: checks a PO file against another PO or a POT file for consistency

msginit: write a PO file using a POT file as its input

msgfmt: format a MO file using a POI file as its input

msgmerge: merge or update PO or POT files

In below diagrams gettext programs are surrounded by square brackets.

(1) Internationalization

 Set of shell scripts ───> Preparation ───> Marked shell scripts ───╮
│
╭──────────────<── software.pot <─── [xgettext] <─────────╯
│
├────> (2) Localization
│
╰────> (4) Maintenance

(2) Localization (example for French and Dutch languages).

     ╭──────────────<── software.pot <── (1) Internationalization
│
│
├──> [msginit] ──> fr_FR.po ──> PO editor ──> fr_FR.po ──> [msgcmp] ──╮
│                                                                     │
│   ╭─ installation <── fr_FR.mo <── [msgfmt] <─┬─ fr_FR.po checked <─╯
│   │                                           │
│   │                                           ╰────> (4) Maintenance
│   │
│   ╰──> /usr/share/locale/fr_FR/LC_MESSAGES/software.mo ─> (3) Usage
│
╰──> [msginit] ──> nl_NL.po ──> PO editor ──> nl_NL.po ──> [msgcmp] ──╮
│
╭─ installation <── nl_NL.mo <── [msgfmt] <─┬─ nl_NL.po checked <─╯
│                                           │
│                                           ╰────> (4) Maintenance
│
╰───> /usr/share/locale/nl_NL/LC_MESSAGES/software.mo ─> (3) Usage

(3) Usage

Let's assume that one of the scripts, “myscript.sh” includes following command:

 gettext "Good morning"

and that “Good morning” is translated as follows in the message catalogs:

 /usr/share/locale/fr_FR/LC_MESSAGES/PACKAGE.mo ─> "Bonjour"
/usr/share/locale/nl/LC_MESSAGES/PACKAGE.mo ─> "Goedemorgen"

Here is what user will see depending on LANG setting:

            ╭──────────────<── (2) Localization
│
LANG=fr_FR ├───> sh myscript.sh or ./myscript.sh ───> "Bonjour"
│
LANG=nl_NL ╰───> sh myscript.sh or ./myscript.sh ───> "Goedemorgen"

(4) Maintenance

Maintenance process can be triggered by a script's creation, modification or deletion.

In the diagram below, the part of the process beginning with the msmerge command should be repeated for each available PO file.

It is therefore advisable to keep an up to date list of available translations in the form of PO files.

      Shell scripts updated and marked ───> [xgettext] ───> software.pot ──╮
│
(1) Localization ──> <locale>.po ───>┬<─╯
│
╭─ [msgcmp] <── <locale>.po <─ PO editor <── <locale>.po <─ [msmerge] <─╯
│
╰──> <locale>.po checked ─> [msgfmt] ─> <locale>.mo ─> installation  ────╮
│
/usr/share/locale/<locale>/LC_MESSAGES/software.mo <───╯

Maintenance process can be triggered as well by a modification of a messages catalog for a specific language (to correct an error for instance).

This variant of the process is shorter:

╭─ [msgcmp] <── <locale>.po <── PO editor <── <locale>.po <── Update needed
│
╰─> <locale>.po checked ──> [msgfmt] ──> <locale>.mo ──> installation  ──╮
│
/usr/share/locale/<locale>/LC_MESSAGES/software.mo <──╯

Internationalization process

This chapter is intended for developers and maintainers.

The internationalization process comprises following tasks:

Prepare scripts for internationalization

Mark messages to be localized

Use 'xgettext' to produce a template catalog of messages

Prepare scripts for internationalization

This task is needed for shell scripts that do not yet fulfill requirements for internationalization.

Technical note: Gettext's requirements for shell scripts.

The list of requirements below is not complete.

It includes only the main ones that I recommend the developer or maintainer to check, based on my experience.

Gettext replaces at run time text strings output of:

an “echo” command or

a program (like 'dialog', for instance)

with translated text strings (found in a messages catalog for the language set by $LANG or $LANGUAGE)

But the replacement only occurs if following conditions are fulfilled:

A MO file is available in the path computed from the TEXTDOMAIN environment variable as <dir_name>/<locale>/LC_MESSAGES/text_domain.mo.
For instance, if TEXTDOMAIN=software and $LANG=de_DE.utf8, gettext will look for: <dir_name>/de_DE/LC_MESSAGES/software.mo
<dir_name> can be set through the value of the TEXTDOMAINDIR environment variable, otherwise a default value is used.
In Slackware Linux for instance, the default value is /usr/share/locale.
There are fall backs, for instance if <locale> is “de_DE” the mo file could be placed in <dir_name>/de/LC_MESSAGES/ instead of <dir_name>/de_DE/LC_MESSAGES/

TEXTDOMAIN variable is exported before any *gettext command occurs.

gettext.sh, which provides the eval_gettext and eval_ngettext functions, is sourced before any occurrence of one of these functions.

A msgid string in the MO file matches exactly the argument of gettext (or eval_gettext if the text string includes a parameter expansion).

The corresponding msgstr string does not include a backslash followed by a white space.

The msgstr string begins and ends with a newline or not, as the msgid does.

If the text string includes a parameter expansion, eval_gettext is used instead of gettext.

“The variable names must consist solely of alphanumeric or underscore ASCII characters, not start with a digit and be nonempty; otherwise such a variable reference is ignored.” (gettext manual)

Parameter expansions are escaped with a single backslash like this:
\$parameter or \${parameter}
unless the eval_gettext command be inside a command substitution like this:
“`eval_gettext ”…“`” or “$(eval_gettext ”…“)“
In the latter case, three backslashes are needed like this:
\\\$parameter or \\\${parameter}.

Only the forms $parameter and ${parameter} of parameter expansion are used inside an eval_gettext's argument (all other ones are forbidden).

Positional parameters, special parameters and command substitutions are *not* used inside a gettext's or eval_gettext's argument.

As a practical consequence of the two last rules, it is advisable that all positional parameters, special parameters, command substitutions and not allowed forms of parameter substitutions be assigned upstream to named variables, then expanded in the text string argument of eval_gettext or eval_negettext.

Tip: if a text string has been included as a msgid in a catalog of messages and is assigned to a named variable in a script, then the commands: “gettext $parameter” and “gettext ${parameter}” will output the translated string at run time, even though 'xgettext' would discard that command when parsing the script, because 'gettext' is used instead of 'eval_gettext'. This can be handy. In this case the parameter expansion should not be escaped.

Mark messages to be localized

I recommend to mark messages:

arguments of a not redirected 'echo' command

arguments of redirected 'echo' commands whenever a further processing displays it on user's screen

arguments of other commands which displays the message, for instance the 'dialog' program

On the contrary I recommend not to mark:

comments intended for readers of the script,

text string whose value will be processed later, for instance as arguments of a 'case' compound command, or <tag> arguments of a dialog –menu' command.

Sometimes the shell script writes other shell scripts.

Then the developer or maintainer have to decide on a case by case basis what to mark depending on the intended scope of internationalization.

Use 'xgettext' to produce a template catalog of messages

The choice to produce only one POT file for the software as a whole or to make one POT files per set of scripts have to be made, considering for instance which choice will minimize maintenance work, how localizations work can be organized, relative frequency of updates for the different sets of scripts which comprise the software, and the relevance of distinguishing groups of features like setup vs configuration vs package management.

I'm inclined to produce only one POT file, but the choice is yours.

If the software comprises of numerous scripts located in different places or included in several packages, it can be handy to collect a copy of all scripts in a single directory, and/or to register in a text file a list of all of them with their paths.

The POT file will be generated using the 'xgettext' command (see the manual or 'xgettext –help' for details).

Include following options in the command:

-L Shell (of course!)
--strict (to facilitate checks and management of the messages catalogs)
-c       (to include comments useful for the translators in the POT file)
-n       (to identify the source file and the line number of each message.
This is the default.)

Once the POT file is generated you could check that it includes entries for all *gettext invocation in shell script(s).

Localization process

Once the POT file is available, the 'msginit' command writes a PO file for each target language.

In PO files the “msgid” strings should never be modified, otherwise the translation won't occur at run time.

The 'msgcmp' command allow to checks each PO file against the POT after translation, to make sure all messages are translated.

The translator can use the 'msgfmt' command to check the layout of the translated text.

The PO file should be carefully saved somewhere, as it will be needed for subsequent maintenance (it is still possible to 'msgunfmt' a MO file to re-create a PO file but then you would loose the context, which would make it almost useless).

The checked PO file is handed over to the maintainer, who runs 'msgfmt' to produce the MO file, then installs it.

Usage process

The only thing the user will have to take care of is set up his preferred language(s).

The primary way to do that is setting the LANG environment variable.

This can be done at run time, preceding the command used to run the script with LANG=<locale>, but usually the user will set it up permanently.

For instance in Slackware Linux this will be done in editing the file(s) /etc/profile.d/lang.sh and/or /etc/profile.d/lang.csh (see these files).

The changes will be effective at next reboot.

I suggest to use an UTF-8 locale, as for reading this document.

If the user is polyglot, another option is to set gettext's specific LANGUAGE environment variable to specify a prioritized list of languages.

For instance, if LANGUAGE is set to 'de:fr' then a Deutsch translation will be used if available, else a French translation will be used if available, else messages will be displayed in the original language, usually English. See gettext's manual for details.

Maintenance process

In most cases the maintenance process will be triggered by a script's creation, modification or deletion.

In such a case the maintainer will generate a new POT file with 'xgettext' then hand it hover to the translators.

The translators will use the new POT file to update their respective (saved) PO files with the 'msgmerge –update' command.

Then they will edit/complete the translations, focusing on the not yet translated messages and on those marked as “fuzzy” in the PO files, using a PO editor.

After that the PO file will be checked against the POT file with 'msgcmp', carefully saved, handed over to the maintainer who will generate the new MO file with 'msgfmt' and install it as in the initial localization process.

The maintenance process triggered by a needed modification of a PO file for a specific language is similar, only shorter: it will begin with the update of the relevant PO file by the translator. To minimize the workload caused by this type of maintenance, I suggest that the maintainer demand that he or she be provided only with complete and well reviewed translations.

Practical recommendations for developers and maintainers

Many English words are polysemous: their meaning can only be determined from the context of their usage. As a practical consequence, the more context you provide, the more accurate the translation can be.

Example: recently, while downloading a software I saw something like this:
31min gauche
Go figure? After a while I realized that “left” had been translated “gauche” (as in “left hand”).

Also, order of words in a sentence vary upon language, furthermore not all languages are written left to right. Thus, mark entire paragraphs, or at least entire sentences, not lines, let alone isolated words but in special cases.

For instance, if text paragraphs were split in lines displayed by 'echo' commands, replace all consecutive 'echo' commands by a single 'gettext' or 'eval_gettext' command.

Do not fear to include the variable substitutions in the sentences, PO editor will check that they be present as is in the translations.

Recommendations for 'dialog' program.

The 'dialog' program provides an UI taking the form of dialog boxes.

There are other programs with similar feature, to which I guess (only a guess), these recommendations are also applicable.

Bear in mind following considerations, when making or reviewing the design choices for dialog's boxes.

Messages translated in other languages will often be significantly longer than the original (usually in English) ones.

In situations where only VGA drivers are available (e.g. in text installers) screen display is generally restricted to 25 rows of 80 columns with most widely used fonts, but in practice word wrapping can occur if line's length is more than 74 characters.
As a consequence, for static layouts text lines' length should be at most 74 characters.

Vertical scrolling of text is widely accepted as frequently used to display web pages, and sometimes unavoidable.
On the contrary, horizontal scrolling should be avoided as much as possible.

Therefore I suggest to:

renounce to tightly adjust the dimensions of the boxes to the size of English text as the translation will probably break your carefully crafted layout, unless you impose unreasonable (IMO) constraints to the translators,

in particular, not narrow boxes' width to what is strictly needed for displaying English texts, especially in tabular layouts where the text can't flow on next lines,

favor a fluid layout of the displayed text over a fixed one to avoid too long lines in translations, whose complete display would then necessitate horizontal scrolling (which, moreover, is not always possible).

In particular, I recommend to favor options which take as first argument a text string instead of a file, to allow line wrapping. It is still possible to preserve the intended layout using white spaces for indentation.

For instance,

dialog <common-options> --textbox <file> <height> <width>

can be replaced with

dialog --no-collapse <common-options> --msgbox "`cat <file>`" <height> <width>

Practical recommendations for translators

Depending on amount of work needed and available resources, there can be one translator or a team of translators per target language. In all cases, I recommend that at least one person be responsible for organizing the team's work, checking the translations and transmitting the checked PO file to the maintainer(s). Let's call this person the team coordinator.

Don't feel obliged to translate verbatim. Not only is this rarely the best way to convey the meaning, but in addition this often leads to sentences too long to fit in allowed space.

Use a specialized PO editor, 'not' a general text editor. This will not only prevent inadvertently editing 'msgid' strings but also facilitate their work and automatize additional checks, as the presence of a variable in the translation with the same spelling as in the original.

While translating, choose a serif fixed width (or “monospaced”) font, like Courier. That allow to visually distinguish characters that otherwise would look the same, and check line's length when that matters.

If possible, check the layout of the messages. You could do that looking at the context in the relevant source file. Even better, simply run the translated script.

This is especially important if you are translating dialog boxes. In particular, take care not to write too long sentences on one single line if it appears that the text can't flow on next one.

Bear in mind that in VGA mode (used in text installers, in particular), line's width is limited theoretically to 80 characters, but practically often to 74.

Do not add question marks that are not present in the original message.

If the message refers to tags (text on the buttons) of dialog boxes, like “OK”, “Yes”, “NO”, “Continue”, “Cancel”, check how theses tags are translated in your language in dialog's interface and use the same words.

Avoid colloquialisms and technical slang.

To “cut” (or end) a line inside a “dialog” box you should type \n: pressing [Enter] will 'not' insert a “new line” character in the text viewed by user.

In addition, you will have to comply to gettext's requirements for it to work:

If a word beginning with a dollar sign is included in the original text it should be present in the translation with exactly the same spelling (case matters).

The translation text should include a “new line” character (or line feed, represented by “\n”) at the beginning or at the end, exactly as the original text does. Conversely, if the original text doesn’t have the character, then the translation shouldn’t have it.

A single backslash character “\” is not allowed in the translation.

To check your translation against gettext's requirements you could run following command:

msgfmt -c <name of the PO file>

Warning about translation of man pages

Preserve carefully syntax of man pages found in English markup. For instance don't replace:

'B<' with 'B <' (don't insert a space)

'B<' with 'b<' (keep the B as a capital letter - and don't replace it by the Greek capital letter BETA that looks the same on the screen)

“I” with '|' (don't replace the capital letter I with a pipe symbol)

When translating shell commands, preserve English names of paths when needed. But you may and should translate arguments to be replaced by a value like 'packagename'

Didier Spaier

Sources

* Originally written by Didier Spaier[2956]

howtos, gettext, shell, scripts, internationalization, localization, i18n, l10n

Find packages with filenames

Sometimes you want to know which files are included in a package. At other times you want to search for a package containing a file and you only have a filename (e.g. when the installation of software requires dependencies).

The solution is simple.

Online

Online is the site http://packages.slackware.com[1312]. You can search in this official database. Or you can search in an unofficial one: http://slakfinder.org/[1313].

Offline

On the Slackware installation medium is a file named /slackware/MANIFEST.bz2. This compressed file contains a list of packages and the corresponding files. Copy it to a location of your choice and unpack it with

user@computer:~$ bzip2 -d MANIFEST.bz2

Now you can search in the resulting text file for the wanted information.

Sources

* Originally written by Hans Mueller[1314]

howtos, packages, search

PostgreSQL

PostgreSQL[2960],or Postgres, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance.

Installing

Postgres is currently available from slackbuilds.org[2961] and can be installed via that.

PHP / Apache Support

The official PHP Slackware package currently does not ship with Postgres support. To enable it the source and SlackBuild script for the PHP package should be downloaded from a Slackware mirror and the following configure options should be added to php.SlackBuild before building:

  --with-pdo-pgsql=shared
--with-pgsql=shared

Alternative method

php-pgsql could be installed via SBo[2962]

After installing the required modules can be enabled via php.ini

Sources

http://www.linuxquestions.org/questions/slackware-14/slackware-postgresql-and-php-118505/[2963]

https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/php[2964]

Originally written by aaditya[2965]

howtos, software, database, author aaditya

Install MariaDB On Slackware

MariaDB is the drop-in replacement for MySQL.

Installing MariaDB

Install MariaDB from the official Slackware discs or using slackpkg[2966]. If you performed a full install of Slackware, then you already have MariaDB on your computer.

Configuring MariaDB

As root

- Install the system databases

mysql_install_db

- Set ownerships of MariaDB libs

chown -R mysql:mysql /var/lib/mysql

- Set rc.mysqld file as executable

chmod 755 /etc/rc.d/rc.mysqld

- Start MariaDB

/etc/rc.d/rc.mysqld start

-Set root (master) password

mysqladmin -u root password 'NEW_PASSWORD'

Connecting to your MariaDB server

Troubleshooting

Sources

Originally written by arfon[2967]

howtos, software, mariadb, mysql, database, author arfon

HOWTO articles - Databases

This section contains how to articles intended to guide users to setup and maintain various database systems on Slackware based systems.

Inspired? Want to write a Database HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Administration HOWTOS

Page
Description
Tags

Install MariaDB On Slackware
Install MariaDB On Slackware MariaDB is the drop-in replacement for MySQL. Installing MariaDB Install MariaDB from the official Slackware discs or using slackpkg. If you performed a full install of Slackware, then you already have MariaDB on your computer.
howtos, software, mariadb, mysql, database, author arfon

Install MySQL On Slackware
Install MySQL On Slackware Installing MySQL Install MySQL from the official Slackware discs or using slackpkg. If you performed a full install of Slackware, then you already have MySQL on your computer. Configuring MySQL * Create the needed database(s) and set their permissions properly
howtos, software, mysql, database, author arfon, needs content

Connect to Microsoft SQL Server with ODBC and PHP
Connect to Microsoft SQL Server with ODBC and PHP Microsoft SQL Server is a relational database management system developed by Microsoft. This article will describe how to set up unixODBC and PHP drivers to connect to MS SQL server. Installing unixODBC unixODBC is an open source project that implements the ODBC
howtos, software, database, sqlsrv, mssql, microsoft sql server, odbc, unixodbc, author feri

PostgreSQL
PostgreSQL PostgreSQL,or Postgres, is an object-relational database management system (ORDBMS) with an emphasis on extensibility and on standards-compliance. Installing Postgres is currently available from slackbuilds.org and can be installed via that. PHP / Apache Support
howtos, software, database, author aaditya

howtos, topic page

Connect to Microsoft SQL Server with ODBC and PHP

Microsoft SQL Server [2968]is a relational database management system developed by Microsoft.

This article will describe how to set up unixODBC and PHP drivers to connect to MS SQL server.

Installing unixODBC

unixODBC[2969] is an open source project that implements the ODBC API

Best way to install unixODBC is from slackbuilds.org[2970].

If you have sbopkg[2971] installed this is as easy as executing the below command:

 sbopkg -i unixODBC

unixODBC conflicts with libiodbc in Slackware, so if you remove unixODBC, you will have to re-install libiodbc!

Installing Microsoft OBDC Drivers

The official ODBC Drivers can be downloaded from Microsoft: download link[2972]

Microsoft ODBC Driver 13.1

The version that i've tried and works was the Debian 8 packages

msodbcsql https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql/[2973]

mssql-tools https://packages.microsoft.com/debian/8/prod/pool/main/m/mssql-tools/[2974]

I've installed them by extracting the deb files using 7z and then copying the contents into the same temporary directory to allow me to create a package using makepkg.

OBDC Configuration

/etc/odbcinst.ini

[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.6.0

/etc/odbc.ini

[mssql]
Driver=ODBC Driver 13 for SQL Server
Server=tcp:YOUR_SERVER_NAME_OR_IP_ADDRESS
Database=YOUR_DATABASE

Microsoft Drivers for PHP for SQL Server

The drivers are only supported on PHP7+, so the assumption is that you are either on Slackware64-current (>=2018) or you have built and installed PHP7 manually.

The easiest way to install the drivers are to use PECL

pecl install sqlsrv
pecl install pdo_sqlsrv

Alternatively you can get the official drivers from github and build it yourself: https://github.com/Microsoft/msphpsql[2975]

Check the installation using php -i|grep “sqlsrv support” you should see something like this:

bash-4.4$ php -i|grep "sqlsrv support"
pdo_sqlsrv support => enabled
sqlsrv support => enabled

howtos, software, database, sqlsrv, mssql, microsoft sql server, odbc, unixodbc, author feri

Install MySQL On Slackware

Installing MySQL

Install MySQL from the official Slackware discs or using slackpkg[2976]. If you performed a full install of Slackware, then you already have MySQL on your computer.

Configuring MySQL

Create the needed database(s) and set their permissions properly
As root, run:

root@darkstar# mysql_install_db --user=mysql

The user specified by –user will own the database files, so it's important to set the right user here, otherwise MySQL won't be able to write to your databases. By default MySQL in Slackware runs as user “mysql”, so that is the safe choice.

Enable execution of the rc script to start MySQL automatically on boot
This is optional.

root@darkstar# chmod 755 /etc/rc.d/rc.mysqld

Enable networking if needed
Networking is disabled by default to improve security. If you want to allow network connections, comment out this line in /etc/rc.d/rc.mysqld:

rc.mysqld

#SKIP="--skip-networking"

Start mysqld

root@darkstar# /etc/rc.d/rc.mysqld start

and proceed to the next section “Securing MySQL”.

Securing MySQL

You have a choice : Manual or Automatic configuration of secure access

Automatic configuration of secure access

Run the following command, and answer the questions

root@darkstar# /usr/bin/mysql_secure_installation

The initial root password is “” (the empty string), so just hit ENTER when the above command asks for the password

Manual configuration of secure access

Set a password for MySQL's root account

root@darkstar# mysqladmin -u root password 'new-password-here'

If you enabled networking, you should also run this command:

root@darkstar# mysqladmin -u root -h 'your-hostname' password 'new-password'

Check the mysql_install_db results, these commands are printed, you can copy/paste them. The hostname will already be replaced by yours.

Connecting to your MySQL server

Connect to your MySQL server using the following command

user@darkstar$ mysql -u root -p

For security reasons you should delete the anonymous user

For the localhost server:

mysql> use mysql
mysql> SELECT user, host FROM user;
mysql> DELETE FROM user WHERE host='localhost' AND user='';

If you enabled networking, you should run this command instead:

mysql> use mysql
mysql> SELECT user, host FROM user;
mysql> DELETE FROM user WHERE user='';

Adding Unicode support

Change directory to the /etc/ directory, and select the configuration which you prefer. For a “simple” database service without heavy MySQL load, it is recommended to use “my-large.cnf” if you have 2 GB of RAM or more. Copy the configuration file you chose and name the copy /etc/my.cnf.

Edit /etc/my.cnf adding these lines in the section “[mysqld]”:

[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8

This gives you full UTF8 support in your MySQL server, after you restarted it.

More on Unicode / UTF8 character set support is described here: http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf8-in-my-cnf[2977]

Troubleshooting

Server start errors can be seen in the error log that is located by default at /var/lib/mysql/<hostname>.err. Another option is to run the server directly and direct the output to the console (use Ctrl+\ to stop the server). Run:

root@darkstar# /usr/bin/mysqld_safe --console

Resetting the root password can be done by creating a new cnf file and add the following lines (please change the password in this example):

mysql_new.cnf

UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE USER='root';
FLUSH PRIVILEGES;

Save this file (any name would do) and start the server with the –init-file argument:

root@darkstar# /usr/bin/mysqld_safe --defaults-file="new_cnf_file.cnf"

Sources

Originally written by arfon[2978]

howtos, software, mysql, database, author arfon, needs content

ASUS eee PC HowTo

Although this howto was written specifically for the ASUS 1005HA netbook, it may be ported to similar machines.

With Slackware everything works pretty much out of the box for this Asus EEE-pc model. Function keys, however, are not enabled by default, which means additional configuration steps are required.

The scope of this document is to provide a guide for such steps. This document assumes some basic knowledge of Slackware configuration procedures available here[2979].

Powersaving and ACPI

Asus eee PCs are/were popular netbooks. Some linux distros were built specifically for these machines and specific scripts where ported to Slackware.

Enabling ACPI

To enable ACPI, the following parameter should be passed to the kernel:

Append=“Acpi_osi=Linux vt.default_utf8=0”

I recommend to add this parameters using liloconfig logged as root.

EEE PC acpi scripts

Eric Hameleers (aka AlienBOB[2980]) had created a Slackware package[2981] that will enable most of the FN keys functions; however, two FN key functions that I personally find impossible to live without based on my preferences and usage are the FN+F3 (disable touchpad) and FN+Space bar (Super Hybrid Engine).

These could be easily enabled by doing the following:

Touchpad toggle function

Create a text file in /etc/acpi/events/ containing the following code:

event=hotkey ATKD 00000037
action=/etc/acpi/actions/touchpad-toggle.sh

In my case, the file is named touchpad-toggle. This particular file identifies an action once an event is triggered. The “00000037” points specifically to the event of pressing FN+F3 keys combination of the model specified.

To identify the correct code for your keys use Acpi_listen

The Action file /etc/acpi/actions/touchpad-toggle.sh:

#!/bin/bash
#Toggle touchpad
# do nothing if package is removed
PKG=eeepc-acpi-scripts
FUNC_LIB=/usr/share/$PKG/functions.sh
DEFAULT=/etc/default/$PKG
[ -e $FUNC_LIB ] || exit 0
. $FUNC_LIB
. /etc/acpi/lib/notify.sh
action=$1
SYNSTATE=$(synclient -l | grep TouchpadOff | awk '{ print $3}')
# change state
if [ $SYNSTATE = 0 ]; then
synclient touchpadoff=1
msg="Touchpad OFF"
elif [ $SYNSTATE = 1 ]; then
synclient touchpadoff=0
msg="Touchpad ON"
fi
notify touchpad "$msg"

Do not forget to give execute permissions to the actions files (as root) chmod +x /etc/acpi/actions/touchpad-toggle.sh

Enabling SHE function

“Super Hybrid Engine” as it's known under Windows has a significant effect on powersaving. This underclocks the FSB for powersave/overclocks for performance. This is achieved by laptop-mode-tools.

I recommend using the SlackBuild script available at http://slackbuilds.org/repository/14.0/system/laptop-mode-tools/[2982]

Once laptop-mode-tools is installed we could proceed with enabling the control of the FSB by pressing FN+Space bar combo by creating a file in the /etc/acpi/events directory just as we did before:

event=hotkey ATKD 00000039
action=/etc/acpi/actions/she.sh

in my case, the file is /etc/acpi/events/cpu.

The Action file /etc/acpi/actions/she.sh:

#!/bin/bash
#Toggle touchpad
# do nothing if package is removed
PKG=eeepc-acpi-scripts
FUNC_LIB=/usr/share/$PKG/functions.sh
DEFAULT=/etc/default/$PKG
[ -e $FUNC_LIB ] || exit 0
. $FUNC_LIB
. /etc/acpi/lib/notify.sh
action=$1
she_names=("performance" "normal" "powersave")
she_value_performance=("0" "0x300")
she_value_normal=( "1" "0x301")
she_value_powersave=( "2" "0x302")
#find current
SYS_DEVICE="/sys/devices/platform/eeepc/cpufv"
she_current=`cat ${SYS_DEVICE}`
if [[ "${she_current}" == "${she_value_performance[1]}" ]]; then
she_next=${she_value_normal[0]}
echo $she_current
elif [[ "${she_current}" == "${she_value_normal[1]}" ]]; then
she_next=${she_value_powersave[0]}
echo $she_current
elif [[ "${she_current}" == "${she_value_powersave[1]}" ]]; then
she_next=${she_value_performance[0]}
echo $she_current
fi
function she_toggle() {
if [[ "${she_names[${she_current/0x30/}]}" != "${she_names[${she_next}]}" ]]; then
msg="Super Hybrid Engine: ${she_names[${she_next}]}"
echo ${she_next} > ${SYS_DEVICE} && msg="Super Hybrid Engine: ${she_names[${she_current/0x30/}]} to ${she_names[${she_next}]}" cpu &
else
msg="Super Hybrid Engine: Already at ${she_names[${she_next}]}"
fi
}
#################################################################
case $1 in
"debug")
print_generic_debug
;;
"powersave")
she_next=2
she_toggle
;;
"normal")
she_next=1
she_toggle
;;
"performance")
she_next=0
she_toggle
;;
*)
she_toggle
;;
esac
notify cpu "$msg"

Do not forget to give execute permissions to the actions files (as root) chmod +x /etc/acpi/actions/she.sh

Video card speed tune up

I've recently learned that this Asus 1005HA Intel chip 945GM/GMS/GME is slightly under clocked in order to provide longer battery life according to the SHE profile. On Windows, the default clock-speed is 166MHz in powersaving mode and 200MHz in High/Super mode. This chip, however, is able to run at 400MHz.

I've only found necessary to set the clock at high speed when using an external monitor with extended desktop while running KDE. I've left the video card clock speed settings separated form the SHE toggle acpi scripts for that specific reason.

The following script will set GMA chipset speeds (run it as root):

#!/bin/sh
case "$1" in
250) val=31 ;;
400) val=33 ;;
200) val=34 ;;
*)
echo "Possible values are: 200, 250, 400." >&2
exit 1
;;
esac
setpci -s 02.0 f0.b=00,60
setpci -s 02.0 f0.b=$val,05

In my case, I called it gma-clock… You just need to call it with the desired speed options you as argument. The only three valid options are 200, 250 and 400.

Sources

Arch linux forums [2983]

linuxquestions[2984]

Originally written by weput[2985] aka kernel-P4N1C[2986]

howtos, asus, eee

Solid State Drives

Installing Slackware 14.1 on a SSD drive

While some of this could be performed after an installation (changing the LVM settings), I'll assume a new installation, because most parts can't be easily performed afterwards.

Partition creation

Create your partitions with fdisk, as cfdisk doesn't automatically aligns your partitions correctly. Parted seems also to do this right and also has a function to check the alignments of partitions. To do this start parted and use the align-check opt command:

# parted
(parted) align-check opt <partition number>

parted now displays <partition number> aligned if the partition is aligned correctly, or <partition number> not aligned if not.

Compare: https://www.gnu.org/software/parted/manual/parted.html#align_002dcheck[2987]

SSDs and LUKS

Here are some points to be observed. First, SSDs and encryption are not a really perfect combination. For best security there should be no information about the contents of the encrypted container, but SSDs internally “load-balance” the write cycles so that the memory is used equally (if you delete something, the device gets notified about the new free space). This method is called TRIM. LUKS intentionally prevents this by never telling the drive which parts of it are in use and which are free for balancing.

This behavior can be turned off, but naturally this has an impact on the security of the encryption. For more information about this, read: http://asalor.blogspot.com/2011/08/trim-dm-crypt-problems.html[2988]

In the following I'll show the steps that are required to enable TRIM with LUKS, if you decide to use it that way. It is assumed that a LUKS+LVM setup is used, as described in README_CRYPT.TXT[2989] section “Combining LUKS and LVM” to which I'll refer for the commands issued.

Formatting the LUKS container

If you have decided to use TRIM, you can skip the part of writing random data to the partition. Format the LUKS container as described in the mentioned section of README_CRYPT.TXT :

# cryptsetup -s 256 -y luksFormat /dev/sdx2

Opening the LUKS container

When opening the encrypted partition, you have to use the parameter --allow-discards:

# cryptsetup --allow-discards luksOpen /dev/sdx2 lukssda2

Modifing the initrd script

Then continue as described in README_CRYPT.TXT with creating the LVM volumes. The next part where care has to be taken is creating the initrd. Here you have to manually patch the

initrd-tree/init

script to assure that the LUKS containers are opened with the

--allow-discards

parameter.

Populate initrd-tree by executing mkinitrd as described in README_CRYPT.TXT. Then, open initrd-tree/init with the editor of your choice and insert --allow-discards at these commands:

/sbin/cryptsetup ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1

changes to

/sbin/cryptsetup --allow-discards ${LUKSKEY} luksOpen ${LUKSDEV} ${CRYPTDEV} </dev/tty0 >/dev/tty0 2>&1

there should be two occurrences of luksOpen in the file. Now with the file changed, call mkinitrd again, but this time without the -c option to prevent the deletion of your modifications.

Continue as described, with modifying your lilo configuration. Because LVM is used in this setup, read also the next section (which could also be performed after rebooting).

SSDs and LVM

The TRIM functionality mentioned in the LUKS section must also specifically enabled for LVM. To activate the issuing of these commands, change

issue_discards = 0

in /etc/lvm/lvm.conf to

issue_discards = 1

and reboot.

howtos, ssd

This only applies to systems running “pure alsa” and not systems that are running pulseaudio. Using the default installs, 14.2 and newer will have pulseaudio and many of the issues below can be fixed by running pavucontrol and changing the default output device.

NOTE: on my systems, my default card is 1 and default device is 0 so I will use 1,0 through out this page

Sound Problems on Slackware

Investigate the problem

See which kernel modules are loaded:

 lsmod | grep snd

Use this information along with your motherboard sound chipset to verify that the correct sound drivers are loading.

See which sound devices are detected by alsa:

aplay -l

Most likely, alsa is loading the correct modules but setting the wrong sound device as default.

Test sound devices to see which one(s) work:

alsamixer 0
<F6>
<select a card(s)>
<adjust volumes and make sure they aren't muted>
<ESC>
aplay -D plughw:0,0 test.wav   (WHERE 0,0 is card/slot 0, device 0 and test.wav is a sound file e.g. /usr/share/sounds/alsa/Noise.wav)
aplay -D plughw:0,1 test.wav
aplay -D plughw:1,0 test.wav
aplay -D plughw:1,1 test.wav

PROBLEM: alsa is setting the wrong device as the default sound; you can force the correct default as follows:

FIX: Create /etc/asound.conf and add an entry for the working card/slot and device:

  defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

-or-

  pcm.!default {
type hw
card 1
device 0
}
ctl.!default {
type hw
card 1
}

OR, if you just want the changes for a single user create ~/.asoundrc in the user's home directory and put the above in it…

PROBLEM: Volume is low even with all controls at max.

FIX: Enable the alsa pre-amp.

1) Edit/Create /etc/asound.conf and add

  pcm.!default {
type plug
slave.pcm "softvol"
}
pcm.softvol {
type softvol
slave {
pcm "dmix:1,0"
}
control {
name "Pre-Amp"
card 1
}
min_dB -5.0
max_dB 20.0
resolution 6
}

WHERE: “dmix:1,0” is card 1 and device 0

2) Reboot

3) After you reboot a PREAMP control is supposed to appear in your mixer controls but, it doesn't due to a quirk. To get it to appear, open and close a media player (mplayer, dragon player or etc.). After you do this, it should appear in the mixer (you may have to SELECT CONTROLS to see it). When you reboot, it will disappear again until you open a media player. To make it 'stick', set your alsa volumes to where you want and run “alsactl store”. The PREAMP controls should appear normally after that.

PROBLEM: No equalizer.

FIX: Enable the equalizer

the alsaequal plugin is not part of Slackware. You can build it from source using slackbuilds.org[2990]

Output can either be from the audio device or the mixer. For the device use the following:

1) Edit/Create /etc/asound.conf and add

 ctl.equal {
type equal;
}
pcm.plugequal {
type equal;
slave.pcm "plughw:1,0";
}
pcm.!default {
type plug;
slave.pcm plugequal;
}

WHERE: “plughw:1,0” is card 1 and device 0 - modify this for a different card or device (default is 0,0 and does not have to be entered)

Should you wish to play from more than one application simultaneously via the mixer (dmix), use the below:

 ctl.equal {
type equal;
}
pcm.plugequal {
type equal;
slave.pcm "plug:dmix";
}
pcm.!default {
type plug;
slave.pcm plugequal;
}

To access the equalizer, run “alsamixer -D equal”

Sources

AlienBOB's webpages and ALOT of Googling.

howtos, hardware, sound, alsa, audio, author arfon

How To Sync Your System Time to Hardware Clock Consistently

Overview

If you are booting multiple Linux distributions on the same machine, you might face the problem of inconsistent time zone settings across distributions. For example, assume you are dual-booting two Linux distributions, Distro X and Distro Y. You have set your BIOS hardware clock to show the local time.

If Distro X is configured to read the hardware clock as local time, it will show the time correctly, but if Distro Y is configured to read the hardware clock as set to UTC, then it will show an incorrect time.

This HOWTO attempts to provide a simple and cross-distribution one-time solution to the issue, making sure all your distributions know that your hardware clock is set to the local time (or UTC if you prefer it).

The other solution to time management on a system is to synchronize your computer's clock with an NTP (Network Time Protocol) server.

Procedure to Synchronize the System Time to Hardware Clock

This is a one-time procedure to ensure that your hardware clock's time zone is correctly and consistently recognized by all the Linux installations you multiboot on a single machine.

Assuming you are dual-booting Distro X and Y, first boot into Distribution X. First check the hardware clock with the following command.

 hwclock --show

If your hardware clock is not set to your local time, then you must set the system time to local time. As root,

Update via NTP: If you installed the ntp package you can:

   ntpdate pool.ntp.org

-or-
Manual update:

   date --set "5 Aug 2012 12:54 IST"

Obviously in the above command you must set your date, time and time zone correctly.

Now as root, synchronize the hardware clock to the current system time as local time.

 hwclock --systohc --localtime

Now the hardware clock is readjusted to the system time and both now point to the local time.

Obviously there are other ways to achieve the same effect, but this process is least likely to confuse as you set initial time inside the Operating System and then adjust the BIOS clock accordingly.

Now boot into Distro Y and follow the same steps as above. It doesn't matter that the hardware clock is now set correctly, you can still reset the clock once to make sure that every distribution you multi-boot recognizes the hardware clock as set to the local time.

Syncing to UTC instead of Local Time

Some people prefer setting their hardware clock to UTC (Universal Coordinated Time) instead of local time. If you want to set your hardware clock to UTC and adjust the date/time accordingly, use the above steps but simply change the hwclock command to

 hwclock --systohc --utc

while setting the hardware clock from your system time.

Be consistent in time settings across Operating Systems when you dual boot. If you use different settings in different Operating Systems, your local time will be messed up.

Sources

Originally written by Harishankar[2991] for the SlackDocs Wiki Project

Based on Harishankar's blog article here [2992]

howtos, time configuration, local time, system time, time, hardware, author vharishankar

GPS-devices

Overview

GPS stands for Global Positioning System. GPS devices (also referred to as GPS receivers) provide the user with his/her geographic coordinates. I'm using a Garmin Etrex Legend HCx; my experiences in this HOWTO refer to this device, but it should also work at least for any Garmin GPS receiver.

Software

I'm mostly using gpsbabel; this command line tool can retrieve and send data from/to a GPS device.
There's also qlandkartegt which can deal with the data provided by the GPS receiver.
Both are available via SlackBuilds.org[2993]

Connecting the Device

When a GPS device is connected to the computer, it becomes recognized as a USB device by udev and the module garmin_gps is loaded. In most cases the module will not work for us. Fortunately gpsbabel comes with its own drivers so the module garmin_gps is not needed. On my computer I've blacklisted it in /etc/modprobe.d/blacklist.conf

udev-rules

If you want to access the device as a non-root user, the following udev rule allows users who are members of the plugdev group to access the GPS device.

# /etc/udev/rules.d/51-garmin.rules
ATTR{idVendor}=="091e", ATTR{idProduct}=="0003", MODE="666", GROUP="plugdev"

Sending Data to the Device

As an example here is the code which transfers a gpx waypoint file to a Garmin GPS device.

gpsbabel -i gpx -f $file -o garmin -F usb:

Further Reading

The website for gpsbabel[2994]
The website for qlandkartegt[2995]
The openstreetmap project[2996]

Sources

* Originally written by Markus Hutmacher[2997]

howtos, gps,, gpsd

Audio and snd-hda-intel

Overview

This HOWTO deals with issues related to sound cards which use the Intel HDA chipset.

Do you encounter audio problems such as:

No sound?

Headphones work but speakers do not?

Speakers work but headphones do not?

Speakers do not mute when headphones are plugged in?

Audio inputs are not recognised?

Diagnosing the issue

Execute the command

lsmod | grep snd

in a terminal window. If there is a reference to snd_hda_intel in the output then the snd-hda-intel kernel module has been loaded as the driver for the controller chip and the codec chips on the HD-audio bus.

Execute the command

aplay -l

in a terminal window. If there are multiple sound devices then you will need to identify and set the sound device that you wish to use. See http://docs.slackware.com/howtos:hardware:sound_problems_on_slackware[2998]

The fix

The snd-hda-intel kernel module tries to autodetect and configure your sound hardware, but this is not always successful. Some further configuration may help.

Often the fix is simple. Just create a file in the /etc/modprobe.d/ directory and provide suitable options to the snd-hda-intel kernel module. The actual file name is not important although it must have a .conf suffix. You could use snd-hda-intel.conf. Names used by other distributions to hold this information include sound.conf and alsa-base.conf.

A simple way is to execute (as root)

echo "options snd-hda-intel model=auto" > /etc/modprobe.d/snd-hda-intel.conf

If you use an editor to create files in /etc/modprobe.d/ be sure to remove any backup copies.

It is probably easiest just to reboot at this stage to check if it works right.

If you have multiple sound devices, then you can specify the index values that are to be assigned to each device, where index=0 is the default. For example, if

aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 3: HDMI 0 [HDMI 0]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: Generic_1 [HD-Audio Generic], device 0: CX20756 Analog [CX20756 Analog]
Subdevices: 1/1
Subdevice #0: subdevice #0

then you could assign card 1 to index=0 with /etc/modprobe.d/snd-hda-intel.conf containing

alias char-major-116 snd
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel
options snd-hda-intel id=Generic_1 index=0
options snd-hda-intel id=Generic index=1

How to find the right options?

Very often the problem has already been solved. Use your favourite internet search engine and search for “snd-hda-intel <Your make> <Your model>”.

If that is unsuccessful then execute

cat /proc/asound/card*/codec* | grep Codec

The output from that command should be something like

  Codec: SigmaTel STAC9227

You can then read the documentation in the file /usr/src/linux/Documentation/sound/alsa/HD-Audio-Models.txt to see a list of possible models that can be used with your codec chip. The default is always model=auto, but it has been reported that some devices seem to need that option supplied explicitly to be made to work.

If that does not work and you are very keen then take a look at the file /usr/src/linux/Documentation/sound/alsa/HD-Audio.txt.

The table below shows options that have been reported to work. Suggestions for additions/amendments are very welcome!

Make | Model | Output of '/sbin/lspci | grep Audio' | Option | Slackware Version
? | ? | 00:1b.0 Audio device: Intel Corporation N10/ICH 7 Family High Definition Audio Controller (rev 01) | options snd-hda-intel model=auto | 13.37
? | ? | 0:1b.0 Audio device: Intel Corporation 6 Series Chipset Family High Definition Audio Controller (rev 05) | options snd-hda-intel model=auto | 13.37
Asus | Eee PC 1001px | ? | options snd-hda-intel model=auto | 13.1 with ALSA 1.0.24
Asus | K50IJ | 00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03) | options snd-hda-intel model=auto, enable_msi=1 | 14.0
Dell | Dimension E520 | 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) | options snd-hda-intel model=3stack | 13.37
Dell | Inspiron 1420 | ? | options snd-hda-intel model=dell | 13.37
Dell | Inspiron 1545 | ? | options snd-hda-intel model=dell-m4-1 | 13.1
Dell | Inspiron 15R i7 | ? | options snd-hda-intel model=dell-s14 | 13.1
Gateway | 4022 | 00:10.1 Audio device: nVidia Corporation MCP51 High Definition Audio (rev a2) | options snd-hda-intel model=3stack | 13.1
Gateway | GT5468 | ? | options snd-hda-intel model=haier-w66 | ?
Gigabyte | GA-M68MT-S2 Motherboard | 00:05.0 Audio device: nVidia Corporation MCP61 High Definition Audio (rev a2) | options snd-hda-intel model=auto | 14.0
HP | Pavilion dv6-2140ca | 01:00.1 Audio device: ATI Technologies Inc RV710/730 | options snd-hda-intel model=hp-dv5, enable_msi=1 | 13.37
Intel | DG965SS motherboard | 00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02) | options snd-hda-intel model=auto | 14.0
Lenovo | X120e | 00:01.1 Audio device: ATI Technologies Inc Device 1314 | options snd-hda-intel index=1 | 13.37 (with 2.6.38.4 kernel from /testing)
Toshiba | Satellite L30-10X | 00:14.2 Audio device: ATI Technologies Inc IXP SB4x0 High Definition Audio Controller (rev 01) | options snd-hda-intel model=hp, enable_msi=1 | 12.0.0, 12.1.0, 12.2.0 (audio input not tested)

.

Sources

Originally written by David Allen[2999] for the SlackDocs Wiki Project

Contributions by Harishankar[3000]

References

/usr/src/linux/Documentation/sound/alsa/HD-Audio.txt

/usr/src/linux/Documentation/sound/alsa/HD-Audio-Models.txt

howtos, hardware, snd-hda-intel, audio, author allend

Connecting to VirginMobile Broadband2Go with an Ovation MC760 USB modem

Using Network Manager

1) Plug in your modem.

2) Open the Network Manager “NETWORK CONNECTIONS” dialog.

3) Click “+ ADD”.

4) “CHOOSE A CONNECTION TYPE” —> “MOBILE BROADBAND”

5) Click CREATE

6) “CREATE A CONNECTION FOR THIS MOBILE BROADBAND DEVICE” —> “NOVATEL WIRELESS CMDA”

7) “COUNTRY OR REGION” Pick what applies to you.

8) “PROVIDER” —> “VIRGIN MOBILE/HELIO”

9) “CONFIRM BROADBAND SETTINGS” —> “APPLY”

10) After this it will ask you for a USERNAME and PASSWORD, leave them blank.

After this, “Virgin Mobile/Helio” should be one of your connection choices.

Using KPPP

1) Plug in the modem

2) AS ROOT: run dmesg and look for the modem's dev node (usually /dev/ttyUSB0)

3) Start KPPP

4) CONFIGURE > MODEMS > NEW

DEVICE TAB-
MODEM NAME: anything you want
MODEM DEVICE: whatever dmesg said (probably /dev/ttyUSB0 )
FLOW CONTROL: hardware
LINE TERMINATION: CR
CONNECTION SPEED: 460800
USE LOCK FILE: checked
MODEM TAB-
Click QUERY MODEM
If everything is correct, you should see MODEM READY then some ATI stuff.

Click OK

5) ACCOUNTS > NEW > MANUAL SETUP

CONNECTION NAME: whatever you want
PHONE NUMBER: #777
AUTHENTICATION: PAP/CHAP
CALLBACK TYPE: none
Click OK

6) Connect!

CONNECT TO: whatever you named the account
USE MODEM: whatever you named the modem
LOGIN ID: anything you want but you have to put in something (I use USER)
PASSWORD: same as you put in LOGIN ID
Click CONNECT

Using PPPD

1) I've done it. I don't remember how.

Sources

Originally written by arfon[3001]

howtos, VirginMobile, Broadband2Go, MC760, author arfon

Brother printer/scanner installation

Brother makes a variety of printers and multifunction devices. There is a strong commitment to Linux support, but the driver packages are offered only in .rpm or .deb format. So what does a Slackware user do?

This example describes the installation of a Brother MFC-J825DW in 64-bit Slackware for printing and scanning.

Prerequisites

Visit the Brother Linux Driver Homepage https://support.brother.com[3002] and download the appropriate drivers in .rpm format. For this device the LPR driver, the cupswrapper driver and the brscan 64bit scanner driver are required. While there, read the install instructions for both the printer driver and the scanner driver. There is a lot there that is irrelevant to Slackware, but also some important information.

Brother printer drivers are 32-bit only (implied by Pre-required Procedure (5) on the Before the Installation page) so for 64-bit Slackware you will need to install at least the multilib glibc-solibs package. Newer models may also require the multilib gcc-g++ package. These packages are available from https://bear.alienbase.nl/mirrors/people/alien/multilib/[3003] and https://slackware.uk/people/alien/multilib/[3004]

You will need to be logged in as root in a terminal window for the following

Package preparation

Convert the original Brother .rpm files to Slackware .txz packages using rpm2txz with the following options.

-c ensures correct file permissions

-S extracts the install scripts in the rpm (as rpm2txz says “USE WITH CAUTION!”)

-n gives a name to the package in standard Slackware format

-d makes a slack-desc from the metadata in the rpm

rpm2txz -c -S -n -d mfcj825dwlpr-3.0.0-1.i386.rpm
rpm2txz -c -S -n -d mfcj825dwcupswrapper-3.0.0-1.i386.rpm
rpm2txz -c -S -n -d brscan4-0.4.1-3.x86_64.rpm

If errors about db4 occur when executing the above commands, remove the contents of /var/lib/rpm. This is unlikely to be a problem on a freshly installed system.

Reviewing and updating the converted packages

Heeding the warning from rpm2txz about using the -S option, review the install/doinst.sh scripts in the converted packages. This is easy to do by opening the package with ark from a filemanager.

In this case only the doinst.sh script for the brscan4 package was altered the to avoid creating symlinks in /usr/lib in 64-bit Slackware.

mkdir temp
cd temp
explodepkg ../brscan4-0.4.1-x86_64-3.txz
nano install/doinst.sh
makepkg -l y -c y ../brscan4-0.4.1-x86_64-3.txz

Create a symlink

ln -s /etc/rc.d/rc.cups /etc/init.d/cups

This allows the Brother install scripts to stop and start the CUPS daemon

Install the converted packages

installpkg mfcj825dwlpr-3.0.0-i386-1.txz
installpkg mfcj825dwcupswrapper-3.0.0-i386-1.txz
installpkg brscan4-0.4.1-x86_64-3.txz

Complete the installation

Follow the instructions from Brother to complete the installation.

Open a web browser and go to http://localhost:631[3005] to configure the printer in CUPS.

Run a command like

brsaneconfig4 -a name=SCANNER model=MFC-J825DW ip=10.1.1.5

to configure the scanner.

It has been reported that some Brother devices with scanning capability have the default scanning mode set to “24bit Color[Fast]” and that this mode is not compatible with Linux. Set your scanning software (e.g. xsane) to use “24bit Color” as the default scanning mode.

Sources

howtos, Brother, printer, scanner, installation, author allend

Use BFQ IO scheduler

Budget Fair Queueing (BFQ) Storage-I/O Scheduler

Why do I want BFQ? -Seems to speed up disk based IO see the Source section for more info.

http://algo.ing.unimo.it/people/paolo/disk_sched/[3006]

First collect your existing kernel configuration.

zcat /proc/config.gz > BFQ_CONFIG

Next prepare your BFQ_CONFIG file (use vi or nano etc). I like to locate “CONFIG_DEFAULT_CFQ” section and make it look like below. Be careful not to have duplicate lines. I'm thinking there is a better way maybe someone could point it out. Basically add the two lines about BFQ change the existing CONFIG_DEFAULT_CFQ to “is not set” and add “CONFIG_DEFAULT_BFQ=y':

CONFIG_IOSCHED_BFQ=y
CONFIG_CGROUP_BFQIO=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
CONFIG_DEFAULT_BFQ=y

You may not need to manually edit the BFQ_CONFIG. I noticed make oldconfig will prompt you about the patches added.

Now grab the code: (I'm using 3.14 in this sample as Slackware-current is currently using 3.14.18)

VERSION=3.14.0-v7r6 # the version you want
wget -nd --no-parent --level 1 -r -R "*.html*" --reject $VERSION \
http://algo.ing.unimo.it/people/paolo/disk_sched/patches/$VERSION

Now copy your config file to /usr/src/linux and rename it to .config
Example: (assuming the config you created above is in your home directory)

cp $HOME/BFQ_CONFIG /usr/src/linux/.config

Next copy these files to /usr/src/linux and then patch (you'll want 0001 to 0003).

cp ./000* /usr/src/linux;cd /usr/src/linux
patch -p1 < 0001-block-cgroups-kconfig-build-bits-for-BFQ-v7r6-3.14.patch
patch -p1 < 0002-block-introduce-the-BFQ-v7r6-I-O-sched-for-3.14.patch
patch -p1 < 0003-block-bfq-add-Early-Queue-Merge-EQM-to-BFQ-v7r6-for-3.14.0.patch

cd /usr/src/linux ;make oldconfig ;make -j4 && make modules_install

copy bzImage and System.map to boot folder

add lilo entry and update lilo.

More Details here Building a Linux Kernel from Source[3007]

Sources

Original source: http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php[3008]

Originally written by ricky_cardo[3009]

Idea from rpi work by ponce adding bfq

howtos

Set Up Sound Blaster Live! 5.1 & Audigy Rx in Slackware

This HOWTO is based on setup experience with following hardware:

Creative Labs Sound Blaster Live! 5.1 ( SB0060)

Creative Inspire T3100 2.1 Speakers

Intel DG965SS motherboard

Intel Core 2 Duo 2.2 GHz E4500 CPU

3 Gb RAM, 500 Gb HDD, Slackware 14.0 32bit Full install, generic kernel.

4 Gb RAM, 1 Tb HDD, Slackware64 14.1 - 64 bit Full install, default huge kernel.

Creative Labs Sound Blaster Audigy Rx ( SB1550 )PCIe on ASUS R8H61/i3 - 3220/ 16 Gb RAM / Slackware64 14.1

Installation and Basic Configuration

Shutdown the computer

Insert the Sound Blaster card into a free PCI slot ( Audigy - in PCIe slot) on your mothherboard.

Try not to block the existing cards' ventilation.

I usually try to put the sound card in the “lowest” slot, most distant from the CPU, and close to the bottom of the case.

When the Sound Blaster card has been installed and secured with a bracket screw, you may turn the computer on and log into Slackware.

After login, you will have working sound from your new sound card.

In order to obtain full control, do the following (in KDE): click on “kmixer > mixer > settings > configure channels…”, and drag & drop all channels you need from the “Available channels” window to the “Visible channels”.

WaveTable MIDI Configuration

Now it's time to set up the WaveTable[3010] feature:

Download the latest awesfx package here: ftp://ftp.suse.com/pub/people/tiwai/awesfx/[3011] (tested with 0.5.1d)

Extract the source tarball, and compile it (with the usual “./configure && make && make install” routine as root)

After that, you need a soundbank aka soundfont - examples of freely available soundfonts are:

http://www.alsa-project.org/~james/sound-fonts/8MBGMSFX.SF2[3012]

http://www.systemshock.org/index.php?topic=3188.0[3013]

http://www.alsa-project.org/~tiwai/awedrv.html#SoundFonts[3014]

Choose one of these soundfont (.sf2) files and copy it to a directory which you may have to create first: /usr/local/share/sounds/sf2/

Then edit /etc/rc.d/rc.local with a text editor (vi[3015], nano[3016]. or midnight commander[3017]'s built-in editor) to initialize the WaveTable.

An example:

#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

echo "SB synth module load!"
/sbin/modprobe snd_emu10k1_synth

echo "sleep for LivE! appear"
sleep 5

echo "Load 8 Mb midi patch set for SB Live! 5.1 soundcard!"

#/usr/local/bin/asfxload /usr/local/share/sounds/sf2/8mbgmsfx.sf2
/usr/local/bin/asfxload /usr/local/share/sounds/sf2/WeedsGM3.sf2

echo "Pause ***** Sleep 10 ********"
sleep 10

You can comment the “sleep” command (using a # character at the beginning of the line) - it pauses the computer for N seconds. I added that “sleep” to get time to check whether the soundfont is being loaded without errors during startup.

The command “modprobe snd_emu10k1_synth” is needed here, because without it, I have experienced the error “No Emux synth hwdep device is found” when trying to load a soundfont at this stage of the boot.

When i try to load a soundfont after I login to KDE, it succeeds without requiring that “snd_emu10k1_synth” commandline in rc.local, but as I want to load a soundfont automatically at startup, I load that module as shown in the example code)

After these preparations and a restart, everything should be working and you can use your MIDI WaveTable device.

Playing MIDI

For playing MIDI (.mid) files you can use the Audacious[3018] program - in KDE that can be found under Start > Multimedia > Audacious (Music Player).

Start Audacious, and choose File > Preferences

Choose Plugins tab, then Input tab, and choose AMIDI-Plug (MIDI Player)

In the AMIDI-Plug Settings window, choose Preferences, then ALSA backend

You will see ALSA output Ports. Choose (by ticking the checkbox) 17:0 Emu10k1 WaveTable Emu10k1 Port 0

Press Ok and close all configuration dialogs.

Now you can play your MIDI files in Audacious.

If you encounter any problems, or found an error in this HOWTO, please contact m e: john AT sten.lv.

Play files from CLI

For playing MIDI (.mid) files under Command Line Interface, you can use a aplaymidi command from slackware, or download and install pmidi from http://slackbuilds.org[3019] . The both programms is very similar in use and syntax. To play MIDI via aplaymidi:

do

aplaymidi -l

you get something like this:

 aplaymidi -l
Port    Client name                      Port name
14:0    Midi Through                     Midi Through Port-0
16:0    SB Audigy 2 Value [Unknown]      Audigy MPU-401 (UART)
16:32   SB Audigy 2 Value [Unknown]      Audigy MPU-401 #2
17:0    Emu10k1 WaveTable                Emu10k1 Port 0
17:1    Emu10k1 WaveTable                Emu10k1 Port 1
17:2    Emu10k1 WaveTable                Emu10k1 Port 2
17:3    Emu10k1 WaveTable                Emu10k1 Port 3

now you must define hw wavetable port for programm and midi file to play:

 aplaymidi -p 17:0 BBEE.MID

To play another types of files ( .wav .flac .mp3 and so on) you can use “play” command. in default it use default sound card for output.

play loona.mp3

loona.mp3:

File Size: 3.44M     Bit Rate: 112k
Encoding: MPEG audio
Channels: 2 @ 16-bit
Samplerate: 44100Hz
Replaygain: off         Artist: Loona
Duration: 00:04:05.48  Title: Hijo de la La Luna

You also can use mixer for change volume:

alsamixer

TroubleShooting

Diagnostic and information gathering

For first -try gathering some useful information about your situation:

 lspci

Gives you info about hardware devices sits on PCI and PCIe bus of your computer

 cat /proc/asound/cards

gives you information about cards found your sound system and its numerating. 0 card is be default card.

there is also some another useful commands:

 aplay -l

and

 aplay -L

and even

 lsmod

Make a right soundcard as first (default)

Firstly, make a file called sound.conf under /etc/modprobe.d/ :

##alias char-major-116 snd
options snd cards_limit=2 slots=snd-emu10k1,snd-hda-intel
# LHB6.mOmgEN0gox0:SBLive! 5.1 Digital Model SB0220
alias snd-card-0 snd-emu10k1
alias sound-slot-0 snd-emu10k1
# W60f.x8s5HMdIibD:82801EB/ER (ICH5/ICH5R) AC'97 Audio Controller
alias snd-card-1 snd-hda-intel
alias sound-slot-1 snd-hda-intel

##options snd-emu10k1 enable=1 index=0 max_buffer_size=756
options snd-emu10k1 enable=1 index=0 max_buffer_size=1750

options snd-hda-intel enable=1 index=1

Problems with SoundFonts

SB Live! And Audigy Rx use similar DSP - emu10k based, and looks like have similar problems.

As i read, problem root is in that fact, a DSP use 31 bit in memory address instead of 32 bits - and it causes problem on linux x64 systems with more than 2 (3?) Gb RAM.

I encounter that with 4 Gb RAM on Slackware64 14.1 - the symptoms is that, you cannot load soundfont larger than 16 Mb - asfxload on trying that writes:

sfxload: no memory left

while asfxload -M gives something like this:

DRAM memory left = 115576 kB

it means - about 100+ megabytes free ram. But you really cannot load even 30 Mb soundbank.

Ok, what is workaround? There is two: decrease memory size used by system at boot stage to 2 Gb - use at lilo kernel parameter

memmap=2048M\\$6144M

Other is more usable - change kernel source files and recompile kernel:

go to /usr/src/~linux - that is your linux source.

arch/x86/include/asm/dma.h

change in string:

/* 4GB broken PCI/AGP hardware bus master zone */
#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)

change 4UL to 2UL:

  /* 4GB broken PCI/AGP hardware bus master zone */
#define MAX_DMA32_PFN ((2UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)

after that need to recompile kernel. after that you get usable 1 Gb RAM for SB Live /Audigy Rx soundfonts.

if you want more than 1 Gb for soundfonts - you need edit also:

sound/pci/emu10k1/emu10k1.c

      err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card);
if (err < 0)
return err;
if (max_buffer_size[dev] < 32)
max_buffer_size[dev] = 32;
// else if (max_buffer_size[dev] > 1024)
//      max_buffer_size[dev] = 1024;
if ((err = snd_emu10k1_create(card, pci, extin[dev], extout[dev],
(long)max_buffer_size[dev] * 1024 * 1024,
enable_ir[dev], subsystem[dev],
&emu)) < 0)
goto error;

you must comment that strings, as in upper block:

 else if (max_buffer_size[dev] > 1024)
max_buffer_size[dev] = 1024;

And then there is one else thing: default memory size for soundfonts is 128 Mb. If you want to increase it, you must create a sound.conf file in /etc/modprobe.d/

write in file /etc/modprobe.d/sound.conf :

options snd-emu10k1  max_buffer_size=1750

where max_buffer_size reffers to amount of RAM dedicated to soundfonts, in megabytes. in that case its about 1.7 Gb.

after that you can use up to 2 Gb RAM for soundfonts loading ( when define that in max_buffer_size, and do restart).

Useful Links:

http://www.alsa-project.org/~tiwai/awedrv.html[3020]

http://alsa.opensrc.org/Emu10k1[3021]

http://www.systemshock.org/index.php?topic=3188.0[3022]

http://www.simpilot.net/~richnagel/#downloads[3023]

http://alsa.opensrc.org/Asfxload[3024]

http://vladimir-stupin.blogspot.com/2012/05/midi-debian-gnulinux.html[3025] (in russian)

https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456[3026]

https://github.com/koppi/renoise-refcards/wiki/HOWTO-setup-EMU10k-soundfont-DSP-on-Ubuntu-11.10[3027]

http://www.linuxquestions.org/questions/slackware-14/sound-problems-in-slackware64-14-1-xfce-4175497387/[3028]

Sources

Originally written by — John Ciemgals[3029] 2013/02/07 04:50

Rewrited with used materials from “Links” and LinuxQuestions.org Slackware forum, especially user Drakeo help — John Ciemgals[3030] 2014/03/19 01:15

Edited by — mfillpot[3031]

howtos, soundblaster, live, Audigy, Rx, wavetable, soundbank, soundfont, sfxload, author wisedraco

Slackware 14.0 on an Acer Aspire One ZA3

Slackware 14.0 easily installs on an Acer Aspire One ZA3, but X windows crashes. I found a fix that works from another Slacker. When Slackware 14.0 boots up log in as root and enter this command:

# rmmod poulsbo psb_gfx

Then exit root user, log in as your regular user and start X windows. I use startx.

I am pleased to note that my Acer Aspire One ZA3 netbook now functions properly with Slackware-current using the 3.8.4 kernel. All is well.

Sources

based on this post[3032]

howtos, author hitest

Chromebook Pixel

This HOWTO covers installing and configuring Slackware (tested with -current/14.2) on a 2015 Chromebook Pixel. Older versions of Slackware (older kernel) and the 2013 Chromebook Pixel may run into issues. There are a couple main sources of information for running Linux on the Pixel (see Sources[3033]); for the best experience under Slackware, we'll need to use a combination of each guide.

Preparation

Before installing Slackware on your Chromebook Pixel, you will need to enable developer mode and allow for USB boot devices.

Developer Mode

From ChromeOS, hold down ESC and F3 (the refresh key), and press the power button. This will reboot the device into Recovery Mode. From there, press Ctrl-D, and confirm that you wish to enable developer mode. Your device will reboot.

Once Developer Mode is enabled, you will see a white screen with a warning on every boot. To boot into Chrome OS normally, press Ctrl-D. To view the boot menu, press Ctrl-L. Pressing Space will prompt you to reset the Chromebook and replace Chrome OS.

Legacy Boot

Back in Chrome OS, you'll need to enter shell (Ctrl-Alt-T), and enter the following:

> shell
> sudo bash
> crossystem dev_boot_usb=1 dev_boot_legacy=1

From here, prepare your USB installer with Slackware and reboot the device. Make sure to press Ctrl-L to enter the boot menu, and choose your USB device.

Installation

When you reboot and choose to boot the Slackware installer, make sure to enter the following at the Slackware boot prompt:

huge.s vga=0x340

This will ensure a normal display for the installation. From here, follow the standard Slackware installation procedure[3034].

It is recommended to add “libata.force=noncq” to the append section of your lilo.conf. Additionally, you can add “video=1600×1062” or “video=1920×1275” if you'd prefer a more readable console resolution.

After completing the installation, reboot, press Ctrl-L to view the boot menu, and choose the new partition listed. You should now be able to boot into your Slackware installation.

Drivers

Out of the box, you will find that the touchpad and sound do not work. Wifi, the HiDPI display and touchscreen should all be picked up natively. It is strongly recommended that you build the linux-samus kernel for the best compatibility. You can find the source here: https://github.com/raphael/linux-samus[3035].

Run the following to download, build, and install the new kernel (which is currently 4.4.6, despite being named 4.4.2ph):

$ git clone https://github.com/raphael/linux-samus
$ cd linux-samus/build/linux
$ make nconfig
$ make -j4
$ sudo make modules_install
$ sudo make install

By default, it will replace the symlinks in /boot/, so simply reboot and you should be all set.

For touchpad, brightness, and X acceleration, using the scripts provided by linux-samus should be sufficient. You will need to enable two-finger scrolling and/or tap-to-click through your desktop environment's settings. By default, natural scrolling and forward/back navigation should work with the touchscreen. Also interesting: the Pixel bar works natively (showing battery on tap, and playing a series of lights when entering the Konami Code[3036] on the keyboard).

Sound

The Pixel uses bcm-rt5677 for sound, which is not part of the mainline kernel. The custom linux-samus kernel patches this in and enables it for you, though some additional configuration is likely required. There is an all-in-one sound.sh script that should be run initially. Additionally, on every reboot, you will likely need to re-run the following to re-enable sound:

$ cd linux-samus/scripts/setup/sound
$ ALSA_CONFIG_UCM=ucm/ alsaucm -c bdw-rt5677 set _verb HiFi

You can add this to a startup script (~/.xinitrc for example) to have it automatically enabled in the future.

The handler for ACPI does not work out of the box under Slackware. If you change /etc/acpi/handler.sh to /etc/acpi/acpi_handler.sh in sound.sh, the proper rules will be added, but even so, some custom edits will need to be made. That said, you can run alsamixer or open your preferred volume control and simple change the source from “Speakers” to “Headphones” to switch between them.

Resolution

Natively, the Chromebook Pixel runs at a 2560×1700 resolution, which is picked up by Linux. However, other resolutions typically are not (all other resolutions available are 16:9, and will stretch or black bar your display). In order to use a lower resolution (e.g. 1920×1275 or 1600×1062), you'll need to add them to xrandr. First, get the mode line for your preferred resolution:

$ cvt 1920 1275
1920x1275 59.97 Hz (CVT) hsync: 79.28 kHz; pclk: 205.50 MHz
Modeline "1920x1275_60.00"  205.50  1920 2056 2256 2592  1275 1278 1288 1322 -hsync +vsync

Copy the last line, starting with the double quotes, and run the following:

$ xrandr --addmode eDP1 "1920x1275_60.00"  205.50  1920 2056 2256 2592  1275 1278 1288 1322 -hsync +vsync

From there, you can either alter the resolution via your desktop environment's display setting, or using xrandr:

$ xrandr --output eDP1 --mode 1920x1275

For other resolutions, simply repeat the process. It is recommended to add one (or more) resolution to a startup script to automatically add, or set, the native resolution on startup.

Keyboard

Natively, the search key will register as Super/Mod4 under Slackware. Likewise, the special keys along the top row will all register as F-keys. If you wish to use some of the special keys available on the Chromebook, it is recommended to use your desktop environment's keyboard shortcut settings, or an alternative program like xbindkeys[3037].

Sources

Slackware64 on the Chromebook Pixel 2015 (no longer maintained)[3038]

Linux for the Chromebook Pixel 2015[3039]

Developer Information for Chromebook Pixel[3040]

See Also

Chromebook Pixel on ArchWiki[3041]

howtos, hardware, installation, chromebook, pixel

Slackware ARM current gcc-10.3.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4

Preface

With the recent updates on Slackware ARM[3402] (December 2020) to gcc-10.x this is an ARMv8 aarch64 cross-compiler bash script that's intended for building binaries from source code and turning them into Slackware packages. Or whatever use you may find for this script.

Previous work in this area[3403] had been done for gcc-9.x and the build script and intructions are mostly the same. Some of the code in the script has changed from the old version, with updated versions and especially the patching.

Notes

Slackware ARM current was used on a Raspberry Pi 4 [4GB RAM] to build and install the gcc-10.3.0 aarch64-linux cross-compiler.

The Linux kernel source downloaded is from the Raspberry Pi Github repository: https://github.com/raspberrypi/linux[3404]

For usage see the commented section at the top of the script itself. It explains pretty much everything you need to know in order to get started and be successful. If you need to you can refer to the instructions on this page[3405] as they are exactly the same, apart from the version numbers.

NB: 'libsanitizer asan' will need patching before building glibc. The issue itself is that no PATH_MAX has been defined in the source and there needs to be a value set in order for it to compile successfully. The patching is all done by the script code. No user input is required after running it.

Requirements

As a pre-requisite, you should have;

a Raspberry Pi 3 or 4 (i.e. a 64bit CPU) running Slackware ARM current with as much unused [>= 5GB] storage space on your system as possible.

gawk[3406], git[3407], bison[3408] and flex[3409], already installed on your system.

Aarch64 cross-compiler script code

Download the 'SARPi64.SlackBuild-gcc-10.3-aarch64-cc.sh' file by clicking the link at the top of the script code (or copy and paste the code if you prefer) below.

Make the file executable using 'chmod +x SARPi64.SlackBuild-gcc-10.3-aarch64-cc.sh' or 'chmod 755 SARPi64.SlackBuild-gcc-10.3-aarch64-cc.sh' command.

Refer to the commented top section of the script code for usage.

SARPi64.SlackBuild-gcc-10.3-aarch64-cc.sh

#! /bin/bash

##############################################################################
# Slackware ARM gcc-10.3.0 aarch64 cross-compiler for Raspberry Pi
#
# SARPi64.SlackBuild-gcc-10.3.0-aarch64-cc [v3.0] - 2021-04-22
#
# 2020-12-29 by Exaga   -   v3.0   -  gcc-10.x
# 2019-07-10 by Exaga   -   v2.0   -  gcc-9.x
# 2016-12-17 by Exaga 	-   v1.0   -  gcc-5.x
# 2016-12-12 by Exaga 	-   v0.2b  -  beta
# 2016-12-05 by Exaga 	-   v0.1a  -  alpha
#
##############################################################################
#
# This script downloads RPi Linux kernel source and the required binaries,
# and configures, builds, patches, and installs a gcc 10.3.x aarch64-linux
# cross-compiler on Slackware ARM current running on a Raspberry Pi 3/4.
#
### Usage & Installation ###
# You should create a 'build-dir' folder and copy this script to it
# (e.g. /tmp/build-dir) and run it from there as a 'root' user.
#
# ~# chmod +x SARPi64.SlackBuild-gcc-10.3-aarch64-cc.sh
# ~# ./SARPi64.SlackBuild-gcc-10.3-aarch64-cc.sh
#
# You may install the cross-compiler anywhere you like, as long as it can be
# accessed by a normal user (i.e. not 'root'). The default is /tmp/.gcc-cross
# but if this is not suitable then set your own installation directory with
# INSTALL_PATH variable, in the settings below.
#
# Ensure 'bison', 'flex', 'gawk', and 'git' are installed on your system
# before running this script! Use these commands to check:
#
# ~# whereis gawk
# ~# whereis git
# ~# whereis bison
# ~# whereis flex
#
# If you need to install any of the packages above [* check for updates!]:
# http://slackware.uk/slackwarearm/slackwarearm-current/slackware/a/gawk*.txz
# http://slackware.uk/slackwarearm/slackwarearm-current/slackware/d/git*.txz
# http://slackware.uk/slackwarearm/slackwarearm-current/slackware/d/bison*.txz
# http://slackware.uk/slackwarearm/slackwarearm-current/slackware/d/flex*.txz
#
# NB: The gcc package you compile should match your currently installed gcc
# version. Use this command to check your current gcc version:
#
# ~# gcc --version
#
# More recent gcc packages-versions may exist. You may wish to install them.
# NB: if you use newer packages - glibc version _MUST_ suit gcc version! The
# thing to make sure is the release dates of gcc and glibc versions being as
# close as possible.
#
# binutils - https://ftp.gnu.org/gnu/binutils/
# cloog - ftp://gcc.gnu.org/pub/gcc/infrastructure/
# gcc - https://ftp.gnu.org/gnu/gcc/
# glibc - https://ftp.gnu.org/gnu/glibc/
# gmp - https://ftp.gnu.org/gnu/gmp/
# isl - ftp://gcc.gnu.org/pub/gcc/infrastructure/
# mpfr - https://ftp.gnu.org/gnu/mpfr/
# mpc - https://ftp.gnu.org/gnu/mpc/
#
### IMPORTANT! ###
# This script will export the INSTALL_PATH variable into the $PATH.
# The PATH of the cross-compiler should always be the first item in
# the $PATH. PATH command:
#
# ~# export PATH=/tmp/.gcc-cross/bin:$PATH
#
# To check that the INSTALL_PATH is in your $PATH use this command:
#
# ~# echo $PATH
#
### Usage ###
# This script was created on Slackware ARM and intended for research and
# development towards a Slackware AArch64 port. This script may work on
# other Linux distributions and hardware but it has not been tested and
# therefore cannot be verified. It may be freely distributed, copied,
# modified, or plagiarised in the hope that it will be of some use towards
# the goal of Slackware AArch64.
#
### Resource(s) ###
# http://www.slackware.com
# http://slackware.uk
# http://arm.slackware.com/FAQs
# http://wiki.osdev.org/GCC_Cross-Compiler
# https://www.raspberrypi.org/documentation/linux/kernel
# https://www.github.com/raspberrypi
# https://ftp.gnu.org/gnu
# ftp://gcc.gnu.org/pub/gcc/infrastructure
#
##############################################################################

# Installation directory - edit INSTALL_PATH as required
INSTALL_PATH=/tmp/.gcc-cross

# Required build packages-versions [* newer versions may exist]
BINUTILS_VERSION=binutils-2.36
CLOOG_VERSION=cloog-0.18.1
GCC_VERSION=gcc-10.3.0
GLIBC_VERSION=glibc-2.33
GMP_VERSION=gmp-6.2.1
ISL_VERSION=isl-0.18
MPFR_VERSION=mpfr-4.1.0
MPC_VERSION=mpc-1.2.1

# RPi GitHub Linux source - working branch [e.g. rpi-4.14.y | rpi-4.19.y | rpi-5.2.y ]
DEV_BRANCH=rpi-5.10.y

#############################################################################
## DO NOT EDIT ANYTHING BELOW THIS LINE UNLESS YOU KNOW WHAT YOU'RE DOING! ##
#############################################################################

# Halt build process on error [with output]
set -euo pipefail
IFS=$'\n\t'
# Uncomment for additional error output when testing/debugging
#trap 'previous_command=$this_command; this_command=$BASH_COMMAND' DEBUG
#trap 'echo "exit $? due to $previous_command"' EXIT

# Build variables
PRGNAM=SARPi64.SlackBuild-aarch64-cc
ARCH_TARGET=aarch64-linux
LINUX_ARCH=arm64
QUADLET=aarch64-unknown-linux-gnu # aarch64-arm-none-eabi
LINUX_FLAVOUR=linux-rpi
RPI_GITURL_LINUX=https://github.com/raspberrypi
BUILD_LANGUAGES="--enable-languages=c,c++" # --enable-languages=all,ada,c,c++,fortran,go,jit,lto,objc,obj-c++
ALT_CONFIG_OPTIONS="--disable-multilib" # --disable-threads --disable-shared --disable-multiarch
TEST_CONFIG_OPTIONS="--with-arch=armv8-a --with-tune=cortex-a72 --with-fpu=vfpv3-d16 --with-float=hard" #
RPI4_CONFIG_OPTIONS="--prefix=$INSTALL_PATH --target=arm-linux-gnueabihf --enable-languages=c,c++ --with-arch=armv8-a --with-fpu=vfp --with-float=hard --disable-multilib" #
PARALLEL_JOBS=-j4 # https://www.gnu.org/software/make/manual/html_node/Parallel.html
CWD=$(pwd)

# Define CONFIG_OPTIONS for build
CONFIG_OPTIONS=$ALT_CONFIG_OPTIONS

# Uncomment to log EVERYTHING during build process [** WARNING! HUGE log filesize! **]
#LOGFLE=${PRGNAM}_build_$(date +"%F").log
#exec 1> >(logger -s -t $(basename $0)) 2>&1 > $LOGFLE

# Output aesthetics
sarpiSP64 () {
echo
echo " ############################################"
echo " ## $PRGNAM "
echo " ## Build: $GCC_VERSION  Kernel ${DEV_BRANCH} "
echo " ## Timestamp: $(date '+%F %T') "
echo " ## SARPi64 Project [sarpi64.penthux.net] "
echo " ############################################"
echo
}

sarpiSP64
echo "Starting $PRGNAM build ..."

# INSTALL_PATH needs to be at the front of $PATH
# Command: export PATH=/tmp/.gcc-cross/bin:$PATH
echo "Checking $ARCH_TARGET $INSTALL_PATH/bin \$PATH ..."
if [[ ! "$PATH" =~ $INSTALL_PATH ]]; then
export PATH=/"${INSTALL_PATH}"/bin:$PATH
# echo -e $INSTALL_PATH/bin:$(cat $PATH) > $PATH || exit 1
else
echo "Found $INSTALL_PATH\/bin in \$PATH : OK! ... "
fi

# Prerequisite packages
BISON_REQ=$(which bison)
FLEX_REQ=$(which flex)
GAWK_REQ=$(which gawk)
GIT_REQ=$(which git)

# Check prerequisites are installed, or exit
if [ ! -e "$BISON_REQ" ]; then
echo "ERROR: bison not found!"
echo "Install bison before you run this script!"
exit 1
elif [ ! -e "$FLEX_REQ" ]; then
echo "ERROR: flex not found!"
echo "Install flex before you run this script!"
exit 1
elif [ ! -e "$GAWK_REQ" ]; then
echo "ERROR: gawk not found!"
echo "Install gawk before you run this script!"
exit 1
elif [ ! -e "$GIT_REQ" ]; then
echo "ERROR: git not found!"
echo "Install git before you run this script!"
exit 1
else
echo "Prerequisite packages are installed ..."
fi

# Download RPi kernel source ** this may take a while **
cd "$CWD"
echo "Checking kernel $DEV_BRANCH source ..."
if [ ! -e $LINUX_FLAVOUR/Makefile ]; then
echo "Downloading kernel $DEV_BRANCH source ..."
git clone --depth=1 $RPI_GITURL_LINUX/linux.git --branch $DEV_BRANCH $LINUX_FLAVOUR
fi
cd $LINUX_FLAVOUR
echo "Checking kernel $DEV_BRANCH branch for updates ..."
git checkout -f $DEV_BRANCH
cd "$CWD"

# Download gcc and related packages to build cross-compiler
echo "Downloading packages ..."
if [ ! -d "$CWD"/$BINUTILS_VERSION ]; then
wget -nc --progress=bar https://ftp.gnu.org/gnu/binutils/$BINUTILS_VERSION.tar.gz
tar -xvf $BINUTILS_VERSION.tar.gz
fi
if [ ! -d "$CWD"/$GCC_VERSION ]; then
wget -nc --progress=bar https://ftp.gnu.org/gnu/gcc/$GCC_VERSION/$GCC_VERSION.tar.gz
tar -xvf $GCC_VERSION.tar.gz
fi
if [ ! -d "$CWD"/$GLIBC_VERSION ]; then
wget -nc --progress=bar https://ftp.gnu.org/gnu/glibc/$GLIBC_VERSION.tar.xz
tar -xvf $GLIBC_VERSION.tar.xz
fi
if [ ! -d "$CWD"/$GMP_VERSION ]; then
wget -nc --progress=bar https://ftp.gnu.org/gnu/gmp/$GMP_VERSION.tar.xz
tar -xvf $GMP_VERSION.tar.xz
fi
if [ ! -d "$CWD"/$MPFR_VERSION ]; then
wget -nc --progress=bar https://ftp.gnu.org/gnu/mpfr/$MPFR_VERSION.tar.xz
tar -xvf $MPFR_VERSION.tar.xz
fi
if [ ! -d "$CWD"/$MPC_VERSION ]; then
wget -nc --progress=bar https://ftp.gnu.org/gnu/mpc/$MPC_VERSION.tar.gz
tar -xvf $MPC_VERSION.tar.gz
fi
if [ ! -d "$CWD"/$ISL_VERSION ]; then
wget -nc --progress=bar ftp://gcc.gnu.org/pub/gcc/infrastructure/$ISL_VERSION.tar.bz2
tar -xvf $ISL_VERSION.tar.bz2
fi
if [ ! -d "$CWD"/$CLOOG_VERSION ]; then
wget -nc --progress=bar ftp://gcc.gnu.org/pub/gcc/infrastructure/$CLOOG_VERSION.tar.gz
tar -xvf $CLOOG_VERSION.tar.gz
fi

# Create symbolic links so gcc builds these dependencies automatically
echo "Creating symbolic links in gcc ..."
cd "$CWD"/$GCC_VERSION
ln -sf ../$MPFR_VERSION mpfr
ln -sf ../$GMP_VERSION gmp
ln -sf ../$MPC_VERSION mpc
ln -sf ../$ISL_VERSION isl
ln -sf ../$CLOOG_VERSION cloog

# Create aarch64 cross-compiler install directory
echo "Creating $INSTALL_PATH directory ..."
rm -rf $INSTALL_PATH
mkdir -p $INSTALL_PATH
chown "$(whoami)" $INSTALL_PATH
cd "$CWD"

# Build binutils
echo "Building binutils ..."
rm -rf build-binutils
mkdir build-binutils
cd build-binutils
../$BINUTILS_VERSION/configure --prefix=$INSTALL_PATH --target=$ARCH_TARGET $CONFIG_OPTIONS
make $PARALLEL_JOBS
echo "Installing binutils ..."
make install

# Install Linux kernel headers
echo "Installing kernel headers ..."
cd "$CWD"/$LINUX_FLAVOUR
make ARCH=$LINUX_ARCH INSTALL_HDR_PATH=$INSTALL_PATH/$ARCH_TARGET headers_install
cd "$CWD"

# Build gcc C and C++ cross-compilers
echo "Building gcc $ARCH_TARGET C,C++ cross-compiler ..."
mkdir -p build-gcc
cd build-gcc
../$GCC_VERSION/configure --prefix=$INSTALL_PATH --target=$ARCH_TARGET $BUILD_LANGUAGES $CONFIG_OPTIONS
make $PARALLEL_JOBS all-gcc
echo "Installing gcc $ARCH_TARGET cross-compiler to $INSTALL_PATH ..."
make $PARALLEL_JOBS install-gcc

# create gcc-10.3.0 libsanitizer asan_linux-cpp.patch file
cd "$CWD"
touch asan_linux-cpp.patch
cat << EOF > asan_linux-cpp.patch
--- gcc-10.3.0/libsanitizer/asan/asan_linux.cpp	2021-04-08 12:56:30.229766760 +0100
+++ asan_linux.cpp.new	2021-04-22 13:26:26.000000000 +0100
@@ -76,6 +76,10 @@
asan_rt_version_t  __asan_rt_version;
}

+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
namespace __asan {

void InitializePlatformInterceptors() {}

EOF

# Patch gcc-10.3.x/libsanitizerasan/asan_linux.cpp [or the build will fail]
ASANLINUXCC=$CWD/$GCC_VERSION/libsanitizer/asan/asan_linux.cpp
if [ ! -f "$ASANLINUXCC".orig ]; then
echo "Patching $ASANLINUXCC ..."
patch -b "$ASANLINUXCC" asan_linux-cpp.patch || exit 1
sarpiSP64
echo "$ASANLINUXCC has been PATCHED! ..."
echo "Backup of original: $ASANLINUXCC.orig ..."
sleep 10
fi

# Build and install glibc's standard C library headers and startup files
echo "Building glibc library headers ..."
mkdir -p build-glibc
cd build-glibc
../$GLIBC_VERSION/configure --prefix=$INSTALL_PATH/$ARCH_TARGET --build="$MACHTYPE" --host=$ARCH_TARGET --target=$ARCH_TARGET --with-headers=$INSTALL_PATH/$ARCH_TARGET/include $CONFIG_OPTIONS libc_cv_forced_unwind=yes
make $PARALLEL_JOBS install-bootstrap-headers=yes install-headers
make $PARALLEL_JOBS csu/subdir_lib
echo "Installing glibc library headers ..."
install csu/crt1.o csu/crti.o csu/crtn.o $INSTALL_PATH/$ARCH_TARGET/lib
$ARCH_TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o $INSTALL_PATH/$ARCH_TARGET/lib/libc.so
touch $INSTALL_PATH/$ARCH_TARGET/include/gnu/stubs.h

# Build glibc support library
echo "Building glibc support library ..."
cd "$CWD"/build-gcc
make $PARALLEL_JOBS all-target-libgcc
echo "Installing glibc support library ..."
make install-target-libgcc

# Finish building glibc's standard C library and install it
echo "Completing glibc C library ..."
cd "$CWD"/build-glibc
make $PARALLEL_JOBS
echo "Installing glibc C library ..."
make install

# Finish building gcc's C++ library and install it
echo "Completing glibc C++ library ..."
cd "$CWD"/build-gcc
make $PARALLEL_JOBS
echo "Installing glibc C++ library ..."
make install
cd "$CWD"

# Check status of aarch64-linux-gcc cross-compiler
echo "Checking status of $ARCH_TARGET-gcc cross-compiler ..."
ARCH_TARGET_STATUS=$(which $ARCH_TARGET-gcc)
$ARCH_TARGET-gcc -v
if [ ! -e "$ARCH_TARGET_STATUS" ]; then
# ERROR!
echo "ERROR: $ARCH_TARGET-gcc not responding!"
sarpiSP64
echo "$(date +"%F %T") : $PRGNAM FAILED! ..."
exit 1
else
# Done!
echo "Verifying $ARCH_TARGET-gcc \$PATH ..."
echo "PATH: $PATH"
echo "Status: $ARCH_TARGET-gcc : READY!"
sarpiSP64
echo "$(date +"%F %T") : $PRGNAM build complete ..."
fi

#
exit 0

#EOF<*>

Configuring the system to use the Aarch64 cross-compiler

Once the cross-compiler has been built and you intend to use it to compile Aarch64 [64bit] binaries, the location of the tool-chains must be exported to your system's $PATH variable. It's also prudent to have this entry appear before all other PATHs. So, for example, to check what your existing $PATH includes, use the 'echo $PATH' command like this:

root@slackware:~# echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/qt/bin

This is the output of the $PATH on our Slackware ARM system before adding the '/path/to/cross-compiler/bin' tool-chain location. Your own $PATH might be very different.

If you didn't change the 'INSTALL_PATH' variable in the build script then the command the script uses to export the PATH will be like this:

root@slackware:~# export PATH=/tmp/.gcc-cross/bin:$PATH

This is the command to use if it doesn't already appear in your system $PATH. Obviously, if you've modified the INSTALL_PATH variable then that location will be used instead of the default. You can check the $PATH variable to ensure that it has been added correctly:

root@slackware:~# echo $PATH
/tmp/.gcc-cross/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/qt/bin

The example output above all looks good because the cross compile PATH appears first before everything else.

Aarch64 cross-compiling 'HOWTO' example

So, when the Aarch64 tool-chains feature in the $PATH on the system, they can be utilised to build software for the ARMv8 architecture instead of your Slackware ARM system's [ARMv7] existing infrastructure. It's all done via the 'make' process.

As an example to show how this can be achieved, the bespoke RPi kernel source 'master' branch will be used. This kernel source will be downloaded and located in '/tmp/linux-rpi' directory. [NB: note that this is NOT '/usr/src/linux' - it should never reside in that standard location for cross-compiling purposes!]. After downloading the Linux source, use 'cd' to the directory where it's located:

root@slackware:~# git clone --depth=1 git://github.com/raspberrypi/linux /tmp/linux-rpi
Cloning into '/tmp/linux-rpi'...
~ Enumerating, Counting, Compressing, yadda yadda yadda ~
Updating files: 100% (66403/66403), done.
root@slackware:~# cd /tmp/linux-rpi/
root@slackware:/tmp/linux-rpi#

We use '–depth=1' option to only download the latest commit and not the entire branch content, which may currently be +10GB in size. The actual disk space amount used for the source that's just been downloaded is:

root@slackware:/tmp/linux-rpi# du -sh /tmp/linux-rpi/
1.2G    /tmp/linux-rpi/

To verify which major/minor revision of the Linux kernel source you're working with, use the 'head' command on the 'Makefile', like this:

root@slackware:/tmp/linux-rpi# head -5 Makefile
# SPDX-License-Identifier: GPL-2.0
VERSION = 5
PATCHLEVEL = 4
SUBLEVEL = 83
EXTRAVERSION =
root@slackware:/tmp/linux-rpi#

At the time of writing, this is kernel 5.4.83 source from the Raspberry Pi Github repository 'master' branch. You can download and work with other branches by simply maniplulating the 'git' command options. Right now the downloaded kernel source is in a “raw state” (i.e. it includes no settings or configurations) and it's not going to build anything until some form of instructions exist regarding specifically how/what/which to compile.

What's missing now is a kernel '.config' - a file that includes instructions (i.e. settings) that's an essential prerequisite in order to compile the Linux source into a resulting kernel image file - and you won't be doing much without creating one first. This is much easier said than done if you're starting from scratch, because it requires intimate knowledge about the the computer/device hardware that you're building the kernel to support. However, with the Raspberry Pis (and many other ARM devices) there is such a thing as a 'default config', or 'defconfig', that can be called to build the kernel '.config' file for you and save a lot of time and effort (and unfortunately a huge amount of education and experience is also wasted in this process). So in the interest of saving time, let's do it the easy and lazy way for this example…

For the Raspberry Pi 3 to build a default kernel '.config' file for Aarch64 architecture:

root@slackware:/tmp/linux-rpi# make ARCH=arm64 CROSS_COMPILE=aarch64-linux- bcm2709_defconfig

For the Raspberry Pi 4 to build a default kernel '.config' file for Aarch64 architecture:

root@slackware:/tmp/linux-rpi# make ARCH=arm64 CROSS_COMPILE=aarch64-linux- bcm2711_defconfig

OK! So, normally you would just use 'make <deviceID>_defconfig' to achieve this but here it's the 'ARCH=arm64 CROSS_COMPILE=aarch64-linux-' that makes ALL the difference. You should now have a '.config' file in your Linux source directory which reflects that. Check it out with the 'head' command:

root@slackware:/tmp/linux-rpi# head -10 .config
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm64 5.4.83 Kernel Configuration
#
#
# Compiler: aarch64-linux-gcc (GCC) 10.3.0
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=100300
root@slackware:/tmp/linux-rpi#

If this is what you see then it's perfect and ready to compile your kernel. In exactly the same way, now 'make' the kernel image, BUT… invoke 'multijobs' as well. Multijobs is the '-j4' option. The '-j<number>' will use more than just a single core of the CPU to build and dramatically cut down on the compile time(s) involved. The RPi3 and RPi4 have quad-core CPUs so it's quite safe to use four cores here, like this:

root@slackware:/tmp/linux-rpi# make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- Image

Incidentally, and very logically, it's the same structure and options to compile the DTBs, kernel-headers, modules, etc. and install them:

root@slackware:/tmp/linux-rpi# make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- dtbs

root@slackware:/tmp/linux-rpi# make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- headers_install

root@slackware:/tmp/linux-rpi# make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- modules

root@slackware:/tmp/linux-rpi# make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- modules_install

NB: Under normal circumstances you wouldn't compile and install the kernel-headers (as they are already included in the kernel) unless you're intending to build external modules or “outside of source-tree” software. If you don't understand what this means or what it entails, then skip the kernel-headers completely.

BEFORE CONTINUING - Make a back-up FIRST of your '/boot/' directory before coping any new files to it, in case things don't go exactly as planned. Only reboot once everything is correctly in place and you have your backup(s) to fall-back on.

So with everything compiled and built, you just need to copy the 'kernel' image, 'DTBs' and 'System.map' to your '/boot' directory. Replace KERNEL_IMAGE with the correct filename of the kernel for your Raspberry Pi device:

NB: For the RPi3 the kernel image is named 'kernel7.img' and for the RPi4 the kernel image is named 'kernel7l.img'. This filename MUST be correct in order for the boot-loader to run the kernel! If you have specified a custom kernel image filename in the '/boot/config.txt' file then you already know what you're doing.

root@slackware:/tmp/linux-rpi# cp -avr arch/arm64/boot/Image /boot/KERNEL_IMAGE"
root@slackware:/tmp/linux-rpi# cp -avr arch/arm64/boot/dts/broadcom/bcm27*.dtb /boot/
root@slackware:/tmp/linux-rpi# cp -avr System.map /boot/System.map

That's it! When you reboot your system it should now be using a 64bit kernel and modules. One should be mindful that Slackware Aarch64[3410] is in development and building kernels using a cross-compiler will soon become superfluous on that system architecture, but for 32bit systems and users a cross-compiler may still be relevant.

I hope this Aarch64 cross-compiler build script and/or information will be useful for Slackware [ARM] users in whatever ways are possible. Any questions or assistance can be addressed via the Linux Questions forum(s)[3411]

Thanks very much for your interest in this Aarch64 cross-compiler on the Raspberry Pi.

Sources

# If you need to install any of the pre-requisite software here are the links [NB: check for updates!]:

ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/[3412] # Slackware ARM current - gawk package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/[3413] # Slackware ARM current - git package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/[3414] # Slackware ARM current - bison package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/[3415] # Slackware ARM current - flex package.
https://www.github.com/raspberrypi/[3416] # Raspberry Pi Foundation GitHub repository Linux kernel and boot-firmware source.
https://ftp.gnu.org/gnu/[3417] # gcc, binutils, glibc, gmp, mpc, mpfr package source.
ftp://gcc.gnu.org/pub/gcc/infrastructure[3418] # cloog, isl package source.

# Documentation which assisted in this guide:

http://arm.slackware.com/FAQs[3419] # Slackware ARM Linux Project Frequently Asked Questions.
http://wiki.osdev.org/GCC_Cross-Compiler[3420] # gcc cross-compiler documentation.
Slackware ARM GCC aarch64-linux cross-compiler[3421] for the Raspberry Pi.
https://www.raspberrypi.org/documentation/linux/kernel[3422] # Raspberry Pi Linux kernel documentation.

* Originally written by Exaga[3423] - 2020-12-31 18:02:17 [GMT]

howtos, slackware, raspberry, pi, arm, aarch64, arm64, armv8, cross-compile, author exaga

Slackware ARM GCC aarch64-linux cross-compiler for the Raspberry Pi

Preface

I was thinking about the Cortex-A53 64-bit CPU on my Raspberry Pi 3 and why I'm mainly using Slackware ARM 32 bit operating system on it. Then I started to wonder if it would be possible to build an arm64 kernel and modules to run with Slackware ARM. After reading about how this could be achieved it seemed clear that some cross-compiling would be required. Although I have some experience in building Linux kernels, especially for the Raspberry Pi platform, I'd never done any cross-compiling before a week ago (2016-12-15). So, this whole concept was brand new to me.

For my first attempt (and largely based on reading about how other users were doing it) I used an Ubuntu 16.04.1 LTS (64 bit) system to cross-compile an arm64 kernel for the Raspberry Pi 3. However, the results of doing things by this method were somewhat lacking and created many unforeseen errors. Then I remembered something Mozes[3424] had published on his Slackware ARM FAQ page[3425] about packages being built natively. Further investigation lead me to realise that assured success would most likely be found by cross-compiling on an ARM device using Slackware ARM. So, that's exactly what I did! Very successfully, might I add. Thanks again, Mozes. <3

As things have turned out, it wasn't that difficult. Investing some time into reading about toolchains and how to build cross-compilers was required, as well as testing the results of cross-compiling, but on the whole it's been a relatively simple process. Using Slackware ARM current to cross-compile aarch64 architecture was the key to success here. I'm now very aware that, in comparison, trying to cross-compile aarch64 on an Ubuntu x86_64 system was less than productive.

Notes

Slackware ARM current was used on a Raspberry Pi 3 to build and install the GCC aarch64-linux cross-compiler, and build the arm64 Linux kernel, modules, and device tree blob(s). That's not to say Slackware ARM 14.2 won't work too, but I just didn't do any cross-compiling on the soft float port. The same applies to the Raspberry Pi 1 and 2. Even though it should be possible to carry out aarch64 cross-compiler builds on these devices, I didn't do any testing with them. Also bear in mind that configuration options and settings will need to be considered first.

Requirements

As a pre-requisite, you should have;

a Raspberry Pi 3 running Slackware ARM current with approx. 8GB unused space on your system.

gawk[3426], git[3427], bison[3428] and flex[3429], already installed on your system.

a USB microSD card reader to connect with your Raspberry Pi 3.

a (spare) microSD card with Slackware ARM current installed on it. # not essential but it is advised.

What's involved

This tutorial will enable you to;

download the required package source(s) in order to build a GCC cross-compiler on Slackware ARM.

download the Raspberry Pi Linux kernel GitHub[3430] tree and switch to the 64 bit development branch.

configure, and install, a GCC aarch64-linux (arm64) cross-compiler on your Raspberry Pi 3.

build an aarch64 (arm64) Linux kernel, modules, and device tree blob(s), and install them on your (spare) Slackware ARM current microSD card.

successfully boot Slackware ARM current on your Raspberry Pi 3 running an aarch64 (arm64) kernel.

In order not to risk messing up the Slackware ARM system which you use for cross-compiling, a (spare) microSD card containing a working Slackware ARM system should be used to install the arm64 Linux kernel, modules, and device tree blob(s). You'll need a recent (i.e. post-September 2016) version of the Raspberry Pi bootloader/GPU firmware[3431] installed on this (spare) microSD card to avoid any problems. To be sure, boot your RPi3 with it and update the firmware. The Linux kernel version on this (spare) microSD card doesn't matter as you'll be replacing it with the aarch64 (arm64) kernel.

Downloading required source and configuration

First of all, as a normal user (i.e. not 'root') create a working directory. For example, I usually work from the /tmp directory:

cd /tmp
mkdir build-dir
cd build-dir

This is the directory you will download all the required packages and RPi Linux source to.

Downloading RPi Linux kernel source

Use the following 'git' command to download the Raspberry Pi Linux kernel source into a directory named 'linux'.

git clone https://github.com/raspberrypi/linux linux

This may take a while, depending on the speed of your Internet connection and other factors. Once it has completed you need to switch to the 64 bit kernel development branch.

cd linux
git checkout rpi-4.8.y

When that's done you should see a message that 'origin/rpi-4.8.y' is the current branch.

Downloading required package source

Before downloading the package source needed to build the GCC cross-compiler, be aware that more recent package versions may exist than the ones shown here. You may wish to install newer versions. It's always a good idea to check. To keep things simple, you might consider downloading a version of GCC which matches the one you currently have installed. I've read lots of articles about this and most advise to install the latest and greatest version of GCC available. However, if you're running Slackware ARM current you'll have gcc-5.4.0 installed and this is adequate for what you need.

So, first move back into the 'build-dir' directory and then download the packages below.

cd ../
wget -nc https://ftp.gnu.org/gnu/binutils/binutils-2.27
wget -nc ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1
wget -nc https://ftp.gnu.org/gnu/gcc/gcc-5.4.0
wget -nc https://ftp.gnu.org/gnu/glibc/glibc-2.24
wget -nc https://ftp.gnu.org/gnu/gmp/gmp-6.1.1
wget -nc ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.16.1
wget -nc https://ftp.gnu.org/gnu/mpc/mpfr-3.1.5
wget -nc https://ftp.gnu.org/gnu/mpfr/mpc-1.0.3

Unpacking downloaded tarballs

Now unpack all the downloaded tarballs. You can do this easily with a 'for loop' command.

for t in *.tar*; do tar -xvf $t; done

Once this has completed you can us the 'ls' command to verify that the directories are present.

Creating GCC dependency symlinks

Now you are going to create some symbolic links in the gcc-5.4.0 directory. These will point to some of the source directories you have just unpacked, which are dependencies of GCC, and when these symbolic links are present GCC will build them automatically.

cd gcc-5.4.0
ln -sf ../cloog-0.18.1 cloog
ln -sf ../gmp-6.1.1 gmp
ln -sf ../isl-0.16.1 isl
ln -sf ../mpfr-3.1.5 mpc
ln -sf ../mpfr-3.1.5 mpfr

Alternatively, some articles will advise you to use the following command in order to achieve the same thing.

cd gcc-5.4.0
./contrib/download_prerequisites

Personally, I always prefer the manual method because then I know what's being downloaded/installed and what to expect. It's up to you which method you use.

Creating GCC cross-compiler install directory

The next thing to do is create an installation directory. This is the directory where the toolchain will be installed. Again, I like to work in /tmp so the install directory will be created there.

cd /tmp
mkdir gcc-cross

Exporting install directory PATH

You need to export the installation directory's /bin folder to your user's $PATH.

export PATH=/tmp/gcc-cross/bin:$PATH

To check that this has worked, use the following command:

echo $PATH

You should see the first $PATH entry is to your installation directory's /bin folder. It's important that your installation directory's /bin folder appears before any other entry in the $PATH.

/tmp/gcc-cross/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin

Building the GCC aarch64 cross-compiler

Now with all that in place, concentration focuses on building the cross-assembler, cross-disassembler, cross-linker, and other useful tools.

Building binutils

First move back into the 'build-dir' directory and then create a build directory for binutils. You'll notice the various build options but as a quick explanation; '–with-sysroot' basically tells binutils to enable 'sysroot' support in the cross-compiler by pointing it to a default empty directory, '–target=aarch64-linux' is the target system type (arm64), and '–disable-multilib' means that we only want binutils to work with the aarch64 instruction set and nothing else.

cd build-dir
mkdir build-binutils
cd build-binutils
../binutils-2.27/configure --prefix=/tmp/gcc-cross --with-sysroot --target=aarch64-linux --disable-multilib
make -j4
make install

Installing Linux kernel headers

Here you need to install the Linux kernel headers. Note the 'ARCH=arm64' option for the make process. GCC uses 'aarch64' where the Linux kernel uses 'arm64'. The two separate open source projects identify the same CPU architecture differently.

cd ../linux
make ARCH=arm64 INSTALL_HDR_PATH=/tmp/gcc-cross/aarch64-linux headers_install

Build GCC

First move into the 'build-dir' directory and create a build directory for GCC before building it. Notice that only C and C++ have been specified as build languages. That's all you will need here. Incidentally, the available build language options allow just one, or a selection, or all, of the following '–enable-languages=all,ada,c,c++,fortran,go,jit,lto,objc,obj-c++'.

cd ../
mkdir build-gcc
cd build-gcc
../gcc-5.4.0/configure --prefix=/tmp/gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
make -j4 all-gcc
make install-gcc

Build and install glibc

First move into the 'build-dir' directory and create a 'build-glibc' directory. Then move into the 'build-glibc' directory before building it. '–build=$MACHTYPE' is a predefined environment variable which describes the Raspberry Pi 3 (in this case) and it's required to compile some additional tools which are utilised during the build process. Notice that you're installing the C library startup files to the installation directory (csu/crt1.o, csu/crti.o, and csu/crtn.o) separately because there doesn’t seem to a 'make' rule that does this without creating other problems.

cd ../
mkdir -p build-glibc
cd build-glibc
../glibc-2.24/configure --prefix=/tmp/gcc-cross/aarch64-linux --build=$MACHTYPE --host=aarch64-linux --target=aarch64-linux --with-headers=/tmp/gcc-cross/aarch64-linux/include --disable-multilib libc_cv_forced_unwind=yes
make install-bootstrap-headers=yes install-headers
make -j4 csu/subdir_lib
install csu/crt1.o csu/crti.o csu/crtn.o /tmp/gcc-cross/aarch64-linux/lib
$ARCH_TARGET-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /tmp/gcc-cross/aarch64-linux/lib/libc.so
touch /tmp/gcc-cross/aarch64-linux/include/gnu/stubs.h

Building glibc support library

Now move into the 'build-gcc' directory once again and build the GCC cross-compiler support library.

cd ../build-gcc
make -j4 all-target-libgcc
make install-target-libgcc

Finish building glibc C library

Move into the 'build-glibc' directory to finish building glibc C library and then install it.

cd ../build-glibc
make -j4
make install

Finish building GCC C++ library

Move into the 'build-gcc' directory to finish building GCC C++ library and then install it.

cd ../build-gcc
make -j4
make install

Testing the cross-compiler

To test/check that your GCC aarch64-linux cross-compiler is working properly run the following command.

aarch64-linux-gcc -v

You should get a response similar to the following.

Using built-in specs.
COLLECT_GCC=aarch64-linux-gcc
COLLECT_LTO_WRAPPER=/tmp/gcc-cross/libexec/gcc/aarch64-linux/5.4.0/lto-wrapper
Target: aarch64-linux
Configured with: ../gcc-5.4.0/configure --prefix=/tmp/gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 5.4.0 (GCC)

Once this process has been completed, export the GCC cross-compiler PATH on your normal user. If/when you're wanting to cross-compile do this each time after you've (re)booted your system so that the GCC cross-compiler can be located via your user's $PATH. You also have the option to add this command to your ~/.profile as a permanent setting. Whether or not you decide to permanently add the GCC cross-compiler PATH to your ~/.profile is entirely up to you. If you are using your Slackware ARM current system for exclusively building aarch64 (arm64) packages then it would make sense to do so.

Example export command:

export PATH=/tmp/gcc-cross/bin:$PATH

The GCC aarch64-linux cross-compiler on your Slackware ARM system is now ready to rock-n-roll!

Building the arm64 kernel, modules, and device tree blob (DTB)

To build the aarch64 kernel, modules and device tree blob(s) is exactly the same method as you would carry it out under normal circumstances. Commands such as 'make bzImage && make modules && make modules_install' may be all too familiar to you. The major difference when cross-compiling is that you'll use certain Makefile options/variables/arguments/switches, commonly known as CFLAGS. In our case, CFLAGS will be used to instruct the GCC cross-compiler to build for the aarch64 (arm64) architecture specifically.

Creating the arm64 kernel .config

First of all, as always, you need to be in the Raspberry Pi Linux kernel source directory which is in the 'build-dir' folder. Then you need to create a kernel .config file, based on Raspberry Pi 3 parameters. To keep it simple you can generate a default .config (defconfig) file. This file holds the Linux kernel configuration for the arm64 kernel you are going to build. To achieve this run the following commands:

cd /tmp/build-dir/linux
make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- bcmrpi3_defconfig

Make a note here of the CFLAGS which have been specified. They should be self-explanatory by now. Pay special attention to the trailing '-' of 'CROSS_COMPILE=aarch64-linux-' because that's NOT a typo. It needs to be like that!

Building the arm64 kernel

Next up is building the kernel, based on the .config file you have just created. Again, you'll use the same CFLAGS as before. You can even set a 'LOCALVERSION' here which appends whatever you set to the end of the kernel version (e.g. LOCALVERSION=“-arm64” would eventually give you 4.8.13-v8–arm64) once the kernel and modules have been built. Just as an example we'll use it here. Run the following command to start building the arm64 Linux kernel:

make -j4 Image ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-arm64"

So, here you 'make' the kernel which will be saved with the name 'Image'. The rest you should be familiar with. This process will take a while. Maybe an hour or so.

Building the arm64 device tree blob(s)

Device tree is a means of describing hardware which is read by the kernel at boot time to tell it what hardware exists on the system. In our case it relates to the Raspberry Pi 3 and is the method by which the systems knows which drivers to load for the hardware. On ARM-based devices the use of device trees has become mandatory for all new SOCs, including the Raspberry Pi. The device tree blobs you will be building are 'bcm2710-rpi-3-b.dtb' and 'bcm2837-rpi-3-b.dtb'

To build the Raspberry Pi device tree blob(s) run the following command:

make -j4 dtbs ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-arm64"

It's basically the same as you did to build the kernel, only where 'Image' is substituted for 'dtbs'.

Building the arm64 modules

To build the kernel modules you do it in much the same way as before. Run the following command:

make -j4 modules ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-arm64"

Notice how each time the command is the same except when specifying what you're building. If you have set a 'LOCALVERSION' then it must be kept the same for building the kernel and modules. This process will probably take a while longer than building the arm64 kernel.

Installing the arm64 modules

Once the modules have been built, you have to 'make modules_install'. The process will install your kernel modules to '/tmp/lib/modules/4.8.13-v8'.

You could build out-of-tree kernel modules but, to keep things simple, you're going to install them to the usual location. Again, you will use the same CFLAGS as before but without any 'LOCALVERSION' set.

First you need become 'root' user and enter a passwd when prompted. To install the aarch64 modules run the following commands:

su -
make -j4 modules_install ARCH=arm64 CROSS_COMPILE=aarch64-linux-

You need to be 'root' user to install the arm64 modules. A normal user does not have the rights to do so!

So, as I'm a great believer in being thorough, I always verify things at every opportunity. Just to be sure, if nothing else, because it's always a good policy. Make sure the files and directories you have just spent quite a bit of time compiling actually do exist on your system and that they're in the right place. If this is the first time you have installed the GCC cross-compiler on your system and/or built the kernel, modules, and device tree blob(s), then it goes without saying. You could actually do this after each build process, which I often do as well.

ls -lah arch/arm64/boot/Image
la -lah arch/arm64/boot/dts/broadcom/bcm*-rpi-3-b.dtb
ls -lah /lib/modules/4.8.13-v8*

If you can see that they all exist, then everything has worked as planned.

Copying the arm64 kernel, modules, and device tree blobs (DTB)

Connect the (spare) microSD card containing a working Slackware ARM current system to your Raspberry Pi 3 using a USB microSD card reader. You'll need to mount the partitions first, before copying the arm64 kernel, modules, and device tree blob(s) onto it.

You should still be logged in as 'root' user. If not, type the following command and enter the passwd for the 'root' user when prompted:

su -

You need to be 'root' user to carry out any mount procedures. A normal user does not have the rights to do so!

As 'root' user type the following command:

fdisk -l

This should show you which device the (spare) microSD card is using on your system. In our case it's a 32GB card and has been identified as '/dev/sda', as shown below. This tells us that '/dev/sda1' is our /boot partition and '/dev/sda3' is our root filesystem partition. Yours may be allocated differently so bear that in mind.

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *        32   195327   195296 95.4M  c W95 FAT32 (LBA)
/dev/sda2       196608   720895   524288  256M 82 Linux swap
/dev/sda3       720896 61145087 60424192 28.8G 83 Linux

In order to mount the partitions you first need to create mount directories. Working in the /tmp directory you can do it like this:

cd /tmp
mkdir rpi-boot
mkdir rpi-root
mount /dev/sda1 rpi-boot
mount /dev/sda3 rpi-root

To check that you've done this correctly, use the 'mount' command. The output from this should give you something similar to the following:

/dev/mmcblk0p3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mmcblk0p1 on /boot type vfat (rw,fmask=177,dmask=077)
/dev/sda1 on /tmp/rpi-boot type vfat (rw)
/dev/sda3 on /tmp/rpi-root type ext4 (rw)

The next thing to do is copy the arm64 kernel, modules, and device tree blobs to your newly mounted directories. It's important to get this right. After all the hard work you've done it would be a shame to mess it up at this stage.

To copy these files, run the following commands, as 'root' user:

cp build-dir/linux/arch/arm64/boot/Image rpi-boot/boot/kernel8.img
cp build-dir/linux/arch/arm64/boot/dts/broadcom/bcm*-rpi-3-b.dtb rpi-boot/boot
cp -rv /lib/modules/4.8.13-v8* rpi-root/lib/modules/

Once you have done that, check that the files you have copied are present and in the right place.

ls -lah rpi-boot/boot/kernel*
ls -lah rpi-boot/boot/bcm*-rpi-3-b.dtb
ls -lah rpi-root/lib/modules/4.8.13-v8*

If it all looks fine and dandy then the next thing you need to do is delete the old armv7 kernel in the rpi-boot/boot directory. This old kernel is named 'kernel7.img' and to avoid any conflicts with the new arm64 'kernel8.img' you should remove it.

rm -rf rpi-boot/kernel7.img

No changes to the config.txt or cmdline.txt file(s) should be necessary. If you are using a recent blootloader/GPU firmware version (i.e. post-September 2016) then nothing else needs to be changed or deleted. The system should boot using all your existing settings.

Now you can unmount the previously mounted directories.

umount rpi-boot
umount rpi-root

Booting Slackware ARM aarch64

Power off your Raspberry Pi.

poweroff

Remove the USB microSD card reader and swap microSD cards. Power on the Raspberry Pi and boot the microSD card on which you copied the arm64 kernel, modules, and device tree blobs.

The end result

After booting the system with the arm64 kernel, I logged in remotely via SSH as 'root' user. Then I ran the following commands:

login as: root
root@192.168.10.33's password:
Last login: Sat Dec 17 20:32:50 2016 from 192.168.10.10
Linux 4.8.13-v8-arm64.
root@drie:~# cat /proc/version
Linux version 4.8.13-v8-arm64 (exaga@drie) (gcc version 5.4.0 (GCC) ) #2 SMP Fri Dec 16 18:43:38 GMT 2016
root@drie:~# uname -a
Linux drie 4.8.13-v8-arm64 #2 SMP Fri Dec 16 18:43:38 GMT 2016 aarch64 GNU/Linux
root@drie:~# cat /etc/slackware-version
Slackware 14.2
root@drie:~# cat /proc/device-tree/model
Raspberry Pi 3 Model B Rev 1.2
root@drie:~# cat /proc/cmdline | awk -v RS=" " -F= '/serial/ { print $2 }'
0x4135b94e
root@drie:~#

Although I've already come across a few things which need some work, and attention, it's a start. I hope to find more time to devote towards Slackware arm64 over Christmas and the New Year 2017.

Thanks for being interested. <3

Sources

ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-4.1.4-arm-1.txz[3432] # Slackware ARM current - gawk package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.11.0-arm-1.txz[3433] # Slackware ARM current - git package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.0.4-arm-1.txz[3434] # Slackware ARM current - bison package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.0-arm-1.txz[3435] # Slackware ARM current - flex package.
http://arm.slackware.com/FAQs[3436] # Slackware ARM Linux Project Frequently Asked Questions.
http://wiki.osdev.org/GCC_Cross-Compiler[3437] # GCC cross-compiler documentation.
https://www.raspberrypi.org/documentation/linux/kernel[3438] # Raspberry Pi Linux kernel documentation.
https://www.github.com/raspberrypi/[3439] # Raspberry Pi Foundation GitHub repository Linux kernel, bootloader/GPU firmware.
https://ftp.gnu.org/gnu/[3440] # GCC, binutils, glibc, gmp, mpc, mpfr package source
ftp://gcc.gnu.org/pub/gcc/infrastructure[3441] # cloog, isl package source

Originally written by Exaga[3442]

howtos, hardware, aarch64, cross-compile, author exaga

Slackware ARM on the Raspberry Pi 1

Since there are so many ARM devices coming on to the market, it is not possible to provide support for them all in the main tree.

The Raspberry Pi is supported outside of the official Slackware ARM tree by the Slackware community.

Slackware releases 13.37, 14.0, 14.2

Since the release of Slackware ARM 14.0, there have been a number of community efforts to bring Slackware to the device:

Slackware ARM 14.2 is the only available version of Slackware that is officially supported/maintained, that runs on the Raspberry Pi 1. Releases of Slackware ARM greater than version 14.2 are not backwards compatible, since they moved to a hard floating point ABI and has a minimum CPU requirement of ARMv7. The Raspberry Pi 1 only has ARMv6 architecture.

You should follow one of the links in the table below. Each is maintained by a separate author as part of the Slackware-on-Raspberry Pi community.

Site | Slackware versions | Using official Slackware packages | Installation methods | Notes
SARPi Project[3443] | 14.2 | Yes | Slackware installer | An end-to-end HOW TO tutorial taking you through the installation and setup process.
Stanley Garvey[3444] | 14.0 | Yes | Slackware installer & pre-made images | Pre-made installed OS images ready to copy to an SD card
Dave's Collective[3445] | 13.37 | Yes | Slackware installer | An excellent set of instructions in order to have Slackware ARM running on your Raspberry Pi.

Manual installation method

Although the community does its best to keep up with the hardware changes there may be times when the above notes and images are unusable. If this happens you may work around the problem by using a miniroot image and a functional boot partition from some other source (like borrowing them from rasbian). If the kernel is the only issue you can compile your own kernel from sources (see here for a guide on doing that http://elinux.org/RPi_Kernel_Compilation[3446]).

Here are the steps involved in setting up a minimal Slackware ARM system from a miniroot image:

Download the current stable raspbian image from http://www.raspberrypi.org/downloads[3447] Unzip it and mount the partitions therein via loopback and then put all that is needed in a tarball for later use:

root@darkstar:/tmp# fdisk -l 2016-05-10-raspbian-jessie-lite.img
Disk 2016-05-10-raspbian-jessie-lite.img: 1.3 GiB, 1386217472 bytes, 2707456 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x84f9d19f
Device                               Boot  Start     End Sectors  Size Id Type
2016-05-10-raspbian-jessie-lite.img1        8192  137215  129024   63M  c W95 FAT
2016-05-10-raspbian-jessie-lite.img2      137216 2707455 2570240  1.2G 83 Linux
root@darkstar:/tmp# losetup -o $((8192 * 512)) /dev/loop0 2016-05-10-raspbian-jessie-lite.img
root@darkstar:/tmp# losetup -o $((137216 * 512)) /dev/loop1 2016-05-10-raspbian-jessie-lite.img
root@darkstar:/tmp# mount -o ro /dev/loop1 /mnt/floppy/
root@darkstar:/tmp# mount -o ro /dev/loop0 /mnt/floppy/boot
root@darkstar:/tmp# cd /mnt/floppy/
root@darkstar:/mnt/hd# tar vcpzf /tmp/raspbian_boot_stuff.tgz boot lib/modules/ lib/firmware opt/vc

Please note the sectors of the beginning of the partitions: 8192 and 137216. We need to multiply these by 512 to get the byte offset for the loop device setup. This is done by $((8192 * 512)) and $((137216 * 512)). You will need to change these if the image partitioning scheme changes.
Now partition and format an SD like this: (NB the “fdisk -l” is just to show how I partitioned my SD)

root@darkstar:~# fdisk  -l -u  /dev/sde
Disk /dev/sde: 4093 MB, 4093640704 bytes
126 heads, 62 sectors/track, 1023 cylinders, total 7995392 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd0b5414a
Device Boot      Start         End      Blocks   Id  System
/dev/sde1            2048      133119       65536    c  W95 FAT32 (LBA)
/dev/sde2          133120     7995391     3931136   83  Linux
root@darkstar:~# mkdosfs -F 16 /dev/sde1
root@darkstar:~# mke2fs -t ext4 -b 4096 -i 16384 -m 0  -L root /dev/sde2
root@darkstar:~# mount -o noatime /dev/sde2 /mnt/hd/
root@darkstar:~# mkdir /mnt/hd/boot
root@darkstar:~# mount -o noatime /dev/sde1 /mnt/hd/boot/

It's not a typo I got a bad headache figuring out why it did not work: the boot partition is to me made with id “c” but such small partitions have issues when you try to make a fat32 filesystem on them, you will get an error lamenting some issue with insufficient clusters but some sort of filesystem is made and if you ignore that and proceed you end up with something that does not boot. What you need to do is actually tell mkdosfs to make a fat16 filesystem and then things start to work right.

Now you can extract the Slackware ARM miniroot and then the raspbian_boot_stuff.tgz in /mnt/hd.
Edit the /mnt/hd/boot/cmdline.txt and add at the end “ro” and check that the root parameter matches the partitioning of the SD.
Edit the fstab to match your formatting (if that was like I suggested it will look like this:)

root@darkstar:/mnt/hd/etc# cat fstab
proc            /proc           proc    defaults          0       0
/dev/mmcblk0p1  /boot           vfat    errors=remount-ro          0       2
/dev/mmcblk0p2  /               ext4    errors=remount-ro,noatime  0       1
root@darkstar:/mnt/hd/etc#

You can now umount the SD, insert it into the RasbberyPI and boot into your Slackware ARM miniroot to add whatever else you need.
I generally add whatever else I need by simply using wget to pull down slackpkg, installing manually the downloaded slackpkg, editing the mirrors file and then install the rest that's needed with slackpkg itself (internet connection is required for this).
You might want to edit or comment the serial console in inittab to suppress the “s0” respawning to fast message.

Incidentally if you download a recent version of raspbian this procedure will create bootable images for the RPi, RPi 2, RPi 3, and RPi Zero.

Sources

Originally written by Stuart Winter[3448]

Contributions by louigi600[3449] , yugiohjcj[3450] , streamthreader[3451]

howtos, hardware, arm, author mozes

Slackware ARM on the Raspberry Pi 3

The Raspberry Pi 3 has a Broadcom BCM2837 SoC incorporating a Quad-core ARMv8 Cortex-A53 [64 bit] CPU @ 1.2GHz and VideoCore IV GPU @ 400MHz, and comes with 1GB LPDDR2 SDRAM @ 900MHz. This revised and upgraded ARM single board computer succeeds the Raspberry Pi (2)[3452], and is considerably quicker and a lot more powerful. Wi-Fi and Bluetooth are now included on-board. Still no RTC though. Think of the RPi3 as a renovation, and not an innovation. Slackware ARM, as you would expect, runs faultlessly on this device, with a very significant increase in speed. Compile times are much shorter compared to the RPi2, for example.

The Raspberry Pi 3 is supported outside of the official Slackware ARM tree by the Slackware community.

Slackware releases 14.2, -current

Slackware ARM -current or Slackware ARM 14.2 can be installed on the Raspberry Pi 3.

Follow the link(s) in the table below. These are maintained by a separate author as part of the Slackware-on-Raspberry Pi community.

Site | Slackware versions | Using official Slackware packages | Installation methods | Notes
SARPi Project[3453] | 14.2,-current | Yes | Slackware installer | An end-to-end HOW TO tutorial taking you through the installation and setup process.

AArch64 ARM64 [Experimental], Slackware ARM -current

Experimental, development, and prototype, Slackware AArch64 ARM64 link(s).

Site | Slackware versions | Using official Slackware packages | Installation methods | Notes
SARPi64 Project[3454] | -current | Yes | Slackware installer | A development project for Slackware ARM running AArch64 [ARMv8] kernel and modules. Experimental in nature and purpose.

Manual install method

This method is for installing Slackware ARM 14.2 on a Raspberry Pi 3 Model B. However, it should work for other Slackware ARM and Raspberry Pi versions.

1. Partition and format the SD Card

$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048       67583       32768    b  W95 FAT32
/dev/mmcblk0p2           67584    62333951    31133184   83  Linux
$ sudo mkfs.vfat /dev/mmcblk0p1
$ sudo mkfs.ext4 /dev/mmcblk0p2

Remarks:

I use a 32 GB SD Card

I choose 32 MB for the size of the first partition

I let the empty space left for the second partition

2. Put the Raspberry Pi firmware in the SD Card

$ git clone https://github.com/raspberrypi/firmware.git
$ sudo mount /dev/mmcblk0p1 ~/mnt
$ sudo cp -r firmware/boot/* ~/mnt
$ sudo umount ~/mnt
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo mkdir -p ~/mnt/lib/modules
$ sudo cp -r firmware/modules/* ~/mnt/lib/modules
$ sudo umount ~/mnt

3. Put the Slackware ARM mini root file system in the SD Card

$ wget -c ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots/slack-14.2-miniroot_01Jul16.tar.xz
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo tar -C ~/mnt -xf slack-14.2-miniroot_01Jul16.tar.xz
$ echo "/dev/mmcblk0p1 /boot vfat defaults 0 0" | sudo tee ~/mnt/etc/fstab
$ echo "/dev/mmcblk0p2 /     ext4 defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ echo "proc           /proc proc defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ PASSWD=$(openssl passwd -1 -salt cetkq/enZx6/c2 password)
$ sudo sed -i "s|\(root:\).*\(:16983:0:::::\)|\1${PASSWD}\2|" ~/mnt/etc/shadow
$ sudo sed -i 's|USE_DHCP\[1\]=""|USE_DHCP\[1\]="yes"|' ~/mnt/etc/rc.d/rc.inet1.conf
$ echo "PermitRootLogin yes" | sudo tee -a ~/mnt/etc/ssh/sshd_config
$ sudo umount ~/mnt

Remarks:

I set password as password for the root user

I set DHCP on the eth1 network interface

I allow the root user to connect through SSH

4. Insert the SD Card in the Raspberry Pi

Your SD Card is ready so you can insert it in the Raspberry Pi and boot.

You can connect remotely to your Raspberry Pi as root through SSH.

$ ssh root@raspberrypi

As soon as you are logged, you might want to install additional Slackware ARM packages:

$ wget --mirror ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2
$ upgradepkg --install-new ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/*.txz
$ removepkg ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/kernel_*.txz

Remarks:

I consider that the Raspberry Pi hostname is raspberrypi

I recommend to add a normal user by using the adduser command and use this user instead of root

I recommend to change the root user password by using the passwd command

I recommend to disallow the root user to connect through SSH by editing the /etc/ssh/sshd_config file

I recommend to build your own Linux kernel[3455] packages because the kernel you are running does not match with the installed Slackware ARM packages

I recommend to change the slackware.localdomain hostname by editing the /etc/HOSTNAME file

5. Tips and tricks

5.1. Bluetooth

The Raspberry Pi has a Broadcom chip providing Bluetooth. However, the required firmware is not installed on Slackware ARM. It means that you need to download and install it:

$ git clone https://github.com/OpenELEC/misc-firmware.git
$ mkdir -pv /where/you/want/to/install/etc/firmware
$ cp -v misc-firmware/firmware/brcm/BCM43430A1.hcd /where/you/want/to/install/etc/firmware

Then build your own Slackware ARM bluez-firmware-brcm package and install it.

In order to enable Bluetooth you need to add the Bluetooth module, run the Bluetooth daemon, attach the device then open and initialize the device. Add the following lines to the end of the /etc/rc.d/rc.local file:

if ps axc | grep -q bluetoothd; then
killall bluetoothd
fi
if ps axc | grep -q hciattach; then
killall hciattach
fi
if lsmod | grep -q hci_uart; then
rmmod hci_uart
fi
if lsmod | grep -q btbcm; then
rmmod btbcm
fi
modprobe btbcm
bluetoothd &
while ! hciattach /dev/ttyAMA0 bcm43xx; do
echo "Unable to attach the device! We try again..."
done
hciconfig hci0 up

Remark: Sometimes there is a failure with the hciattach command so that is why you need a while.

You can check that Bluetooth is working by typing:

$ hcitool dev
$ hcitool scan
$ sudo bluetoothctl

Now, the Bluetooth is correctly set.

5.2. Keyboard

The default keyboard map on Slackware ARM is the one of United Kingdom. If you want to load an other keyboard map, edit the /etc/rc.d/rc.keymap file.

If you want to change the keyboard layout for X11, you need to copy the X11 configuration file then edit it:

sudo cp /usr/share/X11/xorg.conf.d/90-keyboard-layout.conf /etc/X11/xorg.conf.d

Now, the keyboard is correctly set.

5.3. Memory

Unfortunately, the Raspberry Pi has only 1 GB of memory. It means that you will eventually not be able to run some applications requiring more memory. However, you can extend your memory by creating a temporary 4 GB swap partition:

$ dd if=/dev/zero of=/tmp/swap bs=1M count=4000
$ mkswap /tmp/swap
$ sudo swapon /tmp/swap

You can check the current memory by typing:

$ free

Now, the memory is correctly set.

5.4. Processor

The Raspberry Pi processor can reach 1.2 GHz. However, by default, it is stuck to 600 MHz even if it is used at 100%. You can check the current frequency of the processor by typing:

$ cpufreq-info

In order to reach 1.2 GHz when the processor is used at 100% (i.e., use the frequency scaling), you need to change the default governors. Add the following line to the end of the /etc/rc.d/rc.local file:

echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Now, the processor is correctly set.

5.5. Time

Unfortunately, the Raspberry Pi does not provide a Real-Time Clock (RTC). That is why there is no battery included with the board. It means that each time you shutdown the Raspberry Pi, the time is reset! However, if you have internet access, you can update the time during the Slackware ARM boot. Add the following line to the end of the /etc/rc.d/rc.local file:

ntpdate pool.ntp.org

Now, the time is correctly set.

5.6. Video

Unfortunately, the Raspberry Pi is not compatible with OpenGL (it is compatible with OpenGL ES that is a subset of OpenGL). It means that, by default, each application requiring OpenGL will be slow. However, you can reach 60 FPS with OpenGL applications on the Raspberry Pi by using the correct driver.

Firstly, you need to build Mesa (>= 17.1.10) with the VC4 DRI driver:

$ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
CXXFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-egl-platforms=x11,drm \
--with-gallium-drivers=vc4
$ make -j4
$ make install DESTDIR=/where/you/want/to/install

Then build your own Slackware ARM mesa package and install it (you can safely upgrade the one provided by Slackware ARM).

Secondly, add the following line to the end of the /boot/config.txt file:

dtoverlay=vc4-fkms-v3d

Then reboot the Raspberry Pi.

You can check that you are able to get 60 FPS with OpenGL applications on the Raspberry Pi by typing the following command in an X11 terminal:

$ glxgears

An other problem with the video is that the default resolution is 1824×984. It means that you can see black borders around your 1920×1080 screen. In order to fix that, add the following line to the end of the /boot/config.txt file:

disable_overscan=1

Then reboot the Raspberry Pi.

You can check that you are using a 1920×1080 resolution on the Raspberry Pi by typing the following command in an X11 terminal:

$ xrandr

Now, the video is correctly set.

5.7. UART

In the /etc/inittab file, s0 refers to the mini UART[3456] that is disabled by default on the Raspberry Pi. Consequently, every 5 minutes, this line will be written to /dev/tty1 by the init process:

INIT: Id "s0" respawning too fast: disabled for 5 minutes

An easy fix is to edit the /etc/inittab file and replace the following line:

s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100

with this one:

#s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100

Then reboot the Raspberry Pi. Now, the UART is correctly set.

Sources

Originally written by Exaga[3457]

Contributions by yugiohjcj[3458]

howtos, hardware, arm, author exaga

Automatically Set System Time On ARM Devices

Most users know how unforgiving the Slackware operating system is when the date and time is not set relatively accurate, and rightly so. Inaccurate time can give rise to all kinds of problems, and is often the bane of a system administrator's life. Particularly on ARM devices, where this can be a continual annoyance when the system time has no way of setting itself correctly and/or those responsible [often] forget to do it.

Preface

The information on this page aims to enable Slackware users with an Internet connection and/or RTC installed on ARM devices to automatically set the system date and time, via a '/etc/rc.d/rc.local' script, and hopefully provide insight into the different means and methods that can otherwise be employed.

Notes

Most (if not all?) modern PC systems come with an onboard real time clock (RTC) installed on the mainboard, whereas most single board computer ARM devices do not.

For example, the Raspberry Pi (a.k.a. the most common and popular single board computer on the planet) cannot seem to factor-in an onboard timekeeper within its MSRP, even on the more expensive models which feature larger amounts of RAM but still no RTC. The Banana Pi, Orange Pi, and Asus Tinkerboard devices do not feature an onboard RTC. Less common devices, such as SolidRun's HummingBoard Pro, the NanoPi (Neo4 or R1 or M4), the Olimex Olinuxino-A64, and the Rock Pi 4, all come with an onboard RTC installed. So some single board computer ARM devices do have them built-in, while others do not.

On those which don't have a RTC as standard it's prudent, and easily affordable, to buy a RTC module and install it yourself, with some RTCs being available on eBay for only a few dollars[3459] inc. delivery!

Requirements

There are a number of ways to achive automatically setting the date and time accurately on any computer system. You will require at least one of the following…

Access to an Internet connection.

A battery backed-up onboard RTC installed on your ARM device.

A battery backed-up onboard RTC on another Slackware system connected to your local network.

If you do not have at least one of the above then you're going to have to set the date and time on your ARM device(s) manually, as and when required. Here's a few examples…

root@slackware:~# date MMDDhhmmYYYY.ss
root@slackware:~# date -s "DD MMM YYYY hh:mm:ss"
root@slackware:~# date [-u|--utc|--universal] [MMDDhhmm[[CC]YY][.ss]]

Automatically setting the system time with an Internet connection

The quickest and laziest method is with the Bash script code below, which is a representation of an '/etc/rc.d/rc.local' file which will set the system date/time on boot-up and also set the date/time on an installed RTC. Everything is done automagically and is effortless…

rc.local

#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

# test for network interface connection carrier
for NIF in $(ls /sys/class/net/ | grep -v lo); do
if [[ -n $(cat /sys/class/net/"${NIF}"/carrier 2>/dev/null) ]]; then
# set system time from ntp server [remote]
/usr/sbin/sntp -Ss 0.pool.ntp.org > /dev/null 2>&1 || \
/usr/sbin/sntp -Ss 1.pool.ntp.org > /dev/null 2>&1
# set RTC from system time [if detected]
[ -h /dev/rtc ] && /sbin/hwclock -w > /dev/null 2>&1
elif [ -h /dev/rtc ]; then
# set system time from RTC [if detected]
/sbin/hwclock -s > /dev/null 2>&1
else
# output to stderr if time sync fails
echo "WARNING! : system time sync ERROR ... " 1>&2
fi
done

#EOF

“The Mechanics” : The above '/etc/rc.d/rc.local' script runs when the Slackware ARM system is booting and looks for a network carrier and then, if one is found, it runs the 'sntp -Ss pool.ntp.org' command. Then, if a RTC device is detected, it sets the time on that too. Otherwise, if no network carrier is detected, it looks for a RTC device and sets the system date and time from it. Otherwise, if no network carrier or RTC is found, it sends an error message to 'sdout' and 'sdterr' (echo 1>&2).

I've got this code in the '/etc/rc.d/rc.local' initialisation script on all my ARM devices. It does a remarkably good job and has never failed. This code works when there's no Internet connection because all my ARM devices also have a battery backed-up [DS3231] RTC installed. So, either way, my system is going to have the date and time set by one means or other. Although in reality, I've never seen the error message appear anywhere. Even when the battery depleted on a ChronoDot RTC that I've had for +9 years this script got the date and time from my local network's NTP server anyway. Instead of specifying an Internet-based NTP server (e.g. 0.pool.ntp.org), I have my scripts query the IP address of an NTP server (e.g. 192.168.1.17 on port 123) on my local network, which I have running on one of my Raspberry Pi 2 devices.

Setting the system time with a local NTP server

The SlackDocs NTP[3460] page takes users through the process of how to configure and maintain a Slackware NTP server. It's a very easy and straight-forward exercise. So, if you have an ARM device just laying around, gathering dust or not doing much, it might be advantageous to put it to some use for this purpose.

Once you have a NTP server running on your local network, you are able to set any other computer system or device that uses a time protocol from it; Linux systems, Windows computers, Android devices, tablets, smart phones, etc. Therefore, it's possible to have everything set with an accurate date and time that's capable of communicating with the NTP server.

Setting the date and time on other Slackware [Linux] systems using a local network NTP server is achieved by typing one simple command:

~# sntp -Ss 192.168.1.17

On Slackware ARM 14.2 this can be achieved using the following command:

~# ntpdate 192.168.1.17

In the example above, the IP address is our local network NTP server machine. Obviously you would enter the IP address of the machine running the NTP server daemon on your own local network.

Help

Any requests for help/assitance, questions, suggestions, good or bad or indifferent feedback, can be addressed on the Slackware ARM LQ forum[3461].

Thank you for being interested in automatically setting the system date and time on a Slackware ARM installed device, and in this SlackDocs page.

Sources

# Documentation which assisted in this SlackDoc project:

https://docs.slackware.com/howtos:network_services:ntp[3462] - by Niki Kovacs[3463]

* Originally written by Exaga[3464] - 2021-03-14 19:08:54 [GMT]

howtos, slackware, arm, system, time, rtc, rc.local, network, ntp, server, author exaga

nginx on Slackware ARM

Nginx in brief

Created by Igor Sysoev and first publicly released in 2004, Nginx[3465] is a high‑performance, highly scalable, highly available web server, reverse proxy server, and web accelerator (combining the features of an HTTP load balancer, content cache, and more). Nginx offers a highly scalable architecture that is very different from that of Apache (and many other open source and commercial products in the same category). Nginx has a modular, event‑driven, asynchronous, single-threaded architecture that scales extremely well on generic server hardware and across multi-processor systems. Nginx uses all of the underlying power of modern operating systems such as Linux to optimize the usage of memory, CPU, and network, and extract the maximum performance out of a physical or virtual server. According to the Nginx FAQ[3466], the end result is that Nginx can often serve at least 10x more (and often 100–1000x more) requests per server compared to Apache – that means more connected users per server, better bandwidth utilization, less CPU and RAM consumed, and a greener environment too!

Nginx has gained support and popularity over the years and [as of February 2020] 31.7% of all known web servers running on the Internet use Nginx, compared to 40.5% for Apache, and 7.8% for Microsoft-IIS. See: https://w3techs.com/technologies/comparison/ws-apache,ws-microsoftiis,ws-nginx[3467]

Notes

This page will hopefully allow you how run nginx on Slackware ARM successfully, from scratch. There's no reason what-so-ever that the same procedure(s) shouldn't work on Slackware x86_64 [or Slackware ARM 14.2], but for the purpose of testing it has been carried out under Slackware ARM -current [23 February - 05 March 2020].

Slackware ARM -current was running [kernel 5.4.22] on a Raspberry Pi 4 and used to build the package, install and configure nginx. Any ARM device running Slackware may be used for this purpose. The -current (development) version was chosen as it includes the latest software, etc.

Requirements

Please expect and acknowledge the following before going ahead;

You'll use the CLI in a shell for the entire process.

You'll edit config files using a text editor of your choosing; elvis, vim, nano, etc.

Apache (httpd) will be disabled/removed from your system in order for nginx to run. [i.e. they both use port:80]

Building the nginx package

In order to build the nginx package, first you need to download the SlackBuilds.org nginx[3468] files and put them in a folder on your system. We will create and be using '/tmp/nginx' directory for this purpose, as 'root' user.

~# mkdir -p /tmp/nginx
~# cd /tmp/nginx
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/README
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/doinst.sh
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/nginx.SlackBuild
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/nginx.info
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/nginx.logrotate
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/rc.nginx
~# wget https://slackbuilds.org/slackbuilds/14.2/network/nginx/slack-desc

Now make the 'nginx.SlackBuild' build script exectuable.

~# chmod +x nginx.SlackBuild

You also need to download the latest nginx mainline[3469] version and put it in the same directory as the SlackBuild files. At the time of writing this guide the latest version was nginx-1.17.9[3470] but it's best to check if an updated version exists.

~# wget http://nginx.org/download/nginx-1.17.9.tar.gz

After downloading the latest nginx version you need to edit the 'nginx.SlackBuild' script to tell it which nginx version package you want to create. We'll be using 'nano' for this purpose.

~# nano nginx.Slackbuild

Find the following line:

VERSION=${VERSION:-1.12.2}

… and change it to the version of nginx you have downloaded. For 'nginx-1.17.9' it would be like this:

VERSION=${VERSION:-1.17.9}

The 'nginx.SlackBuild' script by default is set to build a *.tgz package and we prefer to build *.txz packages. If you want to do the same then edit the last line of the script to look like this:

/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}

Note here that the only change in this line of code is the '${PKGTYPE:-tgz}' to '${PKGTYPE:-txz}' variable [NB: xz gives a better compression ratio than gzip, which is why we prefer it]. Nothing more needs changing.

Save and exit the file.

It's now time to create the Slackware ARM package. So, without further ado, do it like this:

~# time ./nginx.SlackBuild

Alternatively, if you plan on using Maxmind's GeoIP database with 'nginx' then GeoIP support is available as an option. All that's required is the GeoIP package to have been installed first. If you wish to enable GeoIP support in 'nginx' then pass the GEOIP variable to the slackbuild command, like this:

~# time GEOIP=yes ./nginx.SlackBuild

After a few short minutes, you should see the resulting package in your '/tmp' directory. [NB: if you didn't modify the '${PKGTYPE:-tgz}' variable then the file extension will be '*.tgz' instead of '*.txz'.] Check it like this:

Q. Why do we use 'time' in combination with running the build script?
A. We like to know how long the process takes. That's all. You don't have to include it in order to be successful.

~# cd /tmp
~# ls -lah *.txz
-rw-r--r-- 1 root root 442K Feb 26 06:01 nginx-1.17.9-arm-1_SBo.txz

So, you now have the Slackware ARM nginx package which can easily be installed.

Installing the nginx package

Before installing the Slackware ARM nginx package it is prudent to deal with Apache (httpd). Apache and nginx cannot run together on port:80. So, in order to use nginx as your web server software, Apache must be disabled completely.

First make sure Apache (httpd) is not running. If it is then stop the daemon, like this:

~# apachectl stop

Then prevent the 'httpd' daemon from starting up on (re)boot by making the initialisation script non-executable, and check the file permissions, like this:

~# chmod -x /etc/rc.d/rc.httpd
~# ls -lah /etc/rc.d/rc.httpd
-rw-r--r-- 1 root root 1.1K Jan 13 19:26 /etc/rc.d/rc.httpd

Now you can install the nginx package:

~# installpkg nginx-1.17.9-arm-1_SBo.txz

Configuring nginx to run on Slackware ARM

First of all, after installing the Slackware ARM nginx package, we're going to make the rc.nginx AND rc.php-fpm [system initialization] files executable. We do this now because we intend to serve .php, as well as .html, files from our web server file directories. Plus, we'll be configuring the php FastCGI implementation as well, all at the same time.

~# chmod +x /etc/rc.d/rc.php-fpm
~# chmod +x /etc/rc.d/rc.nginx

In order to start these system initialization scripts on (re)boot, add an entry to the rc.local file. Just add 2 lines to to the end of the file, like this:

~# nano -w /etc/rc.d/rc.local
# Add these two lines below
/etc/rc.d/rc.php-fpm start
/etc/rc.d/rc.nginx start

Save and exit the file. Now, whenever you boot or restart your system, 'nginx' and 'php-fpm' will be executed automatically.

Next, we'll edit the '/etc/nginx/nginx.conf' file. The settings we used are for a test setup and as a “proof of concept” on Slackware ARM. Your requirements may be different but for the purpose of this guide, and getting a feel of nginx, this is how we did it.

~# nano -w /etc/nginx/nginx.conf

Things to note:

Nginx will run under the 'nobody' user and with those user privileges.

Nginx PID location will be: /var/run/nginx.pid

Our web directory in which the html files will be located is '/var/www/html'. Yours may be in a different location.

PHP root location is the same as the web directory: '/var/www/html'

Nginx access and error logs will be located in '/var/log/nginx/' directory.

Log format has been configured as 'vcombined' because we intend to use GoAccess[3471] for further tesing on more than 1 site on our nginx web server.

The location index starts with 'index.php' followed by 'index.html index.htm'.

PHP fastcgi_index is: index.php

FastCGI server configuration is included. See section: '# pass the PHP scripts to FastCGI server …'

FastCGI 'SCRIPT_FILENAME' is: $document_root$fastcgi_script_name

The nginx.conf file content should look similar to the following:

user  nobody;
worker_processes  auto;
pid /var/run/nginx.pid;
# if you wish to load nginx modules create the dir and uncomment the line below
#include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections  1024;
#multi_accept on;
}
http {
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout  65;
types_hash_max_size 2048;
include       mime.types;
default_type  application/octet-stream;
##
# Logging Settings
##
log_format vcombined '$host:$server_port '
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent"';
access_log /var/log/nginx/access.log vcombined;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
##
# Web Server Settings
##
server {
listen       80 default_server;
server_name  127.0.0.1 localhost;
location / {
root   /var/www/html;
index index.php index.html index.htm;
}
# redirect server error pages to the static page /50x.html
#
error_page   500 502 503 504  /50x.html;
location = /50x.html {
root   /var/www/html;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root           /var/www/html;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
include        fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny  all;
}
}
include /etc/nginx/conf.d/*.conf;
}

Check that your settings in the nginx.conf file are correct. It's very important. Save and exit the file when you're done.

Configuring php-fpm.conf

To configure 'php-fpm' we'll copy the '/etc/php-fpm.d/www.conf.default' file and then edit the copy. Like this:

~# cp -av /etc/php-fpm.d/www.conf.default /etc/php-fpm.d/www.conf
~# nano -w /etc/php-fpm.d/www.conf

The default Unix user/group in this file is 'apache' but you need to change these settings. Find the section shown below and edit the 'user' and 'group' to match the following code:

; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
user = nobody
group = nogroup

By default 'php-fpm' does not log anything other than startup and shutdown [see: '/var/log/php-fpm.log' after the daemon has been (re)started]. In order to log any relevant error messages we need to make one more change to the file. Find the 'catch_workers_output“ section below and uncomment the setting, like this:

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
catch_workers_output = yes

Save and exit the file.

Create a test index.php

Create an 'index.php' file to test the nginx web server and make sure it's working. This file will be located in the web directory where all the other .php and .html files reside [i.e. the PATH specified in the '/etc/nginx/nginx.conf' file].

~# nano -w /var/www/html/index.php

Enter the following code into the index.php file:

<?php
phpinfo();
?>

Save and exit this file. This 'index.php' file will display the standard 'phpinfo' output which is great for testing purposes such as ours.

There will be an 'index.html' file in the same folder as you have saved the 'index.php' [put there when nginx was installed] and this can also be used for testing.

Starting nginx and php-fpm

Now we can start 'php-fpm' and 'nginx'. Use these commands to do so:

~# /etc/rc.d/rc.php-fpm start
~# /etc/rc.d/rc.nginx start

Important Notes To Remember

When you have modified ANY nginx configuration file(s) or setting(s) you MUST test the nginx configuration and restart the daemon. Running 'nginx -h' will output a list of command options.

To test the the nginx configuration, do this:

~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

To restart the nginx daemon do this:

~# /etc/rc.d/rc.nginx restart
Shutdown Nginx gracefully...
Starting Nginx server daemon...

Perform the above each time you change or modify the nginx configuration.

Testing the nginx web server

If all has gone according to plan, you'll now be able to access the web-content in your '/var/www/html' directory. To test this you can use the following command:

~# links http://localhost

You should be looking at the output of the index.php page you created earlier. The 'index.php' displays instead of 'index.html' because it was specified in the index list first. If you don't want this arrangement then adjust the '/etc/nginx/nginx.conf' file with your own preferences.

To quit 'links' press the Q key and Enter.

You can view the 'index.html' page which was created by nginx, like this:

~# links http://localhost/index.html

If you can see both these pages then the nginx web server is working as expected.

Stopping nginx and php-fpm

Should you need to disable the 'rc.nginx' and 'rc.php-fpm' daemons, use the following commands:

/etc/rc.d/rc.php-fpm stop
/etc/rc.d/rc.nginx stop

To permanently disable the daemons, remove or comment the line(s) in your '/etc/rc.d/rc.local' file.

Obviously this is not in any way a guide on how to fully take advantage of what nginx offers. The result of this guide should be confirmation that Nginx works ”like a boss“ on Slackware ARM. From there the possibilities are endless. Nginx can be used with multiple domains, as a load-balancer, and for many other purposes. In order to explore the many ways in which nginx can be utilised take a look at the main Nginx.org website[3472].

GoAccess configuration

We created this guide with GoAccess in mind. So here's why…

”GoAccess was designed to be a fast, terminal-based log analyzer. Its core idea is to quickly analyze and view web server statistics in real time without needing to use your browser (great if you want to do a quick analysis of your access log via SSH, or if you simply love working in the terminal).“ See: https://github.com/allinurl/goaccess[3473]

If you want to take advantage of open source web server analysis software then it doesn't come much better than GoAccess[3474]. Fortunately, SlackBuilds.org has a repository for GoAccess[3475] and it can be built and installed with relative ease. If you're familiar with the SlackBuilds process then creating and installing a goaccess package is basically the same as it is for nginx.

Once installed, to configure GoAccess, edit the '/etc/goaccess.conf' file and uncomment the lines below; time-format, date-format, log-format.

# The following time format works with any of the
# Apache/NGINX's log formats below.
#
time-format %H:%M:%S
# The following date format works with any of the
# Apache/NGINX's log formats below.
#
date-format %d/%b/%Y
# NCSA Combined Log Format with Virtual Host
log-format %v:%^ %h %^[%d:%t %^] "%r" %s %b "%R" "%u"

Then save and exit the file.

Now we should be able to view [instantly-updated] LIVE stats on our nginx web server activity by using GoAccess and the following command:

~# goaccess -f /var/log/nginx/access.log --log-format=VCOMBINED

To exit GoAccess press the Q key.

We can create a static html page with GoAccess using the following command:

~# goaccess -f /var/log/nginx/access.log -a -o /var/www/html/static-log.html --log-format=VCOMBINED

We saved the resulting page in our web directory. So, now we can view that static html page using 'links', like this:

~# links http://127.0.0.1/static-log.html

GoAccess is very versatile and configurable, and open source. It can parse a great many log formats [logs can be rotated] and can also create static html pages as well as being fully functional in a shell.

Adding additional sites to nginx

In this guide we've only used one web directory ['/var/www/html'] but in order to expand our single site we're going to add another two sites. This is achieved by adding *.conf files to the '/etc/nginx/conf.d/' directory. You can name them anything you like as long as the file extension is ”.conf“. For the purposes of this guide we'll configure 'test.local' and 'extra.local' along with our existing 'localhost' site.

First we create the '/var/www/test.local' and '/var/www/extra.local' directories where our web content will reside:

~# mkdir /var/www/test.local
~# mkdir /var/www/extra.local

Because we want to use 'test.local' and 'extra.local' as domain name [server_name] aliases we will add the following to our '/etc/hosts' file:

# For loopbacking.
127.0.0.1               localhost
127.0.0.1               myhost.name myhost
127.0.0.1               test.local
127.0.0.1               extra.local
# End of hosts.

The above settings will take effect as soon as the file is saved. However, there's nothing there to see yet - because we haven't created it!

So, then we create and edit the 'test.local.conf' file:

~# nano -w /etc/nginx/conf.d/test.local.conf

In this file we need to instruct 'nginx' which server requests it should listen for on a specific port. We need to specify the path/to/the web directory files where this site will be located and we'll also configure the FastCGI server. So we'll enter the following text into this file:

server {
listen 80;
server_name test.local;
# this root path is to the webdir
root /var/www/test.local;
# index pages to load in this order
index index.php index.html index.htm;
#This will be needed for GoAccess ** make sure vcombined map is defined in nginx.conf
access_log /var/log/nginx/access.log vcombined;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root           /var/www/test.local;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
include        fastcgi_params;
}
}

Again, we are keeping the access_log format in order to make use of web traffic analysis with GoAccess. Save and exit the file when you're happy with the setup.

Now we can create and edit the 'extra.local.conf' file in much the same way as the first file:

server {
listen 80;
server_name extra.local;
# this root path is to the webdir
root /var/www/extra.local;
# index pages to load in this order
index index.php index.html index.htm;
#This will be needed for GoAccess ** make sure vcombined map is defined in nginx.conf
access_log /var/log/nginx/access.log vcombined;
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root           /var/www/extra.local;
fastcgi_pass   127.0.0.1:9000;
fastcgi_index  index.php;
fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
include        fastcgi_params;
}
}

Note that port:80 is still being used in both cases, as is the existing 'localhost' site, but the server_name and root path are different to reflect that this is a seperate entity. The server_name is how 'nginx' will know which site to direct you to when it is requested. You can of course use other ports. For example, if you required 'test.local' to be accessible on port:1080 then just specify that with a 'listen 1080;' parameter and access it as 'http://test.local:1080'.

The web directories need files in them in order to display any content. So, as before, you could create a simple 'index.php' file and put it in the directory that relates to the new site(s). Or you could crate a simple 'index.html' file to identify the site. For example:

~# nano -w /var/www/test.local/index.php
<?php
phpinfo();
?>

And/or…

~# echo '<html><body><h1>TEST : It works!</h1></body></html>' > /var/www/test.local/index.html
~# echo '<html><body><h1>EXTRA : It works!</h1></body></html>' > /var/www/test.local/index.html

When all that's complete, the final task is to test the 'nginx' configuration and restart the daemon.

~# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
~# /etc/rc.d/rc.nginx restart
Shutdown Nginx gracefully...
Starting Nginx server daemon...

So now, to access the new site content on your 'nginx' web server use the following, remembering to request the file you've previously created. For example:

~# links http://test.local/index.php
~# links http://extra.local/index.html

One thing to note is that if you use 'http://127.0.0.1/index.html' it will direct you to the 'localhost' site because that has been specified as the default in '/etc/nginx/nginx.conf'. In order to acess the content of any sites other than 'localhost' or '127.0.0.1' [default] the server_name must be used. You can also access the site remotely using the IP address [and port - if specified] of your ARM device instead of a domain name. Or you could add a domain name alias to your 'hosts' file and use that instead. Either method works.

Sources

# Software used in this guide:
http://slackware.uk/slackwarearm/slackwarearm-current/[3476] # Slackware ARM -current OS.
https://nginx.org/download/[3477] # Nginx 1.17.9 web server software [gzip tarball].
https://slackbuilds.org/slackbuilds/14.2/network/nginx/[3478] # SlackBuilds.org nginx package build script files.
https://slackbuilds.org/repository/14.2/system/goaccess/[3479] # SlackBuilds.org goaccess package build script files.
https://goaccess.io/download[3480] # GoAccess 1.3 web server analysis software [gzip tarball].
https://sarpi.fatdog.eu/index.php?p=downloads[3481] # SARPi Project pre-built [txz] packages.

# Documentation which assisted in this guide:
https://w3techs.com/technologies/comparison/ws-apache,ws-nginx[3482] # Web server software usage statistics.
https://www.nginx.com/resources/faq/[3483] Nginx.com FAQ.
https://nginx.org/en/docs/faq.html[3484] Nginx.org FAQ.
https://www.aosabook.org/en/nginx.html[3485] # Overview of nginx architecture.
https://goaccess.io/faq[3486] # GoAccess FAQ.
https://github.com/allinurl/goaccess[3487] # GoAccess GitHub README.

# Special thanks:
Aal[3488] for suggesting Nginx/GoAccess on Slackware ARM and help/advice with configs [on Debian].
MoZes[3489] for making a lot of Slackware ARM things clearer and more understandable via Slackchat Podcast[3490].

* Originally written by Exaga[3491] - 2020-02-25 20:06:09 [GMT]

howtos, slackware, arm, nginx, php, fpm, fastcgi, web, server, goaccess, slackbuild, author exaga

Hacking information from the XZPAD700

This refers to the XZPAD700 (aka zeligpad) ARM based tablet (AL-A13-RT713 pcb) based on an Allwinner A13 SOC but is technically applicable to all Axx SOC's as to my understanding the all boot in the same manner.
If you're just interested in getting started really fast skip to the image builder[3492] section.
The image builder[3493] has support for almost all Allwinner Axx SOC's. I've thoroughly tested it on mt tablet and I've had success reports on Cuietruck. If you have had success on some other device please report it on the Slackware ARM[3494] subforum on LinuxQuestions.

Preface

Although this is a low-end inexpensive device it turns out that the platform is better documented then many other high-end devices with well known brand names. For this platform there is a lot of good documentation on http://linux-sunxi.org/Main_Page[3495] but unfortunately there are some common issues with most other ARM based patforms: Patches not making it to mainstream kernel, Drivers left in a incomplete state that that require hard ti find firmware to work properly, Drivers unmaintained that get broken as other back-ports make it into the linux-sunxi kernel tree.

Enough ranting about how ARM linux development lacks organization, let's just gather some information out of this device to help install a standard linux userland (possibly Slackware) on it.

Accessing The Device

Untill more is known on the hardware (revealing where the serial port is) there are 2 basic ways of accessing the device so that you get a command prompt.

Android Debug Bridge

A Terminal Emulator Application

The former requires installing android-sdk on a pc, activating the developement debug mode on the device, connecting the device to the pc via the usb cable and then launching “adb shell” from the pc. You then gret dropped into a shell prompt on the device.

The latter only requires you to install a terminal emulation software on the device and then using that to snoop around on the device itself. Where possible I prefer using adb because I get frustrated while typing on the virtual keyboard.

In both cases you may need to root the device to get full access to the system but on the XZPAD700 it is not the case as you can just type “su -” and become root right out of the box.

Hardware

Let's have a look at what's in the hardware:

root@android:/ # cat /proc/devices
Character devices:
1 mem
4 /dev/vc/0
4 tty
4 ttyS
5 /dev/tty
5 /dev/console
5 /dev/ptmx
7 vcs
10 misc
13 input
29 fb
81 video4linux
89 i2c
108 ppp
116 alsa
125 aw_i2c_ts
128 ptm
136 pts
150 cedar_dev
180 usb
188 ttyUSB
189 usb_device
229 ump
230 mali
248 lcd
249 pa_chrdev
250 BaseRemoteCtl
251 ttyGS
252 disp
253 bsg
254 rtc
Block devices:
1 ramdisk
259 blkext
7 loop
8 sd
11 sr
65 sd
66 sd
67 sd
68 sd
69 sd
70 sd
71 sd
93 nand
128 sd
129 sd
130 sd
131 sd
132 sd
133 sd
134 sd
135 sd
179 mmc
254 device-mapper
root@android:/ #

It appears the the device has a serial port but it's not where one would expect. This device comes with a smart feature: the MicroSD (uSD) Breakout featuring JTAG and UART connectivity trough the uSD socket but be warned that you may only use one option at the time (ie you cannot have the UART if you use the uSD). More on this later.

USB

This tablet comes with a mini-AB port with true host/slave functionality. According to the devices specifications it should be an OTG port but it's wildly out of spec as it can power up HDU units, internet 3G sticks and other stuff that is typically close to the 500mA limit on standard USB ports. The A13 has another USB port that is dedicated do the internal WiFi card. There's an article on wikipedia[3496] that may be useful to those wishing to make their own adapter for the mini-A socket to put the port in HOST mode.

With the stock android on the device I've used successfully all sorts of devices without the use of externally powered hubs, but at time the linux-sunxi kernels make get broken OTG driver. In any case as of 3.4.75 I was able to get the USB Ethernet cards working on the OTG port.

Internal Flash

root@android:/ # cat /proc/partitions
major minor  #blocks  name
7        0       3150 loop0
7        1      14585 loop1
93        0      16384 nanda
93        8      16384 nandb
93       16      32768 nandc
93       24     393216 nandd
93       32    1048576 nande
93       40      16384 nandf
93       48      32768 nandg
93       56     262144 nandh
93       64     131072 nandi
93       72    1981440 nandj
254        0       3150 dm-0
254        1      14584 dm-1
root@android:/ #

And here's where they are mounted:

root@android:/ # mount
rootfs                /           rootfs rw 0 0
tmpfs                 /dev        tmpfs rw,nosuid,relatime,mode=755 0 0
devpts                /dev/pts    devpts rw,relatime,mode=600,ptmxmode=000 0 0
proc                  /proc       proc rw,relatime 0 0
sysfs                 /sys        sysfs rw,relatime 0 0
none                  /acct       cgroup rw,relatime,cpuacct 0 0
tmpfs                 /mnt/asec   tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs                 /mnt/obb    tmpfs rw,relatime,mode=755,gid=1000 0 0
/dev/block/nandd      /system     ext4 rw,nodev,noatime,user_xattr,barrier=0,data=ordered 0 0
/dev/block/nande      /data       ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=0,journal_checksum,data=ordered,noauto_da_alloc 0 0
/dev/block/nandh      /cache      ext4 rw,nosuid,nodev,noatime,user_xattr,barrier=0,journal_checksum,data=ordered,noauto_da_alloc 0 0
/dev/block/vold/93:72 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/93:72 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs                 /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0       /mnt/asec/com.shootbubble.bubbledexlue-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1       /mnt/asec/com.wyse.pocketcloudfree-1 vfat ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
root@android:/ #

I dumped the nandX flash partitions and had a look at them from my pc:

root@darkstar:~/XZPAD700/dumps/nandx_dd# du -ms *
16      nanda
16      nandb
32      nandc
384     nandd
1025    nande
16      nandf
32      nandg
256     nandh
128     nandi
1936    nandj
root@darkstar:~/XZPAD700/dumps/nandx_dd# file *
nanda: x86 boot sector, code offset 0x0, OEM-ID "        ", sectors/cluster 4, root entries 512, Media descriptor 0xf8, sectors/FAT 256, sectors 262144 (volumes > 32 MB) , dos <    4.0 BootSector (0x0), FAT (16 bit)
nandb: data
nandc: data
nandd: Linux rev 1.0 ext4 filesystem data, UUID=bcf4f857-f4ab-df65-ff57-946fc0f9f25b (needs journal recovery) (extents) (large files)
nande: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) (large files)
nandf: data
nandg: data
nandh: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (needs journal recovery) (extents) (large files)
nandi: Linux rev 1.0 ext4 filesystem data, UUID=57f8f4bc-abf4-655f-bf67-946fc0f9f25b (extents) (large files)
nandj: x86 boot sector, code offset 0x58, OEM-ID "android ", sectors/cluster 8, heads 64, sectors 3955658 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 3856, Backup boot sector 2, serial number 0x4a9d1407, label: "CRANE      "
root@darkstar:~/XZPAD700/dumps/nandx_dd#

Touch Screen

Looking at the init scripts I found some evidence of what I suspect is the touch screen that is present on this device:

init.sun5i.rc 72:     insmod /system/vendor/modules/ft5x_ts.ko
root@android:/ # lsmod | busybox grep ft5
ft5x_ts 45529 0 - Live 0xbf0a6000
root@android:/ #

It's the FocalTech ft5x TouchScreen driver but it's not present in the vanilla kernel (at least not upto and including 3.4.56) probably because the driver code has not yet been accepted for inclusion (see note below), but I've found the driver to be present in both the 3.0 and 3.4 linux-sunxi kernel sources:

root@darkstar:/XZPAD700/kernel# find . -type f -name *ft5x*
./linux-sunxi-sunxi-3.4/drivers/input/touchscreen/ft5x_ts.c
./linux-sunxi-sunxi-3.4/drivers/input/touchscreen/ft5x_ts.h
./linux-sunxi-sunxi-3.0/drivers/input/touchscreen/ft5x_ts.c
./linux-sunxi-sunxi-3.0/drivers/input/touchscreen/ft5x_ts.h
root@darkstar:/XZPAD700/kernel#

I've loaded manually the module from my Slackware image and had a partial success with gpm and X but there are issues:

haven't found any means of calibrating it (ant it looks like it could benefit from a calibration)

neither gpm nor X seems to work well with this drive/hardware combination

absence of mouse buttons doesn't help at all

This is my guess to why the ft5x driver has not yet made it into the mainstream kernel: it appears that this driver needs a firmware blob bundled into it to make it functional. This firmware blob depends on the hardware implementation of the platform making it darn hard for an end user to get a working driver for any kernel that is not what came stock with the hardware. Technically the code is GPL, and with that basic code you get some sort of basic but flawed functionality, but without the blob it's pretty much useless on a tablet.

Bootloader

I've found evidence of U-Boot configuration environments on nanda and nandb.

U-Boot 2011.09-rc1-dirty (Nov 22 2012 - 14:25:29) Allwinner Technology
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
bootcmd=nand read 50000000 boot;boota 50000000
bootdelay=1
baudrate=115200
bootdelay=3
bootcmd=run setargs boot_normal
console=ttyS0,115200
nand_root=/dev/nandd
mmc_root=/dev/mmcblk0p4
init=/init
loglevel=8
setargs=setenv bootargs console=${console} root=${nand_root}init=${init} loglevel=${loglevel}
boot_normal=nand read 50000000 boot; boota 50000000
boot_recovery=nand read 50000000 recovery; boota 50000000
boot_fastboot=fastboot
bootcmd=nand read 50000000 boot;boota 50000000
bootdelay=1
baudrate=115200
bootdelay=3
bootcmd=run setargs boot_normal
console=ttyS0,115200
nand_root=/dev/nandd
mmc_root=/dev/mmcblk0p4
init=/init
loglevel=8
setargs=setenv bootargs console=${console} root=${nand_root}init=${init} loglevel=${loglevel}
boot_normal=nand read 50000000 boot; boota 50000000
boot_recovery=nand read 50000000 recovery; boota 50000000
boot_fastboot=fastboot
set_default_env
env_import
mmc_saveenv
nand_saveen

System On Chip

root@android:/proc # cat /proc/cpuinfo
Processor       : ARMv7 Processor rev 2 (v7l)
BogoMIPS        : 1001.88
Features        : swp half thumb fastmult vfp edsp neon vfpv3
CPU implementer : 0x41
CPU architecture: 7
CPU variant     : 0x3
CPU part        : 0xc08
CPU revision    : 2
Hardware        : sun5i
Revision        : a13b
Serial          : 01c0f06339313030504d4e33162542c4

The SOC seems to be a Allwinner A13 (sun5i Cortex-A8) with support for the following optional features:

NEON,

VFPv3,

Thumb-2

and features a single cortex A8 core @ 1ghz and mali400 GPU @320mhz.
There is a lot of very useful information on the linux-sunxi.org main page [3497].

If you have a look at the linux-sunxi.org main page you will find all the information required for customizing this tablet. Here are a few of the useful titles on that site that may be very helpful:

Binary drivers

Bootable SD card

BROM

BSP

Buildroot

CodeSourcery

Cpufreq

Display

FEL/USBBoot

Fex Guide

FirstSteps

GPIO

How to boot the A10 over the network

Hwpack

Initial Ramdisk

Kernel arguments

MicroSD Breakout

Optimizing system performance

U-Boot

Wifi

In particular there is an interesting article concerning how the Allwinner SOC based boards boots[3498]. This gives a fair idea on the alternatives available for booting custom images besides being an interesting read anyway.

MicroSD Breakout

Pin | MMC/MicroSD | JTAG Connection | 14-pin ARM JTAG Header | UART Connection | 5-pin UART Header
1 | Data2 | TCK | 9 | nc | nc
2 | CD/Data3 | nc | nc | RX | 2
3 | Cmd | TDO | 11 | nc | nc
4 | VDD | VTG | 1,13 | VDD | 3
5 | CLK | nc | nc | TX | 1
6 | VSS | GND | 2,4,6,8,10,14 | GND | 4, 5
7 | Data0 | TDI | 5 | nc | nc
8 | Data1 | TMS | 7 | nc | nc
nc | nc | nTRST | 3 | nc | nc
nc | nc | nRESET | 12 | nc | nc

If you don't want to tinker you can buy a ready-made UART and JTAG uSD breakout header ready to use on A10/A13 devices from here [3499]. But be aware that you may use only one feature at the time, so if you intend to use the uSD slot for storage you will not be able to use the UART.

The Internals

high definition picture[3500]

I'm not 100% sure but on this side I think we can see the A13 SOC, the AXP209 lipo battery management chip, the Realteck RTL8188EUS wifi NIC and 2 DDR ram chips. The internal flash is located under the LCD flect cable . I did a bit of searching with the board label and it appears that this is equivalent to: Allwinner Boxchip A13 Tablet

The SOC The board label

Booting a Custom Image from MicroSD

See the Wrapping Up[3501] section of this article for links to the image builder I'm currently using.

Although a lot of information in this section comes from linux-sunxi.org I'll rearrange it here removing any distro oriented stuff that is not pertinent to Slackware and keeping it as neutral as possible anyway.

This device is based on a AL-A13-RT713 that is as close as you can get to a a13_mid device so we will attempt booting with a setup fro that device. Here's the list of things that will be required:

kernel and kernel modules

the binary version of FEX config file script.bin

sunxi-spl.bin

u-boot.bin

a root system image containing the userland

1 is available from the A13_mid hardware pack v 3.0[3502] or v 3.4[3503].Alternatively you can try building your own kernel from linux-sunxi[3504] source tree (be warned that a lot of patches for the Allwinner SOC have not yet made it to mainstream kernel).
2 needs to be ripped out of the nanda partition on the device itself, failing to do this will result in a kernel panic due to incorrect setup for kernel.
3 and 4 need to bi ripped out of the fedora image for Axx as the ones that come in the hwpack seem to fail booting on this device even with the correct script.bin.
Our userland is going to be one of these[3505] because we are Slackware freaks but you can have anything else you like (prepare a large enough image to hold whatever you prefer).

There are other various things that could get you booting with a little work but I like to keep things as neutral as possible so that if you are not a Slackware freak you can still use most of the information here to boot whatever suits you best.
Jeff Doozan has a rescue system[3506] for the A10 SOC systems,there is a thread on Doozan's wiki[3507] regarding his rescue system.
BerryBoot[3508] also supports booting custom images for the A10 SOC.
Thierry Merle's Flash Kitchen[3509] has a working solution for the A10.

Preparing the MicroSD raw image

TheSlackware ARM 14 miniroot can fit in 200Mb so I guess the absolute minimum would be 256Mb uSD but that's not going to be much use on a tablet, I'd reccomend starting off with a 512Mb uSD.
If you want a functional X11, with a minimal window manager like fluxbox and various usefull libraries, a working gcc compiler along with some extra networking stuff you're looking at around 1.6Gb of occupied disc space so I guess that you can do with a 2 commertial Gb uSD. Once you convert the space in to real GB, take away the boot partition space and create the filesystems you'll not be left with much usable space … maybe just enough to download the compressed kernel sources tarball.
Let's try with the just to check everything works.
NB: 512Mb flash devices are 512 commercial Mb and work out to be something like 507379712 bytes or 483.875 Mb
(one Megabite is 2^20 bytes or 1048576 bytes)

Let us begin by creating a raw image in which we will then create the uSD image:

root@darkstar:~# dd if=/dev/zero of=512mb_raw.img bs=1024 count=495488
495488+0 records in
495488+0 records out
507379712 bytes (507 MB) copied, 13.4449 s, 37.7 MB/s
root@darkstar:~#

Partition the card

Now let's partition it (sfdisk that is on my linux has a bug that forces me to use sectors as units, it would be handier if you can use Mb as units).
The crunch of is is that the firs partition needs to begin 1Mb from the beginning of the device and at least 16Mb big.

root@darkstar:~# cat <<EOT | sfdisk -f -uS  512mb_raw.img
2048,32768,c,*
34817,,L
0,0,0
0,0,0
EOT
root@darkstar:~#

Older u-boot builds for this platform required the boot partition to be vfat, but this in no longer mandatory with the newer builds and ext2/3 are now valid for boot partition too. You will need a 16Mb boot partition (offset 1Mb from the beginning of the device) and at least one partition for the system.

Formatting the Filesystems

In order to format correctly the filesystems on the raw image we need to use of losetup with offset and size.
Remember that the first partition begins 1Mb from the beginning of theimage and that the root filesystem will then begin 17Mb from the beginning of the image.

root@darkstar:~# losetup -o 1048576 --sizelimit 16777216 /dev/loop0  512mb_raw.img
root@darkstar:~# losetup -o 17826304 --sizelimit  489552896 /dev/loop1 512mb_raw.img
root@darkstar:~# mkfs.vfat /dev/loop0
root@darkstar:~# mkfs.ext4 /dev/loop1

The filesystems can now be mounted so that we can deposit the required files in them.

Some thoughts on filesystems designed for ordinary block devices on flash devices:
Unlike flash specific filesystems like jffs2 the linux journaled filesystems ext3 and 4 are designed to work on ordinary block devices, the way blocks are rewritten and the way the journal is used was not conceived to be conservative on the number of rewrites cycles on flash devices. Also the way block rewrites take place does not take into account that the erase block of a flash device is typically 32 times bigger then the block that the fs driver wants to write, resulting in a physical rewrite of much more data then the the block that was requested to be flushed to disk.
Be warned that while most SLC flash devices allow for 100000 rewrites MLC devices typically only get 10000 rewrites before failure. Most low end flash devices are MLC. If you really want journal at least make sure you mount the device with the noatime,data=ordered option or you will literally burn out your uSD card really quickly.
This is why I format most of my root filesystems on flash devices that get managed like ordinary IDE/SATA/SCSI/SAS devices as ext2, but there is a major issue with portable devices: an uncontrolled reset can drop your device into a prompt for root password for maintenance, and if you don't have a keyboard handy you are screwed untill you get hold of one … so I sujjest this device be formatted with a journaled root filesystem.

Preparing the Boot Partition

In the boot partition you need to deposit kernel in a format that uboot will manage (uImage) along with script.bin.
To mount the vfat boot partition we can still use the loop0 device.
the a13_mid_hwpack.tar.xz is the hardware pack that can be downloaded from the link above.

root@darkstar:~#  mount /dev/loop0 /mnt/floppy
root@darkstar:~#  tar xf a13_mid_hwpack.tar.xz kernel/script.bin kernel/uImage -C /mnt/floppy
root@darkstar:~# cat << EOF > /mnt/floppy/boot.cmd
setenv bootargs console=\${console} root=\${root} loglevel=\${loglevel} \${panicarg} \${extraargs}
fatload mmc 0 0x43000000 script.bin
fatload mmc 0 0x48000000 \${kernel}
watchdog 0
bootm 0x48000000
EOF
root@darkstar:~# cat << EOF > /mnt/floppy/uEnv.txt
console=tty0
loglevel=5
root=/dev/mmcblk0p2 ro rootwait
extraargs=console=ttyS0,115200 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 sunxi_g2d_mem_reserve=0 sunxi_ve_mem_reserve=0 sunxi_fb_mem_reserve=16 sunxi_no_mali_mem_reserve
EOF
root@darkstar:~# umount /mnt/floppy
root@darkstar:~# losetup -d /dev/loop0

If you are interested in making an initrd setup (for whatever reason) you might find this[3510] an interesting read.

Preparing the root filesystem

In this partition you need to extract a root image. On linux-sunxi.org it is suggested to use an ubuntu-alip [3511] image but we are slackware freaks so we will use one of these miniroots[3512]. You may actually use any userland that is compatible with the cpu architecture. The sun51 is an CORTEX A8 AMM v7 instruction set so it will likely run any userland available as long as it's compiled in a ABI format compatible with the kernel you put in the boot partition.
Just keep in mind that this device does not have a physical keyboard, not all standard linux include virtual keyboards amongst their packages. You might want to add to your root image xvbkd[3513] and have it fire up along with xdm (or whatever other manager you choose to run) so that you can login.

For xdm you can just add a line like this at the end of /etc/X11/xdm/Xsetup_0:
exec /usr/local/bin/xbkbd -xdm -compact -minimizable -geometry 550×185+100+290 &

root@darkstar:~# mount /dev/loop1 /mnt/floppy
root@darkstar:~# tar xf a13_mid_hwpack.tar.xz -C /tmp
root@darkstar:~# cp -apr /tmp/rootfs/* /mnt/floppy
oot@darkstar:~# tar xf slack-14.0-miniroot_27Sep12.tar.xz -C /mnt/floppy
root@darkstar:~# cat << EOF > /mnt/floppy/etc/fstab
proc            /proc           proc    defaults        0       0
/dev/mmcblk0p2       /               ext4    errors=remount-ro,noatime,data=ordered 0 1
EOF
root@darkstar:~# umount /mnt/floppy
root@darkstar:~# losetup -d /dev/loop1

Preparing the Bootloader

Unfortunately the bootloader stuff supplied from the hwpack seems to be broken, it's best to rip the bootloader stuff out of the fedora image[3514] for the A1* family.

root@darkstar:~# losetup /dev/loop2 512mb_raw.img
root@darkstar:~# dd if=/tmp/bootloader/sunxi-spl.bin of=/dev/loop2 bs=1024 seek=8
20+1 records in
20+1 records out
20992 bytes (21 kB) copied, 0.000304966 s, 68.8 MB/s
root@darkstar:~# dd if=/tmp/bootloader/u-boot.bin of=/dev/loop2 bs=1024 seek=32
211+1 records in
211+1 records out
217036 bytes (217 kB) copied, 0.00115387 s, 188 MB/s
root@darkstar:~# dd if=uEnv-img.bin of=/dev/loop2 bs=1024 seek=544
128+0 records in
128+0 records out
131072 bytes (131 kB) copied, 0.00124961 s, 105 MB/s
root@darkstar:~# sync
root@darkstar:~# losetup -d /dev/loop2

If you want to build your own images you might want to have a look at these git repositories:

git clone git://github.com/linux-sunxi/u-boot-sunxi.git
git clone git://github.com/linux-sunxi/linux-sunxi.git
git clone git://github.com/linux-sunxi/sunxi-tools.git
git clone git://github.com/linux-sunxi/sunxi-boards.git

Wrapping up

You may now write the image to a uSD card with a simple cat redirected to the card's block device.
Supposing your card is on /dev/sdg:

root@darkstar:~# cat 512mb_raw.img > /dev/sdg

Slip the card in the uSD slot and boot your device.

Have a look at the freshly booted device:

and here's a video of the device booting (stable kernel this time)

Image Builder

The image builder is for brewing up an arbitrary size SD image to match whatever size SD you have. It is technically possible to use a 256Mb SD for a Slackware ARM miniroot system with little space for a few extra packages, but I advice to start off with no less then 1/2Gb SD card.
You will need to know what type of architecture your Allwinner SOC is (sun4i, sun5i or sun7i) before you start: look this up here[3515]. It is also possible to use this image builder with other distribution's root images but it may require a little manual work if the target distribution does not have the modules in /lib/modules/<kernel version>.

Here's a link to the image builder[3516] I'm currently using (it has inside all you need to get the Slackware ARM 14.0 or 14.1 miniroot booting on many Allwinner SOC based devices) just download all the files and you're ready to go. The files are also available via http[3517] or via rsync[3518].

I've thoroughly tested it on mt tablet and I've had success reports on Cuietruck. If you have had success on some other device please report it on the Slackware ARM [3519] subforum on LinuxQuestions.

I'll leave the slightly older version on sourceforge as a tarball[3520] for a while. It's not really the right place for it as it does not fit in perfectly with my clashNG project but it's related so I hope sourceforge won't mind having it there for a while.

Booting over Network

There is a documented procedure for booting this tab over network http://linux-sunxi.org/How_to_boot_the_A10_over_the_network[3521]. Getting the device to do a normal installation would probably only require having a working kernel for this hardware.

Bootsplash

This device shows 3 splash images/animations while booting:

uboot splash image

linux kernel logo

android boot animation

Changing the kernel logo will require fiddling with the kernel so we'll skip that until I manage extracting it from the internal flash or compile a working version of my own. But it's easy to change the uboot splash and the android boot animation.

U-Boot splash image

You can change the uboot splash image by mounting nanda rw and editing the linux.ini file:

busybox mkdir -p /data/local/tmp/mnt/
busybox mount -o rw /dev/block/nanda /data/local/tmp/mnt/
cd  /data/local/tmp/mnt/linux
busybox vi linux.ini

and make the logo_info section look like this

[logo_info]
logo_name = c:\linux\slack.bmp
logo_show = 1

you then need to create a 800×480 windows bitmap image of whatever you prefer and call it slack.bmp. This should be copied over to the linux directory in the nanda partition and then you can umount the nanda partition. Next time you boot normally from the internal flash uboot should show the custom image before flipping over to the linux kernel logo image and subsequently to the android bootanimation.

Android bootanimation

This device has a bootanimation binary that loads a default image (probably self contained in the binary) if no bootanimation.zip file is found on the system. By inspecting the binary it appears that it looks for such files in the following paths:

/system/media/bootanimation-encrypted.zip
/data/local/bootanimation.zip
/system/media/bootanimation.zip
/system/media/boot.mp3

I prefer to target /data/local/bootanimation.zip bacause it does not require fiddling remounting as this part is already RW. The zip file needs to something like this in it:

root@darkstar:/tmp/my_bootanimation# ls -lR
.:
total 8
-rw-r--r-- 1 drao users   22 Jul  8 14:59 desc.txt
drwxr-xr-x 2 drao users 4096 Jul  8 14:56 part0/
./part0:
total 32
-rw-r--r-- 1 drao users 14124 Jul  8 14:15 001.jpg
-rw-r--r-- 1 drao users 14124 Jul  8 14:25 002.jpg
root@darkstar:/tmp/my_bootanimation# cat desc.txt
480 800 2
p 0 0 part0
root@darkstar:/tmp/my_bootanimation#

Where the desc.txt file configures how the animation is to be displayed:

480 800 2 means that the images are 800×480 and the animation is showed @ 2 FPS (I've still images so that's fine for me, but it can be 30FPS if you need)

p 10 0 part0 means that images are loaded from a directory part0 and are looped 10 times (0 would be infinite loop) and each iteration pauses 0 Frames before starting over again

You can then zip it without copmpression:

root@darkstar:/tmp/my_bootanimation# zip -r -0 ../my_bootanimation.zip  *
adding: desc.txt (stored 0%)
adding: part0/ (stored 0%)
adding: part0/002.jpg (stored 0%)
adding: part0/001.jpg (stored 0%)
root@darkstar:/tmp/my_bootanimation#

and push it to your device like this

 ./adb push /tmp/my_bootanimation.zip /data/local/bootanimation.zip

Next time bootanimation binary is executed it will find and load the custom animation. You can execute it manually from a terminal application or from adb shell. If your animation is an infinite loop you can hit CRTL^C to quit execution from the shell that you used to launch it.

Sources

Originally written by louigi600[3522]

howtos, hardware, arm, louigi600

The ARM Machine Architecture Numbers

If you want to know what is the correct Machine Architecture Number for your device you might want to have a look here[3523].

There is also a good primer on ARM boot-loader basic operation here[3524]

Sources

howtos, arm, author , louigi600

Qemu Support in Slackware ARM

This document describes the process of installing Slackware ARM inside of QEMU.

QEMU is a full system emulator that can emulate a range of real hardware architectures. In this case we will use QEMU to emulate the ARM Ltd. “Versatile Express” development board.

QEMU provides a platform to allow an operating system to believe that it is running on real hardware.

QEMU runs on your Slackware PC or server. In most cases this will be a desktop machine. However, it is possible to run QEMU on a headless server and use VNC for graphics.

Last modified (September 2020)

This tutorial was last verified on September, 22 2020, on Qemu 4.1 installed on Slackware64-current, dated Sun Sep 20 08:08:08 UTC 2020. Verification on Slackware 14.2 is still necessary. The helper scripts were built for qemu-2.5, and do not work with the latest version of qemu (4.2 at the time of writing).

The issues are to do with the network support. They should be fixed.

If you have suggestions for the helper scripts, please post a diff on here[3525] or email mozes at slackware. Please base fixes on the the latest scripts[3526].

Who is Slackware ARM in QEMU aimed at?

The aim of installing Slackware ARM inside QEMU is to allow people who do not have ARM hardware to try out Slackware ARM.

While QEMU[3527] is an excellent emulator, it is very slow compared to real ARM hardware. QEMU was used for approximately a year to develop most of Slackware ARM version 12.2. Due to the slow speed of QEMU, distcc[3528] can be used on several x86 machines to speedup compilations. It's possible to effectively use Slackware ARM in QEMU, however be aware that it will not present the best user experience due to its lack of speed. Ideally Slackware ARM should be run on real ARM hardware.

This document is a work in progress and it targets the development release of Slackware ARM, Slackwarearm-current.

Documentation for Slackware ARM 14.0, 14.1, and 14.2, can be found here:

Slackwarearm-14.0[3529]

Slackwarearm-14.1[3530]

Slackwarearm-14.2[3531]

Installation Environment Assumptions

Several assumptions are made to aid in writing this document.

The host machine is running a full installation of Slackware x86 or x86_64

You have root access on the host machine and can compile software

The Slackware host and QEMU emulator are on a secure Local Area Network

Slackware x86 Host Prerequisites

Download the Slackwarearm distribution package tree with rsync

Populate a location with the Slackware ARM QEMU files

Install QEMU and the device-tree-compiler software on the Slackware x86 host

Configure QEMU Permissions on the Slackware x86 Host

Create the QEMU disk image using the helper scripts

Configure a web server to mirror Slackware ARM for the qemu guest

Download Slackware ARM

Download Slackware ARM to your Slackware x86 Host. In this tutorial rsync is used to mirror Slackware ARM. Before running rsync, make sure your user has read, write, and execute permissions within the directory you pick. In this example /slackwarearm/$SLACKREL is used, but you can use a directory of your choice.

Log in as root and run the following:

mkdir -p /slackwarearm/$SLACKREL
cd /slackwarearm/$SLACKREL
rsync --exclude '*/source/*' --delete -Pavv ftp.arm.slackware.com::slackwarearm/$SLACKREL .

If you wish to use a web browser, wget, or lftp to download Slackware ARM, the mirror is here[3532].

The $SLACKREL variable refers to the Slackware ARM tree you downloaded. If you chose Slackwarearm-14.2, the rsync URL will be ftp.arm.slackware.com::slackwarearm/slackwarearm-14.2[3533]

Populate Slackware ARM Files and Directories

In order to boot the Slackware ARM installer you need to create a directory that stores the Kernel and Initial RAM disk. You also need a few helper scripts to run QEMU. In this totorial, all of these files will be stored in /slackwarearm.

Copy the kernel and RAM disk:

cd /slackwarearm
cp -fa /slackwarearm/$SLACKREL/kernels/armv7/{zImage*,initrd*,dtb} /slackwarearm
cp -fa /slackwarearm/$SLACKREL/isolinux/initrd-armv7.img /slackwarearm

Download and copy the QEMU helper scripts:

# cd /tmp ; mkdir qemu ; cd qemu
# rsync -Prlvv --delete ftp.arm.slackware.com::slackwarearm/boardsupport/qemu/$SLACKREL .
# cd $SLACKREL
# cp -fav helper-scripts/* /slackwarearm

You can find the helper scripts here[3534] if you do not wish to use rsync to download them.

The $SLACKREL variable refers to the Slackware ARM tree you downloaded. The rsync URL for the QEMU helper scripts will be:

ftp.arm.slackware.com::slackwarearm/boardsupport/qemu/slackwarearm-current

Install QEMU and device-tree-compiler

Installing SlackBuilds is not apart of the scope of this article. If you need assistance with installing QEMU or device-tree-compiler, please refer to the SlackBuilds.org HOWTO page[3535]. With that said, there are a few recommendations:

If you are running Slackware-current you can install QEMU and skip installing the device-tree-compiler package. Slackware-current already includes the device-tree-compiler package in a full installation.

Please be certain that you did a full Slackware installation on your x86 host prior to installing these SlackBuilds.

Slackware 14.0, 14.1, and 14.2 users need to install the device-tree-compiler package from SlackBuilds.org[3536] prior to installing QEMU.

You can download and install QEMU from SlackBuilds.org[3537].

You will not have the ability on 14.0, 14.1, and 14.2 systems to emulate the ARM architecture in QEMU if you do not first install the device-tree-compiler package.

QEMU Permissions

There are a few permissions that need to be set once you have successfully installed QEMU on your system. The QEMU client will be launched by running the /usr/bin/qemu-system-arm binary. This binary needs root permissions in order to be executed. You can run this binary with sudo by editing /etc/sudoers. Using sudo is the most secure option if you have multiple users on your system. If you are the only user on your system then setting the setuid permission as root is sufficient. Adjusting these permissions will allow a normal user to configure and boot the QEMU guest without logging in as root.

Setting the setuid root permission requires that you log in as root. As root execute the following commands:

# chmod +s /usr/bin/qemu-system-arm

If you plan to configure QEMU to use a network bridge, you also need to set the setuid root permission for /sbin/ifconfig and /sbin/brctl.

# chmod +s /sbin/{ifconfig,brctl}

Create QEMU Disk Image

Prior to booting the Slackware ARM installer in QEMU, you must create a disk image that acts as an emulated SD Card[3538]. This disk image is used to emulate the MMC controller in Slackware ARM. Earlier you copied the Slackware ARM helper scripts to /slackwarearm. Within this directory there is a script, makeimg. This script creates a 15GB disk image automatically in /slackwarearm when it is executed. Initially all you need to do is run this script.

Switch to the directory where you copied the helper scripts and execute makeimg:

cd /slackwarearm
./makeimg

Be aware that once you have installed Slackware ARM onto this disk image you must move it to a different directory for storage, or you risk it being destroyed when makeimg is executed at a later time.

QEMU Network Settings

This section covers the process of setting up QEMU guest networking. Network Address Translation mode (NAT) is the recommended way to get a functional network in QEMU guests. You can also use a bridged mode network. NAT mode does not allow direct access to the Slackware x86 host's physical network and bridged mode does. It is best to use bridged mode if you plan on doing any more advanced network operations that require full access to the host and the host's physical network. Most users will want to use NAT mode. As a result, Bridged mode will not be detailed here.

There are many different ways to configure QEMU guest networking. This document will only cover the QEMU functionality required to boot Slackware ARM. Refer to the QEMU man pages or the QEMU documentation[3539] if you need further explanation.

Later on when you boot the Slackware ARM installer in QEMU you may need to modify the txqueuelen for your network interfaces. This is because large Slackware packages time out while being downloaded from the host. This happens because QEMU emulation is very slow. The host machine occasionally shuts down the network socket before large packages (rust, kernel-firmware, etc) finish being copied to the emulated SD Card. Setting the txqueuelen to 10000 for all network interfaces should be sufficient to prevent this anomaly. The following command seems to resolve this issue:

ip link set eth0 txqueuelen 10000

Run this command for each network interface actively used by QEMU.

QEMU NAT Mode Networking

NAT mode does not require any additional configuration on the Slackware x86 host machine or in the QEMU guest machine. Here is a shortened example of a QEMU guest being launched with NAT mode networking:

# cd /slackwarearm
# qemu-system-arm -nographic \
-m 1024 \
-M vexpress-a9 \
-smp 4 \
-k en-us \
-net nic \
-net user,restrict=n \
..snip..

The -net nic and -net user options enable QEMU to start the Slackware ARM guest with NAT mode networking enabled. These settings are documented further in both the installer_launch and disk_launch helper scripts.

With NAT mode enabled, QEMU launches a virtual network of 10.0.2.0/24. The QEMU guest will be assigned the IP address 10.0.2.15. The guest can access the Slackware x86 host at 10.0.2.2 and the QEMU DNS server runs at 10.0.2.3. QEMU does not have direct access to the host's Local Area Network. This means that the QEMU guest isn't assigned a physical IP address by your router DHCP service. You will not be able to ping the QEMU guest from the host machine but the guest should be able to ping the host machine at 10.0.2.2. The QEMU guest should be able to access the internet and communicate with the host machine.

Configure a Web Server to Mirror Slackware ARM

There is a very simple way to share the ARM directory on the host with the ARM guests. Use python and launch a basic web server like so:

 cd /slackwarearm && python -m SimpleHTTPServer

The URL pointing to the mirror depends on the directory structure you used to store Slackwarearm on the qemu host. The directory /slackwarearm/$SLACKREL was used earlier in this guide. If you have mirrored slackwarearm-current, you would point your web browser at: http://192.168.1.2:8000/slackwarearm-current/[3540].

For a production environment, the Apache Web server (httpd on Slackware) may be more desirable. Further directions to use Apache can be found here[3541].

Alternatively, use a mirror on the internet if you have too much difficulty configuring your own mirror.

Install Slackware ARM

I will assume that you are now in X Windows, running as your normal user account, and that you followed the steps outlined earlier in this document. As stated earlier, QEMU runs extremely slow when emulating the ARM architecture. Depending on your hardware set up it may take several hours or more for the Slackware installer to copy all packages to the emulated disk. If the Slackware installer appears to be unresponsive, check your system process monitor (top or htop) to see if the QEMU process is still active. A good sign that QEMU is still active is that a single CPU core is operating at 100 percent.

The Slackware ARM installer is mostly identical to the Slackware x86 installer. There is no learning curve to install Slackware ARM if you have installed Slackware before.

Booting the Installer

In order to boot the installer you will need to configure and execute the installer_launch script within a terminal window.

cd /slackwarearm
./installer_launch

The installer_launch script can be found here[3542].

You will see some warnings from QEMU about being unable to open audio and video devices. Those warnings can safely be ignored. Next you will see the Linux kernel boot messages and eventually the installer asking about what key map you want to use. Once you select your key map and log in to the system you will notice that the installer obtains an IP address via DHCP. The DHCP assigned IP address and resulting network configuration relies heavily on how you set up your networking on the host machine. If QEMU does not assign an IP address to the guest, then you need to go back and verify your network settings are configured appropriately.

Partitioning

The emulated SD Card created with the makeimg command is a blank image. You will have to partition this SD Card with the installer. It is best to keep the partition scheme simple in our case. It is recommended that you create a 200MB swap partition and to allocate the rest of the disk to the root partition. You can use the fdisk or cfdisk tools to create the partitions.

Example partitioning scheme:

/dev/mmcblk0p1 - 200MB swap
/dev/mmcblk0p2 - the rest of the disc, "Linux" - type 83.

Setup and Configuration

Run the setup command at the shell prompt after you exit the partitioning tool. Make the installer aware of your swap partition and root partition. It is recommended that you select the ext4 file system when you format the root partition. Next you will be prompted to select the source media. Choose option 5, Install from FTP/HTTP sever. Enter the IP address of your Slackware x86 host. The path to the Apache (httpd) directory is required:

What is the URL of your FTP/HTTP server?

In this case we will use the host IP address, enter the URL address: http://192.168.1.2[3543]

What is the Slackware source directory?

This is the directory that is accessible in your web browser. I used: /slackwarearm-current/slackware

Following that, you will be prompted for package selection. Slackware ARM has all of the standard Slackware packages apart from those which are x86 only. It is highly recommended that you do a full installation to satisfy all system dependencies. Please be patient, this is the most time consuming part of the installation process.

After installation has finished, running 'MKFONTDIR AND MKFONTSCALE UPDATE' takes a long time.

At the Network Setup screen it is best to select the DHCP option. The DHCP option best compliments QEMU's NAT mode and both bridged mode networking options. The only reason not to select DHCP is if your physical network uses static IP addressing.

Next you will reach the Window Manager selection for the X Windows server. It is recommended that you select a light weight window manager, such as Fluxbox or WindowMaker. KDE and Xfce are not very useful within the QEMU guest due to speed constraints.

Post-Installation

Once you complete the installation process you should drop to a shell prompt to configure the SSH Daemon. By default, OpenSSH does not allow root to log in with a password. This is a security concern. You may want to think about this carefully if your device is connected directly to an untrusted network. It is best to make a user account for remote connections to the SSH service and escalate privileges locally with “su” or “sudo”. If you wish to use root to log in remotely, follow these steps:

Opt to drop in to a 'shell' when you exit from the installer

At the shell, enter:

# sed -i 's?^#PermitRootLogin.*?PermitRootLogin yes?g' /mnt/etc/ssh/sshd_config
# poweroff

This completes the installation process of Slackware ARM within QEMU.

Boot Slackware ARM with QEMU

Congratulations for making it this far! The next step is booting into your fresh installation of Slackware ARM. Locate the disk_launch helper script in /export/armhost and modify it to fit your needs.

# cd /slackwarearm
# vi disk_launch

This script has a few variables you may want to change.

ROOTFSTYPE - root file system type, ext4 is the default

ROOTFSDEV - location of the root partition within the SD Card image

KEYBOARD - keyboard locale you wish to use, typically the same as what you chose during installation

NETTYPE - network configuration, NAT mode or bridged mode

The disk_launch script for Slackwarearm-current can be found online, here[3544].

The first boot will take quite a while. This is due to the fact that Slackware will generate the font cache for the first time. Start up QEMU by executing the disk_launch script.

# ./disk_launch

Assuming all is well, you can begin using Slackware ARM just as you would any other Slackware installation.

Slackware ARM Graphical User Interface

Work in Progress

This section will discuss the positives and negatives around running X Windows, which window manager or desktop environment to use, and the ways you can start it up.

Sources

Originally written by Stuart Winter[3545]

Original source: http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/[3546]

Modified and Maintained by mralk3 [3547]

howtos, hardware, arm, user mralk3

Zram in Slackware ARM and ARM64 Architectures

The Slackware ARM and ARM64 architectures bring us Slackers the possibility of using much more powerful single board computer hardware and Slackware as a native operating system. Currently this includes existing hardware for ARM, and ARM64 hardware such as the RockPro64 and the Pinebook Pro for ARM64. In addition, the zram kernel module can be applied to optimize the performance of many single board computers, some with existing support in Slackware ARM architecture. SBCs such as the Orange Pi, and Bannana Pi, and Raspberry Pi. The kernel module 'zram' is included in a stock installation of Slackware.

What is zram? Lets first begin by defining it: In its simplest explanation, it is a compressed RAM block device. There are three real world examples listed. I find one to be most useful in this instance. Zram can be used as a temporary file system, as partition or location in RAM for log files, or to extend the amount of RAM available to a computer with low RAM resources as a swap space.

Swap space is what I will focus on explaining, and applying, to one of my own systems for the first time. It is very common for single board computers to run out of memory and start swapping. Using zram we can create a swap space that is stored in memory, is compressed in RAM, and is executed from memory. This will extend the life of your SD Card, solid state disk, or USB Stick. It will especially make your device far more responsive. There is no cost for using zram if you have RAM that is sitting empty and available.

Getting Started - Gathering information

Let us take a look at the zram kernel module on an existing Slackware ARM system. Slackware x86 and x86_64 machines have this module available as well. As an example I will use my Raspberry Pi 4. It is running the latest Slackwarearm-current (Mon Feb 15 08:08:10 UTC 2021).

As root, run:

root@fourb:~# modinfo zram
filename:       /lib/modules/5.10.20-v7l+/kernel/drivers/block/zram/zram.ko
description:    Compressed RAM Block Device
author:         Nitin Gupta <ngupta@vflare.org>
license:        Dual BSD/GPL
srcversion:     36D4C92C73413B20D799472
depends:        zsmalloc
intree:         Y
name:           zram
vermagic:       5.10.20-v7l+ SMP mod_unload modversions ARMv7 p2v8
parm:           num_devices:Number of pre-created zram devices (uint)

Now let us take look to see how much RAM the system has registered. I've removed the swap file for this exercise.

As root again, run:

root@fourb:~# free -m
total        used        free      shared  buff/cache   available
Mem:            3827          35        3553           0         238        3748
Swap:              0           0           0

Additionally, here is how many processor cores are available:

root@fourb:~# lscpu
Architecture:        armv7l
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  1
Core(s) per socket:  4
Socket(s):           1
Vendor ID:           ARM
Model:               3
Model name:          Cortex-A72
Stepping:            r0p3
CPU max MHz:         1500.0000
CPU min MHz:         600.0000
BogoMIPS:            180.00
Flags:               half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32

So the system has 4 cores, 4 threads, and 4GB of RAM. This should be plenty of power to run a basic graphical user interface, such as Xfce. KDE Plasma 5 should work too, but I have not tested it yet on this particular system. You may be asking yourself right now: What happens when I open Firefox? Calligra to write a paper? Or even compile a few SlackBuilds of marginal resource use?

That is where zram comes in. Let me show you how to set it up.

Next Steps: Configuration

To begin, enable the kernel module. As root edit and add to the bottom of /etc/rc.d/rc.modules.local:

/sbin/modprobe zram # enable zram powah!

Second you need to create and add to /etc/modprobe.d/zram.conf. We have four processor cores, so we will set zram to assign four block devices, one for each core:

options zram num_devices=4

Do not exceed the number of processor cores. The block devices can be used for a number of tasks. You do not want to burn out your SBC, so use sane values

Next, add a udev rule to create the block devices on boot. As root, create, and then edit /etc/udev/rules.d/10-zram.rules:

KERNEL=="zram[0-3]", SUBSYSTEM=="block", DRIVER=="", ACTION=="add", ATTR{disksize}=="0", ATTR{disksize}="512M", RUN+="/sbin/mkswap $env{DEVNAME}"

Be aware of the first setting, KERNEL==“zram[0-3]“ and the second setting ATTR{disksize}=“512M”. This will create 4 block devices: /dev/zram0, /dev/zram1, /dev/zram2, /dev/zram3. The disk size attribute will set each swap to 512MB. Please be certain you have adjusted the number of block devices and their size to match your system. On a Raspberry Pi 4, this is just right!

On other systems you may have more or less processor cores to devote to zram block devices. The same goes for RAM. You can adjust the settings and see what works best for you

Following that, edit /etc/fstab and comment out your swap partition or swap file to disable it.

As root, edit /etc/rc.d/rc.local so that it looks like this:

root@rockpro:~# vim /etc/rc.d/rc.local
#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.
echo "Loading zram..."
swapon -p 50 /dev/zram[0-3]
zramctl -n

As root, create /etc/rc.d/rc.local_shutdown, then enter:

root@rockpro:~# cat /etc/rc.d/rc.local_shutdown
#!/bin/sh
echo "Turning off zram..."
zramctl -n
swapoff /dev/zram[0-3]

Take care to make zram[0-3] to match what you entered into /etc/udev/rules.d/10-zram.rules previously!

Save all your work. Mark the files as executable and restart your system:

root@fourb:~# chmod +x /etc/rc.d/rc.{local,local_shutdown}
root@fourb:~# reboot
Broadcast message from root@fourb.local.lan (pts/0) (Mon Mar 15 12:12:53 2021):
The system is going down for reboot NOW!

Final Step: Check Your Work

Take a look at your swap and block devices after you log in again as root:

root@fourb:~# cat /proc/swaps
Filename                                Type            Size            Used            Priority
/dev/zram0                              partition       524284          0               50
/dev/zram1                              partition       524284          0               50
/dev/zram2                              partition       524284          0               50
/dev/zram3                              partition       524284          0               50

You will notice the swap block devices are added and active.

root@fourb:~# lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda           8:0    1 14.3G  0 disk
└─sda1        8:1    1 14.3G  0 part
mmcblk0     179:0    0 14.5G  0 disk
├─mmcblk0p1 179:1    0    1G  0 part /boot
└─mmcblk0p2 179:2    0 13.5G  0 part /
zram0       253:0    0  512M  0 disk [SWAP]
zram1       253:1    0  512M  0 disk [SWAP]
zram2       253:2    0  512M  0 disk [SWAP]
zram3       253:3    0  512M  0 disk [SWAP]

How much swap do you have now? There is no need to edit /etc/fstab to add anything:

root@fourb:~# free -m
total        used        free      shared  buff/cache   available
Mem:            3827          41        3556           0         229        3743
Swap:           2047           0        2047

Compare to see what zramctl lists:

root@fourb:~# zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram3 lzo-rle       512M   4K   73B    4K       4 [SWAP]
/dev/zram2 lzo-rle       512M   4K   73B    4K       4 [SWAP]
/dev/zram1 lzo-rle       512M   4K   73B    4K       4 [SWAP]
/dev/zram0 lzo-rle       512M   4K   73B    4K       4 [SWAP]

Wrapping Up

So, you have a 2GB swap partition that is stored in memory. It is compressed using the lzo-rle compression algorithm, and takes up VERY little space in memory. As you use your system, the zram module will decompress each 512MB swap dynamically, and use, load, unload, and delete data from swap. The priority is set very high for these swap partitions. You can once more enable your “on disk” swap if you wish, just as a back up, by editing /etc/fstab. Use the swapon -a command. That is all for now. Any questions can be directed towards me and I will address any concerns on the LinuxQuestions.org Slackware ARM forums.

Further Reading on Specific Hardware

You may wish to adjust your swappiness, the cache pressure, the rate background processes write to disk, and lower the rate synchronous I/O occurs. All four of those settings will tell your system to use swap agresively , and initiate better use of zswap (zram in swap space). Below are those settings applied to my RockPro64 with 4GB of RAM. Interested persons can find a better description, specifically discussing the Pinebook Pro and zram here[3548].

An additional article about zram and zswap on the Raspberry Pi 4 has been published by Mr. Hayden James, here[3549].

As root, add to and comment out other swap related syscalls /etc/sysctl.d/swap.conf:

vm.vfs_cache_pressure=500
vm.swappiness=100
vm.dirty_background_ratio=1
vm.dirty_ratio=50

References

Kernel 5.10.x zram documentation[3550]

Zram in Slackware article on Lotar's Wiki[3551]

Slackware zarm initilization script[3552]

Originally written by User mralk3[3553]

howtos, arm, arm64, zram, kernel, memory, swap, user mralk3

Slackware ARM current

This is the development tree of Slackware. It is not a release, nor a rolling release - although every effort is made to maintain stability with each update.

Officially Supported Hardware

Type of Supported | Hardware model | ARM CPU type | Documentation
Official | Trimslice Pro | armv7/Tegra20 | NVIDIA Tegra20[3554]
Official | ARM Versatile Express (emulated via QEMU) | armv7 | ARM Versatile Express[3555]
Official | Banana Pi (Original & Pro), Orange Pi v1.2 | armv7/Cortex-A7 | AllWinner A20[3556]
Official | Orange Pi Plus/Plus 2E/PC | armv7/Cortex-A7 | AllWinner H3[3557]

Community Supported Hardware

The Slackware ARM community supports additional hardware that suits their interests.

Type of Supported | Hardware model | ARM CPU type | Documentation/Project home page
Community | Raspberry Pi 2, 3 & 4 | armv7 | SARPi Project[3558]

Wireless Access Point With a Raspberry Pi 3

Introduction

This HOWTO shows you how to replace the WiFi element of your home network setup with a Raspberry Pi running Slackware. Other HOWTOs explain how to setup DHCP and so on for your wireless devices, but this tries to keep things really simple and just give you an ethernet→Wifi bridge. This is very close to the config I ended up with when I configured a TP-LINK ADSL router to do the same thing, only this way I get to patch stuff a lot more easily.

Although I've originally written this HOWTO for a RPi 3, I've since tried it on an RPi2 and it works just as well. Interface wlan1 will obviously change to wlan0 because the Pi2 has no on-board WiFi however.

Hardware Requirements

A Raspberry Pi 3 running Slackware 14.2

A powered USB hub with 2A Power supply (to ensure the Wifi adapter gets enough juice)

Alfa Network AWUS036NHA - USB WiFi Adapter with chipset ar9271l

Ethernet cable

The powered Hub was purchased from the_pi_hut (http://www.ebaystores.co.uk/thepihut[3559]), although pretty much any decent powered hub should be OK. The pi_hut one claimed to have the feature that it didn't push power up the USB connection to the Pi, which sounded like it may be useful.

Whatever you get, Make sure it has a beefy power supply, e.g. 2A. USB WiFi dongles, particularly the ones with external antennas can be thirsty and a 2A power adapter is unlikely to cost much more than a 1A one.

The Wifi Adapter choice is important. I did some research and went for the model that I believed would give maximum flexibility and compatibility with Linux. The Alpha Network one seemed to do that. It works with Kali (assuring Linux compatibility), but that is by no means the only thing you should look for. You also want to see the output of:

# iw list

Which for this model gives:

Supported interface modes:
* IBSS
* managed
* AP
* AP/VLAN
* monitor
* mesh point
* P2P-client
* P2P-GO
* outside context of a BSS

Obviously the 'AP' bit is the bit we need, but IMHO the more things appearing in this list, the more likely your adapter is to be well tested and widely used.

My adapter was purchased from Amazon: https://www.amazon.co.uk/dp/B004Y6MIXS[3560], however I am not connected with this seller. The adapter looks like this:

Adapter detection

I advise to not connect and disconnect the hub from the Pi while it's running. Instead, power it up with hub connected (and powered) and then connect and disconnect the Wifi adapter as needed.

Ensure that iwconfig shows two adapters wlan0 and wlan1. wlan0 is the built-in one on the Pi. If dmesg isn't showing the Alpha one has been plugged in, then just un-plug it and plug it in again. Bring the Adapter up with:

# ifconfig wlan1 up

This should result in the blue LED coming on.

# ifconfig wlan1 down

This should result in the blue LED going off again. If this happens, it seems your adapter is being recognised.

While you're here, have a quick scan to see which channels might be in use:

# iwlist wlan1 scanning | grep Channel

This will indicate the channels that you don't want to use. You can configure automatic channel selection but this guide will not cover that.

Bridge Configuration

We will configure the AP to get it's own IP address on the ethernet side. Edit /etc/rc.d/rc.inet1.conf. Comment out the section with your eth0 network config, it probably looks a bit like this (it may use a static IP address instead):

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="myrpi"

(comment out the four lines).

Now replace that lot by commenting in the section starting:

# Example of how to configure a bridge:

Ensure the following appears so a bridge will be created (adjust DHCP_HOSTNAME to suit):

IFNAME[0]="br0"
BRNICS[0]="eth0"
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]="wap"

This sets up a bridge, with eth0 attached to it, and tells Slackware to give the new br0 interface an IP address via DHCP. Reboot after you've done that and check that your ethernet networking is still in working order.

Hostapd Install

The only AP software for Linux that I'm aware of is hostapd. Get it from Slackbuilds and build it directly on your Pi (you did install the 'D' disk set didn't you?)

# wget https://slackbuilds.org/slackbuilds/14.2/network/hostapd.tar.gz
# tar xvf hostapd.tar.gz
# cd hostapd
# wget https://w1.fi/releases/hostapd-2.6.tar.gz
# ./hostapd.SlackBuild
# installpkg /tmp/hostapd-2.6-arm-2_SBo.tgz

Next you need to edit /etc/hostapd/hostapd.conf to set stuff up. Backup the contents of hostapd.conf to another file as it contains useful comments, but replace the contents completely so it contains only this:

interface=wlan1
bridge=br0
logger_syslog=-1
logger_syslog_level=2
ctrl_interface=/var/run/hostapd
ssid=biffsnetwork
wpa=2
wpa_passphrase=somethingreallysecret!
hw_mode=g
channel=7
auth_algs=1

What this does: The interface wlan1, we've seen before. The bridge br0 will get wlan1 interface added to it when hostapd has fired up. The syslog logging lines ensure you get something in /var/log/messages to tell you what's going on. The ssid, wpa and wpa_passphrase settings should be rather obvious, the hw_mode you can just leave as 'g' unless you know what you're doing, channel is set to something you didn't see when you ran iwlist wlan1 scanning earlier on.

That minimal config should get hostapd working fine, at least it did for me.

Finally, you just need to start hostapd, either by adding /etc/rc.d/rc.hostapd to /etc/rc.d/rc.local or adding an extra entry to /etc/rc.d/rc.inet2 (my preference)

if [ -x /etc/rc.d/rc.hostapd ]; then
/etc/rc.d/rc.hostapd start
fi

Don't forget to:

# chmod 755 /etc/rc.d/rc.hostapd

QR Codes

No home WiFi network setup is complete without a QR code that you can wave at all your mates when they are round your house wanting to connect. You can create one of these from your WiFi settings using the qrencode program, available from Slackbuilds[3561], or alternatively, get the build from Alien Bob[3562] for a slightly later version.

Type the following to create a PNG file with the code, which you can print, copy to your mobile, put on a local webpage or whatever.

# qrencode -t PNG -o wifi-setup.png "WIFI:S:MYSSID;T:WPA2;P:MYPASSWD;H:true;"

The above assumes WPA2, MYSSID should be replaced with your SSID, MYPASSWD replaced with your password. For my Android phone I installed a piece of software from the Play store called Barcode Scanner[3563] by the ZXing Team[3564]. It works very well for reading these codes.

At a pinch, the following bash script should pull your SSID and passphrase out of the hostapd.conf file, and automatically use them to create a new QR code, so you can quickly keep it up to date after any changes.

#!/bin/sh
SSID=$(cat /etc/hostapd/hostapd.conf | grep ^ssid= | cut -d= -f2)
PASS=$(cat /etc/hostapd/hostapd.conf | grep ^wpa_passphrase= | cut -d= -f2)
qrencode -t PNG -o hostapd.png "WIFI:S:$SSID;T:WPA2;P:$PASS;H:true;"

Conclusion

That's it! You should now be able connect to this AP, and (assuming you are running a DHCP server on your ethernet) it will serve your wireless devices, and everything will be able to talk to everything else. Your desktop will be able to ping your mobile and so on.

Sources

Originally written by User bifferos[3565]

howtos, ethernet, wifi, wap, raspberry, arm, author bifferos

Interfacing I2C Devices To Your System

Inter-Integrated Circuit (I²C or more often written as I2C) is a multimaster serial single-ended computer bus invented by the Philips semiconductor division (see the wikipedia article for more information on I2C[3566]) and commonly used in many modern electronic devices including PC.

I²C uses only two bidirectional open-drain lines, Serial Data Line (SDA) and Serial Clock Line (SCL), pulled to logic level 1 by pullup resistors. Typical voltages used are +5 V or +3.3 V although systems with other voltages are permitted and are often encountered. This has an interesting implication: logic level 1 is achieved by doing nothing whilst logic level 0 needs to be pulled down to ground. Although there are bidirectional I2C voltage level shifters (like the PCA9306) it may be feasible to experiment simpler solutions if on the I2C bus you're not going to have many devices connected. See more on this in the “Voltage Level Shifting” chapter.

Preface

Most modern PC have several internal components that communicate vital information, like internal temperatures of critical components, over I2C bus. This type of stuff is factory wired into your PC and can be dealt with lm_senosts … what we want to do here is use an I2C bus on your computer to connect some external I2C sensor like an accelerometer. I'm tagging this in the ARM hardware section because I think that, excluding the lm-sensors stuff, most people will be doing this sort of thing on embedded ARM systems … but the concepts are applicable to any linux capable system with an I2C bus.

Preparing Your Host System

Before you start you might want to make sure that the OS has all that's required to manage the I2C bus you will be using. The first thing to do is make sure you have the correct kernel driver for whatever physical layer implementation is on your system. You will have to research on the datasheets of your system's hardware … my Pi has bcm2708 so in my case it was a matter of loading the bcm2708_i2c module. It might also be necessary to load i2c-dev module too depending on your setup.

Once you have the drivers right you might like to have a user-space tool to help you detect buses, present devices and communicate with the I2C devices each bus. I use i2ctools for this but it's not packaged amongst the Slackware packages and I was unable to find ant third party providing an ARM Slackware package so I downloaded the sources and compiled it for myself. Sources can be gotten from here: I2CTools[3567].

Connecting A Device on the I2C Bus

Provided you've sorted out the voltage level issues (see the “Voltage Level Shifting” chapter) adding a new device in the bus is really simple. The bus is multimaster meaning that you can have many devices (upto 101) on the same bus so all you have to do is make 4 connections: Power, Ground, SDA and SCL. If it's the first device you're connecting on the bus it may be necessary to install the pullups between Power-SDA and Power-SCL. It's as simple as that and if the system is ready with the appropriate drivers and user-land utilities you are ready to access the newly connected device.

Detecting Connected Devices

There are probably many ways to determine what's connected to an I2C bus, I chose to use stuff out of the i2ctools[3568] project. I was unable to find a Slackware ARM package for i2ctools so I compiled and installed it on my system.

First thing you want to know is what I2C busses are present on your system as there may be more then one and looking in the wrong bus may be frustrating:

root@pi:~# i2cdetect  -l
i2c-0   i2c             bcm2708_i2c.0                           I2C adapter
i2c-1   i2c             bcm2708_i2c.1                           I2C adapter
root@pi:~#

If you're not sure which bus you connected your stuff on you might want to do this on on all the busses:

root@pi:~# i2cdetect -y 1
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- 1e --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- --
70: -- -- -- -- -- -- -- 77
root@pi:~#

Communicating With An I2C Device

Communication with I2C devices id done by reading and writing to it's registers. Each device has it's own register list and is something you need to look for in the device's datasheet. Some devices even need some preliminary calibration to be done before you can read any sensible data out of them so before you start using i2cget to read out some registers you should at least have an idea of what registers you are interested in and fave figured out if your device needs calibration prior to reading any sensible data. Registers can be set by using i2cset but do this only if you have read the datasheet.

Even once you know if your device needs calibration and the registers involved, the content of the registers may not be in a convenient format for ready use. There are generally various scripts in perl or python that address calibrating and managing data from specific I2C devices so that human readable information can be produced.

At this point it's impossible to show any further info about I1C communication without going into some detail about a specific device so I'll pick one ot the devices on my IMU pcb. While detecting previously on my PI I found 4 devices with the flowing hex addresses: 1e,40,69 and 77. Generally each I2C device has a range of addresses than can set. We shall concentrate on the device with 0x69 address. By doing some cross reference search on the IMU pcb datasheet and on the single datasheets of each device present on my IMU it's revealed that 0x69 should be the address of the ITG3200 (gyro + temp sensor) and indeed the ITG3200 datasheet asserts that it can have either 0x68 or 0x69 address selectable by logic level on pin 9. No what we need is the ITG3200 register chart:

Addr  Addr     Register Name R/W
Hex  Decimal
0     0      WHO_AM_I      R/W
15    21     SMPLRT_DIV     R/W
16    22       DLPF_FS      R/W
17    23       INT_CFG      R/W
1A    26     INT_STATUS     R
1B    27     TEMP_OUT_H     R                            TEMP_OUT_H
1C    28     TEMP_OUT_L     R                             TEMP_OUT_L
1D    29    GYRO_XOUT_H     R                           GYRO_XOUT_H
1E    30    GYRO_XOUT_L     R                           GYRO_XOUT_L
1F    31    GYRO_YOUT_H     R                           GYRO_YOUT_H
20    32    GYRO_YOUT_L     R                           GYRO_YOUT_L
21    33    GYRO_ZOUT_H     R                           GYRO_ZOUT_H
22    34    GYRO_ZOUT_L     R                            GYRO_ZOUT_L
3E    62      PWR_MGM       R/W

I chose the ITG3200 because it has a temperature sensor inside and I'm hoping I can read that without having to do any calibration, just for the sake of keeping the example as simple as possible. According to the chart the temperature register addresses are 1b and 1c so let's go and try and get some data out of there:

root@pi:~# i2cdump  -y -r 0x1b-0x1c 1 0x69 b
0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef
10:                                  c0 90                        ??
root@pi:~#

The above example dumps registers 1b and 1c from the ITG3200 the same result can be achieved with i2cget:

root@pi:~# i2cget -y  1 0x69  0x1b b
0xc0
root@pi:~# i2cget -y  1 0x69  0x1c b
0x90
root@pi:~#

So we got c090 as our temperature reading. According to the datasheet this value is a 2's compliment of the temperature. So let's try and figure out what that would be: c090 written in binary is 1100000010010000, the most significant bit is 1 so the result should be

16528 - 32768 = -16240

I was unable to find in the datasheet what units this reading is in but they did mention that there was an average offset of 13200. I did a little google search and found this formula:

35 + ((raw value + 13200) / 280))
35 + ((13200 - 16240)/280) = 24.14

Considering that my current ambient temperature is about 20 Celcius I guess that for uncalibrated data that's OK.

If you want a script that does the maths for you and just reads out the ITG3200 sensor data in a human readable format here's an example:

#!/bin/bash
BUS=1
ID=0x69
ATH=0x1b
ATL=0x1c
ARXH=0x1d
ARXL=0x1e
ARYH=0x1f
ARYL=0x20
ARZH=0x21
ARZL=0x22
#need upper case hex stripped of prefix "0x" or bc will not like the input
for VAR in TH TL RXH RXL RYH RYL RZH RZL
do
CMD="$VAR=\$(i2cget -y $BUS $ID \$A$VAR  b |sed -e "s/^0x//" |tr "a-z" "A-Z")"
eval $CMD
eval "echo $VAR = \$$VAR"
done
echo "Temp register: $(echo "ibase=16; $TH$TL" | bc -l) 0x$TH$TL ($(echo "ibase=16; obase=2; $TH$TL" | bc -l))"
echo -n "Temp in Celcius: "
#this takes hex input and evaluates the followin formula in hexadecimal
#temp= 35 + ((raw + 13200) / 280))"
#where raw is the input reading un 2's compliment
#(to uncompliment the input I take away 0x10000 if input is larger then 0x8000)
echo "ibase=16; input=$TH$TL; if ( input >= 8000 ) { raw=input - 10000;} else { raw=input;}; 23 + ((raw + 3390)/118);" |bc -l
echo "X Axis Rotation Register: $(echo "ibase=16; $RXH$RXL" | bc -l) 0x$RXH$RXL ($(echo "ibase=16; obase=2; $RXH$RXL" | bc -l))"
echo -n "X Axis Angula velocity degree/sec: "
echo "ibase=16; input=$RXH$RXL; if ( input >= 8000 ) { raw= input - 10000;} else { raw=input;}; raw / E.177" |bc -l
echo "Y Axis Rotation Register: $(echo "ibase=16; $RYH$RYL" | bc -l) 0x$RYH$RYL ($(echo "ibase=16; obase=2; $RYH$RYL" | bc -l))"
echo -n "Y Axis Angula velocity degree/sec: "
echo "ibase=16; input=$RYH$RYL; if ( input >= 8000 ) { raw= input - 10000;} else { raw=input;}; raw / E.177" |bc -l
echo "Z Axis Rotation Register: $(echo "ibase=16; $RZH$RZL" | bc -l) 0x$RZH$RZL ($(echo "ibase=16; obase=2; $RZH$RZL" | bc -l))"
echo -n "Z Axis Angula velocity degree/sec: "
echo "ibase=16; input=$RZH$RZL; if ( input >= 8000 ) { raw= input - 10000;} else { raw=input;}; raw / E.177" |bc -l

The above script just does one simple dump of the register data and converts the values into human readable format, it does nothing with regards to calibration and averaging out vibrations. More consistent gyroscopic readings would be achieved if an average over 10 consecutive data samples was made thus averaging out most of the ambient vibrations.

A bash script is really not the most suitable way to read data from I2C devices, a faster means of managing the data from the devices is really mandatory in order to do calibration, data averaging and what more to make the information consistent and useful for further calculations. I found the Linux kernel i2c documentation a usefull reference (<kernel source tree>/Documentation/i2c/dev-interface); it's not the only way that data can be read but it's a good starting point.

I hate showing my poor C programming capabilities but here's some code that uses i2c-dev to read stuff from the ITG3200 and takes an average over 10 readings:

#include <sys/ioctl.h>
#include <errno.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <linux/i2c-dev.h>
#include <fcntl.h>
#include <errno.h>
#define I2C_DEVICE "/dev/i2c-1"
/*ITG3200*/
#define ITG3200_ADDR 0x69
#define ITG3200_SELF 0x0
#define ITG3200_INT 0x1a
#define ITG3200_TH 0x1b /*2 bytes Hight byte and Low byte*/
#define ITG3200_TL 0x1c
#define ITG3200_XRH 0x1d /*2 byte Hight byte and Low byte*/
#define ITG3200_XRL 0x1e
#define ITG3200_YRH 0x1f /*2 byte Hight byte and Low byte*/
#define ITG3200_YRL 0x20
#define ITG3200_ZRH 0x21 /*2 byte Hight byte and Low byte*/
#define ITG3200_ZRL 0x22 /*2 byte Hight byte and Low byte*/
#define ITG3200_TEMP_RAW_OFFSET 13200
#define ITG3200_TEMP_RAW_SENSITIVITY 280
#define ITG3200_TEMP_OFFSET 35
#define ITG3200_ROT_RAW_SENSITIVITY 14.375
int twosc2int(int twoscomplimentdata)
{ int retval;
if( twoscomplimentdata > 32768 ) retval = twoscomplimentdata - 65536;
else retval = twoscomplimentdata;
return retval;
}
float ITG3200_rot_conv(int rawdata)
{ float retval;
int raw;
raw=twosc2int(rawdata);
retval = (float)raw / (float)ITG3200_ROT_RAW_SENSITIVITY;
return retval;
}
float ITG3200_temp_conv(int rawdata)
{ float retval;
int raw;
raw=twosc2int(rawdata);
retval = (float)ITG3200_TEMP_OFFSET + (((float)raw + ITG3200_TEMP_RAW_OFFSET) / ITG3200_TEMP_RAW_SENSITIVITY);
return retval;
}
void ITG3200_read (int file, int *raw, int *reg_array,int size)
{ __s32 res;
int i,j,k;
for(i=0;i<size;i++)
{ k=0;
for (j=0;j<2;j++)
{
if( (res = i2c_smbus_read_byte_data(file,*(reg_array + i + j)) )< 0 )
{ printf("Failed to read from the i2c bus.\n");
exit(1);
}
if (j == 0) k=(int)res << 8;
else
{ k += (int)res;
*(raw + (i/2))=k;
}
}
i++;
}
}
main ()
{ int file;
int i,j,k;
float data[4]={0};
int ITG3200_REGS[8]={ITG3200_TH,ITG3200_TL,ITG3200_XRH,ITG3200_XRL,
ITG3200_YRH, ITG3200_YRL,ITG3200_ZRH,ITG3200_ZRL};
int ITG3200_RAW_DATA[4];
float ITG3200_DATA[4];
if ((file = open(I2C_DEVICE, O_RDWR)) < 0)
{ perror("Failed to open the i2c bus");
exit(1);
}
if (ioctl(file, I2C_SLAVE, ITG3200_ADDR) < 0)
{ printf("Failed to acquire bus access and/or talk to slave.\n");
exit(1);
}
/*Take an avarage over 10 consecuitve readings on the ITG3200*/
for (i=0;i<10;i++)
{ ITG3200_read(file,&ITG3200_RAW_DATA[0],&ITG3200_REGS[0],sizeof(ITG3200_REGS)/sizeof(ITG3200_REGS[0]));
data[0] += ITG3200_temp_conv(ITG3200_RAW_DATA[0]);
data[1] += ITG3200_rot_conv(ITG3200_RAW_DATA[1]);
data[2] += ITG3200_rot_conv(ITG3200_RAW_DATA[2]);
data[3] += ITG3200_rot_conv(ITG3200_RAW_DATA[3]);
}
for(i=0;i<4;i++) data[i] /= 10;
printf("Temp. : %2.2f \n",data[0]);
printf("Rot. X : %2.2f \n",data[1]);
printf("Rot. Y : %2.2f \n",data[2]);
printf("Rot. Z : %2.2f \n",data[3]);
close(file);
}

Voltage Level Shifting

You may end up with heterogeneous voltage level devices and if you have many devices the correct way to work around this problem is by using bidirectional I2C voltage level shifters like the PCA9306[3569], but if you only have a few devices all grouped up in a neat PCB like the 10DOF IMU unit you might want to give a simpler system a try. This is how I connected my 5v IMU pcb to a 3.3v I2C bus on my RaspberryPI: I took as educated guess that 4.4v (5v with a 4148 diode in series) would still be a tolerable power supply voltage for the whole IMU pcb, this would most likely allow all the I2C devices on the IMU pcb to recognize a minimum of 3.08v (4.4 * 0.7) as the lowest reliable logic level 1 tension allowing it to inter-operate with the PI's 3.3v logic levels. I was not able to find if the PI has internal pullups on the I2C bus or if they have to be externally placed so in doubt I put in 10k pullups between the 4.4v power line and the 2 data lines. I was the able to correctly detect the sensors on the IMU pcb.

Sources

Originally written by louigi600[3570]

howtos, hardware, arm, author louigi600

Slackware ARM local mirror repository - SAREPO

It is acknowledged that there are more complete and distinguished Slackware repository solutions readily available. Such as, alienBOB's gen_repos_files.sh[3571] and mirror-slackware-current.sh[3572] scripts, and Dave Spencer's slackrepo[3573]. These are renowned, highly automated, tools for managing Slackware package repositories and mirrors.

Preface

The script featured here, 'local-slackwarearm-repo.sh' [nickname: 'SAREPO'] does not attempt to supplant or undermine the above (or other) contemporary efforts, by re-inventing the wheel, so to speak. It's just a much less sophisticated method of achieving the same results, and very much Slackware ARM specific.

When I was looking into creating a local Slackware ARM mirror, most of the currently available scripts and software to perform this task was just way too advanced and extensive for my needs with regards to Slackware “repodemia”. Something much more basic and bespoke was preferable, and that's the main reason why this script was created.

Question & Answer

Q. What is it and what is its purpose?
A. It's bash script called “local-slackwarearm-repo.sh” which downloads Slackware ARM package files from a remote repository (or mirror site) onto your local system and maintains the hierarchial directory/file structure. Thus creating a local mirror repository for whatever purpose users may have for it.

Q. What's the point of this “local-slackwarearm-repo.sh” script when there are much better alternatives available and why should I use it in preference to my existing method(s)?
A. Firstly, if your existing methods work well for you then abide by the common-sense dictum, "if it's not broken, don't fix it."[3574] Secondly, This script can be set to maintain a local mirror repository for any number of available Slackware ARM ports and versions (and also 'devtools') and was created primarily for its simplicity and for the fun/experience factor. Nobody is saying it's better than any existing method(s). It's there and if you have a purpose for it then feel free to use it.

Q. What does this script do that other alternatives don't?
A. It does nothing more, but is certainly much less capable, than gen_repos_files.sh[3575] and slackrepo[3576], for example. Plus it's designed to be Slackware ARM specific.

Notes

The local-slackwarearm-repo.sh script can be used on any Slackware installed system, BUT it is purposely intended for Slackware ARM installed devices (e.g. Raspberry Pi, Orange Pi, Banana Pi, RockPro64, etc.) - where storage space may be limited and/or only certain Slackware ARM ports-versions are required.

This script uses arrays with defined elements to download [via rsync] from a remote repository to your local system.

In order to maintain synchronicity, with a main Slackware ARM repository or mirror, this script can be called in a crontab so that it may be executed periodically to keep a local mirror repository automagically up-to-date. It can, of course, also be executed manually on the CLI at the user's discretion.

This script will create a '/home/$(whoami)/slackwarearm' directory, by default, in which to store any mirror repository data. It will also create a '/home/<username>/bin' directory to store a .database file which contains a list of all the local repository content, and a .log file which records a very basic account of all update (in)activity.

User/directory names, filenames, and PATHs, can be configured to suit your personal requirements or setups. The defaults are quite generic.

Everyone should be aware that SD cards can fail at the best, and worst, of times and usually without any warning. In an attempt to maintain a high level of reliability I chose to install Slackware ARM on a Raspberry Pi 2 using a Kingston Canvas Go! Plus 64GB UHS-1 (U3)[3577] which I have found to be fast, cheap, and unwaveringly dependable over the past few years. When hosting a local Slackware ARM package repository contemplate your choices regarding SD cards (where applicable) because constantly reading and writing data wears them out quickly. If you have any SSDs laying around and/or doing not much, it might be prudent to consider using one of those for repository storage space instead of a SD card.

Requirements

A computer system running Slackware - bearing in mind that this 'local-slackwarearm-repo.sh' script is designed to deal only with Slackware ARM files.

Enough free storage space on which to keep the mirror repository files - prior calculations are advised if your intended storage space capacity is sparse.

ONLY edit the values specified in the “## local-slackwarearm-repo.sh SETTINGS ##” section of the script code - unless you know what you're doing - or else things might break!

local-slackwarearm-repo.sh script code

I prefer to put scripts like this one into my 'home/<username>/bin' directory. You don't have to do the same but, initially (with default settings) this directory will be created by running this script, if it doesn't already exist, to store 'local-slackwarearm-repo.database' and 'local-slackwarearm-repo.log' files - which are also created at the same time.

Download the 'local-slackwarearm-repo.sh' file by clicking the link at the top of the code below, or copy and paste the code therein if you prefer.

Make the file executable by using 'chmod +x local-slackwarearm-repo.sh' or 'chmod 755 local-slackwarearm-repo.sh' command.

Refer to the commented sections of the script code for usage. These are in the top sections of the script code below.

* Don't edit anything commented as “!!! _DO_NOT_ Change !!!” or below the “## END OF local-slackwarearm-repo.sh SETTINGS ##” comment unless you know the results to expect from making such modifications!

local-slackwarearm-repo.sh

#!/bin/bash

# Create Slackware ARM local repository mirror utility script.
#
# local-slackwarearm-repo.sh - SAREPO [v2.0.3] -  13 Mar 2021
#
# Copyright (c) 2021 Exaga - SARPi Project - sarpi.penthux.net
#
# Version - 08 Mar 2021 [v0.1a] - progenitor
#         - 10 Mar 2021 [v1]    - associative array mechanics
#         - 12 Mar 2021 [v2]    - indexed array mechanics
#
# ######
#
# This script creates a local Slackware ARM mirror repository of any
# version(s) [i.e. ARM, Aarch64, 15.0, current] which are defined in
# the settings. Only change the settings which suit your own personal
# preferences, unless you really know what you're doing!
#
# This script will create a /home/$(whoami)/slackwarearm directory, by
# default, which to store any repository data. It will also create a
# /home/<username>/bin directory to store a database and logfile which
# contains a list of all the local repository files and used to verify
# (diff) with a remote repository to check if there's any updates. This
# script can also be added to crontab to run periodically.
#
# Put this script anywhere you choose and run like this:
#
# ~$ chmod +x local-slackwarearm-repo.sh
# ~$ ./local-slackwarearm-repo.sh
#
# It's also possible to run the apache server software on the system and
# create a symlink to the local Slackware ARM repository so that it can
# be accessed from the browser and/or used as a local mirror for whatever
# use you may find for it. After setting up and starting the httpd daemon
# just create a symlink to the repository directory. For example:
#
# ~# ln -sf /home/$(whoami)/slackwarearm /var/www/htdocs/slackwarearm
#
# Then it should be accessible in your browser and can be used as a URL
# during Slackware ARM 'setup' when selecting source media.
#
# ######

### Slackware brand name !!! Explicitly _DO_NOT_ Change !!!
SLACKNAM=(slackware);

# Slackware ARM Project element !!! Explicitly _DO_NOT_ Change !!!
ARMPROJECT=(arm)

# Slackware ARM [array-based] remote repo dir !!! _DO_NOT_ Change !!!
REMOTE_SAREPO_DIR="::${SLACKNAM[@]}${ARMPROJECT[@]}"

######################################################################
##               local-slackwarearm-repo.sh SETTINGS                ##
######################################################################

# -- Edit the settings in this section to suit your requirements -- ##
#
# PRGNAM vars
PRGNAM="$(basename $BASH_SOURCE .sh)"
PETNAM="SAREPO"

# User directory vars
USERDIR="/home/$(whoami)"
SOURCEDIR="${USERDIR}/slackwarearm"
USERBINDIR="${USERDIR}/bin"
LOG_FILE="${USERBINDIR}/${PRGNAM}.log"

# Choose the Slackware ARM version(s) you wish to mirror and enter
# any between the brackets, seperated by a space. Omit any versions
# which you do not want to download. NOTE: It _MUST_ already exist
# on the remote server before you can download it. Obviously!
#
# Slackware ARMVERS elements [ 14.2 | 15.0 | current | devtools ]
ARMVERS=(14.2 current devtools)

# Same as the above but this is for Slackware AARCH64 versions when
# it is released.
#
# Slackware A64VERS elements [ 15.0 | current ]
A64VERS=(current)

# Specify the URL of ONE remote Slackware repository or mirror site
# WITHOUT any leading "http://" or "ftp://" and WITHOUT a trailing
# forward slash "/".
# e.g. "ftp.arm.slackware.com" or "ftp.halifax.rwth-aachen.de"
# or "mirror.slackbuilds.org" or "slackware.uk"
#
# Remote Slackware ARM repository [ !!! NO ftp:// or trailing "/" !!! ]
SAREPO_URL="slackware.uk"

# Set BANDWIDTH_LIMIT to cap download speed of remote repository data,
# or set a value of "0" [zero] for no limit [Kilobits per second].
#
# BANDWIDTH_LIMIT [Kbps]
BANDWIDTH_LIMIT="0"

######################################################################
##            END OF local-slackwarearm-repo.sh SETTINGS            ##
######################################################################
# Halt build process on error
#set -ue
IFS="$(printf '\n\t')"

# Local .database and .lock files
LOCAL_SAREPO_DB="${USERBINDIR}/${PRGNAM}.database"
TMP_DATA_DB="${USERBINDIR}/.${PRGNAM}.TMP"
LOCK_FILE="${TMP_DATA_DB}.lock"

# Delete LOCK_FILE TMP_DATA_DB on error trap EXIT
trap "{ echo 'EXIT ${PIPESTATUS[@]}'; rm -rf ${LOCK_FILE} ${TMP_DATA_DB}; exit; }" INT TERM EXIT

# LOG_FILE function
function log {
echo "$(date +"%F %T") [$$] $1"
echo "$(date +"%F %T") [$$] $1" >> "${LOG_FILE}"

}

# Recreate SOURCEDIR USERBINDIR
echo "Starting ${PETNAM} update [PID $$] ..."
log "${PETNAM} : initiating local repository audit"
mkdir -p "${SOURCEDIR}" "${USERBINDIR}"
rm -f "${TMP_DATA_DB}"
touch "${LOCAL_SAREPO_DB}"

# Create LOCKFILE - exit if it already exists
if [ -f "${LOCK_FILE}" ]; then
for PID in $(pidof -x "${PRGNAM}.sh"); do
if [ "${PID}" != "$$" ]; then
echo "[!] ERROR : ${PRGNAM} : Process is already running with PID ${PID} ..."
log "[!] ERROR : ${PRGNAM} : Process is already running with PID ${PID} ..."
exit 1
fi
done
else
rm -f "${LOCK_FILE}"
touch "${LOCK_FILE}"
fi

# Slackware ARM PORT-VERSION array element mechanics function
array_element_mechanics () {
log "${PETNAM} : validating local repository data ..."
# Slackware ARM elements
if [[ "${#ARMVERS[@]}" ]]; then
REMOTE_SAREPO_ARM_PATH="${SAREPO_URL}${REMOTE_SAREPO_DIR}"/"${SLACKNAM[0]}${ARMPROJECT[0]}"
for elementarm in "${!ARMVERS[@]}"; do
log "> [${SAREPO_URL}] ${SLACKNAM[0]}${ARMPROJECT[0]}-${ARMVERS[$elementarm]}"
rsync -av --no-motd --contimeout=30 --timeout=60 --delete --itemize-changes --human-readable \
--log-file="${LOG_FILE}" --log-file-format="%o %n %'''b" --bwlimit="${BANDWIDTH_LIMIT}" \
"${REMOTE_SAREPO_ARM_PATH}-${ARMVERS[$elementarm]}" "${SOURCEDIR}" || \
exit "${PIPESTATUS[@]}"
done
fi
# Slackware AARCH64 elements
if [[ "${A64VERS[@]}" ]]; then
REMOTE_SAREPO_A64_PATH="${SAREPO_URL}${REMOTE_SAREPO_DIR}"/"${SLACKNAM[0]}${ARMPROJECT[0]+aarch64}"
for elementa64 in "${!A64VERS[@]}"; do
log "> [${SAREPO_URL}] ${SLACKNAM[0]}${ARMPROJECT[0]+aarch64}-${A64VERS[$elementa64]}"
rsync -av --no-motd --contimeout=30 --timeout=60 --delete --itemize-changes --human-readable \
--log-file="${LOG_FILE}" --log-file-format="%o %n %'''b" --bwlimit="${BANDWIDTH_LIMIT}" \
"${REMOTE_SAREPO_A64_PATH}-${A64VERS[$elementa64]}" "${SOURCEDIR}" || \
exit "${PIPESTATUS[@]}"
done
fi
# Process database file
build_database

}

# Process LOCAL_SAREPO_DB file
build_database() {
cd "${SOURCEDIR}"
echo "${PETNAM} : verifying ${PRGNAM}.database ..."
find . -type f ! -name "index.html" -print0 | xargs -0 ls -la --time-style=full >> "${TMP_DATA_DB}"
cmp -s "${TMP_DATA_DB}" "${LOCAL_SAREPO_DB}" && CMPSTATUS=0 || CMPSTATUS=1
if [[ $CMPSTATUS -eq 0 ]]; then
log "${PETNAM} : Local repository database is up-to-date ..."
else
rm -f "${LOCAL_SAREPO_DB}" && mv "${TMP_DATA_DB}" "${LOCAL_SAREPO_DB}" && log "${PETNAM} : [!] Local repository database updated!"
fi
log "${PETNAM} : local repository audit complete"
log "+-----------------------------------------------+" && echo >> ${LOG_FILE}
echo "${PETNAM} update complete"
# Done
exit

}

# run rsync
array_element_mechanics

#EOF<*>

Running the script manually

To run the script at any time via the CLI just do the same as you would with any other executable bash script…

myuser@slackware:~/bin$ ./local-slackwarearm-repo.sh

Or, if you want to know how long the process takes, run the command with the 'time' prefix like this…

myuser@slackware:~/bin$ time ./local-slackwarearm-repo.sh
Verifying local repository files ...
2021-03-08 19:32:32 : local-slackwarearm-repo.sh : Local repository up-to-date ...
real    8m13.797s
user    4m35.653s
sys     3m36.734s
myuser@slackware:~$

You can press the 'CTRL+z' keys, once the “Verifying local repository files …” message appears, to put the process into the background (and use the 'bg' command) while you carry on with on other things. To bring it to the foreground again use the 'fg' command. Or you can start a new 'screen -S <name>' session and execute it in there (etc.) so you're not waiting around, twiddling your thumbs, while this script process finishes.

Automating with cron

Adding a crontab is almost as easy, but you'll need to know the PATH to the 'local-slackwarearm-repo.sh' script and how to set it to execute at your preferred time interval(s). This is made easy by visiting the crontab guru[3578] website and looking at a few examples, and/or learning about the spatial layout and structure (syntax) of crontab[3579] if you need to.

Type the 'crontab -e' command on the CLI…

myuser@slackware:~/bin$ crontab -e

Now, say you want cron to execute this script every day at 8:00AM[3580] - if you didn't previously change any of the default script settings, you would enter this into the crontab file:

0 8 * * * /home/<username>/bin/local-slackwarearm-repo.sh

The crontab works in 24HR format so if you wanted to change 8AM to 8PM [i.e. 20:00 in 24HR format] you would enter this into the crontab file:

0 20 * * * /home/<username>/bin/local-slackwarearm-repo.sh

If you wanted to have crontab execute the script every 8 hours[3581] on the hour you would enter this into the crontab file:

0 */8 * * * /home/<username>/bin/local-slackwarearm-repo.sh

You will find that crontab covers every eventuality for whenever you want the system to automagically execute a command or run a shell script. It can be configured with any interval(s), for differing requirements, and is good for more than just running your 'local-slackwarearm-repo.sh' script periodically.

Local mirror repository log file

The first time the script runs it will create a plain-text 'local-slackwarearm-repo.log' file and record every instance from then on. Each time the script runs this log file will be updated with the result(s). Here's an example of a typical log file entry from a successful update…

2021-03-13 15:59:55 [1645] SAREPO : initiating local repository audit
2021-03-13 15:46:45 [17698] > [slackware.uk] slackwarearm-14.2
2021/03/13 15:46:48 [17713] receiving file list
2021/03/13 15:46:49 [17715] sent 2.18K bytes  received 311.62K bytes  69.73K bytes/sec
2021/03/13 15:46:49 [17715] total size is 3.54G  speedup is 11,286.64
2021-03-13 15:46:49 [17698] > [slackware.uk] slackwarearm-current
2021/03/13 15:46:51 [17718] receiving file list
2021/03/13 15:46:52 [17719] sent 2.25K bytes  received 380.06K bytes  109.23K bytes/sec
2021/03/13 15:46:52 [17719] total size is 3.44G  speedup is 8,988.90
2021-03-13 15:46:52 [17698] > [slackware.uk] slackwarearm-devtools
2021/03/13 15:46:55 [17722] receiving file list
2021/03/13 15:46:55 [17722] slackwarearm-devtools/
2021/03/13 15:46:55 [17722] slackwarearm-devtools/buildcluster/
2021/03/13 15:46:55 [17722] slackwarearm-devtools/buildcluster/distcc/
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/ 0
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/ 0
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/distcc-3.1-i486-1.txz 261.91K
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/distcc-3.1-x86_64-1.txz 269.98K
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/fstab 112
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/rc.local 972
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/sp 119
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/distcc/ 0
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/distcc/distcc-3.1.tar.bz2 575.12K
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/distcc/distcc.SlackBuild 2.91K
2021/03/13 15:46:55 [17724] recv slackwarearm-devtools/buildcluster/distcc/slack-desc 980
2021/03/13 15:46:55 [17724] sent 226 bytes  received 1.14M bytes  326.82K bytes/sec
2021/03/13 15:46:55 [17724] total size is 1.54G  speedup is 1,344.88
2021-03-13 15:46:55 [17698] > [slackware.uk] slackwareaarch64-current
2021/03/13 15:46:58 [17727] receiving file list
2021/03/13 15:46:58 [17728] sent 72 bytes  received 10.77K bytes  3.10K bytes/sec
2021/03/13 15:46:58 [17728] total size is 887.48K  speedup is 81.86
2021-03-13 15:55:20 [17698] SAREPO : [!] Local repository database updated!
2021-03-13 15:55:20 [17698] SAREPO : local repository audit complete
2021-03-13 15:55:20 [17698] +-----------------------------------------------+

When no new files are found within the local repsitory there's still a log entry to cover that eventuality…

2021-03-13 16:12:57 [1645] Local repository database is up-to-date ...

Using logrotate to manage log files

With every Slackware [ARM] installation there's tool included called 'logrotate' which is designed to ease the management of many log files generated by the system. For example, if there's any Slackware system that runs a httpd daemon then 'logrotate' will make administration of the log files much easier. So, 'logrotate' can perform an automatic change-over in system log files depending on their filenames, sizes, timestamps, locations (etc.), and many other functions (hint: type 'man logrotate' from the CLI to find out more). What's more, 'logrotate' can also be configured to manage the 'local-slackwarearm-repo.sh' log file within a normal '/home/<username>/bin' directory or elsewhere. Say if there's a lot of writing to the 'local-slackwarearm-repo.log' and filesize is becoming somewhat too large to read easily, or you're managing the log(s) manually and want to automate the process (etc.), then 'logrotate' will save you a whole lot of time and effort. To make this work successfully you'll need 'root' access.

Incidentally, for those who don't have any understanding of the terminology involved, “rotate” in this case is just another way of saying, “copy a currently generated log file to another filename and/or location (while compressing it [optional]) and create a new log file in its place”.

So, by default settings, the 'local-slackwarearm-repo.log' file is located in '/home/<username>/bin/local-slackwarearm-repo.log' and that's what 'logrotate' will be configured to process here. First you need to make a few decisions about where to store the rotated log files, how often to rotate the log(s) and such. The easiest thing to do is to create a new '/home<username/logs' directory for this purpose. We'll do this as a normal user like this…

user@slackware:~$ mkdir -p ~/logs

Now we'll 'su - root' user in order to create a new configuration for 'logrotate' to process the 'local-slackwarearm-repo.log' file. This configuration file will be placed in the '/etc/logrotate.d/' directory, where all other 'logrotate' configurations are located. The name of our configuration file is 'sarepo'…

user@slackware:~$ su - root
root@slackware:~# nano -w /etc/logrotate.d/sarepo

While tailored to meet our own specific requirements, here's what the contents of the '/etc/logrotate.d/sarepo' file looks like…

# logrotate /home/<username>/bin/local-slackwarearm-repo.log config
/home/<username>/bin/local-slackwarearm-repo.log {
su <username> users
olddir /home/<username>/logs
missingok
notifempty
dateext
dateformat _%Y%m%d-%H%M%S
minsize 100k
rotate 12
weekly
compress
compresscmd /bin/xz
compressoptions -9
compressext .xz
create 644 <username> users
}

The function of these configuration settings, along with many more which can be specified, are covered in the 'man logrotate[3582]' page, which should be consulted in order to get the best from 'logrotate' and whatever suits your personal requirements.

Some things to note include:
'<username>' = the username who owns the 'local-slackwarearm-repo.log' file.
'su <username> users' = rotate log files under '<username>' 'group' permissions instead of 'root'.
'olddir' = the location [PATH] of the directory where any rotated logs will reside.
'dateext' = suffix the date to the resulting rotated filename [ default is: date +'%Y-%m-%d' ].
'dateformat' = here we have specified a custom 'dateext' which also includes the time.
'rotate 12' = only keep the past 12 most recent logs - the rest will be deleted [ weekly x 12 = 84 days ].
'weekly' = rotate the logs on a weekly basis (this can be set either daily or monthly too).
'compress', 'compresscmd' = compress the file, using the 'xz' command.
'compressoptions', 'compressext' = compress the file using max '-9' compression, giving it an '.xz' extension.
'create 644 <username> users' = create a NEW log file in place of the rotated file under '<username>' 'group' permissions.

Things to do or avoid:
DO read the 'man logrotate' page to gain some understanding of the different settings and parameters - https://linux.die.net/man/8/logrotate[3583]
DON'T set an 'olddir' PATH (where applicable) if the '<username>' does not have access or else 'logrotate' will fail-error.

Save and exit the file once you are happy with the configuration settings within.

Now run 'logrotate' as 'root' user on this specific configuration file and do it like this…

root@slackware:~# logrotate -vf /etc/logrotate.d/sarepo

After running this 'logrotate' command you will see some output. Ignoring any errors it throws out - unless they are a show-stopper and the log file was not processed. So now we can check on the status of the 'local-slackwarearm-repo.log' file and also the rotated archive in our recently created '/home/<username>/logs' directory…

root@slackware:~# ls -lah /home/<username>/bin/local-slackwarearm-repo.log
-rw-r--r-- 1 <username> users 0 Mar 14 15:36 /home/<username>/bin/local-slackwarearm-repo.log
root@slackware:~# ls -lah /home/<username>/logs/
drwxr-xr-x 2 <username> users 4.0K Mar 14 14:52 ./
drwx--x--x 8 <username> users 4.0K Mar 14 14:52 ../
-rw-r--r-- 1 <username> users  876 Mar 14 15:36 local-slackwarearm-repo.log_20210314-153618.xz

There it is! The '/home/<username>/bin/local-slackwarearm-repo.log' file is 0 bytes size (which means it has been replaced) and the rotated '/home/<username>/logs/local-slackwarearm-repo.log_20210314-152618.xz' file has a timestamp in the filename and .xz extension. Looks like it worked perfectly, as expected.

Hope this shows how useful 'logrotate' really is.

Automated daily logrotate

What's else will happen as a result of running the 'logrotate' command? Well, in the '/etc/cron.daily' directory there is a file…

root@slackware:~# ls -lah /etc/cron.daily/logrotate
-rwxr-xr-x 1 root root 129 Jan 18 12:56 /etc/cron.daily/logrotate*

The presence of this file means that (once per day) 'logrotate' will be executed by the system and, because we created a '/etc/logrotate.d/sarepo' configuration file, the 'local-slackwarearm-repo.log' will be processed along with all the existing system logs. Due to our configuration settings 'logrotate' will not create new backups daily, but weekly, and only if the 'local-slackwarearm-repo.log' file size is 100Kb or larger. Incidentally, if our log file was becoming large very quickly then we would modify that weekly setting to a daily one. Or ultimately, we could also create a crontab (as 'root' user) that runs the 'logrotate -f /etc/logrotate.d/sarepo' command individually and periodically to suit our requirements.

Local repository .database file

A plain-text 'local-slackwarearm-repo.database' file is initially created when the 'local-slackwarearm-repo.sh' script is first executed, and then maintained as an up-to-date and accurate record of all existent files within the local mirror repository. This database file is verified each time the script is executed, and regenerated when new files appear, or when current files are supplanted by updates. Until any variation occurs within the local mirror repository content an incumbent 'local-slackwarearm-repo.database' file remains unchanged.

Setting up Apache web server - httpd

As stated previously, the Apache web-server software included with Slackware ARM can easily be configured and started in order to view the mirror repository contents in your web browser. For example, if there's an ARM device running Slackware that's connected to the local network and being used to host a Slackware ARM package repository then viewing the files and directories it contains in a browser (as seen on ftp.arm.slackware.com[3584]) is perhaps something that users would be interested in doing. This can be very useful for many reasons, convenient, and just great fun to get working. Plus, with Slackware, it's not difficult at all.

First find out the IP address of the ARM device that the local mirror repository resides on. You need to do this as 'root' user and not a normal user. Use the 'hostname -I' (that's a capital “i”) command like this…

root@slackware:~# hostname -I
192.168.1.17
root@slackware:~#

That will tell you the IP address of the system. Make a note of it. Your own IP will most likely be different to the example shown here.

Next, use your favourite text editor to open the '/etc/httpd/httpd.conf' file. In this example 'nano' is used to perform this task but 'pico', 'vi', 'vim', 'elvis' (etc.) will work just as well.

root@slackware:~# nano -w /etc/httpd/httpd.conf

Scroll down the file until you find 'ServerAdmin you@example.com' and edit the email address to your own preference - this is not a precondition and is entirely optional, but a very good practice none-the-less.

Now just below that in the next section you will see this…

# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

Edit the ServerName as instructed and don't forget to remove the #comment [i.e. get rid of the '#' in front of '#ServerName']. Most users will not have a registered DNS name to use here, so the IP address gained from the 'hostname -I' command should be specified instead. In this example the ServerName will be changed to this…

# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName 192.168.1.17:80

Save and exit the file once that's been done. Configuring the Apache web-server further (e.g. for php, htaccess, etc.) is not within the scope of this exercise but, for those who are interested, there are dozens of tutorials and guides around that can further assist you in doing that.

Now create a symlink from the '/var/www/htdocs' directory to the local mirror repository directory in your normal user '/home/<username>/slackwarearm' directory. If the default PATHs in the 'local-slackwarearm-repo.sh' script haven't been modified, this PATH will be as seen below with “<username>” being the name of your user. In order to make this work, the essential symlink is created like this…

root@slackware:~# ln -sf /home/<username>/slackwarearm /var/www/htdocs/slackwarearm

The penultimate task is to start the httpd daemon. So, make sure the 'rc.httpd' initialization file has been made executable and then run the command to start it…

root@slackware:~# chmod +x /etc/rc.d/rc.httpd
root@slackware:~# /etc/rc.d/rc.httpd start

The last and final small step now is to open the browser on another computer system and enter the URL using the IP address gained from the ARM device. So, in this example it's: http://192.168.1.17/slackwarearm[3585]

To access the same content on the ARM device itself you would use this URL: http://localhost/slackwarearm[3586]

Installing Slackware ARM using local network mirror repository source media

Using a local network repository as source media for installing Slackware ARM couldn't be much easier or more simple.

During the Slackware ARM installation 'setup' process, when the “SELECT SOURCE MEDIA” titled dialog appears, just choose “[5] Install from FTP/HTTP server” from the menu. Then enter the IP address of the system which hosts the local mirror repository (followed by a forward slash “/”) in the “What is the URL of your FTP/HTTP server?” input field/box. As shown in the example screenshot below…

As long as the IP address is correct, the Slackware ARM installer will take the source media files from the local mirror repository. This method is generally much faster than downloading over the Internet (NB: not in all circumstances), and saves using the bandwidth of the main repositories and mirrors.

In the “SELECT SOURCE DIRECTORY” dialog which follows, the PATH is are no different to if/when using a remote server for Slackware ARM source media. That is, unless the default settings in the 'local-slackwarearm-repo.sh' script have been changed, or stored in a different location - then you would use the PATH to the directory which contains the Slackware ARM source media files.

Using slackpkg on a local network repository

It's possible to configure the 'slackpkg' tool to use a mirror repository on any local network to update a Slackware ARM system. This is easily achieved by editing the '/etc/slackpkg/mirrors' file and entering the IP address of the system which hosts the local mirror repository in the URL - i.e. exactly the same way as you would with a remote repository. Obviously, make sure that you replace the IP address of the example below with your own…

#----------------------------------------------------------------
# Slackware ARM current: 32bit armv7, hardware floating point ABI.
#----------------------------------------------------------------
http://192.168.1.17/slackwarearm/slackwarearm-current/
#http://slackware.uk/slackwarearm/slackwarearm-current/
#http://ftp.halifax.rwth-aachen.de/slackwarearm/slackwarearm-current/
#http://ftp.slackware.pl/pub/slackwarearm/slackwarearm-current/

Now whenever 'slackpkg update' is run it will refer to the specified URL and get any new packages from the local network repository…

Downloading http://192.168.1.17/slackwarearm/slackwarearm-current/testing/PACKAGES.TXT...
--2021-03-10 17:29:40--  http://192.168.1.17/slackwarearm/slackwarearm-current/testing/PACKAGES.TXT
Connecting to 192.168.1.17:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 224 [text/plain]
Saving to: '/tmp/slackpkg.RfY09f/testing-PACKAGES.TXT'

As long as the local mirror repository is updated regularly (e.g. by utilising the 'local-slackwarearm-repo.sh' script) this can/will be a permanently viable solution. If, like me, you are forever (re)installing and testing Slackware ARM then this kind of setup is very convenient and saves on bandwidth. It's a win-win situation all round!

Neat huh? Hope this local mirror repository script and related information has been fun and helpful. Have fun with it!

Help

Any requests for help/assitance, questions, suggestions, good or bad or indifferent feedback, can be addressed on the Slackware ARM LQ forum[3587].

Thank YOU very much for your interest in a Slackware ARM local mirror respository and this SlackDoc page.

Sources

# Documentation which assisted in this SlackDoc project:

Trap { $LOCKFILE } EXIT[3588] - https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html[3589]

Thanks to MrJackson for suggesting the idea that gave me the idea which lead to creating this 'local-slackwarearm-repo.sh' script.
Special thanks to Tadgy (https://slackware.uk[3590]) whose help and advice greatly facilitated success with httpd.conf and autoindex.conf settings.
Thanks also to Aal (https://fatdog.eu[3591]) for the logging function idea/code used in this 'local-slackwarearm-repo.sh' script.

* Originally written by Exaga[3592] - 2021-03-08 18:02:17 [GMT]

howtos, slackware, arm, local, mirror, respository, cron, logrotate, httpd, slackpkg, author exaga

Making it easy for u-boot to find uImage and uinitrd

I often fiddle with testing root images, kernels and initrd on my kirkwood based systems by using usb flash sticks. I found that although Jeff did a brilliant job on uboot, at the time I started fiddling with custom boot images on my dosckstar, his default environment was unable to directly boot all my testing images that were rapidly changing in layout. To work around this I started making canges to his environment.

I made myself a custom environment that was more flexible and allowed me to boot from any usb port as long as the following limitations are met:

the kernel must be called uImage or must be linked with that name

the initrd must be called uinitrd or must be linked with that name

uImage and uinitrd must be contained in the first 4 detected usb devices

uImage and uinitrd must be in the root or in a boot sub-directory in the device that holds them

the root filesystem bust be labelled “root” and should possibly be ext3 formatted

Heres the environment dumped from fw_printenv: (taken from my GoFlexNet)

arcNumber=<put here your device's correct arcNumber>
baudrate=115200
boot_flash_kernel=nand read $flash_kernel_load_addr $flash_kernel_offest $flash_kernel_size; bootm $flash_kernel_load_addr
bootargs=console=ttyS0,115200 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data) root=/dev/sda2 ro rootfstype=ext2
bootcmd=run usb_scan; run set_flash_bootargs; run boot_flash_kernel
bootdelay=3
console=console=ttyS0,115200
ethact=egiga0
ethaddr=<put here your mac address>
flash_kernel_load_addr=0x6400000
flash_kernel_offest=0x100000
flash_kernel_size=0x300000
flash_root_fs=root=/dev/mtdblock2
flash_root_fstype=rootfstype=jffs2
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
root_fs=root=LABEL=root
rootfstype=rootfs=ext3
sb_scan_1=usb=0:2 dev=sda2
set_flash_bootargs=setenv bootargs ${console} ${mtdparts} ${flash_root_fs} ro ${flash_root_fstype}
set_usb_bootargs=setenv bootargs ${console} ${mtdparts} ${root_fs} ro ${root_fstype}
stderr=serial
stdin=serial
stdout=serial
usb_boot_6=setenv root_fs root=/dev/sdg${usb_dev_part}
usb_dev_list=3 2 1 0
usb_dev_part=1
usb_part_list=4 3 2 1
usb_scan=usb start; setenv usb_boot_dev none; for dev in  $usb_dev_list; do test $dev -eq 0 && setenv devname /dev/sda ; test $dev -eq 1 &&  setenv devname /dev/sdb ; test $dev -eq 2 && setenv devname /dev/sdc ; test $dev -eq 3 && setenv devname /dev/sdd ; echo $devname ; for part in $usb_part_list; do echo $dev $part ; if ext2load usb ${dev}:$part 0x800000 /boot/uImage 10 ; then setenv usb_boot_dev $dev:$part ; setenv usb_boot_dir /boot ; fi  ; if ext2load usb ${dev}:$part 0x800000 /uImage 10 ; then setenv usb_boot_dev $dev:$part ; setenv usb_boot_dir ; fi  ; done; done; if test "$usb_boot_dev" = "none" ; then echo "No USB bootable device found" ; else echo "USB device $usb_boot_dev is bootable" ; setenv bootargs $console $mtdparts $root_fs ro $rootfstype ; echo $bootargs ; sleep 1; ext2load usb $usb_boot_dev 0x800000 $usb_boot_dir/uImage && setenv usb_boot_address 0x800000 ; ext2load usb $usb_boot_dev 0x1100000 $usb_boot_dir/uinitrd && setenv usb_boot_address 0x800000 0x1100000 ; bootm $usb_boot_address ; fi;

Labeling the root filesystem was a workaround when I started getting issues on device namings changes as I began using the SATA drives for NAS storage. In practice what was happening was that uboot thought that root was on sda but once the kernel booted it would detect the SATA drives before that and name the usb memory stick to after the last SATA drive causing a kernel panic as initrd attempts to mount the root filesystem. I thus changed the u-boot environment to pass the root device as a label rather then a device path. This allows me to boot my GoFlexNet correctly from any usb stick (even trough a usb hub) regardless of the presence of the SATA drives.

To my understanding the latest uboot environments actually do more then this now … so here's my last hybrid environment:

arcNumber=3089
baudrate=115200
bifsload=0x800000 /boot/$kernel && ubifsload 0x1100000 /boot/$initrd; then bootm 0x800000 0x1100000; fi
bootargs=${console} ${mtdparts} ${root_fs} ro ${rootfstype}
bootcmd=usb start; run force_rescue_bootcmd; run ubifs_bootcmd; run usb_scan; usb stop; run rescue_bootcmd; run pogo_bootcmd; reset
bootdelay=3
console=ttyS0,115200
ethact=egiga0
ethaddr=xx:xx:xx:xx:xx:xx
force_rescue=0
force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi
initrd=uinitrd
kernel=uImage
led_error=orange blinking
led_exit=green off
led_init=green blinking
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
partition=nand0,2
pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi
rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi
rescue_installed=0
rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params
root_fs=root=LABEL=root
rootfstype=rootfs=ext3
safearcNumber=2097
setbootargs=setenv bootargs console=${console} ${mtdparts} ${root_fs} ro ${rootfstype}
stderr=serial
stdin=serial
stdout=serial
ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi
ubifs_mtd=3
ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params
usb_dev_list=3 2 1 0
usb_part_list=4 3 2 1
usb_rootdelay=10
usb_scan=sleep 5; setenv usb_boot_dev none; for dev in $usb_dev_list; do for part in $usb_part_list; do if ext2load usb ${dev}:$part 0x800000 /boot/$kernel 10; then setenv usb_boot_dev $dev:$part; setenv usb_boot_dir /boot; fi; if ext2load usb ${dev}:$part 0x800000 /$kernel 10; then setenv usb_boot_dev $dev:$part; setenv usb_boot_dir ; fi; done; done; if test "$usb_boot_dev" = "none"; then echo "No USB bootable device found"; else echo "USB device $usb_boot_dev is bootable"; run setbootargs; echo $bootargs; sleep 1; ext2load usb $usb_boot_dev 0x800000 $usb_boot_dir/$kernel && setenv usb_boot_address 0x800000; ext2load usb $usb_boot_dev 0x1100000 $usb_boot_dir/$initrd && setenv usb_boot_address 0x800000 0x1100000; bootm $usb_boot_address; fi;

Sources

howtos, arm, author , louigi600

Getting Slackware ARM on the Toshiba AC100 (also know as the Dynabook AZ)

When all this started off I was using ARMedslack 13.37 but as of version 14 the official Slackware ARM port changed name to Slackware ARM. Any reference to ARMedslack in this short tutorial refers to the Slackware ARM official port[3593].

Preface

The Slackware ARM userland can run on almost any ARM based hardware out there and the Toshiba AC100 is no exception to that rule of thumb. The only impediment to going straight ahead is the kernel. I like to work around the problem by borrowing the kernel from some other distribution that has support for the AC100. currently you have 3 options to get reasonable support for the hardware:

2.6.38 kernel patched up for AC100

3.0 kernel patched up for AC100

3.15+ mainstream kernel (untested yet)

The 3.1 kernel development got broken on the way and to my understanding is unmaintained.

There are several places you can get the binary kernel images or the sources to compile them I generally look for Ubuntu first. Initially I used the Ubuntu kernel[3594] version 2.6.38 but over time I upgraded to version 3.0.27.

Hardware information

Here is some of the information I fetched on my AC100 before going into reflashing it with a different OS

The original partition layout

These values are relative to my model (10G), other models (even if with the same size EMMC) may have a different layout. You should double check how your EMMC is layed out before you attempt flashing anything. nvflash –getpartitiontable

Offsets show below are absolute … while offsets seen in tegrapart (from the kernel boot args) seem off from these absolute values by -2048 (-0x800).

part #  name    star 		sector 	size 		description		 	remarks
nvflash	  sector
2       BCT     0		15363 	(3 MB)          boot config table
3       PT      1536		256 	(512 kB)        partition table
4       EBT     1792		1024 	(2 MB)          bootloader
5       SOS     2816		2560 	(5 MB)          recovery partition		mmcblk0p1
6       LNX     5376		4096 	(8 MB)          linux kernel and initrd 	mmcblk0p2
7       MBR     9472		512 	(1 MB)          master boot record
8       APP     9984		153600 	(300 MB)        applications (/system)		mmcblk0p3
9       CAC     163584		204800 	(400 MB)        cache (/cache)			mmcblk0p4
10      MSC     368384		1024 	(2 MB)          misc (/misc)			mmcblk0p5
11      EM1     369408		256 	(512 kB)
12      UBA     369664		622320 	(1215.5 MB)     user data (/data)		mmcblk0p6
13      EM2     1001984		256 	(512 kB)
14      UDB     1002240		6837504 (13354.5 )      user data (/storage)		mmcblk0p7

All partitions have sectors of 2048 bytes and id 18.

The tegrapart format is a coma separated list of items like this :

<partition name>:<hex start sector>:<hex partition size in sectors>:<hex sector size in bytes>,...

that needs to be read out from /proc/cmdline while the AC100 is running the stock OS or needs to be manually created based on the info from the output of tegrapart (the latter is tricky as it is undocumented).

Booting Custom Images

In order to boot and run the Slackwate userland you need to prepare a bootable image for aboot. Threre is 2 possible ways of doing that:

via the rescue boot image

via the normal boot image

Even if you manage to wreck both you can still rescue your device using nvflash but if you make backups and only flash one partition at a time you can use the other to put things right. You should keep the backups safe for any future use and/or restoring back the original OS. I tried flashing the rescue image first and then I use that to flash the rest … but you can keep using nvflash for both boot images and even for the root filesystem if you like the idea. There is a new rescue image that can be run from ram without actually flashing anything into the rescue partition, but it is handy to have a rescue partition that can be used to assist fixing the OS you are going to install (as the stock one is useless on anything but the stock OS).

Requirements

What you'll need:

kernel image for AC110 in zImage along with the kernel modules and firmware (here[3595] is the one I use)

the boot[3596] and rescue[3597] images (these could be ok for a ac100-10G model but may require changing the kernel arguments on other models)

abootimg utility for manipulating the images (git clone –depth 1 https://gitorious.org/ac100/abootimg.git[3598])

tegra-linux utility for doing the nvflash stuff (available from Toshiba at the time of writing)

Slackware ARM miniroot tarball from http://ftp.slackware.org.uk/slackwarearm/slackwarearm-devtools/minirootfs/roots/[3599]

A copy of the content of /proc/cmdline before you change kernel

Backing Up

Before you actually go ahead it's a good idea to make a backup of the original rescue and boot images. It won't hurt if you also do this for all the partitions … I'll leave that up to you. Start your device into recovery mode (POWER + ESC + CTRL) and then from the pc where you have the tegra-linux utils run the following com mands:

nvflash --bl harmony/fastboot.bin --sync
nvflash -r --read 5 original_part05_rescue.img
nvflash -r --read 6 original_part6_boot.img

Creating An Initrd

Although it is technically possible to boot without using an initrd I've not had the time to experiment that. If all you need is simple boot then the initrd only really needs busybox and a very simple script that mounts root and then switches root.

I make a slight difference between the rescue init script and the boot init script, making the former always drop you into a shell prompt from the initrd system and the latter always attempt to switch root.

This is what my boot init script looks like:

#!/bin/sh
exec 3>&1
mount -t sysfs -o nodev,noexec,nosuid none /sys
mount -t proc -o nodev,noexec,nosuid none /proc
sysctl -w kernel.printk="4 4 1 7" >/dev/null 2>&1
mount -t tmpfs -o mode=0755 none /dev
mknod -m 0600 /dev/console c 5 1
mknod /dev/null c 1 3
mkdir /dev/pts
mount -t devpts -o noexec,nosuid,gid=5,mode=0620 none /dev/pts
mdev -s
sleep 5
echo 0x0100 > /proc/sys/kernel/real-root-dev
mount -o ro /dev/mmcblk0p7 /root
if [ ! -r /root/sbin/init ]
then
/bin/sh
fi
umount /proc
umount /sys
umount /dev/pts
exec switch_root /root /sbin/init 3

If you wish to alter the init scripts you can extract them from the rescue and boot images: first use abootimg to extract the initrd.img then use zcat | cpio -idm to extract the content from the initrd image. Edit them to suit your desired setup (in my case root is on the internal EMMC biggest partition), load any modules required for switching root and then repackage the images.

Repackaging The Boot Images For Aboot

You need to make sure the arguments passed to the kernel via cmdline are correct for your device so you need to disassemble the boot images anyway to check out the bootimg.cfg. Do the in a separate folder for each image:

abootimg -x <boot image>

If you made changes to the initrd or changed the kernel you need to repackage the boot images before going any further. From your initrd tree repackage the initrd image:

find . | cpio -o -H newc |gzip -9c > ../initrd.img

Edit the cmdline in the bootimg.cfg with the correct arguments that you previously read out from your device and add to them “root=<your root device> rootwait ro”. Failing to do this can result in unusable images.

Then repackage the image for aboot:

abootimg -create rescue_new.img -k zImage -f bootimg.cfg -r initrd.img

You are now theoretically ready to try your rescue image without actually flashing it.

Restart your device into recovery mode (POWER + ESC + CTRL) an load the rescue image into ram. I've not yet got round to prepare a ram rescue image (requires 3.8+ kernel, u-boot and other details prepended to the kernel and initrd images) but over at ac100.grandou.net they have it sorted out, so for the mean time you can try their ram loading sos-uboot-r5-alpha.bin[3600] image … other wise skip this step and go to the one below. If you want to read more about sos-uboot-r5-alpha you can do so here[3601].

nvflash --bl sos-uboot-r5-alpha.bin --sync

Using traditional rescue system flashed to rescue partition.

nvflash --bl harmony/fastboot.bin --sync
nvflash -r --download 5 rescue_new.img

And then boot into rescue (POWER + HOME) then select 1.

If the rescue image works fine you can use it to flash the rest. On my device the rescue partition is /dev/mmcblk0p1 and the normal boot partition is /dev/mmcblk0p2. You will use dd for the rescue and boot images and mk?fs/tar for the root filesystem. Your images need to be on SD or usb mas storage so that you can read them from the rescue system.

Flashing From The Rescue Initrd

I forgot to mention: you need to put the Slackware ARM miniroot tarball and the boor image(s) on SD or USB so that you can flash them from rge rescue image. Once you're on the shell prompt from the rescue image mount the external media with the images

mkdir /mnt
mount /dev/<device> /mnt

Double check the partition layout on your dvice, it may differ from mine.

If you are running rescue from ram without having flashed it to EMMC

dd if=/mnt/rescue.img of=/dev/mmcblk0p1 bs=2048

If you are here you know the rescue image works so it's safe to flash the boot image too:

dd if=/mnt/boot.img of=/dev/mmcblk0p2 bs=2048

Fprmat the root filesystem (yoyr's may be on /dev/mmcblk1p? or /dev/sda?)

mke2fs -t ext4 -j -m 1 -b 4096 -i 16384 -l root /dev/mmcblk0p7

Mount it so you can extract the tarball:

mkdir /root_fs
mount /dev/mmcblk0p7 /root_fs
tar xpf /mnt/slackwarearm<version>.tgz -C /root_fs/

Make sure you set up fstab on the root partition to match your system. Try chroot to it to check all in in place:

chroot /root_fs

Reboot and enjoy.

Handy Workarounds

Here are some little issues I worked around that other people might find handy

Audio With The Newer Kernel

Finally the speakers are working but in order to get any audio out of the AC100 with 3.0 kernels you haveto do a few things:

use alsamixer to unmute everything (or at least selectively what you need)

run “alsaucm -c tegraalc5632 reset” to reset the audio hardware

use “alsactl store” to store the settings so that you can restore them at boot time

You can then add this to rc.local

/usr/bin/alsaucm -c tegraalc5632 reset
/usr/sbin/alsactl restore

MPlayer

Mplayer from armedslack has unsuitable defaults for the AC100 so if you want video and audio playback go and edit /etc/mplayer/mplayer.conf and set these two lines:

vo=x11
ao=alsa

pppd

pppd does not correctly setup /etc/resolve.conf … I worked around this by writing very simple ip-up and ip-down to be put in /etc/ppp/

/etc/ppp/ip-up:

#!/bin/bash
if [ $USEPEERDNS -eq 1 ]
then
cp /etc/resolv.conf /etc/org_resolv.conf
> /etc/resolv.conf
[ "$DNS1" != "" ] && echo "nameserver $DNS1" >> /etc/resolv.conf
[ "$DNS2" != "" ] && echo "nameserver $DNS2" >> /etc/resolv.conf
[ -s /etc/resolv.conf ] && cat /etc/ppp/resolv.conf > /etc/resolv.conf
fi

/etc/ppp/ip-down:

#!/bin/bash
[ -s /etc/org_resolv.conf ] && cat /etc/org_resolv.conf > /etc/resolv.conf

Battery Status

Acpi is not working right and apm seems useless so I read the battery charge state directly from /sys/class/power_supply/battery/charge_now but the format is not directly human readable so I wrote something that calculates is as a percentage:

echo " $(echo "($(cat /sys/class/power_supply/battery/charge_now) * 100) / $(cat /sys/class/power_supply/battery/charge_full_design)" | bc) %"

You will get an error if you run this when the AC100 is on AC power without the battery.

Adobe Flash plugin

Although you cannot download it from adobe, Android has the blasted libflasplayer.so library but even if you hack it out of some apk you will run into trouble with incompatible libraries dew to the different instruction sets used in android and ARMedslack. In order to get some basic flash support in my ARMedslack AC100 I used swfdec: it will not play youtube videos as you get told that you need to update but it's better then nothing. I've been reported that the android libflasplayer.so works on Slackware ARM 14.

Alternative Way To Boot Linux The First Time

If I remember correctly I think this is how I first got my custom image from my linux PC to the AC100 with the linux4tegra utilities. Start in Recovery mode

$ nvflash --bl fastboot.stock.bin --go

Backup your target partition

$ nvflash --resume --read 5 part05.img

Erase the kernel partition

$ nvflash --resume --format_partition 5

The system should go automatically to fastboot mode

Flash a kernel and a ramdisk

$ fastboot flash:raw boot zImage init.img

Building Newer 3.0 Kernel

This is work in progress, it boots and works but it's not been tested extensively like 2.6.38

There has been a lot of work done on mainstream kernel from 3.8 on, but I've not had the time to check out if it's functional enough to be used on the AC100 as a netbook and besides that there are also other issues that are holding me back on doing the testing on mainstream kernel:

I still have not wired up the uart for debugging things if the frame buffer console ceases to function as expected

mainstream kernels do not support tegra part so work needs to be done to migrate on-board emmc to gpt partition

at some point also fdt will need attention too

According to ac100.grangow.net[3602] form 3.15 on there is full support on mainstream kernel.

Native kernel build (in order to compile this native 512Mb are no longer sufficient so you need to swap on something {SD,usb storage or internal emmc}: an extra 512Mb swap will suffice). It's technically possible to work form marvin's kernel git but I've not been able to configure that kernel to boot correctly … it hangs while attempting to read RTC, but it's probably just something wrong that I did in the configuration. #git clone –depth 1 -b chromeos-ac100-3.0 https://gitorious.org/~marvin24/ac100/marvin24s-kernel.git[3603]

wget https://launchpad.net/ubuntu/+archive/primary/+files/linux-ac100_3.0.27-1.1.tar.gz
tar xf linux-ac100_3.0.27-1.1.tar.gz
cd linux-ac100-2.6.38 #yeah the mane of the directory is misleading !
make paz00_defconfig
make zImage modules firmware INSTALL_MOD_STRIP=1
make firmware_install
make modules_install INSTALL_MOD_STRIP=1

Prepare The Image For Booting

Once you've the modules in place you need to package the kenel in aboot format … I previously did this with an old tool … there's now a standard tool: “abootimg”

git clone --depth 1 https://gitorious.org/ac100/abootimg.git
cd abootimg
make
make install

There are 2 possibilities for booting with the stock boot loader:

form the normal boot partition (/dev/mmcblk0p2 on my device)

from the rescue boot partition (/dev/mmcblk0p1 but only works on android 2.1 systems)

You can choose to leave the normal boot partition alone and target the rescue partition or vice versa but don't mess with both until you have transitioned to a functional system.

The rescue partition is only 5Mb while the normal boot is 8Mb depending on how bid your image is you might be forced to use the ordinary boot … but conceptually the image creation is the same.

Dump your target partition with whatever tool is most convenient: dd if you have a linux system or rooted busybox on the AC100 or nvflash for non rooted devices. then examine the image with “abootimg -i”

root@ac100:~# abootimg -i /dev/mmcblk0p2
Android Boot Image Info:
* file name = /dev/mmcblk0p2 [block device]
* image size = 8388608 bytes (8.00 MB)
page size  = 2048 bytes
* Boot Name = "Ubuntu Boot Img"
* kernel size       = 2628788 bytes (2.51 MB)
ramdisk size      = 2219793 bytes (2.12 MB)
* load addresses:
kernel:       0x10008000
ramdisk:      0x15000000
tags:         0x10000100
* empty cmdline
* id = 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
root@ac100:~#

You also need to save the original command line passed to the kernel because it's not stored in the original image.

root@ac100:~# cat /proc/cmdline
mem=448M@0M lp0_vec=0x2000@0x1c29e000 tegraboot=sdmmc tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800,system:1f00:25800:800,cache:27700:32000:800,misc:59700:400:800,userdata:59c00:9a600:800
root@ac100:~#

When you repackage up the image you will want to add to those arguments: “root=<root device> rootwait ro” where <root device> will be wherever your root filesystem will be (/dev/mmcblk0p7 for internal EMMC, /dev/mmcblk1p1 if root will be on the SD's first partition or /dev/sda1 if on a usb stic's first partition).

The first time I repackaged up an image I did not know much about aboot so I used a custom inirtd to leave the boot process as close as possible to the original … but it is possible to boot without initrd I just have not had time to play with it. It your original image is from android you may need to create your own initrd … the kernel has all that's required to boot so the initrd needs only do vary basic stuff (all that you really need is busybox if all you want is just booting).

First extract the contents of the original image by running “abootimg -x <image_file_name>” This will extract the config file, the kernel and initrd (bootimg.cgf, zImage and initrd.img respectively)

Modify the bootimg.cfg to look something like this:

root@ac100:/boot# cat bootimg.cfg
bootsize = 0x800000
pagesize = 0x800
kerneladdr = 0x10008000
ramdiskaddr = 0x15000000
secondaddr = 0x10f00000
tagsaddr = 0x10000100
name = Slackware Boot Img
cmdline = mem=448M@0M lp0_vec=0x2000@0x1c29e000 tegraboot=sdmmc tegrapart=recovery:300:a00:800,boot:d00:1000:800,mbr:1d00:200:800,system:1f00:25800:800,cache:27700:32000:800,misc:59700:400:800,userdata:59c00:9a600:800 root=/dev/mmcblk0p7 rootwait ro
root@ac100:/boot#

If the original image is an android image you need to create your own initrd. Replace the zImage with whatever you compiled and repackage it up with “abootimg –create slack.img -k zImage -f bootimg.cfg -r initrd.img”

Flash the new boot image back to the partition you decided ti target (with whatever method was used to extract it in the first place) and reboot.

Contacts

If you have any issues or suggestions about this short tutorial you are welcome to contact me ( louigi600 (at) yahoo (dot) it) or even contribute yourself directly on this wiki. I apologize in advance for any vital information that may have been left out when tosh-ac100.wetpaint.com was blocked and this how-to was moved here.

Sources

Originally written by louigi600[3604]

howtos, hardware, arm, author louigi600

Slackware ARM gcc-9.2.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4

Preface

With the recent congruous updates to Slackware ARM[3605] [~24 June 2019 - “A MILLION THANKS to MoZes!”] and the surprise arrival of the Raspberry Pi 4, this just had to be done. Creating a 64-bit gcc-9.2.0 arm64 aarch64 cross-compiler with the intention of building aarch64-linux binaries from source code and turning them into Slackware packages.

Previous work in this area[3606] had already been done since 2016/2017. However, this time we'll be compiling with gcc-9.2.0 and not gcc-5.4.0 and we'll be using a Raspberry Pi 4 Model B and not a Mk3 version. The old build scripts weren't totally useless and some of the code was reused for this project, to save time.

Notes

Slackware ARM current was used on a Raspberry Pi 4 to build and install the gcc-9.2.0 aarch64-linux cross-compiler, and build the armv8 Linux kernel, modules, and device tree blob(s). This was to achieve the highest degree of compatibility possible.

In this guide we are using '/tmp/build-dir' for our temporary 'BUILD' directory and '/tmp/.gcc-cross' as our permanent 'INSTALL' directory. '/tmp/.gcc-cross' is the location where the gcc cross-compiler will be located after it's been compiled. You can, of course, use your own locations for both of these directories.

NB: The gcc-9.2.0 'libsanitizer asan' might need patching before building glibc-2.29 if the compile crashes unexpectedly. If this is a problem for you then patching the offending gcc-9.2.0/libsanitizer/asan/asan_linux.cc source file will get around this issue. The issue itself is that no PATH_MAX has been defined in the source and there needs to be a value set in order for it to compile successfully. Instructions on how to successfully patch this file are included herein, should they be needed.

Requirements

As a pre-requisite, you should have;

a Raspberry Pi 4 running Slackware ARM current with as much unused storage space on your system as possible.

gawk[3607], git[3608], bison[3609] and flex[3610], already installed on your system.

a (spare) microSD card with Slackware ARM current installed on it. # not essential but it is advised.

What's involved

This tutorial will enable you to;

download the required package source(s) in order to build a gcc-9.2.0 cross-compiler on Slackware ARM.

download the Raspberry Pi Linux kernel GitHub[3611] tree rpi-5.2.y development branch.

configure, and install, a gcc-9.2.0 aarch64-linux (armv8) cross-compiler on your Raspberry Pi 4.

build the aarch64 (armv8) Linux kernel, modules, and device tree blob(s), and install them on your [spare] Slackware ARM current microSD card.

successfully boot Slackware ARM current on your Raspberry Pi 4 running an aarch64 (armv8) kernel.

In order not to risk messing up the Slackware ARM system which you use for cross-compiling, a (spare) microSD card containing a working Slackware ARM system should be used to install the arm64 Linux kernel, modules, and device tree blob(s). You'll need a recent (i.e. post-June 2019) version of the Raspberry Pi bootloader/GPU firmware[3612] installed on this (spare) microSD card to avoid any problems. To be sure, boot your RPi4 with it and update the firmware. The Linux kernel version on this (spare) microSD card doesn't matter as you'll be replacing it with the aarch64 (armv8) kernel.

Downloading required source and configuration

First of all, as a normal user (i.e. not 'root') create a working directory. For example, I usually work from the '/tmp' directory:

mkdir -p /tmp/build-dir
cd /tmp/build-dir

This is the directory you will download all the required packages and RPi Linux source to. You can choose your own 'BUILD' directory location if you prefer. Just remember to work around the instructions in this guide if/when you do.

Downloading RPi Linux kernel source

Use the following 'git' command to download the Raspberry Pi Linux kernel source into a directory named 'linux'. You only need to download the last full commit so a depth=1 has been specified and the specific branch we want to work with [branch 'rpi-5.2.y' in our case]. Which saves time and space.

git clone --depth=1 --single-branch -b rpi-5.2.y https://github.com/raspberrypi/linux linux

This may take a while, depending on the speed of your Internet connection and other factors. Once it has completed you need to switch to the 64 bit kernel development branch.

cd linux
git fetch --depth=1 https://github.com/raspberrypi/linux rpi-5.2.y
git checkout -f rpi-5.2.y

When that's done you should see a message that 'origin/rpi-5.2.y' is the current branch.

You can select which kernel source you would like to build instead of rpi-5.2.y branch. Just substitute it in the 'git checkout -f rpi-5.2.y' command for your chosen branch. To see a list of available branches use this command while in your Linux source directory:

git branch -a

Downloading required package source

Before downloading the package source needed to build the gcc cross-compiler, be aware that more recent package versions may exist than the ones shown here. You may wish to install newer versions. It's always a good idea to check. To keep things simple, you might consider downloading a version of gcc which matches the one you currently have installed. I've read lots of articles about this and most advise to install the latest and greatest version of gcc available. However, if you're running Slackware ARM current you'll have gcc-9.2.0 installed and this is adequate for what you need.

So, first move back into the 'BUILD' directory and then download the packages below.

cd ../
wget -nc https://ftp.gnu.org/gnu/binutils/binutils-2.32
wget -nc ftp://gcc.gnu.org/pub/gcc/infrastructure/cloog-0.18.1
wget -nc https://ftp.gnu.org/gnu/gcc/gcc-9.2.0
wget -nc https://ftp.gnu.org/gnu/glibc/glibc-2.29
wget -nc https://ftp.gnu.org/gnu/gmp/gmp-6.1.2
wget -nc ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18
wget -nc https://ftp.gnu.org/gnu/mpc/mpfr-4.0.2
wget -nc https://ftp.gnu.org/gnu/mpfr/mpc-1.1.0

Unpacking downloaded tarballs

Now unpack all the downloaded tarballs. You can do this easily with a 'for loop' command.

for t in *.tar*; do tar -xvf $t; done

Once this has completed you can us the 'ls' command to verify that the directories are present.

Creating gcc dependency symlinks

Now you are going to create some symbolic links in the gcc-9.2.0 directory. These will point to some of the source directories you have just unpacked, which are dependencies of gcc, and when these symbolic links are present gcc will build them automatically.

cd gcc-9.2.0
ln -sf ../cloog-0.18.1 cloog
ln -sf ../gmp-6.1.2 gmp
ln -sf ../isl-0.18 isl
ln -sf ../mpfr-4.0.2 mfpr
ln -sf ../mpc-1.1.0 mpc

Alternatively, some articles will advise you to use the following command in order to achieve the same thing.

cd gcc-9.2.0
./contrib/download_prerequisites

Personally, I always prefer the manual method because then I know what's being downloaded/installed and what to expect. It's up to you which method you use.

Creating gcc-9.2.0 cross-compiler install directory

The next thing to do is create an 'INSTALL' directory. This is the directory where the gcc cross-compiler will be installed. As before, I like to work from the '/tmp' directory so the install directory is where I will locate it.

mkdir -p /tmp/.gcc-cross

You don't have to use the '/tmp' directory. You can install the gcc cross-compiler anywhere on your system where you have access. Such as your '/home/user' directory. Just remember to work around the instructions in this guide if/when you do.

Exporting install directory PATH

You need to export the installation directory's '/bin' folder to your user's $PATH. The PATH of your gcc-9.2.0 cross-compiler bin needs to be the FIRST item in the $PATH in order to be successful.

export PATH=/tmp/.gcc-cross/bin:$PATH

To check that this has been entered correctly, use the following command:

echo $PATH

You should see the first $PATH entry is to your 'INSTALL' directory's '/bin' folder. It's important that your installation directory's '/bin' folder appears before any other entry in the $PATH.

/tmp/.gcc-cross/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib/kde4/libexec:/usr/lib/qt/bin

NB: your $PATH may be very different from the one shown above, but that doesn't matter. As long as the PATH to your gcc cross-compiler's '/bin' directory is the first item in the $PATH it's all good.

Building the gcc aarch64 cross-compiler

Now with all that in place, concentration focuses on building the cross-assembler, cross-disassembler, cross-linker, and other useful tools.

Building binutils

First move back into the 'BUILD' directory and then create a build directory for binutils. You'll notice the various CFLAGS but as a quick explanation; '–with-sysroot' basically tells binutils to enable 'sysroot' support in the cross-compiler by pointing it to a default empty directory, '–target=aarch64-linux' is the target system type (arm64), and '–disable-multilib' means that we only want binutils to work with the aarch64 instruction set and nothing else.

cd build-dir
mkdir build-binutils
cd build-binutils
../binutils-2.32/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --with-sysroot --disable-multilib
make -j4
make install

Installing Linux kernel headers

Here you need to install the Linux kernel headers. Note the 'ARCH=arm64' option for the make process. gcc uses 'aarch64' where the Linux kernel uses 'arm64'. The two separate open source projects identify the same CPU architecture differently.

cd ../linux
make ARCH=arm64 INSTALL_HDR_PATH=/tmp/.gcc-cross/aarch64-linux headers_install

Build gcc C and C++ cross-compilers

First move into the 'BUILD' directory and create a build directory for gcc before building it. Notice that only C and C++ have been specified as build languages. That's all you will need here. Incidentally, the available build language options allow just one, or a selection, or all, of the following '–enable-languages=all,ada,c,c++,fortran,go,jit,lto,objc,obj-c++'.

cd ../
mkdir build-gcc
cd build-gcc
../gcc-9.2.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
make -j4 all-gcc
make -j4 install-gcc

Patching gcc before compiling glibc

If you find that compiling glibc is problematic, or crashes every time, and it concerns 'libsantizer asan' you will need to patch gcc-9.2.0 before it will compile successfully.

First, move into your 'BUILD' directory and create the patch file.

cd /tmp/build-dir
touch asan_linux-cc.patch

Next, copy the code below into the asan_linux-cc.patch file or use cat as shown below. It needs to be exact!

--- orig/asan_linux.cc	2019-07-11 21:18:56.000000000 +0100
+++ mod/asan_linux.cc	2019-07-11 16:31:42.000000000 +0100
@@ -75,6 +75,10 @@
asan_rt_version_t  __asan_rt_version;
}
+#ifndef PATH_MAX
+#define PATH_MAX 4096
+#endif
+
namespace __asan {
void InitializePlatformInterceptors() {}

Check the contents of the file and verify that they look the same as shown here, including an empty line at the bottom. Then you are able to finally patch the offending file using the following command:

patch -b gcc-9.2.0/libsanitizer/asan/asan_linux.cc asan_linux-cc.patch

This will patch the file and create a backup [option -b] in case things don't go as planned. Now you should find that glibc compiles without any problem(s).

NB: The location of the backed up file is: gcc-9.2.0/libsanitizer/asan/asan_linux.cc.orig

Build and install glibc

First move into the 'BUILD' directory and create a 'build-glibc' directory. Then move into the 'build-glibc' directory before building it. '–build=$MACHTYPE' is a predefined environment variable which describes the Raspberry Pi 4 (in this case) and it's required to compile some additional tools which are utilised during the build process. Notice that you're installing the C library startup files to the installation directory (csu/crt1.o, csu/crti.o, and csu/crtn.o) separately because there doesn’t seem to a 'make' rule that does this without creating other problems.

cd ../
mkdir -p build-glibc
cd build-glibc
../glibc-2.29/configure --prefix=/tmp/.gcc-cross/aarch64-linux --build=$MACHTYPE --host=aarch64-linux --target=aarch64-linux --with-headers=/tmp/.gcc-cross/aarch64-linux/include --disable-multilib libc_cv_forced_unwind=yes
make -j4 install-bootstrap-headers=yes install-headers
make -j4 csu/subdir_lib
install csu/crt1.o csu/crti.o csu/crtn.o /tmp/.gcc-cross/aarch64-linux/lib
aarch64-linux-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /tmp/.gcc-cross/aarch64-linux/lib/libc.so
touch /tmp/.gcc-cross/aarch64-linux/include/gnu/stubs.h

Building glibc support library

Now move into the 'build-gcc' directory once again and build the gcc cross-compiler support library.

cd ../build-gcc
make -j4 all-target-libgcc
make install-target-libgcc

Finish building glibc C library

Move into the 'build-glibc' directory to finish building glibc C library and then install it.

cd ../build-glibc
make -j4
make install

Finish building gcc C++ library

Move into the 'build-gcc' directory to finish building gcc C++ library and then install it.

cd ../build-gcc
make -j4
make install

Be prepared for these build procedures to take some time. A few hours at least.

Testing the cross-compiler

To test/check that your gcc aarch64-linux cross-compiler is working properly run the following command.

aarch64-linux-gcc -v

You should get a response similar to the following.

aarch64-linux-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-linux-gcc
COLLECT_LTO_WRAPPER=/tmp/.gcc-cross/libexec/gcc/aarch64-linux/9.2.0/lto-wrapper
Target: aarch64-linux
Configured with: ../gcc-9.2.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib : (reconfigured) ../gcc-9.2.0/configure --prefix=/tmp/.gcc-cross --target=aarch64-linux --enable-languages=c,c++ --disable-multilib
Thread model: posix
gcc version 9.2.0 (GCC)

Once this process has been completed, export the gcc cross-compiler PATH on your normal user. If/when you're wanting to cross-compile do this each time after you've (re)booted your system so that the gcc cross-compiler can be located via your user's $PATH. You also have the option to add this command to your ~/.profile as a permanent setting. Whether or not you decide to permanently add the gcc cross-compiler PATH to your ~/.profile is entirely up to you. If you are using your Slackware ARM current system for exclusively building aarch64 (arm64) packages then it would make sense to do so.

Example export command:

export PATH=/tmp/.gcc-cross/bin:$PATH

The gcc aarch64-linux cross-compiler on your Slackware ARM system is now ready to rock-n-roll!

Building the arm64 kernel, modules, and device tree blob (DTB)

To build the aarch64 kernel, modules and device tree blob(s) is exactly the same method as you would carry it out under normal circumstances. Commands such as 'make bzImage && make modules && make modules_install' may be all too familiar to you. The major difference when cross-compiling is that you'll use certain Makefile variables/arguments/switches, commonly known as build options<. In our case, build options will be used to instruct the gcc cross-compiler to build for the aarch64 (arm64) architecture specifically.

Creating the arm64 kernel .config

First of all, as always, you need to be in the Raspberry Pi Linux kernel source directory which is within your 'BUILD' directory. Then you need to create a kernel .config file, based on Raspberry Pi 4 parameters. To keep it simple you can generate a default .config (defconfig) file. This file holds the Linux kernel configuration for the arm64 kernel you are going to build. To achieve this run the following commands:

cd /tmp/build-dir/linux
make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- bcm2711_defconfig

Make a note here of the build options [ARCH=arm64 CROSS_COMPILE=aarch64-linux-] which have been specified. They should be self-explanatory by now. Pay special attention to the trailing '-' of 'CROSS_COMPILE=aarch64-linux-' because that's NOT a typo. It needs to be like that!

Now that you've created a kernel .config which contains the default settings for your hardware, some settings within need to be checked and possibly modified. The Raspberry Pi 4's “VideoCore VI” GPU is not 64-bit compatible and the build process will crash each time you attempt to compile the module's source code for ARMv8 architecture.

Here are the 3 kernel configuration settings you need to check. Whether they are destined as modules [CONFIG=m] or included in the kernel [CONFIG=y] it's of no consequence. You need to unset these settings:

CONFIG_VIDEO_BCM2835=m
CONFIG_BCM2835_VCHIQ_MMAL=m
CONFIG_BCM_VC_SM_CMA=m

Change the settings so they are all commented out, like this:

# CONFIG_VIDEO_BCM2835 is not set
# CONFIG_BCM2835_VCHIQ_MMAL is not set
# CONFIG_BCM_VC_SM_CMA is not set

You can either edit the kernel .config file directly with 'vi' or 'nano' text editors:

vi /tmp/build-dir/linux/.config
nano -w /tmp/build-dir/linux/.config

Or can use use the 'sed' command to achieve this:

sed -Ei 's/^CONFIG_VIDEO_BCM2835=.*/# CONFIG_VIDEO_BCM2835 is not set/' /tmp/build-dir/linux/.config
sed -Ei 's/^CONFIG_BCM2835_VCHIQ_MMAL=.*/# CONFIG_BCM2835_VCHIQ_MMAL is not set/' /tmp/build-dir/linux/.config
sed -Ei 's/^CONFIG_BCM_VC_SM_CMA=.*/# CONFIG_BCM_VC_SM_CMA is not set/' /tmp/build-dir/linux/.config

Or you can use 'make menuconfig':

cd /tmp/build-dir/linux/
make menuconfig

ATTENTION: DO NOT modify ANYTHING ELSE in the kernel .config file!!!

A great number of Linux users will rebuke you for editing the kernel .config file directly! It's generally considered unsafe [and rightly so] to edit the kernel .config because there are a multitude of CONFIG -options that are dependent on other -options and if they aren't all present and correct, or don't correlate, then success will not be in your favour. As an alternative to editing the kernel .config directly, if you'd rather use 'make menuconfig' which is a much safer way to modify these settings then that's your prerogative.

Building the arm64 kernel

Next up is building the kernel, based on the .config file you have just created. Again, you'll use the same build options as before. You can even set a 'LOCALVERSION' here which appends whatever you set to the end of the kernel version (e.g. LOCALVERSION=“-aarch64” would eventually give you 5.2.1-v8-aarch64) once the kernel and modules have been built. Just as an example we'll use it here. Run the following command to start building the arm64 Linux kernel:

make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-aarch64" Image

So, here you 'make' the kernel which will be saved with the name 'Image'. The rest you should be familiar with. This process will take a while. Maybe an hour or so.

Building the arm64 device tree blob(s)

Device tree is a means of describing hardware which is read by the kernel at boot time to tell it what hardware exists on the system. In our case it relates to the Raspberry Pi 4 and is the method by which the systems knows which drivers to load for the hardware. On ARM-based devices the use of device trees has become mandatory for all new SOCs, including the Raspberry Pi.

To build the Raspberry Pi device tree blob(s) run the following command:

make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-aarch64" dtbs

It's basically the same as you did to build the kernel, only where 'Image' is substituted for 'dtbs'.

Building the arm64 modules

To build the kernel modules you do it in much the same way as before. Run the following command:

make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- LOCALVERSION="-aarch64" modules

Notice how each time the command is the same except when specifying what you're building. If you have set a 'LOCALVERSION' then it must be kept the same for building the kernel and modules. This process will probably take a while longer than building the arm64 kernel.

Installing the arm64 modules

Once the modules have been built, you have to 'make modules_install'. The process will install your kernel modules to '/lib/modules/5.2.1-v8-aarch64'.

You could build out-of-tree kernel modules but, to keep things simple, you're going to install them to the usual location. Again, you will use the same build options as before but without any 'LOCALVERSION' set.

First you need become 'root' user and enter a passwd when prompted. To install the aarch64 modules run the following commands:

su -
make -j4 ARCH=arm64 CROSS_COMPILE=aarch64-linux- modules_install

You need to be 'root' user to install the arm64 modules. A normal user does not have the rights to do so!

So, as I'm a great believer in being thorough, I always verify things at every opportunity. Just to be sure, if nothing else, because it's always a good policy. Make sure the files and directories you have just spent quite a bit of time compiling actually do exist on your system and that they're in the right place. If this is the first time you have installed the gcc cross-compiler on your system and/or built the kernel, modules, and device tree blob(s), then it goes without saying. You could actually do this after each build process, which I often do as well.

ls -lah arch/arm64/boot/Image
ls -lah arch/arm64/boot/dts/broadcom/bcm*.dtb
ls -lah /lib/modules/5.2.1-v8*

If you can see that they all exist, then everything has worked as planned.

Copying the arm64 kernel, modules, and device tree blobs (DTB)

Connect the (spare) microSD card containing a working Slackware ARM current system to your Raspberry Pi 4 using a USB microSD card reader. You'll need to mount the partitions first, before copying the arm64 kernel, modules, and device tree blob(s) onto it.

You should still be logged in as 'root' user. If not, type the following command and enter the passwd for the 'root' user when prompted:

su -

You need to be 'root' user to carry out any mount procedures. A normal user does not have the rights to do so!

As 'root' user type the following command:

fdisk -l

This should show you which device the (spare) microSD card is using on your system. In our case it's a 32GB card and has been identified as '/dev/sda', as shown below. This tells us that '/dev/sda1' is our /boot partition and '/dev/sda3' is our root filesystem partition. Yours may be allocated differently so bear that in mind.

Device     Boot  Start      End  Sectors  Size Id Type
/dev/sda1  *        32   195327   195296 95.4M  c W95 FAT32 (LBA)
/dev/sda2       196608   720895   524288  256M 82 Linux swap
/dev/sda3       720896 61145087 60424192 28.8G 83 Linux

In order to mount the partitions you first need to create mount directories. Working in the /tmp directory you can do it like this:

cd /tmp
mkdir rpi-boot
mkdir rpi-root
mount /dev/sda1 rpi-boot
mount /dev/sda3 rpi-root

To check that you've done this correctly, use the 'mount' command. The output from this should give you something similar to the following:

/dev/mmcblk0p3 on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
/dev/mmcblk0p1 on /boot type vfat (rw,fmask=177,dmask=077)
/dev/sda1 on /tmp/rpi-boot type vfat (rw)
/dev/sda3 on /tmp/rpi-root type ext4 (rw)

The next thing to do is copy the arm64 kernel, modules, and device tree blobs to your newly mounted directories. It's important to get this right. After all the hard work you've done it would be a shame to mess it up at this stage.

To copy these files, run the following commands, as 'root' user:

cp build-dir/linux/arch/arm64/boot/Image rpi-boot/boot/kernel8.img
cp build-dir/linux/arch/arm64/boot/dts/broadcom/bcm*.dtb rpi-boot/boot
cp -rv /lib/modules/5.2.1-v8* rpi-root/lib/modules/

Once you have done that, check that the files you have copied are present and in the right place.

ls -lah rpi-boot/boot/kernel*
ls -lah rpi-boot/boot/bcm*-rpi-4-b.dtb
ls -lah rpi-root/lib/modules/5.2.1-v8*

If it all looks fine and dandy then the next thing you need to do is delete the old armv7 kernel in the rpi-boot/boot directory. This old kernel is named 'kernel7.img' and to avoid any conflicts with the new arm64 'kernel8.img' you should remove it.

rm -rf rpi-boot/kernel7.img

No changes to the config.txt or cmdline.txt file(s) should be necessary. If you are using a recent blootloader/GPU firmware version (i.e. post-June 24 2019) then nothing else needs to be changed or deleted. The system should boot using all your existing settings.

Now you can unmount the previously mounted directories.

umount rpi-boot
umount rpi-root

Booting Slackware ARM aarch64

Power off your Raspberry Pi.

poweroff

Remove the USB microSD card reader and swap microSD cards. Power on the Raspberry Pi and boot the microSD card on which you copied the arm64 kernel, modules, and device tree blobs.

The end result

After booting the system with the arm64 kernel, I logged in remotely via SSH as 'root' user. Then I ran the following commands:

login as: root
root@192.168.10.44's password:
Last login: Thu Jul 24 18:41:17 2019 from 192.168.10.10
Linux 5.2.1-v8-aarch64.
root@drie:~# cat /proc/version
Linux version 5.2.1-v8-aarch64 (exaga@torq) (gcc version 9.2.0 (GCC)) #1 SMP Thu Jul 18 18:19:49 BST 2019
exaga@torq:~# uname -a
Linux torq 5.2.1-v8-aarch64 #2 SMP Thu Jul 18 18:19:49 BST 2019 aarch64 GNU/Linux
exaga@torq:~# cat /etc/slackware-version
Slackware 14.2+
exaga@torq:~# cat /proc/device-tree/model
Raspberry Pi 4 Model B Rev 1.1
exaga@torq:~# cat /proc/cpuinfo | grep "Serial" | cut -d':' -f2
10000000e1d10b41
exaga@torq:~#

Although there's been many issues solved on the road to successfully installing Slackware ARM, there are still many outstanding and some are unsolvable. The VideoCore VI firmware is not compatible with 64-bit ARMv8 architecture. So, no nice video modes. Any other problems that can be fixed will be fixed, as time permits.

Remember, following this guide will result in running software [i.e. ARMv8 kernel 5.2.1 and modules] that is unsupported and substantially untested [as of 24 June 2019]. The efficacy of which may not always satisfy expectations. Please bear in mind this is completely uncharted territory and you will find little or no help or support for the software you have created and/or are running. However, all is not lost.

There's a new SARPi64 Project website which focusses on all things Slackware AArch64 ARM64 ARMv8 related. From here we hope to develop and distribute experimental binary packages and installer disk images for Slackware ARM, amongst other content. The SARPi64 Project website URL is: http://sarpi64.fatdog.eu/[3613]

An automated gcc-9.2.0 aarch64 cross-compiler build [bash] script is available here: http://sarpi64.fatdog.eu/files/extra/SARPi64.SlackBuild-aarch64-cc.txt[3614]

Thanks for being interested. <3

Sources

# If you need to install any of the software above [* check for updates!]:

ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.0.1-arm-1.txz[3615] # Slackware ARM current - gawk package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.22.0-arm-2.txz[3616] # Slackware ARM current - git package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.4.1-arm-1.txz[3617] # Slackware ARM current - bison package.
ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-3.txz[3618] # Slackware ARM current - flex package.
https://www.github.com/raspberrypi/[3619] # Raspberry Pi Foundation GitHub repository Linux kernel and boot-firmware source.
https://ftp.gnu.org/gnu/[3620] # gcc, binutils, glibc, gmp, mpc, mpfr package source.
ftp://gcc.gnu.org/pub/gcc/infrastructure[3621] # cloog, isl package source.

# Documentation which assisted in this guide:

http://arm.slackware.com/FAQs[3622] # Slackware ARM Linux Project Frequently Asked Questions.
http://wiki.osdev.org/GCC_Cross-Compiler[3623] # gcc cross-compiler documentation.
Slackware ARM GCC aarch64-linux cross-compiler[3624] for the Raspberry Pi.
https://www.raspberrypi.org/documentation/linux/kernel[3625] # Raspberry Pi Linux kernel documentation.

* Originally written by Exaga[3626] - 2019-07-24 19:28:09 [GMT]

howtos, slackware, raspberry, pi, arm, aarch64, arm64, armv8, cross-compile, author exaga

Slackware on ARM - HOWTO guides

This section contains information about how to install Slackware on to a range of ARM hardware.

The wiki pages on this site are intended for the community to help broaden the architecture support and collaboratively create and share the knowledge base.

Installation guides

For the officially supported platforms, the documentation can be found on the Slackware ARM web site[3627]. It's also linked from within this general Slackware Documentation Project for the sake of completeness.

Slackware ARM releases

Hardware and installation support for each release can found below:

Documentation

Slackware ARM 14.2[3628]

Slackware ARM current[3629]

Inspired? Want to write an ARM Hardware HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of ARM Hardware HOWTOS

Within the Linux Kernel and wider OS ecosystems, the ARM platform has fragmented support.

The following table provides some documentation around a variety of devices that the community has created. Some of it relates to unsupported versions of Slackware ARM and has not been updated, but it may still be a useful repository.

Page
Description
Tags

The ARM Machine Architecture Numbers
The ARM Machine Architecture Numbers If you want to know what is the correct Machine Architecture Number for your device you might want to have a look here. There is also a good primer on ARM boot-loader basic operation here Sources howtos arm author louigi600
howtos, arm, author, louigi600

Automatically Set System Time On ARM Devices
Automatically Set System Time On ARM Devices Most users know how unforgiving the Slackware operating system is when the date and time is not set relatively accurate, and rightly so. Inaccurate time can give rise to all kinds of problems, and is often the bane of a system administrator's life. Particularly on ARM devices, where this can be a continual annoyance when the system time has no way of setting itself correctly and/or those responsible [often] forget to do it.
howtos, slackware, arm, system, time, rtc, rc.local, network, ntp, server, author exaga

Slackware ARM current gcc-10.3.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4
Slackware ARM current gcc-10.3.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4 Preface With the recent updates on Slackware ARM (December 2020) to gcc-10.x this is an ARMv8 aarch64 cross-compiler bash script that's intended for building binaries from source code and turning them into Slackware packages. Or whatever use you may find for this script.
howtos, slackware, raspberry, pi, arm, aarch64, arm64, armv8, cross-compile, author exaga

Slackware ARM gcc-9.2.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4
Slackware ARM gcc-9.2.x armv8 arm64 aarch64 cross-compiler for the Raspberry Pi 4 Preface With the recent congruous updates to Slackware ARM [~24 June 2019 - “A MILLION THANKS to MoZes!”] and the surprise arrival of the Raspberry Pi 4, this just had to be done. Creating a 64-bit gcc-9.2.0 arm64 aarch64 cross-compiler with the intention of building aarch64-linux binaries from source code and turning them into Slackware packages.
howtos, slackware, raspberry, pi, arm, aarch64, arm64, armv8, cross-compile, author exaga

Slackware ARM GCC aarch64-linux cross-compiler for the Raspberry Pi
Slackware ARM GCC aarch64-linux cross-compiler for the Raspberry Pi Preface I was thinking about the Cortex-A53 64-bit CPU on my Raspberry Pi 3 and why I'm mainly using Slackware ARM 32 bit operating system on it. Then I started to wonder if it would be possible to build an arm64 kernel and modules to run with Slackware ARM. After reading about how this could be achieved it seemed clear that some cross-compiling would be required. Although I have some experience in building Linux kernels, espe…
howtos, hardware, aarch64, cross-compile, author exaga

Hacking information from the XZPAD700
Hacking information from the XZPAD700 This refers to the XZPAD700 (aka zeligpad) ARM based tablet (AL-A13-RT713 pcb) based on an Allwinner A13 SOC but is technically applicable to all Axx SOC's as to my understanding the all boot in the same manner.
howtos, hardware, arm, louigi600

Slackware ARM on the Hummingboard
Slackware ARM on the Hummingboard There are many ARM devices on the market at the moment, with even more appearing regularly, and it's not possible to provide support for them all in the main Slackware tree. The Hummingboard, by Solidrun, is supported outside of the official Slackware tree by the Slackware community.
howtos, hardware, arm, author exaga

Interfacing I2C Devices To Your System
Interfacing I2C Devices To Your System Inter-Integrated Circuit (I²C or more often written as I2C) is a multimaster serial single-ended computer bus invented by the Philips semiconductor division (see the wikipedia article for more information on I2C) and commonly used in many modern electronic devices including
howtos, hardware, arm, author louigi600

Slackware Package naming convention
Slackware Package naming convention * Author: Stuart Winter <mozes at slackware.com> * Date....: 18-Mar-2020 * Version : 1.00 * Purpose : Provide a best practice for naming packages for Slackware ARM. ARM package naming convention Exposition of the package name format:
howtos, arm, author, mozes

nginx on Slackware ARM
nginx on Slackware ARM Nginx in brief Created by Igor Sysoev and first publicly released in 2004, Nginx is a high‑performance, highly scalable, highly available web server, reverse proxy server, and web accelerator (combining the features of an HTTP load balancer, content cache, and more). Nginx offers a highly scalable architecture that is very different from that of Apache (and many other open source and commercial products in the same category). Nginx has a modular, event‑driven, asynchrono…
howtos, slackware, arm, nginx, php, fpm, fastcgi, web, server, goaccess, slackbuild, author exaga

Setting up Slackware ARM 14.0 on the OLinuXino A10S Micro from scratch
Setting up Slackware ARM 14.0 on the OLinuXino A10S Micro from scratch This document can also be found at <http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/> NOTE: The documentation below needs updating. I recommend that you use the link I've just given above as it leads to updated documentation. I'll have the text below updated when time permits.
howtos, hardware, arm, author michael balcos

Qemu Support in Slackware ARM
Qemu Support in Slackware ARM This document describes the process of installing Slackware ARM inside of QEMU. * QEMU is a full system emulator that can emulate a range of real hardware architectures. In this case we will use QEMU to emulate the ARM Ltd.
howtos, hardware, arm, user mralk3

Slackware ARM on the Raspberry Pi 1
Slackware ARM on the Raspberry Pi 1 Since there are so many ARM devices coming on to the market, it is not possible to provide support for them all in the main tree. The Raspberry Pi is supported outside of the official Slackware ARM tree by the Slackware community.
howtos, hardware, arm, author mozes

Slackware ARM on the Raspberry Pi 2
Slackware ARM on the Raspberry Pi 2 The Raspberry Pi 2 has a quad-core ARMv7 (Cortex-A7) 900MHz CPU and 1GB 450MHz LPDDR2 SDRAM. This revised and upgraded ARM single board computer supplants it's predecessor, the Raspberry Pi (1), and is considerably more powerful. Which is great for running Slackware ARM because every thing happens so much quicker and running/executing/compiling times are slashed dramatically in comparison.
howtos, hardware, arm, author exaga

Slackware ARM on the Raspberry Pi 3
Slackware ARM on the Raspberry Pi 3 The Raspberry Pi 3 has a Broadcom BCM2837 SoC incorporating a Quad-core ARMv8 Cortex-A53 [64 bit] CPU @ 1.2GHz and VideoCore IV GPU @ 400MHz, and comes with 1GB LPDDR2 SDRAM @ 900MHz. This revised and upgraded ARM single board computer succeeds the
howtos, hardware, arm, author exaga

Slackware Network Install on Raspberry Pi 3
Slackware Network Install on Raspberry Pi 3 Introduction This is an abridged version of the SARPi (<http://sarpi.co.uk/>) installation guide dealing with the 'headless' install case for installing Slackware 14.2. There is nothing wrong with the original guide, it is very
howtos, rpi, raspberry, arm, author bifferos

Wireless Access Point With a Raspberry Pi 3
Wireless Access Point With a Raspberry Pi 3 Introduction This HOWTO shows you how to replace the WiFi element of your home network setup with a Raspberry Pi running Slackware. Other HOWTOs explain how to setup DHCP and so on for your wireless devices, but this tries to keep things really simple and just give you an ethernet
howtos, ethernet, wifi, wap, raspberry, arm, author bifferos

Slackware ARM on a Raspberry Pi 4
Slackware ARM on a Raspberry Pi 4 The Raspberry Pi 4 was released on 24 June 2019. The device features a Broadcom BCM2711B0 SoC incorporating a Quad-core ARMv8 Cortex-A72 [64 bit] CPU @ 1.5GHz, VideoCore VI GPU @ 500MHz, and comes in three different variations with 1GB, 2GB, or 4GB LPDDR4 SDRAM @ 2400MHz installed. This revised and upgraded ARM single-board computer succeeds the
howtos, hardware, arm, author exaga

Slackware ARM local mirror repository - SAREPO
Slackware ARM local mirror repository - SAREPO It is acknowledged that there are more complete and distinguished Slackware repository solutions readily available. Such as, alienBOB's gen_repos_files.sh and mirror-slackware-current.sh scripts, and Dave Spencer's slackrepo. These are renowned, highly automated, tools for managing Slackware package repositories and mirrors.
howtos, slackware, arm, local, mirror, respository, cron, logrotate, httpd, slackpkg, author exaga

Making it easy for u-boot to find uImage and uinitrd
Making it easy for u-boot to find uImage and uinitrd I often fiddle with testing root images, kernels and initrd on my kirkwood based systems by using usb flash sticks. I found that although Jeff did a brilliant job on uboot, at the time I started fiddling with custom boot images on my dosckstar, his default environment was unable to directly boot all my testing images that were rapidly changing in layout. To work around this I started making canges to his environment.
howtos, arm, author, louigi600

Getting Slackware ARM on the Toshiba AC100 (also know as the Dynabook AZ)
Getting Slackware ARM on the Toshiba AC100 (also know as the Dynabook AZ) When all this started off I was using ARMedslack 13.37 but as of version 14 the official Slackware ARM port changed name to Slackware ARM. Any reference to ARMedslack in this short tutorial refers to the
howtos, hardware, arm, author louigi600

Zram in Slackware ARM and ARM64 Architectures
Zram in Slackware ARM and ARM64 Architectures The Slackware ARM and ARM64 architectures bring us Slackers the possibility of using much more powerful single board computer hardware and Slackware as a native operating system. Currently this includes existing hardware for ARM, and ARM64 hardware such as the RockPro64 and the Pinebook Pro for ARM64. In addition, the zram kernel module can be applied to optimize the performance of many single board computers, some with existing support in Slackwa…
howtos, arm, arm64, zram, kernel, memory, swap, user mralk3

howtos, topic page2

Slackware Network Install on Raspberry Pi 3

Introduction

This is an abridged version of the SARPi (http://sarpi.co.uk/[3630]) installation guide dealing with the 'headless' install case for installing Slackware 14.2. There is nothing wrong with the original guide, it is very complete, but it will be somewhat wordy for people with prior Slackware installation experience, includes many screenshots familiar to users of Slackware and I found myself wanting to see just the differences between Intel and RPi install instead of the whole shebang.

Requirements

uSD card at least 16GB in size

Card reader for your PC

The RPi 3 itself

A power supply for the Pi

Ethernet cable

SD card preparation

(On your desktop machine) Assuming your SD device is /dev/sdc

# wget http://sarpi.co.uk/files/rpi3/142/img/sarpi3-installer_slack14.2_20Jul18_sp1.img.xz
# xz -dc sarpi3-installer_slack14.2_20Jul18_sp1.img.xz | dd of=/dev/sdc bs=65536
# mount /dev/sdc1 /mnt/hd
# vim /mnt/hd/cmndline.txt

Add the following text to the end of the line with the boot parameters:

kbd=us nic=auto:eth0:dhcp

Booting the installer

Put the uSD card back in the Pi, and boot it. It will boot into a ramdisk which is running the installer. Boot the Pi while running tcpdump on your desktop to figure out what IP address it takes, you will see a line printed like this:

16:27:19.173035 IP 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from b8:27:eb:fe:b8:53 (oui Unknown), length 361
16:27:19.401973 ARP, Request who-has 172.17.0.71 tell 172.17.0.71, length 46

In this case the IP address of the Pi is 172.17.0.71.

ssh into the Pi as root:

# ssh root@172.17.0.71

Press <enter> for password.

Set the date:

# ntpdate 0.pool.ntp.org

Set the terminal to something that will allow the dialog program to work properly if you don't want setup screens to look like garbage:

# export TERM=vt320

Using fdisk (or your favourite Slackware partition editor), update the partition table on the /dev/mmcblk0 device to reflect how you want your system.

# fdisk /dev/mmcblk0

The dd command when preparing the uSD will have already given you a 'boot' partition (/dev/mmcblk0p1), leave that alone and only add partitions to leave something like this:

Device         Boot   Start       End   Sectors   Size Id Type
/dev/mmcblk0p1 *         32    205055    205024 100.1M  c W95 FAT32 (LBA)
/dev/mmcblk0p2       206848   2303999   2097152     1G 82 Linux swap
/dev/mmcblk0p3      2304000 124735487 122431488  58.4G 83 Linux

Swap is of course optional.

Running setup

Setup is now much the same as for Intel. Remap keyboard, format partitions etc.. There will be a warning about the lack of RTC when choosing EXT4 FS, just do as it suggests.

Choose HTTP install, and set the location as:

http://ftp.arm.slackware.com

Set the source directory as:

/slackwarearm/slackwarearm-14.2

The source directory is the one that contains PACKAGES.TXT.

Run the install as normal.

Booting from the Linux partition

You've now installed the necessary packages, but your system will still boot the installer ramdisk image from the FAT partition until you change some things.

If you didn't during setup make the partition /dev/mmcblk0p1 visible to your Linux system just mount it now, e.g.:

# mount /dev/mmcblk0p1 /mnt/boot

To free up some space, remove the ramdisk image:

# rm /mnt/boot/initrd.gz

Now, assuming your rootfs is mounted at /mnt, and boot partion at /mnt/boot install extra packages:

# ROOT=/mnt installpkg /rpi-extra/kernel* /rpi-extra/sarpi*

Final configuration

You can also, during setup or at a later stage make the following change if no RTC has been installed:

edit /etc/ntpd.conf and comment-in these lines:

server 0.pool.ntp.org iburst
server 1.pool.ntp.org iburst
server 2.pool.ntp.org iburst
server 3.pool.ntp.org iburst

# chmod 755 /etc/rc.d/rc.ntpd
# /etc/rc.d/rc.ntpd start

Note that the RPi ssh identity has now changed from the one used for the installer, so when you ssh to your newly installed Slackware box you will have to remove the entry from .ssh/known_hosts on your ssh client.

Sources

Much information taken from the SARPi website[3631]

Page written by User bifferos[3632]

howtos, RPi, raspberry, arm, author bifferos

Setting up Slackware ARM 14.0 on the OLinuXino A10S Micro from scratch

This document can also be found at http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/[3633]

NOTE: The documentation below needs updating. I recommend that you use the link I've just given above as it leads to updated documentation. I'll have the text below updated when time permits.

Setup of development environment

Create a VirtualBox VM for Debian 7.2.0 i386. I allocated 1024MB of RAM to it. As for the virtual hard drive space, I allocated 8GB. I also recommend that you disable audio support for the VM.

Download the Net Install ISO image for Debian 7.2.0 i386. Boot the mentioned ISO in the VirtualBox VM you've created. I used the “Install” option in the installer boot menu.

This set of instructions will work with everything deselected under “Software selection.” You may select software to your taste during installation.

After the installation, the guest OS will automatically get an IP Address via DHCP.

As root in your guest OS:

# apt-get update
# apt-get upgrade

Install OpenSSH client and server software as root in your guest OS if this will make file transfers and access to your development environment convenient for you:

# apt-get install openssh-client openssh-server

As root in your guest OS:

# apt-get install ncurses-dev uboot-mkimage build-essential git
# cd ~
# wget https://launchpad.net/linaro-toolchain-binaries/trunk/2013.01/+download/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux.tar.bz2
# tar xjfv gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux.tar.bz2

Add toolchain directory to $PATH in your guest OS(You may want to add this to /etc/profile . Appending it will do.):

export PATH=/root/gcc-linaro-arm-linux-gnueabihf-4.7-2013.01-20130125_linux/bin:$PATH

Restart your guest OS as root:

# shutdown -r now

Compiling the kernel (Copied from http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/ and http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/ with some modifications)

In the development environment you've made above, login as root. Then get the kernel source code:

# cd ~
# git clone https://github.com/linux-sunxi/linux-sunxi

Note that I'm using the revision below:

# cd ~/linux-sunxi/
# git rev-parse --verify HEAD
9ee9fc5f0988df5677f0f142b5b88a8988d283d7

So, to checkout the mentioned revision:

# cd ~/linux-sunxi/
# git checkout 9ee9fc5f0988df5677f0f142b5b88a8988d283d7

Do a “make clean”:

# cd ~/linux-sunxi
# make clean

Download a10s_defconfig:

# cd ~/linux-sunxi
# wget http://www.malaya-digital.org/a10s_defconfig

Move this file to ~/linux-sunxi/arch/arm/configs/ . These are to be done in your development environment as root:

# mv a10s_defconfig ~/linux-sunxi/arch/arm/configs/

Execute the following under the linux-sunxi directory in your development environment as root:

# cd ~/linux-sunxi/
# make ARCH=arm a10s_defconfig

Configure the kernel in your development environment as root:

# make ARCH=arm menuconfig

HINT: If you're having problems with Logitech wireless keyboards and mice, don't build the following (for Linux 3.4.61):

Device Drivers→HID Devices→Special HID drivers→< > Logitech Unifying receivers full support

HINT: To verify OTG is enabled(for Linux 3.4.61):

Under Kernel Configuration, this must be built in the kernel:

Device Drivers→USB support→[*] SUNXI USB2.0 Dual Role Controller Support

Also, this must be built in the kernel, too:

Device Drivers→USB support→SUNXI USB2.0 Dual Role Controller Support→[*] SUNXI USB2.0 Manager

And make sure of the following:

Device Drivers→USB support→SUNXI USB2.0 Dual Role Controller Support→SUNXI USB2.0 Manager→USB0 Controller support (otg support)→(X) otg support

HINT: To verify Ethernet is enabled(for Linux 3.4.61):

Under Kernel Configuration, this must be built in the kernel:

Device Drivers→Network device support→Ethernet driver support→<*> Allwinner Ethernet MAC support

Note that before compiling kernel, you have to patch it:

Download the patch hcd_axp-md.patch from http://www.malaya-digital.org/hcd_axp-md.patch[3634] :

# cd ~/linux-sunxi/
# wget http://www.malaya-digital.org/hcd_axp-md.patch

Copy files:

# cp drivers/usb/sunxi_usb/hcd/hcd0/sw_hcd0.c drivers/usb/sunxi_usb/hcd/hcd0/sw_hcd0a.c
# cp drivers/usb/sunxi_usb/hcd/hcd0/sw_hcd0.c drivers/usb/sunxi_usb/hcd/hcd0/sw_hcd0b.c

Apply the patch:

# patch -p0 < hcd_axp-md.patch

Copy a file again:

# cp drivers/usb/sunxi_usb/hcd/hcd0/sw_hcd0a.c drivers/usb/sunxi_usb/hcd/hcd0/sw_hcd0.c

Edit ~/linux-sunxi/arch/arm/plat-sunxi/include/plat/i2c.h . Find “I2C0_TRANSFER_SPEED”. Define “100000” for I2C1_TRANSFER_SPEED and up. These are to be done in your development environment as root. For example, the desired edit is:

#define I2C0_TRANSFER_SPEED (400000)
#define I2C1_TRANSFER_SPEED (100000)
#define I2C2_TRANSFER_SPEED (100000)
#define I2C3_TRANSFER_SPEED (100000)
#define I2C4_TRANSFER_SPEED (100000)

You can now compile the kernel and its modules in your development environment as root.

# cd ~/linux-sunxi/
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 uImage
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=out modules
# make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j4 INSTALL_MOD_PATH=out modules_install

In your development environment, your kernel will be “~/linux-sunxi/arch/arm/boot/uImage”. And your modules will be found at “~/linux-sunxi/out/lib/modules/3.x.xx” where 3.x.xx is kernel version (eg: “3.4.61+”).

Compiling Uboot (Copied from http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/ and http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/ with some modifications)

Note: The Allwinner Linux-Sunxi community uboot is maintained by Henrik Nordstrom aka hno on Freenode irc. You can find him in #linux-sunxi or #olimex channels. If something with uboot is broken, he is your man.

Download the uboot sources from GitHub repository.

# cd ~
# git clone https://github.com/linux-sunxi/u-boot-sunxi

After the download, you should have a new directory.

# cd ~/u-boot-sunxi/

Note that I'm using the revision below:

root@debian:~/u-boot-sunxi# git rev-parse --verify HEAD
8a4621c488f33089d831168bfa5bae210a5684c8

Edit ~/u-boot-sunxi/include/configs/sunxi-common.h . Look for the following:

        "setargs=" \
"if test -z \\\\\"$root\\\\\"; then"\
" if test \\\\\"$bootpath\\\\\" = \"/boot/\"; then"\
" root=\"/dev/mmcblk0p1 rootwait\";"\
" else" \
" root=\"/dev/mmcblk0p2 rootwait\";"\
" fi;"\
" fi;"\

Change “ root=\”/dev/mmcblk0p2 rootwait\“;”\“ to the following:

” root=\“/dev/mmcblk0p2 ro rootwait\”;“\

With the following command, you can start the uboot build:

# cd ~/u-boot-sunxi/
# make distclean CROSS_COMPILE=arm-linux-gnueabihf-
# make a10s-olinuxino-m CROSS_COMPILE=arm-linux-gnueabihf-

At the end of the process, you can check if everything is OK by:

# ls u-boot-sunxi-with-spl.bin

If you got this file, well done so far.

Format and setup the SD-card (Copied from http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/ and http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/ with some modifications)

We suggest that you use a 4GB class 10 micro SD card. But you can use any micro SD card between 2GB and 16GB.

First, we have to make the correct card partitions. This is done with fdisk.

Plug the micro SD card into your SD card reader. Then, enter in the terminal:

# ls /dev/sd

Then press TAB twice. You will see a list of your sd devices like sda, sdb, sdc, etc. Note that some of these devices may be your hard disk, so make sure you know which one is your micro SD card before you proceed. You can damage your HDD if you choose the wrong sd device. You can do this by unplugging your micro SD card reader, and identify which ?sd? devices was removed from the list.

Once you know which device is your micro SD card, use this text instead of the sdX name in the references below:

# fdisk -u=sectors /dev/sdX

Then do these steps:

This will list your partitions:

p

If there are already partitions on your card, do:

d 1

If you have more than one partitition, delete them all.

Create the first partition. It should start from 2048 and end at 34815:

n p 1

Create the second partition:

n p 2 enter enter

List the created partitions:

p

If you did everything correctly on a 4GB card, you should see something like:

Disk /dev/sdX: 3980 MB, 3980394496 bytes
123 heads, 62 sectors/track, 1019 cylinders, total 7774208 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdg1 2048 34815 16384 83 Linux
/dev/sdg2 34816 7774207 3869696 83 Linux

Write changes to the micro SD card.

w

Now, we have to format the file system on the card:

The first partition should be vfat as this is the FS which the Allwinner bootloader understands.

# mkfs.vfat /dev/sdX1

The second partition should be a normal Linux EXT4 FS:

# mkfs.ext4 /dev/sdX2

Installing the kernel, Slackware ARM 14.0 mini root filesystem, and kernel modules

Proceed to copy the ”~/linux-sunxi/arch/arm/boot/uImage“ kernel you've compiled in the development environment into the first filesystem of the micro SD card.

Mount the first partition:

# mkdir /mnt/olinuxino0
# mount /dev/sdX1 /mnt/olinuxino0 # Substitute the appropriate value for X in /dev/sdX1

Then copy the kernel uImage to the first filesystem of the micro SD card.

# cp uImage /mnt/olinuxino0 # Get the uImage file from the environment you've compiled the kernel.

Copy the script.bin file in /mnt/olinuxino0 . The mentioned file can be found here: https://drive.google.com/file/d/0B-bAEPML8fwlYkItdU1TTm1VN0E/edit?usp=sharing[3635]

Or iff you need to compile your own script.bin, you can get the fex files here in a scripts_A10s.7z archive: https://drive.google.com/file/d/0B-bAEPML8fwlY3llVDJxelY3d28/edit?usp=sharing[3636]

Unmount /mnt/olinuxino0 :

# umount /mnt/olinuxino0

Mount the second partition:

# mkdir /mnt/olinuxino1
# mount /dev/sdX2 /mnt/olinuxino1 # Substitute the appropriate value for X in /dev/sdX1

Extract the Slackware ARM 14.0 mini root filesystem in /mnt/olinuxino1 . Slackware mini root filesystem can be found here: ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots[3637]

Delete all contents of /mnt/olinuxino1/dev/*

Extract this file in /mnt/olinuxino1/dev : http://www.malaya-digital.org/dev.tar.gz[3638]

Proceed to copy the generated kernel modules (”~/linux-sunxi/out/lib/modules/3.x.xx“ in the development environment where you've compiled the kernel) in the second filesystem of the micro SD card.

If the /mnt/olinuxino1/lib/modules directory does not exist, create it.

# mkdir /mnt/olinuxino1/lib/modules
# cp -rf 3.x.xx+ /mnt/olinuxino1/lib/modules # Get the modules directory from the environment you've compiled the kernel.

Append the following in /mnt/olinuxino1/etc/fstab:

/dev/mmcblk0p2   /               ext4    errors=remount-ro 0       1

Unmount /mnt/olinuxino1 :

# umount /mnt/olinuxino1

Write Uboot (Copied from http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/ and http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/ with some modifications)

Note that you have to write u-boot-sunxi-with-spl.bin in /dev/sdX (not sdX1 or sdX2).

# dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
# sync

NB: When you boot OLinuXino using the micro SD card with Slackware 14.0 for ARM, the "root" user has the password "password" by default.

Sources

Original source: http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/[3639]

Original source: https://github.com/linux-sunxi/u-boot-sunxi/wiki[3640]

Original source: http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/[3641]

Originally written by Michael Balcos[3642]

howtos, hardware, arm, author michael balcos

Slackware ARM on the Raspberry Pi 2

The Raspberry Pi 2 has a quad-core ARMv7 (Cortex-A7) 900MHz CPU and 1GB 450MHz LPDDR2 SDRAM. This revised and upgraded ARM single board computer supplants it's predecessor, the Raspberry Pi (1)[3643], and is considerably more powerful. Which is great for running Slackware ARM because every thing happens so much quicker and running/executing/compiling times are slashed dramatically in comparison.

The Raspberry Pi 2 is supported outside of the official Slackware ARM tree by the Slackware community.

Slackware releases 14.2, -current

Slackware ARM -current or Slackware ARM 14.2 can be installed on the Raspberry Pi 2.

Follow the link(s) in the table below. These are maintained by a separate author as part of the Slackware-on-Raspberry Pi community.

Site | Slackware versions | Using official Slackware packages | Installation methods | Notes
SARPi Project[3644] | 14.2, -current | Yes | Slackware installer | An end-to-end HOW TO tutorial taking you through the installation and setup process.

Manual install method without a Raspbian image

As long you use the most recent release of firmware [i.e. post-June 2019] and the latest Raspbian Buster image the Raspberry Pi 1 manual install method[3645] also works for the Pi 2.

This method is for installing Slackware ARM 14.2 on a Raspberry Pi 2 model B without a Raspbian image. However, it should work for other Slackware ARM and Raspberry Pi versions.

1. Partition and format the SD Card

$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048       67583       32768    b  W95 FAT32
/dev/mmcblk0p2           67584    62333951    31133184   83  Linux
$ sudo mkfs.vfat /dev/mmcblk0p1
$ sudo mkfs.ext4 /dev/mmcblk0p2

Remarks:

I use a 32GB SD Card

I choose 32MB for the size of the first partition

I let the empty space left for the second partition

2. Put the Raspberry Pi firmware in the SD Card

$ git clone https://github.com/raspberrypi/firmware.git
$ sudo mount /dev/mmcblk0p1 ~/mnt
$ sudo cp -r firmware/boot/* ~/mnt
$ sudo umount ~/mnt
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo mkdir -p ~/mnt/lib/modules
$ sudo cp -r firmware/modules/* ~/mnt/lib/modules
$ sudo umount ~/mnt

3. Put the Slackware ARM mini root file system in the SD Card

$ wget -c ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots/slack-14.2-miniroot_01Jul16.tar.xz
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo tar -C ~/mnt -xf slack-14.2-miniroot_01Jul16.tar.xz
$ echo "/dev/mmcblk0p1 /boot vfat defaults 0 0" | sudo tee ~/mnt/etc/fstab
$ echo "/dev/mmcblk0p2 /     ext4 defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ echo "proc           /proc proc defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ PASSWD=$(openssl passwd -1 -salt cetkq/enZx6/c2 password)
$ sudo sed -i "s|\(root:\).*\(:16983:0:::::\)|\1${PASSWD}\2|" ~/mnt/etc/shadow
$ sudo sed -i 's|USE_DHCP\[1\]=""|USE_DHCP\[1\]="yes"|' ~/mnt/etc/rc.d/rc.inet1.conf
$ echo "PermitRootLogin yes" | sudo tee -a ~/mnt/etc/ssh/sshd_config
$ sudo umount ~/mnt

Remarks:

I set “password” as password for the “root” user

I set DHCP on the “eth1” network interface

I allow the “root” user to connect through SSH

4. Insert the SD Card in the Raspberry Pi

Your SD Card is ready so you can insert it in the Raspberry Pi and boot.

You can connect remotely to your Raspberry Pi as “root” through SSH.

$ ssh root@raspberrypi

As soon as you are logged, you might want to install additional Slackware ARM packages:

$ wget --mirror ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2
$ upgradepkg --install-new ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/*.txz
$ removepkg ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/kernel_*.txz

Remarks:

I consider that the Raspberry Pi hostname is “raspberrypi”

I recommend to add a normal user and use this user instead of “root”

I recommend to change the “root” user password

I recommend to disallow the “root” user to connect through SSH

I recommend to build your own Linux kernel[3646] packages because the kernel you are running does not match with the installed Slackware ARM packages

5. Tips and tricks

5.1. Processor

The Raspberry Pi processor can reach 1.2GHz. However, by default, it is stuck to 600MHz even if it is used at 100%. You can check the current frequency of the processor by typing:

$ cpufreq-info

In order to reach 1.2GHz when the processor is used at 100% (i.e., use the frequency scaling), you need to change the default governors. Add the following line to the end of the /etc/rc.d/rc.local file:

echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Now, the processor is correctly set.

5.2. Time

Unfortunately, the Raspberry Pi does not provide a Real-Time Clock (RTC). That is why there is no battery included with the board. It means that each time you shutdown the Raspberry Pi, the time is reset! However, if you have internet access, you can update the time during the Slackware ARM boot. Add the following line to the end of the /etc/rc.d/rc.local file:

ntpdate pool.ntp.org

Now, the time is correctly set.

5.3. Video

Unfortunately, the Raspberry Pi is not compatible with OpenGL (it is compatible OpenGL ES that is a subset of OpenGL). It means that, by default, each application requiring OpenGL will be slow. However, you can reach 60 FPS with OpenGL applications on the Raspberry Pi by using the correct driver.

Firstly, you need to build Mesa (>= 17.0.4) with the VC4 DRI driver:

$ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
CXXFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-egl-platforms=x11,drm \
--with-gallium-drivers=vc4
$ make -j4
$ make install DESTDIR=/where/you/want/to/install

Then build your own Slackware ARM Mesa package and install it.

Secondly, add the following line to the end of the /boot/config.txt file:

dtoverlay=vc4-fkms-v3d

Then reboot the Raspberry Pi.

You can check that you are able to get 60 FPS with OpenGL applications on the Raspberry Pi by typing the following command in an X terminal:

$ glxgears

Now, the video is correctly set.

Sources

Originally written by Exaga[3647]

Contributions by yugiohjcj[3648]

howtos, hardware, arm, author exaga

Slackware ARM on a Raspberry Pi 4

The Raspberry Pi 4 was released on 24 June 2019. The device features a Broadcom BCM2711B0 SoC incorporating a Quad-core ARMv8 Cortex-A72 [64 bit] CPU @ 1.5GHz, VideoCore VI GPU @ 500MHz, and comes in three different variations with 1GB, 2GB, or 4GB LPDDR4 SDRAM @ 2400MHz installed. This revised and upgraded ARM single-board computer succeeds the Raspberry Pi (3)[3649], and is approx. 2.5 times faster and certainly more powerful. Wi-Fi and Bluetooth are included on-board. It has true Gigabit Ethernet that has a dedicated controller, which is not shared with the USB bus any more. The device also features 2x USB 3.0 and 2x USB 2.0 ports. Still no RTC though. Slackware ARM runs flawlessly on this device, as you would expect. The desktop is so much faster and responsive. Compile times are halved compared to the RPi3.

The Raspberry Pi is supported outside of the official Slackware ARM tree by the Slackware community.

Slackware releases 14.2, -current

Slackware ARM can be installed on the Raspberry Pi 4.

Follow the link(s) in the table below. These are maintained by a separate author as part of the Slackware-on-Raspberry Pi community.

Site | Slackware versions | Using official Slackware packages | Installation methods | Notes
SARPi Project[3650] | 14.2,-current | Yes | Slackware installer | An end-to-end HOW TO tutorial taking you through the installation and setup process.

AArch64 ARM64 [Experimental], Slackware ARM -current

Experimental, development, and prototype, Slackware AArch64 ARM64 link(s).

Site | Slackware versions | Using official Slackware packages | Installation methods | Notes
SARPi64 Project[3651] | -current | Yes | Slackware installer | A development project for Slackware ARM running AArch64 [ARMv8] kernel and modules. Experimental in nature and purpose.

Manual install method without a Raspbian image

As long you use the most recent release of firmware [i.e. post-June 2019] and the latest Raspbian Buster image the Raspberry Pi 1 manual install method[3652] also works for the Pi 4.

This method is for installing Slackware ARM 14.2 on a Raspberry Pi 4 Model B without a Raspbian image. However, it should work for other Slackware ARM and Raspberry Pi versions.

1. Partition and format the SD Card

$ sudo fdisk -l /dev/mmcblk0
Disk /dev/mmcblk0: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders, total 62333952 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1            2048       67583       32768    b  W95 FAT32
/dev/mmcblk0p2           67584    62333951    31133184   83  Linux
$ sudo mkfs.vfat /dev/mmcblk0p1
$ sudo mkfs.ext4 /dev/mmcblk0p2

Remarks:

I use a 32GB SD Card

I choose 32MB for the size of the first partition

I let the empty space left for the second partition

2. Put the Raspberry Pi firmware in the SD Card

$ git clone https://github.com/raspberrypi/firmware.git
$ sudo mount /dev/mmcblk0p1 ~/mnt
$ sudo cp -r firmware/boot/* ~/mnt
$ sudo umount ~/mnt
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo mkdir -p ~/mnt/lib/modules
$ sudo cp -r firmware/modules/* ~/mnt/lib/modules
$ sudo umount ~/mnt

3. Put the Slackware ARM mini root file system in the SD Card

$ wget -c ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-devtools/minirootfs/roots/slack-14.2-miniroot_01Jul16.tar.xz
$ sudo mount /dev/mmcblk0p2 ~/mnt
$ sudo tar -C ~/mnt -xf slack-14.2-miniroot_01Jul16.tar.xz
$ echo "/dev/mmcblk0p1 /boot vfat defaults 0 0" | sudo tee ~/mnt/etc/fstab
$ echo "/dev/mmcblk0p2 /     ext4 defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ echo "proc           /proc proc defaults 0 0" | sudo tee -a ~/mnt/etc/fstab
$ PASSWD=$(openssl passwd -1 -salt cetkq/enZx6/c2 password)
$ sudo sed -i "s|\(root:\).*\(:16983:0:::::\)|\1${PASSWD}\2|" ~/mnt/etc/shadow
$ sudo sed -i 's|USE_DHCP\[1\]=""|USE_DHCP\[1\]="yes"|' ~/mnt/etc/rc.d/rc.inet1.conf
$ echo "PermitRootLogin yes" | sudo tee -a ~/mnt/etc/ssh/sshd_config
$ sudo umount ~/mnt

Remarks:

I set “password” as password for the “root” user

I set DHCP on the “eth1” network interface

I allow the “root” user to connect through SSH

4. Insert the SD Card in the Raspberry Pi

Your SD Card is ready so you can insert it in the Raspberry Pi and boot.

You can connect remotely to your Raspberry Pi as “root” through SSH.

$ ssh root@raspberrypi

As soon as you are logged, you might want to install additional Slackware ARM packages:

$ wget --mirror ftp://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2
$ upgradepkg --install-new ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/*.txz
$ removepkg ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/slackware/*/kernel_*.txz

Remarks:

I consider that the Raspberry Pi hostname is “raspberrypi”

I recommend to add a normal user and use this user instead of “root”

I recommend to change the “root” user password

I recommend to disallow the “root” user to connect through SSH

I recommend to build your own Linux kernel[3653] packages because the kernel you are running does not match with the installed Slackware ARM packages

5. Tips and tricks

5.1. Processor

The Raspberry Pi processor can reach 1.2GHz. However, by default, it is stuck to 600MHz even if it is used at 100%. You can check the current frequency of the processor by typing:

$ cpufreq-info

In order to reach 1.2GHz when the processor is used at 100% (i.e., use the frequency scaling), you need to change the default governors. Add the following line to the end of the /etc/rc.d/rc.local file:

echo ondemand | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

Now, the processor is correctly set.

5.2. Time

Unfortunately, the Raspberry Pi does not provide a Real-Time Clock (RTC). That is why there is no battery included with the board. It means that each time you shutdown the Raspberry Pi, the time is reset! However, if you have internet access, you can update the time during the Slackware ARM boot. Add the following line to the end of the /etc/rc.d/rc.local file:

ntpdate pool.ntp.org

Now, the time is correctly set.

5.3. Video

Unfortunately, the Raspberry Pi is not compatible with OpenGL (it is compatible OpenGL ES that is a subset of OpenGL). It means that, by default, each application requiring OpenGL will be slow. However, you can reach 60 FPS with OpenGL applications on the Raspberry Pi by using the correct driver.

Firstly, you need to build Mesa (>= 17.0.4) with the VC4 DRI driver:

$ CFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
CXXFLAGS="-O2 -march=armv8-a -mtune=cortex-a53 -mfloat-abi=softfp -mfpu=neon-vfpv4" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-dri-driverdir=/usr/lib/xorg/modules/dri \
--with-egl-platforms=x11,drm \
--with-gallium-drivers=vc4
$ make -j4
$ make install DESTDIR=/where/you/want/to/install

Then build your own Slackware ARM Mesa package and install it.

Secondly, add the following line to the end of the /boot/config.txt file:

dtoverlay=vc4-fkms-v3d

Then reboot the Raspberry Pi.

You can check that you are able to get 60 FPS with OpenGL applications on the Raspberry Pi by typing the following command in an X terminal:

$ glxgears

Now, the video is correctly set.

Sources

Originally written by Exaga[3654]

Contributions by yugiohjcj[3655]

howtos, hardware, arm, author exaga

Slackware ARM 14.2

Slackware ARM has commonly been referred to as the “soft float port”. This is only important in so much as one is unable to perform an in-place upgrade from 14.2 to any newer release of Slackware due to: * The ABI is incompatible with all newer releases. In simple terms, this means that you cannot use packages from 14.2 on anything newer, and vice versa. * Support for the older armv5-only (such as “Plug” devices) hardware end with 14.2, as these cannot be supported by newer versions of Slackware, due to the change in ABI (the ARMv5 hardware does not have a hardware floating point processor).

The Soft Float port goes back to Slackware v11.0, but the “Officially supported” versions listed below are the versions currently maintained (receiving updates/patches).

Note: Slackware ARM 14.2 will cease to be maintained following the release of 15.0. As of November 2018, we have no end of support date.

Officially Supported Hardware

Type of Supported | Hardware model | ARM CPU type | Slackware version
Official | Trimslice | armv7/Tegra20 | 14.2[3656]
Official | Plug Computers | armv5/Kirkwood | 14.2[3657]
Official | ARM Versatile (emulated via QEMU) | armv5 | 14.2[3658]
Official | Banana Pi | armv7/Cortex-A7 | 14.2[3659]

Community Supported Hardware

Type of Supported | Hardware model | ARM CPU type | Slackware version
Community | Raspberry Pi 1 | armv6 | 14.2[3660]
Community | Raspberry Pi 2 | armv7/Cortex-A7 | 14.2,-current[3661]
Community | Raspberry Pi 3 | armv8/Cortex-A53 | 14.2,-current[3662]
Community | Toshiba AC100 | armv7/Tegra2 | 13.37 14.0 14.1[3663]
Community | Open Pandora | armv7/Cortex-A8 | 13.37, 14.0, 14.1[3664]
Community | OLinuXino A10 Lime | armv7/A10 | 14.1[3665]
Community | OLinuXino A10S Micro | armv7/A10S | 14.0[3666]
Community | XZPAD700 (works on most Axx-based boards) | armv7/Axx | 14.0 14.1[3667]
Community | OLinuXino iMX233 | armv5/iMX233 | 14.1[3668]

If you're looking to get SlaXBMC on your ARM device you could start reading here[3669].

Inspired? Want to write an ARM Hardware HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Kernel configuration for the Ac100

This is the .config I used to compile my custom kernel for the AC100. Sources are the patched sources I got from Launchpad[3670]. These derived from the linux 2.6.38 sources on kernel.org and patched with the specific stuff for AC100 that has not yet made it to mainstream kernel.

#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38.3 Kernel Configuration
# Tue Oct 11 14:28:23 2011
#
CONFIG_ARM=y
CONFIG_HAVE_PWM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
CONFIG_HAVE_SCHED_CLOCK=y
CONFIG_GENERIC_GPIO=y
# CONFIG_ARCH_USES_GETTIMEOFFSET is not set
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_HAVE_PROC_CPU=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_HARDIRQS_SW_RESEND=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_LOCKBREAK=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CPUFREQ=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_FIQ=y
CONFIG_ARCH_PROVIDES_UDELAY=y
CONFIG_VECTORS_BASE=0xffff0000
CONFIG_GENERIC_BUG=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
CONFIG_HAVE_IRQ_WORK=y
CONFIG_IRQ_WORK=y
#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_LOCK_KERNEL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_LZO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_TASKSTATS is not set
CONFIG_AUDIT=y
CONFIG_HAVE_GENERIC_HARDIRQS=y
#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
# CONFIG_GENERIC_HARDIRQS_NO_DEPRECATED is not set
CONFIG_HAVE_SPARSE_IRQ=y
# CONFIG_GENERIC_PENDING_IRQ is not set
# CONFIG_AUTO_IRQ_AFFINITY is not set
# CONFIG_IRQ_PER_CPU is not set
# CONFIG_SPARSE_IRQ is not set
#
# RCU Subsystem
#
CONFIG_TREE_PREEMPT_RCU=y
CONFIG_PREEMPT_RCU=y
# CONFIG_RCU_TRACE is not set
CONFIG_RCU_FANOUT=32
# CONFIG_RCU_FANOUT_EXACT is not set
# CONFIG_TREE_RCU_TRACE is not set
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=17
# CONFIG_CGROUPS is not set
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
# CONFIG_USER_NS is not set
CONFIG_PID_NS=y
CONFIG_NET_NS=y
# CONFIG_SCHED_AUTOGROUP is not set
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
# CONFIG_RD_XZ is not set
CONFIG_RD_LZO=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
CONFIG_EXPERT=y
CONFIG_EMBEDDED=y
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
# CONFIG_ELF_CORE is not set
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_EVENTS=y
CONFIG_PERF_USE_VMALLOC=y
#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_PERF_COUNTERS is not set
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not set
CONFIG_SLUB=y
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not set
CONFIG_TRACEPOINTS=y
CONFIG_HAVE_OPROFILE=y
# CONFIG_KPROBES is not set
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_CLK=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
# CONFIG_MODULE_FORCE_LOAD is not set
CONFIG_MODULE_UNLOAD=y
# CONFIG_MODULE_FORCE_UNLOAD is not set
# CONFIG_MODVERSIONS is not set
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
CONFIG_BLK_DEV_BSG=y
# CONFIG_BLK_DEV_INTEGRITY is not set
#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK is not set
# CONFIG_INLINE_SPIN_LOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
# CONFIG_INLINE_SPIN_UNLOCK is not set
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_READ_TRYLOCK is not set
# CONFIG_INLINE_READ_LOCK is not set
# CONFIG_INLINE_READ_LOCK_BH is not set
# CONFIG_INLINE_READ_LOCK_IRQ is not set
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
# CONFIG_INLINE_READ_UNLOCK is not set
# CONFIG_INLINE_READ_UNLOCK_BH is not set
# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_WRITE_TRYLOCK is not set
# CONFIG_INLINE_WRITE_LOCK is not set
# CONFIG_INLINE_WRITE_LOCK_BH is not set
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
# CONFIG_INLINE_WRITE_UNLOCK is not set
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
CONFIG_MUTEX_SPIN_ON_OWNER=y
# CONFIG_BOOTSTAGE is not set
CONFIG_FREEZER=y
#
# System Type
#
CONFIG_MMU=y
# CONFIG_ARCH_AAEC2000 is not set
# CONFIG_ARCH_INTEGRATOR is not set
# CONFIG_ARCH_REALVIEW is not set
# CONFIG_ARCH_VERSATILE is not set
# CONFIG_ARCH_VEXPRESS is not set
# CONFIG_ARCH_AT91 is not set
# CONFIG_ARCH_BCMRING is not set
# CONFIG_ARCH_CLPS711X is not set
# CONFIG_ARCH_CNS3XXX is not set
# CONFIG_ARCH_GEMINI is not set
# CONFIG_ARCH_EBSA110 is not set
# CONFIG_ARCH_EP93XX is not set
# CONFIG_ARCH_FOOTBRIDGE is not set
# CONFIG_ARCH_MXC is not set
# CONFIG_ARCH_MXS is not set
# CONFIG_ARCH_STMP3XXX is not set
# CONFIG_ARCH_NETX is not set
# CONFIG_ARCH_H720X is not set
# CONFIG_ARCH_IOP13XX is not set
# CONFIG_ARCH_IOP32X is not set
# CONFIG_ARCH_IOP33X is not set
# CONFIG_ARCH_IXP23XX is not set
# CONFIG_ARCH_IXP2000 is not set
# CONFIG_ARCH_IXP4XX is not set
# CONFIG_ARCH_DOVE is not set
# CONFIG_ARCH_KIRKWOOD is not set
# CONFIG_ARCH_LOKI is not set
# CONFIG_ARCH_LPC32XX is not set
# CONFIG_ARCH_MV78XX0 is not set
# CONFIG_ARCH_ORION5X is not set
# CONFIG_ARCH_MMP is not set
# CONFIG_ARCH_KS8695 is not set
# CONFIG_ARCH_NS9XXX is not set
# CONFIG_ARCH_W90X900 is not set
# CONFIG_ARCH_NUC93X is not set
CONFIG_ARCH_TEGRA=y
# CONFIG_ARCH_PNX4008 is not set
# CONFIG_ARCH_PXA is not set
# CONFIG_ARCH_MSM is not set
# CONFIG_ARCH_SHMOBILE is not set
# CONFIG_ARCH_RPC is not set
# CONFIG_ARCH_SA1100 is not set
# CONFIG_ARCH_S3C2410 is not set
# CONFIG_ARCH_S3C64XX is not set
# CONFIG_ARCH_S5P64X0 is not set
# CONFIG_ARCH_S5P6442 is not set
# CONFIG_ARCH_S5PC100 is not set
# CONFIG_ARCH_S5PV210 is not set
# CONFIG_ARCH_S5PV310 is not set
# CONFIG_ARCH_SHARK is not set
# CONFIG_ARCH_TCC_926 is not set
# CONFIG_ARCH_LH7A40X is not set
# CONFIG_ARCH_U300 is not set
# CONFIG_ARCH_U8500 is not set
# CONFIG_ARCH_NOMADIK is not set
# CONFIG_ARCH_DAVINCI is not set
# CONFIG_ARCH_OMAP is not set
# CONFIG_PLAT_SPEAR is not set
# CONFIG_GPIO_PCA953X is not set
CONFIG_KEYBOARD_GPIO_POLLED=m
#
# System MMU
#
#
# NVIDIA Tegra options
#
CONFIG_ARCH_TEGRA_2x_SOC=y
CONFIG_TEGRA_PCI=y
#
# Tegra board type
#
# CONFIG_MACH_AEBL is not set
# CONFIG_MACH_ASYMPTOTE is not set
# CONFIG_MACH_HARMONY is not set
# CONFIG_MACH_VENTANA is not set
# CONFIG_MACH_KAEN is not set
CONFIG_MACH_PAZ00=y
# CONFIG_MACH_SEABOARD is not set
# CONFIG_MACH_TEGRA_DT is not set
# CONFIG_MACH_TRIMSLICE is not set
# CONFIG_MACH_WARIO is not set
# CONFIG_MACH_ARTHUR is not set
# CONFIG_TEGRA_DEBUG_UART_NONE is not set
# CONFIG_TEGRA_DEBUG_UARTA is not set
# CONFIG_TEGRA_DEBUG_UARTB is not set
# CONFIG_TEGRA_DEBUG_UARTC is not set
CONFIG_TEGRA_DEBUG_UARTD=y
# CONFIG_TEGRA_DEBUG_UARTE is not set
CONFIG_TEGRA_SYSTEM_DMA=y
CONFIG_TEGRA_EMC_SCALING_ENABLE=y
CONFIG_TEGRA_PWM=y
CONFIG_TEGRA_CPU_DVFS=y
CONFIG_TEGRA_CORE_DVFS=y
CONFIG_TEGRA_IOVMM_GART=y
CONFIG_TEGRA_IOVMM=y
CONFIG_TEGRA_THERMAL_THROTTLE=y
CONFIG_DISABLE_3D_POWERGATING=y
#
# Processor Type
#
CONFIG_CPU_32v6K=y
CONFIG_CPU_V7=y
CONFIG_CPU_32v7=y
CONFIG_CPU_ABRT_EV7=y
CONFIG_CPU_PABRT_V7=y
CONFIG_CPU_CACHE_V7=y
CONFIG_CPU_CACHE_VIPT=y
CONFIG_CPU_COPY_V6=y
CONFIG_CPU_TLB_V7=y
CONFIG_CPU_HAS_ASID=y
CONFIG_CPU_CP15=y
CONFIG_CPU_CP15_MMU=y
#
# Processor Features
#
CONFIG_ARM_THUMB=y
CONFIG_ARM_THUMBEE=y
CONFIG_SWP_EMULATE=y
# CONFIG_CPU_ICACHE_DISABLE is not set
# CONFIG_CPU_DCACHE_DISABLE is not set
# CONFIG_CPU_BPREDICT_DISABLE is not set
CONFIG_OUTER_CACHE=y
CONFIG_OUTER_CACHE_SYNC=y
CONFIG_CACHE_L2X0=y
CONFIG_CACHE_PL310=y
CONFIG_ARM_L1_CACHE_SHIFT=5
CONFIG_ARM_DMA_MEM_BUFFERABLE=y
CONFIG_ARCH_HAS_BARRIERS=y
CONFIG_CPU_HAS_PMU=y
# CONFIG_ARM_ERRATA_430973 is not set
# CONFIG_ARM_ERRATA_458693 is not set
# CONFIG_ARM_ERRATA_460075 is not set
CONFIG_ARM_ERRATA_742230=y
# CONFIG_ARM_ERRATA_742231 is not set
# CONFIG_ARM_ERRATA_720789 is not set
# CONFIG_ARM_ERRATA_743622 is not set
# CONFIG_ARM_ERRATA_751472 is not set
# CONFIG_ARM_ERRATA_753970 is not set
CONFIG_ARM_GIC=y
#
# Bus support
#
CONFIG_PCI=y
CONFIG_PCI_SYSCALL=y
# CONFIG_ARCH_SUPPORTS_MSI is not set
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_STUB is not set
# CONFIG_PCI_IOV is not set
# CONFIG_PCCARD is not set
#
# Kernel Features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
CONFIG_SMP_ON_UP=y
CONFIG_HAVE_ARM_SCU=y
CONFIG_HAVE_ARM_TWD=y
CONFIG_VMSPLIT_3G=y
# CONFIG_VMSPLIT_2G is not set
# CONFIG_VMSPLIT_1G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_NR_CPUS=2
CONFIG_HOTPLUG_CPU=y
CONFIG_LOCAL_TIMERS=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
CONFIG_PREEMPT=y
CONFIG_HZ=100
# CONFIG_THUMB2_KERNEL is not set
CONFIG_AEABI=y
# CONFIG_OABI_COMPAT is not set
# CONFIG_ARCH_SPARSEMEM_DEFAULT is not set
# CONFIG_ARCH_SELECT_MEMORY_MODEL is not set
# CONFIG_HIGHMEM is not set
# CONFIG_PRESERVED_RAM is not set
CONFIG_PRESERVED_RAM_START=0x02000000
CONFIG_PRESERVED_RAM_SIZE=0x00100000
CONFIG_HW_PERF_EVENTS=y
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
# CONFIG_COMPACTION is not set
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=0
CONFIG_VIRT_TO_BUS=y
# CONFIG_KSM is not set
CONFIG_DEFAULT_MMAP_MIN_ADDR=32768
CONFIG_MMAP_NOEXEC_TAINT=1
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_ALIGNMENT_TRAP=y
# CONFIG_UACCESS_WITH_MEMCPY is not set
CONFIG_SECCOMP=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_DEPRECATED_PARAM_STRUCT is not set
#
# Boot options
#
CONFIG_USE_OF=y
CONFIG_ZBOOT_ROM_TEXT=0x0
CONFIG_ZBOOT_ROM_BSS=0x0
CONFIG_CMDLINE="mem=448M@0M console=ttyS0,115200n8 earlyprintk init=/bin/ash"
# CONFIG_CMDLINE_FORCE is not set
# CONFIG_XIP_KERNEL is not set
CONFIG_KEXEC=y
CONFIG_ATAGS_PROC=y
# CONFIG_CRASH_DUMP is not set
# CONFIG_AUTO_ZRELADDR is not set
#
# CPU Power Management
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=m
# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
#
# Floating point emulation
#
#
# At least one emulation must be selected
#
CONFIG_VFP=y
CONFIG_VFPv3=y
# CONFIG_NEON is not set
#
# Userspace binary formats
#
CONFIG_BINFMT_ELF=y
CONFIG_HAVE_AOUT=y
CONFIG_BINFMT_AOUT=m
CONFIG_BINFMT_MISC=m
#
# Power management options
#
CONFIG_PM=y
# CONFIG_PM_DEBUG is not set
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_SLEEP=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_APM_EMULATION is not set
CONFIG_PM_RUNTIME=y
CONFIG_PM_OPS=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
CONFIG_NET=y
#
# Networking options
#
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM=y
CONFIG_XFRM_USER=m
# CONFIG_XFRM_SUB_POLICY is not set
# CONFIG_XFRM_MIGRATE is not set
# CONFIG_XFRM_STATISTICS is not set
CONFIG_XFRM_IPCOMP=m
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_ASK_IP_FIB_HASH=y
# CONFIG_IP_FIB_TRIE is not set
CONFIG_IP_FIB_HASH=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NET_IPIP=m
# CONFIG_NET_IPGRE_DEMUX is not set
CONFIG_IP_MROUTE=y
# CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
CONFIG_INET_AH=m
CONFIG_INET_ESP=m
CONFIG_INET_IPCOMP=m
CONFIG_INET_XFRM_TUNNEL=m
CONFIG_INET_TUNNEL=m
CONFIG_INET_XFRM_MODE_TRANSPORT=y
CONFIG_INET_XFRM_MODE_TUNNEL=y
CONFIG_INET_XFRM_MODE_BEET=y
CONFIG_INET_LRO=y
CONFIG_INET_DIAG=y
CONFIG_INET_TCP_DIAG=y
CONFIG_TCP_CONG_ADVANCED=y
CONFIG_TCP_CONG_BIC=m
CONFIG_TCP_CONG_CUBIC=y
CONFIG_TCP_CONG_WESTWOOD=m
CONFIG_TCP_CONG_HTCP=m
CONFIG_TCP_CONG_HSTCP=m
CONFIG_TCP_CONG_HYBLA=m
CONFIG_TCP_CONG_VEGAS=m
CONFIG_TCP_CONG_SCALABLE=m
CONFIG_TCP_CONG_LP=m
CONFIG_TCP_CONG_VENO=m
CONFIG_TCP_CONG_YEAH=m
CONFIG_TCP_CONG_ILLINOIS=m
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y
# CONFIG_IPV6 is not set
# CONFIG_NETLABEL is not set
CONFIG_NETWORK_SECMARK=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y
#
# Core Netfilter Configuration
#
CONFIG_NETFILTER_NETLINK=m
CONFIG_NETFILTER_NETLINK_QUEUE=m
CONFIG_NETFILTER_NETLINK_LOG=m
CONFIG_NF_CONNTRACK=m
CONFIG_NF_CONNTRACK_MARK=y
CONFIG_NF_CONNTRACK_SECMARK=y
CONFIG_NF_CONNTRACK_EVENTS=y
CONFIG_NF_CT_PROTO_DCCP=m
CONFIG_NF_CT_PROTO_GRE=m
CONFIG_NF_CT_PROTO_SCTP=m
CONFIG_NF_CT_PROTO_UDPLITE=m
CONFIG_NF_CONNTRACK_AMANDA=m
CONFIG_NF_CONNTRACK_FTP=m
CONFIG_NF_CONNTRACK_H323=m
CONFIG_NF_CONNTRACK_IRC=m
CONFIG_NF_CONNTRACK_NETBIOS_NS=m
CONFIG_NF_CONNTRACK_PPTP=m
# CONFIG_NF_CONNTRACK_SANE is not set
CONFIG_NF_CONNTRACK_SIP=m
CONFIG_NF_CONNTRACK_TFTP=m
CONFIG_NF_CT_NETLINK=m
# CONFIG_NETFILTER_TPROXY is not set
CONFIG_NETFILTER_XTABLES=y
#
# Xtables combined modules
#
CONFIG_NETFILTER_XT_MARK=m
CONFIG_NETFILTER_XT_CONNMARK=m
#
# Xtables targets
#
# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set
CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
# CONFIG_NETFILTER_XT_TARGET_CT is not set
# CONFIG_NETFILTER_XT_TARGET_DSCP is not set
CONFIG_NETFILTER_XT_TARGET_HL=m
# CONFIG_NETFILTER_XT_TARGET_IDLETIMER is not set
# CONFIG_NETFILTER_XT_TARGET_LED is not set
CONFIG_NETFILTER_XT_TARGET_MARK=m
CONFIG_NETFILTER_XT_TARGET_NFLOG=m
CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set
CONFIG_NETFILTER_XT_TARGET_RATEEST=m
# CONFIG_NETFILTER_XT_TARGET_TEE is not set
# CONFIG_NETFILTER_XT_TARGET_TRACE is not set
CONFIG_NETFILTER_XT_TARGET_SECMARK=m
CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set
#
# Xtables matches
#
CONFIG_NETFILTER_XT_MATCH_CLUSTER=m
CONFIG_NETFILTER_XT_MATCH_COMMENT=m
CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m
CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
# CONFIG_NETFILTER_XT_MATCH_CPU is not set
CONFIG_NETFILTER_XT_MATCH_DCCP=m
CONFIG_NETFILTER_XT_MATCH_DSCP=m
CONFIG_NETFILTER_XT_MATCH_ESP=m
CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
CONFIG_NETFILTER_XT_MATCH_HELPER=m
CONFIG_NETFILTER_XT_MATCH_HL=m
CONFIG_NETFILTER_XT_MATCH_IPRANGE=m
# CONFIG_NETFILTER_XT_MATCH_IPVS is not set
CONFIG_NETFILTER_XT_MATCH_LENGTH=m
CONFIG_NETFILTER_XT_MATCH_LIMIT=m
CONFIG_NETFILTER_XT_MATCH_MAC=m
CONFIG_NETFILTER_XT_MATCH_MARK=m
CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
CONFIG_NETFILTER_XT_MATCH_OSF=m
CONFIG_NETFILTER_XT_MATCH_OWNER=m
CONFIG_NETFILTER_XT_MATCH_POLICY=m
CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
CONFIG_NETFILTER_XT_MATCH_QUOTA=m
CONFIG_NETFILTER_XT_MATCH_RATEEST=m
CONFIG_NETFILTER_XT_MATCH_REALM=m
CONFIG_NETFILTER_XT_MATCH_RECENT=m
CONFIG_NETFILTER_XT_MATCH_SCTP=m
CONFIG_NETFILTER_XT_MATCH_STATE=m
CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
CONFIG_NETFILTER_XT_MATCH_STRING=m
CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
CONFIG_NETFILTER_XT_MATCH_TIME=m
CONFIG_NETFILTER_XT_MATCH_U32=m
CONFIG_IP_VS=m
# CONFIG_IP_VS_DEBUG is not set
CONFIG_IP_VS_TAB_BITS=12
#
# IPVS transport protocol load balancing support
#
CONFIG_IP_VS_PROTO_TCP=y
CONFIG_IP_VS_PROTO_UDP=y
CONFIG_IP_VS_PROTO_AH_ESP=y
CONFIG_IP_VS_PROTO_ESP=y
CONFIG_IP_VS_PROTO_AH=y
# CONFIG_IP_VS_PROTO_SCTP is not set
#
# IPVS scheduler
#
CONFIG_IP_VS_RR=m
CONFIG_IP_VS_WRR=m
CONFIG_IP_VS_LC=m
CONFIG_IP_VS_WLC=m
CONFIG_IP_VS_LBLC=m
CONFIG_IP_VS_LBLCR=m
CONFIG_IP_VS_DH=m
CONFIG_IP_VS_SH=m
CONFIG_IP_VS_SED=m
CONFIG_IP_VS_NQ=m
#
# IPVS application helper
#
CONFIG_IP_VS_FTP=m
CONFIG_IP_VS_NFCT=y
# CONFIG_IP_VS_PE_SIP is not set
#
# IP: Netfilter Configuration
#
CONFIG_NF_DEFRAG_IPV4=m
CONFIG_NF_CONNTRACK_IPV4=m
CONFIG_NF_CONNTRACK_PROC_COMPAT=y
CONFIG_IP_NF_QUEUE=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_ADDRTYPE=m
CONFIG_IP_NF_MATCH_AH=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_NF_NAT=m
CONFIG_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_NETMAP=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_NF_NAT_SNMP_BASIC=m
CONFIG_NF_NAT_PROTO_DCCP=m
CONFIG_NF_NAT_PROTO_GRE=m
CONFIG_NF_NAT_PROTO_UDPLITE=m
CONFIG_NF_NAT_PROTO_SCTP=m
CONFIG_NF_NAT_FTP=m
CONFIG_NF_NAT_IRC=m
CONFIG_NF_NAT_TFTP=m
CONFIG_NF_NAT_AMANDA=m
CONFIG_NF_NAT_PPTP=m
CONFIG_NF_NAT_H323=m
CONFIG_NF_NAT_SIP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_CLUSTERIP=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_TTL=m
CONFIG_IP_NF_RAW=m
# CONFIG_IP_NF_SECURITY is not set
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m
# CONFIG_IP_DCCP is not set
# CONFIG_IP_SCTP is not set
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
CONFIG_ATM=m
CONFIG_ATM_CLIP=m
CONFIG_ATM_CLIP_NO_ICMP=y
CONFIG_ATM_LANE=m
CONFIG_ATM_MPOA=m
# CONFIG_ATM_BR2684 is not set
CONFIG_L2TP=m
# CONFIG_L2TP_DEBUGFS is not set
# CONFIG_L2TP_V3 is not set
# CONFIG_BRIDGE is not set
CONFIG_NET_DSA=y
CONFIG_NET_DSA_TAG_DSA=y
CONFIG_NET_DSA_TAG_EDSA=y
CONFIG_NET_DSA_TAG_TRAILER=y
CONFIG_NET_DSA_MV88E6XXX=y
CONFIG_NET_DSA_MV88E6060=y
CONFIG_NET_DSA_MV88E6XXX_NEED_PPU=y
CONFIG_NET_DSA_MV88E6131=y
CONFIG_NET_DSA_MV88E6123_61_65=y
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
CONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
# CONFIG_NET_SCH_ATM is not set
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_MULTIQ=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_DRR=m
# CONFIG_NET_SCH_INGRESS is not set
#
# Classification
#
CONFIG_NET_CLS=y
CONFIG_NET_CLS_BASIC=m
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
# CONFIG_NET_CLS_U32 is not set
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_FLOW is not set
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
CONFIG_NET_EMATCH_CMP=m
CONFIG_NET_EMATCH_NBYTE=m
CONFIG_NET_EMATCH_U32=m
CONFIG_NET_EMATCH_META=m
CONFIG_NET_EMATCH_TEXT=m
CONFIG_NET_CLS_ACT=y
CONFIG_NET_ACT_POLICE=m
CONFIG_NET_ACT_GACT=m
CONFIG_GACT_PROB=y
CONFIG_NET_ACT_MIRRED=m
CONFIG_NET_ACT_IPT=m
CONFIG_NET_ACT_NAT=m
CONFIG_NET_ACT_PEDIT=m
CONFIG_NET_ACT_SIMP=m
CONFIG_NET_ACT_SKBEDIT=m
# CONFIG_NET_ACT_CSUM is not set
# CONFIG_NET_CLS_IND is not set
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_DNS_RESOLVER=y
# CONFIG_BATMAN_ADV is not set
CONFIG_RPS=y
CONFIG_XPS=y
#
# Network testing
#
CONFIG_NET_PKTGEN=m
# CONFIG_NET_DROP_MONITOR is not set
# CONFIG_HAMRADIO is not set
# CONFIG_CAN is not set
# CONFIG_IRDA is not set
CONFIG_BT=m
CONFIG_BT_L2CAP=m
CONFIG_BT_SCO=m
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
CONFIG_BT_HIDP=m
#
# Bluetooth device drivers
#
CONFIG_BT_HCIBTUSB=m
CONFIG_BT_HCIBTSDIO=m
CONFIG_BT_HCIUART=m
CONFIG_BT_HCIUART_H4=y
CONFIG_BT_HCIUART_BCSP=y
# CONFIG_BT_HCIUART_ATH3K is not set
CONFIG_BT_HCIUART_LL=y
CONFIG_BT_HCIBCM203X=m
CONFIG_BT_HCIBPA10X=m
CONFIG_BT_HCIBFUSB=m
CONFIG_BT_HCIVHCI=m
# CONFIG_BT_MRVL is not set
CONFIG_BT_ATH3K=m
CONFIG_AF_RXRPC=m
# CONFIG_AF_RXRPC_DEBUG is not set
CONFIG_RXKAD=m
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WIRELESS_EXT=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_WEXT_SPY=y
CONFIG_WEXT_PRIV=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
CONFIG_CFG80211_REG_DEBUG=y
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_WEXT=y
CONFIG_WIRELESS_EXT_SYSFS=y
CONFIG_LIB80211=m
CONFIG_LIB80211_CRYPT_WEP=m
CONFIG_LIB80211_CRYPT_CCMP=m
CONFIG_LIB80211_CRYPT_TKIP=m
# CONFIG_LIB80211_DEBUG is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
# CONFIG_MAC80211_RC_PID is not set
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211_LEDS=y
CONFIG_MAC80211_DEBUGFS=y
CONFIG_MAC80211_DEBUG_MENU=y
# CONFIG_MAC80211_NOINLINE is not set
CONFIG_MAC80211_VERBOSE_DEBUG=y
# CONFIG_MAC80211_HT_DEBUG is not set
# CONFIG_MAC80211_TKIP_DEBUG is not set
# CONFIG_MAC80211_IBSS_DEBUG is not set
# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
# CONFIG_MAC80211_VERBOSE_MPL_DEBUG is not set
# CONFIG_MAC80211_VERBOSE_MHWMP_DEBUG is not set
# CONFIG_MAC80211_DEBUG_COUNTERS is not set
# CONFIG_MAC80211_DRIVER_API_TRACER is not set
# CONFIG_WIMAX is not set
CONFIG_RFKILL=m
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
# CONFIG_RFKILL_GPIO is not set
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
CONFIG_CEPH_LIB=m
# CONFIG_CEPH_LIB_PRETTYDEBUG is not set
#
# Device Drivers
#
#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_CONNECTOR=y
CONFIG_PROC_EVENTS=y
# CONFIG_MTD is not set
CONFIG_DTC=y
CONFIG_OF=y
#
# Device Tree and Open Firmware support
#
CONFIG_PROC_DEVICETREE=y
CONFIG_OF_FLATTREE=y
CONFIG_OF_EARLY_FLATTREE=y
CONFIG_OF_ADDRESS=y
CONFIG_OF_IRQ=y
CONFIG_OF_CLOCK=y
CONFIG_OF_DEVICE=y
CONFIG_OF_GPIO=y
CONFIG_OF_I2C=y
CONFIG_OF_NET=y
CONFIG_OF_SPI=y
CONFIG_OF_MDIO=y
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
CONFIG_PARPORT_SERIAL=m
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_GSC is not set
CONFIG_PARPORT_AX88796=m
CONFIG_PARPORT_1284=y
CONFIG_PARPORT_NOT_PC=y
CONFIG_BLK_DEV=y
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
CONFIG_BLK_DEV_LOOP=m
CONFIG_BLK_DEV_CRYPTOLOOP=m
# CONFIG_BLK_DEV_DRBD is not set
CONFIG_BLK_DEV_NBD=m
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=1
CONFIG_BLK_DEV_RAM_SIZE=16384
# CONFIG_BLK_DEV_XIP is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
CONFIG_ATA_OVER_ETH=m
CONFIG_MG_DISK=m
CONFIG_MG_DISK_RES=0
# CONFIG_BLK_DEV_RBD is not set
CONFIG_MISC_DEVICES=y
CONFIG_AD525X_DPOT=m
# CONFIG_AD525X_DPOT_I2C is not set
# CONFIG_AD525X_DPOT_SPI is not set
# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
CONFIG_ICS932S401=m
CONFIG_ENCLOSURE_SERVICES=m
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
CONFIG_ISL29003=m
# CONFIG_ISL29020 is not set
CONFIG_SENSORS_TSL2550=m
CONFIG_SENSORS_BH1780=m
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_SENSORS_NCT1008 is not set
CONFIG_DS1682=m
CONFIG_TI_DAC7512=m
CONFIG_BMP085=m
# CONFIG_PCH_PHUB is not set
CONFIG_C2PORT=m
#
# EEPROM support
#
CONFIG_EEPROM_AT24=m
CONFIG_EEPROM_AT25=m
CONFIG_EEPROM_LEGACY=m
CONFIG_EEPROM_MAX6875=m
CONFIG_EEPROM_93CX6=m
# CONFIG_CB710_CORE is not set
CONFIG_IWMC3200TOP=m
# CONFIG_IWMC3200TOP_DEBUG is not set
# CONFIG_IWMC3200TOP_DEBUGFS is not set
#
# Texas Instruments shared transport line discipline
#
# CONFIG_TI_ST is not set
CONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
#
# SCSI device support
#
CONFIG_SCSI_MOD=y
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=y
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
# CONFIG_SCSI_NETLINK is not set
CONFIG_SCSI_PROC_FS=y
#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set
# CONFIG_SCSI_ENCLOSURE is not set
CONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_CONSTANTS is not set
# CONFIG_SCSI_LOGGING is not set
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_SCSI_WAIT_SCAN=m
#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
# CONFIG_SCSI_FC_ATTRS is not set
# CONFIG_SCSI_ISCSI_ATTRS is not set
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
# CONFIG_SCSI_BNX2_ISCSI is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_HPSA is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
# CONFIG_MEGARAID_NEWGEN is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_LIBFC is not set
# CONFIG_LIBFCOE is not set
# CONFIG_FCOE is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_BFA_FC is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_SATA_PMP=y
#
# Controllers with non-SFF native interface
#
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y
#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not set
CONFIG_ATA_BMDMA=y
#
# SATA SFF controllers with BMDMA
#
# CONFIG_ATA_PIIX is not set
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set
#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set
#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PLATFORM is not set
# CONFIG_PATA_RZ1000 is not set
#
# Generic fallback / legacy drivers
#
# CONFIG_ATA_GENERIC is not set
# CONFIG_PATA_LEGACY is not set
# CONFIG_MD is not set
# CONFIG_TARGET_CORE is not set
# CONFIG_FUSION is not set
#
# IEEE 1394 (FireWire) support
#
# CONFIG_FIREWIRE is not set
# CONFIG_FIREWIRE_NOSY is not set
# CONFIG_I2O is not set
CONFIG_NETDEVICES=y
CONFIG_IFB=m
CONFIG_DUMMY=m
CONFIG_BONDING=m
CONFIG_MACVLAN=m
# CONFIG_MACVTAP is not set
CONFIG_EQUALIZER=m
CONFIG_TUN=m
CONFIG_VETH=m
# CONFIG_ARCNET is not set
CONFIG_MII=y
CONFIG_PHYLIB=y
#
# MII PHY device drivers
#
CONFIG_MARVELL_PHY=m
CONFIG_DAVICOM_PHY=m
CONFIG_QSEMI_PHY=m
CONFIG_LXT_PHY=m
CONFIG_CICADA_PHY=m
CONFIG_VITESSE_PHY=m
CONFIG_SMSC_PHY=m
CONFIG_BROADCOM_PHY=m
CONFIG_BCM63XX_PHY=m
CONFIG_ICPLUS_PHY=m
CONFIG_REALTEK_PHY=m
CONFIG_NATIONAL_PHY=m
CONFIG_STE10XP=m
CONFIG_LSI_ET1011C_PHY=m
# CONFIG_MICREL_PHY is not set
# CONFIG_FIXED_PHY is not set
# CONFIG_MDIO_BITBANG is not set
# CONFIG_NET_ETHERNET is not set
# CONFIG_NETDEV_1000 is not set
# CONFIG_NETDEV_10000 is not set
# CONFIG_TR is not set
CONFIG_WLAN=y
# CONFIG_LIBERTAS_THINFIRM is not set
# CONFIG_ATMEL is not set
CONFIG_AT76C50X_USB=m
# CONFIG_PRISM54 is not set
CONFIG_USB_ZD1201=m
CONFIG_USB_NET_RNDIS_WLAN=m
# CONFIG_RTL8180 is not set
CONFIG_RTL8187=m
CONFIG_RTL8187_LEDS=y
CONFIG_ADM8211=m
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_MWL8K is not set
CONFIG_ATH_COMMON=m
# CONFIG_ATH_DEBUG is not set
# CONFIG_ATH5K is not set
# CONFIG_ATH5K_PCI is not set
# CONFIG_ATH9K is not set
# CONFIG_ATH9K_HTC is not set
CONFIG_AR9170_USB=m
CONFIG_AR9170_LEDS=y
CONFIG_CARL9170=m
CONFIG_CARL9170_LEDS=y
# CONFIG_CARL9170_DEBUGFS is not set
CONFIG_CARL9170_WPC=y
# CONFIG_ATH6KL is not set
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
CONFIG_HOSTAP=m
# CONFIG_HOSTAP_FIRMWARE is not set
# CONFIG_HOSTAP_PLX is not set
# CONFIG_HOSTAP_PCI is not set
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_IWLWIFI is not set
# CONFIG_IWM is not set
# CONFIG_LIBERTAS is not set
CONFIG_HERMES=m
# CONFIG_HERMES_PRISM is not set
CONFIG_HERMES_CACHE_FW_ON_INIT=y
# CONFIG_PLX_HERMES is not set
# CONFIG_TMD_HERMES is not set
# CONFIG_NORTEL_HERMES is not set
CONFIG_ORINOCO_USB=m
CONFIG_P54_COMMON=m
CONFIG_P54_USB=m
# CONFIG_P54_PCI is not set
# CONFIG_P54_SPI is not set
CONFIG_P54_LEDS=y
CONFIG_RT2X00=m
# CONFIG_RT2400PCI is not set
# CONFIG_RT2500PCI is not set
# CONFIG_RT61PCI is not set
# CONFIG_RT2800PCI is not set
CONFIG_RT2500USB=m
CONFIG_RT73USB=m
CONFIG_RT2800USB=m
CONFIG_RT2800USB_RT33XX=y
CONFIG_RT2800USB_RT35XX=y
CONFIG_RT2800USB_RT53XX=y
CONFIG_RT2800USB_UNKNOWN=y
CONFIG_RT2800_LIB=m
CONFIG_RT2X00_LIB_USB=m
CONFIG_RT2X00_LIB=m
CONFIG_RT2X00_LIB_FIRMWARE=y
CONFIG_RT2X00_LIB_CRYPTO=y
CONFIG_RT2X00_LIB_LEDS=y
# CONFIG_RT2X00_LIB_DEBUGFS is not set
# CONFIG_RT2X00_DEBUG is not set
# CONFIG_RTL8192CE is not set
# CONFIG_WL1251 is not set
# CONFIG_WL12XX_MENU is not set
CONFIG_ZD1211RW=m
# CONFIG_ZD1211RW_DEBUG is not set
#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#
#
# USB Network Adapters
#
CONFIG_USB_CATC=m
CONFIG_USB_KAWETH=m
CONFIG_USB_PEGASUS=m
CONFIG_USB_RTL8150=m
CONFIG_USB_USBNET=m
CONFIG_USB_NET_AX8817X=m
CONFIG_USB_NET_CDCETHER=m
# CONFIG_USB_NET_CDC_EEM is not set
CONFIG_USB_NET_CDC_NCM=m
CONFIG_USB_NET_DM9601=m
CONFIG_USB_NET_SMSC75XX=m
CONFIG_USB_NET_SMSC95XX=m
CONFIG_USB_NET_GL620A=m
CONFIG_USB_NET_NET1080=m
CONFIG_USB_NET_PLUSB=m
CONFIG_USB_NET_MCS7830=m
CONFIG_USB_NET_RNDIS_HOST=m
CONFIG_USB_NET_CDC_SUBSET=m
# CONFIG_USB_ALI_M5632 is not set
# CONFIG_USB_AN2720 is not set
CONFIG_USB_BELKIN=y
CONFIG_USB_ARMLINUX=y
# CONFIG_USB_EPSON2888 is not set
# CONFIG_USB_KC2190 is not set
CONFIG_USB_NET_ZAURUS=m
CONFIG_USB_NET_CX82310_ETH=m
# CONFIG_USB_HSO is not set
CONFIG_USB_NET_INT51X1=m
# CONFIG_USB_IPHETH is not set
# CONFIG_USB_SIERRA_NET is not set
CONFIG_USB_NET_GOBI=m
# CONFIG_WAN is not set
CONFIG_ATM_DRIVERS=y
# CONFIG_ATM_DUMMY is not set
CONFIG_ATM_TCP=m
# CONFIG_ATM_LANAI is not set
# CONFIG_ATM_ENI is not set
# CONFIG_ATM_FIRESTREAM is not set
# CONFIG_ATM_ZATM is not set
# CONFIG_ATM_NICSTAR is not set
# CONFIG_ATM_IDT77252 is not set
# CONFIG_ATM_AMBASSADOR is not set
# CONFIG_ATM_HORIZON is not set
# CONFIG_ATM_IA is not set
# CONFIG_ATM_FORE200E is not set
# CONFIG_ATM_HE is not set
# CONFIG_ATM_SOLOS is not set
#
# CAIF transport drivers
#
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
# CONFIG_PLIP is not set
CONFIG_PPP=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m
CONFIG_PPP_MPPE=m
CONFIG_PPPOE=m
# CONFIG_PPPOATM is not set
# CONFIG_PPPOL2TP is not set
CONFIG_SLIP=m
CONFIG_SLIP_COMPRESSED=y
CONFIG_SLHC=m
CONFIG_SLIP_SMART=y
CONFIG_SLIP_MODE_SLIP6=y
# CONFIG_NET_FC is not set
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_VMXNET3 is not set
# CONFIG_ISDN is not set
# CONFIG_PHONE is not set
#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=m
CONFIG_INPUT_POLLDEV=m
CONFIG_INPUT_SPARSEKMAP=m
#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=600
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=y
CONFIG_INPUT_EVBUG=m
#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
CONFIG_KEYBOARD_GPIO=y
CONFIG_KEYBOARD_TCA6416=m
CONFIG_KEYBOARD_MATRIX=m
CONFIG_KEYBOARD_LM8323=m
CONFIG_KEYBOARD_MAX7359=m
CONFIG_KEYBOARD_MCS=m
CONFIG_KEYBOARD_NEWTON=m
# CONFIG_KEYBOARD_TEGRA is not set
# CONFIG_KEYBOARD_OPENCORES is not set
CONFIG_KEYBOARD_STOWAWAY=m
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=y
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
CONFIG_MOUSE_PS2_ELANTECH=y
# CONFIG_MOUSE_PS2_SENTELIC is not set
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
CONFIG_MOUSE_APPLETOUCH=m
CONFIG_MOUSE_BCM5974=m
CONFIG_MOUSE_VSXXXAA=m
# CONFIG_MOUSE_GPIO is not set
CONFIG_MOUSE_SYNAPTICS_I2C=m
CONFIG_MOUSE_CYPRESS_I2C=m
CONFIG_INPUT_JOYSTICK=y
CONFIG_JOYSTICK_ANALOG=m
CONFIG_JOYSTICK_A3D=m
CONFIG_JOYSTICK_ADI=m
CONFIG_JOYSTICK_COBRA=m
CONFIG_JOYSTICK_GF2K=m
CONFIG_JOYSTICK_GRIP=m
CONFIG_JOYSTICK_GRIP_MP=m
CONFIG_JOYSTICK_GUILLEMOT=m
CONFIG_JOYSTICK_INTERACT=m
CONFIG_JOYSTICK_SIDEWINDER=m
CONFIG_JOYSTICK_TMDC=m
CONFIG_JOYSTICK_IFORCE=m
CONFIG_JOYSTICK_IFORCE_USB=y
CONFIG_JOYSTICK_IFORCE_232=y
CONFIG_JOYSTICK_WARRIOR=m
CONFIG_JOYSTICK_MAGELLAN=m
CONFIG_JOYSTICK_SPACEORB=m
CONFIG_JOYSTICK_SPACEBALL=m
CONFIG_JOYSTICK_STINGER=m
CONFIG_JOYSTICK_TWIDJOY=m
CONFIG_JOYSTICK_ZHENHUA=m
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_AS5011 is not set
CONFIG_JOYSTICK_JOYDUMP=m
CONFIG_JOYSTICK_XPAD=m
CONFIG_JOYSTICK_XPAD_FF=y
CONFIG_JOYSTICK_XPAD_LEDS=y
# CONFIG_JOYSTICK_WALKERA0701 is not set
CONFIG_INPUT_TABLET=y
CONFIG_TABLET_USB_ACECAD=m
CONFIG_TABLET_USB_AIPTEK=m
CONFIG_TABLET_USB_GTCO=m
CONFIG_TABLET_USB_HANWANG=m
CONFIG_TABLET_USB_KBTAB=m
CONFIG_TABLET_USB_WACOM=m
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_AD7877 is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_MCS5000 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_PANJIT_I2C is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
CONFIG_TOUCHSCREEN_USB_EGALAX=y
CONFIG_TOUCHSCREEN_USB_PANJIT=y
CONFIG_TOUCHSCREEN_USB_3M=y
CONFIG_TOUCHSCREEN_USB_ITM=y
CONFIG_TOUCHSCREEN_USB_ETURBO=y
CONFIG_TOUCHSCREEN_USB_GUNZE=y
CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
CONFIG_TOUCHSCREEN_USB_IRTOUCH=y
CONFIG_TOUCHSCREEN_USB_IDEALTEK=y
CONFIG_TOUCHSCREEN_USB_GENERAL_TOUCH=y
CONFIG_TOUCHSCREEN_USB_GOTOP=y
CONFIG_TOUCHSCREEN_USB_JASTEC=y
CONFIG_TOUCHSCREEN_USB_E2I=y
CONFIG_TOUCHSCREEN_USB_ZYTRONIC=y
CONFIG_TOUCHSCREEN_USB_ETT_TC45USB=y
CONFIG_TOUCHSCREEN_USB_NEXIO=y
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_W90X900 is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_TPS6507X is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
CONFIG_INPUT_ATI_REMOTE=m
CONFIG_INPUT_ATI_REMOTE2=m
CONFIG_INPUT_KEYSPAN_REMOTE=m
CONFIG_INPUT_POWERMATE=m
CONFIG_INPUT_YEALINK=m
CONFIG_INPUT_CM109=m
CONFIG_INPUT_UINPUT=y
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_PWM_BEEPER is not set
CONFIG_INPUT_GPIO_ROTARY_ENCODER=m
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_CMA3000 is not set
#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_SERPORT=y
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
CONFIG_GAMEPORT=m
# CONFIG_GAMEPORT_NS558 is not set
# CONFIG_GAMEPORT_L4 is not set
# CONFIG_GAMEPORT_EMU10K1 is not set
# CONFIG_GAMEPORT_FM801 is not set
#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
# CONFIG_DEVKMEM is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_N_GSM is not set
CONFIG_NOZOMI=m
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_NR_UARTS=4
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_TEGRA=y
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX3107 is not set
# CONFIG_SERIAL_MFD_HSU is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_OF_PLATFORM is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_GRLIB_GAISLER_APBUART is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_IFX6X60 is not set
CONFIG_UNIX98_PTYS=y
# CONFIG_DEVPTS_MULTIPLE_INSTANCES is not set
# CONFIG_LEGACY_PTYS is not set
CONFIG_TTY_PRINTK=y
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
# CONFIG_PPDEV is not set
# CONFIG_HVC_DCC is not set
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=y
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_RAW_DRIVER is not set
# CONFIG_TCG_TPM is not set
CONFIG_DEVPORT=y
# CONFIG_RAMOOPS is not set
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=m
# CONFIG_I2C_MUX is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not set
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set
#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_DESIGNWARE is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_INTEL_MID is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_SIMTEC is not set
CONFIG_I2C_TEGRA=y
# CONFIG_I2C_XILINX is not set
# CONFIG_I2C_EG20T is not set
#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set
#
# Other I2C/SMBus bus drivers
#
CONFIG_I2C_STUB=m
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y
#
# SPI Master Controller Drivers
#
CONFIG_SPI_BITBANG=m
# CONFIG_SPI_BUTTERFLY is not set
CONFIG_SPI_GPIO=m
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_PXA2XX_PCI is not set
CONFIG_SPI_TEGRA=y
# CONFIG_SPI_TOPCLIFF_PCH is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_DESIGNWARE is not set
#
# SPI Protocol Masters
#
CONFIG_SPI_SPIDEV=m
# CONFIG_SPI_TLE62X0 is not set
#
# PPS support
#
# CONFIG_PPS is not set
#
# PPS generators support
#
CONFIG_ARCH_REQUIRE_GPIOLIB=y
CONFIG_GPIOLIB=y
CONFIG_DEBUG_GPIO=y
CONFIG_GPIO_SYSFS=y
#
# Memory mapped GPIO expanders:
#
# CONFIG_GPIO_BASIC_MMIO is not set
# CONFIG_GPIO_IT8761E is not set
# CONFIG_GPIO_SCH is not set
# CONFIG_GPIO_VX855 is not set
#
# I2C GPIO expanders:
#
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_SX150X is not set
# CONFIG_GPIO_ADP5588 is not set
#
# PCI GPIO expanders:
#
# CONFIG_GPIO_BT8XX is not set
# CONFIG_GPIO_LANGWELL is not set
# CONFIG_GPIO_PCH is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_RDC321X is not set
# CONFIG_GPIO_NM10 is not set
#
# SPI GPIO expanders:
#
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MCP23S08 is not set
# CONFIG_GPIO_MC33880 is not set
# CONFIG_GPIO_74X164 is not set
#
# AC97 GPIO expanders:
#
#
# MODULbus GPIO expanders:
#
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=y
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_BQ20Z75 is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_CHARGER_ISP1704 is not set
# CONFIG_CHARGER_GPIO is not set
CONFIG_HWMON=m
# CONFIG_HWMON_VID is not set
CONFIG_HWMON_DEBUG_CHIP=y
#
# Native drivers
#
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADCXX is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_GPIO_FAN is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
CONFIG_SENSORS_LM90=m
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1111 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_ADS7871 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_LIS3_SPI is not set
# CONFIG_SENSORS_LIS3_I2C is not set
CONFIG_THERMAL=m
CONFIG_THERMAL_HWMON=y
# CONFIG_WATCHDOG is not set
CONFIG_SSB_POSSIBLE=y
#
# Sonics Silicon Backplane
#
CONFIG_SSB=m
CONFIG_SSB_SPROM=y
CONFIG_SSB_PCIHOST_POSSIBLE=y
CONFIG_SSB_PCIHOST=y
# CONFIG_SSB_B43_PCI_BRIDGE is not set
CONFIG_SSB_SDIOHOST_POSSIBLE=y
# CONFIG_SSB_SDIOHOST is not set
# CONFIG_SSB_SILENT is not set
# CONFIG_SSB_DEBUG is not set
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y
# CONFIG_SSB_DRIVER_PCICORE is not set
CONFIG_MFD_SUPPORT=y
CONFIG_MFD_CORE=y
# CONFIG_MFD_88PM860X is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_MFD_ASIC3 is not set
# CONFIG_HTC_EGPIO is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_HTC_I2CPLD is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_TWL4030_CORE is not set
# CONFIG_MFD_STMPE is not set
# CONFIG_MFD_TC3589X is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_T7L66XB is not set
# CONFIG_MFD_TC6387XB is not set
# CONFIG_MFD_TC6393XB is not set
# CONFIG_PMIC_DA903X is not set
# CONFIG_PMIC_ADP5520 is not set
# CONFIG_MFD_MAX8925 is not set
# CONFIG_MFD_MAX8998 is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_I2C is not set
# CONFIG_MFD_WM831X_SPI is not set
# CONFIG_MFD_WM8350_I2C is not set
# CONFIG_MFD_WM8994 is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_MC13XXX is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_EZX_PCAP is not set
# CONFIG_MFD_CS5535 is not set
# CONFIG_MFD_TIMBERDALE is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
CONFIG_MFD_TPS6586X=y
# CONFIG_MFD_VX855 is not set
CONFIG_MFD_WL1273_CORE=m
CONFIG_REGULATOR=y
CONFIG_REGULATOR_DEBUG=y
CONFIG_REGULATOR_DUMMY=y
CONFIG_REGULATOR_FIXED_VOLTAGE=y
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_LP3971 is not set
# CONFIG_REGULATOR_LP3972 is not set
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
# CONFIG_REGULATOR_ISL6271A is not set
# CONFIG_REGULATOR_AD5398 is not set
CONFIG_REGULATOR_TPS6586X=y
# CONFIG_REGULATOR_TPS6524X is not set
CONFIG_MEDIA_SUPPORT=m
#
# Multimedia core support
#
CONFIG_VIDEO_DEV=m
CONFIG_VIDEO_V4L2_COMMON=m
CONFIG_DVB_CORE=m
CONFIG_VIDEO_MEDIA=m
#
# Multimedia drivers
#
CONFIG_VIDEO_SAA7146=m
CONFIG_VIDEO_SAA7146_VV=m
CONFIG_RC_CORE=m
CONFIG_LIRC=m
CONFIG_RC_MAP=m
CONFIG_IR_NEC_DECODER=m
CONFIG_IR_RC5_DECODER=m
CONFIG_IR_RC6_DECODER=m
CONFIG_IR_JVC_DECODER=m
CONFIG_IR_SONY_DECODER=m
CONFIG_IR_RC5_SZ_DECODER=m
CONFIG_IR_LIRC_CODEC=m
CONFIG_IR_IMON=m
CONFIG_IR_MCEUSB=m
CONFIG_IR_STREAMZAP=m
CONFIG_RC_LOOPBACK=m
CONFIG_MEDIA_ATTACH=y
CONFIG_MEDIA_TUNER=m
CONFIG_MEDIA_TUNER_CUSTOMISE=y
#
# Customize TV tuners
#
CONFIG_MEDIA_TUNER_SIMPLE=m
CONFIG_MEDIA_TUNER_TDA8290=m
CONFIG_MEDIA_TUNER_TDA827X=m
CONFIG_MEDIA_TUNER_TDA18271=m
CONFIG_MEDIA_TUNER_TDA9887=m
CONFIG_MEDIA_TUNER_TEA5761=m
CONFIG_MEDIA_TUNER_TEA5767=m
CONFIG_MEDIA_TUNER_MT20XX=m
CONFIG_MEDIA_TUNER_MT2060=m
CONFIG_MEDIA_TUNER_MT2266=m
CONFIG_MEDIA_TUNER_MT2131=m
CONFIG_MEDIA_TUNER_QT1010=m
CONFIG_MEDIA_TUNER_XC2028=m
CONFIG_MEDIA_TUNER_XC5000=m
CONFIG_MEDIA_TUNER_MXL5005S=m
CONFIG_MEDIA_TUNER_MXL5007T=m
CONFIG_MEDIA_TUNER_MC44S803=m
CONFIG_MEDIA_TUNER_MAX2165=m
CONFIG_MEDIA_TUNER_TDA18218=m
CONFIG_VIDEO_V4L2=m
CONFIG_VIDEOBUF_GEN=m
CONFIG_VIDEOBUF_DMA_SG=m
CONFIG_VIDEOBUF_VMALLOC=m
CONFIG_VIDEOBUF_DMA_CONTIG=m
CONFIG_VIDEOBUF_DVB=m
CONFIG_VIDEO_TVEEPROM=m
CONFIG_VIDEO_TUNER=m
CONFIG_VIDEO_CAPTURE_DRIVERS=y
# CONFIG_VIDEO_ADV_DEBUG is not set
# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set
# CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set
CONFIG_VIDEO_IR_I2C=m
#
# Encoders/decoders and other helper chips
#
#
# Audio decoders
#
# CONFIG_VIDEO_TVAUDIO is not set
# CONFIG_VIDEO_TDA7432 is not set
# CONFIG_VIDEO_TDA9840 is not set
# CONFIG_VIDEO_TEA6415C is not set
# CONFIG_VIDEO_TEA6420 is not set
CONFIG_VIDEO_MSP3400=m
# CONFIG_VIDEO_CS5345 is not set
CONFIG_VIDEO_CS53L32A=m
# CONFIG_VIDEO_M52790 is not set
# CONFIG_VIDEO_TLV320AIC23B is not set
CONFIG_VIDEO_WM8775=m
# CONFIG_VIDEO_WM8739 is not set
# CONFIG_VIDEO_VP27SMPX is not set
#
# RDS decoders
#
# CONFIG_VIDEO_SAA6588 is not set
#
# Video decoders
#
CONFIG_VIDEO_ADV7180=m
# CONFIG_VIDEO_BT819 is not set
# CONFIG_VIDEO_BT856 is not set
# CONFIG_VIDEO_BT866 is not set
# CONFIG_VIDEO_KS0127 is not set
CONFIG_VIDEO_OV7670=m
# CONFIG_VIDEO_MT9V011 is not set
# CONFIG_VIDEO_TCM825X is not set
# CONFIG_VIDEO_SAA7110 is not set
CONFIG_VIDEO_SAA711X=m
# CONFIG_VIDEO_SAA717X is not set
# CONFIG_VIDEO_SAA7191 is not set
# CONFIG_VIDEO_TVP514X is not set
# CONFIG_VIDEO_TVP5150 is not set
# CONFIG_VIDEO_TVP7002 is not set
# CONFIG_VIDEO_VPX3220 is not set
#
# Video and audio decoders
#
CONFIG_VIDEO_CX25840=m
#
# MPEG video encoders
#
CONFIG_VIDEO_CX2341X=m
#
# Video encoders
#
# CONFIG_VIDEO_SAA7127 is not set
# CONFIG_VIDEO_SAA7185 is not set
# CONFIG_VIDEO_ADV7170 is not set
# CONFIG_VIDEO_ADV7175 is not set
# CONFIG_VIDEO_THS7303 is not set
# CONFIG_VIDEO_ADV7343 is not set
# CONFIG_VIDEO_AK881X is not set
#
# Video improvement chips
#
# CONFIG_VIDEO_UPD64031A is not set
# CONFIG_VIDEO_UPD64083 is not set
# CONFIG_VIDEO_VIVI is not set
CONFIG_TEGRA_RPC=y
CONFIG_TEGRA_AVP=y
CONFIG_TEGRA_CAMERA=y
CONFIG_TEGRA_MEDIASERVER=y
# CONFIG_VIDEO_BT848 is not set
# CONFIG_VIDEO_BWQCAM is not set
# CONFIG_VIDEO_CQCAM is not set
# CONFIG_VIDEO_W9966 is not set
CONFIG_VIDEO_CPIA2=m
CONFIG_VIDEO_ZORAN=m
CONFIG_VIDEO_ZORAN_DC30=m
CONFIG_VIDEO_ZORAN_ZR36060=m
CONFIG_VIDEO_ZORAN_BUZ=m
CONFIG_VIDEO_ZORAN_DC10=m
CONFIG_VIDEO_ZORAN_LML33=m
CONFIG_VIDEO_ZORAN_LML33R10=m
CONFIG_VIDEO_ZORAN_AVS6EYES=m
CONFIG_VIDEO_SAA7134=m
# CONFIG_VIDEO_SAA7134_ALSA is not set
CONFIG_VIDEO_SAA7134_RC=y
# CONFIG_VIDEO_SAA7134_DVB is not set
CONFIG_VIDEO_MXB=m
CONFIG_VIDEO_HEXIUM_ORION=m
CONFIG_VIDEO_HEXIUM_GEMINI=m
CONFIG_VIDEO_TIMBERDALE=m
# CONFIG_VIDEO_CX88 is not set
# CONFIG_VIDEO_CX23885 is not set
CONFIG_VIDEO_AU0828=m
# CONFIG_VIDEO_IVTV is not set
# CONFIG_VIDEO_CX18 is not set
CONFIG_VIDEO_SAA7164=m
CONFIG_VIDEO_CAFE_CCIC=m
CONFIG_VIDEO_SR030PC30=m
# CONFIG_SOC_CAMERA is not set
CONFIG_V4L_USB_DRIVERS=y
CONFIG_USB_VIDEO_CLASS=m
CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y
# CONFIG_USB_GSPCA is not set
CONFIG_VIDEO_PVRUSB2=m
CONFIG_VIDEO_PVRUSB2_SYSFS=y
CONFIG_VIDEO_PVRUSB2_DVB=y
# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
CONFIG_VIDEO_HDPVR=m
# CONFIG_VIDEO_EM28XX is not set
# CONFIG_VIDEO_TLG2300 is not set
# CONFIG_VIDEO_CX231XX is not set
CONFIG_VIDEO_USBVISION=m
CONFIG_USB_ET61X251=m
CONFIG_USB_SN9C102=m
CONFIG_USB_PWC=m
# CONFIG_USB_PWC_DEBUG is not set
CONFIG_USB_PWC_INPUT_EVDEV=y
CONFIG_USB_ZR364XX=m
CONFIG_USB_STKWEBCAM=m
CONFIG_USB_S2255=m
# CONFIG_V4L_MEM2MEM_DRIVERS is not set
CONFIG_RADIO_ADAPTERS=y
CONFIG_RADIO_MAXIRADIO=m
CONFIG_RADIO_MAESTRO=m
CONFIG_I2C_SI4713=m
CONFIG_RADIO_SI4713=m
CONFIG_USB_DSBR=m
# CONFIG_RADIO_SI470X is not set
CONFIG_USB_MR800=m
CONFIG_RADIO_TEA5764=m
CONFIG_RADIO_SAA7706H=m
CONFIG_RADIO_TEF6862=m
CONFIG_RADIO_WL1273=m
CONFIG_DVB_MAX_ADAPTERS=8
CONFIG_DVB_DYNAMIC_MINORS=y
CONFIG_DVB_CAPTURE_DRIVERS=y
#
# Supported SAA7146 based PCI Adapters
#
CONFIG_TTPCI_EEPROM=m
CONFIG_DVB_AV7110=m
CONFIG_DVB_AV7110_OSD=y
CONFIG_DVB_BUDGET_CORE=m
CONFIG_DVB_BUDGET=m
# CONFIG_DVB_BUDGET_CI is not set
CONFIG_DVB_BUDGET_AV=m
CONFIG_DVB_BUDGET_PATCH=m
#
# Supported USB Adapters
#
# CONFIG_DVB_USB is not set
CONFIG_DVB_TTUSB_BUDGET=m
CONFIG_DVB_TTUSB_DEC=m
# CONFIG_SMS_SIANO_MDTV is not set
#
# Supported FlexCopII (B2C2) Adapters
#
CONFIG_DVB_B2C2_FLEXCOP=m
# CONFIG_DVB_B2C2_FLEXCOP_PCI is not set
CONFIG_DVB_B2C2_FLEXCOP_USB=m
# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
#
# Supported BT878 Adapters
#
#
# Supported Pluto2 Adapters
#
CONFIG_DVB_PLUTO2=m
#
# Supported SDMC DM1105 Adapters
#
# CONFIG_DVB_DM1105 is not set
#
# Supported Earthsoft PT1 Adapters
#
CONFIG_DVB_PT1=m
#
# Supported Mantis Adapters
#
# CONFIG_MANTIS_CORE is not set
#
# Supported nGene Adapters
#
CONFIG_DVB_NGENE=m
#
# Supported DVB Frontends
#
CONFIG_DVB_FE_CUSTOMISE=y
#
# Customise DVB Frontends
#
#
# Multistandard (satellite) frontends
#
CONFIG_DVB_STB0899=m
CONFIG_DVB_STB6100=m
CONFIG_DVB_STV090x=m
CONFIG_DVB_STV6110x=m
#
# DVB-S (satellite) frontends
#
CONFIG_DVB_CX24110=m
CONFIG_DVB_CX24123=m
CONFIG_DVB_MT312=m
CONFIG_DVB_ZL10036=m
CONFIG_DVB_ZL10039=m
CONFIG_DVB_S5H1420=m
CONFIG_DVB_STV0288=m
CONFIG_DVB_STB6000=m
CONFIG_DVB_STV0299=m
CONFIG_DVB_STV6110=m
CONFIG_DVB_STV0900=m
CONFIG_DVB_TDA8083=m
CONFIG_DVB_TDA10086=m
CONFIG_DVB_TDA8261=m
CONFIG_DVB_VES1X93=m
CONFIG_DVB_TUNER_ITD1000=m
CONFIG_DVB_TUNER_CX24113=m
CONFIG_DVB_TDA826X=m
CONFIG_DVB_TUA6100=m
CONFIG_DVB_CX24116=m
CONFIG_DVB_SI21XX=m
CONFIG_DVB_DS3000=m
CONFIG_DVB_MB86A16=m
#
# DVB-T (terrestrial) frontends
#
CONFIG_DVB_SP8870=m
CONFIG_DVB_SP887X=m
CONFIG_DVB_CX22700=m
CONFIG_DVB_CX22702=m
CONFIG_DVB_S5H1432=m
CONFIG_DVB_DRX397XD=m
CONFIG_DVB_L64781=m
CONFIG_DVB_TDA1004X=m
CONFIG_DVB_NXT6000=m
CONFIG_DVB_MT352=m
CONFIG_DVB_ZL10353=m
CONFIG_DVB_DIB3000MB=m
CONFIG_DVB_DIB3000MC=m
CONFIG_DVB_DIB7000M=m
CONFIG_DVB_DIB7000P=m
CONFIG_DVB_TDA10048=m
CONFIG_DVB_AF9013=m
CONFIG_DVB_EC100=m
#
# DVB-C (cable) frontends
#
CONFIG_DVB_VES1820=m
CONFIG_DVB_TDA10021=m
CONFIG_DVB_TDA10023=m
CONFIG_DVB_STV0297=m
#
# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
#
CONFIG_DVB_NXT200X=m
CONFIG_DVB_OR51211=m
CONFIG_DVB_OR51132=m
CONFIG_DVB_BCM3510=m
CONFIG_DVB_LGDT330X=m
CONFIG_DVB_LGDT3305=m
CONFIG_DVB_S5H1409=m
CONFIG_DVB_AU8522=m
CONFIG_DVB_S5H1411=m
#
# ISDB-T (terrestrial) frontends
#
CONFIG_DVB_S921=m
CONFIG_DVB_DIB8000=m
CONFIG_DVB_MB86A20S=m
#
# Digital terrestrial only tuners/PLL
#
CONFIG_DVB_PLL=m
CONFIG_DVB_TUNER_DIB0070=m
CONFIG_DVB_TUNER_DIB0090=m
#
# SEC control devices for DVB-S
#
CONFIG_DVB_LNBP21=m
CONFIG_DVB_ISL6405=m
CONFIG_DVB_ISL6421=m
CONFIG_DVB_ISL6423=m
CONFIG_DVB_LGS8GL5=m
CONFIG_DVB_LGS8GXX=m
CONFIG_DVB_ATBM8830=m
CONFIG_DVB_TDA665x=m
CONFIG_DVB_IX2505V=m
#
# Tools to develop new frontends
#
# CONFIG_DVB_DUMMY_FE is not set
#
# Graphics support
#
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
# CONFIG_DRM is not set
# CONFIG_STUB_POULSBO is not set
# CONFIG_VGASTATE is not set
CONFIG_VIDEO_OUTPUT_CONTROL=y
CONFIG_FB=y
# CONFIG_FIRMWARE_EDID is not set
# CONFIG_FB_DDC is not set
# CONFIG_FB_BOOT_VESA_SUPPORT is not set
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_WMT_GE_ROPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
# CONFIG_FB_BACKLIGHT is not set
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y
#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
# CONFIG_FB_CYBER2000 is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_UVESA is not set
# CONFIG_FB_S1D13XXX is not set
# CONFIG_FB_NVIDIA is not set
# CONFIG_FB_RIVA is not set
# CONFIG_FB_MATROX is not set
# CONFIG_FB_RADEON is not set
# CONFIG_FB_ATY128 is not set
# CONFIG_FB_ATY is not set
# CONFIG_FB_S3 is not set
# CONFIG_FB_SAVAGE is not set
# CONFIG_FB_SIS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
# CONFIG_FB_3DFX is not set
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
# CONFIG_FB_TMIO is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
#
# NVIDIA Tegra Display Driver options
#
CONFIG_TEGRA_GRHOST=y
CONFIG_TEGRA_DC=y
CONFIG_FB_TEGRA=y
CONFIG_TEGRA_DC_EXTENSIONS=y
CONFIG_TEGRA_NVMAP=y
CONFIG_NVMAP_RECLAIM_UNPINNED_VM=y
CONFIG_NVMAP_ALLOW_SYSMEM=y
# CONFIG_NVMAP_CARVEOUT_KILLER is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
# CONFIG_LCD_L4F00242T03 is not set
# CONFIG_LCD_LMS283GF05 is not set
# CONFIG_LCD_LTV350QV is not set
# CONFIG_LCD_TDO24M is not set
# CONFIG_LCD_VGG2432A4 is not set
CONFIG_LCD_PLATFORM=y
# CONFIG_LCD_S6E63M0 is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
CONFIG_BACKLIGHT_PWM=y
# CONFIG_BACKLIGHT_ADP8860 is not set
#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set
#
# Console display driver support
#
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_FONT_6x11 is not set
# CONFIG_FONT_7x14 is not set
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
# CONFIG_LOGO is not set
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
CONFIG_SOUND_OSS_CORE_PRECLAIM=y
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
# CONFIG_SND_SEQUENCER_OSS is not set
# CONFIG_SND_HRTIMER is not set
# CONFIG_SND_DYNAMIC_MINORS is not set
# CONFIG_SND_SUPPORT_OLD_API is not set
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
# CONFIG_SND_RAWMIDI_SEQ is not set
# CONFIG_SND_OPL3_LIB_SEQ is not set
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
# CONFIG_SND_EMU10K1_SEQ is not set
CONFIG_SND_DRIVERS=y
# CONFIG_SND_DUMMY is not set
# CONFIG_SND_ALOOP is not set
# CONFIG_SND_VIRMIDI is not set
# CONFIG_SND_MTPAV is not set
# CONFIG_SND_MTS64 is not set
# CONFIG_SND_SERIAL_U16550 is not set
# CONFIG_SND_MPU401 is not set
# CONFIG_SND_PORTMAN2X4 is not set
CONFIG_SND_PCI=y
# CONFIG_SND_AD1889 is not set
# CONFIG_SND_ALS300 is not set
# CONFIG_SND_ALI5451 is not set
# CONFIG_SND_ATIIXP is not set
# CONFIG_SND_ATIIXP_MODEM is not set
# CONFIG_SND_AU8810 is not set
# CONFIG_SND_AU8820 is not set
# CONFIG_SND_AU8830 is not set
# CONFIG_SND_AW2 is not set
# CONFIG_SND_AZT3328 is not set
# CONFIG_SND_BT87X is not set
# CONFIG_SND_CA0106 is not set
# CONFIG_SND_CMIPCI is not set
# CONFIG_SND_OXYGEN is not set
# CONFIG_SND_CS4281 is not set
# CONFIG_SND_CS46XX is not set
# CONFIG_SND_CS5535AUDIO is not set
# CONFIG_SND_CTXFI is not set
# CONFIG_SND_DARLA20 is not set
# CONFIG_SND_GINA20 is not set
# CONFIG_SND_LAYLA20 is not set
# CONFIG_SND_DARLA24 is not set
# CONFIG_SND_GINA24 is not set
# CONFIG_SND_LAYLA24 is not set
# CONFIG_SND_MONA is not set
# CONFIG_SND_MIA is not set
# CONFIG_SND_ECHO3G is not set
# CONFIG_SND_INDIGO is not set
# CONFIG_SND_INDIGOIO is not set
# CONFIG_SND_INDIGODJ is not set
# CONFIG_SND_INDIGOIOX is not set
# CONFIG_SND_INDIGODJX is not set
# CONFIG_SND_EMU10K1 is not set
# CONFIG_SND_EMU10K1X is not set
# CONFIG_SND_ENS1370 is not set
# CONFIG_SND_ENS1371 is not set
# CONFIG_SND_ES1938 is not set
# CONFIG_SND_ES1968 is not set
# CONFIG_SND_FM801 is not set
# CONFIG_SND_HDA_INTEL is not set
# CONFIG_SND_HDSP is not set
# CONFIG_SND_HDSPM is not set
# CONFIG_SND_ICE1712 is not set
# CONFIG_SND_ICE1724 is not set
# CONFIG_SND_INTEL8X0 is not set
# CONFIG_SND_INTEL8X0M is not set
# CONFIG_SND_KORG1212 is not set
# CONFIG_SND_LX6464ES is not set
# CONFIG_SND_MAESTRO3 is not set
# CONFIG_SND_MIXART is not set
# CONFIG_SND_NM256 is not set
# CONFIG_SND_PCXHR is not set
# CONFIG_SND_RIPTIDE is not set
# CONFIG_SND_RME32 is not set
# CONFIG_SND_RME96 is not set
# CONFIG_SND_RME9652 is not set
# CONFIG_SND_SONICVIBES is not set
# CONFIG_SND_TRIDENT is not set
# CONFIG_SND_VIA82XX is not set
# CONFIG_SND_VIA82XX_MODEM is not set
# CONFIG_SND_VIRTUOSO is not set
# CONFIG_SND_VX222 is not set
# CONFIG_SND_YMFPCI is not set
CONFIG_SND_ARM=y
# CONFIG_SND_SPI is not set
# CONFIG_SND_USB is not set
CONFIG_SND_SOC=m
# CONFIG_SND_SOC_CACHE_LZO is not set
CONFIG_SND_TEGRA_SOC=m
CONFIG_SND_TEGRA_SOC_I2S=m
CONFIG_SND_TEGRA_SOC_SPDIF=m
CONFIG_SND_TEGRA_SOC_PAZ00=m
CONFIG_SND_SOC_I2C_AND_SPI=m
# CONFIG_SND_SOC_ALL_CODECS is not set
CONFIG_SND_SOC_ALC5632=m
# CONFIG_SOUND_PRIME is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=y
CONFIG_HIDRAW=y
#
# USB Input Devices
#
CONFIG_USB_HID=y
# CONFIG_HID_PID is not set
CONFIG_USB_HIDDEV=y
#
# Special HID drivers
#
# CONFIG_HID_3M_PCT is not set
# CONFIG_HID_A4TECH is not set
# CONFIG_HID_ACRUX is not set
# CONFIG_HID_APPLE is not set
# CONFIG_HID_BELKIN is not set
# CONFIG_HID_CANDO is not set
# CONFIG_HID_CHERRY is not set
# CONFIG_HID_CHICONY is not set
# CONFIG_HID_PRODIKEYS is not set
# CONFIG_HID_CYPRESS is not set
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
# CONFIG_HID_EGALAX is not set
# CONFIG_HID_ELECOM is not set
# CONFIG_HID_EZKEY is not set
# CONFIG_HID_KYE is not set
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_TWINHAN is not set
# CONFIG_HID_KENSINGTON is not set
# CONFIG_HID_LOGITECH is not set
# CONFIG_HID_MAGICMOUSE is not set
# CONFIG_HID_MICROSOFT is not set
# CONFIG_HID_MOSART is not set
# CONFIG_HID_MONTEREY is not set
# CONFIG_HID_MULTITOUCH is not set
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_QUANTA is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_ROCCAT_KONE is not set
# CONFIG_HID_ROCCAT_KONEPLUS is not set
# CONFIG_HID_ROCCAT_PYRA is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_STANTUM is not set
# CONFIG_HID_SUNPLUS is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_WACOM is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
#
# Miscellaneous USB options
#
# CONFIG_USB_DEVICEFS is not set
# CONFIG_USB_DEVICE_CLASS is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
CONFIG_USB_OTG=y
# CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set
CONFIG_USB_MON=m
CONFIG_USB_WUSB=m
# CONFIG_USB_WUSB_CBAF is not set
#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_XHCI_HCD is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
CONFIG_USB_EHCI_TEGRA=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_ISP1362_HCD is not set
CONFIG_USB_OHCI_HCD=m
# CONFIG_USB_OHCI_HCD_SSB is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
CONFIG_USB_WHCI_HCD=m
# CONFIG_USB_HWA_HCD is not set
# CONFIG_USB_MUSB_HDRC is not set
#
# USB Device Class drivers
#
CONFIG_USB_ACM=m
CONFIG_USB_PRINTER=m
CONFIG_USB_WDM=m
# CONFIG_USB_TMC is not set
#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#
#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
CONFIG_USB_STORAGE_DATAFAB=m
CONFIG_USB_STORAGE_FREECOM=m
CONFIG_USB_STORAGE_ISD200=m
CONFIG_USB_STORAGE_USBAT=m
CONFIG_USB_STORAGE_SDDR09=m
CONFIG_USB_STORAGE_SDDR55=m
CONFIG_USB_STORAGE_JUMPSHOT=m
CONFIG_USB_STORAGE_ALAUDA=m
CONFIG_USB_STORAGE_ONETOUCH=m
CONFIG_USB_STORAGE_KARMA=m
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
CONFIG_USB_UAS=m
CONFIG_USB_STORAGE_REALTEK=m
# CONFIG_USB_LIBUSUAL is not set
#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
#
# USB port drivers
#
CONFIG_USB_USS720=m
CONFIG_USB_SERIAL=m
# CONFIG_USB_EZUSB is not set
CONFIG_USB_SERIAL_GENERIC=y
# CONFIG_USB_SERIAL_AIRCABLE is not set
# CONFIG_USB_SERIAL_ARK3116 is not set
# CONFIG_USB_SERIAL_BELKIN is not set
# CONFIG_USB_SERIAL_CH341 is not set
# CONFIG_USB_SERIAL_WHITEHEAT is not set
# CONFIG_USB_SERIAL_DIGI_ACCELEPORT is not set
# CONFIG_USB_SERIAL_CP210X is not set
# CONFIG_USB_SERIAL_CYPRESS_M8 is not set
# CONFIG_USB_SERIAL_EMPEG is not set
# CONFIG_USB_SERIAL_FTDI_SIO is not set
# CONFIG_USB_SERIAL_FUNSOFT is not set
# CONFIG_USB_SERIAL_VISOR is not set
# CONFIG_USB_SERIAL_IPAQ is not set
# CONFIG_USB_SERIAL_IR is not set
# CONFIG_USB_SERIAL_EDGEPORT is not set
# CONFIG_USB_SERIAL_EDGEPORT_TI is not set
# CONFIG_USB_SERIAL_GARMIN is not set
# CONFIG_USB_SERIAL_IPW is not set
# CONFIG_USB_SERIAL_IUU is not set
# CONFIG_USB_SERIAL_KEYSPAN_PDA is not set
# CONFIG_USB_SERIAL_KEYSPAN is not set
# CONFIG_USB_SERIAL_KLSI is not set
# CONFIG_USB_SERIAL_KOBIL_SCT is not set
# CONFIG_USB_SERIAL_MCT_U232 is not set
CONFIG_USB_SERIAL_MOS7720=m
# CONFIG_USB_SERIAL_MOS7715_PARPORT is not set
CONFIG_USB_SERIAL_MOS7840=m
# CONFIG_USB_SERIAL_MOTOROLA is not set
# CONFIG_USB_SERIAL_NAVMAN is not set
CONFIG_USB_SERIAL_PL2303=m
# CONFIG_USB_SERIAL_OTI6858 is not set
# CONFIG_USB_SERIAL_QCAUX is not set
# CONFIG_USB_SERIAL_QUALCOMM is not set
# CONFIG_USB_SERIAL_SPCP8X5 is not set
# CONFIG_USB_SERIAL_HP4X is not set
# CONFIG_USB_SERIAL_SAFE is not set
# CONFIG_USB_SERIAL_SAMBA is not set
# CONFIG_USB_SERIAL_SIEMENS_MPI is not set
# CONFIG_USB_SERIAL_SIERRAWIRELESS is not set
# CONFIG_USB_SERIAL_SYMBOL is not set
# CONFIG_USB_SERIAL_TI is not set
# CONFIG_USB_SERIAL_CYBERJACK is not set
# CONFIG_USB_SERIAL_XIRCOM is not set
CONFIG_USB_SERIAL_WWAN=m
CONFIG_USB_SERIAL_OPTION=m
# CONFIG_USB_SERIAL_OMNINET is not set
# CONFIG_USB_SERIAL_OPTICON is not set
# CONFIG_USB_SERIAL_VIVOPAY_SERIAL is not set
# CONFIG_USB_SERIAL_ZIO is not set
# CONFIG_USB_SERIAL_SSU100 is not set
# CONFIG_USB_SERIAL_DEBUG is not set
#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
CONFIG_USB_ATM=m
CONFIG_USB_SPEEDTOUCH=m
CONFIG_USB_CXACRU=m
CONFIG_USB_UEAGLEATM=m
CONFIG_USB_XUSBATM=m
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG is not set
# CONFIG_USB_GADGET_DEBUG_FILES is not set
# CONFIG_USB_GADGET_DEBUG_FS is not set
CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_SELECTED=y
CONFIG_USB_GADGET_FSL_USB2=y
CONFIG_USB_FSL_USB2=y
# CONFIG_USB_GADGET_R8A66597 is not set
# CONFIG_USB_GADGET_PXA_U2O is not set
# CONFIG_USB_GADGET_M66592 is not set
# CONFIG_USB_GADGET_AMD5536UDC is not set
# CONFIG_USB_GADGET_CI13XXX_PCI is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LANGWELL is not set
# CONFIG_USB_GADGET_EG20T is not set
# CONFIG_USB_GADGET_DUMMY_HCD is not set
CONFIG_USB_GADGET_DUALSPEED=y
# CONFIG_USB_ZERO is not set
# CONFIG_USB_AUDIO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_G_NCM is not set
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_FUNCTIONFS is not set
# CONFIG_USB_FILE_STORAGE is not set
# CONFIG_USB_MASS_STORAGE is not set
# CONFIG_USB_G_SERIAL is not set
# CONFIG_USB_MIDI_GADGET is not set
# CONFIG_USB_G_PRINTER is not set
CONFIG_USB_CDC_COMPOSITE=m
# CONFIG_USB_G_MULTI is not set
# CONFIG_USB_G_HID is not set
# CONFIG_USB_G_DBGP is not set
CONFIG_USB_G_WEBCAM=m
#
# OTG and related infrastructure
#
CONFIG_USB_OTG_UTILS=y
# CONFIG_USB_GPIO_VBUS is not set
CONFIG_USB_ULPI=y
CONFIG_USB_ULPI_VIEWPORT=y
# CONFIG_NOP_USB_XCEIV is not set
CONFIG_USB_TEGRA_OTG=y
CONFIG_UWB=m
# CONFIG_UWB_HWA is not set
CONFIG_UWB_WHCI=m
CONFIG_MMC=y
# CONFIG_MMC_DEBUG is not set
CONFIG_MMC_UNSAFE_RESUME=y
# CONFIG_MMC_CLKGATE is not set
#
# MMC/SD/SDIO Card Drivers
#
CONFIG_MMC_BLOCK=y
CONFIG_MMC_BLOCK_MINORS=16
CONFIG_MMC_BLOCK_BOUNCE=y
# CONFIG_SDIO_UART is not set
# CONFIG_MMC_TEST is not set
#
# MMC/SD/SDIO Host Controller Drivers
#
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_IO_ACCESSORS=y
# CONFIG_MMC_SDHCI_PCI is not set
# CONFIG_MMC_SDHCI_OF is not set
CONFIG_MMC_SDHCI_PLTFM=y
CONFIG_MMC_SDHCI_TEGRA=y
# CONFIG_MMC_TIFM_SD is not set
# CONFIG_MMC_SPI is not set
# CONFIG_MMC_CB710 is not set
# CONFIG_MMC_VIA_SDMMC is not set
# CONFIG_MMC_DW is not set
CONFIG_MMC_USHC=m
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y
#
# LED drivers
#
# CONFIG_LEDS_PCA9532 is not set
CONFIG_LEDS_GPIO=y
CONFIG_LEDS_GPIO_PLATFORM=y
CONFIG_LEDS_GPIO_OF=y
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_DAC124S085 is not set
CONFIG_LEDS_PWM=y
# CONFIG_LEDS_REGULATOR is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_LT3593 is not set
CONFIG_LEDS_TRIGGERS=y
#
# LED Triggers
#
# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
CONFIG_LEDS_TRIGGER_GPIO=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_NFC_DEVICES is not set
# CONFIG_ACCESSIBILITY is not set
# CONFIG_INFINIBAND is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set
#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
CONFIG_RTC_DRV_TPS6586X=y
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set
#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_M41T94 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1390 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_R9701 is not set
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_DS3234 is not set
# CONFIG_RTC_DRV_PCF2123 is not set
#
# Platform RTC drivers
#
# CONFIG_RTC_DRV_CMOS is not set
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set
#
# on-CPU RTC drivers
#
CONFIG_RTC_DRV_TEGRA=y
# CONFIG_DMADEVICES is not set
CONFIG_TIMB_DMA=m
CONFIG_DMA_ENGINE=y
# CONFIG_AUXDISPLAY is not set
# CONFIG_UIO is not set
CONFIG_STAGING=y
# CONFIG_STAGING_EXCLUDE_BUILD is not set
# CONFIG_VIDEO_GO7007 is not set
# CONFIG_VIDEO_CX25821 is not set
# CONFIG_VIDEO_TM6000 is not set
# CONFIG_USB_DABUSB is not set
# CONFIG_USB_SE401 is not set
# CONFIG_USB_VICAM is not set
# CONFIG_USB_IP_COMMON is not set
# CONFIG_W35UND is not set
# CONFIG_PRISM2_USB is not set
# CONFIG_ECHO is not set
# CONFIG_BRCMUTIL is not set
# CONFIG_BRCMSMAC is not set
# CONFIG_BRCMFMAC is not set
# CONFIG_RT2870 is not set
# CONFIG_COMEDI is not set
# CONFIG_ASUS_OLED is not set
# CONFIG_PANEL is not set
# CONFIG_R8187SE is not set
# CONFIG_RTL8192U is not set
# CONFIG_RTL8192E is not set
# CONFIG_R8712U is not set
# CONFIG_TRANZPORT is not set
# CONFIG_POHMELFS is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_IDE_PHISON is not set
# CONFIG_LINE6_USB is not set
# CONFIG_USB_SERIAL_QUATECH2 is not set
# CONFIG_USB_SERIAL_QUATECH_USB2 is not set
# CONFIG_VT6655 is not set
# CONFIG_VT6656 is not set
# CONFIG_VME_BUS is not set
# CONFIG_DX_SEP is not set
# CONFIG_IIO is not set
# CONFIG_ZRAM is not set
# CONFIG_FB_SM7XX is not set
# CONFIG_VIDEO_DT3155 is not set
# CONFIG_CRYSTALHD is not set
#
# Texas Instruments shared transport line discipline
#
# CONFIG_ST_BT is not set
# CONFIG_FB_XGI is not set
# CONFIG_LIRC_STAGING is not set
# CONFIG_SMB_FS is not set
# CONFIG_EASYCAP is not set
# CONFIG_SOLO6X10 is not set
CONFIG_MACH_NO_WESTBRIDGE=y
# CONFIG_USB_ENESTORAGE is not set
# CONFIG_BCM_WIMAX is not set
# CONFIG_FT1000 is not set
#
# Speakup console speech
#
# CONFIG_SPEAKUP is not set
# CONFIG_TOUCHSCREEN_CLEARPAD_TM1217 is not set
# CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4 is not set
CONFIG_MFD_NVEC=y
CONFIG_KEYBOARD_NVEC=y
CONFIG_SERIO_NVEC_PS2=y
CONFIG_NVEC_POWER=y
CONFIG_NVEC_LEDS=y
# CONFIG_NVEC_EVENT is not set
# CONFIG_ARM_PLATFORM_DEVICES is not set
CONFIG_CLKDEV_LOOKUP=y
#
# Chromeos Supplied Third-Party Device Drivers
#
# CONFIG_GOBI_USBNET is not set
# CONFIG_GOBI_QCSERIAL is not set
#
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
CONFIG_EXT2_FS_SECURITY=y
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=y
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD=y
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=y
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=m
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
CONFIG_REISERFS_FS_SECURITY=y
CONFIG_JFS_FS=m
CONFIG_JFS_POSIX_ACL=y
CONFIG_JFS_SECURITY=y
# CONFIG_JFS_DEBUG is not set
CONFIG_JFS_STATISTICS=y
CONFIG_XFS_FS=m
CONFIG_XFS_QUOTA=y
CONFIG_XFS_POSIX_ACL=y
CONFIG_XFS_RT=y
# CONFIG_XFS_DEBUG is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_EXPORTFS=m
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_FANOTIFY is not set
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
CONFIG_PRINT_QUOTA_WARNING=y
# CONFIG_QUOTA_DEBUG is not set
CONFIG_QUOTA_TREE=y
CONFIG_QFMT_V1=m
CONFIG_QFMT_V2=y
CONFIG_QUOTACTL=y
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_CUSE=m
CONFIG_GENERIC_ACL=y
#
# Caches
#
CONFIG_FSCACHE=m
# CONFIG_FSCACHE_STATS is not set
# CONFIG_FSCACHE_HISTOGRAM is not set
# CONFIG_FSCACHE_DEBUG is not set
# CONFIG_FSCACHE_OBJECT_LIST is not set
CONFIG_CACHEFILES=m
# CONFIG_CACHEFILES_DEBUG is not set
# CONFIG_CACHEFILES_HISTOGRAM is not set
#
# CD-ROM/DVD Filesystems
#
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_ZISOFS=y
CONFIG_UDF_FS=m
CONFIG_UDF_NLS=y
#
# DOS/FAT/NT Filesystems
#
CONFIG_FAT_FS=m
CONFIG_MSDOS_FS=m
CONFIG_VFAT_FS=m
CONFIG_FAT_DEFAULT_CODEPAGE=437
CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
CONFIG_NTFS_FS=m
# CONFIG_NTFS_DEBUG is not set
CONFIG_NTFS_RW=y
#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
# CONFIG_HUGETLB_PAGE is not set
CONFIG_CONFIGFS_FS=m
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_LOGFS is not set
CONFIG_CRAMFS=m
CONFIG_SQUASHFS=m
# CONFIG_SQUASHFS_XATTR is not set
# CONFIG_SQUASHFS_LZO is not set
# CONFIG_SQUASHFS_XZ is not set
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_VXFS_FS=m
CONFIG_MINIX_FS=m
CONFIG_OMFS_FS=m
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
CONFIG_ROMFS_FS=m
CONFIG_ROMFS_BACKED_BY_BLOCK=y
CONFIG_ROMFS_ON_BLOCK=y
# CONFIG_SYSV_FS is not set
CONFIG_UFS_FS=m
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_UFS_DEBUG is not set
CONFIG_NETWORK_FILESYSTEMS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
# CONFIG_NFS_V4_1 is not set
# CONFIG_NFS_FSCACHE is not set
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFS_USE_NEW_IDMAPPER is not set
CONFIG_NFSD=m
CONFIG_NFSD_DEPRECATED=y
CONFIG_NFSD_V2_ACL=y
CONFIG_NFSD_V3=y
CONFIG_NFSD_V3_ACL=y
CONFIG_NFSD_V4=y
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_NFS_ACL_SUPPORT=m
CONFIG_NFS_COMMON=y
CONFIG_SUNRPC=m
CONFIG_SUNRPC_GSS=m
CONFIG_RPCSEC_GSS_KRB5=m
# CONFIG_CEPH_FS is not set
CONFIG_CIFS=m
# CONFIG_CIFS_STATS is not set
CONFIG_CIFS_WEAK_PW_HASH=y
CONFIG_CIFS_UPCALL=y
CONFIG_CIFS_XATTR=y
CONFIG_CIFS_POSIX=y
# CONFIG_CIFS_DEBUG2 is not set
CONFIG_CIFS_DFS_UPCALL=y
# CONFIG_CIFS_FSCACHE is not set
# CONFIG_CIFS_ACL is not set
CONFIG_CIFS_EXPERIMENTAL=y
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set
#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
# CONFIG_ACORN_PARTITION is not set
# CONFIG_OSF_PARTITION is not set
# CONFIG_AMIGA_PARTITION is not set
# CONFIG_ATARI_PARTITION is not set
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
# CONFIG_BSD_DISKLABEL is not set
# CONFIG_MINIX_SUBPARTITION is not set
# CONFIG_SOLARIS_X86_PARTITION is not set
# CONFIG_UNIXWARE_DISKLABEL is not set
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
# CONFIG_SGI_PARTITION is not set
# CONFIG_ULTRIX_PARTITION is not set
# CONFIG_SUN_PARTITION is not set
# CONFIG_KARMA_PARTITION is not set
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_TEGRAPART_PARTITION=y
# CONFIG_NVTEGRA_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_737=m
CONFIG_NLS_CODEPAGE_775=m
CONFIG_NLS_CODEPAGE_850=m
CONFIG_NLS_CODEPAGE_852=m
CONFIG_NLS_CODEPAGE_855=m
CONFIG_NLS_CODEPAGE_857=m
CONFIG_NLS_CODEPAGE_860=m
CONFIG_NLS_CODEPAGE_861=m
CONFIG_NLS_CODEPAGE_862=m
CONFIG_NLS_CODEPAGE_863=m
CONFIG_NLS_CODEPAGE_864=m
CONFIG_NLS_CODEPAGE_865=m
CONFIG_NLS_CODEPAGE_866=m
CONFIG_NLS_CODEPAGE_869=m
CONFIG_NLS_CODEPAGE_936=m
CONFIG_NLS_CODEPAGE_950=m
CONFIG_NLS_CODEPAGE_932=m
CONFIG_NLS_CODEPAGE_949=m
CONFIG_NLS_CODEPAGE_874=m
CONFIG_NLS_ISO8859_8=m
CONFIG_NLS_CODEPAGE_1250=m
CONFIG_NLS_CODEPAGE_1251=m
CONFIG_NLS_ASCII=m
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_2=m
CONFIG_NLS_ISO8859_3=m
CONFIG_NLS_ISO8859_4=m
CONFIG_NLS_ISO8859_5=m
CONFIG_NLS_ISO8859_6=m
CONFIG_NLS_ISO8859_7=m
CONFIG_NLS_ISO8859_9=m
CONFIG_NLS_ISO8859_13=m
CONFIG_NLS_ISO8859_14=m
CONFIG_NLS_ISO8859_15=m
CONFIG_NLS_KOI8_R=m
CONFIG_NLS_KOI8_U=m
CONFIG_NLS_UTF8=m
# CONFIG_DLM is not set
#
# Kernel hacking
#
CONFIG_PRINTK_TIME=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=1
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
# CONFIG_STRIP_ASM_SYMS is not set
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
# CONFIG_LOCKUP_DETECTOR is not set
# CONFIG_HARDLOCKUP_DETECTOR is not set
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
CONFIG_SCHEDSTATS=y
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_DEBUG_KMEMLEAK is not set
CONFIG_DEBUG_PREEMPT=y
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
CONFIG_BKL=y
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_SPARSE_RCU_POINTER is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_LIST is not set
# CONFIG_TEST_LIST_SORT is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
# CONFIG_BOOT_PRINTK_DELAY is not set
# CONFIG_RCU_TORTURE_TEST is not set
# CONFIG_RCU_CPU_STALL_DETECTOR is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# CONFIG_LKDTM is not set
# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
# CONFIG_FAULT_INJECTION is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_PAGE_POISONING is not set
CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_PREEMPT_TRACER is not set
# CONFIG_SCHED_TRACER is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
# CONFIG_STACK_TRACER is not set
CONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
# CONFIG_KGDB is not set
CONFIG_STRICT_DEVMEM=y
CONFIG_ARM_UNWIND=y
CONFIG_DEBUG_USER=y
CONFIG_DEBUG_ERRORS=y
# CONFIG_DEBUG_STACK_USAGE is not set
CONFIG_DEBUG_LL=y
CONFIG_EARLY_PRINTK=y
# CONFIG_DEBUG_ICEDCC is not set
# CONFIG_OC_ETM is not set
CONFIG_HAVE_SECCOMP_FILTER=y
#
# Security options
#
CONFIG_KEYS=y
# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
# CONFIG_SECURITY_DMESG_RESTRICT is not set
# CONFIG_SECCOMP_FILTER is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
# CONFIG_SECURITY_NETWORK_XFRM is not set
CONFIG_SECURITY_PATH=y
CONFIG_LSM_MMAP_MIN_ADDR=0
CONFIG_SECURITY_SELINUX=y
# CONFIG_SECURITY_SELINUX_BOOTPARAM is not set
# CONFIG_SECURITY_SELINUX_DISABLE is not set
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
CONFIG_SECURITY_TOMOYO=y
CONFIG_SECURITY_APPARMOR=y
CONFIG_SECURITY_APPARMOR_BOOTPARAM_VALUE=1
CONFIG_SECURITY_APPARMOR_COMPAT_24=y
# CONFIG_IMA is not set
# CONFIG_DEFAULT_SECURITY_SELINUX is not set
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
CONFIG_DEFAULT_SECURITY_APPARMOR=y
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_DEFAULT_SECURITY="apparmor"
CONFIG_CRYPTO=y
#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD=m
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=y
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG=m
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP=m
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y
CONFIG_CRYPTO_GF128MUL=m
CONFIG_CRYPTO_NULL=m
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
CONFIG_CRYPTO_CRYPTD=m
CONFIG_CRYPTO_AUTHENC=m
CONFIG_CRYPTO_TEST=m
#
# Authenticated Encryption with Associated Data
#
CONFIG_CRYPTO_CCM=m
CONFIG_CRYPTO_GCM=m
CONFIG_CRYPTO_SEQIV=m
#
# Block modes
#
CONFIG_CRYPTO_CBC=y
CONFIG_CRYPTO_CTR=m
CONFIG_CRYPTO_CTS=m
CONFIG_CRYPTO_ECB=y
CONFIG_CRYPTO_LRW=m
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_XTS=m
#
# Hash modes
#
CONFIG_CRYPTO_HMAC=y
CONFIG_CRYPTO_XCBC=m
# CONFIG_CRYPTO_VMAC is not set
#
# Digest
#
CONFIG_CRYPTO_CRC32C=y
CONFIG_CRYPTO_GHASH=m
CONFIG_CRYPTO_MD4=m
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_MICHAEL_MIC=m
CONFIG_CRYPTO_RMD128=m
CONFIG_CRYPTO_RMD160=m
CONFIG_CRYPTO_RMD256=m
CONFIG_CRYPTO_RMD320=m
CONFIG_CRYPTO_SHA1=m
CONFIG_CRYPTO_SHA256=m
CONFIG_CRYPTO_SHA512=m
CONFIG_CRYPTO_TGR192=m
CONFIG_CRYPTO_WP512=m
#
# Ciphers
#
CONFIG_CRYPTO_AES=y
CONFIG_CRYPTO_ANUBIS=m
CONFIG_CRYPTO_ARC4=y
CONFIG_CRYPTO_BLOWFISH=m
CONFIG_CRYPTO_CAMELLIA=m
CONFIG_CRYPTO_CAST5=m
# CONFIG_CRYPTO_CAST6 is not set
CONFIG_CRYPTO_DES=y
CONFIG_CRYPTO_FCRYPT=m
CONFIG_CRYPTO_KHAZAD=m
CONFIG_CRYPTO_SALSA20=m
CONFIG_CRYPTO_SEED=m
CONFIG_CRYPTO_SERPENT=m
CONFIG_CRYPTO_TEA=m
CONFIG_CRYPTO_TWOFISH=m
CONFIG_CRYPTO_TWOFISH_COMMON=m
#
# Compression
#
CONFIG_CRYPTO_DEFLATE=y
CONFIG_CRYPTO_ZLIB=m
CONFIG_CRYPTO_LZO=y
#
# Random Number Generation
#
CONFIG_CRYPTO_ANSI_CPRNG=m
# CONFIG_CRYPTO_USER_API_HASH is not set
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
# CONFIG_CRYPTO_DEV_TEGRA_AES is not set
CONFIG_BINARY_PRINTF=y
#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=y
CONFIG_CRC16=y
CONFIG_CRC_T10DIF=y
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
CONFIG_CRC7=y
CONFIG_LIBCRC32C=y
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=y
CONFIG_ZLIB_DEFLATE=y
CONFIG_LZO_COMPRESS=y
CONFIG_LZO_DECOMPRESS=y
# CONFIG_XZ_DEC is not set
# CONFIG_XZ_DEC_BCJ is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_TEXTSEARCH=y
CONFIG_TEXTSEARCH_KMP=m
CONFIG_TEXTSEARCH_BM=m
CONFIG_TEXTSEARCH_FSM=m
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_NLATTR=y
CONFIG_AVERAGE=y

Sources

Originally written by louigi600[3671]

howtos, template

Slackware Package naming convention

Author: Stuart Winter <mozes at slackware.com>

Date….: 18-Mar-2020

Version : 1.00

Purpose : Provide a best practice for naming packages for Slackware ARM.

ARM package naming convention

Exposition of the package name format:

  foo-1.0-arm-1.txz
foo=the package name
1.0=the version of the package (as set by its authors)
arm=the target architecture for which this package is built
1=the build number
txz=file extension of a compressed tar archive, using the 'xz' compression utility.

In Slackware ARM, the 'arm' label is relative to the particular release of Slackware ARM; it simply means that the software is compiled to target the baseline architecture, as configured in the gcc package:-

On a Slackware ARM 15.0 release:

root@zippy:~# gcc -Q --help=target | egrep '^. -(march|mfloat-abi)='
-march=                             armv7-a+fp
-mfloat-abi=                        hard

On a Slackware ARM 14.2 release:
root@zaden-142:~# gcc -Q --help=target | egrep '^. -(march|mfloat-abi)='
-march=                             armv2
-mfloat-abi=                        soft

Note: this is supposed to be 'armv5te' - something must have gone wrong in the last gcc package! However, since the build scripts set -march=armv5, it's not an issue.

This is no different from having the following package for Slackware on 32bit x86 architecture:

  foo-1.0-i586-1.txz

You could not determine - from the package name alone - whether this was from Slackware 14.2 or Slackware 15.0!

Exceptions

In Slackware ARM, the only exception to this rule is when a package could build, but only for a target architecture that was greater than the baseline.

For example, in Slackware ARM 14.2, we find the following package available within the 'unsupported' directory on the FTP site[3672].

  'mozilla-firefox-34.0.5-armv6j-1_slack14.1.txz'

This was made available outside of the main tree for two reasons:

It had to be built on a machine that wasn't armv5. All build machines must be the baseline target - otherwise it can cause problems where packages are built that *don't* run on the baseline (due to auto-detection of platform features at build time).

Ordered List ItemThe package cannot run on a machine whose architecture version is ⇐armv6j

and as such, shouldn't be within the main Slackware ARM distribution tree.

In this instance, armv6j was the lowest architecture that the package would build for: the Firefox developers had already abandoned support for armv5 hardware because (IIRC) they wanted the hardware support within the newer architecture, to render web pages/media, etc.

With these exceptions, the architecture element of the package reflects the target architecture to make it clear that this package requires an ARM-based computer where the architecture is a minimum of armv6j.

But what about soft/hard float!?

Essentially the ABI defines the structures and conventions about how the components of the OS (binaries/libraries, etc.) interact.

Slackware ARM has been through three ABI (Application Binary Interface) changes:

Releases older than 12.2 used (what Debian call) the 'legacy' or 'old' ABI. This was the first ABI for ARM.

Slackware ARM 13.37 up to and including 14.2 were built against the 'software floating point' ABI.

Slackware ARM 15.0 and greater are built against the 'hardware floating point' ABI.

It doesn't matter what the ABI is called: it just matters that users know which version of Slackware ARM your package is targeting, because each of the ABIs is incompatible with one another.

In the Slackware x86 source tree, some of the SlackBuild scripts - when built on armv7 hardware - may cause the architecture element of the package name to be 'armv7'. However, this is legacy code for alienBOB's work on an earlier ARM hardware floating point port.

The reason it isn't helpful to name the architecture element of the package as anything other than 'arm' (apart from the exception noted above), is due to the ABI. You could build the same package on three releases of Slackware ARM (one with legacy ABI, one with soft ABI, one with hard), set the CFLAGS to be -march=armv3 (so that the compiler emitted code that could run on all ARM architectures that were ever supported by Slackware ARM), and name it thusly:

  foo-1.0-armv3-1.txz

And despite every ARM computer currently running in the world (presumably) being able to execute ARMv3 instructions, it'd fail because the ABI is different.

Apart from in relation to the exceptions (as apreviously noted), it's simply an unhelpful and useless distinction.

Recommendations for naming packages that you intend on distributing

When distributing packages you cannot assume that even if the ABI remains constant across Slackware releases, that your package would work on more than one Slackware release.

This is because the environment around it changes! If your package is dynamically linked, it may be linked to multiple libraries, which are either not present within that Slackware release, or are at different major versions and as such may have a different API (Application Programming Interface).

Therefore, the most simple naming scheme recommendation is to adopt how the Slackware patches are named:

 foo-1.0-arm-1_slack14.2.txz

This way it's clear that:

The architecture is 'arm', not i586, x86_64, aarch64

Is targeting Slackware 14.2.

But I'm distributing packages for -current!

In which case you'd be better with an additional tag, such as

 foo-1.0-arm-1_slack14.2+.tgz

Appending the '+' to the version of Slackware is the convention present within /etc/slackware-release, whenever a release of Slackware is made and the new development branch ('-current') begins.

This is on a machine running the Slackware 14.2 release:

root@zaden-142:~# cat /etc/slackware-version
Slackware 14.2

This is on a machine, running Slackware-current, at a point in time where the previous release of Slackware was 14.2. Note the '+' suffix:

root@zippy:~# cat /etc/slackware-version
Slackware 14.2+

This is better than trying to guess what the next version of Slackware might be and setting your build number to, say, '-1_slackpre15.0'.

Also, it might not be wise to distribute binary packages for -current because you will continuously need to check whether they function, as the development of Slackware-current rolls on (refer to the discussion about libraries above).

I hope that helps!

Sources

The original document is stored here[3673].

howtos, arm, author , mozes

Slackware ARM on the Hummingboard

There are many ARM devices on the market at the moment, with even more appearing regularly, and it's not possible to provide support for them all in the main Slackware tree.

The Hummingboard, by Solidrun[3674], is supported outside of the official Slackware tree by the Slackware community.

The Cubox-i[3675] is totally compatible with the Hummingboard and can install and run the same Slackware ARM software.

Slackware 14.1, 14.2

Unfortunately, the community project that supported the Hummingboard is no longer active.

Sources

Originally written by Exaga[3676]

howtos, hardware, arm, author exaga

CPU-frequency scaling on Slackware

Overview

CPU frequency scaling is carried out by the kernel, but requires that the relevant UEFI/BIOS options be enabled, such as Intel (Enhanced) Speedstep. Slackware comes with all requirements necessary to use this feature.

Kernel Config Requirements

The kernel options for CPU frequency scaling are as follows. You need both a governor (one set to default) and a driver. The Slackware default governor is 'userspace'.

Power management and ACPI options

CPU Frequency scaling

CPU Frequency scaling (CPU_FREQ [=y])

'performance' governor (CONFIG_CPU_FREQ_GOV_PERFORMANCE)
This sets CPU frequency to the maximum available.

'powersave' governor (CONFIG_CPU_FREQ_GOV_POWERSAVE)
This sets CPU frequency to the minimum available.

'userspace' governor for userspace frequency scaling (CONFIG_CPU_FREQ_GOV_USERSPACE)
This allows userspace programs to set the CPU frequency.

'ondemand' cpufreq policy governor (CONFIG_CPU_FREQ_GOV_ONDEMAND)
This governor is recommended for desktops.

'conservative' cpufreq governor (CONFIG_CPU_FREQ_GOV_CONSERVATIVE)
This governor is recommended for laptops/netbooks. Although similar to the 'ondemand' governor, frequency is gracefully increased and decreased rather than jumping to 100% when speed is required.

x86 CPU frequency scaling drivers

Intel P state control (X86_INTEL_PSTATE [=n])
This driver is mutually exclusive with CONFIG_X86_ACPI_CPUFREQ. It is a newer driver for Sandy Bridge processors and may cause problems[3317].

Processor Clocking Control interface driver (CONFIG_X86_PCC_CPUFREQ)
This is only required for HP ProLiant servers, which use this interface. Otherwise, disable it.

ACPI Processor P-States driver (CONFIG_X86_ACPI_CPUFREQ [=y])
This is the recommended driver for newer CPUs Intel (Enhanced) Speedstep enabled and AMD K10 and newer.

AMD Opteron/Athlon64 PowerNow! (CONFIG_X86_POWERNOW_K8)
This is for K8/early Opteron/Athlon64 processors.

Intel Enhanced SpeedStep (deprecated) (CONFIG_X86_SPEEDSTEP_CENTRINO [=n])
This is a deprecated option that has been superseded by CONFIG_X86_ACPI_CPUFREQ, so leave this disabled.

Intel Pentium 4 clock modulation (CONFIG_X86_P4_CLOCKMOD [=n])
This is a hack for Pentium 4s that may cause severe slowdowns and noticeable latencies, so disable it.

It is recommended that the drivers be built-in to the kernel. If they are not, they may load automatically or you may have to load them yourself.

Checking the CPU frequency settings

Slackware comes with the cpufrequtils package which helps to configure frequency scaling in an appropriate manner. You can check the settings on your system with the command

cpufreq-info

Or if you don't have the package installed:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
cat /proc/cpuinfo

where “cpu*” is the CPU you want the info on, for example cpu0.

Setting the CPU frequency settings

The cpufreq-set command can be used to set the appropriate governor.

Adding the following to the /etc/rc.d/rc.local file

# CPU-frequency scaling
cpufreq-set --cpu 0 --governor conservative
cpufreq-set --cpu 1 --governor conservative

will set the governor to 'conservative' on each boot.

The same can be done using sysfs:

echo "conservative" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "conservative" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor

If you have Turbo Boost enabled in the UEFI/BIOS, you can turn boost on (1) or off (0) by running:

echo 1 > /sys/devices/system/cpu/cpufreq/boost

as long as the interface exists.

Further reading

The manpages for cpufreq-info and cpufreq-set are useful.

The kernel Documentation/cpu-freq directory contains detailed explanations of CPU frequency drivers, governors, and other settings.

A decent explanation of P states and how they are handled in the kernel: https://plus.google.com/+ArjanvandeVen/posts/dLn9T4ehywL[3318]

Sources

Originally written by Markus Hutmacher[3319]

Updated by metaschima[3320]

Descriptions of kernel options in make menuconfig.

howtos, CPU, frequency, Laptop

Proprietary Graphics Drivers

The X.Org X11 graphical system provides many drivers, supplying at least 2D video acceleration for most video cards; however, if a system is equipped with a GPU from AMD (ATI) or nVIDIA, proprietary binary drivers can be downloaded from the web sites of both these vendors and installed.

The aim of this article is to outline the various methods of installation and configuration of these proprietary drivers in Slackware.

AMD (ATI) Catalyst Driver Installation and Configuration

AMD are dropping support for older cards (4xxx and downwards) in the current (12.6) and future releases of the proprietary drivers, so please make sure that your card is still supported. If it is not, then the open source xf86-video-ati driver should be sufficient, albeit a bit slower than the proprietary version.

Note: the driver will not work on 14.2 because Catalyst supports only Xorg 1.17 and 3.19 (or no?).

Download

Note that the installer will compile a driver (fglrx) and it needs the kernel-modules and kernel-source packages to be installed. The following steps are valid for both the UI and the CLI[3321] version of the installer.

Installation

The following instructions are for creating an installation package suitable for Slackware. It is generated automatically by the installer and seems to be working just fine in most cases. There is also an 'automated' installation method.

The Catalyst and driver suite for Linux can be downloaded from this link[3322]. The file is suitable for both 32 and 64 bit.

After downloading, unzip the file with:

$ unzip amd-driver-installer-VERSION-x86.x86_64.zip

Next, switch to root with:

$ su -

CD to the folder which contains the 'run' file and run the installer with:

# sh amd-driver-installer-VERSION-x86.x86_64.run

The installer will collect data about your system and will prompt for either an automatic installation or to create a distribution-specific package. Select distribution-specific package here, as it can then be managed by Slackware's packaging tools later.

When prompted to select a distribution, please Select “Detected OS: Slackware/Slackware”.

After it has finished building, The installer will generate an installation package in the same directory as the the 'run' file and you can now do:

# installpkg fglrx-VERSION-x86-1.tgz

If any errors were detected during installation you can see them in /usr/share/ati/fglrx-install.log.

Configuration

You will need to reboot the system for it to make use of the new drivers. Before doing so you need to edit /etc/modprobe.d/blacklist.conf (or create a new file: /etc/modprobe.d/radeon_blacklist.conf) and add the following lines to the file:

blacklist radeon
blacklist radeonhd

Next you can create a new X.Org configuration file by running:

# aticonfig --initial -f

X.Org does not usually require an /etc/X11/xorg.conf file, but in some cases (usually older cards) it is necessary to add the following line in the fglrx 'Device' section:

Option "SWCursor" "true"

If there were no errors and the driver was installed successfully, you should reboot now for the drivers to be used.

Testing

After rebooting, you can test the drivers by running:

$ fgl_glxgears

This should display rotating gears that run smoothly without glitches.

You can also run:

$ glxinfo

Have a look at the first few lines of output to see if DRI is enabled. If it is not, then you need to do a bit more work, because the package creation built into the ati installer is quite old (pre official 64bit Slackware) and some files need to be moved around to make it work on the 14.1 version of Slackware. A package for slackbuilds.org that fixes the problem is being worked on, but in the meantime you can try a manual solution posted here (linuxquestions post)[3323] ,or if all else fails, the automatic installation option should work.

Automatic un-install

If you chose to install the package automatically and you need to uninstall the drivers, you can run the installer with an additional uninstall argument, like this:

# sh amd-driver-installer-VERSION-x86.x86_64.run --uninstall

Or call the uninstall script directly with:

#/usr/share/ati/amd-uninstall.sh

No matter how it was installed, uninstalling the fglrx driver will “break” mesa as some files get moved around. It is advised that you re-install mesa. Also, if you want to revert to the kernel's own radeon/radeonhd drivers, you will have to remove the blacklist lines which you added earlier.

nVIDIA Driver Installation and Configuration

Installation via SlackBuilds.org

Edward Koenig maintains the libvdpau, nvidia-driver and nvidia-kernel packages at SlackBuilds.org[3324]

All three packages are required to have a functioning nVIDIA driver. The nvidia-kernel package builds the kernel module, the nvidia-driver package builds the X.Org driver and contains the OpenGL implementation as well as the COMPAT32 libraries for use on a multilib[3325] Slackware64 system. The libvdpau package is a requirement of the nvidia-driver package.

''nouveau'' Module Removal

The first step in the driver installation is to blacklist the nouveau driver. Failure to do so may result in a startx error of “ERROR: could not insert 'nvidia': No such device”.

Blacklisting the nouveau driver is done by installing the xf86-video-nouveau-blacklist package from the “extra” directory of the Slackware version. This can be accomplished by using the install CD or DVD, obtaining the file from a Slackware mirror, or using the slackpkg utility.

Package Installation

There are currently two ways to install packages from SlackBuilds.org:

by downloading the appropriate build scripts from SBo[3326], and following the SlackBuild installation procedure

by using the tool sbopkg[3327] which automates downloading the sources and the sequential compilation/installation of multiple packages.

Once the packages have been installed via the instructions accompanying each SlackBuild, the X11 server can be started with full GPU support.
To configure X11 to start automatically, please see “Starting X11 with nvidia GPU Support” in the following section.

Troubleshooting

Installation via the nVIDIA Binary

Installing the nVIDIA binary driver involves the following steps:

Downloading the appropriate nvidia driver installer package

Disabling and unloading the nouveau driver

Installing the nvidia driver

Optionally, configuring the system to start the graphical interface automatically

The following tip lists the key steps for installing the nvidia driver. The full article follows.

For those who just want the appropriate commands, here is a summary of the following:

Go to the nVIDIA Unix Drivers website[3328] and download the appropriate driver. The name of the driver package will be something like “NVIDIA-Linux-ARCH-VERSION.run” where ARCH is the computer's processor architecture and VERSION is the driver version.

Ensure that X11 is not running; if it is, exit it and login to the text console

Logged in as root, run the nVIDIA installer with

# sh /path/to/NVIDIA-Linux-ARCH-VERSION.run

If prompted to blacklist nouveau, do so and restart

Launch the installer with root permissions once more after restarting

At a minimum, choose to accept the license and install the driver. Please consult the nVIDIA Installer Options section for automatic installer options.

If nvidia-xconfig is not run by the installer, then it can either be run upon exiting the installation and before launching the X11 server or the “/etc/X11/xorg.conf” file should be edited manually.

Downloading the Appropriate nVIDIA Driver Binary Installer

The first step is to download the appropriate driver from the nVIDIA Unix Drivers website [3329]. For 64-bit Slackware (including multilib[3330] systems) you should download the “Linux x86_64/AMD64/EM64T” driver package, while 32-bit Slackware needs the “Linux x86/IA32” driver. Your safest bet for picking the correct version is to use the “Latest Long Lived Branch version” but in some cases (very new graphics card, or display issues which you are trying to resolve) you might want to choose “Latest Short Lived Branch version” instead.
Older legacy drivers are available as well for graphics cards which are no longer current. When you select a driver, a list of compatible GPUs will be displayed. Once you have determined the correct driver, the license will need to be accepted and the file saved in an accessible location. Before running the installer, there are some other actions that must be taken.

Disabling the nouveau Module

In general, an nVIDIA GPU will be detected by the Slackware system, and the “nouveau” OSS graphics driver will be enabled on the system. This will allow 3D video acceleration on many cards. The nouveau and nvidia modules are incompatible; thus, before proceeding with the installation of the nvidia module, the nouveau module must be removed and kept from being loaded automatically on boot by the kernel.

To accomplish this, a file must be created in the “/etc/modprobe.d/” directory containing the text

blacklist nouveau
options nouveau modeset=0

and named appropriately; for instance, “disable_nouveau.conf”

The first line will block the nouveau module from being loaded automatically during start-up. The module will still be able to be loaded manually by a user or by the X server. Thus, the second line is added, so that should the nouveau module be loaded, it will be prevented from doing a kernel modeset, allowing the module to be unloaded.⁵⁶⁾

As mentioned in the modprobe.d README file, the monolithic module blacklist file has been split into smaller files and stored under /lib/modprobe.d/ However, a .conf file in the /etc/modprobe.d/ directory will override one in /lib/modprobe.d/ This is thus a more sure way to block the loading of the nouveau driver.

After displaying an error to the effect that the nouveau and nVIDIA proprietary drivers are incompatible, newer nVIDIA installers will prompt for permission to create a .conf file to blacklist nouveau in /etc/modprobe.d/ which will be named nvidia-installer-disable-nouveau.conf By default, the contents of this file will be:

# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0

The installer will then state that it has failed and request that the system be restarted to put changes into effect. Once the system has been restarted, the nouveau driver will no longer be loaded, and installation of the binary driver can continue.

Alternately, the package xf86-video-nouveau-blacklist from the “/extra” directory of the Slackware installation media should be installed. Once installed, the system should be restarted, at which point driver installation can continue.

nVIDIA Binary Driver Installation

nVIDIA binary driver installation can not be completed while the X11 Window System is active.

The default behavior of Slackware is to boot into a text-only terminal. In this case, the nVIDIA installer can simply be run. However, if the graphical environment was already launched, it must be exited. If lunched with the “startx” command, closing the graphical environment can be accomplished by logging out or, and only if necessary, pressing Ctrl+Atl+Bksp.

If using a graphical login manager, such as KDM, simply exiting via the menu or pressing Ctrl+Alt+Bksp will not work because the graphical login manager will be restarted automatically.
The best way to shut down X gracefully is by logging off, switching to a conole terminal by pressing Alt+F2, logging into the console as root and running:

telinit 3

Another method to return to the console, crude and thus not recommended but effective if necessary, is to stop/kill the DM and then exit the X Server by pressing Ctrl+Atl+Bksp. For example, KDM can be killed by issuing the command

killall -9 kdm

Again, this should only be used if other methods fail.

Once X11 is no longer running, the nVIDIA installer can be launched as root. Either log in as root or issue the “su -” command, then run the installer. Sometimes, it is advantageous to run the installer using some of the available command-line options. For more information, consult “nVIDIA Installer Options” at the end of this section.

$ su -
Password:
# sh /path/to/NVIDIA-Linux-ARCH-VERSION.run

When the installer is launched without any command line options and excepting any errors, the installation will proceed as follows:

The installer will extract itself and start an ncurses interface. The first step is to accept the license terms.

When installing the module for a system that has no previous version, the installer will begin to build the module. If, however, a previous nVIDIA driver was found, the installer will prompt for permission to remove the previous driver as part of the new installation. To proceed with the installation, permission should be granted to remove the previous installation.

After building the module on x86_64 systems, the installer will prompt about installing nVIDIA's 32-bit compatibility OpenGL libraries. You will only need the 32-bit compatibility libraries if your Slackware is 64-bit multilib[3332].

Next, in the case of a previous version, the installer will uninstall the module.

Once no conflicting X and (should this option be chosen) OpenGL files are found, the module will be installed.

The program will then offer to use the nvidia-xconfig utility to modify the xorg.conf file to reflect the change in video drivers. This utility often works, but could possibly change other values in xorg.conf. It does, however, back-up the original file to “/etc/X11/xorg.conf.nvidia-xconfig-original”

A prompt confirms that the driver installation is complete and was a success, at which point the program exits to the console.

The nvidia module should now be installed for the currently running kernel.

You must create an X.Org configuration file which loads the binary Nvidia driver if you decided not to let the nvidia-xconfig utility modify your computer's xorg.conf file. The X.Org of Slackware supports individial “*.conf” files in a directory /etc/X11/xorg.conf.d. Any file with a .conf extension will be included together with the main /etc/X11/xorg.conf file.
You could create for instance a file named /etc/X11/xorg.conf.d/10-nvidia.conf with the following content:

Section "Device"
Identifier  "Device0"
Driver  "nvidia"
VendorName "Nvidia Corporation"
BoardName ""
EndSection

Without this definition, you will not get accelerated Nvidia GPU support! X.Org would fall-back to VESA mode because the nouveau driver has been blacklisted. The kernel will not auto-detect the binary driver as opposed to the nouveau driver.

Starting X11 with nvidia GPU Support

All that remains is to start the X.org server. This can be accomplished by configuring Slackware to start in runlevel 4, which will start a graphical login manager, such as KDM or XDM, on boot. If you want this, then you need to edit the file “/etc/inittab” and change the line

id:3:initdefault:

to

id:4:initdefault:

Otherwise you can login to a user account and issue the “startx” command to start an X session.

By default, startx will start the window manager which was chosen during installation. To change this behavior, the file “.xinitrc” in the user's home directory can be edited to start a different WM.
Alternatively, the default WM can be altered on a per-user basis by using the command “xwmconfig” and selecting one of the available WM's.

nVIDIA Installer Options

The nVIDIA Installer has many options available to the system maintainer which can be accessed by running the installer with the -A option:

# sh ./NVIDIA-Linux-ARCH-VERSION.run -A

Some common options are

-a, --accept-license : bypasses the nVIDIA license screen. By doing so, the license is accepted.

--update : check for an updated driver on the nVIDIA website; if it exists, automatically download and install the new version.

--uninstall : removes the nVIDIA driver and other files installed previously.

-q, --no-questions : assumes default answers to all questions. Note: does not automatically accept the license.

-s, --silent : runs the binary installer without a curses UI, automatically accepts the license and uses the default answers for all questions.

Troubleshooting

Sources

nVidia section originally written by rinias[3333]

howtos, software, nvidia, author rinias

⁵⁶⁾

ftp://download.nvidia.com/XFree86/Linux-x86_64/256.44/README/commonproblems.html[3331]

What is SMART ?

SMART/S.M.A.R.T stands for Self-Monitoring, Analysis and Reporting Technology. It is basically a system that collects information about a hard disk drive (HDD) and solid state drive (SDD), and allows you to run some tests on the drive to determine its approximate health.

It is important to note that SMART is far from perfect. Although a failed “Pre-fail” SMART attribute predicts failure, having no failed attributes does NOT mean the drive is not failing. The drive can be failing with above threshold attributes. This leads us to the next section backing up your data.

Backing up your data

According to CERT[3334] you should follow the 3-2-1 rule:

3 - Keep 3 copies of any important file: 1 primary and 2 backups.
2 - Keep files on 2 different media types to protect against different types of hazards.
1 - Store 1 copy offsite (e.g. outside your or business facility).

In summary, keep 3 backups: 1 primary, 1 onsite, 1 offsite. This is of critical importance because your device can fail at any time without warning and for various reasons. Backing up your data is the only way to be reasonably sure that you won't lose it. You CANNOT rely on SMART to reliably tell you when your HDD is going to fail and to do so in due time to allow you to save your data.

SMART Attributes

In order to be able to use SMART you need:

A HDD or SSD that supports SMART

SMART enabled in the UEFI/BIOS

Software to interface with SMART

Some commonly used software to interface with SMART is smartmontools[3335], or you can find individual manufacturer's utilities on UBCD[3336]. Some people prefer smartmontools because it is easily accessible from the command line. Others prefer the manufacturer's utilities because they sometimes have more features than smartmontools. Which is better is mostly down to user preference and the details of the situation. For this article we will focus on smartmontools and more specifically smartctl.

In order to display the SMART attributes with smartmontools you need to run the following as root:

smartctl -a /dev/sda

Note that we will be assuming that /dev/sda is your HDD/SSD device node. In many cases this is the first HDD/SSD on the system, but you need to double check to make sure it is the HDD/SSD you are interested in.

The output will be something like:

bash-4.2# smartctl -a /dev/sda
smartctl 5.43 2012-06-30 r3573 [x86_64-linux-3.10.63] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net
=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda (SATA 3Gb/s, 4K Sectors)
Device Model:     ST1000DM003-1CH162
Serial Number:    Z1D6DR9C
LU WWN Device Id: 5 000c50 064a62447
Firmware Version: CC49
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ACS-2 (unknown minor revision code: 0x001f)
Local Time is:    Sun Jan  4 16:02:08 2015 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status:  (0x82)	Offline data collection activity
was completed without error.
Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0)	The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: 		(  584) seconds.
Offline data collection
capabilities: 			 (0x7b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities:            (0x0003)	Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability:        (0x01)	Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: 	 (   1) minutes.
Extended self-test routine
recommended polling time: 	 ( 111) minutes.
Conveyance self-test routine
recommended polling time: 	 (   2) minutes.
SCT capabilities: 	       (0x3085)	SCT Status supported.
SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate     0x000f   118   099   006    Pre-fail  Always       -       168101376
3 Spin_Up_Time            0x0003   097   097   000    Pre-fail  Always       -       0
4 Start_Stop_Count        0x0032   100   100   020    Old_age   Always       -       425
5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       0
7 Seek_Error_Rate         0x000f   069   060   030    Pre-fail  Always       -       9675211
9 Power_On_Hours          0x0032   096   096   000    Old_age   Always       -       3982
10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
12 Power_Cycle_Count       0x0032   100   100   020    Old_age   Always       -       433
183 Runtime_Bad_Block       0x0032   100   100   000    Old_age   Always       -       0
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   100   000    Old_age   Always       -       0
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   071   063   045    Old_age   Always       -       29 (Min/Max 20/29)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       25
193 Load_Cycle_Count        0x0032   100   100   000    Old_age   Always       -       504
194 Temperature_Celsius     0x0022   029   040   000    Old_age   Always       -       29 (0 18 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       12154757451688
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       14098900823
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       800819281
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Extended offline    Completed without error       00%      3005         -
# 2  Extended offline    Completed without error       00%      2008         -
# 3  Extended offline    Completed without error       00%      1014         -
# 4  Extended offline    Completed without error       00%        13         -
SMART Selective self-test log data structure revision number 1
SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
1        0        0  Not_testing
2        0        0  Not_testing
3        0        0  Not_testing
4        0        0  Not_testing
5        0        0  Not_testing
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.

This is just an example from my current HDD. Technically smartctl -a lists everything, not just attributes, but the whole output is more useful than just the attributes. Some things to note on the output is that SMART support is available and enabled. If it is not available then your device may not support SMART, which can occur if this is an external HDD with a cheap enclosure or if the device is not a HDD/SSD. If it is not enabled, go into your UEFI/BIOS settings and enable it. Also note SMART overall-health self-assessment test result: PASSED, it should be PASSED unless your HDD is failing.

Note the line Auto Offline Data Collection: Enabled, this is a feature that is enabled by default on modern internal HDDs. man smartctl explains what this feature does and how to enable it:

       -o VALUE, --offlineauto=VALUE
[ATA only] Enables or disables  SMART  automatic  offline  test,
which  scans  the  drive every four hours for disk defects. This
command can be given during normal system operation.  The  valid
arguments to this option are on and off.

This also updates attributes that are marked Offline. Unlike Always updated attributes, Offline attributes are only updated if this is enabled or if you run a SMART test.

Note also that the approximate times for running various tests are listed. We will discuss SMART tests in the next section.

Now about the attributes, their meaning is summarized in man smartctl:

              Each  Attribute  also has a Threshold value (whose range is 0 to
255) which is printed under the heading "THRESH".  If  the  Nor-
malized value is less than or equal to the Threshold value, then
the Attribute is said to have failed.  If  the  Attribute  is  a
pre-failure Attribute, then disk failure is imminent.
The Attribute table printed  out  by  smartctl  also  shows  the
"TYPE"  of  the  Attribute.  Attributes  are one of two possible
types: Pre-failure or Old age.  Pre-failure Attributes are  ones
which, if less than or equal to their threshold values, indicate
pending disk failure.  Old age, or usage  Attributes,  are  ones
which  indicate end-of-product life from old-age or normal aging
and wearout, if the Attribute value is less than or equal to the
threshold.   Please  note: the fact that an Attribute is of type
'Pre-fail' does not mean that your disk is about  to  fail!   It
only  has  this  meaning  if  the Attribute´s current Normalized
value is less than or equal to the threshold value.
If  the  Attribute´s  current  Normalized  value is less than or
equal to the threshold value, then the "WHEN_FAILED" column will
display  "FAILING_NOW".  If not, but the worst recorded value is
less than or equal to the threshold value, then this column will
display "In_the_past".  If the "WHEN_FAILED" column has no entry
(indicated by a dash: ´-´) then this Attribute is  OK  now  (not
failing) and has also never failed in the past.

Thus, the most important attributes are marked Pre-fail. If the value of a Pre-fail attribute is below threshold, the attribute is failing implying that the HDD is failing. A failing attribute will be marked as FAILING_NOW or In_the_past if it has failed now or in the past, respectively. Old_age attribute failures do NOT necessarily mean imminent failure, but rather that the drive is getting old and it should be monitored more carefully or replaced at some point.

For the exact meaning of each attribute, please see the Wiki[3337] page. Some specific attributes that I would like to discuss are as follows:

#4 Start_Stop_Count and #12 Power_Cycle_Count and #193 Load_Cycle_Count

This attribute is important for laptop HDDs, because they default to powering off when not in use. Now, although laptop HDDs are designed to spin up and down more times than desktop HDD and this is an Old_age attribute, it still wears down the drive. Unless you run on batteries all the time you may want to consider turning off this feature by adding this to a boot script such as /etc/rc.d/rc.local:

hdparm -B 254 /dev/sda

#9 Power_On_Hours

This is the age of the drive in hours. This is rather important because it tells you how old the drive is and thus how likely it is to fail. HDD failure among other things follows the Bathtub curve[3338]. As such, the highest failure rate is among very young (infant mortality) and very old (worn out) drives. This is important because I hear many people saying, “Oh, but the drive is brand new, it can't be failing.” Wrong, a new drive is more likely to fail than a middle-aged drive, much like an old drive.

#174 Unexpected power loss count and #192 Power-Off_Retract_Count

Sudden power loss is detrimental to both HDDs and SSDs[3339]. UPS power backups should be used for systems that are on all time for this reason as well as many others. Make sure to also shutdown your computer properly whenever possible to prevent damage and data loss.

#190 Airflow_Temperature_Cel and 194 Temperature_Celsius

Although many people believe that HDDs should be kept cool and are sensitive to heat, a large Google internal study[3340] suggests that high temperatures are only significantly detrimental to old HDDs.

Bad Blocks (#5, 196, 197, 198)

Bad blocks are basically areas of the disk surface that are damaged and can no longer hold data reliably. Internally the HDD/SSD deals with these by marking them and remapping/reallocating them to other areas. Bad blocks increase with the age of the drive. It can be expected that you will encounter bad blocks with every HDD and SSD. The question is when does this become something to be concerned about ? That is hard to say, and in general you will have to deal with each device on an individual basis. A large increase in the number of bad blocks could mean the drive in nearing its end. Keep monitoring the Pre-fail attributes and decide when to change it out.

SMART Tests

There are 3 main types of SMART tests that you can perform.

short: a superficial test that tests electrical and mechanical performance and updates offline attributes

conveyance: identifies damage during transport (mostly useful for external or laptop HDDs)

long: a short test plus it scans the disk surface for bad blocks

These tests are run with the -t option like:

smartctl -t long /dev/sda

These tests can all be run on a running system without major side-effects. If you expect the long test to finish, you should minimize HDD usage as it has to scan the whole disk to finish the test.

After waiting for the test to finish, you can get the results using the -a option as shown in the previous section.

Short and Conveyance tests should always pass. If these fail, check the attributes as the drive is probably failing. A long test can fail if there are bad blocks, and this does NOT mean the drive is failing. The long test stops when it finds an error on the disk, so if there is a bad block it just stops. This doesn't mean the drive is failing, but you will have to wait for the HDD to remap/reallocate the block, or technically you could try to force it to do so: http://www.smartmontools.org/browser/trunk/www/badblockhowto.xml[3341] However, this method is difficult to implement safely, so you should usually just wait for the HDD to remap/reallocate.

How often should you run these tests ? That depends. If you run a server then more often is better, the smartmontools site recommends weekly tests. For a home user, I usually run a long test every 1000 power on hours, but that is up to you and also depends on the details of the drive and situation.

Is my drive failing ?

A failing drive is defined as:

Having a Pre-fail attribute below or near threshold, marked FAILING_NOW or In_the_past.

Having an Old_age attribute below or near threshold, marked FAILING_NOW or In_the_past PLUS other signs of failure such as consistent failure of SMART tests, strange noises, slowing down, corrupt data, etc.

A failed long test does NOT mean your drive is failing, it could be just bad blocks. See previous section.

Do not ignore your senses, if the HDD sounds unusual or makes strange noises, monitor it closely and/or replace it. Again, SMART cannot tell you with great accuracy if or when the drive will fail. The drive can fail with above threshold attributes and minimal signs. The only hope you have to keep your data safe is to backup your data, use the 3-2-1 strategy as mentioned above.

smartd

What is smartd ? It is a daemon that monitors SMART. So if you don't want to manually monitor and run tests, you can set up smartd to run them on a regular basis. You should refer to man smartd and man smartd.conf and /etc/smartd.conf for everything you need to know about setting up smartd to do what you want it to do.

Sources

Wiki[3342]

CERT Data Backup Options[3343]

man smartctl

howtos, template

←-Reviewed 20130113 by hazel –>

Multi CPU performance tuning

The Linux SMP kernel (Symmetric Multi Processing - enabled in all 64-bit Slackware kernels as well as the 32-bit “-smp” kernels) does a good job of scheduling processes so that they take maximum advantage of your multiple CPU's or CPU cores.

In some cases however, you will want to be able to override the default behavious of the kernel's scheduler - and limit one of your processes to run on a particular CPU or sub-set of CPU cores. This is called “forcing processor affinity[3344]” or CPU pinning.

Processor affinity

For the sake of article clarity, let's talk about multi-core CPU's, multi-CPU systems, hyperthreading CPU's and such as “a multi CPU system”.

In a multi-CPU system, if a process (or a series of process threads) is started multiple times, the kernel process scheduler has a tendency to restart those processes or threads on the same CPU that ran the process thread before. This is potentially more efficient than selecting a random CPU core, because some of the process's state may have been preserved in that CPU's cache. CPU affinity is a natural behaviour of the kernel process scheduler.

Because the scheduler will do its best to keep processes running on the same CPU (as long as this is beneficial to overall performance) you usually do not have to interfere. However, some cases warrant pinning a process to a single CPU or a predefined subset. Let's look at two examples; the second will be discussed in more detail.

Commercial database vendors like Oracle DB[3345] or IBM DB2[3346] want you to pay per CPU. Typically, database servers have a massive amount of CPU cores and you want to be able to decide how much to pay for your database (more performance would mean more cost)

One process on a busy server is eating so many of your multi-CPU processor cycles that other programs' performance starts to suffer. Limiting your runaway process to a single CPU will free up resources for your other programs.

An actual use case for the second example, is running a Java based application like a Minecraft[3347] server. This is a resource-hungry beast, and it will claim much more than a full CPU if it runs a world with quite a number of players. A typical real-life load of a quad-core AMD Athlon™ II X4 640 Processor is higher than 12 with the Java process using nearly 200% CPU (i.e. it fully occupies half the available CPU cores). Other applications will be grateful if you manage to pin the Java process to a single core - and the game server's performance hit is not as large as you might fear.

How to pin this process to one of your CPU's?

Taskset

Slackware has a tool for setting the processor affinity for a certain task or process. It is called “taskset” and is part of the util-linux package. Run “man 1 taskset” if you want to know more about its purpose and command line syntax.

The taskset command is used to set or retrieve the CPU affinity of a running process given its PID, or to launch a new COMMAND with a given CPU affinity.

The CPU affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU. For example:

0x00000001 is processor  #0 (i.e. the 1st processor)
0x00000003 is processors #0 and #1 (1st and 2nd processor)
0x00000004 is processor  #2 (the 3rd processor)
0xffffffff means all processors (#0 through #31)

Luckily you can use human-readable numbers instead of a bitmask if you add the “-c” command line parameter.

Examples:

To pin an already running process 1337 to processor #0 (the 1st processor - remember, UNIX starts counting at zero) you would enter the following command:

$ taskset -p 0x00000001 1337
pid 1337's current affinity list: 0-3
pid 1337's new affinity list: 1

Confused by hexadecimal numbers? Then use the human-readable version:

$ taskset -cp 1 1337

You may notice the strange order of command line options and arguments; first come all the options and then follow the argument values in pre-defined order… man taskset(1) is your friend.

To start a new process with a fixed CPU affinity, you omit the “-p” switch and append a command line, like this real-world example of starting a Minecraft server:

$ taskset -c 3 java -Xmx1024M -jar minecraft_server.jar nogui

which ties the Java process to the 4th CPU in your computer. The effect of this will be immediately obvious.

While you can pin a running process task to a sub-set of your available CPU's, that does not mean that the process and its threads will suddenly be limited to those CPU's you dictated. Rather, the kernel scheduler will now start preferring your appointed CPU instead of the CPU cores your processes may be currently running on. It can take quite a while (process threads have to stop and be started again) to see an obvious effect of using the taskset command on a running task. That is why it may be more effective to use taskset to start your program with the desired processor affinity.

Try assigning one of your CPU intensive programs to one CPU, and use top or htop to observe the non-uniform CPU load. For the top program, you have to press 1 in order to see processor statistics per CPU core. The htop command allows you to set processor afffinity and show you a process list sorted by CPU.

If you want to know exactly what CPU your process task is running on, you can use this command (use “pidof” to find the Process ID of your program):

$ MYPID=$(/sbin/pidof java)
$ ps -eo psr,pid | grep $MYPID
3  4819

This shows that the Java process with PID 4819 is running on CPU #3 (the fourth CPU core of a quad-core system for instance). Indeed, this is the PID of that Minecraft server which we pinned to CPU #3 in the above example.

Sources

Originally written by Eric Hameleers[3348]

howtos, hardware, author alienbob

Linux Multi-Queue Block IO Queueing Mechanism (blk-mq)

blk-mq (Multi-Queue Block IO Queueing Mechanism) is a new framework for the Linux block layer that was introduced with Linux Kernel 3.13 and has become feature-complete with Kernel 3.16.
Blk-mq allows for over 15 million IOPS with high-performance flash devices (e.g. PCIe SSDs) on multi-socket servers, though even single and dual socket servers also benefit considerably from blk-mq.
To use a device with blk-mq, the device must support the respective driver.

Overview of blk-mq

Blk-mq integrates into the storage stack and provides basic functions to device drivers for mapping I/O enquiries to multiple queues.
The tasks are distributed across multiple threads and therefore to multiple CPU cores (per-core software queues).
Blk-mq compatible drivers request count for parallel hardware queues a device supports.
All device drivers that use the previous block I/O layer continue to work independently of blk-mq.

blk-mq-based device drivers bypass the previous Linux I/O scheduler.

Device Drivers

Driver | Device Name | Supported Devices
null_blk | /dev/nullb* | none (test drivers)
virtio-blk | /dev/vd* | Virtual guest drivers
mtip32xx | /dev/rssd* | Micron RealSSD PCIe
scsi (scsi_mq) | /dev/sd* | e.g. SAS and SATA SSDs/HDDs
NVMe | /dev/nvme* | e.g. Intel SSD DC P3600 DC P3700 Series
rbd | /dev/rdb* | RADOS Block Device (Ceph)
ubi/block | /dev/ubiblock* |
loop | /dev/loop* | Loopback-Device
dm / dm-mpath |  |

Enable blk-mq

Enabling blk-mq must happen at boot time. You need to add scsi_mod.use_blk_mq=1 to your lilo.conf

/etc/lilo.conf

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
# Append any additional kernel parameters:
append=" scsi_mod.use_blk_mq=1"

Enabling blk_mq makes it impossible to use non blk_mq schedulers. You lose noop cfq and the non mq deadline

Automatic IO scheduler selection

udev rules can be used to select IO schedulers for different device types.

/etc/udev/rules.d/60-ioscheduler.rules

# set deadline scheduler for non-rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", TEST!="queue/rotational", ATTR{queue/scheduler}="deadline"
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq"

# set cfq scheduler for rotating disks
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"

Sources

* Originally written by lamerix[3349]
* Source https://www.thomas-krenn.com/en/wiki/Linux_Multi-Queue_Block_IO_Queueing_Mechanism_(blk-mq)[3350]
* Source http://kernel.dk/blk-mq.pdf[3351]
* Source https://lwn.net/Articles/552904/[3352]

howtos, blk-mq, multi-queue, io, author lamerix

Hardware Diagnostics

This is an attempt to document symptoms, open-source diagnostic software, and solutions to hardware failure.

DISCLAIMER: We are not liable for any damage caused to your system by reading this howto, running diagnostics programs, or implementing fixes. This howto is for informational purposes only.

Before working inside the case you should:

Power off your computer, turn off the PSU, and unplug it.

Wear an antistatic wrist strap.

Ground yourself by first touching the PSU.

Be careful not to damage motherboard components with sharp, hard tools.

Don't use force to remove components and check the manual for how to remove them.

Don't do anything you are not comfortable with.

If you don't know what you are doing, get an expert to do it.

Don't have water or other conductive liquids near the computer or work area.

Don't leave any metallic or conducting objects inside the case as they may short-circuit components.

Common Symptoms

These are just common symptoms of each component failure, and are rarely clear enough to diagnose hardware error right away. Run the diagnostics software to confirm suspicions. Sometimes more than one thing can fail at once, which will make it harder to diagnose accurately, and you may need to take it to a shop.

The meanings of beep codes that you may hear can be found on the wiki[3353] or at BIOS Central[3354] or in your motherboard manual.

RAM

The computer typically does not POST or boot properly, but it will try.

Each boot typically causes different symptoms, i.e. the boot will halt in a different place each time.

The fans are typically running, often at 100%.

There may be beep codes.

Randomly occurring kernel panics and segmentation faults in running programs.

PSU

Sudden shutdown or reboot without warning or logs of what went wrong.

Sudden shutdown or reboot may occur during high system load or power usage or even when idle.

You may notice a strange smell coming directly from the PSU as it overheats.

You may notice a high-pitched (squealing/screeching) noise coming from it, due to failing capacitors.

The system may not boot after pressing the power button, and you may need to press it more than once.

Rarely it dies completely, like after a power surge, and the fans will not be running and it will not POST or boot and there may be motherboard damage.

Power Button

System powers on without wake-on-LAN or wake-on-timer or other such wake methods.

Reboot loop where the system shuts down and powers up on its own continuously.

The system may not boot after pressing the power button, and you may need to press it more than once.

You may get a “boot failure” message during system POST.

You may hear beep codes.

CMOS battery

The time is reset on each boot.

The BIOS settings reset on boot.

There may be beep codes.

The screen may be black without any beep codes.

HDD

I/O errors in the logs.

Filesystem corruption and bad blocks detected.

May POST but may not finish booting properly.

Disk access slows down right before failure.

Strange noises such as clicks, grinding, and spinning up noises.

The BIOS will not detect a completely dead disk.

GPU

Graphical glitches on screen.

The screen may be black.

May cause system hangs, and audio may be looping during the hang.

You may notice a high-pitched (squealing/screeching) noise coming from it, due to failing capacitors.

There may be messages in the logs relating to the video drivers or an Xorg crash or nothing at all.

CPU

May or may not POST.

There may be beep codes.

The fans are typically running at 100%.

Kernel panics are seen with multi-core machines, when only one core is affected. These are clearly listed as Hardware Error MCE (Machine-check exception).

If it is overheating it may also trigger a MCE which will cause a kernel panic and forced shutdown, or it may throttle itself down and the system will seem slower.

Motherboard

Check for swollen capacitors.

You may notice a high-pitched (squealing/screeching) noise coming from it, due to failing capacitors.

A dead motherboard does not POST.

The fans connected to the motherboard will not be running, the ones connected to the PSU may be running at 100%.

DVD+-RW

Won't read or write disks properly.

May keep spinning up and down forever while trying to read a disk.

May not open when you press the button, but instead make some clunking sounds and open only after many button presses.

Mouse

Problems with click-and-drag, drag-and-drop, drag-to-select, double-click.

Mouse pointer jumps.

Acceleration issues.

Being able to pinpoint the source of the high-pitched squealing/screeching noise caused by failing capacitors may be important in finding the bad hardware component, and is almost always a sign of hardware issues.

Diagnostics

Make sure to check the cables/connectors/pins to make sure they are not damaged or corroded. Oxidation may build up on the DIMM pins, and may need to be removed. This should be done carefully only with 99% isopropyl alcohol and a soft cotton q-tip. Hard objects should be avoided inside the case as they may break off pins or damage components. If you don't feel comfortable, get a professional to do it.

RAM

Run one of the following programs. Errors are typically found during the first run, but do more runs proportional to your suspicion.

memtest86+[3355]

memtester[3356]

These RAM testing programs also test the CPU, so if the DIMMs are known good on other systems, maybe the CPU is the cause.

PSU

There is no specific test for the PSU. However, you should monitor voltages. You can usually do this in the BIOS, and these are the most accurate. Make sure all the voltages are above their stated voltage. For example the +3.3V line should be greater than 3.3V, +5V line should be greater than 5V, and most importantly the +12V rail should be greater than 12V. Note that this does NOT mean that you should increase the voltage if it is low, this is usually done automatically by the BIOS. Normally, voltages should be stable about a certain value, above the critical value. If the PSU is failing, the voltages can vary quickly and are close to the critical value. For example, a good PSU will have a +3.3V line voltage of a stable 3.35 (just an example). A bad PSU will have a variable +3.3V voltage that quickly varies between 3.30 and 3.32. However, there is the possibility that the voltage is fluctuating not because of a bad PSU, but because of another bad component (say a graphics card) that is lowering the voltage on the line due to internal shorting or malfunction. Planning ahead, when you first get a new PSU, you should write down the voltages and save them for reference and monitor them over time. If there is no option in the BIOS to monitor the voltages you can use a voltmeter or multimeter to measure the voltages directly on the connectors. The pinout for the connectors can be found here: ATX 20-pin[3357], ATX 24-pin[3358]. Alternatively, special meters for PSUs are available in electronic shops.

In theory, it shuts down or reboots under increased power usage because it cannot provide the needed current and overheats as a result. As such, perhaps the best way to diagnose it is by monitoring voltages under load, so you should install lm_sensors and configure it using sensors-detect, and then use a monitoring program to monitor voltages and warn when they go below the given limit. Then you load the system with some CPU or GPU intensive application and wait for the warnings or sudden shutdown/reboot. Technically, the shutdown/reboot can occur even when idle, and the voltage drop may be too fast for the alarm to catch.

Being able to pinpoint the PSU as the source of a high-pitched squealing/screeching noise is reliable for diagnosing bad capacitors.

You should ALWAYS use a surge protector on ALL electronic devices ALL the time. This prevents damage to the PSU, to the motherboard, and it saves you lots of time and money wasted on replacing electronics damaged by power surges. Many surge protectors come with a warranty that will refund a certain amount of money if your equipment is damaged while using the surge protector properly. The surge protector is cheap, the equipment is expensive, and the refund usually more than covers it.

Power Button

A bad power button is surprisingly difficult to diagnose, and there are no software tests that can help. Looking for characteristic symptoms such as a reboot loop and swapping out hardware may be the only way to diagnose it.

CMOS battery

You could take the battery out, making sure to use the special tab to remove it rather than trying to pry it off, and measure its voltage. Or you could just throw it away in the proper battery disposal container and replace it anyway just to be sure, and also because you may have had to remove a graphics card or PCI/PCIE card to reach the battery and you may not have a battery tester for these types of batteries.

HDD

You can either run a smartctl long test, which tests the entire disk surface for errors, and updates the offline attributes, or you can run the specific proprietary manufacturer's utility. smartctl will also show the HDD temperature and airflow temperature. Make sure the temperatures are below 60 C.

smartmontools including smartctl[3359]

SystemRescueCD[3360] including smartctl, ddrescue, TestDisk and foremost.

Ultimate Boot CD[3361] including lots of FLOSS diagnostics and recovery utilities as well as the proprietary manufacturers utilities.

ALWAYS backup your data regularly and run smartctl regularly or use smartd. If you feel that the HDD is dying, don't bother running the utilities first, instead backup your important stuff immediately. If the entire disk is full of your important stuff, maybe you should image the entire drive to another HDD in case it fails before you can get your data off it. Then you can run data carving utilities to carve your data off the image. Again, there is no substitute for backing up your data, your HDD can FAIL at ANY time WITHOUT WARNING from SMART or any diagnostics program.

You can run a SMART long test by running

smartctl -t long /dev/sd?

You then have to wait the time it estimates, plus a few more minutes for the result which you can check with

smartctl -a /dev/sd?

The attributes are listed, but you can check them separately with

smartctl -A /dev/sd?

Here is an important note on attributes from man smartctl

              Each  Attribute  also has a Threshold value (whose range is 0 to
255) which is printed under the heading "THRESH".  If  the  Nor-
malized value is less than or equal to the Threshold value, then
the Attribute is said to have failed.  If  the  Attribute  is  a
pre-failure Attribute, then disk failure is imminent.
The Attribute table printed  out  by  smartctl  also  shows  the
"TYPE"  of  the  Attribute.  Attributes  are one of two possible
types: Pre-failure or Old age.  Pre-failure Attributes are  ones
which, if less than or equal to their threshold values, indicate
pending disk failure.  Old age, or usage  Attributes,  are  ones
which  indicate end-of-product life from old-age or normal aging
and wearout, if the Attribute value is less than or equal to the
threshold.   Please  note: the fact that an Attribute is of type
'Pre-fail' does not mean that your disk is about  to  fail!   It
only  has  this  meaning  if  the Attribute´s current Normalized
value is less than or equal to the threshold value.

If you have a laptop/netbook and you hear clicks from the HDD once in a while, it may be that the power saving feature is spinning down the drive. This saves power, but can quickly wear down the drive. You can turn it off by running this on every boot, basically just add it it /etc/rc.d/rc.local

hdparm -B 254 /dev/sd?

GPU

Video Memory Stress Test[3362] is also available on sourceforge[3363] and UBCD[3364]. It has the limitation that it cannot always recognize the amount of video RAM properly, and the DOS version cannot recognize more than 512 MB of video RAM. From experience, it works well with integrated Intel cards, and not very well with Nvidia or ATI cards.

CUDA GPU memtest[3365] requires a video card that either supports CUDA such as an nivdia card with the development nvidia drivers and CUDA installed, or a video card that support opencl which can be an nvidia or ATI card plus opencl installed and supported by the drivers. The test is comprehensive and the authors claim it can detect soft and hard errors. From experience, it may not detect hard errors.

If the above don't work, then you could just run a video game in benchmark mode and watch for graphical glitches on the screen or system crashes. The problem with this method is that there is no way to know if the drivers are at fault or if the card is at fault, unless you have prior experience with the game and the glitches or crashes are new.

Being able to pinpoint the GPU as the source of a high-pitched squealing/screeching noise is reliable for diagnosing bad capacitors.

Sadly, none of the GPU tests I have tried are reliable in detecting hardware errors. However, a high-pitched squealing/screeching noise coming from the GPU is reliable.

CPU

Although memtest86+[3366] tests the CPU as well as RAM, there is a more specific test:

Great Internet Mersenne Prime Search[3367] is very accurate to CPU errors in mode 1 (Small FFTs) and a bit less so in mode 2 (Large FFTs) and it will report any errors that occur. It is a great way to differentiate between a RAM and CPU error. Let it run until the CPU temperature is stable and then as long as you like proportional to your suspicion. Errors are typically found rather quickly, so you don't have to wait too long.

To check the CPU temperature make sure you have lm-sensors[3368] installed. Configure it by running

sensors-detect

and then copy the modules it needs modprobe'd to /etc/rc.d/rc.local, make it executable, and run it. To check temperatures run

sensors

or you can use a monitor of your choice. sensors will also list critical temperatures, but the most accurate temperatures are shown in the BIOS, so do a comparison.

Motherboard

Sadly, there is no reliable software test for motherboard errors. The diagnosis is mostly a process of elimination. You can also take it to a shop and have them test the motherboard.

Being able to pinpoint the motherboard as the source of a high-pitched squealing/screeching noise is reliable for diagnosing bad capacitors, a common problem with motherboards.

DVD+-RW

Burn a disk iso and run:

cmp input.iso /dev/sr0

It should say:

cmp: EOF on input.iso

If it does not say that, then the DVD/CD was not burned properly. However, it may also be because of bad media or high burn speed. If the drive keeps spinning up and down while reading a disk it could be failing or it could be that you are trying to play a commercial DVD whose region code is not supported by the drive, which limits it to 1x read speed.

Mouse

Trying to eliminate driver and software issues would be a first step to diagnosing mouse problems. Try restarting Xorg, reloading mouse drivers, and restarting the system. If these have no significant effect, then it is likely a hardware issue.

Solutions

An overheating system can cause instability and may mimic failing hardware. Before doing anything else it may be worthwhile to get a compressed air canister and clean the dust out from all the fans, heat sinks, and all the hard to reach places where dust accumulates inside the case. Using a brush is not as effective and may damage components, so it should only be used outside the case. It is also important to make sure there is proper airflow inside the case:

At the bare minimum you should have a large 120mm output fan in the rear of the case for an ATX motherboard. For smaller systems it varies, and only a smaller fan may fit.

Make sure that cables inside the case do not obstruct airflow, and if they do then use plastic cable ties to fix it if possible. Do not leave any stray metal inside the case that could short-circuit components.

Make sure fans are placed so that they cause air movement across hot components, or at the very least evacuate hot air from the case.

RAM

Remove the DIMMs/RAM sticks one at a time, and then check again with memtest86+[3369]. If it fails, replace the stick, remove another and run the test again. Rarely, more than one DIMM may be failing, so take that into account. It could also be the CPU if all your DIMMs fail the test.

If you cannot replace the RAM soon, like if you have an ancient computer and can't find RAM for it, you can use the mem= kernel option to force the kernel to use only good RAM. Say you have an error at 129.0 MB, like I did recently, you could use this kernel boot option:

mem=128M

and it will only use the first 128 MB of RAM, omitting the bad part. There is also an option to exclude a section of RAM, but it is less tested and may not work.

PSU

Replace the PSU with a new PSU, if the symptoms disappear, you can be sure it was the PSU. However, note that a bad PSU may damage the motherboard or other components, or maybe it was a power surge that damaged everything.

Power Button

Try to clean the power button using compressed air. If that doesn't work then replace the power button if possible, otherwise replace the case along with the button or take it to a repair shop and see what they can do.

CMOS battery

Replace the battery carefully using the special tab. Do NOT pry it off using a screwdriver because then it will break and it won't go back in.

Replacing the CMOS battery will reset your BIOS/UEFI settings, so be prepared for this.

HDD

You should first get your important data off of it. If you feel it is failing fast, use ddrescue to image the drive to another drive. Once you have the image, be it complete or incomplete, you can use Testdisk[3370] and/or foremost[3371] to carve data off the image. The data will not have the same file name it used to, but at least you will get the data. You can find all these utilites and more on the SystemRescueCD[3372]. Now just replace the drive.

There exist programs that claim to correct bad blocks. What they do is mark the bad blocks so the drive doesn't used them. The problem is that bad blocks are an indicator of imminent drive failure. So, you may think that they are the fixing the problem, you may put off backing up your data, and then the drive fails and you lose your data.

GPU

Replace the video card. If it is too expensive and you aren't sure, which is very likely due to the fact of the matter, try testing it in another machine to be sure, or try testing using a spare known good video card and see if the symptoms persist.

CPU

If you suspect the CPU is overheating, then you can try to remove the heatsink-fan block according to your CPU or heatsink manual, clean off the old thermal paste[3373], apply new thermal paste[3374], or let an expert do it. Otherwise, replace the CPU. Make sure it is actually the CPU and not the RAM that is the problem, as a CPU is very expensive compared to RAM.

If you cannot replace the CPU and it is a multi-core CPU with only one core that has failed, for example the L1 cache of CPU core #2[3375], then you can try to disable the failed core. One way to do this is to use the maxcpus= kernel boot option. In the example you would use:

maxcpus=2

this is because CPU cores are numbered starting with 0, so 4 cores would be numbered 0, 1, 2, 3. Note that if CPU #0 is failing, you may be out of luck. Another complementary way is to first make sure you have CONFIG_HOTPLUG_CPU built-in to the kernel, and running:

echo 1 > /sys/devices/system/cpu/cpu3/online

on every boot. In this example this turns ON CPU #3. So, basically you would have the 3 good cores running i.e. 0, 1, 3.

Motherboard

Replace the motherboard, and make sure the PSU is not damaged, as it can damage your new motherboard.

DVD+-RW

Replace the drive.

Mouse

Replacing the mouse is the definitive solution. However, some fixes may help temporarily.

For click-related problems, opening the mouse and investigating the cause of the problem is the first step. On most mice, there are 4 screws that hold the upper and lower mouse parts together and are located underneath stick-on slippery pads. Note that after removing the stick-on pads they may be difficult or impossible to replace, so only open the mouse if the problem is truly bothersome or if you have extra stick-on pads provided with some mice.

It may be that plastic parts inside the mouse have worn down with repetitive use. A possible fix for this is to first identify areas that have been worn down and then carefully add plastic in the form of plastic cement or superglue to replace the lost plastic. This is best done with a toothpick and must be very carefully controlled. Remove excess glue immediately and allow the rest to fully dry overnight before using the mouse. Do NOT apply glue to any area that might interfere with mouse function. This is a last resort solution, so do NOT try it until you are ready to throw the mouse out. Duct tape may be used instead for a temporary or trial solution.

It may also be that the plastic button arch has fatigued over time and doesn't provide enough resistance to prevent inadvertent activation of the switch. A possible fix for this is adding a plastic piece under the plastic button arch to improve its resistance. Depending on the mouse, either gluing a piece of old cut credit card under the plastic button arch or inserting the credit card piece with a piece of foam sandwiched underneath into the pocket under the plastic button arch may work.

For wandering / jumping pointer problems, cleaning the optical / laser window on the underside of the mouse with alcohol and a q-tip may help. If it is a wireless mouse consider infrared or microwave interference depending on the wireless mouse type. Removing or isolating sources of interference or distancing oneself from the sources may help. Wireless mouse manuals recommend placing the base station away from electronic devices or other sources of electromagnetic interference.

For acceleration issues one can try adjusting acceleration settings[3376]. However, in some cases the acceleration issues are intermittent, and may be driver issues that are much harder to solve. Trying different driver and software versions may help, or one can try to contact the developers of the drivers / software.

Sources

Written by H_TeXMeX_H[3377]

Contributions from: tobisgd[3378], onebuck, metaschima[3379]

I cite the man page of smartctl.

howtos, hardware, software, author htexmexh

Slackware installation using a serial terminal on an embedded system

I'll describe here what steps are required to install Slackware to a machine, using a serial terminal. The boot medium used here is a usb-key, but I think that these steps could be customized for booting from a CD-ROM (or PXE). I installed to a PC Engines APU (http://www.pcengines.ch/apu.htm[3380]), but most of these steps should be compatible for other systems. I've noted things special for this machine.

Prerequisites

Machine with a serial port you want to install to

Machine with a serial port you use to install the other machine

A cable betweeen them ;)

usbboot.img from slackware(64)?-$version/usb-and-pxe-installers/

Preparation of the boot image

To install using a serial line, syslinux on the boot image must be configured to use the serial line for the menu itself and also append the right parameters to the booted kernel. To do this, mount the usbboot.img somewhere like this:

# mount -o loop usbboot.img /mnt/tmp

Now that the image is mounted, you can change the syslinux.cfg found in /mnt/tmp. Insert as a first line:

serial 0 115200

This enables the serial line for syslinux with 115200 bauds (parity and stopbit are hardcoded to n8). While the bootloader is now using the serial, the kernel still doesn't. Add

console=ttyS0,115200

To the append-line of the first kernel image (huge.s).

I have had problems with the keyboard input in syslinux using the serial line. To speed the things up you can set another timeout (in s/10) after which the default image (huge.s) is booted.

When you are done with the changes, you can unmount the image as usual. Like recommended by Eric[3381] install the syslinux bootloader to the image:

$ syslinux -s usbboot.img

The image is ready now to be dd'd onto a usb-key:

# dd if=usbboot.img of=/dev/myusbkey

Installation

Connect the serial ports of your two machines with a null-modem cable, and run

minicom -D /dev/ttyS0 -b 115200

on the machine you will use as your terminal. Now boot the machine you are installing Slackware to from the usb-key. You should see the usual booting on the terminal screen including the key map selection. After you have logged in as root, partition your disks as you would normally do.

APU special: You should also format and set a label to your partitions so that they show up in /dev/disk/by-label, it makes stuff a lot easier later e.g:

# mke2fs -L root /dev/sdb1

Don't let the Slackware installer format them then of course.

Before you run setup run this command to get a nicer looking output from dialog:

export DIALOGOPTS="--ascii-lines"

The rest of the installation should work as usual (“special” keys like page up don't seem to work correctly though..). But instead of rebooting after the installation has finished, we need to set the installed system to also use the serial line. Chroot into the installation:

# chroot /mnt

Now edit your /etc/lilo.conf and insert a line

serial= 0,115200n8

right at the top. The global append line needs the addition like the one used for the usbboot.img:

console=ttyS0,115200

to let it come up before the init system tries to mount it.

APU special: If you have installed onto a usb medium (the SD-card reader on the APU is connected by usb) you should also add:

rootdelay=10

The device order on the APU is likely to change. So you should /dev/disk/by-label or /dev/disk/by-uuid paths for your root partition statements in /etc/lilo.conf.

Furthermore you'll have to generate an initrd so that the device drivers for the card reader are avaiable at boot time. Here also use a /dev/disk/by-label or /dev/disk/by-uuid path cause of the changing device order.

If you want to reinstall lilo after the installation, you probably also have to change the boot= device.

Save the lilo configuration and reinstall lilo. But don't reboot now, one more step before we are finished!

Uncomment the line enabling serial login in your inittab and change the speed to 115200:

[...]
# Local serial lines:
s1:12345:respawn:/sbin/agetty -L ttyS0 115200 vt100
[...]

Uncomment ttyS0 in /dev/securetty or you will not be able to login as root from the serial line!

This should be all. Exit the chroot and reboot your system!

howtos, serial, installation

HOWTO articles - Hardware

This section contains How-To articles for hardware drivers and configurations including virtualization and emulation platforms.

Inspired? Want to write a Hardware HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Architecture Specific HOWTOS

Page | Description
Slackware on ARM - HOWTO guides | Slackware on ARM - HOWTO guides This section contains information about how to install Slackware on to a range of ARM hardware. The wiki pages on this site are intended for the community to help broaden the architecture support and collaboratively create and share the knowledge base.

Overview of Hardware HOWTOS

Page
Description
Tags

Slackware 14.0 on an Acer Aspire One ZA3
Slackware 14.0 on an Acer Aspire One ZA3 Slackware 14.0 easily installs on an Acer Aspire One ZA3, but X windows crashes. I found a fix that works from another Slacker. When Slackware 14.0 boots up log in as root and enter this command: # rmmod poulsbo psb_gfx
howtos, author hitest

ASUS eee PC HowTo
ASUS eee PC HowTo Although this howto was written specifically for the ASUS 1005HA netbook, it may be ported to similar machines. With Slackware everything works pretty much out of the box for this Asus EEE-pc model. Function keys, however, are not enabled by default, which means additional configuration steps are required.
howtos, asus, eee

Audio and snd-hda-intel
Audio and snd-hda-intel Overview This HOWTO deals with issues related to sound cards which use the Intel HDA chipset. Do you encounter audio problems such as: * No sound? * Headphones work but speakers do not? * Speakers work but headphones do not?
howtos, hardware, snd-hda-intel, audio, author allend

Use BFQ IO scheduler
Use BFQ IO scheduler Budget Fair Queueing (BFQ) Storage-I/O Scheduler * Why do I want BFQ? -Seems to speed up disk based IO see the Source section for more info. http://algo.ing.unimo.it/people/paolo/disk_sched/ * First collect your existing kernel configuration. zcat /proc/config.gz > BFQ_CONFIG
howtos

Brother printer/scanner installation
Brother printer/scanner installation Brother makes a variety of printers and multifunction devices. There is a strong commitment to Linux support, but the driver packages are offered only in .rpm or .deb format. So what does a Slackware user do?
howtos, brother, printer, scanner, installation, author allend

Chromebook Pixel
Chromebook Pixel This HOWTO covers installing and configuring Slackware (tested with -current/14.2) on a 2015 Chromebook Pixel. Older versions of Slackware (older kernel) and the 2013 Chromebook Pixel may run into issues. There are a couple main sources of information for running Linux on the Pixel (see
howtos, hardware, installation, chromebook, pixel

CPU-frequency scaling on Slackware
CPU-frequency scaling on Slackware Overview CPU frequency scaling is carried out by the kernel, but requires that the relevant UEFI/BIOS options be enabled, such as Intel (Enhanced) Speedstep. Slackware comes with all requirements necessary to use this feature.
howtos, cpu, frequency, laptop

DisplayLink
DisplayLink DisplayLink 3.0 Devices This HOWTO covers how to configure and install the DisplayLink driver (evdi) for USB 3.0 devices, and has been tested under Slackware 14.1 and newer. For older devices (e.g. USB 2.0), the udl driver should work with minimal configuration needed.
howtos, hardware, displaylink, evdi, author matthew salazar

Linux Multi-Queue Block IO Queueing Mechanism (blk-mq)
Linux Multi-Queue Block IO Queueing Mechanism (blk-mq) blk-mq (Multi-Queue Block IO Queueing Mechanism) is a new framework for the Linux block layer that was introduced with Linux Kernel 3.13 and has become feature-complete with Kernel 3.16. Blk-mq allows for over 15 million IOPS with high-performance flash devices (e.g. PCIe SSDs) on multi-socket servers, though even single and dual socket servers also benefit considerably from blk-mq.
howtos, blk-mq, multi-queue, io, author lamerix

Slackware ARM GCC aarch64-linux cross-compiler for the Raspberry Pi
Slackware ARM GCC aarch64-linux cross-compiler for the Raspberry Pi Preface I was thinking about the Cortex-A53 64-bit CPU on my Raspberry Pi 3 and why I'm mainly using Slackware ARM 32 bit operating system on it. Then I started to wonder if it would be possible to build an arm64 kernel and modules to run with Slackware ARM. After reading about how this could be achieved it seemed clear that some cross-compiling would be required. Although I have some experience in building Linux kernels, espe…
howtos, hardware, aarch64, cross-compile, author exaga

GPS-devices
GPS-devices Overview GPS stands for Global Positioning System. GPS devices (also referred to as GPS receivers) provide the user with his/her geographic coordinates. I'm using a Garmin Etrex Legend HCx; my experiences in this HOWTO refer to this device, but it should also work at least for any Garmin GPS receiver.
howtos, gps, gpsd

Hardware Diagnostics
Hardware Diagnostics This is an attempt to document symptoms, open-source diagnostic software, and solutions to hardware failure. DISCLAIMER: * Power off your computer, turn off the PSU, and unplug it. * Wear an antistatic wrist strap. * Ground yourself by first touching the PSU.
howtos, hardware, software, author htexmexh

Nvidia Optimus
Nvidia Optimus Some laptops come with what is known as “nVidia Optimus” technology. This is an nVidia and Intel hybrid graphical processing unit (GPU); it is not two separate GPUs in one laptop. It uses nVidia graphics for performance and Intel graphics for power saving during basic usage. Unfortunately, until the release of version 435 in 2019, the closed-source proprietary drivers have not offered a means for adjusting or switching between the two.
howtos, software, hardware, nvidia, author tommyc

Multi CPU performance tuning
<--Reviewed 20130113 by hazel --> Multi CPU performance tuning The Linux SMP kernel (Symmetric Multi Processing - enabled in all 64-bit Slackware kernels as well as the 32-bit “-smp” kernels) does a good job of scheduling processes so that they take maximum advantage of your multiple CPU's or CPU cores.
howtos, hardware, author alienbob

Proprietary Graphics Drivers
Proprietary Graphics Drivers The X.Org X11 graphical system provides many drivers, supplying at least 2D video acceleration for most video cards; however, if a system is equipped with a GPU from AMD (ATI) or nVIDIA, proprietary binary drivers can be downloaded from the web sites of both these vendors and installed.
howtos, software, nvidia, author rinias

Slackware installation using a serial terminal on an embedded system
Slackware installation using a serial terminal on an embedded system I'll describe here what steps are required to install Slackware to a machine, using a serial terminal. The boot medium used here is a usb-key, but I think that these steps could be customized for booting from a CD-
howtos, serial, installation

Sound Problems on Slackware
“”pavucontrol NOTE: on my systems, my default card is 1 and default device is 0 so I will use 1,0 through out this page Sound Problems on Slackware Investigate the problem * See which kernel modules are loaded: lsmod | grep snd Use this information along with your motherboard sound chipset to verify that the correct sound drivers are loading.
howtos, hardware, sound, alsa, audio, author arfon

Set Up Sound Blaster Live! 5.1 & Audigy Rx in Slackware
Set Up Sound Blaster Live! 5.1 & Audigy Rx in Slackware This HOWTO is based on setup experience with following hardware: * Creative Labs Sound Blaster Live! 5.1 ( SB0060) * Creative Inspire T3100 2.1 Speakers * Intel DG965SS motherboard *
howtos, soundblaster, live, audigy, rx, wavetable, soundbank, soundfont, sfxload, author wisedraco

Solid State Drives
Solid State Drives Installing Slackware 14.1 on a SSD drive While some of this could be performed after an installation (changing the LVM settings), I'll assume a new installation, because most parts can't be easily performed afterwards. Partition creation
howtos, ssd

How To Sync Your System Time to Hardware Clock Consistently
How To Sync Your System Time to Hardware Clock Consistently Overview If you are booting multiple Linux distributions on the same machine, you might face the problem of inconsistent time zone settings across distributions. For example, assume you are dual-booting two Linux distributions, Distro X and Distro Y. You have set your BIOS hardware clock to show the local time.
howtos, time configuration, local time, system time, time, hardware, author vharishankar

Connecting to VirginMobile Broadband2Go with an Ovation MC760 USB modem
Connecting to VirginMobile Broadband2Go with an Ovation MC760 USB modem Using Network Manager 1) Plug in your modem. 2) Open the Network Manager “NETWORK CONNECTIONS” dialog. 3) Click “+ ADD”. 4) “CHOOSE A CONNECTION TYPE” ---> “MOBILE BROADBAND
howtos, virginmobile, broadband2go, mc760, author arfon

howtos, topic page

Nvidia Optimus

Some laptops come with what is known as “nVidia Optimus” technology. This is an nVidia and Intel hybrid graphical processing unit (GPU); it is not two separate GPUs in one laptop. It uses nVidia graphics for performance and Intel graphics for power saving during basic usage. Unfortunately, until the release of version 435 in 2019, the closed-source proprietary drivers have not offered a means for adjusting or switching between the two.

Historically, there has been an open-source project called Bumblebee that has aimed to fix this problem. Bumblebee has not been maintained for some time; however, it may still be of value for users with older hardware that is no longer supported by version 435 or greater of the proprietary driver. Moreover, as the official Optimus support in the proprietary driver requires xorg-server 1.20.7 or greater, Slackware Current is required as of the time of writing. Thus, we will be providing instructions for both the Bumblebee method and the newer, official method provided by the nVidia proprietary driver.

To avoid confusion, from here on we will be using nVidia to refer to the company and nvidia to refer to the closed source proprietary driver. New sentences that start with nVidia also refer to the company and Nvidia to the driver.

You should also note the terminal commands used on this page. The code lines that begin with $ refers to commands to be run by a regular user, and # refers to commands to be run as root or a user with sufficient privileges.

Also please note the differences between Bumblebee and bumblebee. bumblebee is the daemon for bumblebee.

Note: The Intel Driver is Often Sufficient

You do not need to use Optimus via Bumblebee or the nvidia proprietary driver in order to use modern applications and desktop environments under X11. The Intel graphics often provide sufficient 2D and 3D acceleration for those programs to work smoothly without having to use the nVidia GPU. If you still wish to use Bumblebee to switch between the nVidia GPU and the Intel GPU, read on. We just wanted to clarify that Intel's 3-D acceleration has progressed quite far and that not all programs need to use the nVidia GPU in order to work.

Installing Bumblebee

The Automated Way

There is a new, automated way of installing Bumblebee thanks to Slacker: Ryan McQuen.

USE AT YOUR OWN RISK! If you have modified the SlackBuilds in any way, this script may not be for you.

You can run this as root:

curl https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/slackware/crazybee.sh | sh

Alternatively you can download the script and run it as root on your system directly.

This script detects multilib, creates the necessary group, adds users and applies the necessary /etc/rc.d/rc.local entries and also comes with a stable option which can be used by passing this instead:

curl https://raw.githubusercontent.com/ryanpcmcquen/linuxTweaks/master/slackware/crazybee.sh | STABLE=yes sh

It also uses upgradepkg's --reinstall --install-new features for use after kernel upgrades.

The Manual Way

Getting the SlackBuilds

A fellow Slacker, jgeboski, originally provided SlackBuilds that mostly follow the SlackBuilds.org[3382] requirements for Bumblebee. Now, another Slacker has taken over where he has left off on his own github repo[3383]. Remember to check which directory you're in first, as they will be downloaded to that directory. Assuming you're ready, the SlackBuilds can simply be git cloned as such. Then we're going to change into the new directory and begin the build process.

$ git clone https://github.com/whitewolf1776/Bumblebee-SlackBuilds.git
$ cd Bumblebee-SlackBuilds

Or you can download the full tarball containing the SlackBuilds instead:

$ wget --content-disposition https://github.com/whitewolf1776/Bumblebee-SlackBuilds/tarball/master
$ tar -xf whitewolf1776-Bumblebee-SlackBuilds-<changing hexadecimal>    # Tab completion is helpful.
$ cd whitewolf1776-Bumblebee-SlackBuilds

There is a README file, but you probably won't be reading it as you're reading this instead, so we're basically going to post it here.

Getting the Source Files

The source files, as with all SlackBuilds, must be downloaded manually and placed into their respective directories. Amongst the repos are a SLACKBUILDS.TXT file that does give links for the source files as well as their MD5SUMs to make sure the files were not corrupt. You can use the provided script to download them and check them against their MD5SUM for corruption, like this:

./download.sh

Preparing the Environment

There are a few things you need to do before we begin. First off, we need to have a specific group of users who are going to be allowed access to Bumblebee technology. For the sake of simplicity, we'll call this group “bumblebee”. In addition to the new group, we need to add the users that are allowed to access bumblebee technology:

# groupadd bumblebee
# usermod -G bumblebee -a <USERNAME>

where <USERNAME> is the name of the user or users you would like to add.

Building and Installing Bumblebee's Core

1. Build and install: bbswitch (optional but highly recommended).

# cd bbswitch # You don't actually need to ''cd'' as root, but who wants to ''su'' all the time?
# ./bbswitch.SlackBuild
# upgradepkg --install-new bbswitch-*.t?z

2. Build and install: libbsd (required).

# cd ../libbsd
# ./libbsd.SlackBuild
# upgradepkg --install-new libbsd-*.t?z

3. Build and install: bumblebee (obviously required).

# cd ../bumblebee
# ./bumblebee.SlackBuild
# upgradepkg --install-new bumblebee-*.t?z

Building and Installing Other Dependencies

Some SlackBuilds also offer a COMPAT32 option if you're running a multilib system[3384]. In the following examples, we build it with and without 32-bit compatibility. Use the one you desire. Keep these in mind when building the specified package.

Bumblebee can use either primusrun (requires a mesa rebuild in Slackware 14.0 and below) or bumblebee's own optirun. Take your pick which one you would like to use (or you can install both). Each one has their own advantages and disadvantages.

Primus

Primus, like optirun (instructions below) can be used to run your desired program via bumblebee. Primus also comes with a COMPAT32 option as well.

If you are using Slackware 14.0 or older you need to rebuild mesa. The new github repository does not offer a SlackBuild for mesa to support Slackware 14.0 or older. Therefore you must use Slackware 14.1 or newer, or rebuild mesa manually with a different script. One can choose to use the old repository and simply update the SlackBuild script appropriately, or add --enable-shared-glapi into a mesa.SlackBuild from the source of a newer Slackware version.

# # For the old repository, one would have done:
# cd ../mesa
# ./mesa.SlackBuild

mesa does not have a COMPAT32 option because it is an official Slackware package, but you can easily create the compat32 package after creating the original package by using:

# ./mesa-compat32.SlackBuild # Only in the old repository

1. Build and install: primus

# cd ../primus
# ./primus.SlackBuild
# upgradepkg --install-new primus-*.t?z

# COMPAT32=yes ./primus.SlackBuild

VirtualGL

VirtualGL provides support for optirun that also allows one to run programs via bumblebee. However, it is recommended that one uses primusrun for a few reasons.

Although VirtualGL (and its dependency libjpeg-turbo) are still supported by the Bumblebee project and maintained by their developers, the new github repo does not include SlackBuild scripts for these packages. This section is for the old github repository that was once maintained by jgeboski. If you would like to use VirtualGL (e.g. you're in one of the rare cases where VirtualGL provides better performance than primus) then you can use your own personal SlackBuilds or the old ones (although the old SlackBuilds will be out-of-date).

1. Build and install: libjpeg-turbo (32-bit compatibility available)

# cd ../libjpeg-turbo
# ./libjpeg-turbo.SlackBuild                         # This does not build with 32-bit compatibility.
# upgradepkg --install-new libjpeg-turbo-*.t?z

If you do wish to build with 32-bit compatibility, add COMPAT32=yes before executing the script as so:

# COMPAT32=yes ./libjpeg-turbo.SlackBuild  # Only for 32-bit compatible binaries and libraries on an x86_64 based system.

libjpeg-turbo installs in /opt because otherwise it can overwrite some things from the original libjpeg.

2. Build and install: VirtualGL (32-bit compatibility available)

# cd ../VirtualGL
# ./VirtualGL.SlackBuild
# upgradepkg --install-new VirtualGL-*.t?z

I think you're starting to get the idea now…

# COMPAT32=yes ./VirtualGL.SlackBuild

The nvidia Proprietary Driver

If you want to use the nVidia proprietary drivers, you must not use nouveau, as the drivers interfere with each other. This can be prevented by removing nouveau, installing xf86-video-nouveau-blacklist from /extra, or blacklisting nouveau manually.

This part is entirely optional. Slackware 13.37 and above comes with xf86-video-nouveau, the open source nVidia graphics card drivers. If you are using this, you do not need the closed source proprietary nVidia drivers. However, if you wish to use the closed source drivers, then install the packages listed in this section before going on.

Some nvidia driver versions are incompatible with certain kernel versions and vice versa (some kernel versions are incompatible with some nvidia driver versions) for various reasons. A specific kernel configuration, a specific nvidia driver against a specific kernel version amongst other possibilities. Generally it is best to use the nvidia driver package provided along with the kernel packages provided by your Slackware version. You can also follow the SlackBuilds.org guideline[3385] for manually updating a version of some software yourself.

If you are using Slackware 14.1 or older, you will need to install libvdpau. Newer Slackware versions now ship libvdpau.

# cd ../libvdpau
# ./libvdpau.Slackbuild
# upgradepkg --install-new libvdpau-*.t?z

1. Build and install: nvidia-bumblebee

# cd ../nvidia-bumblebee
# ./nvidia-bumblebee.SlackBuild
# upgradepkg --install-new nvidia-bumblebee-*.t?z

# COMPAT32=yes ./nvidia-bumblebee.SlackBuild # Only for 32-bit compatible binaries and libraries on an x86_64 based system.

2. Build and install: nvidia-kernel

# cd ../nvidia-kernel
# ./nvidia-kernel.SlackBuild
# upgradepkg --install-new nvidia-kernel-*.t?z

Post-Installation

Excellent. Now we're ready to do some post-installation setup. The bumblebee package provided us with an rc.bumblebee script in /etc/rc.d where the other startup scripts are also located. Remember to make this script executable and, if you so desire, start it!

# chmod +x /etc/rc.d/rc.bumblebeed
# /etc/rc.d/rc.bumblebeed start

If you would like bumblebee to autostart with the system, you can add the following to /etc/rc.d/rc.local:

[ -x /etc/rc.d/rc.bumblebeed ] && /etc/rc.d/rc.bumblebeed start

You can even go a step further by having bumblebee stop with your system by adding the following lines to /etc/rc.d/rc.local_shutdown. You can create this file if it does not exist.

[ -x /etc/rc.d/rc.bumblebeed ] && /etc/rc.d/rc.bumblebeed stop

Done! Any program we want using the nVidia graphics card can be run with “optirun” or “primusrun” like this:

$ optirun glxspheres
$ primusrun glxspheres

Pretty easy, right? Well not for all I suppose. If you chose to use VirtualGL (optirun), some programs will not work directly like this. Some require optirun to run bash first like this:

$ optirun bash

Now we can execute the program directly without adding “optirun” at the beginning:

$ wine ~/.wine/drive_c/Program_Files/Starcraft\ 2/Starcraft\ 2.exe

Editing the Configuration Files

A few general /etc/bumblee/bumblebee.conf configuration edits (likely suited for all):

# If you added your user account to a different user group than "bumblebee" at the start, make sure to change the "ServerGroup=" line accordingly.
# Here we set it to "ImAllergicToBees":
ServerGroup=ImAllergicToBees

# Perhaps you don't like using Display :8 for X11. We can change that too, in this example we set it to 3:
VirtualDisplay=:3

# I want to specify my driver that bumblebee will use by default. Here we show nouveau, but you can easily replace it with "nvidia".
# For the rest of this small section, we'll be using nouveau for simplification.
Driver=nouveau

# Don't forget to add their respective lines as well.
KernelDriver=nouveau
Module=nouveau

Official Optimus Support with the nVidia Proprietary Driver

Note

This will not work with Slackware 14.2 or any stable version of Slackware, as at the time of writing. Slackware Current is required.

Dependencies/Requirements

From main -current tree:

xorg-server >= 1.20.7

Do not try this with older versions - it will not work. Certain specific git commits are required to have been added to xorg-server; see the official nVidia documentation linked to in the Sources section. These commits are only present in versions >= 1.20.7.

xf86-video-nouveau-blacklist >= 1.0 or xf86-video-nouveau >= “blacklist”

Patrick Volkerding recently changed 'blacklist' from being the version number which would trample over the actual package containing the module, to 'blacklist' being part of the package-name with '1.0' being the version number. Either one is fine; just be aware of this.

The one with the package-name 'xf86-video-nouveau-blacklist' will coexist with xf86-video-nouveau, which is fine. The important thing is that /etc/modprobe.d/BLACKLIST-nouveau.conf be present on your system, which will ensure that the nouveau module is properly blacklisted.

From SlackBuilds.org:

nvidia-kernel >= 435.17

Build normally. I got a gcc mismatch error as I am using a kernel that is quite old. I was able to override it successfully by adding the environment variable spouted out by the nvidia installer during the build process when it failed the first time. YMMV. For best results, build nvidia-kernel using the same version of gcc that was used to build the kernel itself.

nvidia-driver >= 435.17

Be sure to build with CURRENT=“yes” and optionally with COMPAT32=“yes” in the custom build options of the SlackBuild. The nvidia-switch scripts are not required with -current as libglvnd is now included in mainline -current.

Next Steps

Once you have the packages listed above installed, I would recommend rebooting. Is this strictly necessary? Probably not, but in my experience when you start playing around with kernel modules involving graphics drivers, it is a best practice to reboot, because it is easy to think you have a working setup only to find that it didn't survive a reboot (and chances are, by then you will have forgotten what you did to make it work).

I would also recommend changing your runlevel to 3 if it is currently 4.

Once you have rebooted into runlevel 3, ensure that the nvidia_drm module has been successfully loaded:

$ lsmod |grep nvidia_drm

As root, add the following to /etc/X11/xorg.conf.d/21-LAR-nvidia-screens.conf (or any filename you would like):

# cat << EOF > /etc/X11/xorg.conf.d/21-LAR-nvidia-screens.conf
Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
Screen 0 "iGPU"
EndSection
Section "Device"
Identifier "iGPU"
Driver "modesetting"
EndSection
Section "Screen"
Identifier "iGPU"
Device "iGPU"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
EndSection
EOF

Note that the official nVidia documentation seems to indicate you only need the following:

Section "ServerLayout"
Identifier "layout"
Option "AllowNVIDIAGPUScreens"
EndSection

However, for me this has not worked. YMMV. It is possible that, in the future, a more minimal configuration will in fact work. It is suggested that this be monitored at this time. As is often the case with Xorg configuration, the less that is manually configured, and the more that is left to be auto-configured, the better.

Next, launch your xserver.

If GPU screen creation was successful, the log file /var/log/Xorg.0.log should contain lines with NVIDIA(G0), and querying the RandR providers with xrandr –listproviders should display a provider named NVIDIA-G0 (for “NVIDIA GPU screen 0”).

If that is the case, the following command:

$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo |grep 'OpenGL vendor'

should display:

OpenGL vendor string: NVIDIA Corporation

and the following command:

$ glxinfo |grep 'OpenGL vendor'

should display your integrated GPU's vendor as opposed to NVIDIA (e.g., Intel).

You can then test using something like:

$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxgears

You can now launch any program using your Nvidia dGPU by utilizing those two environment variables and prepending them to the program command you are running. I would refrain from using the GUI tools that come with nvidia-driver. I have no idea to what extent they will trample all over your /etc/ directory, and I have no idea if they actually work to get the above working, as this setup is still fairly bleeding-edge at this point.

As per usual, YMMV.

Known Issues

BrokenCog on IRC has reported that this setup may not work with external monitors.

Again, as indicated above, we are working as a community to find out what the abolute minimum manual xorg.conf settings are in order to just get Optimus working. As per usual with xorg settings nowadays, the less you can get away with manually specifying, the better. The xorg server works best when it can just do its own autoconfig to the largest extent possible, in my experience.

Do not try to run applications by setting DRI_PRIME=1 by utilizing this setup. It may cause your applications to crash or (as was the case for me) to dead-lock your X server.

FAQ That Google Might not Answer

1. Q: I upgraded or downgraded my kernel and now I get “Fatal: module bbswitch not found” and bumblebee doesn't work! What do I do?

A: bbswitch and nvidia-kernel are kernel modules that place themselves in /lib/modules/<SOME KERNEL VERSION> so if you upgraded your kernel, just rebuild your nvidia-kernel and bbswitch packages so that the new package will place itself into the newer /lib/modules/<KERNEL VERSION>.

2. Q: If I upgrade nvidia-kernel, will I have to upgrade nvidia-bumblebee (or vice versa) too?

A: No. Although they both use the same source files, they install very different things. The nvidia-kernel is just the kernel-module, and nvidia-bumblebee is the rest of the application.

3. Q: (Extension to #2) What if it's a new version of the nvidia proprietary driver?

A: Then in that case, then you should probably upgrade both nvidia-bumblebee and nvidia-kernel.

4. Q: What is this multilib/compat32 stuff and do I need it?

A: This isn't bumblebee-specific and depends on what you want. Read the multilib[3386] page for more details and if you will need/want it or not.

Specific Laptop Models and nVidia GPU's

Bumblebee has mixed results depending on the nVidia graphics card and driver. Some are better than others. I hope that in this section, if you have a configuration suggestion, post it in the discussion section to help those with the same graphics cards on their nVidia optimus setups (and the configuration will later be added to the article). Some of these settings may work for all laptops, some may not. We're taking precautions just in case. Because we don't know what little differences there might be between video cards, don't forget to mention your laptop model and the driver xorg.conf you're using.

This one change is suitable for those running a multilib system.

/etc/bumblebee/bumblebee.conf

# This is on a multilib system, so that is why /usr/lib64 AND /usr/lib are being used in LibraryPath:
LibraryPath=/usr/lib64/nvidia-bumblebee:/usr/lib/nvidia-bumblebee:/usr/lib64:/usr/lib
XorgModulePath=/usr/lib64/nvidia-bumblebee/xorg,/usr/lib64/xorg/modules

Sources

Bumblebee Project: http://bumblebee-project.org/[3387]

Bumblebee Project Wiki: https://github.com/Bumblebee-Project/Bumblebee/wiki[3388]

For making this page possible: jgeboski[3389]

Original SlackBuilds: https://github.com/jgeboski/Bumblebee-SlackBuilds[3390]

New SlackBuilds: https://github.com/whitewolf1776/Bumblebee-SlackBuilds[3391]

Originally written by TommyC[3392]

Section on official Optimus support by the nvidia proprietary driver contributed by Poprocks[3393], based partly on official documentation from nVidia: https://download.nvidia.com/XFree86/Linux-x86_64/450.80.02/README/primerenderoffload.html[3394]

howtos, software, hardware, nvidia, author tommyc

This page has been moved, the new location is toshiba_ac100_dynabook_az.

DisplayLink

DisplayLink 3.0 Devices

This HOWTO covers how to configure and install the DisplayLink driver (evdi) for USB 3.0 devices, and has been tested under Slackware 14.1 and newer. For older devices (e.g. USB 2.0), the udl driver should work with minimal configuration needed.

Older versions of the DisplayLink driver installed themselves in /usr/lib/displaylink instead of the path /opt/displaylink which is used in the instructions below

Preparation

In order to install the evdi driver, you will need to install dkms[3395], which can be grabbed from SlackBuilds.org using your favorite method. To install it manually:

# wget https://slackbuilds.org/slackbuilds/14.2/development/dkms.tar.gz
# tar xvf dkms.tar.gz
# cd dkms
# wget https://github.com/dell/dkms/archive/v2.4.0/dkms-2.4.0.tar.gz
# sh dkms.SlackBuild

After installing dkms, reboot your system.

Installing evdi

Grab the current DisplayLink USB Graphics Driver for Ubuntu here: http://www.displaylink.com/downloads/ubuntu[3396].

After downloading, you'll need to extract the driver and run the installer script (adjust for the current version number and make sure to run the script as root):

# unzip DisplayLink USB Graphics Software for Ubuntu 1.3.54.zip
# sh displaylink-driver-1.3.54.run
Verifying archive integrity... All good.
DisplayLink Linux Software 1.3.54 install script called: install
WARNING: Unknown distribution, assuming default - this may fail.
Installing
Configuring EVDI DKMS module
Registering EVDI kernel module with DKMS
Building EVDI kernel module with DKMS
Installing EVDI kernel module to kernel tree
EVDI kernel module built successfully
Installing x64/DisplayLinkManager
Installing libraries
Installing firmware packages
Installing license file
Adding udev rule for DisplayLink DL-3xxx/5xxx devices

The WARNING messages are simply due to Slackware not being a “supported” distribution, and should not cause issue. Likewise, you might see a warning about the lsb-release command, which can also safely be ignoring. Once complete, the evdi module should be available. Restarting once more is recommended.

Starting DisplayLinkManager

In order to manually start the evdi module and DisplayLinkManager, run the following:

# modprobe evdi
# cd /opt/displaylink
# ./DisplayLinkManager &

In testing, DisplayLinkManager did not seem to run properly unless executed by root and from the /opt/displaylink directory. Keep that in mind when manually, or automatically, calling the program.

Once running, you should be able to identify your new display(s) in xrandr:

$ xrandr --listproviders

Your native display (if on a laptop), will be Provider 0, with any connected monitors showing as 1, 2, etc. Assuming they are shown properly, enable them:

$ xrandr --setprovideroutputsource 1 0

Replace 1 with the number of your external display(s). Once active, they should show in xrandr or your chosen display settings, and can be configured properly.

Automatically Loading on Boot

Since DisplayLink support is still pretty finicky, you might have to get creative with loading the module and starting DisplayLinkManager on boot. You should be able to add the following to /etc/rc.d/rc.modules.local to load evdi:

/sbin/modprobe evdi    # DisplayLink

In order to start DisplayLinkManager, you can add the following to /etc/rc.d/rc.local:

cd /opt/displaylink && ./DisplayLinkManager &

From there, you'll only need to run (or script) the xrandr command to activate monitors on boot. One example is to add them to a script, like this:

#!/bin/bash
#
# Activate external, USB-driven monitors.
#
for x in `xrandr --listproviders | grep "Provider " | awk '{print $2}' | awk -F\: '{print $1}'`;
do
if [ $x -gt 0 ];
then
xrandr --setprovideroutputsource $x 0;
fi;
done;

DisplayLink 2.0 Devices

For devices and docks using USB 2.0, the built-in udl module should be sufficient to enable external monitors.

See Also

DisplayLink on ArchWiki[3397]

Official DisplayLink Linux Forum[3398]

howtos, hardware, displaylink, evdi, author matthew salazar

Tunnel Interfaces

If you are looking to establish an SSH tunnel between two networks and treat the tunnel as an interface, this may help.

First I would recommend enabling rc.ip_forward in /etc/rc.d/ (on local and target machines)

root@darkstar:~# chmod +x /etc/rc.d/rc.ip_forward

or for a temporary (lose at reboot) way use

root@darkstar:~# echo "1" > /proc/sys/net/ipv4/ip_forward

Almost forgot you will need to enable tunneling in /etc/ssh/sshd_conf. Find this part #PermitTunnel no uncomment and change to yes (on the target machine) you can use vi to edit or try the below code:

root@darkstar:~# /usr/bin/sudo /bin/sed -e "s/#PermitTunnel\ no/PermitTunnel\ yes\ #changed\ `date '+%Y%m%d' \
`\ by\ `/bin/whoami`/" -i.stock_slackware-`/bin/awk '{print $2}' /etc/slackware-version` /etc/ssh/sshd_config

Next I'm using autossh found at slackbuilds.org[3677] . The below script requires it (there is an alternate method mentioned at the bottom. Replace line 20.)

You will also want to have non-interactive ssh connections set up. Meaning authorized_keys setup with public/private keys[3678].

Also assuming you have sudo privileges and user on the remote machine (using the NOPASSWD: ALL option in /etc/sudoers)
Example: as root type “visudo” and add your user like this

rich ALL=(ALL) NOPASSWD: ALL

Next I'm using a simple bash script which I will explain after peeking at it.

rc.tunnel

#!/bin/bash

###########################################################
#
#Enter the ip of the target you wish to make a tunnel with.
#By ip address or hostname
#
target=74.79.121.210
port=22
#
###########################################################
# suggestions contact rich at lehcar.duckdns.org
# with thanks to Billy T (for idea and assistance)
###########################################################
#load module
/usr/bin/sudo /sbin/modprobe tun
#load remote module
/usr/bin/ssh -p $port $target "/usr/bin/sudo /sbin/modprobe tun"
/bin/sleep 1

/usr/bin/sudo /usr/bin/autossh -p $port -M 0 -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -fw 0:0 $target /bin/true
/bin/sleep 4
/usr/bin/ssh -p $port $target "/usr/bin/sudo /sbin/ifconfig tun0 192.168.5.2 pointopoint 192.168.5.1 netmask 255.255.255.252 broadcast 192.168.5.3"
/usr/bin/sudo /sbin/ifconfig tun0 192.168.5.1 pointopoint 192.168.5.2 netmask 255.255.255.252 broadcast 192.168.5.3
/usr/bin/sudo /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
/usr/bin/sudo /usr/sbin/iptables -A FORWARD -i eth0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT
/usr/bin/sudo /usr/sbin/iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT

/usr/bin/ssh -p $port $target "/usr/bin/sudo /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE"
/usr/bin/ssh -p $port $target "/usr/bin/sudo /usr/sbin/iptables -A FORWARD -i eth0 -o tun0 -m state --state RELATED,ESTABLISHED -j ACCEPT"
/usr/bin/ssh -p $port $target "/usr/bin/sudo /usr/sbin/iptables -A FORWARD -i tun0 -o eth0 -j ACCEPT"

To direct traffic over the tunnel try:

user@darkstar:~$ sudo /sbin/route add -net 74.125.131.0 netmask 255.255.255.0 dev tun0

To substitute normal ssh rather than autossh substitute this line below for the one with autossh (line 20)

/usr/bin/sudo /usr/bin/ssh -p $port -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" -fw 0:0 $target /bin/true

To recap some of the options: “-fw 0:0” forks the ssh process to the background / opens a tunnel and “0:0” picks the local and remote interfaces (ie tun0 and tun0). The “-o” options are used to specify parameters for openSSH.

Results

Now you can access the remote computer using “192.168.5.2” and your communications will go through the ssh tunnel. In the above script you may wish to modify the network and mask to fit your needs. I chose “192.168.5” but your configuration will likely be different.

I'm not going to be able to elaborate on the iptables rules still a little green there, but they work.

Here are a couple usage examples. Directing traffic to the tunnel interface. first example 10.10.132.0-255 second just 10.10.182.15

/sbin/route add -net 10.10.132.0 netmask 255.255.255.0 dev tun0
/sbin/route add -net 10.10.182.15 netmask 255.255.255.255 dev tun0

Sources

Originally written by ricky_cardo[3679]

howtos, tunnel, tun0, author ricky cardo

Creating a Virtual Mail Server with Postfix, Dovecot and MySQL

This article shows how to build and set up a secure virtual mail server using Postfix, Dovecot and MySQL on a Slackware 14.1 platform.

Because the build and installed platforms may very likely be different, and the configuration can seem complex to those not familiar with postfix, dovecot and mysql, I have organized this article in a way that I hope will help you separate and test individual tasks, without losing your way!

The article has been written as the result of my own experience in setting up a virtual mail server on my own Linode.com VPS, but I have avoided many overt references to Linode.com specific tools or configurations, so it should be easily adapted for any platform. The only Linode.com reference will be to list a few additional packages that will be needed for their Slackware 14.1 base.

Our Target Virtual Mail Server

What we mean by virtual mail server is that mail boxes need not correspond to user accounts on the machine, but instead belong to virtual users defined in the database. This allows for serving mail for many mail boxes and across multiple domains.

Running a virtual mail server may not be the best choice for many use cases as it presents some additional security risks and requirements! In particular, you should not run a virtual mail server on a machine which provides login accounts for multiple users! A virtual mail MTA should only be configured on a well secured host dedicated to the purpose!

For security we will configure Dovecot to provide authentication for Postfix via SASL based on virtual mail box credentials. We will also require TLS/SSL for all user access, and of course will assure that it does not turn into a spam serving open relay!

To get started you simply need a Slackware 14.1 base installation, with updated security patches, particularly for bash, openssl, openssl-solibs and gnutls.

If you are installing to a Linode.com VPS with their Slackware 14.1 base, you will need to add a few missing packages in addition to mariadb, dovecot and postfix. During my own set up (which includes fail2ban, not covered here) I needed to add: db48, cyrus-sasl, libaio, pidentd and sqlite

There are many parts to our virtual mail server which will be covered in separate sections. But the best way to organize them all is with a simple graphic showing the major installed components and their relationships. Figure 1, below, represents an overall view of the target virtual mail system described by this article.

Figure 1: Virtual Email Overview

Component Installation

Listing of major items from Figure 1 provides a todo check-list for installing the major components of our virtual mail server.

Follow the links listed here and carefully complete each item. When finished you will have a secure, working virtual mail server which may then be further configured to meet your specific needs!

Firewall configuration[3680]

Database initialization[3681]

Required users, groups and paths[3682]

SSL configuration and certificates[3683]

Postfix configuration[3684]

Dovecot configuration[3685]

DNS, MX records and hosts file

Startup and Troubleshooting

DNS, MX Records and Hosts File

In order for your mail server to be found on a wider network, you must correctly configure the DNS and MX records for your host's domain. These records are external to the host itself and so are outside the scope of this article.

In general, you will need to configure the DNS zone file for your domain and create MX records within that zone file which point to your mail server. If your target system is a hosted platform such as a VPS, then the provider will supply the tools and guides for doing so. You must also be sure to provide a PTR record for reverse address lookup, many systems will not receive mail from hosts which they cannot identify.

An internet search will also produce many helpful resources, which I will leave to you as an exercise.

In addition, on the host machine itself, you will need to be sure that the hosts file includes the corresponding lines for your IP address, hostname, FQDN and domain as they are used by postfix and dovecot for resolving the disposition of messages:

cat /etc/hosts
...
127.0.0.1       localhost
127.0.0.1       localhost.localdomain   localhost
xx.xx.xx.xx     darkstar
xx.xx.xx.xx     darkstar.my-domain.com   my-domain.com

Startup and Troubleshooting

After you have completed each of the major tasks listed above from Figure 1, you should be ready to startup your virtual mail server.

You should verify each aspect of the system separately and in order, so that you can resolve any potential problems methodically.

If something seems to not work as expected, take the time to understand why and avoid the urge to just “try this or that” - you will only corrupt and compromise your system by that method!

First, lets start dovecot and postfix and look for any error messages - there really should be none.

chmod +x /etc/rc.d/rc.dovecot
/etc/rc.d/rc.dovecot start
Firing up dovecot
tail /var/log/maillog
...
Feb 16 01:48:45 darkstar dovecot: master: Dovecot v2.2.13 starting up for imap, pop3, lmtp (core dumps disabled)

If you receive any other messages or errors from the shell or the log file, investigate and fix them before continuing!

Next let's do the same for postfix:

chmod +x /etc/rc.d/rc.postfix
/etc/rc.d/rc.postfix start
postfix/postfix-script: starting the Postfix mail system
tail /var/log/maillog
...
Feb 16 01:51:55 darkstar postfix/postfix-script[6931]: starting the Postfix mail system
Feb 16 01:51:55 darkstar postfix/master[6933]: daemon started -- version 2.11.3, configuration /etc/postfix

Same as before, if you receive any other messages or errors from the shell or the log file, investigate and fix them before continuing!

Next, with postfix and dovecot running, use netstat to confirm that things are as expected:

netstat -plntu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
...
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      6933/master
tcp        0      0 0.0.0.0:465             0.0.0.0:*               LISTEN      6933/master
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      6933/master
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      6843/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      6843/dovecot

You should see master (the postfix master process) listening on ports 25, 465 and 587, and dovecot on ports 993 and 995.

You should also verify that your firewall rules are in fact loaded - you do not want to run your mail server without the firewall, even briefly!

iptables -L
...

If all looks good so far, check whether you can connect to the mailserver from the outside world. We should use port 25 for this, but many ISPs block port 25 so it is difficult to get a reliable test result. So see if you can connect to port 465 or 587 using telnet.

Type the line “telnet my-domain.com 465” and hit enter key:

telnet my-domain.com 465
Trying xx.xx.xx.xx...
Connected to my-domain.com.
Escape character is '^]'.
220 darkstar.my-domain.com ESMTP Postfix
# Use Ctl-] quit to end the connection

If you do not receive a response similar to that shown then it is likely that your host is not reachable from your location.

Most commonly this will be due to a bad DNS record or incorrect nameserver settings at the domain registrar. Verify that these are correct.

It can also result from incorrect or conflicting firewall rules. Remember that iptables rules are evaluated from top to bottom and the first match determines the fate of each request. Look carefully to see if any pre-existing rules may be dropping your requests before they reach the intended rule!

If it connects then you are ready to set up an inbox in a mail client like Thunderbird and give it a final test!

When you create an inbox in your mail client, remember to use the secure imap and pop3 connections - we are not listening on the insecure service ports. You must use the full mailbox name, name@my-domain.com, as the user name, and the password must be that used in the MySQL INSERT or UPDATE queries which created the virtual user.

And remember - although this configuration is as secure as the machine it is running on, it is still a minimal configuration!

You will also definitely want to install fail2ban (available from SBo). You will also want a spam filtering application and possibly even a virus detection program for incoming and outgoing email.

You should think carefully about your own specific requirements, read the postfix and dovecot documentation thoroughly, subscribe to their mail lists and learn to interpret the logs. Watch the system carefully and take it offline at the first sign of compromise!

Running an email server on the internet is definitely not a click and forget past time!

Sources

Originally written by astrogeek[3686]

howtos, email, postfix, dovecot, mysql, ssl

Wi-Fi to eth (bridge) routing

This Howto describes, how to interconnect wireless and wired network interfaces on the same Linux computer, to enable unmodified TCP/IP packets to pass from one interface to the other. In other places this is mentioned as network bridge or Wi-Fi line extender or Wi-Fi Internet share.

The reason for this HOWTO: the word bridge is misleading

For a network bridge we assume a device that transfers unmodified network packets from one network connection to the other. One can create a bridge device (virtual) and add members to it. This works only for bridge members of type wired - eth network cards. A network Bridge “connects” members on level 3 of the OSI model[3687]. That means communication on TCP/IP level.
When you want to add a Wi-Fi device to the bridge, you hit a barrier: Wi-Fi devices communicate on level 2 of the OSI model[3688]. You can find many manuals on the Internet that document how to circumvent this (in the form of putting the Wi-Fi card in 4addr mode[3689]). This simply DOES NOT WORK!
The Wi-Fi network card (member of the bridge) authenticates and connects to the Wireless Access Point (AP), but TCP/IP packets do not travel over the connection.
So searching for “wifi eth bridge” does not return any useful solution. The culprit is the word “bridge”.

General solution

A working solution is “Proxy ARP Routing”.
You simply enable IP forwarding and then for every device connected to the wired (eth) side of a “bridge” you have to add a routing line to the routing table. This can be automated by a program like parprouted[3690] - the Proxy ARP routing daemon.

Reading of the parprouted man page[3691] is highly recommended to be aware of its limitations

Solution for Slackware, step-by-step

Tested and working on Slackware64-14.2, kernel-4.11.6, CPU i5-7200

This solution is for static IP addresses. See below link of original source for a scenario that uses DHCP.

Assumptions:
We want to interconnect one Wi-Fi and one wired (eth) network card - the network devices wlan0 and eth0.
Prepare Slackware box so that you are able to communicate over the Wi-Fi adapter (using NetworkManager, rc.inet1 or other means…), making sure that the wired (eth) adapter is not being used.
I had set up WPA2 AES verification with NetworkManager to get a usable wpa_supplicant.conf configuration file which I used later with rc.inet1.
Disable all on-boot network configurations (i.e. make sure that rc.networkmanager or other files for network setup are not executable) and set rc.inet1 executable.

IP forwarding must be enabled in the kernel (since the 2.1 release the Linux kernel does not require an explicit compilation option for this)

download & compile & install http://www.hazard.maks.net/parprouted/parprouted-0.7.tar.gz[3692]

edit /etc/rc.d/rc.inet1.conf so to enable wlan0 and eth0. Assign them static IP addresses and set wlan0 to the lowest index and connect to the AP
Below are example lines from /etc/rc.d/rc.inet1.conf - the only ones without comment sign “#” at the beginning and for WPA2 Wi-Fi authentication

IFNAME[1]="eth0"
IPADDR[1]="10.200.200.223"
NETMASK[1]="255.255.255.0"
GATEWAY="10.200.200.1"
DEBUG_ETH_UP="no"
IFNAME[0]="wlan0"
IPADDR[0]="10.200.200.222"
NETMASK[0]="255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
WLAN_MODE[0]=Managed
WLAN_ESSID[0]="R7500"
WLAN_WPA[0]="wpa_supplicant"
WLAN_WPADRIVER[0]="wext"

set /etc/rc.d/rc.ip_forward executable:

# chmod +x /etc/rc.d/rc.ip_forward

add a line

/usr/local/sbin/parprouted wlan0 eth0

to /etc/rc.d/rc.local and make sure that this file is executable

That's all. Reboot and you have a working Wi-Fi - eth bridge, also called Wi-Fi extender or Wi-Fi Internet share.

Note on parprouted compilation:
The parprouted man page section “Requirements” says: “parprouted requires the “ip” program from iproute2 tools to be installed in /sbin. If it is installed in another location, please replace ”/sbin/ip“ occurrences in the source with the correct path”.
Slackware installs the ip program as /sbin/ip so you should be OK.

DHCP enabled variant

Look below for a solution in a source link.

Sources

* Written by Zdenko Dolar[3693], August 2017

* Original source:https://wiki.debian.org/BridgeNetworkConnectionsProxyArp[3694]

howtos, network, WiFi, bridge, author slacker

Setup Apache httpd server

This is a general how to to get a basic httpd service up and running.

Applies to:

Slackware 14.1 (and possibly previous versions)

Apache 2 (and possibly previous versions)

Basic Setup

Edit /etc/httpd/httpd.conf - Here is what you care about, change/uncomment the following lines as necessary:

vi /etc/httpd/httpd.conf
# optional, require a proper DNS configuration
ServerAdmin you@myawesomeserver.com
ServerName www.myawesomeserver.com:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "/srv/httpd/htdocs"
<Directory "/srv/httpd/htdocs">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
<IfModule dir_module>
DirectoryIndex index.html index.htm index.pl index.php
</IfModule>
ErrorLog "/var/log/httpd/error_log"
CustomLog "/var/log/httpd/access_log" common
# Optional but nice. this creates a directory listing if index.html is missing.
Include /etc/httpd/extra/httpd-autoindex.conf
# Optional
Include /etc/httpd/extra/httpd-default.conf

All other default settings should be good.

Make httpd start on boot.

chmod 755 /etc/rc.d/rc.httpd
/etc/rc.d/rc.httpd start

HINT: With these settings, your default webpages should be put in /srv/httpd/htdocs. Your default logs should be under /var/log/httpd.

User Directories

This will allow users to have individual web space (/home/user/public_html). These can be accessed from the web by adding “~username” to the URL.

Example: http://www.slackware.com/~pat

Edit /etc/httpd/httpd.conf - Here is what you care about, change/uncomment the following lines as necessary:

 vi /etc/httpd/httpd.conf
LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so
LoadModule authz_user_module lib64/httpd/modules/mod_authz_user.so
LoadModule authz_core_module lib64/httpd/modules/mod_authz_core.so
LoadModule userdir_module lib64/httpd/modules/mod_userdir.so
Include /etc/httpd/extra/httpd-userdir.conf

Edit /etc/httpd/extra/httpd-userdir.conf, change/uncomment the following:

vi /etc/httpd/extra/httpd-userdir.conf
<Directory "/home/*/public_html">
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch
Require method GET POST OPTIONS
</Directory>

Restart Apache

/etc/rc.d/rc.httpd restart

Enable CGI-BIN

This enables CGI script execution on your webserver.

Edit /etc/httpd/httpd.conf - Here is what you care about, change/uncomment the following lines as necessary:

 vi /etc/httpd/httpd.conf
LoadModule proxy_module      lib64/httpd/modules/mod_proxy.so
LoadModule proxy_fcgi_module lib64/httpd/modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module lib64/httpd/modules/mod_proxy_scgi.so
LoadModule cgid_module       lib64/httpd/modules/mod_cgid.so
<IfModule alias_module>
ScriptAlias /cgi-bin/ "/srv/httpd/cgi-bin/"
</IfModule>
<Directory "/srv/httpd/cgi-bin">
AllowOverride None
Options None
Require all granted
</Directory>
<IfModule mime_module>
AddHandler cgi-script .cgi .pl
</IfModule>

Restart Apache

/etc/rc.d/rc.httpd restart

HINT: Your cgi-bin directory will be /srv/httpd/cgi-bin/. The scripts can be accessed by adding /cgi-bin/SCRIPTNAME to the website URL.

Example: http://www.slackware.com/cgi-bin/awesomescript.pl

NOTE: This does not apply to PHP scripts, see the below for them.

User CGI-BIN

This will allow users to run CGI scripts out of their /home/user/public_html/cgi-bin directory. Their scripts can be accessed through their user directories.

Example: http://www.slackware.com/~pat/cgi-bin/webform.pl

Setup CGI-BIN as described above.

Edit /etc/httpd/extra/httpd-userdir.conf - Here is what you care about, change/uncomment the following lines as necessary:

vi /etc/httpd/extra/httpd-userdir.conf
<Directory "/home/*/public_html/cgi-bin">
Options ExecCGI
SetHandler cgi-script
</Directory>

Restart Apache

/etc/rc.d/rc.httpd restart

Enable PHP

http://docs.slackware.com/howtos:network_services:setup_apache_php_mysql[3695]

Virtual Hosts

Edit /etc/httpd/httpd.conf - Here is what you care about, change/uncomment the following lines as necessary:

vi /etc/httpd/httpd.conf
Include /etc/httpd/extra/httpd-vhosts.conf

Edit /etc/httpd/extra/httpd-vhosts.conf - Here is what you care about, add one of these entries for each virtual host:

vi /etc/httpd/extra/httpd-vhosts.conf
<VirtualHost *:80>
ServerAdmin webmaster@www.server1.com
DocumentRoot "/home/server1/public_html/"
ServerName server1.com
ServerAlias www.server1.com
ErrorLog "/var/log/httpd/server1.com-error.log"
CustomLog "/var/log/httpd/server1.com-access.log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@www.server2.com
DocumentRoot "/home/server2/public_html/"
ServerName server2.com
ServerAlias www.server2.com
ErrorLog "/var/log/httpd/server2.com-error.log"
CustomLog "/var/log/httpd/server2.com-access.log" common
</VirtualHost>

Restart Apache

/etc/rc.d/rc.httpd restart

NOTE: I run my vhosts as users so, the document roots are under /home/user directories. You do not have to do this. You can put the document roots anywhere you like.

Example:

/srv/www/htdocs/server1
/srv/www/htdocs/server2

NOTE 2: These do not affect your default webserver setting in /etc/httpd/httpd.conf. That web server instance will still work and be the default if a plain IP in used as the URL.

Vhosts with individual CGI-BIN directories

If you have virtual hosts that need CGI (or need CGI in their own directory) you can do it like this:

Edit /etc/httpd/extra/httpd-vhosts.conf - Add one of these entries for each vhost that needs unique cgi-bin directories:

vi /etc/httpd/extra/httpd-vhosts.conf
<Directory /home/server1/public_html/cgi-bin/>
Options ExecCGI
SetHandler cgi-script
</Directory>

Restart Apache

/etc/rc.d/rc.httpd restart

HINT: I usually put these with their respective <VirtualHost *:80> entries.

NOTE: Change the “/home/server1/public_html/cgi-bin/” to the correct directory location.

HTTPS / SSL

to be added

SNI HTTPS / SSL (Name based https)

to be added

Sources

Originally written by arfon[3696]

howtos, network services, apache, httpd, author arfon

Install and configuring kerberos On Slackware without PAM

The KDC

This procedure will result in a new Kerberos realm. If you already have access to a Kerberos KDC, you can skip to the client and application server parts. Also, the below procedure is very abbreviated and is not a substitute for reading the documentation supplied in the package or on the MIT Kerberos website.

Install krb (you can download and build it from http://slackbuilds.org/repository/14.1/network/krb5/[3697])

Configure /etc/krb5.conf, /var/krb5kdc/kdc.conf and /var/krb5kdc/kadm5.acl . These files are examples which you should adjust after reading the Kerberos documentation.

krb5.conf

 [domain_realm]
example.com = EXAMPLE.COM
.example.com = EXAMPLE.COM
[libdefaults]
default_realm = EXAMPLE.COM
dns_kdc_lookup = true
dns_realm_lookup = true
forwardable = true
renewable = true
[realms]
EXAMPLE.COM = {
kdc = kerberos-1.example.com:88
kdc = kerberos-2.example.com:88
admin_server = kerberos-1.example.com:749
}

kdc.conf

[kdcdefaults]
kdc_ports = 749,88
[realms]
EXAMPLE.COM = {
database_name = /var/krb5kdc/principal
admin_keytab = FILE:/var/krb5kdc/kadm5.keytab
acl_file = /var/krb5kdc/kadm5.acl
key_stash_file = /var/krb5kdc/.k5.EXAMPLE.COM
kdc_ports = 749,88
max_life = 10h 0m 0s
max_renewable_life = 7d 0h 0m 0s
supported_keytypes = aes256-cts des-cbc-crc des-cbc-md5
}

kadm5.acl

krb5adminprinc/admin   *

3. Create DataBase

/usr/kerberos/sbin/kdb5_util create -r EXAMPLE.COM -s

4. Extract the admin server keys to /var/krb5kdc/kadm5.keytab.

/usr/kerberos/sbin/kadmin.local
kadmin.local: xst -k /var/krb5kdc/kadm5.keytab kadmin/admin kadmin/changepw

5. Create host and other principals; extract to /etc/krb5.keytab

kadmin.local: ank -randkey host/fully.qualified.domain.name
kadmin.local: xst -k /etc/krb5.keytab host/fully.qualified.domain.name

**6.** Create admin, user principals
kadmin.local: ank krb5adminprinc/admin
kadmin.local: ank krb5userprinc
kadmin.local: quit

7. Create startup script /etc/rc.d/rc.krb5

rc.krb5 - shamelessly ripped off from rc.samba from Slackware 13.0

#!/bin/sh
#
# /etc/rc.d/rc.krb5
#
# Start/stop/restart the MIT Kerberos V KDC
#
# To make Kerberos start automatically at boot, make this
# file executable:  chmod 755 /etc/rc.d/rc.krb5
#
krb5_start() {
if [ -x /usr/kerberos/sbin/krb5kdc -a -x /usr/kerberos/sbin/kadmind -a -r /etc/krb5.conf -a -r /var/krb5kdc/kdc.conf ]; then
echo "Starting Kerberos:  /usr/kerberos/sbin/krb5kdc"
/usr/kerberos/sbin/krb5kdc
echo "                 /usr/kerberos/sbin/kadmind"
/usr/kerberos/sbin/kadmind
fi
}
krb5_stop() {
killall krb5kdc kadmind
}
krb5_restart() {
krb5_stop
sleep 2
krb5_start
}
case "$1" in
'start')
krb5_start
;;
'stop')
krb5_stop
;;
'restart')
krb5_restart
;;
*)
# Default is "start", for backwards compatibility with previous
# Slackware versions.  This may change to a 'usage' error someday.
krb5_start
esac

8. Start KDC daemons:

# chmod +x /etc/rc.d/rc.krb5
# /etc/rc.d/rc.krb5 start

9. Remember to make the rc.krb5 script executable if you want the KDC to start automatically at boot. Verify connectivity to KDC with kadmin, kinit:

$ kinit krb5userprinc
$ klist
$ kadmin -p krb5adminprinc/admin

The Client

This procedure will result in a client capable of retrievving Kerberos tickets from a KDC and allow Kerberos principals to login at the console. Successful console login by a principal will generate tickets in the user's cache. Failed login by a principal (because the principal doesn't exist, or the wrong password was supplied) should fall through to local authentications (/etc/shadow). Note: the principal must be associated with an account on the system, either in the local passwd database or via a network system such as NIS or LDAP.

1. Install krb5 always http://slackbuilds.org/repository/14.1/network/krb5/[3698] . 2. Setup /etc/krb5.conf: krb5.conf

[domain_realm]
example.com = EXAMPLE.COM
.example.com = EXAMPLE.COM
[libdefaults]
default_realm = EXAMPLE.COM
dns_kdc_lookup = true
dns_realm_lookup = true
forwardable = true
renewable = true
[realms]
EXAMPLE.COM = {
kdc = kerberos-1.example.com:88
kdc = kerberos-2.example.com:88
admin_server = kerberos-1.example.com:749
}

3. Verify kadmin, kinit working

$ kinit krb5userprinc
$ klist
$ kadmin -p krb5adminprinc/admin

4. Add host principal, and extract host principal to /etc/krb5.keytab using kadmin and admin principal:

# kadmin -p krb5adminprinc/admin
kadmin: ank -randkey host/fully.qualified.domain.name
kadmin: xst -k /etc/krb5.keytab host/fully.qualified.domain.name
kadmin: quit

Sources

* Original source: http://arktur.shuttle.de/CD/Testpakete/Kerberos/krb5.html[3699] * Contributions by User jamesaxl[3700]

howtos, network services, kerberizing slackware without pam

Setting Up Your Own Mozilla Sync Server

Mozilla Sync is a feature which is supported in Firefox since version 4. It allows you to store your bookmarks, browsing history, browser preferences, and saved passwords on a remote server. It even allows you to work on multiple computers and have the same Firefox configuration on all these computers. That’s a pretty cool feature. You can for instance setup sync on your Android phone’s Firefox browser and quickly configure it by entering your account-specific sync key. Moments later you will have your synced desktop browser configuration on your phone.

Mozilla offers public sync servers. If you don't trust your passwords and browsing history in the hands of Mozilla (though your data is supposedly being encrypted with your unique sync key before it gets uploaded to Mozilla), then you can use this HOWTO for setting up your own Sync Server at home (or at work).

Luckily, Mozilla is open as always and makes the Open Source Sync Server code available to everyone who wants to play with it. And setting it up is not difficult at all.

Note: Mozilla have re-designed and re-written the original Sync Server (it was called “Mozilla Weave Server” at the time, and was almost impossible to setup). It is now written in Python, and the steps to create your own Sync Server are described on this page[3701]. That page is what you should follow. The rest of this HOWTO tries to bring more detail to the process of configuring your Slackware box to become a real Sync Server.

Of course you want to install this on a Slackware server!

Requirements

There are some explicit dependencies as mentioned on the Mozilla page[3702]:

python 2.6 (part of Slackware 13.37. I have not tested with Slackware 14 which upgraded to python 2.7)

sqlite3 (already supplied by Slackware as well)

virtualenv[3703]. Slackware packages can be downloaded here: http://slackware.com/~alien/slackbuilds/virtualenv/[3704] or built using the SlackBuilds.org script[3705] .

The Sync Server code is hosted in a Mercurial repository and since Slackware ships a Mercurial client, that code is easy to check out to a local directory where you continue to build the server binary:

$ mkdir -p /usr/local/server-full
$ cd /usr/local/server-full
$ hg clone https://hg.mozilla.org/services/server-full/ .
$ make build

Now, this server is ready to run, but unless you make some configuration changes it is not going to do much good:

By default, the server stores your sync data in a sqlite database (you can use a real MySQL server database if you want), but it will create the sqlite database in /tmp which is entirely inappropriate. Further down you will find what you have to modify so that your clients’ sync data go somewhere less “volatile”.

The python-based Sync Server can run all by itself on a configurable port number (5000 by default) which is just fine if you are its only user in your little LAN. But even Mozilla advises to put a real webserver between you and the Sync Server. In Slackware you can use the apache webserver for this. You must install an additional apache module for this to work: mod_wsgi[3706]. Slackware packages plus SlackBuild script can be downloaded here: http://slackware.com/~alien/slackbuilds/mod_wsgi/[3707] or get a alternative SlackBuild script from slackbuilds.org[3708].

Configuration

Create a separate system user and group (weave:sync) which is going to run the Sync Server so that it can not interfere with Apache if anything goes crazy:

# groupadd sync
# useradd -g sync weave

If you omitted the creation of the home directory for this “weave” user account, then create it like this:

# mkdir /home/weave
# chown weave:sync /home/weave
# chmod 711 /home/weave

Create a new file “/etc/httpd/extra/httpd-wsgi.conf” with the following content (adapt to your actual sync server hostname):

    <Directory /usr/local/server-full>
Order deny,allow
Allow from all
</Directory>
<VirtualHost *:80>
ServerName sync.myserver.net
DocumentRoot /usr/local/server-full
WSGIProcessGroup sync
WSGIDaemonProcess sync user=weave group=sync processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias / /usr/local/server-full/sync.wsgi
CustomLog /var/log/httpd/sync.myserver.net-access.log combined
ErrorLog  /var/log/httpd/sync.myserver.net-error.log
</VirtualHost>

Apache 2.4 uses a different syntax for access control:

    <Directory /usr/local/server-full>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName sync.myserver.net
DocumentRoot /usr/local/server-full
WSGIProcessGroup sync
WSGIDaemonProcess sync user=weave group=sync processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias / /usr/local/server-full/sync.wsgi
CustomLog /var/log/httpd/sync.myserver.net-access.log combined
ErrorLog  /var/log/httpd/sync.myserver.net-error.log
</VirtualHost>

This tells apache that a script called “sync.wsgi” is going to be spawned as user “weave:sync” whenever a client connects to http://sync.myserver.net/ .

Modify your apache server's main configuration file “/etc/httpd/httpd.conf”, in order to make it load the mod_wsgi module and use its configuration file. Add the following lines to the httpd.conf:

    # Activate the WSGI module (serving python binaries to the web):
Include /etc/httpd/extra/mod_wsgi.conf
# Act as a reverse proxy to the Mozilla Sync server:
Include /etc/httpd/extra/httpd-wsgi.conf

Check your Apache configuration for syntax errors which you may have introduced:

# apachectl configtest

Restart Apache:

# /etc/rc.d/rc.httpd stop
# pause 3
# /etc/rc.d/rc.httpd stop
# /etc/rc.d/rc.httpd start

Configure the Sync Server configuration files.

Inside the directory “/usr/local/server-full” (where the Sync Server code has been downloaded and built if you followed this HOWTO to the letter) you will find the aforementioned “sync.wsgi” script. Open the file in an editor. Read through the file and change it to something which you find better suited. For instance, change “/tmp” to “/var/tmp” in the line “os.environ['PYTHON_EGG_CACHE'] = ‘/tmp/python-eggs’”:

os.environ['PYTHON_EGG_CACHE'] = '/tmp/python-eggs'

changes to

os.environ['PYTHON_EGG_CACHE'] = '/var/tmp/python-eggs'

Next, edit the file “development.ini” (that filename is configured in “sync.wsgi” in case you want to use another name). In that file change the location of the error logfile so that it is created in “/var/tmp”. The line

args = (‘/tmp/sync-error.log’,)

changes to:

args = ('/var/tmp/sync-error.log',)

The “development.ini” file also mentions the name of the actual sync configuration file “etc/sync.conf”. Note that this path is relative to the Weave server’s root directory. It requires some editing! For instance, create the SQL database file in the “weave” user’s own home directory. The line

sqluri = sqlite:////tmp/test.db

becomes:

sqluri = sqlite:////home/weave/my_weave_server.db

The default value for the quota assigned to each sync account is too low (it’s set to 5 MB). Mozilla states that 99.9% of all clients which connect to its public server use less than 25 MB of quota, so use that value as a default. The line

quota_size = 5120

changes to:

quota_size = 25600

Then, look for the following line and make absolutely certain that it is changed to the Apache http:// URL of your Sync Server, i.e. the URL that the sync clients are going to use:

fallback_node = http://localhost:5000/

You can play with other options in this file to see what they can offer. For instance, you can disable “captcha” and not enable SSL, but you may decide that this is important to your setup.

Don’t forget to restart your apache server if you have not yet done so.

USing the Sync Server

And now it is time to tell your Firefox browser to use this new service!

Select “Tools > Setup sync …”:

In case this is the first time you talk to your Sync Server, you need to setup an account, so click the button “Create a New Account“. This opens a new dialog box where you can type your email address (this will become your account name), an associated password and then in the dropdown menu, do not select “Firefox Sync Server”. Instead, you choose “Use a custom server”. This allows you to enter the URL for your brand-new private Sync Server.
Once the account has been created, Firefox will show you the sync key it will be using to encrypt your data. That key is important, you will need it if you want to add more computers to your sync account.
And that’s basically it – the sync process will start immediately:

Else if you already have a Sync Account and want to add a second computer to it, you can click on “Connect” in the first dialog which will open a new dialog. There are two ways to add this computer to your existing sync account:

Either you enter the code which is being shown on another computer which is already syncing to the server;

Or else you click on “I don’t have the device with me“. This is what you would usually do. It is cumbersome to search for another computer or hand-held if all you need to know is your sync key:

If you know your sync key you can enter that in the following dialog, along with your account details and the server URL:

The sync key which is associated with your sync account can be retrieved at any moment should you have forgotten to write it down. Just go to a computer which has been setup for Sync, and open your Firefox browser’s Preferences at the “Sync” tab. Under “Manage your account” you will find a menu item to display your key (as well as a way to change your account’s password).
More help can be found at http://support.mozilla.com/kb/what-firefox-sync[3709] .

Securing your Sync Server with SSL

- This section is coming soon! You really want your Sync server to be accessible over https:// if you sync over the Internet.

Sources

Originally written by Eric Hameleers[3710]

Original source: Alien Pastures Blog[3711]

howtos, software, sync, weave, author alienbob, slackware 13.37

Dropbox client

Info

The dropbox client grants a user access to the online Dropbox hosting services and allows for easy live synchronization with it. The client also runs in the background, and will notify (if it can) the user of changes to synchronized shared files.

For more information about Dropbox and to create an account, please visit http://www.dropbox.com[3712]

Installation

SlackBuild

This option is easy and more preferred as it creates a package that can be later managed by the Slackware package tools and can be installed system wide. The newer versions of the Dropbox client also self upgrades within the minor versions (2.X.Y will update patch versions Y but not update to a newer minor version X), so there is no need to get the most recent client.

The SlackBuild link is at: http://slackbuilds.org/result/?search=dropbox[3713]

Manual Installation

To install manually, you can either convert a pre-compiled DEB or RPM or compile from source a client called nautilus-dropbox. This is a wrapper for a few scripts and a framework which will in turn download a working client for you. This client is installed locally per user.

The download page is here: https://www.dropbox.com/install?os=lnx[3714]

dropbox.py

Another option to control the Dropbox client via CLI is using the dropbox.py script form this link: https://www.dropbox.com/download?dl=packages/dropbox.py[3715]. After downloading you can either “run” it or even “install” it like so:

~# install -D -m 755 path_to_dropbox.py /usr/bin/dropbox

To see the script's options, please type:

~# ./dropbox.py --help

Starting the service for the first time is done like so:

~# ./dropbox.py start -i

This will download a local client for the current user.

Linking

In order to link a computer to the online service, the client will need to be registered with the online service using the user's account.

When the client links successfully, it will create a Dropbox folder in the user's home directory and will start downloading the current online view.

GUI

When starting the service for the first time, the client will try to start in X, and if it succeeds, the user will be prompt with a GUI dialog that will ask for a username and password.

On X desktop environments, the client will also create an auto-start link and will supply a system-tray icon that can indicate the current status (online/offline/synchronizing etc'). If it does not, simply link the dropbox.desktop file from /usr/share/applications to the appropriate place for the desktop environment, or create a link to run the service when the environment loads.

CLI

If the system has no X, it is still possible to link the client. Just run the service and wait for an output:

~/.dropbox-dist/# ./dropboxd

The service will start a login loop and on each linking failure (every few seconds) will ask to open a URL. Copy that URL and while the service is still trying to login, open the link with any browser (the browser does not even have to be on the same PC). Example:

~# lynx https://www.dropbox.com/cli_link?host_id=123XXXXXXXXXXXXXXXXXXXXX321

After registering on the page, the running service will become linked and will go back to the background.

Sources

Originally written by Amit Ugol[3716]

howtos, template

Setting up a WiFi Access Point on your Slackware Box

You should read this, regardless of whether you are a Slackware enthusiast or not, because you will find most of it applicable to other distributions too.

1 Preamble

There are endless reasons for wanting to run an AP from a standard Linux environment as opposed to the crippled ones that come in most AP appliances, we're not here to discuss them all but if you're reading this you've found your own motivation for doing it.

Out of the box Slackware can't be used to create a Wireless Access Point, but don't panic it's got almost everything you need, with just one thing that needs to be gotten from outside the official Slackware packages and a bit of configuration you can achieve what most low end AP offer. After all most of the home/small office AP in commerce run a really crippled Linux on top of ridiculously underpowered hardware it's just a matter of getting the necessary software and configuring it ! Let's take a look at how you could go about it.

2 Hardware Requirements

I'm assuming that almost any Linux capable hardware has the ability to deal with wired and wireless NICs, since that's what we'll need in terms of hardware for making an AP and because it doesn't really matter to what bus the NICs are attached to (pci,pcie,pcix or even usb), almost any Linux capable hardware will be ok. You will choose hardware that can handle the traffic load you want to target. One thing you need to check is that your wireless supports software AP by looking at the output of

iw list

Look at the section

 software interface modes:
* AP/VLAN
* monitor

AP needs to be among the software interface modes.

Ok there is still some Wireless NICs that support hardware master mode but that's 3 against all the rest I'm not going to bother going into any detail with those 3 exceptions, google is your friend if you want to insist in the hardware master mode way.

3 Software Requirements

Here your mileage may vary depending on the type of setup you want but let's keep things simple to get started by offering similar things to what most low end Access points have: dhcp, dns forwarder, WPA PSK, firewalling and bridging wired and wireless interfaces. Even at that there are several possibilities with the shipped Slackware packages: you could run bind and full dhcp server but for the sake of simplicity let's combine those 2 in one software that handles both (dnsmasq). If you already run bind or dhcp server you probably know how to get them working for the AP anyway.

Low end AP's also support WEP, but there's an issue with it's implementation that makes it very vulnerable (search wep vulnerability and read more about it or just believe me that even with an extremely low performance machine you can crack WEP keys). Using a WEP protected Wifi is basically the same as not having any protection at all so I'm not going to consider that option. Later on I might talk mention how to go about not having any protection at all but it's something you should really avoid so for the moment let's do things with WPA-PSK security which is the WiFi entry level security.

Another common mistake is to make hidden SSID WiFi networks: in terms of security it's actually less secure because making it harder for the clients to find the AP actually makes it easier for a malicious user to hack into the Wireless Lan. Let's not make our WiFi with a hidden ssid.

3.1 Required Kernel Options

The kernel shipped with Slackware has all you need but just in case you build your own you will need to have these options checked along with whatever is required for your hardware to work properly:

802.1d Ethernet Bridging

Network packet filtering framework (Netfilter) [and a lot of sub options in there] (*)

cfg80211 - wireless configuration API

cfg80211 wireless extensions compatibility

Common routines for IEEE802.11 drivers

Generic IEEE 802.11 Networking Stack (mac80211)

(*) If you're not familiar with iptables your best bet is to check all sub options that are not experimental

3.1.1 Runtime Kernel Parameters

Here are the runtime kernel parameters I've grouped together in one place, like some other distros, in /etc/sysctl.conf

net.ipv6.conf.all.disable_ipv6=1
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=1
net.ipv4.conf.default.rp_filter=1
#use this if you get odd behavior vaguely resembling failing to find pmtu
#net.ipv4.tcp_sack=0
net.ipv4.ip_dynaddr=1
net.ipv4.conf.all.accept_source_route=0
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
#use this if icmp black holes become an issue for you
#net.ipv4.tcp_mtu_probing=1
#net.ipv4.tcp_base_mss=1024

3.2 Slackware Packages

dnsmasq

bridge-utils

iptables

wireless-tools

iw

libnl

openssl

ppp (*)

rp-pppoe (*)

(*) only if you want your AP to actually manage your internet connection.

3.3 Other Software

hostapd

Hostapd is not shipped with Slackware packages and is the only extra software you need for a basic setup. To obtain hostapd you could either download a binary version from some reliable source or compile it from sources. You might be slightly better off compiling from sources, so that you get e fairly recent version, but it's up to you. Just don't try using really old hostapd versions like 0.6.7 on 2.6+ kernels: hostapd has followed the kernel wireless stack drivers and transitioned from only supporting FullMAC devices to supporting SoftMAC on almost all devices trough nl80211. Nowadays the combination of both hardware and driver supporting FullMAC is hard to come by (Prism2/2.5/3, and Atheros ar521x) all the others need to go the SoftMAC way so I suggest ignoring the 2 that could still go the FullMAC way and just go for SoftMAC for all, allowing you to use almost any WiFi card for creating an AP. If you like you can read more about mac80211 here[3717].

Hostapd sources can be downloaded from here[3718], you should be looking at the most recent stable version (2.9 last time this article was edited) and avoid the development/old branches. Compiling hostapd is really simple:

extract the sources

enter the source tree (you should see something like this: CONTRIBUTIONS COPYING README hostapd/ patches/ src/)

enter the hostapd sub-directory (we shall refer to this folder as HOSTAPD_SOURCE_TREE from here on)

edit the defconfig file and enable any optional features you need (default is fine for a simple setup)

copy the defconfig file to .config

make a softlink for netlink includes (cd /usr/include; ln -s libnl3/netlink .)

make

make install (or optionally just put in /usr/local/bin just the hostapd binary)

If you are using a cross compiler to target non x86 hardware make sure you have set it up to right: if you have trouble with that you can try a native build as building hostapd is really simple and not demanding on the hardware.

3.3.1 File Integrity

If your AP also acts a router it's probably going to be exposed to malware and even if you do your best to keep malicious users out of your work they might still find a way in. If your router is exposed to internet you might want to consider some sort of file integrity tool that would alert you if files have been tampered with. File integrity checking could be a whole article so I'm not going to go into any detail beyond advising to read more about it on security oriented communities like security focus[3719] or maybe just do a google search on “file integrity tool”.

4 Configuring

Now let's have a look at how to configure everything to that it will work right.

4.1 Hostapd

Create hostapd folder inside /etc and copy into it a few files:

mkdir /etc/hostapd
cp HOSTAPD_SOURCE_TREE/hostapd.conf /etc/hostapd/hostapd.template
cp HOSTAPD_SOURCE_TREE/hostapd.wpa_psk /etc/hostapd/

Now supposing that wlan0 is the interface you will be using for creating the AP I suggest that you copy hostapd.template to wlan0.conf or br0.conf if it's bridged.

cd /etc/hostapd
cp hostapd.template wlan0.conf

alternatively just copy it to hostapd.conf … but if you like to run several AP you might prefer to differentiate their config files.

These are the things you have-to edit in wlan0.conf

interface=wlan0

driver=nl80211

ssid=your_ssid

hw_mode=g #to keep it simple don't attempt n mode right away even if your hardware supports it

channel=6 #or whatever other channel you prefer

macaddr_acl=1 # see notes below

# 0 = accept unless in deny list (iptables mac filtering and optionally have a ban list)

# 1 = deny unless in accept list (mandatory to have a mac address ACL)

accept_mac_file=/etc/hostapd/wlan0.accept

# deny_mac_file=/etc/hostapd/wlan0.deny

wpa=2

wpa_psk_file=/etc/hostapd/wlan0.wpa_psk

wpa_key_mgmt=WPA-PSK WPA-PSK-SHA256

wpa_pairwise=TKIP

rsn_pairwise=CCMP

wpa_group_rekey=600

wpa_gmk_rekey=86400

wpa_ptk_rekey=600

This will use WPA-PSK/WPA2-PSK authentication. Have a look here[3720] in the section “A good starting point for a wpa & wpa2 enabled access point is:” for more details on authentication.

There are pros and cons for dealing with mac address filtering either with iptables or with mac ACL, to put it in really short terms the main difference is that doing it with iptables allows you to keep all filtering stuff in one place but has a tendency to get lengthy if your network has many clients while doing it with mac ACL will require editing of separate file (containing just a newline separated list of mac addresses) but can really simplify things if you have several wired and wireless clinets.

The above hostapd configuration has mac ACL so if you followed it closely you should now create your /etc/hostapd/wlan0.accept containing a new line separated list of macs you wish to allow into your wireless network. Failing to do so will not allow any of your wireless clients to authenticate even with the correct credentials.

There is also an option for telling hostapd about bridging but the comment in hostapd.conf states: “If the bridge parameter is not set, the drivers will automatically figure out the bridge interface (assuming sysfs is enabled and mounted to /sys) and this parameter may not be needed”. I followed that to the letter and ignored altogether

#bridge=br0

and besides that we'll be brigding the interfaces after having setup the AP. I've not played with this option but I suspect that enabling it and/or brigding before starting up hostapd may result in having the wired clients mandated to using WPA too.

Now it's time to deal with the passphrase for associating: there is more then one way of dealing with the passwords but I like to use wpa_psk_file as it allows per NIC passwords, and even have different passwords for your different Wifi staions. If you want to keep things simple just use the special MAC “00:00:00:00:00:00” that will match with every MAC thus having the same passphrase for all the clients. Here's an example:

00:00:00:00:00:00 your_psk_for_all_stations

Now you should be ready to fire up hostapd

/usr/local/bin/hostapd -B /etc/hostapd/wlan0.conf
iwconfig  wlan0
wlan0     IEEE 802.11bg  Mode:Master  Tx-Power=20 dBm
Retry  long limit:7   RTS thr:off   Fragment thr:off
Power Management:on

and iwconfig should report that the interface is in master mode. If this fails you either got an old version of hostapd that does not support nl80211 of your kernel lacks the necessary options for supporting nl80211.

If you prefer to use iw instead this is the sort of output you should have:

iw dev wlan0 info
Interface wlan0
ifindex 4
type AP
wiphy 0
channel 6 (2437 MHz) NO HT

4.2 Bridging

Now it's time to bridge together wired and Wireless NICs. It's possible to use the native bridge setup from rc.inet1.conf but you may need to restart bridge after starting hostapd so here are the commands necessary to set it up manually.

/usr/sbin/brctl addbr br0
/usr/sbin/brctl stp br0 off #turn off spanning tree unless you know you're going to make loops
/usr/sbin/brctl addif br0 wlan0 #add the wireless nic in the bridge
/usr/sbin/brctl addif br0 eth0  #add the wired nic in the bridge
/sbin/ifconfig wlan0 0.0.0.0 up #bring up the interfaces
/sbin/ifconfig eth0 0.0.0.0 up
/sbin/ifconfig br0 192.168.0.1 up #give the bridge an ip address or dnsmasq will not work right

4.3 DNS and DHCP Servers

Now it's time to start dnsmasq. You can actually leave it running from boot if you like or even run specific servers at your choice. I now run separate dnsmasq instances for each AP so I've abandoned Slackware's rc.dnsmasq and start it from my custom network scripts which requires separate config files for each interface (like /etc/dnsmasq/br0.conf and /etc/dnsmasw/wlan1.conf). Configuring it is something you should look into to suit best your networking needs … let's just look at some of the most common tings. Supposing that you want to assign ip addresses belonging to 192.168.0.0/24 and this are the options you will need:

interface=br0

except-interface=lo

bind-interfaces

listen-address=192.168.0.1

dhcp-range=192.168.0.2,192.168.0.254,24h

dhcp-leasefile=/run/dnsmasq/dnsmasq.leases

conf-dir=/etc/dnsmasq.d

The options except-interface bind-interfaces and listen-address are particularly useful if you want to run more then one instance of dnsmasq. For the bridge to work correctly don't forget to allow forwarding either by using rc.ip_forward or by executing

/bin/echo 1 > /proc/sys/net/ipv4/ip_forward

See section 3.1.1 for the other useful run-time kernel parameters.

4.4 Firewalling

Now is a good time to configure your firwall protection. Supposing that the box will be routing packages thought it I'll show some rules that you might find helpfull. This is the output of iptables-save, you can edit it to make the changes you require and then pipe your edited file to iptables-restore. The iptables-save/iptables-restore is a handy way of keeping configuration for easy firewall activation and editing.

*mangle
:PREROUTING ACCEPT [16570:1916193]
:INPUT ACCEPT [16553:1912438]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu -m comment --comment "fix packet size for stuff that's being routed through this box (SEE NOTE *)"
COMMIT
*nat
:PREROUTING ACCEPT [1906:207422]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -s 192.168.0.0/24 -j MASQUERADE
COMMIT
*filter
:INPUT DROP [1906:207422]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -p all -m conntrack --ctstate ESTABLISHED,RELATED  -j ACCEPT
-A INPUT -p icmp -s 192.168.1.0/24 -j ACCEPT
-A INPUT -p tcp --dport 53 -s 192.168.0.0/24 -j ACCEPT -m comment --comment "allow dns from LAN"
-A INPUT -p udp --dport 53 -s 192.168.0.0/24 -j ACCEPT -m comment --comment "allow dns from LAN"
-A INPUT -p tcp --dport 67 -i br0 -j ACCEPT -m comment --comment "allow dhcp from LAN"
-A INPUT -p udp --dport 67 -i br0 -j ACCEPT -m comment --comment "allow dhcp from LAN"
-A INPUT -m mac --mac-source 0a:0b:0c:0d:0e:0f -j ACCEPT -m comment --comment "this one can acces the AP "
-A FORWARD -p all -m conntrack --ctstate ESTABLISHED,RELATED  -j ACCEPT
-A FORWARD -m mac --mac-source 00:01:02:03:04:05 -j ACCEPT -m comment --comment "this one can route trough the AP"
COMMIT

NOTE *: Clamping MSS to PMTU can get internet browsing from your LAN working but can brake VPN packets. The proposed workaround has been made necessary by the increasing tendency of failing to find PMTU. It is not always necessary for you to activate the workaround but be warned that it can equally inadvertently stop working leaving you with an intermittent problem that is difficult to debug. It can be intermittent because the path your packets take to arrive to any destination on internet is not always the same dew to the necessity of fault tolerance. This note could become a whole article on it's own so here's[3721] an intresting read on the issue.

I generally put the content above in /ect/firewall.cf and add “/usr/sbin/iptables-restore < /etc/firewall.cf” to rc.local.

If you want to manage your AP via ssh now is a good time to restart sshd that did not appreciate taking down the interfaces it was binding on (back in section 4.2).

/etc/rc.d/rc.sshd restart

If you're going to share internet connection you might want to stop ssh access from internet by adding a firewall rule to regulate it or making sshd bind only to the address assigned to br0. The config shown above will not allow incoming ssh traffic from the internet link (by the connection tracking rule) but you may want to back that up with further safety. Longer iptabls chains generally have bad impact on firewall performance so you might want to add something like this to /etc/ssh/sshd_config:

ListenAddress 192.168.0.1

At this point you should be able to associate clients to the AP. With the above iptables rules client with MAC 0a:0b:0c:0d:0e:0f can associate and access the AP itself but not route trough the AP (with the exception of dns querys that get forwarded by dnsmasq), client with MAC 00:01:02:03:04:05 can route thought the AP but not access the AP itself. The example was just to show clearly the difference of having packets go into the box and routing packets trough the box as this behavior was radically different in the ip_chains. An other way to implement even more complex MAC ACL to decide who manages AP, who can only route trough and who can do both can be done by using ebtables (nee to add that to the software list not present in Slackware) and fiddle with the broute chain. In all cases you might find interesting the netfilter flow diagram[3722].

If you don't want MAC address ACL or you only implement MAC ACL for the AP you could replace

-A INPUT -p icmp -s 192.168.1.0/24 -j ACCEPT
-A INPUT -p tcp --dport 53 -s 192.168.0.0/24 -j ACCEPT -m comment --comment "allow dns from LAN"
-A INPUT -p udp --dport 53 -s 192.168.0.0/24 -j ACCEPT -m comment --comment "allow dns from LAN"
-A INPUT -p tcp --dport 67 -i br0 -j ACCEPT -m comment --comment "allow dhcp from LAN"
-A INPUT -p udp --dport 67 -i br0 -j ACCEPT -m comment --comment "allow dhcp from LAN"
-A INPUT -m mac --mac-source 00:01:02:03:04:05 -j ACCEPT -m comment --comment "some comment"
-A FORWARD -m mac --mac-source 00:01:02:03:04:05 -j ACCEPT -m comment --comment "some other comment"

With something like this

-A INPUT -p all -i br0 -j ACCEPT
-A FORWARD -p all -i br0 -j ACCEPT

Most off the shelf AP also let you do a number of port forwarding, this is also an iptables job. Remember that we are masquerading all outgoing traffic to look like it's coming from the AP itself so we only need to create rules of the incoming traffic. Supposing you want to run a web server on 192.168.0.2 you might want to add a rule like this in the FORWARD chain of the filter table:

-A FORWARD -p tcp -d 192.168.0.2 -m multiport --dports 80,443 -j ACCEPT -m comment --comment "allow http traffic to be routed thought the box only to the correct server"

and a rule like this in the PREROUTING chain of the nat table:

-A PREROUTING -p tcp -m multiport --dports 80,443 -j DNAT --to-destination 192.168.0.2 -m comment --comment "nat incomming http requests to local destination before routing"

To understand how this works you need to look at the netfilter flow diagram[3723]: As a http request arrives to the AP from the internet link it will first have the DNAT changed in the nat prerouting stage, but it would get dropped by the filter policy if we don't find a way to let it in, that's where the forward filter rule comes in to play.

If you start going crazy over transferring large files over fast networks for a problem that seems like mtu related but is not you might want to consider turning net.ipv4.tcp_sack off.

If your ISP gives you some sort of traffic quota you may want to add some quotas to your firewall configuration. You may fully understand the consequences of streaming on your ISP quota but maybe the rest of the family may not: giving them a quota might save you a fit when you need to do an urgent job that requires internet connection. There a re various ways you could go about putting quotas on specific clients on your LAN just keep in mind a few things:

rules with quotas stop matching once quota is exceeded

flushing your tables will reset all quota counters

quota counters do not reset themselves whenever your ISP resets your internet quota

Here's an example of how you could go about putting a quota on the FORWARD chain to stop a client using more then 300Mb daily:

-A FORWARD -p all -m conntrack --ctstate ESTABLISHED,RELATED ! -d 192.168.0.200 -j ACCEPT -m comment --comment "allow related traffic but not for 192.168.0.200 that has a quota"
-A FORWARD -p all -m conntrack --ctstate ESTABLISHED,RELATED -d 192.168.0.200 -j ACCEPT -m quota --quota 314572800 -m comment --comment "allow quota related traffic for 192.168.0.200"
-A FORWARD -s 192.168.0.200 -j ACCEPT -m quota --quota 314572800 -m comment --comment "outgoing quota for 192.168.0.200"
-A FORWARD -d 192.168.0.200 -j ACCEPT -m quota --quota 314572800 -m comment --comment "incoming quotafor 192.168.0.200"
-A FORWARD -s 192.168.0.200 -d 192.168.0.0/24 -j ACCEPT -m quota --quota 314572800 -m comment --comment "allow LAN traffic anyway for 192.168.0.200"

Or you could use a user-defined chain to group all your quoted traffic into a single quota like this:

-A FORWARD -d 192.168.1.0/24 -m conntrack --ctstate RELATED,ESTABLISHED -m comment --comment "allow quota related traff. to quoted LAN" -j QUOTA
-A FORWARD -s 192.168.1.0/24 -m comment --comment "allow quoted traff. from quoted LAN" -j QUOTA
-A QUOTA -m quota --quota 314572800 -m comment --comment "accept traffic within quota in this userdefined chain" -j ACCEPT
-A QUOTA -m comment --comment "when quota is exceeded start rejecting" -j REJECT --reject-with icmp-port-unreachable

Along with this you need to flush the iptables counters every day (or every how often you wnat the quota counters to reset) with something like this

iptables -Z

I generally do this with an AT job because AT has less adverse effects then CRON on readonly systems. Here's one possible way of making an AT job re schedule itself every day at 00:30:

# cat /usr/local/bin/flush_iptables_counters
/usr/sbin/iptables -Z
/usr/bin/at -f /usr/local/bin/flush_iptables_counters "0030 tomorrow"
#

Just run it once and it should then re schedule itself. On a readonly system you will need to have atjobs directory on tmpfs and run it the first time from rc.local.

4.5 PPP

Tectonically you're not going to need this on a pure access point (AP) but it's common that the AP also acts as router for your internet access, in this case you will need to configure your PPP link from your AP. Depending on how your ISP provides your internet access you might or might not have an external modem which may or may not understand pppoe protocol. Nowadays it seems to have become less common to have internal *DSL modem wile external modems have become more popular. Most of them use pppoe protocol. Technically there's not much difference between configuring an internal modem with just the use of pppd on an external modem that uses pppoe, the former will require an extra package (rp-pppoe) and just a few extra options in the configuration file. I'll show how to configure with the use of pppoe, if that's not your case just strip off a few options.

If you have installed both ppp and rp-pppoe you will find a that most of the configuration has already been done with most commonly usefull options in /etc/ppp, still there is a limited amount of work that needs to be done and I also advise to detour from the use of pppoe-start to initiate the connection to stick to something that remains the same regardless of whether you're using pppoe or not. To do this I configure a peer for my ISP and add in there a few options instructing pppd to use pppoe plugin.

To do this you need to create a file in /etc/ppp/peers, call it something that will make it obvious to you what the peer will connect to: for instance if your ISM is called “Telco” you might want to create a file called something like /etc/ppp/peers/telco and here's what needs to go in there typically:

plugin rp-pppoe.so
eth1 #or whatever nic your modem is connected to
unit 0
user "username your ISM gave you"
noipdefault
noauth
default-asyncmap
defaultroute
hide-password
nodetach
usepeerdns
mtu 1492
mru 1492
noaccomp
nodeflate
nopcomp
novj
novjccomp
lcp-echo-interval 20
lcp-echo-failure 3
persist
maxfail 0           #these 3 options are particularly important if your connection is prone to braking as the default is just 10
lcp-max-failure 0   #and after that the peer will not be able to persists any more
lcp-max-configure 0 #so your internet connection will fail with no apparent reason
holdoff 20
#idle 900
#demand
updetach

If your ISM charges you based on time rather than band usage you might want to uncomment the idle and demand options so that the PPP connection will not stay alive when it's not actually in use. Pot as much as you can here in the peer and as little as possible in the /etc/ppp/options file so that you can possibly have one or more backup peres that are functional without editing any configuration. If these options do not work for you I suggest you read the /usr/doc/rp-pppoe-3.11/HOW-TO-CONNECT documentation and use pppoe-setup for a guided configuration, fire up the connection with pppoe-start and take not of the options used, then edit accordingly your peer and revert back to using pppd call <peer>.

We're not done yet we need to edit pap-secrets or chap-secrets so that pppd can complete authentication. Which file needs to be addressed may depend on your isp but if you put the same content in both then you should be ok whatever your ISP requires.

# Secrets for authentication using PAP
# client        server  secret                  IP addresses
"username your ISM gave you"  *       "password your ISM gave you"

You can now fire up your internet connection with

pppd call telco

4.6 Dynamic DNS

If you are going to do the port forwarding thing and if you ISP is not giving you a static IP you might want to use some sort of dynamic DNS service so that people can reach whatever service you are forwarding. There are many free dynamic DNS service providers … google is your friend if you don't like any of the ones I'm suggesting:

http://www.gnutomorrow.com/r/namecheap[3724]

http://www.dnsexit.com/[3725]

http://www.dynu.com/[3726]

http://freedns.afraid.org/[3727]

Most give you a client for managing the update … all you need do is arrange for that client to run either from the router or from any other pc in your LAN with internet access.

4.7 Configuring Clients

For the client side configurations there are many ways too, to keep things simple let's just go about it by using wpa_supplicant. Remember that regardless of whether it's a wired or wireless client: if you're using managing MAC ACL from iptables your client's MAC address needs to be added to the firewall configuration while ff you're doing MAC ACL just with hostapd then you only need to make sure your wireless clients are in the ACL.

4.7.1 Wired Clients

In most cases the modules for your wireless NIC get automatically loaded so that should not be an issue. Keep an eye out on kernel ring buffer and messages to see if your device is requesting firmware that is not available. If all is fine and the configuration is OK it's really simple: just uplink the client to the AP and start your favorite dhcp client.

4.7.2 Slackware Wireless Clients

Configuring a client to access the newly crated AP is best done with a tool like wpa_gui, as it can create the correct settings in wpa_supplicant.conf based on what's detected. So fire up wpa_gui and activate scanning until you find the newly created AP then double click it. On the window that pops up just add the password without changing any of the detected settings and click add.

If, for any reason, you don't want to use a tool like wpa_gui, and if you followed all the AP side setup to the letter you could just simply put this in /etc/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=root
network={
ssid="your_ssid"
psk="your_psk_for_all_AP"
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

Make sure rc.inet1.conf is configured for using wpa_supplicant

IFNAME[4]="wlan0"
USE_DHCP[4]="yes"
WLAN_MODE[4]=Managed
WLAN_WPA[4]="wpa_supplicant"
WLAN_WPADRIVER[4]="wext"

It should then be possible to restart rc.inet1 (or just rc.inet1 wlan0_down and rc.inet1 wlan0_up) and the client should associate.

There's also the command line alternative with wpa_cli in this example we'll assume that your client is totally unconfigured and wpa_supplicant is not running. We're going to do everything on the command line:

# wpa_supplicant -B -W -Dwext -i wlan0 -c /etc/wpa_supplicant.conf
# wpa_cli
wpa_cli v2.4
Copyright (c) 2004-2015, Jouni Malinen <j@w1.fi> and contributors
This software may be distributed under the terms of the BSD license.
See README for more details.
Selected interface 'wlan0'
Interactive mode
> scan
OK
<3>WPS-AP-AVAILABLE
> scan_results
bssid / frequency / signal level / flags / ssid
02:0c:42:f9:73:23       2412    -58     [WPA-PSK-CCMP][WPA2-PSK-CCMP][ESS]
a4:51:6f:95:37:b6       2462    -58     [WPA2-PSK-CCMP][WPS][ESS]       Windows Phone0377
00:0c:42:f9:73:23       2412    -62     [ESS]   Insecure-WiFi
>  add_network
0
> set_network 0 ssid "Windows Phone0377"
OK
> set_network 0 psk "passwordforcrappywindowsphone"
OK
> enable_network 0OK
OK
<2>Trying to authenticate with a4:51:6f:95:37:b6 (SSID='Windows Phone0377' freq=2437 MHz)
<2>Trying to associate with a4:51:6f:95:37:b6 (SSID='Windows Phone0377' freq=2437 MHz)
<2>Associated with a4:51:6f:95:37:b6
<2>WPA: Key negotiation completed with a4:51:6f:95:37:b6 [PTK=CCMP GTK=CCMP]
<2>CTRL-EVENT-CONNECTED - Connection to a4:51:6f:95:37:b6 completed (reauth) [id=0 id_str=]
> save_config
OK
> quit
#

If all went right and your wpa_supplicant.conf file had

update_config=1

in it the above snippet would have saved the new network to wpa_supplicant.conf and associated you with it.

Remember that if you're associating with an non secured AP you need to use this:

> set_network 0 ssid "Insecure-WiFi"
OK
> set_network 0 key_mgmt NONE
OK
>

4.7.3 Other Linux Distributions Wireless Clients

I've tried various other flavor distributions … most don't use wpa_gui for associating to AP but some sort of other tool that generally pops up when you click on the icon that notifies the presence of an Access Point. After a few headaches I found that best association success is achieved by forcing setup for hidden AP even if the AP I'm configuring has not the hidden essid. You can always use wpa_cli on the command line if it's shipped with whatever distro you prefer.

5 The AP's Components Status

It might be interesting to query the AP status at any time to see how it's doing. There are several ways to go about this, I'll try to show the simplest way that possibly works on any Linux system.

5.1 Associated Stations

The associated stations can be shown by using either hostapd_cli or iw:

root@router:~# hostapd_cli -p /run/hostapd all_sta
Selected interface 'wlan0'
00:01:02:03:04:05
flags=[AUTH][ASSOC][AUTHORIZED][SHORT_PREAMBLE][WMM]
aid=2
capability=0x431
listen_interval=5
supported_rates=02 04 0b 16 0c 12 18 24 30 48 60 6c
timeout_next=NULLFUNC POLL
dot11RSNAStatsSTAAddress=00:01:02:03:04:05
dot11RSNAStatsVersion=1
dot11RSNAStatsSelectedPairwiseCipher=00-0f-ac-4
dot11RSNAStatsTKIPLocalMICFailures=0
dot11RSNAStatsTKIPRemoteMICFailures=0
hostapdWPAPTKState=11
hostapdWPAPTKGroupState=0
rx_packets=16176
tx_packets=20464
rx_bytes=1974499
tx_bytes=23121726
connected_time=439
root@router:~#

root@router:~# iw wlan0 station dump
Station 00:01:02:03:04:05 (on wlan0)
inactive time:  0 ms
rx bytes:       1956931
rx packets:     16009
tx bytes:       23105532
tx packets:     20352
tx retries:     1484
tx failed:      1
signal:         -63 dBm
signal avg:     -62 dBm
tx bitrate:     48.0 MBit/s
authorized:     yes
authenticated:  yes
preamble:       short
WMM/WME:        yes
MFP:            no
TDLS peer:              no
root@router:~#

5.2 DHCP Leases

You can dump dnsmasq's lease file to see the dhcp leases

root@router:~# cat /run/dnsmasq/br0.leases
1411875361 00:01:02:03:04:05 192.168.0.3 b3bo *
1411874427 0a:0b:0c:0d:0e:0f 192.168.0.4 printsrv *
root@router:~#

5.3 ARP Table

The system arp cache cache can be inspected by using the arp command

root@router:~# arp -an
? (192.168.0.3) at 00:01:02:03:03:05 [ether] on br0
? (192.168.0.4) at 0a:0b:0c:0d:0e:0f [ether] on br0
root@router:~#

5.4 Socket Status

To get a list of the open sockets on your system you can use socklist if you have it installed. If you don't have it installed you can use a somewhat simpler script like the one shown blow (a little less information rich and careless formatting but still useful and much faster then doing it manually):

#!/bin/bash
ahex2i ()
{ echo "0x$1" |awk '{printf("%i",strtonum($1))}'
}
hex2ip ()
{ ahex2i ${1:6:2}
echo -n "."
ahex2i ${1:4:2}
echo -n "."
ahex2i ${1:2:2}
echo -n "."
ahex2i ${1:0:2}
}
getpidofsocket ()
{ find /proc/*/fd -type l -printf "%h %l\n" 2>/dev/null| grep "socket:\[$1\]" |awk -F/ '{print $3}'
}
echo "          local                   forein  pid/cmd"
grep -v "^ *sl " /proc/net/tcp |awk '{printf("%s %s %s\n",$2,$3,$10)}' |sed -e "s/:/ /g" | while read LINE
do
LA=(${LINE})
PID=$(getpidofsocket ${LA[4]})
echo "tcp     $(hex2ip ${LA[0]}):$(ahex2i ${LA[1]})   $(hex2ip ${LA[2]}):$(ahex2i ${LA[3]})  ${PID}/$(cat /proc/$PID/comm)"
done
grep -v "^ *sl " /proc/net/udp |awk '{printf("%s %s %s\n",$2,$3,$10)}' |sed -e "s/:/ /g" | while read LINE
do
LA=(${LINE})
PID=$(getpidofsocket ${LA[4]})
echo "udp     $(hex2ip ${LA[0]}):$(ahex2i ${LA[1]})   $(hex2ip ${LA[2]}):$(ahex2i ${LA[3]})  ${PID}/$(cat /proc/$PID/comm)"
done

Please note the above script only works on 2.6 kernels or above. This probably also applies to socklist.

6 Remote Administration

I'm not advocating that allowing remote administration from your WAN connection is a good thing but there are times where it may be necessary so here are some tips for minimizing the risk of having your router suffering brute force attacks or other bad things happen to it.

I'm an old fashioned system administrator so for me remote administration is done via ssh, if you've added a nice web administration tool to your AP/Router keep in mind that running apache just for the sake of having remote web administration will expose you to a whole lot of security issues that need to be addressed and maintained over time.

use non standard ports

disallow password authentication

minimize your attack surfaces

Let me give you a little reasoning for the list.

6.1 Use Non Standard Ports

Whatever is your remote administration tool of choice it's a good idea not to leave access to it from WAN on it's well known port, making it less obvious that you run such a service. If you do this there's a good chance that your AP/Router will never get unwanted attention.

6.2 Disallow Password Authentication

Allowing password authentication is a welcome for brute force attacks so avoid it wherever possible (ie for ssh administrations only allow authentication with keys). If you're doing web based remote administration you could send in a key via get and then set a cookie or something like that along with password protected htaccess.

6.3 Minimize Your Attack Surfaces

Your AP/Router should expose to the WAN connection nothing more then what is really needed. Scanning your own AP/Router and closing or disabling unnecessary services to WAN is something you should allays do so that you minimize the attack surfaces should you ever get unwanted attention.

6.3.1 Avoid Running Remote Administration 24x7

If you can have remote administration active only when you need it you're not leaving the attack surface available all the time but then you need an easy way to turn it on when you're away from home. I've two means of doing so:

If any family member is home it can be temporarily activated by pressing a specific button on the router itself (it's the second button under the blue led in the images below).

If nobody is home I've modified a 200 line minimal web server (nweb) to listen to requests on a non standard port and temporarily allow remote administration if a specific url is requested.

Whichever way the temporary remote admin is enabled it also get's automatically turned off after some time (should you ever forget to turn it off once you're done).

Nweb is a really basic webserver that only servers static html images and a few archive formats, it does not even allow directory listing. Besides that I have it parse and enable before serving the page … so if you don't physically have the page that enables the remote administration a 403 is returned anyway leaving no clue as to waht was done in response to that request.

If you're interested in nweb you can get it by googling “nweb tiny web server”. You should hit github with something like nweb23.c with some 204 lines of C code. It should be easy for you to modify the source to match your needs.

7 Wrapping It Up

Now that you've done the configuration maybe next time you want to start the AP you want to do it surely more efficiently.

7.1 Simple Starter Script

Just put a few commands in a script to start it up really quickly:

/bin/echo 1 > /proc/sys/net/ipv4/ip_forward #you don't need this if you use rc.ip_forward
#. /etc/rc.d/rc.dnsmasq restart #only if it's not started at boot time
/usr/local/bin/hostapd -B /etc/hostapd/wlan0.conf
/usr/sbin/brctl addbr br0
/usr/sbin/brctl stp br0 off
/usr/sbin/brctl addif br0 wlan0
/usr/sbin/brctl addif br0 eth0
/sbin/ifconfig wlan0 0.0.0.0 up
/sbin/ifconfig eth0 0.0.0.0 up
/sbin/ifconfig br0 192.168.0.1 up
/usr/sbin/iptables-restore < /etc/firewall.cf
/etc/rc.d/rc.sshd start

If you want it to come up at boot time you could run the script from rc.local or even just put those commands directly in there. If you want a neater solution totally integrated in the init scripts read on.

7.2 Modifying Slackware Init Scripts

I've not yet done this but I can suggest a possible way of doing it.

Edit rc.inet1.conf and put in the following things: (that will later be managed by rc.wireless)

IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
IFNAME[0]="br0"
BRNICS[0]="wlan0 eth0"
IPADDR[0]="192.168.0.1"
NETMASK[0]="255.255.255.0"
IFNAME[4]="wlan0"
WLAN_ESSID[4]=your_ssid
WLAN_MODE[4]=Master
WLAN_RATE[4]="g"
WLAN_CHANNEL[4]="6"
WLAN_IWPRIV[4]="set AuthMode=WPA-PSK | set EncrypType=TKIP | set WPAPSK=your_psk_for_all_AP"

Some of this will be picked up by rc.inet1 (the bridge stuff) and some by rc.wireless but the stock one knows nothing about Master mode. We need to modify rc.wireless to do some extra stuff: pick up values from WLAN_ESSID[4], WLAN_MODE[4], WLAN_CHANNEL[4], WLAN_IWPRIV[4] and sed inline the values in /etc/hostapd/wlan0.conf and /etc/hostapd/hostapd.wpa_psk. Also WLAN_RATE[4]=“g” will be indigestible for the stock rc.wireless if you like you could leave that as 54 and only convert it for Master mode. A special attention needs to go to WLAN_MODE[4]=Master as the stock rc.wireless knows nothing about master mode. Alternatively one could just have IFNAME[4]=“wlan0” and WLAN_MODE[4]=Master and just manually put all the other stuff in etc/hostapd/wlan0.conf.

I had a quick look at rc.inet1 and apparently it starts bridge after wireless so it should be ok without having to restart br0 after AP is initiated.

The sshd server is started after networking so no need to restart that now.

You can write your own rc.firewall or just leave

usr/sbin/iptables-restore < /etc/firewall.cf

in rc.local.

7.3 Automating AP Startup For USB WiFi Dongles

Udev is very powerful and can do a variety of actions upon detecting certain events, like the appearance of a NIC. In fact it already does that and renames interfaces according to MAC address (have a look at /etc/udev/rules.d/70-persistent-net.rules and see how your interfaces get the same name even if you remove the modules and reinsert them in the wrong order). Apart from renaming NICs and creating device files it can also execute commands or external helper scripts … this is particularly handy if, for example, you wish that upon plugging a USB Ethernet dongle it automatically assigns an address via DHCP. A few years ago I wrote a nethelper.sh script for my ClashNG that upon detecting LAN devices would run rc.inet1 to start the NIC according to what was configured in rc.inet1.conf. Ok ClashNG is a minimalistic thing that uses busybox to replace most of the binaries but still it might be a useful example. Ignore the part that writes stuff to debug what was going on … I'm not udev expert.

#!/bin/sh
DEVNAME="$1"
COMMAND="$2"
case $DEVNAME in
eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*)
case $COMMAND in
'start')
if [ -x /etc/rc.d/rc.inet1 ]; then
if ! /sbin/ifconfig | /bin/grep -q "^${DEVNAME} "; then
/etc/rc.d/rc.inet1 ${DEVNAME}_start
fi
fi
;;
'stop')
if [ -x /etc/rc.d/rc.inet1 ]; then
if /sbin/ifconfig | /bin/grep -q "^${DEVNAME} "; then
/etc/rc.d/rc.inet1 ${DEVNAME}_stop
fi
fi
# Does dhcpcd appear to still be running on the
# interface?  If so, try to stop it.
if [ -r /etc/dhcpc/dhcpcd-$DEVNAME.pid -o -r /var/run/dhcpcd-$DEVNAME.pid ]; then
/sbin/dhcpcd -k $DEVNAME
# Force garbage removal, if needed:
if [ -r /etc/dhcpc/dhcpcd-$DEVNAME.pid ]; then
/bin/rm -f /etc/dhcpc/dhcpcd-$DEVNAME.pid
elif [ -r /var/run/dhcpcd-$DEVNAME.pid ]; then
/bin/rm -f /var/run/dhcpcd-$DEVNAME.pid
fi
fi
# If the interface is now down, exit with a status of 0:
if /sbin/ifconfig | /bin/grep -q "^${DEVNAME} " ; then
exit 0
fi
;;
*)
logger "usage $0 interface start|stop"
exit 1
;;
esac
;;
*)
logger "Interface $DEVNAME not supported."
exit 1
;;
esac
exit 0

Although this was written for ClashNG in 2011 it still works right with Slackware 14.1, just modify udev rules to correctly use the helper script like shown below and it's done.

root@r2d2:/tmp/clashng/lib/udev/rules.d# grep  "nethelper\.sh" *
90-network.rules:SUBSYSTEM=="net", NAME=="?*", ACTION=="add", RUN+="nethelper.sh $env{INTERFACE} start"
90-network.rules:SUBSYSTEM=="net", NAME=="?*", ACTION=="remove", RUN+="nethelper.sh $env{INTERFACE} stop"
root@r2d2:/tmp/clashng/lib/udev/rules.d#

These udev rules were in 90-network.rules which no longer exists so I suggest you put these rules in 90-local.rules in current Slackware versions. Without further modification (as long as the rc.inet1.conf has USE_DHCP[?]=“yes” for the interface that will be assigned to your dongle) this will allow for USB Ethernat dongles to be configured via DHCP automatically when you plug them in to your box. Remember to do a “/etc/rc.d.rc.udev reload” after changing udev rules.

At the time I also had a modified rc.wireless that would also start up AP … but I was using a different configuration scheme dew to busybox ash limitations (arrays were a problem) and other requirements I had in mind at the time … but never the less here's the section relevant to AP and it was heavily based on Slackware's rc.wireless anyway. Have a look at the code script fragments below to get ideas non how you might want to go about it:

# If we stop a wireless interface using wpa_supplicant,
# we'll kill its wpa_supplicant daemon too and exit this script:
if [ "$2" = "stop" ]
then
if [ "${WLAN_MODE}" = "Master" ]
then
echo "$0: $2 $1 AP mode" |$LOGGER
/bin/kill $(/usr/bin/fuser /var/run/hostapd/$1 2>&1 |/usr/bin/awk '{print $NF}')
fi
WPAPID=`echo \`ps axww|grep wpa_supplicant |grep i${INTERFACE}\` |cut -f1 -d' '`
[ ${WPAPID} ] &&  kill ${WPAPID}
return 0
fi
...
...
...
if [ "$MODE" = "Master" ]
then
echo "$0: $2 $1 AP mode" |$LOGGER
if [ -r /etc/hostapd/${1}.conf -a "$2" = "start" ]
then
[ $DEBUG -eq 1 ] && \
/usr/bin/hostapd -B -d /etc/hostapd/${1}.conf >/tmp/hostapd.log 2>&1 || \
/usr/bin/hostapd -B /etc/hostapd/${1}.conf
else
/bin/kill $(/usr/bin/fuser /var/run/hostapd/$1 2>&1 |/usr/bin/tr -d [a-z])
fi
else
echo "$0:  $IWCOMMAND mode $MODE" | $LOGGER
# if $IWCOMMAND fails, try taking the interface down to run it.
# Some drivers require this.
if ! $IWCOMMAND mode $MODE 2> /dev/null
then
$IFCOMMAND down
$IWCOMMAND mode $MODE
$IFCOMMAND up
sleep 3
fi
fi
fi
# This is a bit hackish, but should do the job right...
[ ! -n "$NICKNAME" ] && NICKNAME=`/bin/hostname`
if [ -n "$ESSID" -a "$MODE" != "Master"]
then
echo "$0:  $IWCOMMAND nick $NICKNAME" | $LOGGER
$IWCOMMAND nick $NICKNAME
fi

If you do all this stuff right you can get your AP to be automatically initiated when you plug in the USB gongle devoted to doing that.

I used to devote 2 usb dongle for this: one that would be left inserted most of the time and has random generated WAP-PSK (only for family use) and one that would get temporarily plugged in for guests with a much simple WPA-PSK to aid them accessing my home network.

7.3.1 Automation With Custom Scripts

Over the years trying to maintain modified rc scripts functional across updates that involved the rc scripts themselves became cumbersome so I started moving away from modifying the stock scripts and started developing my own stuff. Don't get me wrong I still use and appreciate the stock stuff for my desktop systems. The idea behind my own scripts is based on udev detecting the interfaces (even at boot time). The basic idea is still the same: upon detection udev executes nethelper.sh script that looks for and executes /etc/rc.d/network/<NIC> start. This is not for everyone because it requires manually writing the /etc/rc.d/network/<NIC> script but I think most have the basic knowledge and maybe with a little help most can manage.

Here's is what my latest nethelper.sh looks like:

#!/bin/bash
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
DEVNAME="$1"
COMMAND="$2"
case $DEVNAME in
eth*|ath*|wlan*|ra*|sta*|ctc*|lcs*|hsi*)
case $COMMAND in
'start') logger -p local3.info "start: $DEVNAME $COMMAND"
[ -x /etc/rc.d/network/$DEVNAME ] && /etc/rc.d/network/$DEVNAME start
;;
'stop') logger -p local3.info "stop: $DEVNAME $COMMAND"
[ -x /etc/rc.d/network/$DEVNAME ] && /etc/rc.d/network/$DEVNAME stop
;;
*) logger -p local3.info "unsupported command: $DEVNAME $COMMAND" ;;
esac
;;
*) logger -p local3.info "unsupported interface: $DEVNAME $COMMAND" ;;
esac
exit 0

Be warned that the logger facility is not yet functional in the early boot stages so it may not log the interface startup at boot time.

Here's an example of /etc/rc.d/network/wlan0 configured in master mode:

#!/bin/bash
set -o pipefail
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
INAME=$(basename $0 |awk -F. '{print $NF}')
do_start ()
{ echo "Start $INAME : $(date "+%F %H:%M:%S") $$"
ifconfig ${INAME} up
sleep 1
iwconfig ${INAME}
sleep 1
ifconfig ${INAME} down
sleep 1
hostapd -B /etc/hostapd/${INAME}.conf -e /dev/hwrng
sleep 1
ifconfig ${INAME} 0.0.0.0 up
}
do_stop ()
{ echo "Stop $INAME : $(date "+%F %H:%M:%S") $$"
ifconfig ${INAME} 0.0.0.0 down
PID=$(ps -eo pid,cmd |grep hostapd |grep  -w "${INAME}\.conf" |awk '{print $1}')
[ "$PID" != "" ] && kill -9 $PID
}
case $1 in
start) [ $(grep -wc "${INAME}:" /proc/net/dev) -gt 0 -a $(ps -ef |grep -v grep |grep -c "/etc/hostapd/${INAME}.conf") -lt 1 ] && do_start |tee -a /run/${INAME}.log || exit 1 ;;
stop) [ $(grep -wc "${INAME}:" /proc/net/dev) -gt 0 ] && do_stop |tee -a /run/${INAME}.log || exit 1 ;;
restart)
if [ $(grep -wc "${INAME}:" /proc/net/dev) -gt 0 ]
then
do_stop |tee -a /run/${INAME}.log
do_start |tee -a /run/${INAME}.log
else
exit 1
fi
;;
status)
if [ $(grep -wc "${INAME}:" /proc/net/dev) -gt 0 ]
then
ip link list $INAME |sed -e "s/^[0-9]*: *//"
iw dev $INAME info
echo "Associated stations:"
iw $INAME station dump | grep -w "^Station"
else
else
echo "$INAME: no sich interface found on system"
exit 1
fi
;;
esac

Logical devices like bridges would need to be initiated either by telling all the physical device starter scripts which is the parent logical device or by adding them to rc.local. In fact wlan0 is bridged with eth0 … for simplicity I chose not to have daughter devices call parent device init scripts so I start br0 from rc.local but care has to be taken not to start daughter devices if they have already been brought up by udev (note how nothing is done in wlan0 if hostapd is already started).

Here's my br0 script:

#!/bin/bash
set -o pipefail
PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
INAME=$(basename $0 |awk -F. '{print $NF}')
BR_NICS="eth0 wlan0"
do_start ()
{ echo "Start $INAME : $(date "+%F %H:%M:%S") $$"
brctl addbr $INAME
brctl stp $INAME off #turn off spanning tree
for NIC in $BR_NICS
do
[ -x /etc/rc.d/network/$NIC ] && /etc/rc.d/network/$NIC start 2>&1
sleep 1
brctl addif $INAME $NIC
done
ifconfig $INAME 10.1.0.1 netmask 255.255.254.0 up
dnsmasq -C /etc/dnsmasq/${INAME}.conf
}
do_stop ()
{ echo "Stop $INAME : $(date "+%F %H:%M:%S") $$"
PID=$(ps -eo pid,cmd |grep dnsmasq | grep  -w "${INAME}\.conf" |awk '{print $1}')
[ "$PID" != "" ] && kill -9 $PID
ifconfig $INAME 10.1.0.1 down
for NIC in $BR_NICS
do
brctl delif $INAME $NIC
[ -x /etc/rc.d/network/$NIC ] && /etc/rc.d/network/$NIC stop
done
brctl delbr $INAME
}
case $1 in
start) do_start |tee -a /run/${INAME}.log ;;
stop) do_stop |tee -a /run/${INAME}.log ;;
restart) do_stop |tee -a /run/${INAME}.log ; do_start |tee -a /run/${INAME}.log ;;
status) brctl show
for NIC in $BR_NICS
do
[ $(grep -wc "${NIC}:" /proc/net/dev) -gt 0 ] && ifconfig $NIC |grep -Ew "^${NIC}|ether" || echo "${NIC}: not found"
done
ifconfig $INAME
ps -ef | grep -v grep | grep "dnsmasq/${INAME}.conf"
;;
esac

If you've gone so far you might want a neater way to deal with unplugging dongles as anything udev could possibly do would be too late. One possible approach is to use gpio pins with buttons attached to them and a script that monitors the button status and takes appropriate action when each button is pressed. I've done this on mi RPi2 with 5 buttons and 5 leds indicating whether the button press has been caught by the monitor script: one shuts down the RPI2 while the other 4 are for deactivating whatever is in the respective usb port to prepare it for unplugging. Here's a picture[3728] of such a setup while the script for handling it is here[3729].

8 Setting up on an Embedded Device

Supposing you want all this but you don't want to leave a laptop or desktop on all the time you might want to put in on an embedded ARM system that will only use a fraction of the power required to run an X86 laptop/desktop of any sort. (intel Curie might kick in with a 2.2W x86 SOC when the segfault bug is sorted out). Well the official ARM Slackware port userland runs on almost any ARM device out in the market today. There is a number of machines that are officially supported from the ARM port and a god deal of community supported efforts[3730] for the platforms that are not officially supported.

In terms of space you can fit all that's required in 151 Mb with a little careful stripping of unnecessary locales and documents. The best way to go about that is to add to the miniroot[3731] all the packages you need and then strip unnecessary stuff. Starting from a full install and the stripping unnecessary stuff will take a bigger effort.

Al the configuration so far will be exactly the same even if you're running the Slackware ARM port (actually since I did most of my testing on an ARM device it's more likely that there be an issue on the x86 platform).

On an embedded device there are however some issues that you need to address:

preserving the life of the flash mass storage

secure the system against unexpected reboots

1) By default the access time of any file gets automatically updated upon access of any file, this is a bad thing to do on flash that only has a limited number of rewrite cycles (typically 10,000 for MLC and 100,000 for SLC devices). Make sure you mount any filesystems on flash devices with the “noatime” option to prevent the access time modification. This is what the root entry in fstab could look like if you mount it with the noatime option (I use labels buy you can also use UUID or just plainly the device file)

LABEL=root      /                ext4        defaults,noatime         1   1

There are some generic filesystem type that may do better then other at handling flash devices and some that were specifically designed for that purpose but only run on native flash layer (not an option on usb flash sticks) like cffs2 and ubifs. There are also other options I've just shown 2 common options that allow mounting rw if required.

2) Being on all the time your embedded device will crash every time uncontrollable power failures occur (whether it be a general powe failure, wife using too much power and causing the general switch to trip, your kids play unplug dad's stuff or a hard reset required because your AP crashed). Although journal-ed filesystems are robust with regards to that on the long run bad things may occour. What you really want to eliminate the problem altogether is leave your filesystems on flash read only (ro): Slackware was not conceived to run with root mounted ro but with a little tinkering in the init scripts you can work around that problem. Also having the filesystems ro will be even better then avoiding access time updating. You can remount temporarily with Read Write (rw) any time you need to make permanent changes then remount ro once you've finished. With the system running ro and only temporary files in ram filesystems all that can get lost across reboots are logs and temporary files … but your system will never suffer catastrophic filesystem failures or prompt for interactive fsck during boot.

Here are some changes I frequently make to /etc/rc.d/rc.S to leave root mounter ro:

reconfigure all I can to use /run instead of /var

move /etc/{mtab,resolv.conf,ld.so.cache} in /run/etc/ and make links that point to where I moved them

move /var/log/{messages,syslog,lastlog,wtmp,btmp,secure,dmesg} in /run/log/ and make links that point to where I moved them

change the line that mounts root rw “/sbin/mount -w -v -n -o remount /” to something like this “/sbin/mount -v -n -o remount /”

save the random-seed to unused sector on flash when shutting down (rc.0 … well it's a link to rc.6) and load it back to /dev/urandom from rc.S when system comes up again

You could optionally have fstab specify that root should be mounted ro like this:

/dev/ubi0_0 / ubifs ro 0 1

You will also haveto make some links in various places so that they end up writing in /run that has been mounted tmpfs. I do that manually just once with / mounted rw and then remount it ro.

If you're interested in actually making such changes to the init scripts I've shared how I go about it on Linux Questions[3732].

9 Unexpected Trouble Sources

When you start doing your own stuff you may run into problems that are hard to debug because the cause is pretty much unexpected.

Here's an example of one that recently gave me a headache over a long weekend after migrating from the seagate dockstar to RPi2. I had previously tested rigorously the functionality of everything I had changed in the setup and even back-ported some stuff to the dockstar to make sure it was stable. All seemed fine but when I finally switched to the Pi I started getting plagued with unstable internet connection. I fiddled endlessly with the peer setup without any improvement. I called a friend that uses the same ISP and he told me he had no issues so whatever I was experiencing I was the cause of my own problems. During all my tests on both RPi and RPi2 I had never run into issues and nothing had changed that had not been previously tested, what on earth was going on ? It then dawned on me that I had done all my testing on the new hardware running from a USB power bank and that maybe there was some sort of parasitic coupling between the power supply I was now using and the modem itself. Sure enough the problems dissipated as I powered the PRi2 off the power bank again. I then pulled out a better quality power supply for the Pi and everything still worked fine.

It was that lousy wall charger, that I took off a really low end tablet my son broke, that was making enough noise to bother my modem. Had it been a FCC or CE certified power supply that would probably not have happened.

Obviously there may be innumerable other trouble source you may run into (some of which you have no control … like when your ISP makes clumsy NAT for you) but if you're doing your own stuff be prepared to put up and debug them.

10 Conclusions

You have set up an AP with entry level security and the most common options available in the low end appliances but you have gained:

ability to easily keep your AP software up-to date

ability to run several AP at the same time (and even mesh into other WiFis … not covered in this howto)

plug and network capability for the usb dongles

full control over the way interfaces are bridged and/or the way traffic is routed trough the AP

full control on the way dhcp works (limitless subnets and address reservation)

full control over fire-waling (no limits in port forwarding, MAC acl, DMZ ot subnets with specific set of permissions and quotas)

ability to re-share ANY type of connection the AP has

ability to choose what and how to backup in the AP

ssh access for management with a standard Linux environment for easy debugging issues

scale up/down the hardware that runs the AP without having to change the way you setup things

update components for which new vulnerabilities have been found without having to wait the the manufacturer does something about it

whatever the flexibility of a standard Linux environment can give you that a custom crippled embedded environment cannot.

I'm not going to miss my old low end AP, are you ? I replaced it with home-brew stuff from which this article is derived. Over the years I've done several remakes adding some new features. The last upgrade was 8 programmable buttons with indicator leds to carry out arbitrary functions.

If anyone is interested in a nearly ready to go Raspberry Pi 1/2 image of what has been discussed in this article you cab get if from here[3733]. Just extract tar and do “cat rpi_wrap_512mb.img > <your SD device>” into an SD at least 512Mb, boot it and longin via the console, read readme.txt and complete the setup manually. The readme.txt is also in the tarball so you can read it before even logging into the Pi.

Sources

Originally written by louigi600[3734]

howtos, louigi600

Home NFS Setup HOWTO

This is a quick guide to setting up NFS in Slackware for use in a home LAN. The example used is for connection of a laptop computer with a desktop computer that also has an NTFS partition mounted on /music. It assumes that basic network connectivity has been established. This guide is largely cut and pasted from other more definitive documents.

From http://nfs.sourceforge.net/nfs-howto/[3735]

2.1. What is NFS?
The Network File System (NFS) was developed to allow machines to mount a disk partition on a remote machine
as if it were a local disk. It allows for fast, seamless sharing of files across a network.
It also gives the potential for unwanted people to access your hard drive over the network (and thereby
possibly read your email and delete all your files as well as break into your system)
if you set it up incorrectly.

Setting up a secure NFS does require some additional work, but as good security habits start at home, these steps will also be presented.

For the purposes of this example:

the desktop computer will be called DESKTOP and has an IP address 10.1.1.2

the laptop computer will be called LAPTOP and has an IP address 10.1.1.3 using a wired connection

or the laptop computer will be called LAPTOP-W and has an IP address 10.1.1.4 using a wireless connection

Both computers will be setup to act as NFS servers as well as clients.

Access settings

/etc/hosts

On the desktop computer /etc/hosts should have lines like:

10.1.1.3                LAPTOP.<your domain>      LAPTOP
10.1.1.4                LAPTOP-W.<your domain>    LAPTOP-W

On the laptop computer /etc/hosts should have a line like:

10.1.1.2                DESKTOP.<your domain>      DESKTOP

/etc/hosts.deny

On both machines add:

portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL

/etc/hosts.allow

On the desktop computer add:

# For NFS mount from LAN
portmap: 10.1.1.3 , 10.1.1.4
lockd: 10.1.1.3 , 10.1.1.4
rquotd: 10.1.1.3 , 10.1.1.4
mountd: 10.1.1.3 , 10.1.1.4
statd: 10.1.1.3 , 10.1.1.4

On the laptop computer add:

# For NFS mount from LAN
portmap: 10.1.1.2
lockd: 10.1.1.2
rquotd: 10.1.1.2
mountd: 10.1.1.2
statd: 10.1.1.2

The syntax in the above examples can be altered, e.g. 10.1.1. could be used to allow access from any machine on the 10.1.1.0/24 network.

/etc/exports

On the desktop computer add:

# Allow export of root file system to LAPTOP with read/write and root access
/               LAPTOP(rw,no_root_squash,no_subtree_check) \
LAPTOP-W(rw,no_root_squash,no_subtree_check)
/music          LAPTOP(rw,no_root_squash,no_subtree_check,nohide) \
LAPTOP-W(rw,no_root_squash,no_subtree_check,nohide)

On the laptop computer add:

# Allow export of root file system to DESKTOP with read/write and root access
/               DESKTOP(rw,no_root_squash,no_subtree_check)

Comments

The no_root_squash option is very permissive. The root_squash option is much more secure.

Allowing access to the entire root file system is very permissive. Restriction to a sub-directory is much more secure.

The nohide option is required to show the contents of other mounted partitions.

Daemon startup

/etc/rc.d/rc.nfsd

Check that this file is executable on both computers

/etc/rc.d/rc.rpc

Check that this file is executable on both computers. (Not strictly necessary as /etc/rc.d/rc.nfsd will run this, but will be important if you want the computer to work as an NFS client only).

Binding ports

a) Slackware versions up to 14.2

To use NFS through the firewall follow this guide that is quoted verbatim. Thanks rworkman!

From http://rlworkman.net/howtos/NFS_Firewall_HOWTO[3736]

This document is intended to give you detailed steps for making NFS bind to
user-specified ports instead of random ports assigned by the portmapper.
This makes it *much* easier to run a firewall on the NFS server, as you don't
have to kludge something to find the NFS ports at each boot to open them with
iptables.
NOTE: This was written for Slackware Linux, but the general ideas should
apply on pretty much any distribution.
First, you'll want (it's not necessary, but handy to have for later) to make
sure all of this is in /etc/services.  I made sure "NFS" is in all of what I
added or modified so that I can easily remove them (or just find them) if I
need them later.  Note that many of these are *local* additions - they are
not official IANA assignments.
sunrpc          111/tcp                 # SUN Remote Procedure Call
sunrpc          111/udp                 # SUN Remote Procedure Call
nfsd            2049/tcp                # NFS server daemon
nfsd            2049/udp                # NFS server daemon
rpc.nfs-cb      32764/tcp               # RPC nfs callback
rpc.nfs-cb      32764/udp               # RPC nfs callback
status          32765/udp               # NFS status (listen)
status          32765/tcp               # NFS status (listen)
status          32766/udp               # NFS status (send)
status          32766/tcp               # NFS status (send)
mountd          32767/udp               # NFS mountd
mountd          32767/tcp               # NFS mountd
lockd           32768/udp               # NFS lock daemon/manager
lockd		  32768/tcp		  # NFS lock daemon/manager
rquotad         32769/udp               # NFS rquotad
rquotad         32769/tcp               # NFS rquotad
************************************************************************
Next, you'll need to modify your /etc/rc.d/rc.nfsd script accordingly:
For other linux distributions, find the script that starts these
daemons and add the needed flags.
# **** Make the quota daemon listen on port 32769
if [ -x /usr/sbin/rpc.rquotad ]; then
echo "  /usr/sbin/rpc.rquotad -p 32769"
/usr/sbin/rpc.rquotad -p 32769
fi
# **** Make the mount daemon listen on port 32767
if [ -x /usr/sbin/rpc.mountd ]; then
echo "  /usr/sbin/rpc.mountd -p 32767"
/usr/sbin/rpc.mountd -p 32767
fi
Now modify the /etc/rc.d/rc.rpc script (again, for other linux distros,
find the script that starts this daemon and add the needed flags).
On older versions (less than 11.0) of Slackware, rpc.statd is started
in rc.nfsd, so look there instead.
# **** Have the portmap daemon chroot to /var/empty for increased security
# **** Make the status daemon listen on port 32765 and talk on port 32766
if [ -x /sbin/rpc.portmap -a -x /sbin/rpc.statd ]; then
if ! ps axc | grep -q rpc.portmap ; then
echo "Starting RPC portmapper:  /sbin/rpc.portmap -t /var/empty"
/sbin/rpc.portmap -t /var/empty
fi
if ! ps axc | grep -q rpc.statd ; then
echo "Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd -p 32765 -o 32766"
/sbin/rpc.statd -p 32765 -o 32766
fi
# **** Note that you'll have to open port 32766 on the NFS clients
Now make the lock daemon listen on port 32768 only and set the nfs callback
port to 32764.
Up to Slackware 11.0, this requires a kernel boot parameter (an append=
line in lilo.conf) - a kernel stanza will look something like this:
image = /boot/vmlinuz-ide-2.4.37.11
append = "lockd.udpport=32768 lockd.tcpport=32768"
root = /dev/hda2
label = 2.4.37.11
read-only
After 11.0, but before Slackware 13.1, this requires setting module load
options in a file in the /etc/modprobe.d/ directory - I create an aptly
named file of /etc/modprobe.d/nfs.conf file and add the following lines:
options lockd nlm_udpport=32768 nlm_tcpport=32768
options nfs callback_tcpport=32764 	# This is for NFSv4
In Slackware 13.1 and later, you will instead need to place the following
in /etc/sysctl.conf:
fs.nfs.nlm_udpport=32768
fs.nfs.nlm_tcpport=32768
fs.nfs.nfs_callback_tcpport=32764
Finally, you'll need to reboot the machine since the lockd module probably
will refuse to unload.  Once it's rebooted, you can test to make sure all
of the changes "took" with "rpcinfo -p" or "pmap_dump" (rpcinfo is no longer
present in Slackware 14.0 or later) -- as an example, here's a snippet of
what I see here:
stora # rpcinfo -p
program vers proto   port
100000    2   tcp    111  portmapper
100000    2   udp    111  portmapper
100024    1   udp  32766  status
100024    1   tcp  32766  status
100227    3   tcp   2049
100227    3   udp   2049
100021    3   udp  32768  nlockmgr
100021    3   tcp  32768  nlockmgr
100005    3   udp  32767  mountd
100005    3   tcp  32767  mountd
Copyright 2006-2011  Robby Workman, Tuscaloosa, Alabama, USA
#include <mit.h>	/* Standard MIT License */
You may mirror and/or otherwise use this file as you wish so long as you
retain attribution to the author.  If you have any questions, comments, or
suggestions for improvement, you may contact me at rworkman AT slackware.com
Note: Updated 20111126 for better consistency with the Debian NFS HOWTO
(since the actual port assignments aren't important, we may as well
recommend the same thing in both places); thanks to David Allen for
the pointers and recommendation...
Note: Updated 20120820 to note pmap_dump usage instead of rpcinfo in
Slackware 14+; thanks to David Allen for the heads-up on that.

b) Slackware version after 14.2

To use NFS through the firewall is now easier, as options for NFS can be set in /etc/default/nfs and /etc/default/rpc. It is simply necessary to uncomment the appropriate lines in /etc/default/rpc.

/etc/default/rpc

# See also /etc/default/nfs
# Optional arguments passed to rpcbind. See rpcbind(8)
#RPCBIND_OPTS=""
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
#RPC_STATD_OPTS=""
# Optional hostname to start rpc.statd with.
#RPC_STATD_HOSTNAME="darkstar"
# Port rpc.statd should listen on.
RPC_STATD_PORT=32766
# Outgoing port rpc.statd should use.
RPC_STATD_OUTGOING_PORT=32765
#
# Optional options passed to rquotad. See rquotad(8)
#RPC_RQUOTAD_OPTS=""
# Optional port rquotad should listen on:
RPC_RQUOTAD_PORT=32769
#
# TCP port rpc.lockd should listen on:
LOCKD_TCP_PORT=32768
# UDP port rpc.lockd should listen on:
LOCKD_UDP_PORT=32768
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8)
#RPC_MOUNTD_OPTS=""
# Port rpc.mountd should listen on:
RPC_MOUNTD_PORT=32767
#

Firewall settings

/etc/rc.d/rc.firewall

Here are some example lines to allow NFS:

## NFS uses TCP and UDP on ports 111, 2049, 32764-32769
# Accept TCP and UDP on port 111 from local LAN for portmap
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 111 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 111 -j ACCEPT
# Accept TCP and UDP on port 2049 from local LAN for nfsd
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 2049 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 2049 -j ACCEPT
# Accept TCP and UDP on port 32765 from local LAN for statd listen
#  (set in /etc/rc.d/rc.rpc for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32765 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32765 -j ACCEPT
# Accept TCP and UDP on port 32766 from local LAN for statd send
#  (set in /etc/rc.d/rc.rpc for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32766 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32766 -j ACCEPT
# Accept TCP and UDP on port 32767 from local LAN for mountd
#  (set in /etc/rc.d/rc.nfsd for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32767 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32767 -j ACCEPT
# Accept TCP and UDP on port 32768 from local LAN for lockd
#  (set in /etc/sysctl.conf for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32768 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32768 -j ACCEPT
# Accept TCP and UDP on port 32769 from local LAN for rquotad
#  (set in /etc/rc.d/rc.nfsd for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32769 -j ACCEPT
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32769 -j ACCEPT

The work is done! Everything should now be in place. After rebooting both machines it should now be possible to:

mount the root file system on the desktop computer on the /mnt/tmp directory on the laptop using

mount DESKTOP:/ /mnt/tmp

mount the root file system on the laptop computer on the /mnt/tmp directory on the desktop using

mount LAPTOP:/ /mnt/tmp

Sources

http://nfs.sourceforge.net/nfs-howto/[3737]

http://rlworkman.net/howtos/NFS_Firewall_HOWTO[3738]

howtos, software, nfs, slackware 13.37, slackware 14.0, author allend

Adding Sieve and ManageSieve support to dovecot

Installing the Software

Assuming you have set up Dovecot and Postfix as per Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3739] you may want some server-side filtering, and vacation response capabilities. This can be done using the sieve filter language, and edited by your virtual mail users using managesieve.

There is a slackbuild for dovecot that provides the sieve and managesieve functionality called pigeonhole[3740].

You must use the version of pigeonhole designed for the version of dovecot you are using as the abi changes from version to version.

Once you have installed pigeonhole using the slackbuild, for example, using sbopkg[3741] you can then configure it.

Configuring Pigeonhole

We will use a basic configuration, which can be expanded later if needed. copy the following 3 files from /usr/doc/dovecot-2.your.version/example-config/conf.d/ to /etc/dovecot/conf.d

20-managesieve.conf

90-sieve.conf

20-lmtp.conf

Edit /etc/dovecot/conf.d/20-managesieve.conf and uncomment the protocols line, service managesieve-login line, the inet_listener and port lines, and the two close braces lines. this will leave you with the following uncommented lines in the file

protocols = $protocols sieve
service managesieve-login {
inet_listener sieve {
port = 4190
}
}
protocol sieve {
}

that is managesieve enabled. now to configure sieve itself.

Edit /etc/dovecot/conf.d/90-sieve.conf in the plugin section make the sieve line read

sieve=file:/var/vmail/vhosts/%d/%n/sieve/scripts;active=/var/vmail/vhosts/%d/%n/sieve/.dovecot.sieve

this specifies where the user sieve scripts will be stored. (We do not use the default location of the virtual users email folder, as it is not recommended see[3742], as it shows up as a directory in email clients.)

we also might as well configure an error log file for each user's scripts, so after that line, add a new line

sieve_user_log = file:/var/vmail/vhosts/%d/%n/sieve/sieve_error.log

Now edit /etc/dovecot/conf.d/20-lmtp.conf and uncomment the mail_plugins line in the protocol lmtp section and modify it to read

mail_plugins = $mail_plugins sieve

Open the firewall for ManageSieve

that is it for basic installation, although if you were following Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3743] you will also need to add port 4190 to the firewall with something like

iptables -A INPUT -p tcp --dport 4190 -m state --state NEW -j ACCEPT

You may also want to restart dovecot to make sure it sees your newly added plugins

/etc/rc.d/rc.dovecot restart

Configuring Thunderbird for Sieve

ManageSieve as a tool to allow (virtual) users to create their own filters is not much use without a client. Fortunately there is one available for mozilla thunderbird. Unfortunately, the one available on the mozilla addons/extentions site does not work with any current version of thunderbird. Fortunately, to cut a long story short, the author has a more recent version which does work.

It can be downloaded here[3744] and should newer versions come out, they should be available from the nightly[3745] folder on the project's github site. Download this file to your computer, and manually install it into thunderbird.

Once this is installed, select the sieve-enabled mail account in thunderbird, then select tools - sieve message filters. Allow autodetect, and approve the certificate warning message (assuming you chose self-certified certificate in the howto). Now you can create sieve filters, which will act on your mail at the server. The plugin has some help for syntax and keywords, and there are plenty of examples on the internet for different tasks.

Sources

* Originally written by User tim[3746]

howtos, email, postfix, dovecot, mysql, ssl, sieve

Making Slackware Mail Server

This article shows how to make an Slackware machine your personal Mail Server. This howto is for Slackware 64 13.37, but with few changes you can adapt it to the newest member of Slackware familly Slackware 14.

Before we begin I must say that you need a normal installation of Slackware, without any special packages. The packages we will need to make the Mail Server we will manually download and install from Slackbuilds.org. I preffer the Cyrus SASL authentication method and Cyrus IMAP for remote login, insted of other alternatives like qpopper or dovecot.

Let's get started then , we will need to install Cyrus-SASL, Postfix, Cyurs-IMAP and then configure them all to use Certificates for encrypting the mail packages that traverse the Internet.

Installing Cyrus-SASL

# cd /tmp
# mkdir cyrus-sasl
# cd cyrus-sasl
# wget ftp://ftp.slackware.com/pub/slackware/slackware64-13.37/source/n/cyrus-sasl/cyrus-sasl-2.1.23.tar.xz
# wget ftp://ftp.slackware.com/pub/slackware/slackware64-13.37/source/n/cyrus-sasl/cyrus-sasl.SlackBuild
# wget ftp://ftp.slackware.com/pub/slackware/slackware64-13.37/source/n/cyrus-sasl/doinst.sh.gz
# wget ftp://ftp.slackware.com/pub/slackware/slackware64-13.37/source/n/cyrus-sasl/rc.saslauthd.gz
# wget ftp://ftp.slackware.com/pub/slackware/slackware64-13.37/source/n/cyrus-sasl/slack-desc

# joe cyrus-sasl.SlackBuild

and add the following lines after “–disable static”

--enable-plain \
--disable-digest \

# sh cyrus-sasl.SlackBuild
# installpkg /tmp/cyrus-sasl-2.1.23-x86_64-1.txz

Installing Postfix

# cd /tmp
# mkdir postfix
# cd postfix
# wget http://postfix.cs.utah.edu/source/official/postfix-2.8.3.tar.gz
# wget http://slackbuilds.org/slackbuilds/13.37/network/postfix/README
# wget http://slackbuilds.org/slackbuilds/13.37/network/postfix/doinst.sh
# wget http://slackbuilds.org/slackbuilds/13.37/network/postfix/postfix.SlackBuild
# wget http://slackbuilds.org/slackbuilds/13.37/network/postfix/postfix.info
# wget http://slackbuilds.org/slackbuilds/13.37/network/postfix/rc.postfix
# wget http://slackbuilds.org/slackbuilds/13.37/network/postfix/slack-desc

# joe postfix.Slackbuild

Edit the following line and replace “dovecot” with “cyrus” like this

SASL=${SASL:-cyrus}

In order to begin Postfix installation you will need to create postfix user and group (also keep in mind that we need to add user postfix and user cyrus to the same group, mail group that is).

# groupadd -g 200 postfix
# useradd -u 200 -d /dev/null -s /bin/false -g postfix postfix -G mail
# groupadd -g 201 postdrop
# sh postfix.SlackBuild
# installpkg /tmp/postfix-2.8.3-x86_64-1_SBo.tgz

Before we continue with installation of IMAP server we need to assure that Postfix is working and we can authenticate with sasl. Let's make some basic Postfix configuration and some basic SASL configuration. I will be explaining plain auth because later on we will use it togheter with SASL to authenticate.

First of all we need to make our aliases and tell Postfix to use aliases maps from /etc/postfix/aliases, so :

# joe /etc/postfix/main.cf

Edit these lines and make them look like this :

alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

Now let's add a user to the Slackware machine, a user who will also can read and send mail.

# adduser
Login name for new user []: slackware_user
User ID ('UID') [ defaults to next available ]: press ENTER
Initial group [ users ]: 200
Home directory [ /home/xxxxxx ]: press ENTER
Shell [ /bin/bash ]: /bin/false
Do you wish to change the sheel? (Y/n): n
Expiry date (YYYY-MM-DD) []: press ENTER
Press ENTER and imput full name and other account relates stuff. Also specify an password for your newly created user.

Now edit /etc/postfix/aliases and modifiy it to your needs :

root  :         slackware_user
office:	  slackware_user

Now update your aliases database issuing the command :

# postalias hash:/etc/postfix/aliases

It is now time to make our important configurations for Postfix in order for it to run.

# joe /etc/postfix/main.cf
myhostname = mx.yourdomain.tld
mydomain = yourdomain.tld
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mynetworks = 127.0.0.0/8

Let's now configure Postfix to authenticate users using SASL

# mkdir /etc/sasl2
# cd /etc/sasl2
# touch smtpd.conf
# joe smtpd.conf

pwcheck_method: saslauthd
mech_list: PLAIN LOGIN

Now let's configure Postfix to have users authenticate using SASL. Edit /etc/postfix/main.cf and add the folowing code to the end of the file :

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination

Let's start the daemons and test our configurations until now:

# saslauthd -a shadow
# postfix start

Then from another machine telnet into your mail server on port 25 and issue the following commands :

# telnet mx.mailserver.com 25
ehlo user.mailserver.tld
250-mx.mailserver.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN Y4R0QYxpcuHsFBRbbGjnPHIwYjB0MWrpMTk7La==
235 2.7.0 Authentication successful
MAIL FROM: <user@mailserver.com>
250 2.1.0 Ok
RCPT TO: <user@yahoo.com>
250 2.1.5 Ok
DATA
354 End data with <CR><LF>.<CR><LF>
HI. This mail is a test .
.
250 2.0.0 Ok: queued as 4C0EE221E93
QUIT

In order to find out the string after AUTH PLAIN enter the command printf 'user\0user\0password' | mmencode on your mail server, where user is your username and password is your password

Rember to put the “.” at the end so the mail can be sent to qeue daemon

Installing Mail Delivery and Cyrus IMAP

# cd /tmp
# mkdir cyrus-imap
# cd cyrus-imap
# wget http://cyrusimap.org/releases/cyrus-imapd-2.4.12.tar.gz
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/README
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/README.SLACKWARE
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/cyrus-imapd.SlackBuild
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/cyrus-imapd.info
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/doinst.sh
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/imapd.conf
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/patches
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/rc.cyrus-imapd
# wget http://slackbuilds.org/slackbuilds/13.37/network/cyrus-imapd/slack-desc
# mkdir patches
# cd patches/
# wget http://mirrors.vbi.vt.edu/mirrors/linux/slackbuilds/13.37/network/cyrus-imapd/patches/cyrus-imapd-2.4.4-autocreate-0.10-0-sv1.patch
# wget http://mirrors.vbi.vt.edu/mirrors/linux/slackbuilds/13.37/network/cyrus-imapd/patches/cyrus-imapd-2.4.4-autosieve-0.6.0-sv1.patch
# cd /tmp/cyrus-imap
# groupadd -g 238 cyrus
# useradd -d /var/imap -s /bin/sh -u 238 -g 238 cyrus -G mail
# sh cyrus-imapd.SlackBuild
# installpkg /tmp/cyrus-imapd-2.4.12-x86_64-1_SBo.tgz
# mkdir -m 750 -p /var/imap /var/spool/imap /var/sieve
# chown cyrus:mail /var/imap /var/spool/imap /var/sieve
# su - cyrus
# /usr/doc/cyrus-imapd-2.4.12/tools/mkimap
# su - root

Edit /etc/imapd.conf and add the following lines:

sasl_mech_list: PLAIN LOGIN
allowplaintext: yes

Edit /etc/postfix/main.cf and at mailbox_transport add the following:

mailbox_transport = lmtp:unix:/var/imap/socket/lmtp

The last step to do is to add users to your imap server. For that you need to issue these commands :

# passwd cyrus

and add a password for cyrus user

# cyradm --user cyrus --server localhost --auth plain
localhost>cm user.slackware_user
localhost>lm
localhost> quit

slackware_user is the user you have created in your slackware machine

At this point we have an functional Mail Server but with users authenticating in plain text . So the next step is innevitabile.

SSL / TLS Postfix and Cyrus

Let's start by creating our certificates and configuring POSTFIX to use STARTTLS.

# cd /etc/ssl
# misc/CA.pl -newca ( complete all entries)
# openssl req -new -nodes -keyout mailkey.pem -out mailreq.pem -days 36500
# openssl ca -out mail_signed_cert.pem -infiles mailreq.pem
# cp /etc/ssl/mailkey.pem /etc/postfix
# cp /etc/ssl/mail_signed_cert.pem /etc/postfix
# chown root /etc/postfix/mailkey.pem
# chmod 400 /etc/postfix/mailkey.pem
# cp /etc/ssl/demoCA/cacert.pem /etc/postfix

Now add the followings to /etc/postfix/main.cf :

smtpd_use_tls = yes
smtpd_tls_key_file = /etc/postfix/mailkey.pem
smtpd_tls_cert_file = /etc/postfix/mail_signed_cert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem

In /etc/postfix/master.cf delete the “#” sign from smtps and the next two columns from it

                 smtps     inet  n       -       n       -       -       smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes

Now let's configure IMAP to use STARTTLS

# openssl req -new -nodes -out req.pem -keyout key.pem
# openssl rsa -in key.pem -out new.key.pem
# openssl x509 -in req.pem -out ca-cert -req -signkey new.key.pem -days 36500
# cp new.key.pem /var/imap/server.pem
# rm new.key.pem
# cat ca-cert >> /var/imap/server.pem
# chown cyrus:mail /var/imap/server.pem
# chmod 600 /var/imap/server.pem
# echo tls_ca_file: /var/imap/server.pem >> /etc/imapd.conf
# echo tls_cert_file: /var/imap/server.pem >> /etc/imapd.conf
# echo tls_key_file: /var/imap/server.pem >> /etc/imapd.conf

Adding daemons to rc.local

Now the last step is to add all daemons to rc.local so they can start when machine boots. So open /etc/rc.d/rc.local and add these lines :

# Starting saslauthd daemon
if [ ! -r /var/state/saslauthd/saslauthd.pid ]; then
echo "Starting SASL authentication daemon:  /usr/sbin/saslauthd -a shadow"
/usr/sbin/saslauthd -a shadow
fi

# Starting IMAP daemon
if [ -x /usr/libexec/cyrus/master ]; then
echo "Starting Cyrus IMAP daemon:  /usr/libexec/cyrus/master"
/etc/rc.d/rc.cyrus-imapd start
fi

# Starting POSTFIX daemon
/etc/rc.d/rc.postfix start

Sources

Postfix The Definitive Guide, Kyle D. Dent, O'Reilly
Managing IMAP, Dianna Mullet & Kevin Mullet, O'Reilly
Official Postfix Documentation, [[http://www.postfix.org/documentation.html]]

howtos, author badirca

Setting up Joomla 2.5 CMS in Slackware 14.0 64bit

This HowTo describes simplified instruction for installing Joomla 2.5 content management system in Slackware 14.0. For more complex instructions you may want to read …

start conditions is freshly installed Slackware 14.0 with option “Full install”.

In configuring stage you choose to automatically start applications “apache” (rc.httpd) and “MySQL” (rc.mysqld)

Configure MySQL

Copy with rename /etc/mysql/my-large.cnf or another file from that directory, who meet your requirements, to /etc/my.cnf

Edit that /etc.my.cnf to add three lines after [mysqld], as there:

[mysqld]
collation-server = utf8_unicode_ci
init-connect='SET NAMES utf8'
character-set-server = utf8

After that, restart MySQL server.

Do as root

mysql_install_db --user=mysql

Do as root

 mysql_secure_installation

, and set mysql root password ( and write it down or remember), and choose all default answers

After that, do

 mysql -u root -p

after write user password, be in mysql>. write

 CREATE USER 'joomla_db_username'@'localhost' IDENTIFIED BY 'joomla_db_user_password';

, where joomla_db_user is user, who you make for under who your joomla stores information in mysql. joomla_db_user_paswword is your choosing password for that mysql user.

write

 GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON yourdatabasename_for_joomla.* to 'joomla_db_username'@'localhost';

after that do

 FLUSH PRIVILEGES;

and then

 quit

and finally, do from bash

 mysqladmin -u joomla_db_username -p create yourdatabasename_for_joomla

it need input of your “joomla_db_username” password, seems as “joomla_db_user_password” in that instruction.

That's all, your MySQL will be ready to install and configure Joomla.

Configure Apache Webserver

Open /etc/httpd/httpd.conf in a text editor such as vi or nano.

Change the ServerAdmin and ServerName variables to your liking.

Change the first encounter of Directive

<Directory />
AllowOverride none
Require all denied
</Directory>

to:

<Directory />
Options FollowSymLinks Includes
AllowOverride None
</Directory>

Next, edit “/etc/httpd/httpd.conf” to configure a new DocumentRoot. By default the Apache DocumentRoot is the directory “/srv/httpd/htdocs”. We will change that to the Joomla installation directory. In this example, we will install Joomla to “/srv/httpd/beautifulsite.com”.
Search for the two directives

DocumentRoot "/srv/httpd/htdocs"

and

<Directory "/srv/httpd/htdocs">

and change both values from “/srv/httpd/htdocs” to “/srv/httpd/beautifulsite.com”.

Next, look at below section:

    #
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.4/mod/core.html#options
# for more information.
#
Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
AllowOverride None
#
# Controls who can get stuff from this server.
#
Require all granted
</Directory>

and change following:

Options Indexes FollowSymLinks Includes MultiViews ExecCGI
AllowOverride All
Order allow, deny
Allow from All

and comment the line “Require all granted”

At the bottom of the file, change the section

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

adding “index.shtml index.php” after “index.html”.

Comment out the string “AddHandler cgi-script .cgi”

Uncomment the php module:

Include /etc/httpd/mod_php.conf

following modules must be uncommented:

LoadModule authn_file_module lib64/httpd/modules/mod_authn_file.so
LoadModule authn_core_module lib64/httpd/modules/mod_authn_core.so
LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so
LoadModule authz_groupfile_module lib64/httpd/modules/mod_authz_groupfile.so
LoadModule authz_user_module lib64/httpd/modules/mod_authz_user.so
LoadModule authz_core_module lib64/httpd/modules/mod_authz_core.so
LoadModule access_compat_module lib64/httpd/modules/mod_access_compat.so
LoadModule auth_basic_module lib64/httpd/modules/mod_auth_basic.so
LoadModule reqtimeout_module lib64/httpd/modules/mod_reqtimeout.so
LoadModule filter_module lib64/httpd/modules/mod_filter.so
LoadModule mime_module lib64/httpd/modules/mod_mime.so
LoadModule log_config_module lib64/httpd/modules/mod_log_config.so
LoadModule env_module lib64/httpd/modules/mod_env.so
LoadModule headers_module lib64/httpd/modules/mod_headers.so
LoadModule setenvif_module lib64/httpd/modules/mod_setenvif.so
LoadModule version_module lib64/httpd/modules/mod_version.so
LoadModule proxy_module lib64/httpd/modules/mod_proxy.so
LoadModule proxy_connect_module lib64/httpd/modules/mod_proxy_connect.so
LoadModule proxy_ftp_module lib64/httpd/modules/mod_proxy_ftp.so
LoadModule proxy_http_module lib64/httpd/modules/mod_proxy_http.so
LoadModule proxy_fcgi_module lib64/httpd/modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module lib64/httpd/modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module lib64/httpd/modules/mod_proxy_ajp.so
LoadModule proxy_express_module lib64/httpd/modules/mod_proxy_express.so
LoadModule lbmethod_byrequests_module lib64/httpd/modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module lib64/httpd/modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_bybusyness_module lib64/httpd/modules/mod_lbmethod_bybusyness.so
LoadModule mpm_event_module lib64/httpd/modules/mod_mpm_event.so
LoadModule unixd_module lib64/httpd/modules/mod_unixd.so
LoadModule status_module lib64/httpd/modules/mod_status.so
LoadModule autoindex_module lib64/httpd/modules/mod_autoindex.so
##openwebmail!
LoadModule cgi_module lib64/httpd/modules/mod_cgi.so
LoadModule dir_module lib64/httpd/modules/mod_dir.so
LoadModule alias_module lib64/httpd/modules/mod_alias.so
### joomla mod_rewrite!
Loadmodule rewrite_module lib64/httpd/modules/mod_rewrite.so
#for gzip compression, joomla!
LoadModule deflate_module lib64/httpd/modules/mod_deflate.so

and save the file.

Next, edit the file “/etc/httpd/php.ini”

Search for string

output_buffering = 4096

and change them to

output_buffering = Off

Save the file, and finally restart the webserver:

root@darkstar:~# /etc/rc.d/rc.httpd restart

In the “CustomLog” section of /etc/httopd/httpd.conf, if you plan to use webalizer, comment “CustomLog ….. common” and uncomment “CustomLog …. combined” strings

In /etc/httpd/httpd.conf, you can comment out the VirtualHost configuration, if you intend run many webservers on your host. If not, leave it, as it is.

#Include /etc/httpd/extra/httpd-vhosts.conf

Set Up Joomla 2.5

Download a Joomla tarball at http://www.joomla.org/download.html[3747], choose the “Full package, Zip” archive.

We install Joomla as the Apache Webserver's DocumentRoot[3748], which we configured as “/srv/httpd/beautifulsite.com” in the previous section. Create a new directory called “beautifulsite.com” under “/srv/httpd/”. We will end up with the new directory “/srv/httpd/htdocs/beautifulsite.com” which will be used by Apache as the DocumentRoot.

Uncompress the joomla zip-file into that directory:

root@darkstar:~# unzip Joomla_2.5.9-Stable-Full_Package.zip -d /srv/httpd/htdocs/beautifulsite.com

As root, change the file ownership to the Apache user:

root@darkstar:~# chown -R apache:apache /srv/httpd/beautifulsite.com

The initial Joomla configuration is done in a web browser (preferably from another computer workstation). Enter our “http://beautifulserver.com[3749]” URL in the browser's addressbar. This will start start the web-based configuration of our newly installed Joomla CMS. When you get to the database configuration, the better choice is “mysqli”. Input is also required for the Joomla database username and password. The rest of the configuration is straight-forward.

After that, if you want to use SEO-friendly settings ( URL rewriting), then rename htaccess.txt in your root of current joomla catalog to .htaccess .

Sources

Original source: MySQL config to UTF8 support[3750].

Originally written by John Ciemgals[3751]

howtos, joomla, author wisedraco

Installing The Dovecot MDA

This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3859]

Dovecot is a popular and secure mail delivery agent, or MDA, which can be configured to work alongside the postfix MTA.

As with postfix, we will build and install our dovecot package using the current build script from SBo[3860]. This example uses the version current at time of writing, but you should always build the latest version available for your Slackware version.

We will assume that you are familiar with SlackBuilds and will provide only the essential steps for building dovecot here. For more detailed information please visit the SBo How-To page[3861].

Our dovecot build requires no special parameters. The essential steps for building dovecot are (as root):

cd /tmp
wget http://slackbuilds.org/slackbuilds/14.1/network/dovecot.tar.gz
tar -xvzf dovecot.tar.gz
cd dovecot
cat dovecot.info
...
DOWNLOAD="http://www.dovecot.org/releases/2.2/dovecot-2.2.13.tar.gz"
MD5SUM="a3eb1c0b1822c4f2b0fe9247776baa71"
...
# Fetch archive from URL in DOWNLOAD line #
wget http://www.dovecot.org/releases/2.2/dovecot-2.2.13.tar.gz
# Verify integrity of archive - compare to MD5SUM line #
md5sum dovecot-2.2.13.tar.gz
a3eb1c0b1822c4f2b0fe9247776baa71
# Build package #
chmod +x dovecot.SlackBuild
./dovecot.SlackBuild

The resulting package will be found in /tmp/dovecot-2.2.13-x86_64-1_SBo.tgz (or simillar for 32 bit version).

Copy the package file to the target platform if necessary and install:

installpkg {path-to/}dovecot-2.2.13-x86_64-1_SBo.tgz

Configuring The Dovecot MDA

You should become familiar with the dovecot documentation[3862] in order to properly configure your installation. You will also find a local copy of the complete documentation installed with the package in /usr/doc/dovecot-2.2.13/wiki/ (adjust for you version number if necessary).

You must become familiar with the tools available to you in order to safely admin and maintain your mail server! Take the time necessary to read the man pages - man dovecot, man doveconf, man doveadm, before you start your mail server!

The dovecot package will create a mostly empty configuration directory at /etc/dovecot.

cat /etc/dovecot/README
Configuration files go to this directory. See example configuration files in
/usr/doc/dovecot-2.2.13/example-config/

So we will create the necessary directory structure and copy only the necessary example config files to the working location as our point of reference.

mkdir /etc/dovecot/conf.d
cp /usr/doc/dovecot-2.2.13/example-config/dovecot.conf /etc/dovecot/.
cp /usr/doc/dovecot-2.2.13/example-config/dovecot-sql.conf.ext /etc/dovecot/.
cp /usr/doc/dovecot-2.2.13/example-config/conf.d/10-auth.conf /etc/dovecot/conf.d/.
cp /usr/doc/dovecot-2.2.13/example-config/conf.d/10-mail.conf /etc/dovecot/conf.d/.
cp /usr/doc/dovecot-2.2.13/example-config/conf.d/10-master.conf /etc/dovecot/conf.d/.
cp /usr/doc/dovecot-2.2.13/example-config/conf.d/10-ssl.conf /etc/dovecot/conf.d/.
cp /usr/doc/dovecot-2.2.13/example-config/conf.d/auth-sql.conf.ext /etc/dovecot/conf.d/.

We will work from top to bottom of the copied file list to perform configuration.

Open the file, /etc/dovecot/dovecot.conf and make the following changes:

vi /etc/dovecot/dovecot.conf
# Uncomment the following line to set supported protocols #
protocols = imap pop3 lmtp
# Set postmaster_address to your admin address #
postmaster_address = me@my-domain.com
# Add following line commented, uncomment to troubleshoot SSL errors #
#verbose_ssl = yes

Next, configure the database access parameters and password query for dovecot:

vi /etc/dovecot/dovecot-sql.conf.ext
# Uncomment and set the following lines as shown #
driver = mysql
connect = "host=localhost dbname=mailserver user=mailuser password={your mailuser password}"
default_pass_scheme = SHA512-CRYPT
password_query = SELECT email as user, password FROM virtual_users WHERE email='%u';

Next, we configure the authentication methods to be used by dovecot. We will restrict it to use only secure authentication by the settings here and in the included auth-sql.conf.ext file, excluding other methods.

vi /etc/dovecot/conf.d/10-auth.conf
# Uncomment this line - no plain text authentication! #
disable_plaintext_auth = yes
# Plain is inside SSL, add "login" for MUA user/pass authentication #
auth_mechanisms = plain login
# Comment out this line, no file based auth #
#!include auth-system.conf.ext
# Uncomment this line to allow SQL based auth #
!include auth-sql.conf.ext

Set the filesystem path for virtual mail. The virtual user's mail boxes will be at /var/vmail/vhosts/DOMAIN/USER. Dovecot will perform the substitutions for %d and %n at runtime.

vi /etc/dovecot/conf.d/10-mail.conf
# Uncomment and set the mail_location path #
mail_location = maildir:/var/vmail/vhosts/%d/%n

Set the configuration for the dovecot master process:

vi /etc/dovecot/conf.d/10-master.conf
# Find the "service imap-login" section and set port to 0 to disable insecure imap login #
service imap-login {
inet_listener imap {
port = 0
}
...
}
# Find the "service pop3-login" section and set port to 0 to disable insecure pop3 login #
service pop3-login {
inet_listener pop3 {
port = 0
}
...
}
# Find the "service lmtp" section and make the following changes #
service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp {
mode = 0600
user = postfix
group = postfix
}
...
}
# Find the "service auth" section, set postfix handler for SASL, db auth user/perms #
service auth {
unix_listener /var/spool/postfix/private/auth {
mode = 0666
user = postfix
group = postfix
}
unix_listener auth-userdb {
mode = 0600
user = vmail
}
user = dovecot
}
# Find the "service auth-worker" section, run auth processes as unpriv user #
service auth-worker {
user = vmail
}

Next we set up the SSL configuration so it is mandatory and uses the certificates created earlier:

vi /etc/dovecot/conf.d/10-ssl.conf
# Uncomment as necessary and make the following changes #
ssl = required
ssl_cert = </etc/ssl/localcerts/dove.pem
ssl_key = </etc/ssl/private/dove.key

Finally, configure authentication and user data paths for dovecot access:

vi /etc/dovecot/conf.d/auth-sql.conf.ext
# Find the "passdb" section and configure as follows #
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf.ext
}
# Find the "userdb" section and configure as follows #
userdb {
driver = static
args = uid=vmail gid=vmail home=/var/vmail/vhosts/%d/%n
}

Now we want to further secure the installation by making all dovecot configutation files owned by the non–privledged vmail user, and accessible by the dovecot group, with no access by others.

chown -R vmail:dovecot /etc/dovecot
chmod -R o-rwx /etc/dovecot

Return to main article page[3863]

Sources

Based primarily on Dovecot documentation[3864]

Originally written by astrogeek[3865]

howtos, dovecot, postfix, mysql

Installing The Postfix MTA

This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3866]

Postfix is a popular and secure mail transport agent, or MTA.

We will build and install Postfix using the build script from SlackBuilds.org[3867] or SBo. The steps shown here use versions current as of this writing, but you should use the latest version applicable to your Slackware version at the time you build it.

By default the SBo postfix script builds with dovecot for SASL, which we need, but without the database support we also need. You might want to check the SlackBuild script at the time you build for changes or other options.

We will assume that you are familiar with SlackBuilds and will provide only the essential steps for building postfix here. For more detailed information please visit the SBo How-To page[3868].

If building for a Linode.com VPS you will either need to install the kernel-headers package, or preferably build on a local machine and then transfer the package to the VPS platform. You will also need to install the db48 package missing from the Linode.com Slackware.

The essential steps for building postfix with the required database support are (as root):

cd /tmp
wget http://slackbuilds.org/slackbuilds/14.1/network/postfix.tar.gz
tar -xvzf postfix.tar.gz
cd postfix
cat postfix.info
...
DOWNLOAD="http://postfix.cs.utah.edu/source/official/postfix-2.11.3.tar.gz"
MD5SUM="c3f0f51d8865559b40e9350eb3816011"
...
# Fetch archive from URL in DOWNLOAD line #
wget http://postfix.cs.utah.edu/source/official/postfix-2.11.3.tar.gz
# Verify integrity of archive - compare to MD5SUM line #
md5sum postfix-2.11.3.tar.gz
c3f0f51d8865559b40e9350eb3816011
# Now build with database support #
chmod +x postfix.SlackBuild
DATABASE=mysql ./postfix.SlackBuild

The resulting package will be found in /tmp/postfix-2.11.3-x86_64-1_SBo.tgz (or simillar for 32 bit version).

Copy the package file to the target platform if necessary and install:

installpkg {path-to/}postfix-2.11.3-x86_64-1_SBo.tgz

Configuring The Postfix MTA

You must become familiar with the postfix documentation[3869] in order to properly configure and administer your mail server. Additionally, a complete set of online documentation for your version is installed from the package to /usr/doc/postfix-2.11.3/html/, learn what is there.

You must become familiar with the tools available to you in order to safely admin and maintain your mail server! Take the time necessary to read the man pages - man postfix, man postconf, man master at minimum. And become familiar with the resources available through man postfix:SEE ALSO section, before you start your mail server!

What follows is a minimum configuration to safely operate a virtual email server on the internet, but you will surely want to adapt it to your specific needs.

Postfix has two main configuration files:

/etc/postfix/master.cf

/etc/postfix/main.cf

The master.cf file governs operation of the master daemon which listens for mail events and manages the many postfix utility processes.

We want to listen for SMTP, SMTPS and SUBMISSION requests, so…

vi /etc/postfix/master.cf
# Uncomment the following lines #
smtp      inet  n       -       n       -       -       smtpd
submission inet n       -       n       -       -       smtpd
smtps     inet  n       -       n       -       -       smtpd

Next, we want to configure the basic network environment for our postfix MTA in /etc/postfix/main.cf. However, the default main.cf is a very large file with many detailed comments and can be error prone to configure and administer. So it it recommended that you save a copy of the original and write the production version from scratch - it really isn't very long.

mv /etc/postfix/main.cf /etc/postfix/main.cf.original
vi /etc/postfix/main.cf
# Enter the following lines #
mynetworks_style = host
myorigin = $mydomain
# Change my-domain.com to the actual domain name of your server #
mydomain = my-domain.com
# mydestination must be localhost only to allow postfix to deliver non-virtual system mail #
mydestination = localhost
#IMPORTANT - relay_domains should be empty to prevent your server from becoming a spam relay!
#If you actually need to relay to other domains READ THE DOCUMENTATION CAREFULLY!
relay_domains =
# We have no local users, so no local notifications #
biff = no

Now we need to configure the secure aspects of our mail server, again in main.cf:

vi /etc/postfix/main.cf
# Enter the following lines #
# SSL certificates will be created at these locations when we configure dovecot #
smtpd_tls_cert_file = /etc/ssl/localcerts/dove.pem
smtpd_tls_key_file = /etc/ssl/private/dove.key
#Accept only secure smtp connections
smtpd_use_tls = yes
smtpd_tls_auth_only = yes
#Tell postfix to use dovecot for SASL
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
#Allow ONLY authenticated users to send email
#Do not accept incoming email for other than local mail boxes (i.e. virtual users)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination

Finally, we must configure postfix to use the database to identify allowed domains and to authenticate smtp requests against virtual mail boxes. Again, in main.cf…

vi /etc/postfix/main.cf
# Enter the following lines #
#Tell postfix to use dovecot lmtp for virtual mail delivery
virtual_transport = lmtp:unix:private/dovecot-lmtp
#Set file paths to mysql handlers for domains, mail boxes and aliases
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
#Set localhost aliases path
alias_maps = hash:/etc/aliases

The last four files do not yet exist on the system and so, must be created. The files prefixed with “virtual” tell postfix how to interact with the mysql database. The final alias_maps file tells the postfix process where to send operational messages.

First we must tell postfix how to identify which virtual domains it handles mail for by providing a proper query of the virtual database. This query must return true if the domain is in the database:

vi /etc/postfix/mysql-virtual-mailbox-domains.cf
# Enter the following lines #
user= mailuser
password = {your mailuser password}
hosts = localhost
dbname = mailserver
query = SELECT 1 FROM virtual_domains WHERE name='%s'

You may test the database connection and query with the postmap utility…

postmap -q my-domain.com mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf

This will return true (1) if the domain is found, NULL if not found, and an error message if the query or connection is not correctly configured.

Also note that other database connection options are available, for example if you are connecting to a remote database server, or multiple servers. See the mysql_table man page from the postfix package for complete connect parameter information.

Next, we must tell postfix how to identify valid virtual mail box users. This query must also only return true if the mail box exists in the database.

vi /etc/postfix/mysql-virtual-mailbox-maps.cf
# Enter the following lines #
user= mailuser
password = {your mailuser password}
hosts = localhost
dbname = mailserver
query = SELECT 1 FROM virtual_users WHERE email='%s'

You may test the database connection and query with the postmap utility…

postmap -q me@my-domain.com mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf

Next, we must tell postfix how to identify valid aliases in the database. This query must return the destination address for the alias.

vi /etc/postfix/mysql-virtual-alias-maps.cf
# Enter the following lines #
user= mailuser
password = {your mailuser password}
hosts = localhost
dbname = mailserver
query = SELECT destination FROM virtual_aliases WHERE source='%s'

You may test the database connection and query with the postmap utility…

postmap -q alias@my-domain.com mysql:/etc/postfix/mysql-virtual-alias-maps.cf

Finally, we must provide local aliases for postmaster and root mail on the local machine.

vi /etc/aliases
# Enter the following lines #
postmaster: root
root: root

After creating the aliases file, you must use the newaliases utility to build the local aliases database…

newaliases

This will create the file /etc/aliases.db in format useable by postfix.

It is important to provide the postmaster alias so that postfix can send operational messages to a real destination. The destination address may be a local user account or it may be a valid virtual mail box.

Return to main article page[3870]

Sources

Based primarily on Postfix documentation[3871]

Originally written by astrogeek[3872]

howtos, postfix, dovecot, mysql

Configuring SSL Certificates

This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3873]

We will now create and install a self-signed SSL certificate to support secure email.

The self-signed certificates we will generate here are in no way less secure than a certificate signed by a Certificate Authority, or CA. However, users will recevie a notice and be asked to grant an exception for the self-signed certificates. If this is important to your use case, simply obtain and substitute your own CA-signed certificates to the same locations used here.

The dovecot package installs a script for generating self-signed certs at /usr/doc/dovecot-2.2.13/mkcert.sh, which you may use if you prefer. The commands shown below do the same thing but save the certificate and key to a different path.

The following commands will generate a certificate good for one year. You may adjust the value after -days to make the certificate valid for a different period of time. We will use the paths used here in later steps, so please note if you change them.

mkdir -p /etc/ssl/localcerts
openssl req -new -x509 -sha256 -days 365 -nodes -out /etc/ssl/localcerts/dove.pem -keyout /etc/ssl/private/dove.key
chmod 600 /etc/ssl/localcerts/dove.pem
chmod 600 /etc/ssl/private/dove.key

To troubleshoot SSL related problems, first make sure the certificates are in the correct locations and with the correct permissions set. Then verify that the applications using them are also configured with those saame paths.

Both postfix and dovecot also include options to make SSL related errors visible in their logs.

Return to main article page[3874]

Sources

Originally written by astrogeek[3875]

howtos, postfix, dovecot, ssl

Virtual Mail Server Database

This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3876]

The database is used to provide configuration and authentication for your virtual mail domains and mail boxes. Email content is not stored in the database in this configuration.

If you have a full Slackware installation with MySQL already working then you may skip to the next section.

If you need to install MySQL (MariaDB) then grab the package and sigfile from a repo, verify it, then install it:

# For 32 bit package #
wget http://slackware.osuosl.org/slackware-14.1/patches/packages/mariadb-5.5.40-i486-2_slack14.1.txz
wget http://slackware.osuosl.org/slackware-14.1/patches/packages/mariadb-5.5.40-i486-2_slack14.1.txz.asc
# For 64 bit package #
wget http://slackware.osuosl.org/slackware64-14.1/patches/packages/mariadb-5.5.40-x86_64-2_slack14.1.txz
wget http://slackware.osuosl.org/slackware64-14.1/patches/packages/mariadb-5.5.40-x86_64-2_slack14.1.txz.asc
gpg --verify mariadb-5.5.40...txz.asc {path to your downloaded package sigfile}
installpkg mariadb-5.5.40...txz

If installing to a Linode.com VPS you may also need to install the libaio package for your Slackware version.

You will then need to initialize the database server and start it. Follow the instructions found in the top comments of the start script, /etc/rc.d/rc.mysqld. Here is a short summary…

mysql_install_db --user=mysql
...
chmod +x /etc/rc.d/rc.mysqld
/etc/rc.d/rc.mysqld start
...
mysql_secure_installation

Creating Mail DB User and Database

Your database server should now be running and have a root mysql user password set.

Next we need to create a database, and a user to access it on behalf of our mail server.

We will use the highly original names mailserver for our database, and mailuser for our user.

You may easily create both as follows, as root (provide the root mysql user password when prompted):

mysql -p -e "CREATE DATABASE mailserver"
mysql -p -e "GRANT ALL ON mailserver.* TO mailuser@localhost IDENTIFIED BY 'your-password'"

Remember the mailuser password for when we configure postfix and dovecot later.

Creating Mail Database Tables

Neither Postfix nor Dovecot place any restrictions on the data structures you should use to support virtual mail functions. Their only requirements are that you must supply a set of queries that return specific fields as needed.

This gives you total flexibility to integrate your mail system into any arbitrary operating environment. It also means that there is no default database structure, so we must provide it ourselves!

We will create only a minimal database schema, sufficient to get the system working. If you need to serve multiple domains or many virtual users, you will probably want to extend it by adding other columns or tables which meet your specific needs.

Figure 2 below, shows the schema of our virtual mail database.

virtual_domains - Contains an entry for each domain name served by virtual email

virtual_users - Contains an entry for each virtual mail box served

virtual_aliases - Maps aliases (source) to actual mail boxes (destination)

to create these tables, type

mysql --user="mailuser" -p -e "CREATE TABLE virtual_domains( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, PRIMARY KEY ( id ) );" mailserver
mysql --user="mailuser" -p -e "CREATE TABLE virtual_users( id INT NOT NULL AUTO_INCREMENT, domain_id INT NOT NULL , password VARCHAR(106) NOT NULL, email VARCHAR(100) NOT NULL, PRIMARY KEY ( id ) ,FOREIGN KEY (domain_id) REFERENCES virtual_domains(id));" mailserver
mysql --user="mailuser" -p -e "CREATE TABLE virtual_aliases( id INT NOT NULL AUTO_INCREMENT, domain_id INT NOT NULL, source VARCHAR(100) NOT NULL, destination VARCHAR(100) NOT NULL, PRIMARY KEY ( id ),FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) );" mailserver

each time supplying the password you gave for the mysql mailuser user.

Adding Domain Entries

To add entries to the virtual_domains table using the mysql client:

mysql -p mailserver
mysql> INSERT INTO virtual_domains SET id=NULL, name='my-domain.com';
quit

This table must include entries for each domain served by your virtual mail server.

You should add at least the following rows:

The domain name - my-domain.com

The hostname - darkstar

The FQDN of the host - darkstar.my-domain.com

The localhost.domain variant - localhost.my-domain.com

To see the current rows in this table using the mysql client:

mysql> SELECT * FROM virtual_domains;
+----+-------------------------+
| id | name                    |
+----+-------------------------+
|  1 | my-domain.com           |
|  2 | darkstar                |
|  3 | darkstar.my-domain.com  |
|  4 | localhost.my-domain.com |
+----+-------------------------+

Note the automatically generated id value for the domain itself, my-domain.com, it will be used when we enter user mail boxes and mail box aliases.

Adding User Mail Box Entries

To add entries for each mail box, you will need the domain id from the previous step for the corresponding domain name.

We do not store the user passwords as plain text in the database, instead we will generate an SHA512 hash of the passwords, used by dovecot for authentication.

To insert a virtual user mailbox from the mysql client, substitute the domain id, actual password and email into the following query:

mysql> INSERT INTO virtual_users SET
id=NULL,
domain_id=1,
password=ENCRYPT('user-password', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))),
email='me@my-domain.com';

To see currently assigned mail boxes for a domain (with password column suppressed):

mysql> SELECT U.id, domain_id, email FROM virtual_domains D
JOIN virtual_users U ON(U.domain_id=D.id) WHERE name='my-domain.com';
+----+-----------+-------------------+
| id | domain_id | email             |
+----+-----------+-------------------+
|  1 |         1 | me@my-domain.com  |
|  2 |         1 | you@my-domain.com |
|  3 |         1 | us@my-domain.com  |
+----+-----------+-------------------+

To reset the password for an email user, substitute the new password and email values into this query:

mysql> UPDATE virtual_users SET
password=ENCRYPT('new-password', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16)))
WHERE email='me@my-domain.com';

Adding Mail Box Alias Entries

To add entries for each mail box alias, you will again need the domain id corresponding to the domain name of the alias.

To insert a virtual mailbox alias using the mysql client:

mysql> INSERT INTO virtual_aliases SET
id=NULL,
domain_id=1,
source='alias@my-domain.com',
destination='you@my-domain.com';

In the example given, mail sent to alias@my-domain.com will be accepted and delivered to you@my-domain.com.

To see current aliases in the database:

mysql> SELECT A.id, domain_id, source, destination FROM virtual_domains D
JOIN virtual_aliases A ON(A.domain_id=D.id) WHERE name='my-domain.com';
+----+-----------+---------------------+-------------------+
| id | domain_id | source              | destination       |
+----+-----------+---------------------+-------------------+
|  1 |         1 | alias@my-domain.com | you@my-domain.com |
+----+-----------+---------------------+-------------------+

Go ahead and enter a few virtual email users, and maybe an alias or two, so that you will have working accounts to test with after we set up postfix and dovecot.

For troubleshooting, use the queries shown above to verify the domains, email users and aliases in the database at any time, and to reset virtual user passwords. Return to main article page[3877]

Sources

Originally written by astrogeek[3878]

howtos, email, postfix, dovecot, mysql

Firewall Rules For Virtual Mail Server

This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3879]

A firewall is simply a set of kernel routing rules, iptables rules, that selectively block or allow network traffic into and out of your machine. A web facing email server must be secured by a suitable set of firewall rules or it will quickly be overwhelmed and compromised!

If you already have a firewall in place for other services then you will need to add to it the rules necessary to support mail server traffic. If you do not have a firewall currently in place, then you may use the example below as a good starting point!

Loading only the rules below as your firewall will close other access that may be important to you such as http and ssh! You should first use iptables -L to check for pre-existing rules and merge those below into your existing firewall. If you have no existing firewall and/or need to allow http and ssh, uncomment the –policy lines and those for http and ssh as necessary to meet your requirements.

Following is a minimal set of iptables rules to provide a firewall for your email server. While

#--policy INPUT DROP
#--policy FORWARD DROP
#--policy OUTPUT ACCEPT
-A INPUT -m state --state INVALID -j DROP
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
# Postfix SMTP, SMTPS, SUBMISSION
-A INPUT -p tcp --dport 25 -m state --state NEW -j ACCEPT
-A INPUT -p tcp --dport 465 -m state --state NEW -j ACCEPT
-A INPUT -p tcp --dport 587 -m state --state NEW -j ACCEPT
# Imap and ImapS
#-A INPUT -p tcp --dport 143 -m state --state NEW -j ACCEPT
-A INPUT -p tcp --dport 993 -m state --state NEW -j ACCEPT
# Pop3 and Pop3S
#-A INPUT -p tcp --dport 110 -m state --state NEW -j ACCEPT
-A INPUT -p tcp --dport 995 -m state --state NEW -j ACCEPT
#  Allow HTTP and HTTPS connections from anywhere on normal ports
#-A INPUT -p tcp --dport 80 -j ACCEPT
#-A INPUT -p tcp --dport 443 -j ACCEPT
#  Allow SSH connections on normal port 22
#-A INPUT -p tcp -m state --state NEW --dport 22 -j ACCEPT
#  Respond to ping requests
#-A INPUT -p icmp --icmp-type echo-request -j ACCEPT
#  Drop all other inbound
-A INPUT -j DROP

Port 25, SMTP, must be enabled in order to accept incoming email for delivery to your virtual mail boxes.

Port 465, SMTPS, must be enabled for secure SMTP connections.

Port 587, SUBMISSION, is used by Mail User Agents (MUAs) such as Thunderbird to allow submission of outgoing email from your virtual users.

Ports 143 and 110 provide plain text Imap and POP3 connections, rescpectively. It is probably best not to use these and to force all Imap and Pop3 connections to be secure, as we will do in this article. If not used it is best to comment them out of your iptables rules as is shown here.

Ports 993 and 995 provide secure Imap and Pop3, respectively. These must be open in order for your virtual users to be able to send and receive email.

To install these rules as your firewall save them to a text file using

iptables-save >/etc/firewall.rules

then load that file using iptables-restore as shown below. This will replace any currently existing iptables rules with those in the file.

There are many preferences for saving and loading firewall scripts. I generally use /etc/firewall.rules for my own systems and will use that for this example.

iptables-restore </etc/firewall.rules

To see all currently active rules:

iptables -L

To flush all current rules:

iptables -F

To load your firewall rules at each boot, you will need to create a start script and save it to /etc/rc.d/rc.firewall and make it executable. This file will then be started by /etc/rc.d/rc.inet2 when your system boots, before your network devices are started.

You may choose to create a more complete script with start and stop options, but the following simple script is sufficient to load your firewall rules at boot.

vi /etc/rc.d/rc.firewall
# add the following lines #
if [ -e /etc/firewall.rules ]; then
iptables-restore </etc/firewall.rules
fi

Make sure rc.firewall is executable…

chmod +x /etc/rc.d/rc.firewall

Load your firewall rules and make sure they are as you expect them to be before continuing. Also, be certain that your firewall actually loads at boot to prevent accidentally running without it!

iptables-restore </etc/firewall.rules
iptables -L

Return to main article page[3880]

Sources

Originally written by astrogeek[3881]

howtos, email, postfix, dovecot, firewall

Creating Required Users and Groups

This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL[3882]

You will need to create a few special users and groups to be able to build and/or run your mail server components.

We will use the SBo assigned uid and gid for each user and group.

To prepare to build or install postfix, execute the following commands on the target machine:

groupadd -g 200 postfix
useradd -u 200 -d /dev/null -s /bin/false -g postfix postfix
groupadd -g 201 postdrop

To prepare to build or install dovecot, execute the following commands on the target machine:

groupadd -g 202 dovecot
useradd -d /dev/null -s /bin/false -u 202 -g 202 dovecot
groupadd -g 248 dovenull
useradd -d /dev/null -s /bin/false -u 248 -g 248 dovenull

Additionally, we must create a user, group and target directory for the virtual mail functions. There is no recommended uid/gid for these but a common choice for both is 5000. You may wish to change these to suit your own environment.

Execute the following commands on the install machine (these are not necessary when building):

groupadd -g 5000 vmail
useradd -d /var/vmail -s /bin/false -u 5000 -g 5000 vmail
mkdir -p /var/vmail/vhosts
chown -R vmail:vmail /var/vmail

To test whether these users or groups already exist on a machine, substitute the user or group names into the respective commands:

cat /etc/passwd |grep ^postfix
cat /etc/group |grep ^postdrop

If the corresponding name exists it will be shown, otherwise you will see only an empty prompt in response.

For troubleshooting you should verify that each user and group is defined on your machine as shown here.

Return to main article page[3883]

Sources

Originally written by astrogeek[3884]

howtos, email, postfix, dovecot

Setup Apache, PHP and MySQL

In order to configure your Slackware Linux box as a MySQL-PHP -ready web server, please follow these instructions:

Install the Apache (httpd), php and MySQL packages from the Slackware discs or Slackpkg.

Fix php time zone (many apps will complain about this if you don't do it). Edit '/etc/httpd/php.ini' and find the following line and uncomment it:

date.timezone = America/Chicago <--change to correct time zone

As the root user, open the '/etc/httpd/httpd.conf' Apache configuration file with your preferred text editor. Then, find the following line and uncomment it (delete the '#' character at the start of the line):

Include /etc/httpd/mod_php.conf

Now your Apache will include the PHP module when it starts.

Set a server name (if your machine's IP doesn't resolve to a name). Edit the '/etc/httpd/httpd.conf' and uncomment the following line:

ServerName www.example.com:80 <--change www.example.com to an IP or your machine's name

Optionally (but recommended), you can configure Apache to use an 'index.php' file as your directory index. You just have to search the following line…:

Optionally 2, if you use Perl for web scripts, you may want to add 'index.pl' also.

  <IfModule dir_module> DirectoryIndex index.html </IfModule>

… and change it to:

  <IfModule dir_module> DirectoryIndex index.html index.php </IfModule>

Please note the 'index.php' part added. You can now save and close your '/etc/httpd/httpd.conf' file and restart your Apache server in order to have your modifications applied. As root, execute:

apachectl restart

If you want your Apache server to start automatically when you start your box, you can change the permissions of the '/etc/rc.d/rc.httpd' file. Execute the following command as root:

  * chmod 755 /etc/rc.d/rc.httpd

Now your Apache server will start automatically when your system boots.

In order to configure your MySQL installation, please see the Install MySQL On Slackware[3778] doc.

Final Considerations

Normally you would want to test your recent changes in order to know if they have worked. After restarting Apache, create a 'test.php' file on your '/var/www/htdocs/' directory with the following:

<?php phpinfo(); ?>

Now you can open your favorite web browser to the following URL: http://localhost/test.php[3779] . If you your PHP installation's settings are displayed, then you have configured your Apache correctly, otherwise, please re-check this documentation (getting sure you have followed every step correctly), or contact us at ##slackware on FreeNode.

Sources

Original source: http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux[3780]

Originally written by User Pavel E.[3781]

howtos, apache, php, author pavel

DHCP Server via DNSMasq

To set up a DHCP server you can use the dhcp package (included with Slackware)
or
you can do it the easier way and use DNSMasq (also included with Slackware).

Assuming that you do not have DNSMasq installed:

Install the official dnsmasq Slackware package either by pkgtool[3782] or slackpkg[3783].

Make DNSMasq start on boot:

# chmod  755 /etc/rc.d/rc.dnsmasq

(At this point you will have a really cool little DNS on your box but, that's not what we're going after here…)
If you already had DNSMasq running on your box, start here:

Edit the /etc/dnsmasq.conf file:

CHANGE:
#dhcp-range=192.168.0.50,192.168.0.150,255.255.255.0,12h
TO:
dhcp-range=1ST_POOL_IP,LAST_POOL_IP,12h  (using your correct IP range)

If your DNSMasq box isn't also your gateway router, tell your DHCP clients who is the default gateway:

CHANGE:
#dhcp-option=3,1.2.3.4
TO:
dhcp-option=3,YOUR_GATEWAY_IP

Start/restart DNSMasq:

# /etc/rc.d/rc.dnsmasq restart

You should now have a working DHCP server.

Persistent IP addresses

To assign IP addresses based on a device's MAC address, edit the file /etc/dnsmasq.conf and add the following line for every device (using the correct MAC and IP address of course):

#EXAMPLE:
dhcp-host=11:22:33:44:55:66,192.168.1.61

NOTE: The IP address should be outside the DHCP address pool.

Sources

Originally written by arfon[3784]

howtos, software, dhcp, dhcpd, dnsmasq, author arfon

Installing OpenWebMail in Slackware64 14.0

This article explains how to install OpenWebmail and configure it so that you can access your mailbox using a web interface from any place with internet access and a webbrowser available.
These instructions were tested on Slackware64 14.0 64-bit OS and the latest openwebmail-current.tar.gz (actually version 2.53)
It means, you are configured and running Apache web server and Sendmail mailserver.

Install libraries and required packages

Using CPAN via CPAN.pm:

perl -MCPAN -e shell                    [as root]
o conf prerequisites_policy ask

then:

install CGI
install Compress:Zlib
install Convert::ASN1
install Digest
install Digest::MD5
install IO::Socket::SSL
install MIME::Base64
install Net::SSLeay
install Text::Iconv
quit

Install OpenWebMail

First, download latest openwebmail: openwebmail-current.tar.gz[3785]

Create a directory wherever you want it, say “/ADISKS/openwebm_inst” and move the downloaded file “openwebmail-current.tar.gz” into that directory.

Extract all files using the command

tar -zxvBpf openwebmail-current.tar.gz

Use “tar” with “-zxvBpf” option, due to strange file permissions inside that archive. I tried to untar it via midnight comander built-in archive tools, ans the wrapsuid script would not work because of this…

Move the extracted directory “cgi-bin/openwebmail” to “/var/www/cgi-bin/openwebmail”

Move the extracted directory “data/openwebmail” to your webserver's DocumentRoot (in a default Apache configuration, that will be “/var/www/openwebmail”)

Change directory to “/var/www/openwebmail”, delete the file index.html and run the command

ln -s redirect.html index.html

Change directory to “/var/www/cgi-bin/openwebmail” and run the command

perl misc/tools/wrapsuid/wrapsuid.pl /var/www/cgi-bin/openwebmail

You should see the following output:

Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-folder.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-main.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-read.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-send.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-cal.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-webdisk.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-advsearch.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-abook.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-viewatt.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-vdomain.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-saprefs.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-prefs.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-tool.pl
Fixing /tmp/openwebmail/cgi-bin/openwebmail/openwebmail-spell.pl

Then go to “/var/www/cgi-bin/openwebmail/etc” and edit the configuration files:

Change “openwebmail.conf” according to:

domainnames             auto
auth_module             auth_unix.pl
mailspooldir            /var/spool/mail
ow_cgidir               /var/www/cgi-bin/openwebmail
ow_cgiurl               /cgi-bin/openwebmail
ow_htmldir              /var/www/openwebmail
ow_htmlurl              /
logfile                 /var/log/openwebmail.log

Change directory to “/var/www/cgi-bin/openwebmail/etc/defaults”, edit auth_unix conf to become

passwdfile_plaintext    /etc/passwd
passwdfile_encrypted    /etc/shadow
passwdmkdb              none

In directory “/var/www/cgi-bin/openwebmail/etc/defaults”, edit db.conf as follows:

dbm_ext                 .db
dbmopen_ext             .db
dbmopen_haslock         no

Then, change directory to “/var/www/cgi-bin/openwebmail” and run

./openwebmail-tool.pl --init

After that, go to “/var/www/cgi-bin/openwebmail”, check that there are files starting with a dot (like “.openwebmail.pl”) and old-style filenames (like “openwebmail.pl)”. Set the suid bit for these scripts:

chmod u+s openwebmail*.pl
chmod u+s .openwebmail*.pl

Apache additional configuration

Add a AddHandler cgi-script .cgi .pl option in /etc/httpd/httpd.conf in section “Directory /srv/httpd/” httpd.conf like be:

ServerRoot "/usr"
Listen 80
LoadModule authn_file_module lib64/httpd/modules/mod_authn_file.so
LoadModule authn_core_module lib64/httpd/modules/mod_authn_core.so
LoadModule authz_host_module lib64/httpd/modules/mod_authz_host.so
LoadModule authz_groupfile_module lib64/httpd/modules/mod_authz_groupfile.so
LoadModule authz_user_module lib64/httpd/modules/mod_authz_user.so
LoadModule authz_core_module lib64/httpd/modules/mod_authz_core.so
LoadModule access_compat_module lib64/httpd/modules/mod_access_compat.so
LoadModule auth_basic_module lib64/httpd/modules/mod_auth_basic.so
LoadModule reqtimeout_module lib64/httpd/modules/mod_reqtimeout.so
LoadModule filter_module lib64/httpd/modules/mod_filter.so
LoadModule mime_module lib64/httpd/modules/mod_mime.so
LoadModule log_config_module lib64/httpd/modules/mod_log_config.so
LoadModule env_module lib64/httpd/modules/mod_env.so
LoadModule headers_module lib64/httpd/modules/mod_headers.so
LoadModule setenvif_module lib64/httpd/modules/mod_setenvif.so
LoadModule version_module lib64/httpd/modules/mod_version.so
LoadModule proxy_module lib64/httpd/modules/mod_proxy.so
LoadModule proxy_connect_module lib64/httpd/modules/mod_proxy_connect.so
LoadModule proxy_ftp_module lib64/httpd/modules/mod_proxy_ftp.so
LoadModule proxy_http_module lib64/httpd/modules/mod_proxy_http.so
LoadModule proxy_fcgi_module lib64/httpd/modules/mod_proxy_fcgi.so
LoadModule proxy_scgi_module lib64/httpd/modules/mod_proxy_scgi.so
LoadModule proxy_ajp_module lib64/httpd/modules/mod_proxy_ajp.so
LoadModule proxy_express_module lib64/httpd/modules/mod_proxy_express.so
LoadModule lbmethod_byrequests_module lib64/httpd/modules/mod_lbmethod_byrequests.so
LoadModule lbmethod_bytraffic_module lib64/httpd/modules/mod_lbmethod_bytraffic.so
LoadModule lbmethod_bybusyness_module lib64/httpd/modules/mod_lbmethod_bybusyness.so
LoadModule mpm_event_module lib64/httpd/modules/mod_mpm_event.so
LoadModule unixd_module lib64/httpd/modules/mod_unixd.so
LoadModule status_module lib64/httpd/modules/mod_status.so
LoadModule autoindex_module lib64/httpd/modules/mod_autoindex.so
##openwebmail!
LoadModule cgi_module lib64/httpd/modules/mod_cgi.so
LoadModule dir_module lib64/httpd/modules/mod_dir.so
LoadModule alias_module lib64/httpd/modules/mod_alias.so
<IfModule unixd_module>
User apache
Group apache
</IfModule>
# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition.  These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
ServerAdmin webmaster@sten.lv
ServerName elephant.org
<Directory />
AllowOverride None
</Directory>
DocumentRoot "/srv/httpd/"
<Directory "/srv/httpd/">
Options Indexes FollowSymLinks Includes MultiViews ExecCGI
AllowOverride All
#None
#
# Controls who can get stuff from this server.
#
##    Require all granted
Order allow,deny
Allow from all
###Need! otherwise "save as binary...." appear...
AddHandler cgi-script .cgi .pl
</Directory>
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.shtml index.php
</IfModule>
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<Files ".ht*">
Require all denied
</Files>
ErrorLog "/var/log/httpd/error_log"
LogLevel warn
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
# You need to enable mod_logio.c to use %I and %O
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
#
##CustomLog "/var/log/httpd/access_log" common
#
CustomLog "/var/log/httpd/access_log" combined
</IfModule>
<IfModule alias_module>
#
ScriptAlias /cgi-bin/ "/srv/httpd/cgi-bin/"
</IfModule>
<IfModule cgid_module>
#
#    Scriptsock cgisock
</IfModule>
#
# "/srv/httpd/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
##<Directory "/srv/httpd/cgi-bin">
##    AllowOverride None
##    Options None
##    Require all granted
##</Directory>
#for openwebmail
<Directory "/srv/httpd/cgi-bin">
AllowOverride All
Options ExecCGI
Order Allow,deny
Allow from all
</Directory>
<IfModule mime_module>
#
TypesConfig /etc/httpd/mime.types
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
#
##    AddHandler cgi-script .cgi .pl
# for openwebmail
##    AddHandler cgi-script .pl
#test openwebmail
##AddHandler server-parsed  .html
###AddHandler server-parsed  .pl
</IfModule>
# Virtual hosts
Include /etc/httpd/httpd-vhosts.conf
# Various default settings
Include /etc/httpd/extra/httpd-default.conf
# Configure mod_proxy_html to understand HTML4/XHTML1
<IfModule proxy_html_module>
Include /etc/httpd/extra/proxy-html.conf
</IfModule>
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>
# Deal with user agents that deliberately violate open standards
#
<IfModule setenvif_module>
BrowserMatch "MSIE 10.0;" bad_DNT
</IfModule>
<IfModule headers_module>
RequestHeader unset DNT env=bad_DNT
</IfModule>
# Uncomment the following line to enable PHP:
#
Include /etc/httpd/mod_php.conf

Links

http://www.linuxquestions.org/questions/slackware-14/suidperl-in-slack-14-a-4175450139/[3786]

http://openwebmail.org/openwebmail/doc/faq.txt[3787]

http://openwebmail.org/openwebmail/doc/readme.txt[3788]

http://www.unixresources.net/linux/lf/45/archive/00/00/01/69/16969.html[3789]

http://mail.savs.hcc.edu.tw/~chuavv/articles/openwebmail-en.html[3790]

http://search.cpan.org/search?query=CGI&mode=all[3791]

http://svn.apache.org/repos/asf/spamassassin/branches/3.3/INSTALL[3792]

Sources

With help of user phenixia2003 from LinuxQuestions.org Forums

Thanks for editing Eric Hameleers[3793]

Originally written by John Ciemgals[3794]

howtos, author wisedraco

Wake-on-LAN

Wake-on-LAN (or WOL) is a standard by which a machine can be powered on remotely via a network connection. This is done by sending a so-called magic packet to the network card of the remote machine. When properly configured, the remote machine will then boot.

Most recent desktop computers support this, but it will likely be switched off by default. On very old machines, you may need to run a special cable from the network card to the motherboard.

Configure the BIOS

The Wake-on-LAN option must be enabled in the BIOS. Unfortunately these settings are not standardized. Check the motherboard documentation. Browse the BIOS menu. The option may not be called Wake-on-LAN, but something like 'Power On By PCI Device'. This varies greatly from board to board and some experimentation may be needed.

Configure the network card

Assuming the first network port is connected, use ethtool to check the card settings:

# ethtool eth0 | grep -i wake-on
Supports Wake-on: pg
Wake-on: d

The supports line shows all options that are supported on the card. The option to look for is g, which means wake on magic packet. If the g option is not present, you are out of luck.

The Wake-on line shows the current options in use. If this shows d, it means wake-on is currently disabled.

To enable wake-on, use

# ethtool -s eth0 wol g

This will most likely not survive a reboot, so to switch this option on again at the next boot, add the command to /etc/rc.d/rc.local:

rc.local

echo "Setting Wake-on-LAN to Enabled"
/usr/sbin/ethtool -s eth0 wol g

Finally, we need to note the MAC address of the network card we just prepared:

# ip addr show eth0 | grep -i ether
link/ether 20:cf:30:1f:e3:a4 brd ff:ff:ff:ff:ff:ff

Waking up the machine

Now we need a special command on a different machine to send a magic packet. The wol command is available from slackbuilds.org[3795]. This can be called by a regular user. At a minimum it needs the MAC address of the remote machine; for example:

$ wol 20:cf:30:1f:e3:a4

On a multihomed host, like a router, use the host option to specify the hostname or ip address of the remote host. This will broadcast the magic packet on the correct subnet:

$ wol -i hostname 20:cf:30:1f:e3:a4

Sources

Originally written by Frank Donkers[3796]

howtos, wol, wake, author fdonkers

Configuring a Wireless Access Point

Work in Progress

This Howto explains how you can use your computer as a Wireless Accesspoint.
This means if the computer has an Internet connection and a wireless interface, other computers can use it's internet connection via wlan.
This is a very limited setup, it can be expanded with DHCP, DNS and a firewall, but this subjects can be found in other Howtos here at SlackDocs.

Requirements

The package hostapd is available at slackbuilds.org[3797]. It provides a daemon who listens on the wireless interface and allows the clients to authenticate.

Configuring hostapd

The configuration of hostapd is done in the file /etc/hostapd/hostapd.conf, here an example

# the wireless interface
interface=wlan0
# the driver -- there are other settings possible, but very likely the following works
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
# The SSID -- i.e. the name of the wireless network (which will be shown when you scan for available networks)
ssid=yourwlannamehere
country_code=DE
# check the manpage for hostapd and your hardware for the mode
hw_mode=g
channel=7
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1
wpa=1
# The WPA2 key
wpa_passphrase=your very secret passphrase here
# the next settings refer to the settings in the clients wpa_supplicant.conf
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP

Be sure to read the manpage for hostapd

Configuring the client

In this Howto I'll only describe a minimal setup with a static IP-configuration.

ip-adress: 192.168.45.10
subnetmask: 255.255.255.0
gateway: 192.168.45.1

Since we have (in this minimal configuration) no DNS-server running in our network, you'll have to configure your client with the same DNS-server that your Accesspoint is using (look at /etc/resolv.conf).

IP_forwarding and routing

Enable IP forwarding

echo "1" > /proc/sys/net/ipv4/ip_forward

Internet Connection Sharing

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

In this case eth0 is the interface which is connected to the internet. If your computer has a connection via ppp you shouls use ppp0 instead of eth0.

Starting the Accesspoint

ifconfig wlan0 192.168.45.1 up
/etc/rc.d/rc.hostapd start

The first line starts wlan0 with IP-adress 192.168.45.1, the second line starts the daemon.

Sources

* Originally written by Markus Hutmacher[3798]

howtos, wifi,, accesspoint,, routing,, iptables

Using a Scanner in a Network

This Howto describes how one can use a scanner which is connected to another Slackware-computer over the network.

Necessary Software

All packages which are necessary are available in a stock Slackware-installation. This are sane and xsane for the scanner. Also the internet super-server daemon inetd is used (on the scannerserver) to listen to the network for scanner-job.

Permissions

I have an older Multifunction-device HP-PSC-1410 which is connected via USB to my server. In order to use the device for scanning (locally or over the network) one has to be member of the scanner as well as the lp-group. Note that any user who is added with Slackware's adduser command, is member of this groups by default.

Configuration of the server

One has to edit the /etc/sane.d/saned.conf file. Since the inetd is used to listen to the network the only part one has to configure is the “Access-List”. It lists the IP-adresses of the computers which are allowed to access the scanner. It is possible to list single IP-Adresses or the adress of the whole subnet, here I use

192.168.98.0/24

In the /etc/inetd.conf file one needs a line

sane-port    stream    tcp    nowait    root.root    /usr/sbin/saned    saned

Be sure to have the following line in your /etc/services file

sane-port          6566/tcp

Afterwards you will have to restart the inetd-daemon

/etc/rc.d/rc.inetd restart

Testing the network-settings for the server

With the nmap command one can scan the ports and find out if the sane-port is open, sane uses port 6566

Samsung ~ # nmap -p 6566 192.168.178.10
Starting Nmap 5.21 ( http://nmap.org ) at 2010-11-29 19:54 CET
Nmap scan report for srv-zuhause.home.local (192.168.98.10)
Host is up (0.0031s latency).
PORT     STATE SERVICE
6566/tcp open  unknown
MAC Address: xx:xx:xx:xx:xx:xx (xx Computer)
Nmap done: 1 IP address (1 host up) scanned in 0.23 seconds

The command can be executed on the server as well as any client, the ip-adress is the one of the server!

Configuration of the client(s)

On the client one has to edit the /etc/sane.d/net.conf file and add a line with the IP-adress of the server.

#/etc/sane.d/net.conf
192.168.98.10

Theoretically it is possible to insert the DNS-name of the server (instead of it's IP-adress) in the net.conf file, but it didn't work here.

Also be sure that in the file /etc/sane.d/dll.conf is a line with the word “net”

#/etc/sane.d/dll.conf
# enable the next line if you want to allow access through the network:
net
...

Testing the client-configuration

With the command scanimage -L we can check if the scanner is recognized by the system

markus@Samsung ~ $ scanimage -L
device `net:192.168.98.10:hpaio:/usb/PSC_1400_series?serial=CN619D724804DZ' is a Hewlett-Packard PSC_1400_series all-in-one.

Now if you open xsane on the client you should be able to use the scanner.

Sources

* Originally written by Markus Hutmacher[3799]

howtos, network, scanner, sane, inetd, multifunction, device, author markush

NFS Root

Introduction

This HOWTO is about running your Slackware Linux system without any hard disk - or perhaps with a very small hard disk - accessing the network to retrieve all files except the kernel. If you want to go the whole hog you can PXE-boot the kernel too, however this HOWTO expects you to have somewhere local to store the kernel. We're going to use VirtualBox virtual machines to simulate a diskless client. We'll still use a full Linux install along with our trusty LILO to prepare and then boot that kernel. This may seem a bit pointless, as there is no use-case for exactly what I'm doing here, but it should at least educate as to how you go about getting NFS root, and some of the pitfalls and workarounds.

Running an NFS server

Of course you need an NFS server to serve the root files from. I'm going to call this slack-nfs-server. The IP address is 172.17.0.80. There is a a great article[3800] on setting up an NFS server. Following that, create your server using Virtual Box (with bridged networking), and then come back here for the next step.

The /etc/exports I'm using looks like this:

/nfs_share 172.17.0.1/24(rw,sync,no_root_squash,no_subtree_check)

That's insecure but good enough for the setup, we can refine it later. In addition to that guide it's worth doing:

chmod 777 /nfs_share

In order that we can be sure we can write to the root of our NFS share once it's mounted.

Creating the rootfs

Now create another virtual machine to do the install (bridged networking again). Mount the Slackware install disk on this virtual machine. If you want a 32-bit rootfs, obviously use the 32-bit install DVD, if you want a 64-bit rootfs, use Slackware64. If you do want 32-bit (quite likely for a diskless client) you may need to enable PAE in VirtualBox under System → Processor to get Slack32 to boot.

Assuming you now have the Slackware installer booted using the default huge kernel you can now start the install. Login as root, and get your IP address:

# dhcpcd eth0

Mount the nfs share you previously created on /mnt:

# mount -o rw,nolock slack-nfs-server:/nfs_server /mnt

If you don't have DNS setup that's fine, just substitute the IP address of your server for slack-nfs-server, i.e. 172.17.0.80.

Now we need to fudge something for the Slackware installer. Using fdisk, create a single partition on your hard disk (/dev/sda1). Unfortunately a valid partition on a drive connected to the system is a requirement for the installer to run. Don't worry, we'll just delete this entire virtual machine when we're done so it's no biggie.

Now run 'setup'.

Remap keyboard as you want

Don't configure any swap.

At the screen 'Select Linux installation partition' don't select /dev/sda1 just down-arrow and select '(done adding partitions, continue with setup)'.

Install from the slackware cd/dvd

Select your packages as normal

Don't create a bootdisk

Don't install LILO.

When done you should now find a root fs 'installed' to the server directory. If you plan to use it with more than one thin client, then now would be a good time to take a backup copy before the first boot into it.

Creating the kernel

The full huge kernel that comes with Slackware 14.2 is close to providing everything we need, but we still need to recompile it. I'd recommend doing the compilation on a 32-bit virtual machine if you are targeting a 32-bit thin client, or 64-bit if your thin client is 64-bit. There are ways to avoid this and cross-compile kernels 32→64 bit and visa versa but virtual machines are cheap and life is short:

# cd /usr/src/linux
# zcat /proc/config.gz > .config
# make menuconfig

Configuration order is important, as selecting certain options makes others available. First off we will need a network driver compiled into the kernel for the NIC we're going to use. For VirtualBox the default NIC is PCnet32, an lspci will probably tell you yours:

Device Drivers -> Network Device Support -> Ethernet driver support -> AMD PCnet32 PCI support <*>

Make sure this is compiled into the kernel (e.g. hitting 'y').

[OPTIONAL] We also need to tell the kernel which IP address to use, which can be set statically, but DHCP is much easier, so generally you will want to include these options:

Networking support -> Networking options -> IP: kernel level autoconfiguration [*]
IP: DHCP support [*]

Finally, we absolutely need the support for Root FS on NFS:

File Systems -> Network File systems -> Root file system on NFS [*]

[OPTIONAL] It's pretty useful to append a local version to this kernel release. I'd advise doing this to differentiate it from your standard Slackware huge kernel and avoid clobbering the modules from that by mistake. We can just add '-nfsroot':

(-nfsroot) General Setup -> Local version - append to kernel release

Save the configuration and then do a:

# make bzImage

While that build is running, it's time to configure LILO.

Configuring LILO

Let's call the kernel /boot/vmlinuz-nfsroot. Add a section to the lilo.conf file:

image=/boot/vmlinuz-nfsroot
label = nfs
read-only
append= "root=/dev/nfs ip=dhcp nfsroot=172.17.0.80:/nfs_share,v3 rw"

If you didn't want to use dhcp you'll now need to have a read of Documentation/filesystems/nfs/nfsroot.txt in the kernel sources to figure out the many options that you can include for ip= other than 'dhcp'.

Obviously keep your default linux kernel in another image= section so you can switch between booting the nfsroot and the normal kernel to play around with this stuff.

You cannot specify a normal root= entry in this section because LILO doesn't recognise /dev/nfs for root (the device doesn't actually exist to LILO). So instead just specify it in the append= line which LILO doesn't try to interpret, and LILO will include this extra nfsroot image without error.

The v3 seems to be really important in making anything at all happen on boot. If that isn't set, no communication seems to occur.

The 'rw' is also important. It prevents the fsck of the root fs. because root is NFS and can't be checked. Slackware won't boot properly if we give 'ro'. Instead of using 'rw' you could optionally hack fsck out of the Slackware startup scripts on your NFS root, however simply using 'rw' is quicker (albeit dirtier).

With the kernel compilation finished, copy the kernel into the /boot directory and rename it:

cp /usr/src/linux/arch/x86/boot/bzImage /boot/vmlinuz-nfsroot

It may be created elsewhere than arch/x86 depending on your architecture, e.g. x64, arm.

Don't forget to run LILO:

# lilo

First Boot

The above is enough to get you a booting Slackware system, or should be. There are some additional steps that you may wish to now do.

Modules

None of the modules have been installed, let's add them. Shutting down the nfsroot system and booting back into the Slackware kernel compilation virtual machine we can now compile the missing modules. First we will mount the rootfs, just as we did from the installer virtual machine:

mount -o rw,nolock slack-nfs-server:/nfs_share /mnt/tmp

Then we can compile and install the modules:

# cd /usr/src/linux
# make modules
# make modules_install INSTALL_MOD_PATH=/mnt/tmp

For the last command, avoid adding a trailing slash to /mnt/tmp, and try not to forget the INSTALL_MOD_PATH, otherwise you may have just clobbered your system modules. If you gave your kernel a local suffix (e.g. -nfsroot) you'd have been protected against that.

Swap on NFS

You can create a swap file on your NFS share somewhere like this:

# dd if=/dev/zero of=/nfs_share/swapfile bs=1024 count=64k

Then format it for swap:

# mkswap /nfs_share/swapfile

Then on the client you associate a loopback device with the file:

# losetup /dev/loop0 /swapfile

Then start using the loopback device for swap:

# swapon /dev/loop0

Obviously you need to add the last two commands to /etc/rc.d/rc.local or another startup script to run on each boot.

Locking down /etc/exports

Assuming your thin client connects from a predictable address, now that we've installed the modules we can finally lock down access to only the thin client (/etc/exports on the server):

/nfs_share 172.17.0.81/32(rw,sync,no_root_squash,no_subtree_check)

And we presumably don't want all-and-sundry using our newly prepared rootfs directory, so drop it down a level and qualify it by IP address (on the server):

# cd /
# mv nfs_share 172.17.0.81
# mkdir nfs_share
# mv 172.17.0.81 nfs_share

Now over on the client machine, configure LILO so nfsroot requests the nfs share based on the client's IP address with '%s':

image=/boot/vmlinuz-nfsroot
label = nfs
read-only
append= "root=/dev/nfs ip=dhcp nfsroot=172.17.0.80:/nfs_share/%s,v3 rw"

NFS Root is never going to be considered secure, but at least this makes cross-contamination of nfsroots less likely.

Note that I am using dhcp in the above example, but I've added an entry to /etc/dnsmasq.conf on my router mapping the thin client MAC address to the IP address 172.17.0.81 so the client always gets that address.

Sources

Originally written by User bifferos[3801]

howtos, nfs, author bifferos

Synchronize your network with NTP

NTP (Network Time Protocol) allows clock synchronization between computer systems. The following HOWTO describes:

configuring an NTP server on Slackware Linux;

synchronizing client PCs with your local NTP server.

Introduction

When several users manipulate shared data on different client PCs on a network, it's important that these machines are all synchronized. This is especially true if you share files over NFS, or if you use NIS for centralized authentication. You'll get all sorts of weird errors if your clocks are out of sync. Unfortunately, the clients' onboard clocks aren't sufficiently precise.

That's where NTP (Network Time Protocol) comes in handy. It allows networked machines to adjust their clocks so as to be perfectly synchronized. A series of public time servers on the Internet allow the reception of the exact time. From this point, we can use NTP in several ways.

The ntpdate command makes an initial correction of the BIOS clock.

This one-time-adjustment isn't sufficient for a server that is supposed to be up 24/7, since its clock will drift away gradually from the exact time. In that case, we have to configure the ntpd daemon (shipping with the ntp package). This daemon contacts public time servers at regular intervals and proceeds with incremental corrections of the local clock.

The ntpd daemon can in its turn be configured as a time server for the local client machines.

It's considered good practice to use ntpdate for the initial adjustment and ntpd for regular time synchronization.

Firewall considerations

The NTP services uses UDP port 123. Open this port if you want to allow remote machines to connect to your NTP server.

Synchronize a LAN server or a public root server with an NTP server on the Internet

Create an empty log file:

# touch /var/log/ntp.log

Visit http://www.pool.ntp.org[3802] and choose a list of servers according to your country.

Configure the NTP service by editing /etc/ntp.conf. You might backup the existing ntp.conf file and start from scratch.

In the example below, the list of four servers is chosen for my company's location (France):

# /etc/ntp.conf
driftfile /etc/ntp/drift
logfile /var/log/ntp.log
server 0.fr.pool.ntp.org
server 1.fr.pool.ntp.org
server 2.fr.pool.ntp.org
server 3.fr.pool.ntp.org
server 127.127.1.0
fudge 127.127.1.0 stratum 10
restrict default nomodify nopeer notrap
restrict 127.0.0.1 mask 255.0.0.0

Here's a little explanation for some options:

The fudge 127.127.1.10 stratum 10 directive is a “dummy” server acting as fallback IP in case the external time source becomes momentarily unreachable. When this happens, NTP will continue to work and base itself on this “internal” server.

NTP has its own arsenal of rules to limit access to the service, which can be used independently from a firewall. The restrict directives in the above configuration prevent distant computers from changing the servers' configuration (first restrict statement), and the machine is configured to trust itself (second restrict statement).

A restrict statement without any argument but followed by the hostname boils down to an allow all.

Manage the NTP service

Before starting the service, proceed to an initial adjustment of your system clock:

# ntpdate pool.ntp.org

The ntpdate command is normally considered obsolete, but it still comes in handy when performing important time adjustments. The “orthodox” way would be to use the ntpd -g command - the official replacement for ntpdate - but its use will fail if your system clock is off for more than half an hour.

Activate the NTP service:

# chmod +x /etc/rc.d/rc.ntpd

Manage the NTP service:

# /etc/rc.d/rc.ntpd start|stop|restart|status

Now display the list of servers your machine is actually connected to:

# ntpq -p
remote           refid      st t when poll reach   delay   offset jitter
==============================================================================
*panopea.unstabl 213.251.128.249  2 u   30   64  377   56.136  -249.48 80.680
+88-190-17-126.r 145.238.203.14   2 u   29   64  377   77.571  -205.94 94.278
+62.210.255.117  192.93.2.20      2 u   29   64  377   77.097  -249.57 85.641
-ntp.univ-poitie 145.238.203.10   3 u   29   64  377   57.747  -191.58 107.002
LOCAL(0)        .LOCL.          10 l  164   64  374    0.000    0.000 0.001

The little * asterisk preceding one of the above lines means your machine is effectively synchronized with the respective NTP server.

The first synchronization can take a few minutes, sometimes up to half an hour.

Synchronize your client PC(s) with your local NTP server

In a LAN, it is considered good practice to synchronize only one machine - the server - with a public NTP server, and the client PCs with the local server. This saves bandwidth and takes some load off the public NTP servers.

As above, proceed to an initial adjustment of the system clock:

# ntpdate pool.ntp.org

Create an empty logfile:

# touch /var/log/ntp.log

Now configure NTP to synchronize with the LAN server. Replace the example's IP (192.168.2.1) with your real server's IP:

# /etc/ntp.conf
driftfile /etc/ntp/drift
logfile /var/log/ntp.log
server 192.168.2.1
server 127.127.1.0
fudge 127.127.1.0 stratum 10
restrict default ignore
restrict 127.0.0.1 mask 255.0.0.0
restrict 192.168.2.1 mask 255.255.255.255

The three restrict statements mean we're blocking all NTP traffic except for the client itself and the server.

Activate and start the NTP service:

# chmod +x /etc/rc.d/rc.ntpd
# /etc/rc.d/rc.ntpd start

As above, use the ntpq -p command to check if the synchronization went well:

# ntpq -p
remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*192.168.2.1     81.19.16.225     3 u  916 1024  377    0.367    7.897   2.552
LOCAL(0)        .LOCL.          10 l  10h   64    0    0.000    0.000   0.000

Again, you might have to wait a few minutes before the first synchronization takes place.

Monitor the performance of ntpd

You will notice that the logfile /var/log/ntp.log does not contain any information about the actual accuracy of your system clock. If it's important to you, you can log the statistics of time corrections applied by NTP daemon to the system clock. To do this, add the following lines to /etc/ntp.conf:

statsdir /var/log/ntp/
statistics loopstats
filegen loopstats file loops type day link enable

You have to create the statsdir manually. Once the configuration changes are in effect, ntpd will create files named loops.YYYYMMDD in that directory. Below is an example line from one of these files:

56690 3950.569 0.001199636 2.297 0.001830770 0.571576 10

The first and second number are the UTC time (expressed as Modified Julian Date[3803] and seconds elapsed since midnight). The third and fourth number are the offsets of time (in seconds) and of frequency (in parts per million). The fifth and sixth number are their respective uncertainties.

To monitor the performance of ntpd, you can examine the plot of clock offset or frequency offset vs. time:

$ awk '{printf("%f %f %f\n", $1+$2/86400, $3, $5)}' /var/log/ntp/loops.* > time
$ awk '{printf("%f %f %f\n", $1+$2/86400, $4, $6)}' /var/log/ntp/loops.* > freq
$ gnuplot
gnuplot> set xzeroaxis
gnuplot> plot 'time' with yerror
gnuplot> plot 'freq' with yerror

Given enough data, visual examination of the plots will allow you to see peculiarities in ntpd performance, should they arise. For example, in the case illustrated by the figure below, the rapid decrease of the frequency offset was caused by replacing the power supply unit of the machine.

Sources

Originally written by Niki Kovacs[3804]

Performance monitoring section contributed by Dominik Drobek

howtos, time, clock, synchronization, author kikinovak

OpenVPN - How to Set Up a Slackware Server and a Slackware Client

1. Introduction

1.1. OpenVPN(1)

OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls. It was written by James Yonan and is published under the GNU General Public License (GPL).

OpenVPN allows peers to authenticate each other using a pre-shared secret key, certificates, or username/password. When used in a multiclient-server configuration , it allows the server to release an authentication certificate for every client, using signature and Certificate authority. It uses the OpenSSL encryption library extensively, as well as the SSLv3/TLSv1 protocol, and contains many security and control features.

2. Scope and Objective

The objective of this article is to serve as a tutorial for the readers to set up a basic but functional Slackware VPN Server and Client over the Internet.

The emphasis is to provide a reliable method that can be easily followed to set-up OpenVPN on Slackware Servers and Clients. Nevertheless the process is still not free from pitfalls and require some attention and determination.

This article comprises of a selection of other similar tutorials found on the Internet particularly (2) and (3) and the documents contained in the downloaded source files. However these are reformatted to satisfy the objective.

3. Installation

Openvpn is already installed on Slackware if a default installation was followed. If this was not the case, then the package is available from the “n” directory of the Slackware DVD. Refer to other Slackware specific documents on how to go about this installation.

If you want to confirm that Openvpn is indeed installed, you can check it by listing the /var/log/packages/ directory:

# ls /var/log/packages/openvpn*

4. Requirements

Server and a Client computers would be needed. They would have to be connected to the Internet on two different Routers and different Network Routes. For the purpose of this tutorial, specific details are defined in order to enhance the readability. Of course, you will probably have a different addresses, so you will need to amend accordingly.

4.1. Server DNS

A URL is normally used to address the Server. This is not mandatory and instead you may use only the Internet IP. However it is recommended to use a URL to access the Server from the Internet, especially if it is connected to a dynamic IP, which is typical for domestic Internet connections. The author is using noip2(4) as it is free upon subscription. A noip2 slackbuild is available from http://slackbuilds.org[3805].

4.2. Server details

hostname: server1
IP: 192.168.200.195/255.255.255.0
URL:  servervpn.no-ip.org
Network Interface: eth0

4.3. Client details

hostname: client1
IP: 192.168.1.101/255.255.255.0
Network Interface: wlan0

4.3 Administrator Rights

You will need to have administrator rights to set up OpenVPN. This applies to both the Server and the Client. For simplicity, in this tutorial, it will be assumed that all actions will be performed by the root user. Naturally advanced users might be more discerning.

4.4 Possible Constraints and Possible Solutions for a WiFi equipped Client

The availability of two Routers might be challenging. Consider that interactive sessions on both the Server and Client will be needed before the VPN is set up. If the Client is equipped with a WiFi interface there might be some easy solutions that may be considered:

Use a 3G smart phone's “Portable Wi-Fi Hot Spot” facility to connect the Client as the VPN Client. As 3G bandwidth is expensive you may want to minimise traffic. For example, you might want to switch off services that are not absolutely essential during the course of this exercise, such as ntpd, dropbox and tor.

Connect the Client to another WiFi available in the vicinity of the Server. Some lucky people live in areas were benevolent neighbours provide them with openly accessible Internet WiFi. It is recommended to request permission before taking up this solution. In case that no such open service exists, you may find it appropriate to request a temporary password from a friendly neighbour for the private encrypted WiFi service.

Nowadays, many governmental premises, such as libraries and Local Councils provide free WiFi service. Other places such as fast food outlets, pubs, cafés, etc. also provide free WiFi from their location to their valuable customers. You may access the Server via an available service such as SSH from a WiFi equipped Client. If this option is chosen for this solution, be aware that the Client may have to pass through some firewalls. Besides the VPN connection might be a breach of the terms of conditions that should be accepted before using the WiFi service.

5. Creating a Public Key Infrastructure (PKI) using the easy-rsa Scripts

The PKI may be created on any computer with a VPN installation, but it is probably more sensible to be done on both the Server and the Client as both would need it. An easy way to build the PKI is to use the easy-rsa scripts. These may be downloaded like this:

# cd
# git clone http://github.com/OpenVPN/easy-rsa

and then archive it for future purposes:

# tar cvf easy-rsa.tar easy-rsa

5.1 Create the keys and certificates for the Server

Follow these steps on the Server to create the needed keys and certificates:

# cd easy-rsa/easyrsa3

Create the PKI and the CA:

# ./easyrsa init-pki
# ./easyrsa build-ca

Enter a PEM pass phrase, reverify it and then enter a name for the server. In this article I am using the hostnames for clarity (in this case: server1), but you may choose any name.

Then generate the request:

# ./easyrsa gen-req server1

You will be prompted for another PEM pass phrase to reverify it and to confirm that the name of the entity is indeed server1. Now you may proceed to sign this request:

# ./easyrsa sign-req server server1

Confirm the request by entering “yes”, then enter the original ca PEM passphrase.

Now create two additional key files:

# cd /etc/openvpn/certs/
# openssl dhparam -out dh2048.pem 2048
# cd /etc/openvpn/keys/
# /usr/sbin/openvpn --genkey --secret ta.key

5.2 Create the keys and certificates for the Client

Follow these steps on the Client to create the needed keys and certificates:

You will need the easy-rsa scripts, so you can copy the easy-rsa tarball from the Server to the Client and extract it:

# cd
# tar xvf easy-rsa.tar

Now create the PKI and generate the request:

# cd easy-rsa/easyrsa3
# ./easyrsa init-pki
# ./easyrsa gen-req client1

You will be prompted for another PEM pass phrase, to re-verify it and to confirm that the name of the entity is indeed client1. In this article I am using the hostnames for clarity (in this case: client1), but you may choose any name.

Copy pki/reqs/client1.req back to the Server.

5.2.1 Sign the Client's request on the Server

For the purpose of this article, it is assumed that the Client's request file (client1.req) has been transferred to the $HOME/openvpn/ directory of the Server. Now you can proceed to import and sign the client1 request:

# cd $HOME/easy-rsa/easyrsa3
# ./easyrsa import-req $HOME/openvpn/client1.req client1
# ./easyrsa sign-req client client1

When prompted enter “yes” and the server1 CA PEM pass phrase.

Copy the generated $HOME/easy-rsa/easyrsa3/pki/issued/client1.crt back to the client.

6. Setting up the Server

Copy the following files generated by the easy-rsa scripts to their respective directories in the /etc/openvpn/ directory:

# cp $HOME/easy-rsa/easyrsa3/pki/ca.crt \
> /etc/openvpn/certs/
# cp $HOME/easy-rsa/easyrsa3/pki/issued/server1.crt \
> /etc/openvpn/certs/
# cp $HOME/easy-rsa/easyrsa3/pki/private/server1.key \
> /etc/openvpn/keys/

Copy the sample server.conf from the OpenVPN source onto the OpenVPN's configuration directory. The source of OpenVPN may be obtained from Slackware's source DVD or your favourite Slackware mirror or from http://openvpn.net[3806]. In the following example, I am downloading the source from ftp.slackware.com[3807]

# cd /tmp/
# wget -c \
> ftp://ftp.slackware.com/pub/slackware/slackware/source/n/openvpn/openvpn-*.tar.?z
# cd /usr/src/
# tar xvf /tmp/openvpn-*.tar.?z

Copy the file server.conf contained in the source to the OpenVPN configuration directory:

# cp openvpn-*/sample/sample-config-files/server.conf \
> /etc/openvpn/

Edit the following lines of /etc/openvpn/server.conf

From these lines:

ca ca.crt
cert server.crt
key server.key  # This file should be kept secret
dh dh1024.pem
;tls-auth ta.key 0 # This file is secret
;user nobody
;group nobody
;log-append  openvpn.log

To:

ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/server1.crt
key /etc/openvpn/keys/server1.key #This file should be kept secret
dh /etc/openvpn/certs/dh2048.pem
tls-auth /etc/openvpn/keys/ta.key 0 # This file is secret
user nobody
group nobody
log-append  /var/log/openvpn.log

Finally add the following to /etc/openvpn/server.conf:

# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
cipher AES-256-CBC
# If you want to use OpenVPN as a daemon, uncomment this line.
# Generally speaking, servers should run OpenVPN as a daemon
;daemon

An attentive reader may be tempted to uncomment the 'daemon' option. This would not allow the user to enter the pass phrase, therefore it would not work until the pass phrase is defined in server.conf as described in Chapter 10.

# cat /var/log/openvpn.log

Note that comments in server.conf may be either start with # or ; In order to help you with entering parameters, the former are used to comment out text while the latter are for commented out configuration lines.

Copy the rc.openvpn listed hereunder and place under /etc/rc.d/

#!/bin/sh
#
# /etc/rc.d/rc.openvpn
#
# Start/stop/restart the OpenVPN server.
#
ovpn_start() {
if [ -x /usr/sbin/openvpn -a -r /etc/openvpn/server.conf ]; then
echo "Starting OpenVPN:  /usr/sbin/openvpn server.conf"
/usr/sbin/openvpn /etc/openvpn/server.conf
fi
}
ovpn_stop() {
killall openvpn
}
ovpn_restart() {
ovpn_stop
sleep 2
ovpn_start
}
case "$1" in
'start')
ovpn_start
;;
'stop')
ovpn_stop
;;
'restart')
ovpn_restart
;;
*)
echo "Usage: $0 {start|stop|restart}"
esac

Then give it executable permissions:

# chmod 755 /etc/rc.d/rc.openvpn

7. Port Forwarding

You will need to forward traffic from the port you have chosen for OpenVPN to be routed to the Server. To accomplish this you will need to provide your Server with a fixed IP and you will need to configure your router. You may use netconfig, network-manager or wicd to set the fixed IP on Slackware. Then you also need to consult the documentation provided with your router to set up the selected IP address reserved for the Server, and the port forwarding. For our default OpenVPN set up, the UDP Port would be 1194.

In case if you have misplaced such documentation, you may search on the Internet on how this may be achieved. A good place to start is http://portforward.com/[3808].

8. Setting up the Client

On the Client machine perform the following instructions to set it up.

Download the OpenVPN source tarball and extracted it as explained in Chapter 6, then proceed to copy the included configuration file for clients:

# cp /usr/src/openvpn-*/sample/sample-config-files/client.conf \
> /etc/openvpn/

Edit the following lines of /etc/openvpn/client.conf

remote my-server-1 1194
;user nobody
;group nobody
ca ca.crt
cert client.crt
key client.key
;tls-auth ta.key 1

to the following lines:

remote servervpn.no-ip.org 1194
user nobody
group nobody
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/client1.crt
key /etc/openvpn/keys/client1.key
tls-auth /etc/openvpn/keys/ta.key 1

Finally add the following to /etc/openvpn/client.conf:

# Select a cryptographic cipher.
# This config item must be copied to
# the server config file as well.
cipher AES-256-CBC

Note that comments in client.conf may be either # or ; The former are used to comment out text while the latter are for commented out configuration lines. This should help you a lot in the configuration process.

You will need this file that was generated by the Client's easy-rsa scripts:

cp $HOME/easy-rsa/easyrsa3/pki/private/client1.key \
> /etc/openvpn/keys/

and the following from the Server's easy-rsa scripts:

$HOME/easy-rsa/easyrsa3/pki/ca.crt
$HOME/easy-rsa/easyrsa3/pki/issued/client1.crt

and this file as well:

/etc/openvpn/keys/ta.key

Place these files as indicated in client.conf. So ca.crt and client1.crt go under /etc/openvpn/certs/ while client1.key and ta.key go under /etc/openvpn/keys/

9. Testing the VPN

On the Server:

# /etc/rc.d/rc.openvpn start

Enter the Server PEM pass phrase when prompted.

On the Client:

# /usr/sbin/openvpn /etc/openvpn/client.conf

Enter the Client PEM pass phrase when prompted. To stop OpenVPN on the Client just hit CTRL+C

On both you should see a new network interface called tun0. On the Server, I obtained the following:

# ifconfig tun0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
inet 10.8.0.1  netmask 255.255.255.255  destination 10.8.0.2
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 0  bytes 0 (0.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Similarly on the Client:

# ifconfig tun0
tun0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
inet 10.8.0.6  netmask 255.255.255.255  destination 10.8.0.5
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 100  (UNSPEC)
RX packets 0  bytes 0 (0.0 B)
RX errors 0  dropped 0  overruns 0  frame 0
TX packets 0  bytes 0 (0.0 B)
TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Naturally you can ping the Server from Client (or vice versa):

For example, from the Client:

# ping -c 3 10.8.0.1
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
64 bytes from 10.8.0.1: icmp_req=1 ttl=64 time=2888 ms
64 bytes from 10.8.0.1: icmp_req=2 ttl=64 time=1997 ms
64 bytes from 10.8.0.1: icmp_req=3 ttl=64 time=1324 ms
--- 10.8.0.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1999ms
rtt min/avg/max/mdev = 1324.475/2070.293/2888.429/640.527 ms, pipe 3

10. Storing the PEM pass phrase in a secure file and Automatic start of service after booting

To start the OpenVPN service on boot, an entry in /etc/rc.d/rc.local is needed, but you would have to enter the server PEM pass phrase every time. This might be undesirable if the Server is unreachable. If this is the case, create a file containing your PEM pass phrase in a secure location; e.g. /root/password.ovpn which contains only this pass phrase. Then restrict its permission:

# chmod 600 /root/password.ovpn

On the Server, edit /etc/openvpn/server.conf with the following lines:

askpass /root/password.ovpn
auth-nocache

Also, uncomment the 'daemon' option.

This may be repeated also on the Client, just edit /etc/openvpn/client.conf instead of /etc/openvpn/server.conf.

To start the OpenVPN service automatically on boot-up from the Server, include these lines in /etc/rc.d/rc.local

# Start the OpenVPN Service
if [ -x /etc/rc.d/rc.openvpn ]; then
/etc/rc.d/rc.openvpn start
fi

An alternate method (albeit less secure) is to remove the passphrase from server1.key file altogether. Don't forget to set permissions on the key to avoid it being world-readable.

# cd /etc/openvpn/keys
# openssl rsa -in server1.key -out tmp.key
# mv tmp.key server1.key
# chmod 600 server1.key

11. IP Routing

Up to now we have created a tunnel device on both the Server and the Client called tun0 which is visible only to these two machines. However more work is needed to route the Client's connection via tun0 and then to the WAN that is connected to the Server.

11.1 Server Configuration

Enable IP forwarding:

# chmod +x /etc/rc.d/rc.ip_forward
# /etc/rc.d/rc.ip_forward start

IP forwarding is now enabled and will be enabled also after you reboot.

Make a directory called ccd in /etc/openvpn

# mkdir /etc/openvpn/ccd/

Create a file with the same name of the client (in this case client1) and enter the following line in /etc/openvpn/ccd/client1

iroute 192.168.1.0 255.255.255.0

Replace 192.168.1.0 255.255.255.0 by the Network Route of your Client.

Similarly edit /etc/openvpn/server.conf with the following lines:

push "route 192.168.200.0 255.255.255.0"
client-config-dir /etc/openvpn/ccd
route 192.168.1.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

Naturally replace 192.168.200.0 255.255.255.0 with the Server's Network Route, and 192.168.1.0 255.255.255.0 with the Client's Network Route. 208.67.222.222 and 208.67.220.220 are the OpenDNS IP addresses.

Up to now the DNS push configuration has not been successful.

You can either use the original Client DNS servers or else you may rewrite /etc/resolv.conf manually:

# OpenDNS Servers
nameserver 208.67.222.222
nameserver 208.67.220.220

According to your routing table however, it is still worth trying to use the DNS servers listed by the Client, I find that they are generally still available, so you would not need to do anything. However do be aware of possible DNS leaks if you are concerned about your privacy.

Some users have reported that their Client's Network Manager, (or any other similar application) re-wrote the original /etc/resolv.conf back after their manual editing. This could not be reproduced by the author of this article (yet), but you may consider installing and configuring openresolv(5) if this actually happens to you. A SlackBuild for openresolv may be found on http://slackbuilds.org[3809]. Openresolv is currently out of the scope of this article.

Next you will have to configure some iptables NAT forwarding on the Server (only). You can do this by first flushing the iptables:

# iptables -F

And then:

# iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

On Slackware, such a line may be included in /etc/rc.d/rc.firewall and /etc/rc.d/rc.inet2 will run it each time you reboot the Server if the former has executable permissions. You do not have to include anything in /etc/rc.d/rc.local.

The exact lines which you need to include depend on whether you already entered your own iptables filter chains and rules, but I will assume that that this is not the case.

As already explained, as a minimum you only need to enter the following lines in /etc/rc.d/rc.firewall

#!/bin/sh
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE

If on the other hand you would like a better firewall and you are at least moderately confident with iptables, I propose the following script to be included in your /etc/rc.d/rc.firewall. The comments in the script should help you understand the impact they will have on the Server.

#!/bin/bash
# Start/stop/restart/status the firewall
IPT=/usr/sbin/iptables # This will provide some portability
firewall_start() {
# flush the iptables
echo -e "Starting the firewall ....\c"
$IPT -F
# policies
$IPT -P OUTPUT DROP
$IPT -P INPUT DROP
$IPT -P FORWARD DROP
$IPT -N SERVICES # services is a custom chain
# allowed output
$IPT -A OUTPUT -o lo -j ACCEPT
$IPT -A OUTPUT -o eth0 -j ACCEPT
$IPT -A OUTPUT -o tun0 -j ACCEPT
# allowed inputs
#$IPT -A INPUT -i lo -j ACCEPT # uncomment if the host is a desktop
$IPT -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT # allow responses
$IPT -A INPUT -j SERVICES # append the services chain to the input
# allowed forwarding for OpenVPN
$IPT -A FORWARD -i eth0 -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPT -A FORWARD -s 10.8.0.0/24 -o eth0 -j ACCEPT
# masquerade the OpenVPN network
$IPT -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
# allow sshd on the default tcp port 22
#$IPT -A SERVICES -p tcp --dport 22 -j ACCEPT # Uncomment to allow sshd
# allow OpenVPN for the default udp port 1194
$IPT -A SERVICES -p udp --dport 1194 -j ACCEPT
echo "done."
}
firewall_stop() {
echo -e "Stopping the firewall ....\c"
# polcies (permissive)
$IPT -P OUTPUT ACCEPT
$IPT -P INPUT ACCEPT
$IPT -P FORWARD ACCEPT
# flush the iptables
$IPT -F
# delete the services custom chain
$IPT -X SERVICES
echo "done."
}
firewall_status() {
$IPT -vL
}
case "$1" in
'start')
firewall_start
;;
'stop')
firewall_stop
;;
'restart')
firewall_stop
firewall_start
;;
'status')
firewall_status
;;
*)
echo "Usage $0 start|stop|restart|status"
esac

Give the firewall rc script executable permission:

# chmod +x /etc/rc.d/rc.firewall

and start it:

# /etc/rc.d/rc.firewall start

Restart the OpenVPN service on the Server:

# /etc/rc.d/rc.openvpn restart

and reconnect from the Client:

# /usr/sbin/openvpn /etc/openvpn/client.conf

12. Firewalls

In the previous chapter we referred to a firewall you may include to protect your OpenVPN Server. However this chapter refers to firewalls on the Client LAN that may block the VPN connection by blocking traffic on UDP port 1194.

In order to penetrate through the Client firewall your may want to try changing the port to 443 - normally reserved for https. Using TCP instead of UDP will also help. To make these change you will need to amend /etc/openvpn/server.conf of the Server, from

port 1194
proto udp

to:

port 443
proto tcp

and /etc/openvpn/client.conf of the Client, from

proto udp
remote servervpn.no-ip.org 1194

to:

proto tcp
remote servervpn.no-ip.org 443

The Server's firewall script would also need to be modified. Change these lines:

# allow vpn on the default udp port 1194
$IPT -A SERVICES -p udp --dport 1194 -j ACCEPT

to:

# allow vpn on the custom tcp port 443
$IPT -A SERVICES -p tcp --dport 443 -j ACCEPT

You also have to modify your Router's port forwarding to TCP port 443.

13. Sources

(1) http://en.wikipedia.org/wiki/OpenVPN[3810]

(2) https://wiki.archlinux.org/index.php/OpenVPN[3811]

(3) http://slackwiki.com/OpenVPN_smcr_2012[3812]

(4) http://www.no-ip.com[3813]

(5) http://roy.marples.name/projects/openresolv/index[3814]

Written for Slackware 14.2 in April 2018

Originally written by Chris Abela[3815]

howtos, network, openvpn

Roaming profiles with NFS and NIS

The following HOWTO describes the configuration of roaming profiles using Slackware Linux. Roaming profiles come in handy in setups like SOHO networks, schools, town halls or more generally any network where many users have to work on many different desktop clients.

All the users' data and preferences are stored centrally on the server.

Authentication is also centralized, so a new user is only created once on the server.

Any user can connect to any desktop client and immediately retrieve his files, desktop preferences, personal wallpaper, bookmarks, etc.

Prerequisites

Centralized authentication requires all machines - server and desktop clients - to be perfectly synchronized. Take a look at the NTP HOWTO[3816] to see how this can be done.

Configure the server

Define static ports for NFS and NIS

We want to use NFS and NIS with a firewall, so the first thing we do is assign static ports to their respective services. The step below is not strictly necessary, but in order to do things properly, we will note down all chosen ports in /etc/services, at the end of the file:

...
# Static ports for NIS
ypserv    834/tcp    # NIS server
ypserv    834/udp    # NIS server
# Static ports for NFS
statd     32765/tcp  # NFS statd (in)
statd     32765/udp  # NFS statd (in)
statd     32766/tcp  # NFS statd (out)
statd     32766/udp  # NFS statd (out)
mountd    32767/tcp  # NFS mountd
mountd    32767/udp  # NFS mountd
lockd     32768/tcp  # NFS lockd
lockd     32768/udp  # NFS lockd
rquotad   32769/tcp  # NFS mountd
rquotad   32769/udp  # NFS mountd

Don't forget to open these ports in the firewall. This is a more common mistake than you would think.

Edit /etc/rc.d/rc.rpc to assign static ports for statd:

...
if ! ps axc | grep -q rpc.statd ; then
echo "Starting RPC NSM (Network Status Monitor):  /sbin/rpc.statd"
/sbin/rpc.statd --port 32765 --outgoing-port 32766
fi
...

Ports for rquotad and mountd can be defined in /etc/rc.d/rc.nfsd:

...
if [ -x /usr/sbin/rpc.rquotad ]; then
echo "  /usr/sbin/rpc.rquotad"
/usr/sbin/rpc.rquotad --port 32769
fi
...
if [ -x /usr/sbin/rpc.mountd ]; then
echo "  /usr/sbin/rpc.mountd"
/usr/sbin/rpc.mountd --port 32767
fi
...

Last but not least, create /etc/sysctl.conf to assign ports to lockd:

fs.nfs.nlm_tcpport=32768
fs.nfs.nlm_udpport=32768

This last option will only be effective after rebooting the server.

Share users' home directories with NFS

Edit /etc/exports to define your NFS shares. In the example below, /home is shared for the whole 192.168.2.0/255.255.255.0 subnet:

/home 192.168.2.0/24(rw,async,no_subtree_check)

Activate the shares:

# exportfs -a
# chmod 0755 /etc/rc.d/rc.rpc
# chmod 0755 /etc/rc.d/rc.nfsd

Reboot the server and check if all services are activated and use the right ports:

# pmap_dump
100000    2   tcp    111  portmapper
100000    2   udp    111  portmapper
100024    1   udp  32765  status
100024    1   tcp  32765  status
100011    1   udp  32769  rquotad
100011    2   udp  32769  rquotad
100011    1   tcp  32769  rquotad
100011    2   tcp  32769  rquotad
100003    2   tcp   2049  nfs
100003    3   tcp   2049  nfs
100003    4   tcp   2049  nfs
100003    2   udp   2049  nfs
100003    3   udp   2049  nfs
100003    4   udp   2049  nfs
100021    1   udp  32768  nlockmgr
100021    3   udp  32768  nlockmgr
100021    4   udp  32768  nlockmgr
100021    1   tcp  32768  nlockmgr
100021    3   tcp  32768  nlockmgr
100021    4   tcp  32768  nlockmgr
100005    1   udp  32767  mountd
100005    1   tcp  32767  mountd
100005    2   udp  32767  mountd
100005    2   tcp  32767  mountd
100005    3   udp  32767  mountd
100005    3   tcp  32767  mountd

Setup centralized authentication with NIS

Slackware64 has a bug in yptools, that can be corrected like this:

# cd /usr/lib
# ln -s /usr/lib64/yp .

This bug has been fixed in Slackware64 14.0

Define a NIS domain by creating and/or editing /etc/defaultdomain. Finding an appropriate domain name is a mere convention. In the example below, this is my company's NIS server (“Montpezat” is a small town in South France):

microlinux.montpezat

Edit /etc/yp.conf so the server becomes its own NIS client:

domain microlinux.montpezat server localhost

Uncomment the relevant lines in /etc/rc.d/rc.yp, the NIS startup script, and define the use of static ports for ypserv:

if [ -r /etc/defaultdomain ]; then
nisdomainname `cat /etc/defaultdomain`
fi
if [ -x /usr/sbin/ypserv ]; then
echo "Starting NIS server:  /usr/sbin/ypserv"
/usr/sbin/ypserv --port 834
fi
if [ -x /usr/sbin/rpc.yppasswdd ]; then
echo "Starting NIS master password server:  /usr/sbin/rpc.yppasswdd"
/usr/sbin/rpc.yppasswdd
fi
if [ -d /var/yp ]; then
echo "Starting NIS services:  /usr/sbin/ypbind -broadcast"
/usr/sbin/ypbind -broadcast
fi

On a default Slackware installation, this script is already activated. Note that it needs /etc/rc.d/rc.rpc to be started previously.

# /etc/rc.d/rc.yp start

Proceed to a few adjustments in /var/yp/Makefile:

the value of MINGID must be altered from 500 to 1.

values for MERGE_PASSWD and MERGE_GROUP flip from true to false.

the publickey option has to be deactivated.

Here's how the file is edited accordingly:

...
MINGID=1
...
MERGE_PASSWD=false
MERGE_GROUP=false
...
all:  passwd group hosts rpc services netid protocols netgrp mail \
shadow # publickey networks ethers bootparams printcap \
# amd.home auto.master auto.home auto.local passwd.adjunct \
# timezone locale netmasks
...

Initialize the NIS domain:

# /usr/lib/yp/ypinit -m

From now on, adding one or more new users can be done as usual with the adduser or useradd commands, but there's an additional step involved. For new users to be taken into account, issue the following commands:

# cd /var/yp
# make

Configure the client(s)

Mount the shared user home directories

On the client side, we will cleanup /home, which will be our mountpoint for the servers' NFS shares. A vanilla Slackware install contains a /home/ftp directory, which we will get rid of:

# rmdir /home/ftp

Start /etc/rc.d/rc.rpc and try to mount the shares manually. In the example below, nestor is my company's server. Replace this value with either your server's hostname or IP address:

# chmod 0755 /etc/rc.d/rc.rpc
# /etc/rc.d/rc.rpc start
# mount -t nfs nestor:/home /home
# ls /home
# umount /home

Once this step has been successful, define a permanent NFS mount in /etc/fstab. Again, replace nestor by your servers' hostname or IP address:

...
nestor:/home /home nfs rsize=8192,wsize=8192,timeo=14,intr 0 0

Configure the client to use the NIS server for authentication

As noted above, Slackware64 versions prior to 14.0 contain a bug in yptools, which can be fixed like this:

# cd /usr/lib
# ln -s /usr/lib64/yp .

Define the NIS domain like you did on the server, by creating and/or editing /etc/defaultdomain:

microlinux.montpezat

Define the NIS server by editing /etc/yp.conf:

domain microlinux.montpezat server nestor

Modify /etc/nsswitch.conf so it looks like this:

passwd:     files nis
shadow:     files nis
group:      files nis
hosts:      files dns nis
networks:   files
services:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files
netgroup:   files
bootparams: files
automount:  files
aliases:    files

To startup NIS on the client, uncomment the relevant lines in the /etc/rc.d/rc.yp startup script:

...
if [ -r /etc/defaultdomain ]; then
nisdomainname `cat /etc/defaultdomain`
fi
...
if [ -d /var/yp ]; then
echo "Starting NIS services:  /usr/sbin/ypbind -broadcast"
/usr/sbin/ypbind -broadcast
fi
...

On a vanilla install, there's no activation (chmod 0755 /etc/rc.d/rc.yp) to be done, since the script is already activated.

Reboot the client and check if users defined on the server can connect.

Default the clients to init 3 until all testing and debugging is done. Once everything works fine, switch to init 4.

Sources

Originally written by Niki Kovacs[3817]

howtos, nis, nfs, roaming profiles, centralized authentication, author kikinovak

Using Checkpoint SSL Network Extender (SNX) Client on Slackware

Checkpoint SSL Network Extender is a thin client used for remote connection to a Checkpoint Security Gateway ⁵⁷⁾. It is used, for instance, by corporations to enable secure remote access by employees.

This article describes how to configure a Slackware system so that you can use the Checkpoint SNX client.

Requirements

In addition to a full Slackware installation, the following additional packages/libraries are required to run the SNX client:

Full 32-bit Slackware system or full 64-bit Slackware system with Eric Hameleers's multilib packages installed[3819]

Linux-PAM - available from Vincent Batts's PAM for Slackware projecthttp://www.slackware.com/~vbatts/pam/[3820]

Vincent has a whole suite of packages for converting all of Slackware's authentication to use Linux-PAM. For our purposes we only need the Linux-PAM libraries themselves.

If you are comfortable building/installing these packages, this may be all you need to know.

The remainder of this is devoted to more detailed description of the steps necessary to install the required Linux-PAM library. Multilib installation is not covered here as it is well documented elsewhere[3821].

Sources

Originally written by David R. Williams[3822]

howtos, template

⁵⁷⁾

https://sc1.checkpoint.com/documents/R77/CP_R77_VPN_AdminGuide/14702.htm[3818]

HOWTO articles - Network Services

This section contains how to articles intended to guide users to setup and maintain various network services on Slackware based systems.

Inspired? Want to write a Network Services HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Slackware Network Services HOWTOS

Page
Description
Tags

Citrix Client
Citrix Client This article describes how to install and configure The Citrix Client on Slackware. Nowadays this client is better known as the “Citrix Receiver”. Quoting the Citrix web site: “Citrix Receiver is an easy-to-install client software that lets you access your docs, applications and desktops from any of your devices including smartphones, tablets and PCs
howtos, network, author alienbob

Configuring a Wireless Access Point
Configuring a Wireless Access Point This Howto explains how you can use your computer as a Wireless Accesspoint. This means if the computer has an Internet connection and a wireless interface, other computers can use it's internet connection via wlan.
howtos, wifi, accesspoint, routing, iptables

Virtual Mail Server Database
Virtual Mail Server Database This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL The database is used to provide configuration and authentication for your virtual mail domains and mail boxes. Email content is not stored in the database in this configuration.
howtos, email, postfix, dovecot, mysql

Desktop printer sharing with CUPS
Desktop printer sharing with CUPS Using CUPS, a USB printer can be network shared by the system it is connected to. While full printer discovery requires avahi, it is possible to set up simple printer sharing on Slackware 14.2 without installing any new software. In this case, the server is the machine that the printer is connected to via
howtos, cups, printing, usb, share

DHCP Server via DNSMasq
DHCP Server via DNSMasq To set up a DHCP server you can use the dhcp package (included with Slackware) or you can do it the easier way and use DNSMasq (also included with Slackware). Assuming that you do not have DNSMasq installed: * Install the official dnsmasq Slackware package either by
howtos, software, dhcp, dhcpd, dnsmasq, author arfon

Installing The Dovecot MDA
Installing The Dovecot MDA This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL Dovecot is a popular and secure mail delivery agent, or MDA, which can be configured to work alongside the postfix MTA. As with postfix, we will build and install our dovecot package using the current build script from
howtos, dovecot, postfix, mysql

Adding Sieve and ManageSieve support to dovecot
Adding Sieve and ManageSieve support to dovecot Installing the Software Assuming you have set up Dovecot and Postfix as per Creating a Virtual Mail Server with Postfix, Dovecot and MySQL you may want some server-side filtering, and vacation response capabilities. This can be done using the sieve filter language, and edited by your virtual mail users using managesieve.
howtos, email, postfix, dovecot, mysql, ssl, sieve

Firewall Rules For Virtual Mail Server
Firewall Rules For Virtual Mail Server This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL A firewall is simply a set of kernel routing rules, iptables rules, that selectively block or allow network traffic into and out of your machine. A web facing email server must be secured by a suitable set of firewall rules or it will quickly be overwhelmed and compromised!
howtos, email, postfix, dovecot, firewall

Ethernet Bridging With OpenVPN
Ethernet Bridging With OpenVPN Other guides detail setting up of OpenVPN for 'tun' bridging, where IP traffic is efficiently routed between a couple of geographically separated sites, but this guide is about so-called 'tap' bridging. In effect, it describes how to join a couple of sites forwarding all ethernet traffic between, regardless of protocol. This is useful for development, test networks and if you need to forward non-
howtos, ethernet, bridging, author bifferos

Home NFS Setup HOWTO
Home NFS Setup HOWTO This is a quick guide to setting up NFS in Slackware for use in a home LAN. The example used is for connection of a laptop computer with a desktop computer that also has an NTFS partition mounted on /music. It assumes that basic network connectivity has been established. This guide is largely cut and pasted from other more definitive documents.
howtos, software, nfs, slackware 13.37, slackware 14.0, author allend

Installing OpenWebMail in Slackware64 14.0
Installing OpenWebMail in Slackware64 14.0 This article explains how to install OpenWebmail and configure it so that you can access your mailbox using a web interface from any place with internet access and a webbrowser available. These instructions were tested on Slackware64 14.0 64-bit
howtos, author wisedraco

iPXE boot server
iPXE boot server iPXE is an open-source Preboot Execution Environment implementation that has a lot more functionality than most firmware PXE clients. Apart from using tftp to download data, iPXE can also use HTTP. Other boot methods include booting from an iSCSI SAN, a fibre channel SAN using FCoE, an ATA over Ethernet (AoE) SAN, or a wireless network. It also has a scripting language so you can create complex boot scripts. iPXE is also used as the PXE client in QEMU, so with a iPXE server you…
howtos, boot, pxe, ipxe, author fdonkers

iSCSI
iSCSI You may have heard of iSCSI in the context of corporate SANs perhaps supplying storage to a VMWare cluster of hosts, or some other heavy-weight application. These systems would generally involve running iSCSI over specialist 10Gbe (or more?) hardware and cabling and allow the operators to divorce the supply of storage from the hosts that use it. If that's your interest then this guide is probably not for you.
howtos, iscsi

Setting up Joomla 2.5 CMS in Slackware 14.0 64bit
Setting up Joomla 2.5 CMS in Slackware 14.0 64bit This HowTo describes simplified instruction for installing Joomla 2.5 content management system in Slackware 14.0. For more complex instructions you may want to read ... * start conditions is freshly installed Slackware 14.0 with option
howtos, joomla, author wisedraco

Install and configuring kerberos On Slackware without PAM
Install and configuring kerberos On Slackware without PAM The KDC This procedure will result in a new Kerberos realm. If you already have access to a Kerberos KDC, you can skip to the client and application server parts. Also, the below procedure is very abbreviated and is not a substitute for reading the documentation supplied in the package or on the MIT Kerberos website.
howtos, network services, kerberizing slackware without pam

NFS - Quick and Dirty Setup
NFS - Quick and Dirty Setup Known to work on Slackware 14, 14.1 and 14.2 Assumptions 1) This HOWTO assumes that you are using a vanilla install of Slackware and have not changed the default HOSTS_ALLOW, HOSTS_DENY, or firewall rules. 2) For this example, the shared directory on the server will be /nfs_share
howtos, software, nfs, slackware 13.37, slackware 14.0, slackware 14.1, author arfon

NFS Root
NFS Root Introduction This HOWTO is about running your Slackware Linux system without any hard disk - or perhaps with a very small hard disk - accessing the network to retrieve all files except the kernel. If you want to go the whole hog you can PXE-boot the kernel too, however this HOWTO expects you to have somewhere local to store the kernel. We're going to use VirtualBox virtual machines to
howtos, nfs, author bifferos

Synchronize your network with NTP
Synchronize your network with NTP NTP (Network Time Protocol) allows clock synchronization between computer systems. The following HOWTO describes: * configuring an NTP server on Slackware Linux; * synchronizing client PCs with your local NTP server.
howtos, time, clock, synchronization, author kikinovak

OpenVPN - How to Set Up a Slackware Server and a Slackware Client
OpenVPN - How to Set Up a Slackware Server and a Slackware Client 1. Introduction 1.1. OpenVPN(1) OpenVPN is an open source software application that implements virtual private network (VPN) techniques for creating secure point-to-point or site-to-site connections in routed or bridged configurations and remote access facilities. It uses a custom security protocol that utilizes SSL/TLS for key exchange. It is capable of traversing network address translators (NATs) and firewalls. It was writte…
howtos, network, openvpn

Installing The Postfix MTA
Installing The Postfix MTA This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL Postfix is a popular and secure mail transport agent, or MTA. We will build and install Postfix using the build script from SlackBuilds.org or SBo. The steps shown here use versions current as of this writing, but you should use the latest version applicable to your Slackware version at the time you build it.
howtos, postfix, dovecot, mysql

Creating a Virtual Mail Server with Postfix, Dovecot and MySQL
Creating a Virtual Mail Server with Postfix, Dovecot and MySQL This article shows how to build and set up a secure virtual mail server using Postfix, Dovecot and MySQL on a Slackware 14.1 platform. Because the build and installed platforms may very likely be different, and the configuration can seem complex to those not familiar with postfix, dovecot and mysql, I have organized this article in a way that I hope will help you separate and test individual tasks, without losing your way!
howtos, email, postfix, dovecot, mysql, ssl

Making Slackware Mail Server
Making Slackware Mail Server This article shows how to make an Slackware machine your personal Mail Server. This howto is for Slackware 64 13.37, but with few changes you can adapt it to the newest member of Slackware familly Slackware 14. Before we begin I must say that you need a normal installation of Slackware, without any special packages. The packages we will need to make the Mail Server we will manually download and install from Slackbuilds.org. I preffer the Cyrus SASL authentication m…
howtos, author badirca

Roaming profiles with NFS and NIS
Roaming profiles with NFS and NIS The following HOWTO describes the configuration of roaming profiles using Slackware Linux. Roaming profiles come in handy in setups like SOHO networks, schools, town halls or more generally any network where many users have to work on many different desktop clients.
howtos, nis, nfs, roaming profiles, centralized authentication, author kikinovak

Setting up a WiFi Access Point on your Slackware Box
Setting up a WiFi Access Point on your Slackware Box You should read this, regardless of whether you are a Slackware enthusiast or not, because you will find most of it applicable to other distributions too. 1 Preamble There are endless reasons for wanting to run an AP from a standard Linux environment as opposed to the crippled ones that come in most AP appliances, we're not here to discuss them all but if you're reading this you've found your own motivation for doing it.
howtos, louigi600

Using a Scanner in a Network
Using a Scanner in a Network This Howto describes how one can use a scanner which is connected to another Slackware-computer over the network. Necessary Software All packages which are necessary are available in a stock Slackware-installation. This are
howtos, network, scanner, sane, inetd, multifunction, device, author markush

Setup Apache httpd server
Setup Apache httpd server This is a general how to to get a basic httpd service up and running. Applies to: * Slackware 14.1 (and possibly previous versions) * Apache 2 (and possibly previous versions) Basic Setup Edit /etc/httpd/httpd.conf - Here is what you care about, change/uncomment the following lines as necessary:
howtos, network services, apache, httpd, author arfon

Setup Apache, PHP and MySQL
Setup Apache, PHP and MySQL In order to configure your Slackware Linux box as a MySQL-PHP -ready web server, please follow these instructions: * Install the Apache (httpd), php and MySQL packages from the Slackware discs or Slackpkg. * Fix php time zone (many apps will complain about this if you don't do it). Edit
howtos, apache, php, author pavel

Setting up a print server for home use out of any old Slackware box
Setting up a print server for home use out of any old Slackware box After recently upgrading my home wifi network to use wpa2 my old edimax wifi print server stopped working due to incompatibility with wpa2. I did not want to have to leave a computer on all the time neither did I want to directly connect whatever
howtos, print, server

Configuring SSL Certificates
Configuring SSL Certificates This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL We will now create and install a self-signed SSL certificate to support secure email. The dovecot package installs a script for generating self-signed certs at /usr/doc/dovecot-2.2.13/mkcert.sh, which you may use if you prefer. The commands shown below do the same thing but save the certificate and key to a different path.
howtos, postfix, dovecot, ssl

VPN with Tinc
VPN with Tinc Tinc is open source software for creating VPNs, virtual private networks over other physical channel such as the Internet, where individual participating hosts (nodes) appear to applications as if connected by wire in LAN. Overview Tinc utilizes asymmetric cryptography. Each node has its own private key, a public key and another public key; one for each participating node. These files are, together with a few configuration files, stored in /etc/tinc/<
howtos, network

Tunnel Interfaces
Tunnel Interfaces If you are looking to establish an SSH tunnel between two networks and treat the tunnel as an interface, this may help. * First I would recommend enabling rc.ip_forward in /etc/rc.d/ (on local and target machines) root@darkstar:~# chmod +x /etc/rc.d/rc.ip_forward
howtos, tunnel, tun0, author ricky cardo

Creating Required Users and Groups
Creating Required Users and Groups This page is supplemental to main article: Creating a Virtual Mail Server with Postfix, Dovecot and MySQL You will need to create a few special users and groups to be able to build and/or run your mail server components. We will use the SBo assigned uid and gid for each user and group.
howtos, email, postfix, dovecot

Setting Up Your Own Mozilla Sync Server
Setting Up Your Own Mozilla Sync Server Mozilla Sync is a feature which is supported in Firefox since version 4. It allows you to store your bookmarks, browsing history, browser preferences, and saved passwords on a remote server. It even allows you to work on multiple computers and have the same Firefox configuration on all these computers. That’s a pretty cool feature. You can for instance setup sync on your Android phone’s Firefox browser and quickly configure it by entering your account-spe…
howtos, software, sync, weave, author alienbob, slackware 13.37

Wi-Fi to eth (bridge) routing
Wi-Fi to eth (bridge) routing This Howto describes, how to interconnect wireless and wired network interfaces on the same Linux computer, to enable unmodified TCP/IP packets to pass from one interface to the other. In other places this is mentioned as network bridge or
howtos, network, wifi, bridge, author slacker

Wake-on-LAN
Wake-on-LAN Wake-on-LAN (or WOL) is a standard by which a machine can be powered on remotely via a network connection. This is done by sending a so-called magic packet to the network card of the remote machine. When properly configured, the remote machine will then boot.
howtos, wol, wake, author fdonkers

howtos, topic page

Ethernet Bridging With OpenVPN

Other guides detail setting up of OpenVPN for 'tun' bridging, where IP traffic is efficiently routed between a couple of geographically separated sites, but this guide is about so-called 'tap' bridging. In effect, it describes how to join a couple of sites forwarding all ethernet traffic between, regardless of protocol. This is useful for development, test networks and if you need to forward non-IP protocols. It is also conceptually simpler than tun bridging because you don't have to care about routing, and you only need run a single DHCP server on one or other side of the bridge.

About OpenVPN

OpenVPN is covered in another article[3823], so I will reference sections in that rather than just copy-paste parts of it here. This will hopefully plug the gaps required to get a working ethernet bridge.

Introduction

Just so we are clear what we're talking about, here is a diagram:

There are two physical machines (Client PM and Server PM) and four virtual machines. The aim is that the 'Private Client' talks directly to the 'Private Server', as though they are on the same ethernet segment. The switch in the middle is just my home network but you could consider that to be the Internet if you like.

Many real setups will make the 'Server Gateway' and the 'Private Server' one and the same, there is no reason for them to be separate machines, however I felt it's easier to follow what's going on if they are distinct.

VirtualBox

VirtualBox[3824] is my preferred virtualisation solution because it installs cleanly under Slackware 14.2 and -current and is pretty easy to use. If you happen to have four physical machines on which you can install Slackware you can of course do all of this without virtualisation! In my case I have two physical machines to represent each 'site' that you want to bridge together. All virtual machines run un-patched Slackware64 14.2

Private Server

Without further ado, let's get on with setting up our private server. I've given the virtual machine the following resources:

1024 MB RAM

8GB Hard disk

In the VirtualBox network settings, I've told the virtual machine to use 'Internal Network' and I've typed in the network name 'slacknet' for want of a better name. You could call it 'private' if you like. Nothing will reach this network unless we setup a machine as some kind of router to it.

I've told Slackware to install the A, AP, N and L disk sets because I don't need any GUI but want networking stuff, but it doesn't really matter, make it a full install if it pleases you. I've taken care to give this machine a static IP address, in this case 10.0.0.1. Otherwise the install is following all defaults.

After boot there is just one thing we need to do to make this test realistic. We need to enable Dnsmasq[3825]. You can follow that link for details, but we just need a small configuration file /etc/dnsmasq.conf containing only:

interface=eth0
dhcp-range=10.0.0.50,10.0.0.70,12h

That's it! Backup the old dnsmasq.conf somewhere first if you're worried about losing all the comments in it, but it doesn't matter, this is really just a throw-away test machine. The above is all you need for working dhcp server. That's what makes Dnsmasq so great.

Now we just need to start the server:

# chmod 755 /etc/rc.d/rc.dnsmasq
# /etc/rc.d/rc.dnsmasq start

So now we have our private server running on our private network! Nothing can see it for the moment but if you were to install another virtual machine and connect it to that private (slacknet) network it would get an IP address. We have done this purely to demonstrate that non-IP (i.e. DHCP) traffic can get across our bridge and DHCP is just a convenient way of doing this.

Server Gateway

VirtualBox VM Configuration

The server gateway is another Slackware machine setup with the same memory, hard disk and disk sets as the 'Private Server' above. It differs, however in that it has a second NIC configured in VirtualBox.

The first NIC in VirtualBox aka 'Adapter 1' in the VirtualBox GUI will end up being eth0 in the booted Slackware virtual machine, just bear this in mind. I will set this as 'Bridged Adapter' under 'Attached to:' in the GUI. Note that for all NICs I'm setting 'Promiscuous Mode' to 'Allow All', although I've no idea if that's needed for all the NICs on all the machines in this guide.

'Adapter 2' will be connected to the 'slacknet' private network discussed in the 'Private Server' configuration above.

Network setup

Now all the questions Slackware asks you during network setup apply to the public interface which is connected directly (via VirtualBox's bridge) to the switch in the middle of the diagram above. Chances are it is your home broadband router which will dish out an IP address and maybe (if you're lucky) an appropriate DNS name. It matters not, so long as there is something you can use to identify this public interface on the network. From here on I'm going to refer to this machine's ethernet interface as 'vpn', or we can say 'vpn.localnet', however if you only have an IP address just use that. The good news is that it doesn't matter if it 'clashes' with the IP address range we talked about in 'Private Server' dnsmasq configuration because… well… it's really private. Neat huh? This would obviously be a big issue if we want to later add routing from 'Private Server' to the outside world, but that will be another howto.

tap0 device

Having installed a nice shiny 2nd Slackware virtual machine with two ethernet cards, only one of which is active we need to do some extra stuff before we talk about OpenVPN.

The first step is to install tunctl[3826]. I'm going to make the (possibly unfair) assumption that you know how to install Slackware packages from slackbuilds.

Once tunctl is installed, edit /etc/rc.d/rc.inet1, find the following lines:

# Function to start the network:
start() {
lo_up
...

Make them say:

# Function to start the network:
start() {
lo_up
/usr/sbin/tunctl -u nobody -t tap0
...

This will (on boot) create a tap0 device with the correct permissions such that OpenVPN can access it and, more to the point, it will create it before any of the bridging configuration stuff in the Slackware init scripts kicks in. rc.local would have it created way too late.

Bridging setup

OK, so now we are talking about kernel network bridging[3827], not the ethernet bridging that's the subject of this article. It's a sad fact that even though we have a NIC purposely allocated to the task of talking to our private network, i.e. not shared with any other traffic, we still need to create a kernel bridge in order for OpenVPN to talk properly to the NIC, in other words we can't tell OpenVPN to just 'use eth1' (oh that it were so simple). It wants a 'tap'. And a tap can only talk to a NIC via a bridge. So let's have a look at the network config in Slackware.

For eth0 in /etc/rc.d/rc.inet1.conf you are going to now have a setup something like this, courteously supplied by the Slackware netconfig script:

IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
...

Or you may have a static IP address. You should have *something*. Now scroll down to the section on bridging:

# Example of how to configure a bridge:
# Note the added "BRNICS" variable which contains a space-separated list
# of the physical network interfaces you want to add to the bridge.
...

Just below that you want the following to appear:

IFNAME[1]="br0"
BRNICS[1]="eth1 tap0"
IPADDR[1]="0.0.0.0"

Be careful with the numbers. It's the the square brackets which are telling Slackware this is the 2nd device we're configuring as a bridge, and we want to add eth1 to the bridge along with the tap0 device. Slackware doesn't configure the eth1 device, we don't even need to bring it up or otherwise refer to it in the config files as it's slave to the bridge.

Some people might configure br0 as br1 here, to indicate it's connected to the second NIC and keep them the same. You can do that. And you can change the name of tap0 as well if you want, experience tells me it's best to always use the lowest numbers for everything regardless of what they do. For me, at least, it reduces the confusion.

You don't have to set the IP address to 0.0.0.0, but it's a handy way of making the bridge come 'up' without giving it an IP address, and something that is supposed to simply sit there forwarding ethernet frames has no business having an IP address of its own. If you don't set any address at all you can do 'ifconfig br0 up' at some later point.

When you boot with this configuration, you should check that br0 is up with

# ifconfig br0

And you can also check the bridge with 'brctl show br0' and it should show something like this:

# brctl show br0
bridge name	bridge id		STP enabled	interfaces
br0		8000.485b39c042ee	no		eth0
tap0

So that's done the bridging config. Now OpenVPN (when it's eventually configured) will talk nicely to the private network aka 'slacknet' without any trouble, even if it only has 'nobody' as a username.

OpenVPN setup

So this is the part where I can just rest easy 'on the shoulders of giants' so to speak. Please setup your the PKI stuff for an OpenVPN server by following the guide in the OpenVPN howto[3828]. Follow all of section 5 so you have a set of public and private keys for the server. Don't worry about creating the config file to reference them from though as we'll do that back here.

Ready? Good.

So my /etc/openvpn/server.conf is a little simpler than the one in the OpenVPN howto. We don't care about any of the routing stuff, and I've removed all the comments for brevity. You can always check options in the manual page for OpenVPN if you want but most are self-explanatory.

port 443
proto udp      # or tcp
dev tap0     # or tun
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/vpn.crt
key /etc/openvpn/keys/vpn.key
dh /etc/openvpn/certs/dh2048.pem
tls-server
keepalive 10 120
daemon
log-append  /var/log/openvpn.log
verb 3

I have removed the passphrase from vpn.key (remember that's the equivalent of 'server1.key' in the OpenVPN howto). I've avoided giving up root as well. You would run a more secure setup if this was a production system by understanding the options in the OpenVPN manual page, this is just to get you working.

Now you can go back to the other article and look at Setting up the server[3829]. Skip forward to the stuff that talks about rc.openvpn, to ensure you have a script to start OpenVPN up. Once you have that you should be able to startup without seeing errors in /var/log/openvpn.log.

Client Gateway

VirtualBox configuration

Like the 'Private Gateway' machine, this machine will have two NICs. 'Adapter 1', however can be NAT instead of bridged, as nothing needs to be able to find it. 'Adapter 2' will be connected to a private 'slacknet' network. I made the name the same as on the other server machine, as they will become connected together but it doesn't matter what you call it so long as 'Private Client' uses the same name.

Slackware Install

I'm afraid once again, you'll need to install tunctl, create a tap0 device and enable the bridging exactly as happened for the Server Gateway. Once tap0, and br0 are created on boot you will be good to configure OpenVPN.

OpenVPN configuration

Once again, I bring into play the other howto[3830] for the PKI config on the client side. However you can skip the rc.openvpn creation as we won't be running as a daemon. The client configuration (/etc/openvpn/client.conf) is a little simpler:

client
dev tap0
proto udp
remote vpn.localnet 443
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/client.crt
key /etc/openvpn/keys/client.key
dh /etc/openvpn/certs/dh2048.pem
remote-cert-tls server
verb 3

You should now be able to connect to the 'Server Gateway' with this command as root:

openvpn /etc/openvpn/client.conf

Private Client

Very much like the 'Private Server' this machine will have similar VirtualBox setup. It will have a single NIC connected to a network called 'slacknet'.

I was going to use Slackware for this, but I decided to cheat and use Slax (Bootable CD distro) to save time on the install. Slax requests a DHCP address on boot, so it really has all you need to test the bridge out (DHCP request sent, DHCP response received). If all goes well when you boot you'll get an IP address something like 10.0.0.50 ( or at least in the range of addresses provided by the Dnsmasq server we setup on 'Private Server')

End to End Testing

So once all four (yes!) virtual machines are up and running, it should be possible (if all is working) to boot the Private Client and get an IP address in the right range, i.e. between 10.0.0.50 and 10.0.0.70. Pay close attention to /var/logs/openvpn.log on 'Server Gateway' and of course the messages displayed when running openvpn on 'Client Gateway' as they should tell you what's wrong. OpenVPN is pretty good like that. The paranoid will also want to check /var/state/dnsmasq/dnsmasq.leases on 'Private Server' to reassure themselves that all's well and we are actually talking across the bridge.

Consolidation

As I explained in the introduction, it's possible to test all this out without the 'Private server', and combine the function of 'Private Server' and 'Server gateway' in a single machine. Read on to discover how.

First thing to do is switch off (power down) the 'Private Server'.

Next, we need to assign an ip address to our ethernet bridge on the 'Server Gateway'.

# ifconfig br0 10.0.0.1 netmask 255.255.255.0

we assign an address to the bridge, not eth1!

Now we just need to run a dnsmasq instance on this br0 interface, to serve requests up to the VPN. Much like the 'Private Server' config, /etc/dnsmasq.conf should look like this:

interface=br0
dhcp-range=10.0.0.50,10.0.0.70,12h

Then it's just a matter of running up dnsmasq:

# chmod 755 /etc/rc.d/rc.dnsmasq
# /etc/rc.d/rc.dnsmasq start

At this point, rebooting the 'Private Client' should now get an IP address from the consolidated server, and that's really it. However, I also changed the old 'Private Server' to dhcp to confirm it could also get an IP address from 'Server Gateway'

Sources

Originally written by User bifferos[3831]

howtos, ethernet, bridging, author bifferos

iSCSI

You may have heard of iSCSI in the context of corporate SANs perhaps supplying storage to a VMWare cluster of hosts, or some other heavy-weight application. These systems would generally involve running iSCSI over specialist 10Gbe (or more?) hardware and cabling and allow the operators to divorce the supply of storage from the hosts that use it. If that's your interest then this guide is probably not for you.

This guide is for people wanting to make use of iSCSI to share a DISK on a network between two machines. There are a number of reasons why you might want to do this instead of resorting to the probably more familiar file sharing mechanisms such as Samba and NFS but I can immediately think of one: You want the flexibility of a disk that's available on the network, without all the hassle of dealing with the edge cases that the big two file share protocols (CIFS/NFS) introduce. Since it's a SCSI-command (block level) protocol here are some common problems that will simply disappear with iSCSI:

UID/GID mismatch issues between client/server

File perms mismatch resulting in 'unsupported operation' type errors

The typical 're-export' issues when exporting an imported network file system as something else (capability mismatch)

Problems with 'special' files: pipes, unix domain sockets

Since you have a block-level protocol there is really nothing to configure. All you have to decide on is a Linux file system.

Nomenclature

The machine hosting the disk, is called an iSCSI server The disk itself, a shared resource on said machine, is a target. The client to access the server over a network, is an Initiator.

Target Software

For the target software, we will use:

The Linux kernel

Kernel module target_core_mod

Kernel module iscsi_target_mod

targetcli-fb utility

The modules will be automatically loaded by Slackware-current, so nothing to do there.

I installed targetcli-fb with slkpg -s sbo targetcli-fb. This little utility controls the configuration of the kernel modules above.

Initiator Software

For the initiator we will use:

The Linux kernel.

module scsi_transport_iscsi

module iscsi_tcp

module libiscsi

open-iscsi

The kernel modules are also loaded automatically by Slackware-current. open-iscsi SlackBuild on SBO has been recently fixed, so should install with slpkg -s sbo open-isci.

Target Configuration

First, get the initiator ID from the initiator (client):

# cat /etc/iscsi/initiatorname.iscsi

Mine looks like this:

InitiatorName=iqn.2005-03.org.open-iscsi:91871cf5e261

It will be important later.

Next we need to configure our target (that's the 'server' remember?). In order to do this we use something called target-cli, so get targetcli-fb from Slackbuilds and install it:

slpkg -s sbo targetcli-fb

Targetcli requires a directory to store its data, make sure it exists:

# mkdir /etc/target

targetcli is a bit like a command-line directory browser except you use it to change values in a hierarchical store. That same hierarchy also contains the commands you invoke to make changes, however. You've probably not seen anything like it before and it's best just described by example.

Start by launching targetcli

# targetcli
targetcli shell version 2.1.51
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/>

Assuming you have a spare (unused) disk, you can now create a block device, e.g.:

/> backstores/block create name=myblockdevice dev=/dev/sdb
Created block storage object block using /dev/sdb.

Next move to the iscsi target creation step. Just type create and allow the target to be given a generated name, it's good enough for our purposes. You can give your own name if you want but I saw little point for my setup.

/> iscsi/
/iscsi> create
created target iqn.2003-01.org.linux-iscsi.iscsi-server.x8664:sn.7f83425fbbe8
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260

Next create LUN for the created target. Type the name of the target/tpg1 to move to the configuration area:

/iscsi> iqn.2003-01.org.linux-iscsi.iscsi-server.x8664:sn.7f83425fbbe8/tpg1

Then configure it:

/iscsi/iqn.20....425fbbe8/tpg1> luns/ create /backstores/block/myblockdevice

Then add an ACL by moving into the acl area and creating an ACL which matches the name of the initiator name that you got from the client:

/iscsi/iqn.20....425fbbe8/tpg1> acls/
/iscsi/iqn.20....be8/tpg1/acls> create iqn.2005-03.org.open-iscsi:91871cf5e261

Simply exit to save your changes:

/> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup.
Configuration saved to /etc/target/saveconfig.json
#

Service Setup

TO BE CONTINUED….

Sources

Originally written by User bifferos[3832]

howtos, iSCSI

Citrix Client

This article describes how to install and configure The Citrix Client on Slackware. Nowadays this client is better known as the “Citrix Receiver”.

Quoting the Citrix web site: “Citrix Receiver is an easy-to-install client software that lets you access your docs, applications and desktops from any of your devices including smartphones, tablets and PCs” - assuming of course that someone (usually your employer's company) has setup a Citrix Server somewhere to which the Receiver can make its remote connections.

Requirements

The Citrix Receiver is binary-only proprietary software. Therefore it should not come as a surprise that this Receiver software is 32-bit only. You either need to run 32-bit Slackware, or 64-bit Slackware with added multilib[3833].

THe Citrix Receiver is linked against the commercial and binary-only Motif[3834] graphical X-Window widget library. This creates an incompatibility with Slackware's own lesstif widget library[3835], a free re-implementation of Motif. You must remove the lesstif package and install a (open)motif package or else the Citrix Client will not run. An openmotif[3836] package (openmotif is a non-commercial, free version of Motif) can be found here: http://www.slackware.com/~alien/slackbuilds/openmotif/[3837]

Download and install

On the Citrix web site[3838], search for “linux client (32bits)”. At the moment of writing, the search path is:
http://www.citrix.com/downloads/[3839] > “Citrix Receiver” > “Receiver for Linux” > “x86 client - requires OpenMotif v.2.3.1 (tar.gz version)”

Create a temporary directory if you want, and as root, extract the tarball and run the installer:

# mkdir icaclient
# cd icaclient/
# tar xvf  ~/downloads/linuxx86_12.1.0.203066.tar.gz

Run the “setupwfc” program and accept all the default values which it offers. If you do not want to use the default installation directory “/opt/Citrix/ICAClient/” then you will have to define the environment variable “ICAROOT” and point that to your custom installation directory.
The “setupwfc” program will ask you if you desire browser integration and integration with the KDE Desktop Environment. That is good to have so the answer you give is “yes”. As a result, the application links in your company's Citrix Server will automatically work.

  # ./setupwfc

Configuration

The Citrix client/server communication uses SSL encryption. Your company may be using a SSL certificate for which the CA certificate is not yet known to the Citrix Client.

When you see the following error message:

You have chosen not to trust "Thawte Premium Server CA", the issuer of the server's security certificate (SSL error 61).

then edit this file:

/opt/Citrix/ICAClient/config/Trusted_Region.ini

where your company's Citrix Server domain name must be added as trusted proxy:

; If you allow a proxy type (Secure or Socks) that uses a server,
; you will need to change the ProxyHost line below to indicate which
; servers are trusted, for example:
; ProxyHost=,*.mycompany.com:*,*.mypartner.com:*
;
ProxyHost=,*.yourcompany.com:*

Create a certificate directory if that did not yet exist:

# mdir -p /opt/Citrix/ICAClient/keystore/cacerts

Install the missing certificate (must have a “.crt” extension):

# vi /opt/Citrix/ICAClient/keystore/cacerts/Thawte_Premium_Server_CA.crt

You can for instance find this CA certificate here:

/usr/share/ca-certificates/mozilla/Thawte_Premium_Server_CA.crt

Caveats

If your Mozilla Firefox browser refuses to start the “icaclient” that can be caused by a non-standard language setting. At work I have a localized Linux (configured for dutch language, so my “LANG” environment variable is set to “nl_NL.UTF-8”). This is what I had to do in order to fix this issue:

If the file “/usr/bin/firefox” is a script (recent versions of firefox are putting a real binary there instead) you must add this one line somewhere near the beginning:

 export LANG=C

If the file “/usr/bin/firefox” is a binary file, then you can for instance modify its desktop file “usr/share/applications/mozilla-firefox.desktop” by changing the executable command

Exec=firefox %u

to:

Exec=LANG=C firefox %u

Sources

Originally written by Eric Hameleers[3840]

howtos, network, author alienbob

Desktop printer sharing with CUPS

Using CUPS, a USB printer can be network shared by the system it is connected to. While full printer discovery requires avahi, it is possible to set up simple printer sharing on Slackware 14.2 without installing any new software. In this case, the server is the machine that the printer is connected to via USB, whereas the client is any networked machine that wants to print. Obviously all machines need to be on the LAN, and direct printing over USB should already be working on the server.

Server configuration

CUPS needs to be enabled, so;

chmod +x /etc/rc.d/rc.cups

The CUPS daemon will then start on boot, and it can be restarted for testing purposes by issuing;

/etc/rc.d/rc.cups restart

You should be able to access the CUPS interface in your web browser at http://localhost:631/[3841]

If you are using AlienBob's firewall config[3842] you will want to add these two firewall rules (modifying the x's as appropriate for your LAN);

$IPT -A udp_inbound -p UDP -s x.x.x.0/24 --destination-port 631 -j ACCEPT
$IPT -A tcp_inbound -p TCP -s x.x.x.0/24 --destination-port 631 -j ACCEPT

The CUPS help[3843] tells you to enable sharing via;

cupsctl --share-printers

but be careful as this will clobber your /etc/cups/cupsd.conf

The simplest configuration requires that CUPS listen on the LAN (rather than just the default of localhost). Inside /etc/cups/cupsd.conf the minimum necessary changes to the Slack 14.2 default are;

#Listen localhost:631
Port 631
<Location/>
Order allow,deny
Allow @LOCAL
</Location>

Your printer also needs to be set to shared. By default my HP LaserJet M402dn was shared, and you can check this in /etc/cups/printers.conf where there should be a line for your printer that says;

Shared Yes

printers.conf should not be edited while CUPS is running! You can stop it with;

/etc/rc.d/rc.cups stop

Sharing can also be enabled with the command;

lpadmin -p printer -o printer-is-shared=true

where 'printer' is the name of the CUPS printer (which can be found at CUPS printers[3844]). Note that this will not cause the printer to show as “Shared” on its CUPS page. E.g. my LaserJet says “HP_LaserJet_M402dn (Idle, Accepting Jobs, Not Shared, Server Default)”, however, this printer is in fact shared over the network. Adding the directive;

BrowseLocalProtocols dnssd

will cause the printer to show up as “Shared”, but I believe this is referring to printer browsing, and probably requires avahi. At any rate, it is not necessary for the simple sharing setup described in this guide.

Client configuration

Now that the server is configured, the client can be set up to print. I have only tested this on a Mac, which was as simple as opening the printer's IPP address in Safari (which then provides the option for adding the network printer). The printer's IPP address is nearly the same as the one found in CUPS (on the server). For example, on my CUPS server printer list[3845], I have this link;

http://localhost:631/printers/HP_LaserJet_M402dn

For the IPP address, simply replace the protocol, hostname, and remove the port. E.g.;

ipp://darkstar/printers/HP_LaserJet_M402dn

or more generally

ipp://server_hostname/printers/cups_printer_name

I have no experience with configuring clients on other operating systems, so the addition of that information would be appreciated.

Troubleshooting

If you are having difficulty, you can check the CUPS error log at http://localhost:631/admin/log/error_log[3846]

Sources

* Originally written by drgibbon[3847]

howtos, cups, printing, usb, share

Setting up a print server for home use out of any old Slackware box

After recently upgrading my home wifi network to use wpa2 my old edimax wifi print server stopped working due to incompatibility with wpa2. I did not want to have to leave a computer on all the time neither did I want to directly connect whatever PC I need to print from to the printer itself.

The most elegant solution would be to setup some low power ARM device (naturally running Slackware ARM) to become a print server, but any old hardware that can run Slackware linux will be fine and if you're willing to stick up with alternative distributions I suppose any hardware that can run linux will do.

I know it's not a difficult thing but since the last time I did something like this a lot of things have changed, I thought that other people could benefit from a quickstart to get going really fast … so here we go: (the steps blow assume that networking has already been setup correctly on all participants)

Setting up the printer on the print server

First thing you might find handy to know is that it is not mandatory to have the correct print filter for the printer on the print server, the client is mandated with that burden. The print server needs only have the printer configured as a raw printer.

The printer server will need cups, cyrus-sasl and openssl packages (openssl is only mandatory if you wish to remotely administer cups). If your printer has a usb interface, like most currently, it will be necessary to also have these packages to assist the usblp kernel module: libusb, libusb-compat and usbutils. Once the packages are installed if you then plug in the printer udev should automatically load usblp kernel module and lsusb should list, possibly amongst other things, your printer. This is the sort of output you need to see from lsusb to confirm that the printer is detected:

root@printserver:~# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 003: ID 0bda:0119 Realtek Semiconductor Corp. Storage Device (SD card reader)
Bus 001 Device 004: ID 0ace:1211 ZyDAS ZD1211 802.11g
Bus 001 Device 005: ID 04e8:3260 Samsung Electronics Co., Ltd CLP-510 Color Laser Printer
root@printserver:~#

If you can see something similar to this, where your printer is detected by lsusb, you can proceed otherwise you need to debug the reasons that are preventing your printer from being detected.

Once you have the packages and printer sorted out you can then just give execute permissions to /etc/rc.d/rc.cups and then start it. If you intend to remotely administer it you might like to execute this command to allow it:

cupsctl --remote-admin

then fire up your browser and access

http://<your print server ip>:631
or
http://localhost:631 on the printserver itself

For the most part you can use links on a text terminal on the print-server itself the only things that not working right on links are some combo box selections, that's why I then allowed for remote administration. Go ahead and configure the local printer as a raw printer. Be sure to check the box for a shared printer.You can call the printer whatever you like but for convenience in this guide we will call it “test”. Your /etc/cups/printers.conf should look like this:

<Printer test>
UUID urn:uuid:8d60a6be-4d86-3abf-5b8d-d5a03f10a753
Info test printer
Location test location
DeviceURI usb://Samsung/CLP-510?serial=xxxxxxxxxxxxx. #your setup will depend on the printer brand on how it is connected to the print server
State Idle
StateTime 16147
Type 4
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy abort-job
</Printer>

If you have the drivers for your printer you can optionally configure it with the correct print filter but it's not mandatory. If you do have them it might be a good idea to configure it right just to check that the printserver can correctly use the printer.

Once the printer is configured you can then instruct cups to accept remote printing requests:

cupsctl --share-printers --remote-any --remote-admin

If you're not interested to share the printer to outside your Local Area Net just remove the “–remote-any” option and by default cups will only serve printing requests from your LAN.

Some hardware platforms leave you no way to do a clean shutdown without interacting to the os running on it (like old AT PC or seagate dockstar). You can work around this problem by making a udev rule that executes a shutdown when the printer is removed (unplugged or turned off) so that when you're done printing, you turn off the printer, the print-server would shutdown along too without crashing.

Setting up the printer on the print clients

Now go on the PC's where you want to access the printer and configure an ipp remote printer with the correct driver for the printer. The /etc/cups/printers.conf should have an entry similar to this:

<Printer test>
UUID urn:uuid:6abca077-c999-3d8a-5ce0-41b7bd3c2ddf
AuthInfoRequired none
Info test
Location study room
MakeModel Samsung CLP-510, 2.0.0 #in this case I setup splix driver for the samsung printer but this entirely depends on my setup
DeviceURI ipp://<print server ip address>:631/printers/test
State Idle
StateTime 1387373858
Type 8400972
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy abort-job
</Printer>

You may now try printing a test page on the client PC.

Making the printserver crash proof

Once you have your print server working right you will probably want avoid doing anything to it unless it's really necessary. Looking after it's shutting down right and resolving fsck issues on reboot should not be something to worry about but journaled filesystems are meant to deal with accidental power rages not really for you to crash the system every time you switch it off.

Having the root filesystem mounted read only, with only the parts that are necessary for writing linked into tmpfs, would free us form having to worry about powering down the print server.

This is how I modified rc.S and rc.M for the job:

rc.S.org  2013-12-28 14:25:08.569250342 +0100
rc.S      2013-12-28 14:15:50.594483496 +0100
@@ -18,12 +18,31 @@
fi
fi
fi
+echo "timer" > /sys/class/leds/dockstar:green:health/trigger
+echo "125" >   /sys/class/leds/dockstar:green:health/delay_on
+echo "250" >   /sys/class/leds/dockstar:green:health/delay_off
+#
if [ -d /run ]; then
if ! grep -wq "tmpfs /run tmpfs" /proc/mounts ; then
/sbin/mount -v -n -t tmpfs tmpfs /run -o mode=0755
fi
fi
+( cd /run
+  /usr/bin/mkdir -p log/{cups,nfsd,samba} spool/{cups/tmp,mail} run/{cups/certs,dbus,dhcpcd/ntp.conf,dhcpcd/resolv.conf} tmp
+  /usr/bin/chmod a+rwxt tmp lock/subsys
+  for DIR in packages removed_packages removed_scripts scripts setup
+  do
+    /usr/bin/ln -s /var/static/$DIR log/$DIR
+  done
+  /usr/bin/ln -s /var/static/cron spool/cron
+  /usr/bin/touch /run/ld.so.cache
+)
# Load the loop device kernel module:
if [ -x /etc/rc.d/rc.loop ]; then
@@ -219,32 +238,32 @@
reboot -f
fi
# Remount the root filesystem in read-write mode
-  echo "Remounting root device with read-write enabled."
-  /sbin/mount -w -v -n -o remount /
-  if [ $? -gt 0 ] ; then
-    echo
-    echo "Attempt to remount root device as read-write failed!  This is going to"
-    echo "cause serious problems."
-    echo
-    echo "If you're using the UMSDOS filesystem, you **MUST** mount the root partition"
-    echo "read-write!  You can make sure the root filesystem is getting mounted "
-    echo "read-write with the 'rw' flag to Loadlin:"
-    echo
-    echo "loadlin vmlinuz root=/dev/hda1 rw   (replace /dev/hda1 with your root device)"
-    echo
-    echo "Normal bootdisks can be made to mount a system read-write with the rdev command:"
-    echo
-   -    echo "rdev -R /dev/fd0 0"
-    echo
-    echo "You can also get into your system by using a boot disk with a command like this"
-    echo "on the LILO prompt line:  (change the root partition name as needed)"
-    echo
-    echo "LILO: mount root=/dev/hda1 rw"
-    echo
-    echo "Please press ENTER to continue, then reboot and use one of the above methods to"
-    echo -n "get into your machine and start looking for the problem. "
-    read junk;
-  fi
+#  echo "Remounting root device with read-write enabled."
+#  /sbin/mount -w -v -n -o remount /
+#  if [ $? -gt 0 ] ; then
+#    echo
+#    echo "Attempt to remount root device as read-write failed!  This is going to"
+#    echo "cause serious problems."
+#    echo
+#    echo "If you're using the UMSDOS filesystem, you **MUST** mount the root partition"
+#    echo "read-write!  You can make sure the root filesystem is getting mounted "
+#    echo "read-write with the 'rw' flag to Loadlin:"
+#    echo
+#    echo "loadlin vmlinuz root=/dev/hda1 rw   (replace /dev/hda1 with your root device)"
+#    echo
+#    echo "Normal bootdisks can be made to mount a system read-write with the rdev command:"
+#    echo
+#    echo "rdev -R /dev/fd0 0"
+#    echo
+#    echo "You can also get into your system by using a boot disk with a command like this"
+#    echo "on the LILO prompt line:  (change the root partition name as needed)"
+#    echo
+#    echo "LILO: mount root=/dev/hda1 rw"
+#    echo
+#    echo "Please press ENTER to continue, then reboot and use one of the above methods to"
+#    echo -n "get into your machine and start looking for the problem. "
+#    read junk;
+#  fi
else
echo "Testing root filesystem status:  read-write filesystem"
echo
--- rc.M.org  2013-12-28 14:24:12.088970256 +0100
+++ rc.M      2013-12-28 14:15:56.890514695 +0100
@@ -17,7 +17,7 @@
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links:  /sbin/ldconfig &"
-  /sbin/ldconfig &
+  /sbin/ldconfig -C /run/ld.so.cache &
fi
# Screen blanks after 15 minutes idle time, and powers down in one hour

A bit of tinkering with links in var and a few other places and you're done.

root@printserver:~# ls -l /var/
total 0
lrwxrwxrwx  1 root root   3 Nov  4  2013 adm -> log/
drwxr-xr-x  5 root root 368 Jan  1  1970 cache/
drwxr-xr-x  2 root root 160 Oct 18  2013 empty/
drwxr-xr-x  7 root root 488 Jan  1  1970 lib/
lrwxrwxrwx  1 root root   9 Jan  1 01:29 lock -> /run/lock/
lrwxrwxrwx  1 root root  10 Jan  1  1970 log -> ../run/log/
lrwxrwxrwx  1 root root  10 Nov  4  2013 mail -> spool/mail/
drwxr-xr-x 12 root root 800 Nov 25  1993 man/
lrwxrwxrwx  1 root root  10 Jan  1  1970 run -> ../run/run/
lrwxrwxrwx  1 root root  15 Nov  4  2013 rwho -> /var/spool/rwho
lrwxrwxrwx  1 root root  12 Jan  1  1970 spool -> ../run/spool/
drwxr-xr-x  3 root root 232 Jul 15  2013 state/
drwxr-xr-x  8 root root 576 Jan  1  1970 static/
lrwxrwxrwx  1 root root  10 Jan  1  1970 tmp -> ../run/tmp/
root@printserver:~# ls -l /etc/ld.so.cache
lrwxrwxrwx 1 root root 16 Jan  1 01:06 /etc/ld.so.cache -> /run/ld.so.cache
root@printserver:~#  ls -l /run/log
total 40
-rw-r--r-- 1 root root     0 Jan  1 01:00 cron
drwxr-xr-x 2 root root   100 Jan  1 01:01 cups/
-rw-r--r-- 1 root root  1280 Jan  1 01:01 debug
-rw-r--r-- 1 root root 11512 Jan  1 01:00 dmesg
-rw-r--r-- 1 root root     0 Jan  1 01:00 maillog
-rw-r--r-- 1 root root 19290 Jan  1 01:06 messages
drwxr-xr-x 2 root root    40 Jan  1 01:00 nfsd/
lrwxrwxrwx 1 root root    20 Jan  1 01:00 packages -> /var/static/packages/
lrwxrwxrwx 1 root root    28 Jan  1 01:00 removed_packages -> /var/static/removed_packages/
lrwxrwxrwx 1 root root    27 Jan  1 01:00 removed_scripts -> /var/static/removed_scripts/
drwxr-xr-x 2 root root    40 Jan  1 01:00 samba/
lrwxrwxrwx 1 root root    19 Jan  1 01:00 scripts -> /var/static/scripts/
-rw-r--r-- 1 root root     0 Jan  1 01:00 secure
lrwxrwxrwx 1 root root    17 Jan  1 01:00 setup -> /var/static/setup/
-rw-r--r-- 1 root root     0 Jan  1 01:00 spooler
-rw-r--r-- 1 root root  2083 Jan  1 01:01 syslog
root@printserver:~# ls -l /run/spool/
total 0
lrwxrwxrwx 1 root root 16 Jan  1 01:00 cron -> /var/static/cron/
drwx--x--- 3 root lp   60 Jan  1 01:00 cups/
drwxr-xr-x 2 root root 40 Jan  1 01:00 mail/
root@printserver:~# ls -l /tmp
lrwxrwxrwx 1 root root 7 Jan  1 01:03 /tmp -> run/tmp/
root@printserver:~# mount
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime,mode=755)
devtmpfs on /dev type devtmpfs (rw,relatime,size=60180k,nr_inodes=15045,mode=755)
/dev/ubi0_0 on / type ubifs (ro,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620,ptmxmode=000)
cgroup on /sys/fs/cgroup type cgroup (rw,relatime,net_cls,freezer,devices,cpuacct)
root@printserver:~#

With these links the Slackware distribution will operate pretty much normally and can resume to ordinary operation by just remounting root read/write “mount -o remount,rw /” to allow some maintenance (like package management) and when that's done just remount it ro with a simple “mount -o remount,ro /”.

Here's my wifi print server

Here's one of my Dockstars in a homebrew casing running the above described printserver from internal flash. (the usb stick on top is a wifi stick)

Sources

Originally written by louigi600[3848]

howtos, print, server

iPXE boot server

iPXE is an open-source Preboot Execution Environment implementation that has a lot more functionality than most firmware PXE clients. Apart from using tftp to download data, iPXE can also use HTTP. Other boot methods include booting from an iSCSI SAN, a fibre channel SAN using FCoE, an ATA over Ethernet (AoE) SAN, or a wireless network. It also has a scripting language so you can create complex boot scripts. iPXE is also used as the PXE client in QEMU, so with a iPXE server you can boot virtual machines directly from a webserver.

In this article, we will configure a web server as a primary boot server. Because not all PXE clients can use HTTP, we will setup a simple tftp server to serve (or chain-load) the iPXE client itself.

Assumptions and prerequisites

We will use dnsmasq as DHCP and tftp server. We only need a minimal tftp setup and dnsmasq has a built-in server.

tftp root folder is /srv/tftproot.

Web server is www.mynetwork.com. Web server root is /var/www/htdocs.

We need a kernel and initrd file. Copy these from either a Slackware cd or mirror.

Configure DHCP and tftp server

Add following section to /etc/dnsmasq.conf:

dnsmasq.conf

# PXE booting: setup tftp server
enable-tftp
tftp-root=/srv/tftproot
# set tag "ipxe" if request comes from iPXE ("iPXE" user class)
dhcp-userclass=set:ipxe,iPXE
# if PXE request came from regular firmware, serve iPXE firmware
dhcp-boot=tag:!ipxe,undionly.kpxe
# if PXE request comes from iPXE, direct it to boot from HTTP
dhcp-boot=tag:ipxe,http://www.mynetwork.com/pxe/boot.txt

The first lines will activate the built-in tftp server and define the root folder. Then a tag is set to determine if the boot request is coming from an iPXE client. If the request is not coming from iPXE, the iPXE client itself is downloaded and executed. If the request came from iPXE, a boot script is downloaded from the webserver and executed.

The above section deals specifically with PXE booting. You will also need to setup basic DHCP functionality; see the DHCP server via dnsmasq[3849] article for that. To activate dnsmasq, make sure script /etc/rc.d/rc.dnsmasq is executable.

Create a new directory /srv/tftproot. Download the undionly.kpxe[3850] file from the iPXE website and copy to the /srv/tftproot directory. This is the iPXE client file which will be downloaded from the tftp server.

Webserver setup

Create a new folder /var/www/htdocs/pxe. From the Slackware CD or mirror, copy the following files: isolinux/initrd.img and kernels/huge.s/bzImage into the pxe folder. Now create a new text file boot.txt with the following content:

boot.txt

#!ipxe
initrd http://www.mynetwork.com/pxe/initrd.img
chain  http://www.mynetwork.com/pxe/bzImage load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 nomodeset SLACK_KERNEL=huge.s

This is all that is needed to create a PXE boot server. This is a very simple example that just boots the default huge installation kernel. To cater for more dynamic situations, you will have to create more complex boot scripts. Look at the examples page on the iPXE website.

Complex scripts

A more complex script with a boot menu is shown below:

boot.txt

#!ipxe
set mirror http://www.mynetwork.com
set dir mirror
menu Slackware installation menu
item slackware64-14.1    Slackware64 14.1
item slackware64-14.0    Slackware64 14.0
item slackware64-current Slackware64 current
item slackware-14.1      Slackware 14.1
item slackware-14.0      Slackware 14.0
item slackware-current   Slackware current
choose slackversion || exit 0
# boot arguments
set args load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 nomodeset SLACK_KERNEL=huge.s
# The APU system from PC Engines has the console on the serial port
set pcengines PC Engines
iseq ${manufacturer} ${pcengines} && iseq ${product} APU && set extraargs console=ttyS0,115200n8 ||
# load initrd and boot kernel
initrd ${mirror}/${dir}/${slackversion}/isolinux/initrd.img
chain  ${mirror}/${dir}/${slackversion}/kernels/huge.s/bzImage ${args} ${extraargs}

Note that you can also use a public Slackware mirror instead of hosting the files yourself. If you point to a slackware current mirror, you can boot the latest installation kernel directly from the internet !

Sources

The iPXE website: ipxe.org[3851] with many examples[3852].

Originally written by Frank Donkers[3853]

howtos, boot, pxe, ipxe, author fdonkers

NFS - Quick and Dirty Setup

Known to work on Slackware 14, 14.1 and 14.2

Assumptions

1) This HOWTO assumes that you are using a vanilla install of Slackware and have not changed the default HOSTS_ALLOW, HOSTS_DENY, or firewall rules.
2) For this example, the shared directory on the server will be /nfs_share
3) For this example, the mount point of the NFS share will be /mnt/nfs_share
4) We want anyone on our subnet (192.168.1.x) to have RW access the share

Overview

1) Setup the server
2) Setup the client
3) Mount the NFS directories on the client

Server Setup

Add the NFS shares to the /etc/exports file

vi /etc/exports

add:

/etc/exports

/nfs_share 192.168.1.1/24(rw,sync,no_subtree_check)

Start the NFS and RPC daemons

chmod 755 /etc/rc.d/rc.nfsd
chmod 755 /etc/rc.d/rc.rpc
/etc/rc.d/rc.nfsd start
/etc/rc.d/rc.rpc start

Export the shares

exportfs -a

Check to see if the shares are being shared

exportfs

Client Setup

Create the mount point

mkdir /mnt/nfs_share

Start the RPC daemon

chmod 755 /etc/rc.d/rc.rpc
/etc/rc.d/rc.rpc start

Mounting

On the CLIENT machine, you have 3 options here: manually mounting, auto-mount at boot, or semi-auto mount

MANUALLY MOUNT

mount my.nfs.server:/nfs_share /mnt/nfs_share

AUTO-MOUNT AT BOOT
Add the mount command to /etc/fstab

 vi /etc/fstab

add:

/etc/fstab

my.nfs.server:/nfs_share /mnt/nfs_share nfs rw,defaults 0 0

SEMI-AUTO-MOUNT
Add the mount command to /etc/fstab

 vi /etc/fstab

add:

/etc/fstab

my.nfs.server:/nfs_share /mnt/nfs_share nfs rw,noauto 0 0

then when you want to mount, just run:

mount /mnt/nfs_share

NOTE ABOUT AUTO_MOUNTING
If you mount at boot and the server machine is unavailable, it will cause your client machine to take a long time to boot as the NFS client will make multiple attempts to connect and you will have to wait for it to time-out for each attampt.

For The Impatient

All the steps with no explanation:
SERVER:

echo "/SHARED_DIR YOUR_SUBNET/24(rw,sync,no_subtree_check)" >> /etc/exports
chmod 755 /etc/rc.d/rc.nfsd
chmod 755 /etc/rc.d/rc.rpc
/etc/rc.d/rc.nfsd start
/etc/rc.d/rc.rpc start
exportfs -a

CLIENT:

mkdir /mnt/nfs_share
chmod 755 /etc/rc.d/rc.rpc
/etc/rc.d/rc.rpc start
echo "YOUR_NFS_SERVER:/SHARED_DIR /CLIENT_MOUNT_POINT nfs rw,defaults 0 0" >> /etc/fstab
mount /CLIENT_MOUNT_POINT

Problems/Solutions

PROBLEM: NFS shares won't mount on client box with a “Stale NFS file handle” error.
SOLUTION:
1) Forcibly unmount the directory on the CLIENT machine (if mounted):

umount -f /mnt/nfs_share

2) Flush the NFS registry on the SERVER machine:

exportfs -f

3) Remount the NFS share

4) No Root Squash: There are many options for NFS and I want to keep this article short but effective so I am leaving out many of the various configuration items that you could do. However there is one option that is worth mentioning, no_root_squash. By default NFS will downgrade any files created with the root permissions to the nobody user. This is a security feature that prevents privileges from being shared unless specifically requested. If I create a file as the root user on the client on the NFS share, by default that file is owned by the nobody user.

 root@client:~# touch /shared/nfs1/file2
root@server:/nfs# ls -la file2
-rw-r--r-- 1 nobody nogroup 0 Nov 18 18:06 file2

Sometimes it is important to share files that are owned as root with the proper permissions, in these cases this can be done by simply adding the no_root_squash attribute to the /etc/exports configuration.

Edit the /etc/exports file:

/nfs_share 192.168.1.1/24(rw,sync,no_root_squash)

Sources

* Originally written by arfon[3854]

howtos, software, nfs, slackware 13.37, slackware 14.0, slackware 14.1, author arfon

Subversion HowTo

This is a simple how to set up your own subversion (SVN) repository on Slackware. When I wanted to set this up myself I found a document on how to set it up on a much older Slackware version so I created this to document on a more current version (14.2 as of this writing).

Repository folder

Subversion and its tools are installed by default in Slackware so you simply need a place to store the repository.

Start by creating a folder for the SVN repositories:

mkdir -p /home/svn/repositories

Apache Config

Now we need to setup Apache

Edit /etc/httpd/httpd.conf

And uncomment the following three lines:

LoadModule dav_module lib64/httpd/modules/mod_dav.so
LoadModule dav_svn_module lib64/httpd/modules/mod_dav_svn.so
LoadModule authz_svn_module lib64/httpd/modules/mod_authz_svn.so

Now add a virtual host for the repository location to the Apache config:

 <Location /svn>
DAV svn
SVNParentPath /home/svn/repositories
AuthzSVNAccessFile /home/svn/.svn-policy-file
AuthName "Test SVN Repo"
AuthType Basic
AuthUserFile /home/svn/.svn-auth-file
Satisfy Any
Require valid-user
</Location>

This sets up a simple path based authentication.

SVN authentication and Users

Now setup the svn root directory by creating /home/svn/.svn-policy-file:

Here the * gives read to all users and I gave myself (enine) read write access to a repository called test

 [/]
* = r
[test:/]
enine = rw

Next we create the .svn-auth-file first user and the first user.

htpasswd -cs /home/svn/.svn-auth-file enine

-c tells htpasswd to create the file and -s uses sha1 for storing the password to add additional users simply remove the c option.

note that sha1 is not the most secure, you may wish to use htdigest or configure SSL in Apache to prevent password sniffing.

Now create a repository

svnadmin create --fs-type fsfs /home/svn/repositories/test

–fs-type fsfs creats the file-system based repoistory

And give Apache permissions over it

chown -R apache:apache /home/svn/repositories/test

If you didn't have Apache already running enable it

chmod +x /etc/rc.d/rc.httpd

And start Apache

/etc/rc.d/rc.httpd start

Now you can do a quick test

http://<server>/svn/test/

Sources

http://www.slackwiki.com/Subversion[3855]

subversion, SVN

VPN with Tinc

Tinc[3856] is open source software for creating VPNs, virtual private networks over other physical channel such as the Internet, where individual participating hosts (nodes) appear to applications as if connected by wire in LAN.

Overview

Tinc utilizes asymmetric cryptography. Each node has its own private key, a public key and another public key; one for each participating node. These files are, together with a few configuration files, stored in /etc/tinc/<VPN name> directory.

Each node also runs a daemon (or multiple daemons, one for each separate VPN). Daemon listens on set port (default is 655) for incoming connections from other nodes. Only nodes with valid private keys can produce data decipherable with matching public keys and are thus granted access.

Public key file may contain not only key itself, but also public IP address (and port) of node to which it belongs. If set to, daemon will not wait for connections, but will attempt to connect to these known nodes.

Each node has its own IP address (in private address space) which, once the daemon is running, is assigned to virtual network interface. Any traffic coming from VPN is processed by the daemon and made come from that network interface, and any traffic send through that interface is also processed by the daemon and sent to VPN, all behind the scenes, transparent to applications.

Important feature of Tinc is that daemon can (and by default does) forward traffic for other nodes, e.g. if nodes A and B are behind NAT and can directly communicate with only node C, which has unrestricted internet access, or even do not know public key of each other, but C knows them both, C will happily forward traffic between/for them. They just need to know IP addresses (in private address space).

Installation

Download sources from http://www.tinc-vpn.org/download/[3857]

Unpack and compile.

# ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var
# make
# make install

If you prefer to have Tinc somewhere aside, change prefix. Try DESTDIR if you want to temporarily install somewhere else:

$ make DESTDIR=/somewhere/else install

Configuration

Either create initial configuration (also generates private and public keys for node), which means directory in /etc/tinc named after VPN with some initial files it.

# tinc -n VPNtest init node1

Or generate only private/public key pairs. Place private keys to /etc/tinc/<VPN name>, merge public keys into one file and place it further into subdirectory /etc/tinc/<VPN name>/hosts.

$ tinc -c . generate-keys
$ mkdir -p VPNtest/hosts
$ mv *.priv VPNtest/.
$ cat rsa_key.pub ecdsa_key.pub > VPNtest/hosts/node1
$ rm rsa_key.pub ecdsa_key.pub

Fine-tune configuration in /etc/tinc/<VPN name>/tinc.conf. Skip ConnectTo if deamon should passively wait for connections. Interface is name of virtual network card, see more below. Optionally set listening port, especially if you intend to run multiple daemons/VPNs.

tinc.conf

Name = node1
ConnectTo = node2
Interface = vpnNIC
Port = 6655

Configure virtual network interface in /etc/tinc/<VPN name>/tinc-up. Do not manually create interface (via ip command), Tinc daemon will do that for you, just write down configuration for IP level. Also, make tinc-up file executable.

tinc-up

#!/bin/sh
ip addr add 192.168.1.1/24 dev vpnNIC
ip route add 192.168.1.0/24 dev vpnNIC
ip link set vpnNIC up

Create tinc-down script that deconfigures VPN interface when VPN shuts down. Make the file executable too.

tinc-down

#!/bin/sh
ip link set vpnNIC down
ip route del 192.168.1.0/24 dev vpnNIC
ip addr del 192.168.1.1/24 dev vpnNIC

Fine-tune public key file in /etc/tinc/<VPN name>/hosts/<this node>. Public IP may be also a hostname/domain, which is convenient in case you e.g. change ISP, but keep DNS name. Port should be same as in tinc.conf, but may differ if e.g. you are behind NAT with port forwarding from one port number to different port number. Let other nodes have this file and place their public key files here.

node1

Address = <public IP address> [port]
Subnet = 192.168.1.1/32
-----BEGIN RSA PUBLIC KEY-----
...

Repeat process on (or for) other nodes, use different names for nodes and different private space IPs. Again, let nodes have each other's public key (or host) file.

Start daemon, optionally specify debug level (0-5 where 5 is most eloquent) and where-to-log file.

# tincd -n VPNtest --debug=5 --logfile=/var/log/VPNtest.log

Windows

For sake of completeness, as you might want to e.g. build a VPN with Linux machine as fileserver accessed by Windows, remote-manage bunch of Windows behind NAT from Linux, play games, whatever, let's cover also Windows (XP, 7 and 8 are known to work).

Installation

Download binary package.

Install Tinc software.

Preferably uninstall any possible existing TUN/TAP devices (virtual NICs). Tapinstall utility is part of Tinc package, should be in its install dir somewhere.

C:\path\to\tapinstall.exe remove tap0901

Install new TUN/TAP device.

C:\path\to\tapinstall.exe install OemWin2k.inf tap0901

Device drivers actually seem to come from OpenVPN project. Which is good, because they are signed; Windows are quite hostile towards unsigned drivers lately.

Configuration

There are a few differences in Windows configuration.

You still generate initial configuration files, but place them in into where Tinc is installed, which should be something like C:\Program Files\tinc\<VPN name>

In tinc.conf, omit Interface directive, because Tinc daemon will then automatically select TUN/TAP device and directive may do more harm than good. Especially if Tinc service starts and fails immediately, check that Interface is not set.

Tinc-up script is not used on Windows. You created persistent TUN/TAP device during installation (did you?) and now only manually configure IP (run ncpa.cpl, see properties of device and so on). This can be also scripted with command such as:

netsh interface ip set address name="Local Area Connection number" static <IP address> <mask>

But be warned: when created, TUN/TAP device can aquire pretty much any number in name, most likely 2, but not always.

Finally, install (and start) Tinc service:

C:\path\to\tincd.exe --debug=5 --logfile=C:\path\to\file.log -n VPNtest

Or, if service already exists, start service:

cmd> net start tinc.VPNtest

RC script

Here is some script to start all VPNs on boot.

#!/bin/sh

VPNS=$(ls /etc/tinc)

start () {
for VPN in $VPNS; do
echo "Starting tinc daemon for $VPN..."
/usr/sbin/tincd -n "$VPN" -d1 --logfile=/var/log/tinc."$VPN"
done
}

stop () {
for VPN in $VPNS; do
echo "Stopping tinc daemon for $VPN..."
/usr/sbin/tinc -n "$VPN" stop
done
}

restart () {
stop
sleep 1
start
}

case "$1" in
("start")
start
;;
("stop")
stop
;;
("restart")
restart
;;
(*)
echo "Usage: $0 <start|stop|restart>"
exit 1
esac

exit 0

Save it as e.g. /etc/rc.d/rc.tinc, make executable and then add line to rc.local.

rc.local

/etc/rc.d/rc.tinc start

Sources

Tinc website/documentation http://www.tinc-vpn.org[3858]

howtos, network

Installing a Conan Exiles Dedicated Server

This article will guide you through the installation and configuration of a Conan Exiles Dedicated Server. Conan Exiles[3885]

The Conan Exiles Dedicated Server is not available for Linux but, it does work under Wine.

Installing the Conan Exiles server and keeping it updated, requires that you use the Steam updater (SteamCMD).

The Steam updater and the game's server binaries are currently 32-bit, but the dedicated server is 64bit but so you MUST install the Slackware multilib setup and 64bit Wine in order to install and run it.

You MUST have Slackware64 since the dedicated server is 64bit.

Preparing your Server

Install multilib packages. From AlienBOB's instructions, as root:

cd ~
lftp -c 'open http://slackware.com/~alien/multilib/ ; mirror -c -e 14.2'
cd 14.2
upgradepkg --reinstall --install-new *.t?z
upgradepkg --install-new slackware64-compat32/*-compat32/*.t?z
reboot

If you do not have X-windows installed (e.g. many VPS services), you should install X otherwise you will need to figure out how to do a “wine –without-x” install. X doesn't have to actually be configured but, it needs to be present.

slackpkg install sackware64/x

Install 64bit Wine. Install Wine from Slackbuilds.org:

ADD option: WIN64=yes

STRONG SUGGESTION: Run the server as user 'steam':

adduser steam

Steam updates to the Conan Exiles Dedicated Server must be done with the steamcmd[3886] program.
A Steam user account is not required as the server is installed and updated with an anonymous connection.

You will now continue as the user “steam”:

su - steam

Download and extract the archive containing “steamcmd” binary.

mkdir Downloads
cd Downloads
wget http://media.steampowered.com/client/steamcmd_linux.tar.gz
mkdir -p ~/steamcmd
tar -C ~/steamcmd -xvf steamcmd_linux.tar.gz

Do not extract the contents of the updater tool to the regular Steam Client folder!

Launch SteamCMD for the first time:

cd ~/steamcmd
./steamcmd.sh

The program will automatically update and enter you in to a Steam> prompt. Type “help” for more information. You can “exit”.

Download and install the Conan Exiles Dedicated (Sandbox) Server:

./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir /home/steam/Conan_Exiles/ +app_update 443030 validate +quit

This will have populated the “~steam/Conan_Exiles/” directory with the dedicated server.

Starting the Game Server

The SteamCMD utility will have installed the CEDS windows binaries in the subdirectory you specified with the “force_install_dir” parameter, in our example case, that directory is “/home/steam/Conan_Exiles”.

You can start the Conan Exiles game server directly in X-WINDOWS using the following commands:

cd  ~/Conan_Exiles
wine ConanSandboxServer.exe -log

-OR-

You can forego the use of X-Windows and run it directly from a command line with the following commands:

cd ~/Conan_Exiles
Xvfb :2 -screen 0 640x480x24 &
DISPLAY=:2 wine ConanSandboxServer.exe -log

When starting the game, it will appear to freeze a couple of times but, it's actually loading data. Be patient.

To customize your server, edit the Engine.ini and ServerSettings.ini found in ~/Conan_Exiles/ConanSandbox/Saved/Config/WindowsServer/ . There's plenty of documentation online about how to configure these files but at minimum, you probably want to set:

ServerName=
AdminPassword=
serverRegion=
MaxNudity=

QueryPort, ServerPort, & Port parameters apparently don't work. If you want to run multiple instances of the server, you need to install and run them in containers.

Because this is a game server, you do not want to be forced to keep a terminal opened all the time while the server is running. Therefore it is much more convenient to run the server in a “screen” session.

Stopping the Game Server

To stop the game server, all you have to do is CTRL-C in the console/window in which you are running it.

If the server is running in the background (or you need to script stop it):

kill -SIGINT $(ps aux | grep ConanSandboxServer | grep -v grep | awk '{print$2}')

Update the game server files

You can either manually update the game files or set up a cron job and automate the process. To manually update, stop the server (CTRL-C) and run this:

cd ~/steamcmd; ./steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir /home/steam/Conan_Exiles/ +app_update 443030 validate +quit

…then restart the server.

If you are running mods, update them with this:

steamcmd.sh +@sSteamCmdForcePlatformType windows +login anonymous +force_install_dir "[TEMPORARY_DOWNLOAD_DIRECTORY]" +workshop_download_item 440900 [MOD_NUMBER] +quit
find /home/steam/ConanExilesMods/steamapps/workshop/content/440900/ -type f -name "*.pak" | xargs cp -t [DEDICATED_SERVER_DIRECTORY]/ConanSandbox/Mods/

Where:
[TEMPORARY_DOWNLOAD_DIRECTORY] is a temporary download directory (e.g. /home/steam/ConanExilesMods/)
[MOD_NUMBER] is the Workshop mod number (e.g. 344356)
[DEDICATED_SERVER_DIRECTORY] is your dedicated server install directory (e.g. /home/steam/Conan_Exiles/)

It is good practice to let the Steam components update themselves. You can use a cron job to run an update once a day or at whatever interval you like..

Enjoy the game!

Known Issues/Troubleshooting

As of this writing, the following are known issues-

If your system does not have enough memory (RAM), the server will start and abruptly die with no errors after loading many of the files. 1GB is known to be too low, 5GB is the MINIMUM RAM you can have but, you should have 6GB or more to be playable.

NPCs/dynamic content missing/gone/not re-spawning- You probably set LandClaimRadiusMultiplier to “0”. Set it to AT LEAST .2 and restart your server.

Engine.ini parameters ServerPort, Port, and QueryPort do not work. You can not run two (or more) instances of CEDS on one machine and have the additional servers show on the Official Server List. When you start additional servers on the same machine the port automatically increments (7777–>7778–>7779).

Troubleshooting-

If you start the server with the “-log” option, the server logs are found in INSTALL_DIR/ConanSandbox/Saved/Logs/ (in our instructions it would be /home/steam/Conan_Exiles/ConanSandbox/Saved/Logs/).

If you're running mods and the server starts but you cannot connect to it and are getting the “Mods don't match” error but, your mod DO match, the problem is that a mod is failing to load. Check the logs and see which one is failing (usually indicated by a “__ unloaded from precache” entry).

Sources

Originally written by arfon[3887]

howtos, games, server, steam, author arfon

HOWTO articles - Games

A collection of articles about playing games, or hosting game servers on your Linux computer.

Inspired? Want to write a Games HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Games HOWTOS

Page
Description
Tags

Installing a Conan Exiles Dedicated Server
Installing a Conan Exiles Dedicated Server This article will guide you through the installation and configuration of a Conan Exiles Dedicated Server. Conan Exiles The Conan Exiles Dedicated Server is not available for Linux but, it does work under Wine. Installing the Conan Exiles server and keeping it updated, requires that you use the Steam updater (SteamCMD).
howtos, games, server, steam, author arfon

Half-Life
Half-Life Half-Life is a proprietary FPS game. Dedicated Server This article will guide you through the installation and configuration of a Half-Life Dedicated Server (HLDS). Half-Life was Valve Software's first game. Even though it was released in 1998, it is still very popular among on-line gamers.
howtos, games, server, steam

howtos, topic page

program name

Prerequisites

Installation

program name is distributed with Slackware since <VERSION>.

program name is available at SBo[3888].

Usage

Documentation

howtos, software

Half-Life

Half-Life is a proprietary FPS game.

Dedicated Server

This article will guide you through the installation and configuration of a Half-Life Dedicated Server (HLDS). Half-Life[3889] was Valve Software's[3890] first game. Even though it was released in 1998, it is still very popular among on-line gamers.
Running a Half-Life server is fun for you and your friends. The Half-Life game is resource-friendly and fast -even on not-too-new hardware. Running a Half-Life server allows you to choose the list of maps which will be rotated on your server or other forms of customization (like password-protecting the server so that you determine who can join the games).

The Half-Life Dedicated Server has been available for Linux ever since the game was released. However the game itself has only recently been ported to Linux. It has become available as the first commercial game for the native Linux port of the Steam client in early 2013. Together with the free-to-play Team Fortress 2 you have two very good reasons to start playing games in the Steam content platform.

Installing the Half-Life server and keeping it updated, requires that you use the Steam updater.

The Steam updater and the game's server binaries are currently all 32-bit, so you must run 32-bit Slackware or a 64-bit multilib setup in order to install and run it.

Deciding on a Server host

The Steam program as well as the game servers that run under Steam, are 32-bit programs. It makes most sense to run the server on a 32-bit Slackware host.

If your server is 64-bit Slackware, and you do not want to install multilib, then you have two options:

setup a 32-bit Slackware in a LXC container. Slackware supports LXC (an OS-level light virtualization[3891] solution) out of the box.
For an example of how to do this see Ponce's blog[3892].

setup a 32-bit Slackware in a Virtual Machine (using QEMU or VirtualBox for instance).

The virtual 32-bit Slackware machine does not have to be a full installation. You can set up a minimal Slackware that uses less than 500 MB of diskspace. See this article[3893] for more information about a “minimal Slackware” installation.

Preparing your Server

As the “root” user, you first create a dedicated user account which the HLDS server will run as. Running a game server as root is a bad idea. Always prepare for the worst and give your services the lowest privilege level that it needs to function.

# groupadd steam
# useradd -g steam -m -d /home/steam -c "Steam server account" -s /bin/bash steam

Then set a password for the new “steam” account:

# passwd steam

As of 14 feb 2013, steam updates to the Half-Life Dedicated Server must be done with the steamcmd[3894] program instead of the old hldsupdatetool[3895] which no longer runs on a modern distro like Slackware 14 .
This requires the use of a Steam user account. Either use your own gaming account (but make sure you are logged out when you run steamcmd) but this is really not recommended. Rather, you should create a separate Steam account[3896] for your server - the accounts are free.

In the example below, I will use the directory “~/server” as the HLDS “working area”, where the SteamCMD utility will download the server binaries and game files, and where we will keep the scripts that operate the server.
The idea is to keep your own downloads and the Steam downloads separate, this avoids issues later on.

You will now continue as the user “steam”:

# su - steam

Create a logging directory, we will be using that later:

$ mkdir ~/server/logs

Download and extract the archive containing “steamcmd” binary.

$ mkdir downloads
$ cd downloads
$ wget http://media.steampowered.com/client/steamcmd_linux.tar.gz

We are going to extract this tarball into a separate subdirectory inside our server working area:

$ mkdir -p ~/server/steamcmd
$ tar -C ~/server/steamcmd -xvf steamcmd_linux.tar.gz

Do not extract the contents of the updater tool to the regular Steam Client folder!

Launch SteamCMD for the first time:

$ cd ~/server/steamcmd
$ ./steamcmd.sh

The program will automatically update and enter you in to a Steam> prompt. Type “help” for more information.

To download the Half-Life game server files, you login to your Steam server account:

Steam> login <username>

Enter your password. Then check your e-mail for your Steam Guard access code and enter it (you will only need to do this once per computer).
You should see a message stating that you have successfully logged in with your account.

Set your server install directory. In this article, we will use a subdirectory “hlds_l” in the server's “working” directory, not a subdirectory of the directory where steamcmd is located - we need to enter a full path:

Steam> force_install_dir /home/steam/server/hlds_l/

Install or update the HLDS game server files. Every Steam application has its own “app_id” or “Steam Application ID” which will be one of the parameters. You can find the AppId for the game(s) you want to download here: https://developer.valvesoftware.com/wiki/Steam_Application_IDs[3897] .

Steam> app_update <AppID>

For Half-Life Dedicated Server, the AppID is “90”. We want to download, install and validate HLDS:

Steam> app_update 90 validate

Once the download and update is finished, type “quit” to properly log off of the Steam servers.

Steam> quit

This will have populated the “~steam/server/hlds_l” directory (it is of course an arbitrary name, pick any name you like) with the Half-Life Dedicated Server binaries (hlds*) as well as full game content for Half-Life in its sub-directory “valve”. A total of around 410 MB.

Starting the Game Server

The SteamCMD utility will have installed the hlds linux binaries in the subdirectory you specified with the “force_install_dir” parameter, in our example case, that directory is “~steam/server/hlds_l”. The Half-Life game files will have been downlloaded to the “valve” subdirectory below that (other games such as Counter Strike all get their own separate subdirectory).

You can start the Half-Life game server directly using the following commands:

$ cd ~/server/hlds_l
$ ./hlds_run -game valve +maxplayers 4 +map crossfire +exec server.cfg

If your server is multi-homed (i.e. it has multiple IP addresses) or you want to run the server on a non-standard port, then you may be required to add commandlin parameters like “+ip 192.168.1.1 +port 27015”.

Check out the file “server.cfg” in the “hlds_l/valve” directory, it determines how your HLDS behaves. Some important “sv_” variables which you definitely should configure are:

// Show my contact email:
sv_contact "alien@slackware.com"
// We report ourselves as an European server:
sv_region 3
// default server name. Change to "Bob's Server", etc.
// hostname "Half-Life"
hostname "Alien BOB's server"
// Allow clients to download maps
sv_allowdownload 1
// Allow clients to upload decals
sv_allowupload 1
// LAN only play
//sv_lan 1
// Use this if clients need a password to join:
//sv_password "sesame"

Because this is a game server, you do not want to be forced to keep a terminal opened all the time while the server is running. Therefore it is much more convenient to run the server in a “screen” session, using a start script like this one which also configures your screen session to log all output to a file:

$ cat <<EOT > /home/steam/server/start_hlds.sh
#!/bin/bash
cd server/hlds_l
screen -A -mdLS hlds_valve -c /home/steam/.screenrc \
./hlds_run -console -game valve -pingboost 2 -pidfile hlds.pid \
+sys_ticrate 1000 +sv_maxupdaterate 100 +ip 192.168.1.1 +port 27015 +maxplayers 4 +map crossfire +cpu 1
EOT
$ chmod +x /home/steam/server/start_hlds.sh
$ cat << EOT > /home/steam/.screenrc
log on
logfile /home/steam/server/logs/hlds_screen.log
EOT

Now you can run this start script and it will start the Half-Life Dedicated server in a screen session. If you want your Slackware server to start the HLDS automatically on boot. you can add lines like this to your /etc/rc.d/rc.local file:

# Start the Half-Life Dedicated Server:
if [ -x /home/steam/server/start_hlds.sh ]; then
echo "Starting the Half-Life Dedicated Server:  ~steam/server/start_hlds.sh"
su - steam -c "server/start_hlds.sh"
fi

Automatically update the game server files

It is good practice to let the Steam components update themselves. You can use a cron job to run an update once a day.

Create a wrapper script which updates the game(s) automatically.
Create a new file “~/server/steamwrapper.sh” as follows:

$ cat <<EOT > ~/server/steamwrapper.sh
#!/bin/sh
/home/steam/server/steamcmd/steamcmd.sh +runscript /home/steam/server/hlds_steamcmd_update.txt
EOT
$ chmod 755 ~/server/steamwrapper.sh

The runscript which is used there, contains the commands which are passed to SteamCMD. The file looks like this:

// Update hlds (valve directory, app_id 90)
login my_user my_pass
force_install_dir /home/steam/server/hlds_l
app_update 90 validate
exit

And then configure the steam user's cron table to call the script once a day. Run this command to start the crontab editor:

crontab -e -u steam

and then add this line which will schedule the update at 03:55 every day:

55 3 * * *     /home/steam/server/steamwrapper.sh 2>&1 | tee -a /home/steam/server/logs/cron.log

Enjoy the game!

Custom server maps for small servers

If you enjoy close-combat games with your friends, some relatively small (less than 8 players) and enjoyable maps can be found here: http://alienbase.nl/half-life/[3898] .
Make sure that the friends who join your server, have downloaded your server's custom map pack before they join. This will prevent long in-game loading times. Downloading a map “in-game” may take as long as the actual cycle time of the map!
Custom maps go into the server's (and client's) “maps” subdirectory of the “valve” game directory.

Sources

Originally written by Eric Hameleers[3899]

howtos, games, server, steam

vms

An example using vms for creating and managing a qemu virtual machine

Installation

You need to install vde2, tigervnc and qemu first

Get the ready made package and install it, you should use the latest release

wget https://bitbucket.org/yotis/vms/vms-0.2.1-noarch-1did.tgz
upgradepkg --install-new vms-0.2.1-noarch-1did.tgz

Or use slackbuilds.org, eg via sbopkg

sbopkg -i vms

Creating vm1

Create the vm1 virtual machine and show the related configuration and files

vms create vm1
vms list
grep vm1 ~/.vms/vms.conf
ls ~/.vms/vm1

You can use the ~/.vms/vm1 directory to store anything you want, but this is not mandatory. The only thing that is needed is the ~/.vms/vm1/vm1.sh script.

To show the configuration of the vm1 virtual machine, use this

vms info vm1

You should be able to start vm1 now with

vms start vm1

To display the running status of vm1 use this

vms status vm1

If you want to kill vm1, you can do it like this

vms kill vm1

Now, add 2GB of memory

vms conf vm1 mem 2048

Let's create a 20G disk and attach it to vm1

cd ~/.vms/vm1
qemu-img create -f qcow2 disk0.img 20G
vms conf vm1 disk0 '~/.vms/vm1/disk0.img'

And now, let's add a cdrom and boot from it. If there is a slackware install dvd located in ~/os

vms conf vm1 bootcd ~/os/slackware64-14.2-install-dvd.iso
vms info vm1

Even though you can edit vm1's configuration via

vms conf

commands, you are encouraged to edit ~/.vms/vms.conf by hand. The format is very simple and since this file is sourced during vms execution you can be creative with bash variables. For example, you could configure shared storage for the os images by declaring a variable at the beginning of ~/.vms/vms.conf.

ISOS=/path/to/isos

Then you would use the ISOS variable via 'vms conf' like this

vms conf vm1 bootcd '"$ISOS/slackware64-14.2-install-dvd.iso"'

Notice the use of single and double quotes.

Sources

Nikos Giotis

howtos, software, emulator, vms, qemu

Preface

Qemu is a popular and powerful open-source emulator often used for running KVM Virtual Machines (VMs). In fact qemu supports emulating so many things that it can be quite challenging, unless you do it very often, to manually start a VM from a text console. Who would want to write the below command for starting a VM ?

qemu-system-arm -name armedslack -M versatilepb -m 256 -k en-us -vnc :5,password -usb -kernel /VM/armedslack/zImage-versatile -initrd /VM/armedslack/initrd-versatile -append 'root=/dev/sda1 rootfs=ext2' -monitor telnet:127.0.0.1:1035,server,nowait  -drive file=/VM/armedslack/qemu_hdu.raw,index=0,media=disk -drive file=,index=1,media=cdrom  -net nic,macaddr=52:54:57:c0:2c:bb -net tap,ifname=tap5

Not everyone might want console redirect on vnc and monitor redirect via telnet but non the less that's still a relatively small subset of the options supported by qemu-system-arm and only has one disk one cdrom and one Network Interface Controller (NIC) so things can be much worse then this.

Is is common, for people running qemu VMs, to use some sort of software for creating, running and maintain the VMs. If you want an easy way out you might consider virtmanager or something like that. Personally I chose to manage my VMs from text console because for me it's an added value to be able to do such jobs even without GUI, so possibly like many others I wrote my onw scripts for managing my qemu VMs.

Over the years I've radically changed the helper script form having text configuration files for each VM to a centarl VM configuration database. I'd like to share my experience in doing so without presumptuously declaring that I do this any better then anyone else, letting you decide what's good or bad for your needs. It's likely that someone else has done this and a lot better then me but nevertheless I'd still like to hare with you the route I took.

Problems

Here are the problems that governed my choices:

ability to run both x86 and ARM virtual machines

ability to run several VMs simultaneously

have the VMs appear as a real server in the LAN

flexibility on the number of disks assigned to a VM

flexibility on the number of NICs assigned to a VM

avoid conflicts on VM console vnc port

avoid conflicts on VM monitor port

Wanting the VMs to appear like real servers on the LAN, along with my other requirements, made me opt for bridged tap NICs, which in turn created another potential conflict on the tap device ans MAC address.

Using the initial, per VM text based configuration, started to make it difficult to deal with such issues automatically (making the code unnecessarily long and complex) while manually creating a configuration file for a new VM required looking for information across all previously configured VMs to avoid potential conflicts.

Proposed Solution

It quickly became apparent to me that the VM configuration would need to be generated rather then manually created and that a central configuration repository would much aid the process. Again a text based central configuration file would make, either the code or the config file, inherently complicated (having to deal with an arbitrary number of VMs each with arbitrary number of disks and NICs). Having some experience on database administration made it a little unappealing to use LDAP for central repository and even if I had no DB experience at all I doubt I'd actually want the overhead of running LDAP just for this. Running MariaDB or Postgres was equally unappealing too for my small requirements, so I chose to use sqlite3. In my case it would be extremely rare that, 2 or more simultaneous executions of the management script, make a mess on the DB but if you have several people managing creating or deleting VMs you might want to opt for MariaDB or Postgres.

Another thing that quickly became apparent was the almost repetitive code required to prompt for all the options so I decided to address that in 2 ways:

have as much of the promoting automatically generated with a clever workaround

use dialog to further simplify the UI for prompting

Basic Configuration

To get better flexibility for configuring where things are stored it's a good idea to have a basic configuration file that tells the management script where the important things are:

Path to folder that will contain all the VMs

Path to where the centralized VM configuration DB is

Path to where the ISO images are stored

I also find it handy to have ither parameters in the basic configuration:

MONITOR_START_PORT

SHUTDOWN_TIMEOUT (timeout for clean shutdown od a VM)

OS_RESERVED_MEM (how much memory is to be reserved for OS when prompting for how much RAM is to be assigned to a VM)

Here's an example of what the config file would look like:

VM_PATH='/VM'
VM_DB='/VM/vm.conf'
ISO_PATH='/ISO'
MONITOR_START_PORT='1030'
SHUTDOWN_TIMEOUT='300'
OS_RESERVED_MEM='512'

Getting the Management Script to Find the Basic Configuration

To make sure the management script can find this basic configuration no matter what I use a simple workaround: have the basic config in the same place as the management script and call it the same with “.conf” appended to it.

For example let's suppose the management script is /usr/local/bin/qemumgmt it's configuration file would be /usr/local/bin/qemumgmt.conf thus inside the management script I can load the basic configuration like this (or get the script to prompt for making one):

NAME=$(basename $0)
CWD=$(dirname $0)
[ -r ${CWD}/${NAME}.conf ] && source ${CWD}/${NAME}.conf || make_config

A smart Way to Produce Basic Configuration

Getting someone to use your script if it's difficult to configure is difficult so I opted for having the script prompt the user for it's mandatory configuration options and automatically create the basic configuration file if it's not there. I do this by using the make_config finction to which I refer th the above paragraph and a variable that holds the mandatory parameter list (there are also 2 function for manipulating input and generating a dialogs based on the input form_dialog and accept_dialog ):

SCRIPT_PARAMS="VM_PATH VM_DB ISO_PATH MONITOR_START_PORT SHUTDOWN_TIMEOUT OS_RESERVED_MEM"
form_dialog ()
{ TITLE=$1
shift
unset STRING
MAX=0
for A in $*
do
[ $((${#A} +3))  -gt $MAX ] && MAX=$((${#A} +3))
done
i=0
for A in $*
do
STRING[$i]="${A}: $(($i + 1))  1  \"$(eval echo "\$$A")\" $(($i + 1)) $MAX 40 0"
((i++))
done
eval $(echo dialog --title \"$TITLE\" --separator \'\;\' --form \"\" 0 0 0 ${STRING[*]} \2\>$DIALOG_OUTPUT )
}
accept_dialog ()
{ TITLE=$1
shift
unset STRING
MAX=0
for A in $*
do
[ $((${#A} +3))  -gt $MAX ] && MAX=$((${#A} +3))
done
i=0
for A in $*
do
STRING[$i]="${A} = $(eval echo "\$$A") \n"
((i++))
done
eval $(echo dialog --title \"$TITLE\" --yesno  \" ${STRING[*]}\" 0 0 ) && return 1 || return 0
}
make_config ()
{ ACCEPT=0
while [ $ACCEPT -eq 0 ]
do
form_dialog "Basic config for $NAME" $SCRIPT_PARAMS && IFS=';' read -r -d '\;' $SCRIPT_PARAMS < $DIALOG_OUTPUT
accept_dialog "Accept Configuration ?" $SCRIPT_PARAMS
ACCEPT=$?
done
( for PARAM in $SCRIPT_PARAMS
do
echo "${PARAM}='$(eval echo "\$$PARAM")'"
done
) > $CWD/${NAME}.conf
chmod 600 $CWD/${NAME}.conf
sleep 1
}

Isn't that nice? there's no specific code for each basic configuration option … everything is self generated from the SCRIPT_PARAMS variable. If you need to add another basic configuration option it's really fast … and as long as you give them names that speak for themselves it will also be easy to give them values when prompted via dialog.

This is what it would be like to get propted (with defaults) for the missing basic configuration:

             +-----------------Basic config for qemu_dialog--------------------+
| +-------------------------------------------------------------+ |
| |VM_PATH:            /VM                                      | |
| |VM_DB:              /VM/vm.conf                              | |
| |ISO_PATH:           /ISO                                     | |
| |MONITOR_START_PORT: 1030                                     | |
| |SHUTDOWN_TIMEOUT:   300                                      | |
| |OS_RESERVED_MEM:    512                                      | |
| +-------------------------------------------------------------+ |
|                                                                 |
+-----------------------------------------------------------------+
|                   <  OK  >          <Cancel>                    |
+-----------------------------------------------------------------+

Configuration Database

Having opted for a DB central configuration would require that all the items with arbitrary quantities per VM be on a separate table that references a parent VM table. My issue was on having arbitrary number of disks and NICs per VM, all the other stuff could be held in columns of a master VM table. Let's have a look at the tables

Master VM Table

In this table you will need to have all the biunique features of each VM expressly leaving out all features that do not have a one to one (VM ↔ feature) relationship. As mentioned before I want to have the possibility that each VM has both several disks and NICs so these features will be in separate tables for me. So the features that are required and biunique to each VM in my needs are:

Name

System Emulator

Machine Type

CPU

RAM

Keyboard Layout

Bios

Boot Order

Flag for KVM support

Display (in case console is to be redirected)

VNC Password

Flag for USB

Kernel Image

Initrd Image

Append Parameters for Kernel

Naturally to that we need to add a key for referencing the non biunique features of each VM. Here's the sql syntax for creating my VM master table (in sqlite3 dialect):

create table if not exists virtual_machines
( vm_id         integer primary key autoincrement,
vm_name       text unique not null,
vm_emulator   text not null,
vm_machine    text not null,
vm_cpu        text not null,
vm_mem        integer not null,
vm_kb         text not null,
vm_bios       text,
vm_boot_order text,
vm_kvm        intger not null,
vm_display    text,
vm_vnc_pw     text,
vm_usb        integer not null,
vm_kernel     text,
vm_initrd     text,
vm_append     text
);

Disks Table

This table will need to hold a column that ties (references) which VM owns the disk along with the infomation required to identify the disk:

Media Type (disk or cdrom)

Media File (where the disk image file is located on the host machine)

Status Flag (allow the VM to boot without the cdrom for example)

Here's the sql in sqlite3 dialect:

CREATE TABLE disks
( d_id          integer primary key autoincrement,
d_vm_id       integer  references virtual_machines(vm_id) on update cascade,
d_media       text not null,
d_file        text not null,
d_status      integer not null
);

NICs Table

Like the disks table this also needs to have a column that references the VM that owns the NIC along with the other information required to identify the NIC itself: ID (used to have unique tap devices) MAC Address

Here's the sql in sqlite3 dialect:

CREATE TABLE nics
( n_id          integer primary key autoincrement,
n_vm_id       integer  references virtual_machines(vm_id) on update cascade,
n_mac         text not null
);

Real Data

Here's what the data inside my configuration database looks like:

sqlite> select * from virtual_machines;
1|ORACLE|qemu-system-i386|pc|kvm32|1024|en-us|file=/usr/share/qemu/bios.bin|c|1|vnc|ciccio|1|||
2|test|qemu-system-i386|pc|kvm32|1024|en-us|file=/usr/share/qemu/bios.bin|c|1|vnc|ciccio|1|||
3|ORACLE2|qemu-system-i386|pc|kvm32|1024|en-us|file=/usr/share/qemu/bios.bin|c|1|vnc|ciccio|1|||
4|freenas|qemu-system-x86_64|pc|host|3000|en-us|file=/usr/share/qemu/bios.bin|c|1|vnc|pafutometu|1|||
5|armedslack|qemu-system-arm|versatilepb||256|en-us|||0|vnc|cicciobello|1|/VM/armedslack/zImage-versatile|/VM/armedslack/initrd-versatile|root=/dev/sda1 rootfs=ext2
sqlite> select * from disks;
1|1|disk|/VM/ORACLE/disk0.qcow2|1
2|1|cdrom|/ISO/OL6.6-x86.iso|1
3|2|disk|/VM/test/disk0.qcow2|1
4|2|cdrom|/ISO/OL6.6-x86.iso|1
5|1|disk|/VM/ORACLE/disk1.qcow2|1
6|3|disk|/VM/ORACLE2/disk0.qcow2|1
7|3|cdrom|/ISO/OL6.6-x86.iso|1
8|4|disk|/VM/freenas/disk0.qcow2|1
9|4|disk|/VM/freenas/disk1.qcow2|1
10|5|disk|/VM/armedslack/qemu_hdu.raw|1
11|5|cdrom||1
sqlite> select * from nics;
1|1|52:54:54:e7:30:88
2|2|52:54:54:ec:97:85
3|3|52:54:54:f6:cd:f9
4|4|52:54:57:be:b5:2e
5|5|52:54:57:c0:2c:bb
sqlite>

There is however a problem with using foreign keys with sqlite3, sometimes when you delete rows and the referenced rows in the PARENT table, the internal sqlite_sequence table can enter an inconsistent state inhibiting any further insertions on the child tables. This can be worked around by careful handling of both the tables and the internal sqlite_sequence table.

A Smart Way to Input Data For New VM

As mentioned above, getting bugged with all the details required for configuring a new VM can be a a killer unless you do it really often so here's how I go about it in a similar fashion to creating the basic configuration. The idea is to reduce the amount of code written specifically to each VM option allowing for a relatively slender script and ease to add new VM options if required.

Unfortunately here things are a little more complicated because different qemu-system-* produce slightly different output when prompted with help and because most of the VM options require a separate dialog asking for some specific action nonetheless a lot of the code required is self generated from the PARAMS variable. The only specific code is to work around the differences between the various qemu-system-* emulators.

PARAMS="EMULATOR MACHINE CPU MEM KEYBOARD DISK DISKSIZE CDROM BIOS BOOT_ORDER KVM DISPLAY VNCPW USB KERNEL INITRD APPEND MAC"
create_vm ()
{ if [ $# -lt 1 ]
then
while [ "$VM_NAME" = "" ]
do
dialog --inputbox "Choose Virtual Machine Name
N.B. The following names are already in use
$(list_vm_names)
" 0 0  2>$DIALOG_OUTPUT
VM_NAME=$(< $DIALOG_OUTPUT)
done
else
VM_NAME=$1
fi
get_vm_id $VM_NAME
VM_ID=$?
while [ $VM_ID -ne 0 ]
do
dialog --inputbox "$VM_NAME is already in use, pick another one
N.B. The following names are already in use
$(list_vm_names)
" 0 0 2>$DIALOG_OUTPUT
VM_NAME=$(< $DIALOG_OUTPUT)
get_vm_id $VM_NAME
VM_ID=$?
done
radiobox_dialog "Choose the type of system to be emulated" $(find ${PATH//:/ } -type f -executable -name "qemu-system-*" -printf "%f ")
EMULATOR=$(< $DIALOG_OUTPUT)
case $EMULATOR in
qemu-system-i*86|qemu-system-x86_64)
MACHINE=pc
grep -qwE "vmx|svm" /proc/cpuinfo && KVM=1 || KVM=0
[ $KVM -eq 1 ] && CPU=host || CPU=pentium3
BIOS="file=/usr/share/qemu/bios.bin"
BOOT_ORDER="c"
;;
qemu-system-arm)
KVM=0
choose_machine $EMULATOR
MACHINE=$(< $DIALOG_OUTPUT)
choose_arm_cpu $MACHINE
CPU=$(< $DIALOG_OUTPUT)
;;
*) echo "unsupported yet" ; exit 1 ;;
esac
choose_mem_size
MEM=$(< $DIALOG_OUTPUT)
choose_keyboard
KEYBOARD=$(< $DIALOG_OUTPUT)
KEYBOARD=${KEYBOARD:-"en-us"}
choose_iso
CDROM=$(< $DIALOG_OUTPUT)
choose_file $VM_PATH/$VM_NAME "Choose VM kernel"
KERNEL=$(< $DIALOG_OUTPUT)
if [ "$KERNEL" != "" ]
then
choose_file $VM_PATH/$VM_NAME "Choose VM initrd"
INITRD=$(< $DIALOG_OUTPUT)
choose_append
APPEND=$(< $DIALOG_OUTPUT)
unset BIOS
unset BOOT_ORDER
fi
choose_file $VM_PATH/$VM_NAME "Choose VM disk (cancel for default)"
DISK=$(< $DIALOG_OUTPUT)
if [ "$DISK" = "" ]
then
DISK="$VM_PATH/$VM_NAME/disk0.qcow2"
dialog --inputbox "Choose VM disk image size " 0 0 20G 2>$DIALOG_OUTPUT
DISKSIZE=$(< $DIALOG_OUTPUT)
fi
dialog --inputbox "Type VNC password for this VM" 0 0  cicciobello 2>$DIALOG_OUTPUT
VNCPW=$(< $DIALOG_OUTPUT)
DISPLAY=vnc
USB=1
MAC="52:54:$(date +%s |awk '{printf("%x",($1 / 16777216)%256)}'):$(date +%s |awk '{printf("%x",($1 / 65536)%256)}'):$(date +%s |awk '{printf("%x",($1 / 256)%256)}'):$(date +%s |awk '{printf("%x",$1 % 256)}')"
ACCEPT=0
while [ $ACCEPT -eq 0 ]
do
form_dialog "Configuration for $VM_NAME VM" $PARAMS && IFS=';' read -r -d '\;' $PARAMS < $DIALOG_OUTPUT
accept_dialog "Accept $VM_NAME configuration ?" $PARAMS
ACCEPT=$?
done
NEW_VM_ID=$(( $(count_configured_vms) + 1 ))
echo -e "PRAGMA foreign_keys = ON;
insert into virtual_machines values (null,'$VM_NAME','$EMULATOR','$MACHINE','$CPU',$MEM,'$KEYBOARD','$BIOS','$BOOT_ORDER',$KVM,'$DISPLAY','$VNCPW',$USB,'$KERNEL','$INITRD','$APPEND');
insert into disks values (null,$NEW_VM_ID,'disk','$DISK',1);
insert into disks values (null,$NEW_VM_ID,'cdrom','$CDROM',1);
insert into nics values (null,$NEW_VM_ID,'$MAC');" |sqlite3 $VM_DB
[ ! -d $(dirname $DISK) ] && mkdir -p $(dirname $DISK)
[ ! -f $DISK ] && qemu-img create -f qcow2 -o preallocation=metadata $DISK $DISKSIZE >/dev/null 2>&1
}

Networking

As mentioned above I want my VMs to look like real machines on the LAN the host server is connected on, this will require bridging the tap devices. Newer versions of qemu can automatically create and use tap device but I it will not do bridging and besides that it you need to tell it which tap device anyway. If you intend to run several VMs at once that all look like real servers on the LAN you will need to write qemu-ifup and qemu-ifdown scripts in /etc to deal with that.

I like to write a single script qemu-nethelper and have qemu-ifup and qemu-ifdown linked to it. The qemu-system-* emulators all execute /etc/qemu-ifup when bringing up a VM with a tap device, with the tap device parameter, and similarly execute /etc/qemu-ifdown when taking down a VM with a tap device.

As mentioned above newer versions of qemu (I think 1.1+) automatically create the tap device so the qemu-nethelper only needs to do the bridging. Now to make things a lot easier I like to have the host on which I run VMs with br0 configured at boot and then the qemu-nethelper only needs to add the tap device to the bridge, making it extremely simple. If br0 is already configured at boot then you need not restart any iptables so long as the chains use the bridge devices and the kernel has support for ebtables.

#!/bin/bash
NAME=$(basename $0)
tun_up ()
{ /sbin/ifconfig $1 0.0.0.0 promisc up
/usr/bin/sleep 0.5
/sbin/brctl addif br0 $1
}
tun_down ()
{ /sbin/ifconfig $1 down
/usr/bin/sleep 0.5
/sbin/brctl delif br0 $1
}
case $NAME in
qemu-ifup) tun_up $1;;
qemu-ifdown) tun_down $1;;
*) echo fail; exit 1;;
esac

Using Qemu from Unprivileged Users

Using root for doing your everyday tasks is commonly discouraged so let's see how we can work around using qemu from unprivileged users. Some say that it's sufficient to give sudo execution on /etc/qemi-if* but that not really enough because qemu-system-* needs to run as root or it will not be able to create the taps and access other resources. Although it is technically possible to give an unprivileged user sufficient privileges to execute correctly qemu-system-* emulators it is much easier to give users the sudo right to run qemu-system-* as privileged user.

User_Alias QEMUERS = al, john, jack
Cmnd_Alias QEMUCMD = /usr/bin/qemu-system-*
QEMUERS ALL=(ALL) NOPASSWD: QEMU

This would be sufficient to run the VMs as any of the unprivileged users in QEMUERS user alias (al, john, jack) but the management script would need to run sudo qemu-system-* …. this is easy to obtain:

[ $(/usr/bin/id -u) -ne 0 ] && CMD="sudo qemu-system-.... " || CMD="qemu-system-...."
eval $(echo "$CMD &")

Alternatively you could give privileges to execute the management script as root.

Examples

Here are examples of the dialogs that user would see wile creating, starting, stopping and deleting a VM. q

VM Creation Example

+-----------------------------------------------+
| Choose Virtual Machine Name                   |
| N.B. The following names are already in use   |
| ORACLE                                        |
| ORACLE2                                       |
| armedslack                                    |
| freenas                                       |
| test                                          |
| +-------------------------------------------+ |
| | test2                                     | |
| +-------------------------------------------+ |
+-----------------------------------------------+
|           <  OK  >      <Cancel>              |
+-----------------------------------------------+

+-------------------------------+
| Choose the type of system to  |
| be emulated                   |
| +---------------------------+ |
| | (*) qemu-system-x86_64  1 | |
| | ( ) qemu-system-arm     2 | |
| | ( ) qemu-system-i386    3 | |
| +---------------------------+ |
+-------------------------------+
|     <  OK  >   <Cancel>       |
+-------------------------------+

+-------------------------------+
| Choose VM memory size in Mb   |
| (max 3421 Mb)                 |
| +---------------------------+ |
| |1024                       | |
| +---------------------------+ |
+-------------------------------+
|     <  OK  >   <Cancel>       |
+-------------------------------+

+------------------------------+
| Choose VM Keyboard layout    |
| (cancel for default en-us)   |
| +--------------------------+ |
| |      (*) ar     1        | |
| |      ( ) de-ch  2        | |
| |      ( ) es     3        | |
| |      ( ) fo     4        | |
| |      ( ) fr-ca  5        | |
| |      ( ) hu     6        | |
| |      ( ) ja     7        | |
| |      ( ) mk     8        | |
| |      ( ) no     9        | |
| |      ( ) pt-br  10       | |
| |      ( ) sv     11       | |
| |      ( ) da     12       | |
| |      ( ) en-gb  13       | |
| |      ( ) et     14       | |
| |      ( ) fr     15       | |
| |      ( ) fr-ch  16       | |
| |      ( ) is     17       | |
| |      ( ) lt     18       | |
| |      ( ) nl     19       | |
| |      ( ) pl     20       | |
| |      ( ) ru     21       | |
| |      ( ) th     22       | |
| |      ( ) de     23       | |
| |      ( ) en-us  24       | |
| |      ( ) fi     25       | |
| |      ( ) fr-be  26       | |
| |      ( ) hr     27       | |
| |      ( ) it     28       | |
| |      ( ) lv     29       | |
| |      ( ) nl-be  30       | |
| |      ( ) pt     31       | |
| |      ( ) sl     32       | |
| |      ( ) t      33       | |
| +--------------------------+ |
+------------------------------+
|     <  OK  >   <Cancel>      |
+------------------------------+

+-----------------------------------------------+
| Choose installation image (Cancel for none)   |
| +-------------------------------------------+ |
| | (*) /ISO/CentOS-6.6-i386-bin-DVD1.iso   1 | |
| | ( ) /ISO/Fedora-Server-DVD-i386-21.iso  2 | |
| | ( ) /ISO/FreeNAS-9.10.1.iso             3 | |
| | ( ) /ISO/OL6.6-x86.iso                  4 | |
| | ( ) /ISO/rhel-server-6.6-i386-dvd.iso   5 | |
| +-------------------------------------------+ |
+-----------------------------------------------+
|           <  OK  >      <Cancel>              |
+-----------------------------------------------+

+----------------------------+
| Choose VM kernel           |
| +------------------------+ |
| |                        | |
| +------------------------+ |
+----------------------------+
|   <  OK  >  <Cancel>       |
+----------------------------+

+----------------------------+
| Choose VM disk (cancel for |
| default)                   |
| +------------------------+ |
| |                        | |
| +------------------------+ |
+----------------------------+
|   <  OK  >  <Cancel>       |
+----------------------------+

+----------------------------+
| Choose VM disk image size  |
| +------------------------+ |
| |2G                      | |
| +------------------------+ |
|                            |
+----------------------------+
|   <  OK  >  <Cancel>       |
+----------------------------+

+----------------------------+
| Type VNC password for this |
| VM                         |
| +------------------------+ |
| |pleasechangethis        | |
| +------------------------+ |
+----------------------------+
|   <  OK  >  <Cancel>       |
+----------------------------+

+--------------Configuration for test2 VM-----------------+
| +-----------------------------------------------------+ |
| |EMULATOR:   qemu-system-x86_64                       | |
| |MACHINE:    pc                                       | |
| |CPU:        host                                     | |
| |MEM:        1024                                     | |
| |KEYBOARD:   en-us                                    | |
| |DISK:       /VM/test2/disk0.qcow2                    | |
| |DISKSIZE:   2G                                       | |
| |CDROM:      /ISO/CentOS-6.6-i386-bin-DVD1.iso        | |
| |BIOS:       file=/usr/share/qemu/bios.bin            | |
| |BOOT_ORDER: c                                        | |
| |KVM:        1                                        | |
| |DISPLAY:    vnc                                      | |
| |VNCPW:      oleasechangethis                         | |
| |USB:        1                                        | |
| |KERNEL:                                              | |
| |INITRD:                                              | |
| |APPEND:                                              | |
| |MAC:        52:54:57:c6:cc:21                        | |
| +-----------------------------------------------------+ |
|                                                         |
+---------------------------------------------------------+
|               <  OK  >        <Cancel>                  |
+---------------------------------------------------------+

Starting and Stopping VM Examples

+----------------------------+
| Choose Virtual Machine     |
| +------------------------+ |
| |   ( ) ORACLE      1    | |
| |   ( ) ORACLE2     2    | |
| |   ( ) armedslack  3    | |
| |   ( ) freenas     4    | |
| |   ( ) test        5    | |
| |   (*) test2       6    | |
| +------------------------+ |
+----------------------------+
|   <  OK  >  <Cancel>       |
+----------------------------+

After the command for starting the VM is executed 2 more things take place:

a quickstart.sh script (containing the required commands to start the VM) is created in the VM folder

the qemu-system-* command to start the VM is echoed back on the console

Stopping a virtual machine has the same dialog.

VM Delete Example

+----------------------------+
| Choose Virtual Machine     |
| +------------------------+ |
| |   ( ) ORACLE      1    | |
| |   ( ) ORACLE2     2    | |
| |   ( ) armedslack  3    | |
| |   ( ) freenas     4    | |
| |   ( ) test        5    | |
| |   (*) test2       6    | |
| +------------------------+ |
+----------------------------+
|   <  OK  >  <Cancel>       |
+----------------------------+

+-------Do you want to delete VM test2 ?---------+
| This will remove VM test2 with id:6 from the   |
| configuration. The folder containing the VM    |
| and the quiskstart.sh script will need to be   |
| manually removed.                              |
| Do you wish to proceed ?                       |
+------------------------------------------------+
|             < Yes >       < No  >              |
+------------------------------------------------+

+------NOTICE---------+
| Folder containing   |
| VM needs to be      |
| manually removed.   |
+---------------------+

You may be asking: “what is the quinskstart.sh script ?” Well each time the management script is used to start a VM it creates a quinskstart.sh (containing the required commands to start the VM) in the VM folder so that if the config database ever gets irreparably corrupt you can still start the VM with the quinskstart.sh.

Sources

I've a blog entry on LQ where I talk a little more extensively on minimizing the code in bash scripts. Minimize the amount of code in your bash scripts [3902]

* Originally written by louigi600[3903]

howtos, louigi600

Z80 Emulator for Slackware

The following information will assist you in getting MYZ80 by Simeon Cran running on Slackware 14 under DOSBox.

PREWORK:

1. Locate the zipfile myz80.zip, and extract the contents to a folder named Z80-Sim.

http://www.z80.de/myz80.zip[3904]

2. Install DOSBox from SlackBuilds.org

REF's:
http://slackbuilds.org[3905]
http://www.dosbox.com[3906]
http://dosbox.sourceforge.net/wiki[3907]

3. Read the CP/M Emulator Documentation in the Z80-Sim subdirectory.

4. DOSBox - Command Summary

The following commands can be used in DOSBbox

intro
intro mount
intro cdrom
intro special
help
help /all

CNTL+F1 to Enter the Keymapper Setup
CNTL+F11 to Slow down Emulation - Decrease DOSBox Cycles
CNTL+F12 to Speed up Emulation - Increase DOSBox Cycles
ALT+ENTER to Toggle to FULL Screen or Normal Display

There are several special commands that are shown in the DOSBox Help screens.
Be sure to also read those instructions.

If you should have problems getting the CPU Speed (Cycles) Decreased with CNTL+F11, Increased with CNTL+F12, and access
to the Keymapper with CNTL+F1, the problem may be associated with your Window Manager.

The solution is to look at: APPLICATIONS MENU → SETTINGS → WINDOW MANAGER → KEYBOARD TAB then scroll down until you see workspace_1, workspace_11, workspace_12, and delete those assignments. If you wish to enable those again, just use RESET to Default.

This allows DOSBox to use CNTL+F1, CNTL+F11, and CNTL+F12 to access the Keymapper and Change the CPU Cycles accordingly.

5. Testing DOSBox commands and methods.

The following is an example of typical commands needed to mount and un-mount a subdirectory in DOSBox.

I had several recipes that were saved in C:\pw\2_LDK\Cookin on an old Dos machine. I copied the complete C:\pw folder to /home/larry/C:/. This folder will be mounted as C: Drive in DOSBox so the EXE, COM, or BAT files can be executed. To mount my C: drive, I used the mount command to mount the Linux folder as c and then change to Drive C:\> and executed my old DOS Programs.

I executed DOSBox from the Slackware Xfce menu: APPLICATIONS MENU → SYSTEM → DOSBox

When the DOSBox window opened I mounted my SUBDIRECTORY as Drive C.

When I change to Drive C, I am really pointing at /home/larry/pw
DOSBox positions you at Drive z as default.

mount c ~/C:
C:
dir/p
cd pw
pw

From within pw I just used a normal program exit.

Before I can un-mount the drive, I must change back to drive z:, then I can issue the un-mount command.

To unmount C: and exit DOSBox use the following commands:

z:
mount -u c

Running MYZ80 the Z80 CP/M Emulator

I executed DOSBox from the Slackware XFCE menu: APPLICATIONS MENU → SYSTEM → DOSBox

DOSBox positions you at Drive z as default.

I typed the following commands adjusting for the specific Emulator name.

mount c ~/path/to/Z80-Sim
c:
dir /p
myz80

There are two programs (IMPORT.COM & EXPORT.COM) that allow me to import and export files into the DSK images.
I wanted to use Nulu12 and Nsweep because those were not included. I found the files on the Internet, but I needed
to extract them from a LBR file. That led to a search for UNARC16.ARK. I found the file and finally found the
instructions about just renaming it to UNARC16.COM, and then executing the file since it was a Self Extracting type
file. That allowed me to extract Nulu12 and Nsweep from some of the ARC type files. Then, I just imported Nsweep.com
and Nulu12.com into the Z80 Emulator. That allowed me to search more LBR files, including the myz80com.lbr file.

Other Z80 CP/M Commands:

dir
dir B:
user 1
dir B:
user 2
dir C:
user 0
dir

CNTL+C – is used to reload the Disk Directories in CP/M
It should be used any time a Floppy is Inserted in any Physical Drive.

Now, the whole world of CP/M is now available for your work or play. Be sure to check out all the nice utilities in CP/M.

When I am finished with the Emulator, I use EXIT to exit. Then I need to un-mount the subdirectory and exit the Terminal Window.
I use the following commands:

z:
mount -u c
exit

If my Terminal hangs, I can open another Terminal and execute the following commands to stop the process and close the Terminal.

top
q

CNTL+C – Can also be used to Terminate the command top

I look for the Process number associated with DOSBox. Assume 6545. I use the following command to Terminate the Process.

kill -9 6545

References for CP/M Archives

http://z80cpu.eu/mirrors/oak.oakland.edu/[3908]
http://www.classiccmp.org/cpmarchives/cpm/[3909]
http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/[3910]

Sources

Contributions by ldkraemer[3911]

howtos, software, emulators, dosbox, Z80, CP/M, author ldkraemer

RetroArch

RetroArch[3912] is an opensource frontend for various games emulators. It runs libretro “cores” that are available separately as shared libraries. This makes RetroArch modular and user being able to install only desired emulators.

Installation

RetroArch and some libretro cores are available via SlackBuilds.org.

All libretro cores are installed in the following directories:

/usr/lib(64)/libretro: shared libraries

/usr/lib(64)/libretro/info: metadata files

Usage

RetroArch can be ran from command line by specifying a libretro core and content file or via one of its several graphical interface.

$ retroarch -L /usr/lib64/libretro/foo_libretro.so foo.data

Otherwise, run retroarch with no arguments to run its default XMB frontend.

$ retroarch

howtos

PCSX2

PCSX2 is PlayStation 2 emulator that runs on both Windows and Linux, though given it is 32bit only and depends on libraries not included in Slackware, binaries available for download on project's website will not run out of the box. Here is how to make PCSX2 run.

Installation

32bit software on 64bit Slackware

If you have 32bit Slackware, you can skip this section. If you have 64bit Slackware, you need to add multilib capability[3913] to your system, i.e. make it capable of executing 32bit programs. Which means:

replace glibc and gcc packages with their multilib versions

add 32bit packages (not regular but converted for use on 64bit Slackware) of the rest of the system (so you will have 32bit and 64bit version of everything)

if you plan to use proprietary graphics driver, you might want to (re)install it at this point (and probably rebuild initrd as well)

Compiling missing libraries

Next, you need to compile missing libraries from source. Some are needed by pcsx2 executable itself, while some are needed by plugins.

On 64bit (though multilib) Slackware, you need to make sure you will compile 32bit, not 64bit libraries. In shell, run:

# . /etc/profile.d/32dev.sh
# export ARCH=i486

That will make system use 32bit compiler to produce 32bit programs.

wxWidgets

It's library for creating GUIs. I prefer no to mix libraries I compile myself with the rest of the system, hence the –prefix. The –enable-unicode option is necessary; PCSX2 requires unicode version of wxWidgets.

# wget https://sourceforge.net/projects/wxwindows/files/2.8.12/wxWidgets-2.8.12.tar.gz
# gunzip -c wxWidgets-2.8.12.tar.gz | tar -x
# cd wxWidgets-2.8.12
# ./configure --prefix=/opt/CPKGwxwidgets --enable-unicode
# make
# make install

libaio

Libaio is library for asynchronous I/O, whatever that asynchronous I/O is.

gets sources from git

# git clone https://git.fedorahosted.org/git/libaio.git

libaio does not come with usual configure script, so just edit Makefile

libaio/Makefile

prefix=/opt/CPKGlibaio
CFLAGS="-mtune=i686 -m32" make

compile and install

# make
# make install

Soundtouch

It's library for processing audio data.

# wget http://www.surina.net/soundtouch/soundtouch-1.7.1.zip
# unzip soundtouch-1.7.1.zip
# cd soundtouch
# ./bootstrap
# ./configure --prefix=/opt/CPKGsoundtouch
# make
# make install

PortAudio

PortAudio seems to be cross-platform API for playing sound.

# wget http://www.portaudio.com/archives/pa_stable_v19_20111121.tgz
# gunzip -c pa_stable_v19_20111121.tgz | tar -x
# cd portaudio
# ./configure --prefix=/opt/CPKGportaudio
# make
# make install

Final steps

Libraries are compiled but in non-standard locations (unless you did not touch –prefix), linker needs to be told where to look for them. Use LD_LIBRARY_PATH enviroment variable to do that (you can also add this command to your ~/.bashrc):

export LD_LIBRARY_PATH=/opt/CPKGwxwidgets/lib:/opt/CPKGsoundtouch/lib:/opt/CPKGportaudio/lib:/opt/CPKGlibaio/lib:$LD_LIBRARY_PATH

You will also need PlayStation 2 BIOS. It would be nice to get it from Sony's website, alas no, you will have to get it from…certain other sites.

Get some games and try it out.

Links

PCSX2 for Linux[3914]

Sources

howtos, software, emulators, pcsx2

TRS80 - Radio Shack TRS-80 Model 1, 3, & 4 Emulator for Slackware

The following information will assist you in getting TRS80 by David Keil running on Slackware.

PREWORK:

1. Purchase the EMULATOR, and have it in the mail before proceeding. The EMULATOR is provided by, and purchased for $10.00 from:

David Keil
P.O. Box 143
Alma Center, WI 54611
Email:  dmkeil@discover-net.net

It is well worth the modest price he is asking…… David's website is located at:
http://www.classiccmp.org/cpmarchives/trs80/mirrors/www.discover-net.net/~dmkeil/[3915]

2. Install DOSBox from SlackBuilds.org[3916]

REF's:

http://slackbuilds.org[3917]

http://www.dosbox.com[3918]

http://dosbox.sourceforge.net/wiki[3919]

3. DOSBox - Command Summary

The following commands can be used in DOSBbox

intro
intro mount
intro cdrom
intro special
help
help /all

Ctrl+F1 to Enter the Keymapper Setup

Ctrl+F11 to Slow down Emulation - Decrease DOSBox Cycles

Ctrl+F12 to Speed up Emulation - Increase DOSBox Cycles

Alt+ENTER to Toggle to FULL Screen or Normal Display

There are several special commands that are shown in the DOSBox Help screens.
Be sure to also read those instructions.

If you should have problems getting the CPU Speed (Cycles) Decreased with Ctrl+F11, Increased with Ctrl+F12, and access to the Keymapper with Ctrl+F1, the problem may be associated with your Window Manager.

The solution is to look at:
APPLICATIONS MENU → SETTINGS → WINDOW MANAGER → KEYBOARD TAB then scroll down until you see workspace_1, workspace_11, workspace_12, and delete those assignments. If you wish to enable those again, just use RESET to Default.

This allows DOSBox to use Ctrl+F1, Ctrl+F11, and Ctrl+F12 to access the Keymapper and Change the CPU Cycles accordingly.

SETTING UP TRS80

1. Copy the complete EMULATOR subdirectory TRSDOS from the CDR to your /home/loginuser directory.

TRS80 - Command Summary

The following three commands apply ONLY to Montezuma Micro CP/M:

F1 does a DIR A:

F2 does a DIR B:

F3 does a DIR M:

F5 key brings up the 'Configuration Screen'.

Shift+F5 key will shell to DOS.

F6 key toggles 1, 2, 4, 8 MHZ

Shift+F6 Locks the Speed at the current setting.

F7 key will save a snapshot of the TRS-80 system.

Shift+F7 key will load a snapshot of the TRS-80 system allowing you to continue running a TRS-80 program after exiting the emulator. Like a save game feature.

Added ability to load & execute /CMD files directly from a PC directory

use Shift+F7 to bring up load Snapshot window then use F1 to toggle load /CMD options

F9 will bring up the virtual drive status screen. From this screen you can insert, remove and change virtual disks.

Shift+F9 selects virtual hard disk selection screen.

In the virtual drive selection, screens have changed.

INSERT now brings up a window for entry of a path+filename of a virtual disk to be mounted in the currently selected drive.

ENTER brings up the point & shoot screen for selecting a virtual disk to be mounted in the currently selected drive.

Pushing the numbers 0, 1, 2, 3 now selects the corresponding drive.

Pushing Shift+Tab selects the previous drive.

F10 Reset Emulator (Same as CNTL C in CP/M)

Shift+F10 now exits even if CPU is stopped.

F11 now selects virtual cassette selection screen.

Shift+F11 selects audio/wave cassette selection screen.

F12 stops & single steps Z80 CPU.

Shift+F12 stops and restarts Z80 CPU.

Running TRS80 or TRS81 the Radio Shack TRS-80 Model 1, 3, & 4 Emulators

Locate the .DSK or .DMK (NEWDOS, DOSPLUS, LDOS, TRSDOS, ULTRADOS, MULTIDOS, or MONTEZUMA MICRO CP/M) OS files you will use:

If you are using Montezuma Micro 2.31 CP/M, use Tim Mann's mkdisk to reset the write protect attribute of the file, so you can use CONFIG to change the Drive Parameters and save the settings. If you don't change the file to unprotected, you won't be able to save the parameters, so the settings won't survive a reboot. If you are using Newdos and want to use the Pdrive command you will also need to use Tim's mkdisk to allow the Pdrive command to write the changes.

TYPICAL Pdrive commands are:

pdrive,0 ——– This will display the current settings

pdrive,0,1=4,a – This will change Drive 1 to displayed Drive 4 settings and make it effective immediately

pdrive,0,1=2,a – This will change Drive 1 to displayed Drive 2 settings and make it effective immediately

These parameters allow you to read a Model 1 Floppy in a TRS-80 Model III or Model 4

mkdisk -u -k filename.dmk
mkdisk -u -k MMCPM231.DSK
mkdisk -u -k ND80-M1.DSK

Start DOSBox from the Slackware Xfce menu:
APPLICATIONS MENU → SYSTEM → DOSBox

DOSBox will come up and you will be on Drive z:
Type the following commands adjusting for the specific Emulator.

mount c ~/path/to/subdir/TRSDOS
c:
dir /p
trs80 MMCPM321.DSK

I copied the Monetzuma Micro CP/M DSK file into the TRSDOS subdirectory. I could have just used trs80, and then immediately used F9 to select the Drive, and the OS used on that drive, and then used F10 to read the Disk's information and reset the Emulator.
Use Ctrl+F12 to increase cycles to around 9K or 10K so the DIR B: command in CP/M, or the DIR :0 command in TRSDOS acts like a real TRS-80 Model 4.

Montezuma Micro ver 2.3.1 will come up running.

Formatting a floppy disk takes about 30 seconds, and booting up is less than 30 seconds with a 2 MHZ CPU with 64 or 128 Meg RAM.

Use the F9 to configure another DSK file to view in Drive :1
Use the F10 to RESET the System

Use PIP to transfer a couple of files to Drive M:. (pip destdrive:=sourcedrive:filename.*)

pip m:=a:mdm730*.*

F1 does a DIR A: - ONLY in Montezuma Micro CP/M

F2 does a DIR B: - ONLY in Montezuma Micro CP/M

F3 does a DIR M: - ONLY in Montezuma Micro CP/M

Reference the Command Summary above for more commands.

Now, the whole world of CP/M, TRSDOS, LDOS, NEWDOS is available for your work or play. Be sure to check out DUP, and CONFIG, in Montezuma Micro CP/M, and all the other utilities with CP/M and TRSDOS. With Config you can read and write almost any format available at that time.

When you are finished with the Emulator use Shift+F10 to exit. Then you need to un-mount the subdirectory, and exit the Terminal Window.

Here are the commands

z:
mount -u c
exit

If DOSBox doesn't terminate properly, open another Terminal Window and use the top command to find the DOSBox process ID Number.
Assume 4790. Use q or CNTL C to stop the top command and then use kill -9 4790 to terminate DOSBox.

top
q

Ctrl+C – Can also be used to Terminate the command “top”

kill -9 4790

References for CP/M & TRS80 Archives

http://www.classiccmp.org/cpmarchives/trs80/mirrors/www.discover-net.net/~dmkeil/[3920]

http://www.trs-80.com/[3921]

http://trs80stuff.net/[3922]

http://www.retroarchive.org/cpm/[3923]

http://www.retroarchive.org/cpm/cdrom/[3924]

http://www.sharpmz.org/succpminfo06.htm[3925]

http://z80cpu.eu/mirrors/oak.oakland.edu/[3926]

http://www.classiccmp.org/cpmarchives/cpm/[3927]

http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/[3928]

http://www.sydex.com/about.html[3929]

Sources

Contributions by ldkraemer[3930]

howtos, software, emulators, TRS80, Z80, CP/M, author ldkraemer

vms pci passthrough

Using vms for pci passthrough. This example is for a graphics card, but it will work for any PCI device. This has been tested for qemu guests running linux, Windows and macOS.

Setup the virtual machine

Install vms and setup a virtual machine as described here https://docs.slackware.com/howtos:emulators:vms[3931]

Continue and install the guest OS. Install any updates on the guest OS you want. Things are easier to troubleshoot when the guest is setup and updated without the passthrough

PCI passthrough

It is easier and more trouble free to have a regular emulated standard vga for qemu and use the real graphics card as a second one for the guest.

For AMD systems add these kernel options to the append line in /etc/lilo.conf

iommu=pt iommu=1

For Intel systems add this kernel option to the append line in /etc/lilo.conf

intel_iommu=on

Restart the host, then find the device you want to passthrough, eg.

# lspci | grep VGA
07:00.0 VGA compatible controller: Advanced Micro Devices, Inc...

The interesting part is 07:00.0

Setup the 07:00.0 card for vfio-pci like this as root

/usr/sbin/vfio-bind 07:00.0

You can add the line above to /etc/rc.d/rc.local to automatically set the 07:00.0 card during boot.

Assuming your virtual machine is called vm1 stop it and configure it like this

vms conf vm1 extra10 "'-device vfio-pci,host=07:00.0'"

Also, it is recommended to configure a mouse and a keyboard like this

vms conf vm1 extra09 "'-usb -device usb-kbd -device usb-mouse'"

This way, the guest grabs the mouse when you click on it's first virtual monitor. You can use 'ctrl-alt-g' to get your mouse back for the host desktop.

Then start vm1 like this

vms start vm1

Your gfx card should be available in the guest. You can go on and install a regular driver if needed. Using the same logic you can pass any PCI device, like a sound card or a USB controller

Sources

Originally written by Nikos Giotis[3932]

howtos, qemu, vms, passthrough

binfmt_misc

The term binfmt_misc describes a capability of the Linux kernel which allows arbitrary executable file formats to be recognized and passed to certain user space applications, such as emulators and virtual machines.

Explanation

The executable formats are registered through a special purpose file system interface (similar to /proc). Your kernel must be configured with “CONFIG_BINFMT_MISC” built-in or as a module.
The “register” file contains lines in a specific format:

:name:type:offset:magic:mask:interpreter:

name is the name of the binary format.

type is either E or M

If it is E, the executable file format is identified by its filename extension: magic is the file extension to be associated with the binary format; offset and mask are ignored.

If it is M, the format is identified by magic number at an absolute offset in the file and mask is a bitmask indicating which bits in the number are significant.

interpreter is a program that is to be run with the matching file as an argument.

Preparation

Before attempting to register a program emulator like wine[3933] or qemu[3934] with the kernel as an interpreter, you have to ensure that the binfmt_misc filesystem is mounted and ready.
Add the following line to “/etc/fstab” in order to mount the special filesystem:

none /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0

You may have to uncomment the line below in “/etc/rc.d/rc.modules”:

# /sbin/modprobe binfmt_misc

Then use lines like the one below to register a new binary file format. The examples here allow you to start MS Windows binaries more easily, but the interesting bit is the ARM binary file format. You should be able to use this setup to create a chroot installation of ARMedslack[3935] on a x86 or x86_64 host computer, and then run something like

chroot /path/to/arm_filesystem_root /bin/bash

to enter an emulated ARM filesystem without being bothered by qemu commandlines.

Typically, the following lines should be placed in the local boot initialization script “/etc/rc.d/rc.local” because the binary formats and their userspace interpreters have to be re-registered at every boot:

# Support for Windows binaries through Wine:
{ echo ':DOSWin:M::MZ::/usr/bin/wine:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null
# Support for ARM binaries through Qemu:
{ echo ':arm:M::\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-arm-static:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null
{ echo ':armeb:M::\x7fELF\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x28:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff:/usr/bin/qemu-armeb-static:' > /proc/sys/fs/binfmt_misc/register; } 2>/dev/null

The case of qemu as interpreter of ARM binaries is a bit special. It requires that you use a statically compiled version of qemu's ARM userspace emulation. The qemu-arm executable must not depend on any dynamic linking of host libraries - when the kernel starts it, it will find itself in an environment of nothing but ARM binary code.

When registering a new binary format with the kernel, it will create a file in “/proc/sys/fs/binfmt_misc/” with human-readable details for the format you just registered.

Execution

Once a binary file format has been registered like this, you no longer have to start a program with this format by first starting its emulator. It can now be started directly. For example,

wine ~/.wine/dosdevices/c\:/windows/notepad.exe

is no longer required; it is enough to run

~/.wine/dosdevices/c\:/windows/notepad.exe

If you add the Wine directories to your $PATH then you could even suffice with typing “notepad.exe”.

Appendix

Here is a qemu.SlackBuild script which is able to build the static binary you need for ARM emulation through binfmt_misc.

#!/bin/sh
# $Id: qemu-static.SlackBuild,v 1.1 2012/02/20 16:28:29 root Exp root $
# Copyright 2007, 2008, 2009, 2010, 2012  Eric Hameleers, Eindhoven, Netherlands
# All rights reserved.
#
#   Permission to use, copy, modify, and distribute this software for
#   any purpose with or without fee is hereby granted, provided that
#   the above copyright notice and this permission notice appear in all
#   copies.
#
#   THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
#   WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#   MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
#   IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
#   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
#   USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
#   ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#   OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
#   OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
#   SUCH DAMAGE.
# -----------------------------------------------------------------------------
#
# Slackware SlackBuild script
# ===========================
# By:        Eric Hameleers <alien@slackware.com>
# For:       qemu
# Descr:     a generic machine emulator and virtualizer
# URL:       http://qemu.org/
# Needs:
# Changelog:
# 1.0.1-1:    18/feb/2012 by Eric Hameleers <alien@slackware.com>
#             * After another long hiatus, let's pick up this build...
#               once more. This time to complement my qemu-kvm package which
#               I limited to KVM supported architecture exclusively.
#
# Run 'sh qemu.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
# Install using 'installpkg'.
#
# -----------------------------------------------------------------------------

# Set initial variables:

PRGNAM=qemu
PRGNAM2=qemu-static
VERSION=${VERSION:-"1.0.1"}
GLIB=${GLIB:-"2.28.8"}
BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}

# If you also want static binaries for user emulation, set BUILD_STATIC=YES
# This will create a second package "qemu-static" with user emulation binaries.
# NOTE:
# This fails with the glibc 1.13 of Slackware 13.37 !
# The static compilation pulls in the glib-2.0 libraries; since Slackware does
# not include static versions of these, we will have to build them now:
BUILD_STATIC=${BUILD_STATIC:-YES}

# The documentation:
DOCS="CODING_STYLE COPYING* Changelog LICENSE MAINTAINERS README* TODO VERSION"

# Where do we look for sources?
SRCDIR=$(cd $(dirname $0); pwd)

# Place to build (TMP) package (PKG) and output (OUTPUT) the program:
TMP=${TMP:-/tmp/build}
PKG=$TMP/package-$PRGNAM
PKG2=$TMP/package-${PRGNAM2}
PKGGLIB=$TMP/package-glib_static
OUTPUT=${OUTPUT:-/tmp}

SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz"
SRCURL[0]="http://wiki.qemu.org/download/${PRGNAM}-${VERSION}.tar.gz"
USE[0]="YES"

SOURCE[1]="$SRCDIR/glib-${GLIB}.tar.xz"
SRCURL[1]="http://ftp.gnome.org/pub/GNOME/sources/glib/$(echo $GLIB |cut -d. -f1,2)/glib-${GLIB}.tar.xz"
USE[1]="$BUILD_STATIC"

##
## --- with a little luck, you won't have to edit below this point --- ##
##

# Automatically determine the architecture we're building on:
MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
case "$MARCH" in
i?86)    export ARCH=i486 ;;
armv7hl) export ARCH=$MARCH ;;
arm*)    export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*)       export ARCH=$MARCH ;;
esac
fi

case "$ARCH" in
i486)      SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64)    SLKCFLAGS="-O2 -fPIC"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
armv7hl)   SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
*)         SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
esac

# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR
# Catch unitialized variables:
set -u
P1=${1:-1}

# Save old umask and set to 0022:
_UMASK_=$(umask)
umask 0022

# Create working directories:
mkdir -p $OUTPUT          # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
mkdir -p $PKG             # place for the package to be built
rm -rf $PKG/*             # always erase old package's contents
rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build
rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
# remove old log files

# Source file availability:
for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
[ "${USE[$i]}" != "YES" ] && continue
if ! [ -f ${SOURCE[$i]} ]; then
echo "Source '$(basename ${SOURCE[$i]})' not available yet..."
# Check if the $SRCDIR is writable at all - if not, download to $OUTPUT
[ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/$(basename ${SOURCE[$i]})"
if [ -f ${SOURCE[$i]} ]; then echo "Ah, found it!"; continue; fi
if ! [ "x${SRCURL[$i]}" == "x" ]; then
echo "Will download file to $(dirname $SOURCE[$i])"
wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}" || true
if [ $? -ne 0 -o ! -s "${SOURCE[$i]}" ]; then
echo "Fail to download '$(basename ${SOURCE[$i]})'. Aborting the build."
mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL
exit 1
fi
else
echo "File '$(basename ${SOURCE[$i]})' not available. Aborting the build."
exit 1
fi
fi
done

if [ "$P1" == "--download" ]; then
echo "Download complete."
exit 0
fi

# --- PACKAGE BUILDING ---

echo "++"
echo "|| $PRGNAM-$VERSION"
echo "++"

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE[0]}
cd ${PRGNAM}-${VERSION}
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .

echo Building ...

# Compensate for users who forgot to run "su -":
if ! which texi2html 1>/dev/null 2>/dev/null ; then
export PATH=$PATH:/usr/share/texmf/bin
fi

# The SlackBuild needs VDE, so abort if it was not installed:
if ! pkg-config --exists vdeplug ; then
echo -e "**\n** VDE is not installed! Please install it first!\n**"
exit 1
fi

function qemuconfigure () {

# If you do not care for all the exotic target platforms, then you can add
# a subset of targets to the 'configure' block below. For instance,
# to only build x86_64 and arm targets, change this line:
# --target-list="" \
# to:
# --target-list=x86_64-softmmu,x86_64-linux-user,arm-softmmu,arm-linux-user \

./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/man \
--datadir=/usr/share/$PRGNAM \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-linux-user \
$*
}

# First configure the usual non-static build including ALSA and SDL support:
echo -e "**\n** making dynamic...\n**"
export LDFLAGS="$SLKLDFLAGS"
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
qemuconfigure \
--enable-system \
--target-list="" \
--audio-drv-list=alsa,oss,sdl,esd \
--audio-card-list=ac97,es1370,sb16,cs4231a,adlib,gus \
--enable-mixemu \
--enable-vde \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log

# Compile and install into $PKG:
make $NUMJOBS OS_CFLAGS="$SLKCFLAGS" \
2>&1 | tee $OUTPUT/make-${PRGNAM}.log
make OS_CFLAGS="$SLKCFLAGS" DESTDIR=$PKG install \
2>&1 |tee $OUTPUT/install-${PRGNAM}.log

if [ "$BUILD_STATIC" = "YES" ]; then

# Clean up for the next step:
echo -e "**\n** making clean...\n**"
make clean

# Next, configure a static build - here we target non-PC architectures only.
# The static binaries can be used in a chroot on the host system:
echo -e "**\n** making static...\n**"

( # Build a static glib-2.0:

# Remove the remnants of previous build:
rm -rf $PKG2 $PKGGLIB
mkdir -p $PKG2 $PKGGLIB

cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for glib..."
tar -xvf ${SOURCE[1]}
cd glib-$GLIB
chown -R root:root .
chmod -R u+w,go+r-w,a+X-s .
CFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--mandir=/usr/man \
--disable-dynamic \
--enable-static \
--build=$ARCH-slackware-linux \
2>&1 | tee $OUTPUT/configure_static-${PRGNAM}_glib.log

# Compile glib and install the static library in a temporary location
# where qemu can pick it up:
make $NUMJOBS \
2>&1 | tee $OUTPUT/make_static-${PRGNAM}_glib.log
make install DESTDIR=$PKGGLIB \
2>&1 | tee $OUTPUT/install_static-${PRGNAM}_glib.log
)

export CFLAGS="-I$PKGGLIB/usr/include $SLKCFLAGS"
export CXXFLAGS="-I$PKGGLIB/usr/include $SLKCFLAGS"
export LDFLAGS="-L$PKGGLIB/usr/lib${LIBDIRSUFFIX} $SLKLDFLAGS"
export PKG_CONFIG_PATH="$PKGGLIB/usr/lib${LIBDIRSUFFIX}/pkgconfig"

qemuconfigure \
--disable-system \
--disable-curses \
--disable-sdl \
--disable-bluez \
--disable-docs \
--disable-guest-agent \
--disable-kvm \
--disable-vde \
--disable-smartcard \
--disable-smartcard-nss \
--disable-vnc \
--static \
2>&1 | tee $OUTPUT/configure_static-${PRGNAM}.log

# Compile and install into $PKG2:
make $NUMJOBS OS_CFLAGS="$SLKCFLAGS" \
2>&1 | tee $OUTPUT/make_static-${PRGNAM}.log
make OS_CFLAGS="$SLKCFLAGS" DESTDIR=$PKG2 install \
2>&1 |tee $OUTPUT/install_static-${PRGNAM}.log

# Rename the binaries so that they do not clash with the dynamic binaries:
for FILE in $PKG2/usr/bin/* ; do
mv $FILE ${FILE}-static
done

# The user mode emulators do no need these bios/keymap files:
rm -rf $PKG2/usr/share/$PRGNAM
rmdir $PKG2/usr/share 2>/dev/null || true

# Add documentation:
mkdir -p $PKG2/usr/doc/$PRGNAM2-$VERSION
cp -a $DOCS $PKG2/usr/doc/$PRGNAM2-$VERSION || true
cat $SRCDIR/$(basename $0) \
> $PKG2/usr/doc/$PRGNAM2-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG2/usr/doc/$PRGNAM2-$VERSION
find $PKG2/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG2/usr/man ]; then
find $PKG2/usr/man -type f -name "*.?" -exec gzip -9f {} \;
for i in $(find $PKG2/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Add a package description:
mkdir -p $PKG2/install
cat $SRCDIR/${PRGNAM2}.slack-desc > $PKG2/install/slack-desc

# Build the package:
cd $PKG2
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM2}.log
cd $OUTPUT
md5sum ${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
cd -
cat $PKG2/install/slack-desc | grep "^${PRGNAM2}" > $OUTPUT/${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt

fi # End [ "$BUILD_STATIC" = "YES" ]

# Continuing with the default dynamic build:

# Add documentation:
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;

# Compress the man page(s):
if [ -d $PKG/usr/man ]; then
find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \;
for i in $(find $PKG/usr/man -type l -name "*.?") ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
fi

# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
| grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true

# Clean up:
find $PKG/usr/share -type f -size 0 -exec rm -f {} \; 2>/dev/null || true

# Add a package description:
mkdir -p $PKG/install
cat $SRCDIR/${PRGNAM}.slack-desc > $PKG/install/slack-desc
cat $SRCDIR/${PRGNAM}.slack-required > $PKG/install/slack-required

# Build the package:
cd $PKG
makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt
cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep

# Restore the original umask:
umask ${_UMASK_}

You'll also need the qemu-static.slack-desc file:

# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description.  Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in.  You must
# make exactly 11 lines for the formatting to be correct.  It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
qemu-static: qemu-static (a processor emulator)
qemu-static:
qemu-static: QEMU is a FAST! processor emulator using dynamic translation to
qemu-static: achieve good emulation speed. QEMU has two operating modes:
qemu-static: Full system emulation and User mode emulation.
qemu-static:
qemu-static: This package contains statically compiled binaries of only the
qemu-static: User mode emulators, for use inside chroot environments.
qemu-static:
qemu-static:
qemu-static: Home page at http://qemu.org/

Sources

This page originally written by Eric Hameleers[3936]

External reference: Wikipedia[3937]

howtos, software, emulator, author alienbob

HOWTO articles - Emulators

Linux users often grew up using other computer Operating Systems[3938] and playing their games on Consoles[3939]. After making the switch to a Linux based desktop, no one is keeping you from enjoying those old environments, because emulator software has been written for a great many of those old platforms. Looking for a way to play your old Commodore games? Or MS DOS? Or Atari, ZX Spectrum, or …? There is an emulator for almost everything, and they run great on Linux.

Inspired? Want to write a Emulators HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Overview of Emulators HOWTOS

Page
Description
Tags

binfmt_misc
binfmt_misc The term binfmt_misc describes a capability of the Linux kernel which allows arbitrary executable file formats to be recognized and passed to certain user space applications, such as emulators and virtual machines. Explanation The executable formats are registered through a special purpose file system interface (similar to /proc). Your kernel must be configured with
howtos, software, emulator, author alienbob

Preface
Preface Qemu is a popular and powerful open-source emulator often used for running KVM Virtual Machines (VMs). In fact qemu supports emulating so many things that it can be quite challenging, unless you do it very often, to manually start a VM from a text console. Who would want to write the below command for starting a VM ?
howtos, louigi600

PCSX2
PCSX2 PCSX2 is PlayStation 2 emulator that runs on both Windows and Linux, though given it is 32bit only and depends on libraries not included in Slackware, binaries available for download on project's website will not run out of the box. Here is how to make PCSX2 run.
howtos, software, emulators, pcsx2

RetroArch
RetroArch RetroArch is an opensource frontend for various games emulators. It runs libretro “cores” that are available separately as shared libraries. This makes RetroArch modular and user being able to install only desired emulators. Installation RetroArch and some libretro cores are available via SlackBuilds.org.
howtos

TRS80 - Radio Shack TRS-80 Model 1, 3, & 4 Emulator for Slackware
TRS80 - Radio Shack TRS-80 Model 1, 3, & 4 Emulator for Slackware The following information will assist you in getting TRS80 by David Keil running on Slackware. PREWORK: 1. Purchase the EMULATOR, and have it in the mail before proceeding. The EMULATOR is provided by, and purchased for $10.00 from:
howtos, software, emulators, trs80, z80, cp m, author ldkraemer

vms
vms An example using vms for creating and managing a qemu virtual machine Installation You need to install vde2, tigervnc and qemu first Get the ready made package and install it, you should use the latest release wget https://bitbucket.org/yotis/vms/vms-0.2.1-noarch-1did.tgz upgradepkg --install-new vms-0.2.1-noarch-1did.tgz
howtos, software, emulator, vms, qemu

vms pci passthrough
vms pci passthrough Using vms for pci passthrough. This example is for a graphics card, but it will work for any PCI device. This has been tested for qemu guests running linux, Windows and macOS. Setup the virtual machine Install vms and setup a virtual machine as described here
howtos, qemu, vms, passthrough

XTRS - Radio Shack TRS-80 Model 1, 3, & 4 Emulator for Slackware
XTRS - Radio Shack TRS-80 Model 1, 3, & 4 Emulator for Slackware The following information will assist you in getting XTRS by Tim Mann running on Slackware. PREWORK: 1. Install XTRS (Version 4.9D) from SlackBuilds.org <http://slackbuilds.org> 2. Read the XTRS Emulator Documentation.
howtos, software, emulators, trs80, z80, cp m, xtrs, author ldkraemer

Z80 Emulator for Slackware
Z80 Emulator for Slackware The following information will assist you in getting MYZ80 by Simeon Cran running on Slackware 14 under DOSBox. PREWORK: 1. Locate the zipfile myz80.zip, and extract the contents to a folder named Z80-Sim. <http://www.z80.de/myz80.zip> 2. Install DOSBox from SlackBuilds.org
howtos, software, emulators, dosbox, z80, cp m, author ldkraemer

howtos, topic page

XTRS - Radio Shack TRS-80 Model 1, 3, & 4 Emulator for Slackware

The following information will assist you in getting XTRS by Tim Mann running on Slackware.

PREWORK:

1. Install XTRS (Version 4.9D) from SlackBuilds.org

http://slackbuilds.org[3940]

2. Read the XTRS Emulator Documentation.

SETTING UP XTRS

1. Remove any previous symbolic linked files (if needed):

cd ~/path/to/xtrs
sudo rm disk4-0
sudo rm disk4-1    #AS NEEDED
sudo rm disk4-2    #AS NEEDED
sudo rm disk4-3    #AS NEEDED

Model 1 files will be disk1-0, disk1-1, disk1-2, disk1-3
Model 3 files will be disk3-0, disk3-1, disk3-2, disk3-3
Model 4 files will be disk4-0, disk4-1, disk4-2, disk4-3
And real hardware drives can be used via Symbolic linking.

2. Copy the Model I, Model III, Model 4, and Model 4P ROM image files to /usr/share/xtrs The original location for other distros was /usr/local/lib/xtrs.
The TRS80 ROMS are not included in the XTRS package, but can be found by searching with Google.

cd ~/path/to/xtrs
sudo cp level2.rom /usr/share/xtrs/level2rom.hex      #(Original Filename was level2.rom)
sudo cp model3.rom /usr/share/xtrs/romimage.m3        #(Original Filename was model3.rom)
sudo cp model4.rom /usr/share/xtrs/romimage.m4        #(Original Filename was model4.rom)
sudo cp model4p.rom /usr/share/xtrs/romimage.m4p      #(Original Filename was model4p.rom)

These files need permissions as shown

-rwxr-xr-x 1 root staff 14336 Jul 10 03:51 romimage.m4
-rwxr-xr-x 1 root staff 504 Jul 10 03:34 romimage.m4p
-rwxr-xr-x 1 root staff 14336 Jul 10 03:32 romimage.m3
-rwxr-xr-x 1 root staff 12288 Jul 10 03:31 level2rom.hex

3. Locate the .DSK or .DMK (NEWDOS, DOSPLUS, LDOS, TRSDOS, ULTRADOS, MULTIDOS, or MONTEZUMA MICRO CP/M) OS files you will use:
If you are using Montezuma Micro 2.31 CP/M, use mkdisk to reset the write protect attribute of the file, so you can use CONFIG
to change the Drive Parameters and save the settings. If you don't change the file to unprotected, you won't be able to save the
parameters so the settings won't survive a reboot.

mkdisk -u -k filename.dmk
mkdisk -u -k MMCPM231.DSK

4. Create the symbolic links to the files you will use, and to real (Physical) TRS-80 Model 1, 3, or 4 Drives:

ln -s /home/larry/xtrs/Mmcpm231/MMCPM231.DSK disk4-0
ln -s /home/larry/xtrs/Mmcpm231/MMTOOLS.DSK disk4-1
ln -s /dev/fd0 disk4-2              #THESE ARE REAL FLOPPY DRIVES
ln -s /dev/fd1 disk4-3              #THESE ARE REAL FLOPPY DRIVES

Running XTRS the Radio Shack TRS-80 Model 1, 3, & 4 Emulator

Run xtrs (adjust keystretch down to around 500 from 4000 to prevent multiple keystrokes depending on how fast your Host system is running):

/usr/local/bin/xtrs -keystretch 400 -autodelay -model 4 -romfile ~/xtrs/ROMS/model4.rom -diskdir .

Use the F8 Function Key to EXIT the Emulator.
Use the F11 Function Key for HELP on the Emulator.

There is a man page with lots more information located at: http://manpages.ubuntu.com/manpages/lucid/man1/xtrs.1.html[3941]

Now you have the full running Radio Shack OS (TRSDOS, LDOS, CP/M, etc.) of your choice available, assuming you know how to operate the
Old Radio Shack Model 1, 3, 4, & 4P Computers.

CNTL+C – is used to reload the Disk Directories in CP/M
It should be used any time a Floppy is Inserted in any Physical Drive.

USING THE CATWEASEL PCI CARD

HOW TO COPY THOSE OLD 5.25“ FLOPPIES USING THE CATWEASEL PCI CARD:
The Catweasel MK4 PLUS is a multi-format floppy disk controller PCI Card that can be plugged into a spare PCI slot, and used from a
terminal window in Linux. I plugged mine in my Desktop running Ubuntu 8.04.4 LTS.

CATWEASEL FEATURES:

Read/write real Amiga floppy disk's on a Windows PC

Use a real Amiga keyboard on a PC

Use a real Amiga mouse/joystick on PC

Ideal for WinUAE and Amiga Forever - transfer all your Amiga floppies over to the PC

Empty SID chip socket for realistic C64 sound emulation

Third Party Support

Catweasel MK4 drivers for classic Amiga available:

Multidisk V3.65 uses OpenPCI to access the controller through the Prometheus PCI Busboard

Third party driver support for Linux 2.6 also available

Third party driver support for AmigaOS 4.1 now also available (limited)

Third party driver support for AROS now also available

I purchased my Catweasel from: http://amigakit.leamancomputing.com/catalog/product_info.php?products_id=842[3942]

Tim Mann has a nice website with support for the CP/M and TRS-80 Floppy Disks at:
http://www.tim-mann.org/trs80.html[3943]
http://www.tim-mann.org/catweasel.html[3944]

From Tim's website you can download his Catweasel Floppy Read/Write Tools, version 4.4 cw2dmk-4.4.zip or
cw2dmk-4.4.tar.gz and extract the folder containing his files for version 4.4.

LINUX: From within my Desktop running Ubuntu 8.04, I just opened a terminal window, and used the following commands:

cd ~
cd cw2dmk-4.4
sudo ./cw2dmk -v1 trstst01.dmk
sudo ./cw2dmk -v1 trstst02.dmk
sudo ./cw2dmk -v1 trststxx.dmk

to copy the TRS-80 floppy disks to the DMK image format that is used by most Emulators. My next step is to get xtrs installed in Slackware, and all my TRS80 Files copied too.

WINDOWS: There are windows drivers on the Catweasel CDR along with other Software, but I haven't looked into that yet.

WARNING - UNAPPROVED METHOD:

One CAUTION here is that if your floppy disks are 25+ years old as mine were, the Oxide coating on most of the floppies is ready
to fail, and you may ruin them by trying to read them. (You may find that a tiny bit of alcohol placed on a cotton swab will totally
remove all the Oxide coating from the platter making then unreadable, so DON'T try alcohol as a cleaner or lubricant for your floppies.)
Also, the inner lining of the old floppies have lost their lubricating ability by becoming dry over the years, and this causes DRAG on
the heads as the platter tries to spin so the read heads can recover the data.

I chose use a lubricant from KANO LABS in Nashville, Tennessee USA called Aerosol SiliKroil to lubricate my floppies. I was able to
recover about 85% of the disks using this TOTALLY UNAPPROVED method. I ruined the first 4-5 disks by trying to read them.
A costly ERROR!

http://www.kanolabs.com[3945]

SiliKroil is an Industrial Penetrating Lubricant that works wonders, and doesn't remove the Oxide coating as Alcohol and Silicone does.
Alcohol can be used to clean the floppy drives read heads as usual.

COPYING AMPRO DS/DD DISKS

COPYING AMPRO DS/DD DISKS - Using a real bootable Ampro system
Since I had the Catweasel installed, and I had 26 Ampro disks in a mix-n-match of SS/DS & DS/DD, I wanted to try and save all the
information from these 5.25” disks. I read each disk several times with my Catweasel card making multiple attempts at good reads.
Examples for Disk #8 are:

sudo ./cw2dmk ADSDD008.DMK
sudo ./cw2dmk ADSDDa08.DMK
sudo ./cw2dmk ADSDDb08.DMK
sudo ./cw2dmk ADSDDc08.DMK
sudo ./cw2dmk ADSDDd08.DMK

This gave me an option of trying more than once at recovering the files as the multiple reads found different sectors bad for
successive sequential reads. A step that was very valuable as I proceeded.

Since I had a system that contained two 5.25“ TEAC 360K drives, I booted my Ampro SS/DD CP/M system disk and used AMPRODSK to
FORMAT a FRESH DS/DD Disk, and used SYSGEN to copy the system. Next, I used NSWEEP to copy all the files. Now I have a good
bootable DS/DD Boot SYSTEM Disk. Then, I used Catweasel to WRITE my first Disk 08 Image (ADSDD008.DMK) to a fresh floppy with:

sudo ./dmk2cw ADSDD008.DMK

I inserted that disk in my Drive after running NSWEEP. NSWEEP was used to LOG the New Disk, and to copy it to my PURGED DS/DD
CP/M Disk. If the file copying had bad sectors for specific File Names, I made a note of those errors for attempt #2 by using
ADSDDa08.DMK, then a third attempt using ADSDDb08.DMK……..etc.

When all the files were successfully copied I used my Catweasel to create a new image of this disk, renaming it ADSDD008.DMK with:

sudo ./cw2dmk ADSDD008.DMK

Then, I just repeated the process for the 26 Disks I had saved……….. Unfortunately, Disks 1, 2, &3 were ruined in the process, but gave me the
UNAPPROVED METHOD described above.

When all the disks had been gone through I burned a DVD of all the Images, with each disks' image in a separate folder just in case
I needed to try and recover a file at a later date.

This method should also work for you on any CP/M System, such as Kaypro II or IV, Ampro, TRS-80 Model 1, 3, & 4, or by using Virtual
Disks in an Emulator.

References for CP/M & TRS80 Archives

http://www.trs-80.com/[3946]
http://trs80stuff.net/[3947]
http://www.retroarchive.org/cpm/[3948]
http://www.retroarchive.org/cpm/cdrom/[3949]
http://www.sharpmz.org/succpminfo06.htm[3950]
http://z80cpu.eu/mirrors/oak.oakland.edu/[3951]
http://www.classiccmp.org/cpmarchives/cpm/[3952]
http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/[3953]
http://www.sydex.com/about.html[3954]

Sources

Contributions by ldkraemer[3955]

howtos, software, emulators, TRS80, Z80, CP/M, XTRS, author ldkraemer

Docker on Slackware

There's a Slackware package for Docker on Slackbuilds, but there is a small caveat when installing. In case you are wondering, the docker build gives you the CE version of Docker.

Steps to install

As root, first install skpkg:

# git clone https://github.com/dslackw/slpkg.git
# cd slpkg
# python setup.py install
# slpkg update

Next you must install google-go-lang

slpkg -s sbo google-go-lang

Log out (from root) and log back in again before you continue to install the rest of the docker packages. As an alternative it may be enough to simply run:

# source /etc/profile.d/go.sh

# slpkg -s sbo tini
# slpkg -s sbo docker-proxy
# slpkg -s sbo libseccomp
# slpkg -s sbo runc
# slpkg -s sbo containerd
# slpkg -s sbo docker
# slpkg -s sbo docker-compose

Running Docker

Next ensure docker starts on boot. Edit /etc/rc.d/rc.local, add this:

# Start docker
if [ -x /etc/rc.d/rc.docker ]; then
/etc/rc.d/rc.docker start
fi

Also, in /etc/rc.d/rc.local_shutdown add this to ensure a clean shutdown:

# Stop docker
if [ -x /etc/rc.d/rc.docker ]; then
/etc/rc.d/rc.docker stop
fi

Now you can start docker:

# chmod 755 /etc/rc.d/rc.docker
# /etc/rc.d/rc.docker start

Check /var/log/docker.log for any issues.

Sources

* Original Author User bifferos[3957]

* Special thanks to ponce, see this thread[3958]

howtos, docker, cloud, docker-compose

Slackware as an AWS EC2 Instance

Prerequisites

You should have already prepared a DomU compatible Slackware install, see the separate guide[3959] on how to do that.

You should have an AWS account with the necessary vmimport role[3960]

You should have awscli configured with credentials such that commands like 'aws s3 ls' work

That's the bare minimum. However it will help a great deal if you've already tried to import one of the supported operating systems[3961] so you know what to expect, and all permissions issues are ironed out.

Security

A quick word about security. We will not be making use of the service provided by AWS which furnishes your instance with key pairs, because we won't be installing the agent process[3962] that does that. This saves a bit of time for unsupported operating systems like Slackware, but it means you need to sort out how to get access to your instance after it starts. I strongly suggest you

Upload a public key to the account you'll use to access your instance, e.g. with ssh-copy-id[3963].

Ensure that ssh is configured to only use key access (PermitRootLogin=prohibit-password[3964]), which I believe is the default.

Reboot and ensure you still have access using your private key.

Double-check that you cannot login using the password that would normally work on the VM console for your user.

Within an hour of your instance becoming live it will be logging access attempts by Russian hackers. AWS address ranges are scanned regularly for vulnerabilities precisely because so many users screw up their security. Don't be caught out.

Disk Formats

You now need to consider in what format you'll upload your Slackware DomU hard disk image.

Stream optimised VMDK is the most efficient way to upload your image. This is the VMDK format created when you export to OVF format from VMWare and you will notice it’s much more compressed than normal VMDK files. Don’t upload a standard VMDK file, it won’t work and you’ll waste your time. Also, don’t try to generate stream-optimised VMDK using any open-source utilities. None of them seem to work properly. If you don’t own a VMWare product with the ‘export to OVF’ option, you could try OVFTool. This is a free download from VMWare for registered users, and will take a VMWare VM directory as input. I’m unsure if it requires a registered copy of VMWare to run but it will expect the .VMX and possibly other files which you’ll have to generate somehow to keep it happy if you're not actually using VMWare. When the OVF directory is generated it will be generated containing several files. You can discard all but the .VMDK.

Ensure you've shutdown VMWare completely and removed any DVD-ROMs from the VM before exporting to OVF or it may fail with a cryptic (e.g. useless) error message as is typical from VMWare.

If you don't have VMWare, and/or don't want to use OVFTool then you should consider .VHD format. This format was used by the ancient Microsoft emulator called VirtualPC, and latterly HyperV. qemu-img will happily generate one of these when you specify the ‘vpc’ output format. VHD is more verbose than stream-optimised VMDK and will end up about double the size, so double the upload time, and higher S3 charges while importing (not that they will amount to much). You can also use VHDX format as AWS also supports that but there is little point as the generated files are even larger than VHD to contain the same information.

You can also use the RAW format, but you'd have to be some kind of lunatic to do that since you'll be waiting forever for your upload. It's not really necessary.

Snapshot import

The snapshot import process is described by Amazon[3965]. If you want to have a read of that feel free to follow it instead of my guide below, or use a combination of the two.

Having generated a hard disk image in the appropriate format you will need to put it in an S3 bucket. This is easily achieved in the AWS console. You can keep it private which is the default setting when you click through the dialogs.

Once uploaded, generate a presigned URL for it using the ARN (Amazon Resource Name) of the bucket item, e.g.

aws s3 presign s3://slackware/slackware-for-aws-ovf.vmdk

Copy the printed (generated) URL somewhere. You have only limited time to use it, so don't go off to bed just yet!

Create file containers.json containing something like this.

{
"Description": “My Server VMDK 1”,
"Format": "vmdk",
"Url" : "<URL>"
}

Change vmdk to vhd(x) depending on the format you’re using (it’s not detected by the import process). Choose a description to describe your storage. You may want to put a version in there as I’ve done if you make several attempts at this. Put the presigned URL in the Url field, save the file, and then run:

aws ec2 import-snapshot --description "slackware-snap-vmdk-1" --disk-container "file://containers.json"

Again, note my description has a version, I found this handy when looking at logs, and checking on tasks etc…

Take a note of the printed ImportTaskId (or any error!!!) after running that command. e.g. import-snap-02da847264756b9f3

Monitor the task by repeatedly running something like:

aws ec2 describe-import-snapshot-tasks --import-task-ids import-snap-02da847264756b9f3

Once this import has completed (should take about half an hour for Slackware disk sets A, AP, D, K, L, N), take a copy of the final status snapshot ID, as we’ll need it e.g.:

"SnapshotId": "snap-0677963e6c0b64f80",

Connect to an Instance

You can now create an instance. Any instance will do, a t2.micro will have 1 CPU and plenty of RAM to boot Slackware. Shut down the instance, disconnect its root drive. You can delete the root EBS volume supplied with that instance if you want because we'll create another one. There's no point in paying for EBS storage you don't need.

You can then use the AWS Console to create an EBS volume from your uploaded snapshot, and attach the EBS volume as the root device of your instance. Make sure you specify the device as /dev/sda, to ensure it will be the root device. I found this slightly confusing because it's actually /dev/xvda in the running instance but there you go.

You should now be able to start that instance, boot Slackware and connect to it using ssh.

Sources

* Originally written by User Bifferos[3966]

howtos, ec2, aws

HOWTO articles - Cloud

Cloud is the buzz word of these days. We have a series of articles that will help you understand what cloud services are, how they can work in your advantage, and how you can run Slackware in the cloud.

Inspired? Want to write a Cloud HOWTO page yourself?
Type a new page name (no spaces - use underscores instead) and start creating!

Commercial Cloud Services

Amazon Web Services (AWS)[3967]

Overview of Cloud HOWTOS

Page
Description
Tags

Slackware as an AWS EC2 Instance
Slackware as an AWS EC2 Instance Prerequisites * You should have already prepared a DomU compatible Slackware install, see the separate guide on how to do that. * You should have an AWS account with the necessary vmimport role * You should have awscli configured with credentials such that commands like 'aws s3 ls' work
howtos, ec2, aws

Docker on Slackware
Docker on Slackware There's a Slackware package for Docker on Slackbuilds, but there is a small caveat when installing. In case you are wondering, the docker build gives you the CE version of Docker. Steps to install As root, first install skpkg:
howtos, docker, cloud, docker-compose

howtos, topic page

Slackware 100% Libre

I was never on the 100% Free Software team. I use some proprietary programs, but every year I try to get rid of proprietary software, and guys that have a bad license, that is not free. Slackware is a powerful distribution that comes with a set of software that without internet you are well stocked. And in this set, some proprietary and licensed software that Stallman doesn't like is present.

After searching and wandering for a while I found an alternative to putting Slackware in Debian state. Calm without apt! I'm talking about the free state that Debian comes by default, its repositories default to MAIN, which in turn has only free software.

So how do you do this magic? Simple, let's use Freenix, formerly Freeslack, which is Slackware-based but 100% Free. Freenix has a list of non-free packages taken from the Slackware base. Let's use this base to make our Slackware 100% Libre.

To begin with we will need to move through the Slackware repository lists and add the Freenix repository in the last line. As root we run:

echo '
# 100% Libre
https://freenix.net/fxp/freeslack64-14.2/
' >> /etc/slackpkg/mirrors

If you already have an older Slackware installation on your hard drive, comment out the old repository and add # in front of it.

After that we will need to change/add the SLACKKEY variable present in /etc/slackpkg/slackpkg.conf, we will find the SLACKKEY variable on line 65. If the old SLACKKEY variable is not commented out, comment. 2 same variables conflict.

SLACKKEY="Connie Dobbs (Free eXpansion Pack for Slackware)"

After that, we need to update the project's GPG key then update the repository list.

slackpkg update gpg && slackpkg update

Repository is up and now is the funniest time to uninstall non-free, licensed software that is not well liked by the FSF. As Julio Neves would say, if it's in a line, it's even better. And let's do just that. Let's run the removepkg command with some packages!

**removepkg**               \
getty-ps              \
lha                   \
unarj                 \
amp                   \
seamonkey-solibs      \
bluez-firmware        \
ipw2100               \
ipw2200               \
trn                   \
zd1211-firmware       \
font-bh-ttf           \
font-bh-type1         \
mozilla-thunderbird   \
mozilla-firefox       \
seamonkey             \
xfractint             \
xgames                \
xv                    \
kernel-firmware       \
kernel-generic        \
kernel-huge           \
kernel-modules        \
kernel-headers        \
kernel-source

Yes, mozilla is free but allows non-free plugins. Therefore you will be without browser. You can compile and install Icecat, present in Slackbuilds;) Or even stick with Firefox. The decision is yours … Just remove it from the list. But it will not be 100% Free. One note! Icecat needs a powerful processor to build, its dual-core won't do the trick. I am sorry to inform you, if you are from the “Pc Weak” team use a pre-compiled package, search the Slackonly website for this package.

Next step is to install Linux Libre, the Linux kernel that has been removed from all Blobs. Let's do this with slackpkg, now we're pulling from the Freenix repository :)

slackpkg install        \
linux-libre-headers  \
linux-libre-image    \
linux-libre-source

Step done? Ok, we're on the final stretch, we now need to point our new kernel at lilo.conf. But Linux Libre Generic will not roll, not yet … We'll need to point Huge first, reboot the machine and then generate the modules and finally make the point in lilo.conf.

Open lilo.conf and add at the end of the line:

image = /boot/vmlinuz-huge-4.4.172-gnu
root = /dev/sda1
label = Huge-Libre
read-only

Note that the image = call will change this article in the future! So make the call according to the huge kernel of the system. List it in / boot / and see which file to point to.

Run lilo and restart the machine.

lilo

Ok, after the machine has been rebooted and if you have NOT given a panic kernel, which is kind of hard if you followed this HOW-TO, it's time to load Kernel Generic. Let's use the script in /usr/share/mkinitrd.

**/usr/share/mkinitrd/mkinitrd_command_generator.sh**
mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m
hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4
-u -o /boot/initrd.gz

The output will be for modules that can be loaded on my machine. Yours will be variable. Run the mkinitrd that was generated.

mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m
hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4
-u -o /boot/initrd.gz

After that make the script call again, but this time pointing the generic kernel at /boot/. Use the -l parameter.

/usr/share/mkinitrd/mkinitrd_command_generator.sh \
-l /boot/vmlinuz-generic-4.4.172-gnu

The output will be with a configuration for lilo.conf, add in lilo.conf the output generated, then run lilo to get the new calls from the menu.

image = /boot/vmlinuz-generic-4.4.172-gnu
initrd = /boot/initrd.gz
root = /dev/sda1
label = Generic-Libre
read-only

lilo

Sources

Original source: http://slackjeff.com.br/artigos/slackware_free.html[3968]

Originally written by Slackjeff[3969]

howtos, slackware, libre, 100% libre, author slackjeff

magiic, frontend slackpkg

slackpkg is an excellent tool that has done its job well. However, some lazy slackers like to use the dialog to instead of typing commands, with the directional + enter / space to do various functions. magiic[3970] is a simple slackpkg frontend and was created for that, for lazy slackers who love dialog.

with magiic you can do several functions such as: Adjust your mirrors, check for updates, update the system, install packages, search, remove etc… The main features of slackpkg are present in magiic.

Support for slackpkg plus and other extensions may not work. Magiic is used to use pure slackpkg.

Sources

Originally written by Slackjeff[3971]

howtos, magiic, author slackjeff

howtos, template

How to switch from the Huge to the Generic kernel?

At the end of this recipe the user will be able to switch from the Huge to the Generic kernel on Slackware, and enjoy its benefits. You may be wondering what benefit you get from this change. The benefits of switching from Huge to Generic are:

More fluidity and faster boot, due to Generic loading only the modules your machine needs.

The modules are not embedded, thus giving better flexibility.

So what is the Huge kernel for? Because it has 'huge' support for many drivers built right into the kernel file, it is ideal for use in installing on a wide range of hardware. After installation a Huge kernel is no longer needed, which is why we should make the switch.

Starting the recipe

Login as root, every step in the process will be done by the superuser. After login we will execute the command 'mkinitrd_command_generator.sh which is present in /usr/share/mkinitrd

/usr/share/mkinitrd/mkinitrd_command_generator.sh

The output will be an examplemkinitrd command-line which containsall the modules necessary for booting your machine hardware and accessing the root filesystem. Example output:

/usr/share/mkinitrd/mkinitrd_command_generator.sh
#
# mkinitrd_command_generator.sh revision 1.45
#
# This script will now make a recommendation about the command to use
# in case you require an initrd image to boot a kernel that does not
# have support for your storage or root filesystem built in
# (such as the Slackware 'generic' kernels').
# A suitable 'mkinitrd' command will be:
mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz

Copy the entire line where it starts with the command 'mkinitrd -c -k …', paste it into your terminal and press ENTER. The mkinitrd command will be executed and will have output in this format:

mkinitrd -c -k 4.4.172 -f ext4 -r /dev/sda1 -m usb-storage:ehci-hcd:ehci-pci:xhci-pci:ohci-pci:xhci-hcd:uhci-hcd:hid:usbhid:i2c-hid:hid_generic:hid-cherry:hid-logitech:hid-logitech-dj:hid-logitech-hidpp:hid-lenovo:hid-microsoft:hid_multitouch:jbd2:mbcache:ext4 -u -o /boot/initrd.gz
OK: /lib/modules/4.4.172/kernel/drivers/usb/storage/usb-storage.ko added.
OK: /lib/modules/4.4.172/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/4.4.172/kernel/drivers/usb/host/ehci-hcd.ko added.
OK: /lib/modules/4.4.172/kernel/drivers/usb/host/ehci-pci.ko added.
...
38432 blocks
/boot/initrd.gz created.
Be sure to run lilo again if you use it.

Tip: the following command will automatically execute the mkinitrd commandline so that you do not have to copy and paste it yourself:

$(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r)

This is useful to execute the command within a script where you can also pass additional parameters such as the partition UUID and a specific file name for initrd.gz:

$(/usr/share/mkinitrd/mkinitrd_command_generator.sh --run /boot/vmlinuz-generic-4.4.172 -a "-o /boot/initrd_specific_file_name.gz -r "UUID=25a4dafe-bbf2-413f-a60c-8c38efc0a122"")

In the note above replace the kernel number, the UUID 32 digits hexadecimal number and the initrd filename based on what you have on you system.

After that we will enter in lilo the information needed for Kernel Generic to be able to load, you can do this manually or you can simply run the command: '/usr/share/mkinitrd/mkinitrd_command_generator.sh' with the “-l” option then pass the full path to the location of vmlinuz-generic.

/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.172
image = /boot/vmlinuz-generic-4.4.172
initrd = /boot/initrd.gz
root = /dev/sda1
label = 4.4.172
read-only
# Linux bootable partition config ends

Now let's add this information to “/etc/lilo.conf”. Add the block of text above (starting with “image =”) at the end of lilo.conf. One way of doing that is:

/usr/share/mkinitrd/mkinitrd_command_generator.sh -l /boot/vmlinuz-generic-4.4.172 >> /etc/lilo.conf

It is extremely important that you do NOT delete the section for the Huge kernel from /etc/lilo.conf, always leave it in case of tragedy with your system. . This for a possible rescue. More generally speaking: never touch the section in /etc/lilo.conf which defines the kernel you are running at the moment.

Using an ASCII text editor, you now change the value of the label statement to a better name like “Generic” or something. This text-label will be appearing in the selection menu on the Lilo screen. With a better name it is easier for you to identify and select your new kernel.
After you have done the above steps you need to run the command 'lilo' for the new configuration to be saved (note that you always need to re-run lilo after you do something to your boot kernels):

lilo
Warning: LBA32 addressing assumed
Added Linux  *
Added Generic  +
One warning was issued.

Ready! Now just reboot your machine and select your “Generic” kernel.

Sources

Original source: http://slackjeff.com.br/artigos/huge4generic.html[3972]

Originally written by Slackjeff[3973]

howtos, slackware, kernel huge, kernel generic, author slackjeff

Studioware: Start

This is the primary source for Studioware documentation. Studioware is a project aimed at providing build scripts of the best open source audio editing software available for the Slackware[3998] Linux operating system.

It is a powerful suite of multimedia applications for professional audio production, video and photography.

Note: No official (stock) Slackware packages are replaced or removed.

Where to find us:
http://studioware.org[3999]
irc.freenode.net #studioware
irc.oftc.net #studioware
https://github.com/eviljames/studioware[4000]

Tell Me More

Studioware turns your Slackware machine into a full fledged digital audio workstation (DAW).

SlackBuild scripts for 32 and 64 bit systems available.

Intended User Base:

Recording studios

Musicians

Photographers

Video editors and producers

Workflows:

Audio production, video and photography

A custom tool to make installation/package management easier:

sepkg - Studioware package builder

Studioware custom tools use Slackware pkgtools to manage your Studioware packages.

Applications List

Studioware Applications List[4001]

Installation

Jump straight to Quick Start[4002]

Before you begin installation here are a few things you may want to know:

Studioware has three main series/categories:

Audio

Video

Photo

A “Full” install includes all three series/categories. Audio, Video and Photo.

These “series” or “categories” can be installed separately or you can do a full install.

Examples:

'sepkg -q full' will download and install everything (full install).

'sepkg -q audio' will download and install the audio queue/packages.

'sepkg -q video' will download and install the video queue/packages.

'sepkg -q photo' will download and install the photo queue/packages.

Please see Quick Start[4003] for detailed installation documentation.

Brief descriptions of the installation tool and where to download it:

Sepkg - Studioware package builder download sepkg[4004]

Things change all the time - source download URLs are moved, sources are deleted, websites vanish etc. If you have any problems, chat to us in #studioware on freenode.

Quick Start Installation Guide

Quick Start[4005]
Going Further[4006]

Tips and Hints

Tips and Hints[4007]

Sources

Originally written by mesa[4008]

Contributions by dive[4009] –>

studioware, audio, video, photography, multimedia, graphics, recording, studio, music, musician

Studioware: Quick Start

To make the process a little simpler we have an application to download, build and install packages: sepkg. It supports queue files, and will even download the queues from our server if needed.

You will need around 12GB of free space to build all the packages in a full install.

1) Preinstallation Tasks

Install JDK or OpenJDK. AlienBob has packages here: http://www.slackware.com/~alien/slackbuilds/openjdk/[3986] This is for portmidi. You may need to log out and in again after installing jdk.

Create Avahi user and group (for 14.2 onward):

groupadd -g 214 avahi

useradd -u 214 -g 214 -c “Avahi” -d /dev/null -s /bin/false avahi

Install fltk (for audio/yoshimi) from extra.

2) Preparing Sepkg

First you need to grab the latest versions and install it with installpkg:

http://studioware.org/files/tools/sepkg/[3987]

# installpkg sepkg-VERSION-noarch-TAG.txz

Next step is to check that it is pointing at the right branch.

Edit /etc/sepkg/sepkg.conf and change SWVERSION to also reflect your Slackware version.

Once that is done we need to fetch the latest file lists from our servers using the -u flag.

sepkg -u

You should now be able to build/install packages.

3) Installation

We have three main categories of applications: audio, video and photo. They are maintained by queue files. There is also a 'full' queue.

If you want a certain category - say audio - then you can use sepkg to download and build/install all the audio applications with the -q flag:

sepkg -q audio

3) Done

That's it. Now start using your apps.

* Originally written by dive[3988]

studioware, quick, start

Studioware: Tips and Hints

Slackware

We recommend running Studioware on a full Slackware Installation.

Extra Options for sepkg/multilib

/etc/sepkg/sepkg.conf can take any of the normal SlackBuild variables to change the default build locations etc.:

TMP=/home/tmp/se

OUTPUT=/home/tmp

In a multilib install set where you need to build/install 32bit packages, or in a 32bit chroot on a multilib host:

ARCH=i686 in /etc/sepkg/sepkg.conf

Java

Either jdk or openjdk is a buildtime requirement when using sepkg to build the audio or full queue. jdk can be found in the extra/ directory on any of the slackware mirrors, or alienBob has packages for openjdk here: http://www.slackware.com/~alien/slackbuilds/openjdk/[3989]

RT Scheduling and Locked Memory

Having problems with ulimit and locked memory?

Put the line 'ulimit -l unlimited' (or whichever value you need) in /sbin/initscript.sample and copy it to /etc/initscript. Do not remove the exec line!

Reboot required.

Having problems with applications (ardour for example) failing to start jack with realtime scheduling?

Add the line 'ulimit -r 65' to /etc/initscript as described above.

Reboot required.

Kernel/Lilo

Using the threadirqs kernel option (Please see http://wiki.linuxaudio.org/wiki/system_configuration#the_kernel[3990])

This is only needed for kernels that are not tweaked for lowlatency performance.

Stock Slackware kernels can take advantage of adding 'append=“ threadirqs”' including the quotes to /etc/lilo.conf.

To check any kernel config run the following command: 'grep -e CONFIG_IRQ_FORCED_THREADING -e CONFIG_PREEMPT=y /boot/[your kernel config]'.

To check your current running kernel run this command: 'zgrep -e CONFIG_IRQ_FORCED_THREADING -e CONFIG_PREEMPT=y /proc/config.gz'.

Add the 'threadirqs' boot option by editing /etc/lilo.conf and adding 'append=“ threadirqs”' including the quotes.

Run Lilo 'lilo'.

Reboot required.

More Performance Options

To stop CPU throttling from affecting jackd and other apps you can change the cpufreq priority:

/etc/rc.d/rc.cpufreq performance

This can be reset by

/etc/rc.d/rc.cpufreq ondemand

Asoundrc

A carefully crafted ~/.asoundrc may be needed in some cases.

Guides on using an alsa only application through JACK:

Jack and Loopback device as Alsa-to-Jack: http://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge[3991]

Using snd-aloop with JACK: http://gamesplusone.com/alsa_to_jack.html[3992]

alienBOB's article: http://alien.slackbook.org/blog/setting-up-jack-audio-in-slackware/[3993]

asoundrc-examples text file: http://studioware.org/mesa/configs/asoundrc-examples-mesa.txt[3994]

Mate

MATE-1.6.2 build script replaces the following Studioware packages on 14.1:

atkmm-2.22.7-i486-1_msb > atkmm-2.22.4-i686-2se.txz [libraries]

cairomm-1.10.0-i486-1_msb > cairomm-1.9.8-i686-2se.txz [libraries]

glibmm-2.36.2-i486-1_msb > glibmm-2.32.1-i686-1se.txz [libraries]

gtkmm-2.24.4-i486-1_msb > gtkmm-2.24.0-i686-2se.txz [libraries]

gtksourceview-2.10.5-i486-1_msb > gtksourceview-3.7.2-i686-1se.txz [libraries]

mm-common-0.9.6-noarch-1_msb > mm-common-0.9.5-i686-2se.txz [libraries]

pangomm-2.34.0-i486-1_msb > pangomm-2.28.1-i686-2se.txz [libraries]

libsigc++-2.2.11-i486-1_msb > libsigc++-2.2.10-i686-1se.txz [development]

Please be sure to use the Studioware packages instead. FYI: Mate 1.6.2 seems to run fine with the Studioware-14.1 packages listed above.

CCache

Using ccache can speed up rebuilds a lot. When set up, it caches the binary objects as applications are built, and later it copies those objects back, instead of having to recompile them.

Slackware comes with ccache.

To start using it, get root and:

cd /usr/local/bin
ln -s /usr/bin/ccache cc
ln -s /usr/bin/ccache c++
ln -s /usr/bin/ccache gcc
ln -s /usr/bin/ccache g++

To set a max size for the cache:

ccache -M 5G

That sets a max size of 5GB in /root/.ccache

You obviously need to set it for your needs and available space.

To see some info about ccache, do:

ccache -s

To temporarily turn it off:

export CCACHE_DISABLE=1

If that fails to work then just move the symlinks out of /usr/local/bin

Don't forget to read the man page.

Sources

Originally written by mesa[3995]

Contributions by dive[3996]

studioware, tips, hints, mate, sepkg

Studioware: Applications List

This is the full list of applications and supporting libraries/plugins etc. plus their location in git and on our package server:

audio/amps/guitarix2

audio/codecs/lame

audio/desktop/evince

audio/development/guile1.8

audio/development/libsigc++

audio/development/libsigc++-legacy12

audio/development/ntk

audio/development/phat

audio/development/pysetuptools

audio/development/scons

audio/development/scrollkeeper

audio/development/vamp-plugin-sdk

audio/drums/hydrogen

audio/editors/audacity

audio/editors/denemo

audio/editors/mscore

audio/editors/rosegarden

audio/effects/jack-rack

audio/effects/rakarrack

audio/graphics/fontforge

audio/graphics/frescobaldi

audio/graphics/goocanvas

audio/graphics/lilypond

audio/graphics/mftrace

audio/graphics/potrace

audio/graphics/pygoocanvas

audio/graphics/t1utils

audio/libraries/atkmm

audio/libraries/aubio

audio/libraries/cairomm

audio/libraries/clalsadrv

audio/libraries/clthreads

audio/libraries/clxclient

audio/libraries/dssi

audio/libraries/fltk

audio/libraries/glibmm

audio/libraries/gnonlin

audio/libraries/gst-python

audio/libraries/gtkmm

audio/libraries/gtksourceview

audio/libraries/imlib2

audio/libraries/ladspa_sdk

audio/libraries/lash

audio/libraries/libavc1394

audio/libraries/libdca

audio/libraries/libgnomecanvas

audio/libraries/libgnomecanvasmm

audio/libraries/libiec61883

audio/libraries/liblo

audio/libraries/liblrdf

audio/libraries/libshout

audio/libraries/libslv2

audio/libraries/lilv

audio/libraries/mm-common

audio/libraries/mxml

audio/libraries/opencv

audio/libraries/pangomm

audio/libraries/portaudio

audio/libraries/portmidi

audio/libraries/pyxdg

audio/libraries/raptor

audio/libraries/rubberband

audio/libraries/serd

audio/libraries/sord

audio/libraries/sratom

audio/libraries/suil

audio/libraries/wxGTK

audio/libraries/zziplib

audio/misc/SimpleSysexxer

audio/misc/milkytracker

audio/misc/non

audio/misc/protobuf

audio/misc/stops

audio/mixers/mixxx

audio/mixers/qastools

audio/multitrack/ardour

audio/multitrack/ardour3

audio/multitrack/ecasound

audio/multitrack/jokosher

audio/multitrack/qtractor

audio/plugins/alsa-plugins

audio/plugins/calf

audio/plugins/frei0r-plugins

audio/plugins/gavl

audio/plugins/gst1-plugins-bad

audio/plugins/gst1-plugins-base

audio/plugins/gstreamer1

audio/plugins/invada-studio-plugins

audio/plugins/lv2

audio/plugins/swh-plugins

audio/plugins/swh-plugins-lv2

audio/plugins/tap-plugins

audio/recorders/timemachine

audio/samplers/giada

audio/samplers/sooperlooper

audio/samplers/specimen

audio/sequencers/muse

audio/sequencers/seq24

audio/synthesizers/ZynAddSubFX

audio/synthesizers/aeolus

audio/synthesizers/amsynth

audio/synthesizers/bristol

audio/synthesizers/fluidsynth

audio/synthesizers/pd

audio/synthesizers/qsynth

audio/synthesizers/sunvox

audio/synthesizers/terminatorX

audio/system/jack

audio/system/meterbridge

audio/system/numactl

audio/system/qjackctl

audio/system/rt-tests

audio/system/set_rlimits

photo/editors/darktable

photo/editors/digikam

photo/editors/rawstudio

photo/libraries/GraphicsMagick

photo/libraries/flickcurl

photo/libraries/lensfun

photo/libraries/openjpeg

photo/output/photoprint

photo/plugins/dcraw

photo/plugins/separate+

photo/plugins/ufraw

photo/system/iccprofiles

photo/viewers/gtkimageview

video/codecs/libdv

video/codecs/libquicktime

video/codecs/libvpx

video/codecs/x264

video/editors/avidemux

video/editors/cinelerra

video/editors/kdenlive

video/editors/openshot

video/transcoders/ffmpeg

video/transcoders/mjpegtools

video/transcoders/mlt

Sources

Originally written by dive[3997]

studioware, applications

Studioware: Going Further

Queue Operations

Queues are the best way to handle installation as they can be adjusted as needed and it saves trying to remember options etc.

It is possible to use queues locally via shell redirection, or remote queues downloaded from our server. Note that our queues are in sbopkg format and have the .sqf extension.

Queue Examples

Local queue examples:

sepkg -i < kdenlive.sqf

This will download the appropriate files one at a time and build and/or install them.

Note that it is probably a good idea to set noclobber in your shell, or accidently using '>' instead of '<' will wipe the queue file. For bash use 'set noclobber' and for zsh use 'setopt noclobber'.

Remote queue examples:

sepkg -q kdenlive
sepkg -q video

We have queues for whole sections of packages - full, video, audio, photo (You don't need to specify the extension as .sqf is assumed). This makes it much easier to set up a machine with a categories of packages in one shot. The queues are on both our ftp and in git, so they can be downloaded manually and adjusted if need be.

Subqueues are supported in queue files. Simply add a '@' in front of the subqueue name. E.G. @kdenlive

Build Options

sepkg queues can take build options:

In the queue specify options after the application name:

ardour WIIMOTE=yes

To find out which build options are avaliable it is necesary to read the README or the SlackBuild in our git repo for the specific application. COMING SOON: We will have a list of applications and their directory branches to make finding them easier.

Slackware Linux Essentials

The Slackbook pages in this wiki are not to be changed.
The contents will be updated by the site editors to match the current working copy of the slackbook by the original authors.

If you wish to recommend content or updates for the official book, visit the website at http://www.slackbook.org/[4010], verify the current state of the book and follow the directions to contribute.

Intended Audience

Why A New Slackware Book?

Slackware Linux may be one of the oldest surviving Linux distributions but it's still regularly updated and includes the latest releases of many of the most popular free software programs. While Slackware does aim to maintain its traditional UNIX roots and values, there is no escaping “progress”. Subsystems change, window managers come and go and new ways are devised to manage the complexities of a modern operating system. While we do resist change for change's sake, it's inevitable that as things evolve documentation becomes stale — books are no exception.

Acknowledgements

Book Chapters

Conventions Used in this Book[4011]

Introduction to Slackware[4012]

Installation[4013]

Booting[4014]

Basic Shell Commands[4015]

The Bourne Again Shell[4016]

Process Control[4017]

The X Window System[4018]

Printing[4019]

Users and Groups[4020]

Filesystem Permissions[4021]

Working with Filesystems[4022]

vi[4023]

Emacs[4024]

Networking[4025]

Wireless Networking[4026]

Basic Networking Utilities[4027]

Package Management[4028]

Keeping Track of Updates[4029]

The Linux Kernel[4030]

Sources

Original source: http://www.slackbook.org/beta[4031]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook

Basic Networking Utilities

So you've finally managed to setup your network connection, now what? How do you know that it's working? How do you know that you set it up correctly? And just what do you do now that it's setup? Well this chapter is for you.

Network Diagnostic Tools

Slackware Linux includes a great many networking tools for troubleshooting and diagnosing network connection troubles, or just for seeing what's out there on the network. Most of these tools are command-line tools, so you can run them from a virtual terminal or in a console window on your graphical desktop. A few of them even have graphical front-ends, but we're going to deal almost exclusively with command-line tools for now.

ping

ping(8) is a handy tool for determining if a computer is operational on your network or on the Internet at large. You can think of as a type of sonar for computers. By using it, you send out a “ping” and listen for an echo to determine if another computer or network device is listening. By default, ping checks for the remote computer once per second indefinitely, but you can change the interval between checks and the total number of checks easily, just check the man page. You can terminate the application at any time with CTRL+c. When ping is finished, it displays a handy summary of its activity. ping is very useful for determining if a computer on your network or the Internet is available, but some systems block the packets ping sends, so sometimes a system may be functioning properly, but still not send replies.

darkstar:~# ping -c 3 www.slackware.com
64 bytes from slackware.com (64.57.102.34): icmp_seq=1 ttl=47 time=87.1 ms
64 bytes from slackware.com (64.57.102.34): icmp_seq=2 ttl=47 time=86.2 ms
64 bytes from slackware.com (64.57.102.34): icmp_seq=3 ttl=47 time=86.7 ms
--- slackware.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2004ms
rtt min/avg/max/mdev = 86.282/86.718/87.127/0.345 ms

traceroute

traceroute(8) is a handy tool for determining what route your packets take to reach some other computer. It's mainly of use for determining which computers are “near” or “far” from you. This distance isn't strictly geographical, as your Internet Service Provider may route traffic from your computer in strange ways. traceroute shows you each router between your computer and any other machine you wish to connect to. Unfortunately, many providers, firewalls, and routers will block traceroute so you might not get a complete picture when using it. Still, it remains a handy tool for network troubleshooting.

darkstar:~# traceroute www.slackware.com
traceroute to slackware.com (64.57.102.34), 30 hops max, 46 byte
packets
1gw.ctsmacon.com (192.168.1.254)1.468 ms2.045 ms1.387 ms
210.0.0.1 (10.0.0.1)7.642 ms8.019 ms6.006 ms
368.1.8.49 (68.1.8.49)10.446 ms9.739 ms7.003 ms
468.1.8.69 (68.1.8.69)11.564 ms6.235 ms7.971 ms
5dalsbbrj01-ae0.r2.dl.cox.net (68.1.0.142)43.859 ms43.287 ms 44.125 ms
6dpr1-ge-2-0-0.dallasequinix.savvis.net (204.70.204.146)41.927 ms 58.247 ms44.989 ms
7cr2-tengige0-7-5-0.dallas.savvis.net (204.70.196.29)42.577 ms 46.110 ms43.977 ms
8cr1-pos-0-3-3-0.losangeles.savvis.net (204.70.194.53)78.070 ms 76.735 ms76.145 ms
9bpr1-ge-3-0-0.LosAngeles.savvis.net (204.70.192.222)77.533 ms 108.328 ms120.096 ms
10wiltel-communications-group-inc.LosAngeles.savvis.net (208.173.55.186)79.607 ms76.847 ms75.998 ms
11tg9-4.cr01.lsancarc.integra.net (209.63.113.57)84.789 ms85.436 ms85.575 ms
12tg13-1.cr01.sntdcabl.integra.net (209.63.113.106)87.608 ms 84.278 ms86.922 ms
13tg13-4.cr02.sntdcabl.integra.net (209.63.113.134)87.284 ms 85.924 ms86.102 ms
14tg13-1.cr02.rcrdcauu.integra.net (209.63.114.169)85.578 ms 85.285 ms84.148 ms
15209.63.99.166 (209.63.99.166)84.515 ms85.424 ms85.956 ms
16208.186.199.158 (208.186.199.158)86.557 ms85.822 ms86.072 ms
17sac-main.cwo.com (209.210.78.20)88.105 ms87.467 ms87.526 ms
18slackware.com (64.57.102.34)85.682 ms86.322 ms85.594 ms

telnet

Once upon a time, telnet(1) was the greatest thing since sliced bread. Basically, telnet opens an unencrypted network connection between two computers and hands control of the session to the user rather than some other application. Using telnet, people could connect to shells on other computers and execute commands as if they were physically present. Due to its unencrypted nature this is no longer recommended; however, telnet is still used for this purpose by many devices.

Today, telnet is put to better use as a network diagnostic tool. Because it passes control of the session directly to the user, it can be used for a great variety of testing purposes. As long as you know what ASCII commands to send to the receiving computer, you can do any number of activies, such as read web pages or check your e-mail. Simply inform telnet what network port to use, and you're all set.

darkstar:~$ telnet www.slackware.com 80
Trying 64.57.102.34...
Connected to www.slackware.com.
Escape character is '^]'.
HEAD / HTTP/1.1
Host: www.slackware.com
HTTP/1.1 200 OK
Date: Thu, 04 Feb 2010 18:01:35 GMT
Server: Apache/1.3.27 (Unix) PHP/4.3.1
Last-Modified: Fri, 28 Aug 2009 01:30:27 GMT
ETag: "61dc2-5374-4a973333"
Accept-Ranges: bytes
Content-Length: 21364
Content-Type: text/html

ssh

As we mentioned, telnet may be useful as a diagnostic tool, but its unencrypted nature makes it a security concern for shell access. Thankfully, there's the secure shell protocol. Nearly every Linux, UNIX, and BSD distribution today makes use of OpenSSH, or ssh(1) for short. It is one of the most commonly used network tools today and makes use of the strongest cryptographic techniques. ssh has many features, configuration options, and neat hacks, enough to fill its own book, so we'll only go into the basics here. Simply run ssh with the user name and the host and you'll be connected to it quickly and safely. If this is the first time you are connecting to this computer, ssh will ask you to confirm your desire, and make a local copy of the encryption key to use. Should this key later change, ssh will warn you and refuse to connect because it is possible that some one is attempting to hijack the connection using what is known as a man-in-the-middle attack.

darkstar:~# ssh alan@slackware.com
alan@slackware.com's password: secret
alan@slackware.com:~$

The user and hostname are in the same form used by e-mail addresses. If you leave off the username part, ssh will use your current username when establishing the connection.

tcpdump

So far all the tools we've looked at have focused on making connections to other computers, but now we're going to look at the traffic itself. tcpdump(1) (which must be run as root) allows us to view all or part of the network traffic originating or received by our computer. tcpdump displays the raw data packets in a variety of ways with all the network headers intact. Don't be alarmed if you don't understand everything it displays, tcpdump is a tool for professional network engineers and system administrators. By default, it probes the first network card it finds, but if you have multiple interfaces, simply use the -i argument to specify which one you're interested in.You can also limit the data displayed using expressions and change the manner in which it is displayed, but that is best explained by the man page and other reference material.

darkstar:~# tcpdump -i wlan0
tcpdump: verbose output suppressed, use -v or -vv for full protocol
decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 96 bytes
13:22:28.221985 IP gw.ctsmacon.com.microsoft-ds > 192.168.1.198.59387:
Flags [P.], ack 838190560, win 3079, options [nop,nop,TS val 1382697489
ecr 339048583], length 164WARNING: Short packet. Try increasing the
snap length by 140
SMB PACKET: SMBtrans2 (REPLY)
13:22:28.222392 IP 192.168.1.198.59387 > gw.ctsmacon.com.microsoft-ds:
Flags [P.], ack 164, win 775, options [nop,nop,TS val 339048667 ecr
1382697489], length 134WARNING: Short packet. Try increasing the snap
length by 110
SMB PACKET: SMBtrans2 (REQUEST)

nmap

Suppose you need to know what network services are running on a machine, or multiple machines, or you wish to determine if multiple machines are responsive?You could ping each one individually, telnet to each port you're interested in, and note every detail, but that's very tedious and time consuming. A much easier alternative is to use a port scanner, and nmap(1) is just the tool for the job.

nmap is capable of scanning TCP and UDP ports, determining the operating system of a network device, probing each located service to determine its specific type, and much much more.Perhaps the simplist way to use nmap is to “ping” multiple computers at once. You can use network address notation (CIDR) or specify a range of addresses and nmap will scan every one and return the results to you when it's finished. You can even specify host names as you like.

In order to “ping” hosts, you'll have to use the -sP argument. The following command instructs nmap to “ping” www.slackware.com and the 16 IP addresses starting at 72.168.24.0 and ending at 72.168.24.15.

darkstar:~# nmap -sP www.slackware.com 72.168.24.0/28

Should you need to perform a port scan, nmap has many options for doing just that. When run without any arguments, nmap performs a standard TCP port scan on all hosts specified. There are also options to make nmap more or less aggressive with its scanning to return results quicker or fool intrusion detection services. For a full discussion, you should refer to the rather exhaustive man page. The following three commands perform a regular port scan, a SYN scan, and a “Christmas tree” scan.

darkstar:~# nmap www.example.com
darkstar:~# nmap -sS www.example.com
darkstar:~# nmap -sX www.example.com

Be warned! Some Internet Service Providers frown heavily on port scanning and may take measures to prevent you from doing it. nmap and applications like it are best used on your own systems for maintenance and security purposes, not as general purpose Internet scanners.

host

Often network problems stem from a failure of DNS (Domain Name Service) which maps domain names to IP addresses. An easy way to perform quick DNS lookups is the host(1) command. When this is run, your computer will perform a few common DNS lookups and return the results.

darkstar:~# host www.slackware.com
www.slackware.com is an alias for slackware.com.
slackware.com has address 64.57.102.34
slackware.com mail is handled by 1 mail-mx.cwo.com.

dig

More complex DNS lookups can be manually performed with the dig(1) tool.dig is “the meanest dog in the pound” when it comes to troubleshooting DNS issues. With this tool, you can perform virtually any DNS lookup from reverse lookups to A, CNAME, MX, SP, TXT records and more. There are far too many command-line options and lookup types to go into depth here, but the man page lists all the common use cases.

darkstar:~# dig @207.69.188.185 www.slackware.com a
; <<>> DiG 9.4.3-P4 <<>> @207.69.188.185 www.slackware.com a
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57965
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 0
;; QUESTION SECTION:
;www.slackware.com.		IN	A
;; ANSWER SECTION:
www.slackware.com.	86400	IN	CNAME	slackware.com.
slackware.com.		86400	IN	A	64.57.102.34
;; AUTHORITY SECTION:
slackware.com.		86400	IN	NS	ns2.cwo.com.
slackware.com.		86400	IN	NS	ns1.cwo.com.
;; Query time: 348 msec
;; SERVER: 207.69.188.185#53(207.69.188.185)
;; WHEN: Sat Jul  3 16:25:10 2010
;; MSG SIZE  rcvd: 105

Let's take a took at the command-line options used above.The @207.69.188.185 argument tells dig what DNS server to query. If it is not specified, dig will simply use whatever servers are listed in /etc/resolv.conf.The a argument at the end is the type of DNS record to lookup. In this case we looked for an “A” record which returned an IPv4 address.

finger

finger(1) isn't exactly a network diagnostic tool as much as it is a network-user diagnostic tool. Using finger, you can gather a handful of useful information about users on servers running the fingerd(8) daemon. Today very few servers still offer fingerd, but for those that do it can be a useful tool for keeping track of your friends and co-workers.

darkstar:~# finger alan@cardinal.lizella.net
[cardinal.lizella.net]
Login: alan           			Name: Alan Hicks
Directory: /home/alan               	Shell: /bin/bash
Office: 478 808 9919, 478 935 8133
On since Wed Apr 13 17:43 (UTC) on pts/9 from
75-150-12-113-atlanta.hfc.comcastbusiness.net
32 minutes 24 seconds idle
(messages off)
On since Wed Apr 13 17:45 (UTC) on pts/10 from :pts/9:S.0
48 minutes 56 seconds idle
Mail forwarded to alan@lizella.net
No mail.
No Plan.

Web Browsers

Slackware includes a variety of web browsers. If you're using a graphical desktop, you'll find Firefox, Seamonkey, and others you may already be familiar with, but what about console access? Fortunately, there are a number of capable web browsers here as well.

lynx

The oldest console-based web browser included with Slackware is definitely lynx(1), a very capable if somewhat limited web browser.lynx does not support frames, javascript, or pictures; it is strictly a text web browser. Navigation is performed using your keyboard's arrow keys and optionally, a mouse. While it lacks many features that other browsers support, lynx is one of the fastest web browsers you'll ever use for gathering information. For example, the -dump argument sends the formatted web page directly to the console, which can then be piped to other programs.

links

A more feature-rich alternative is the popular links(1), a console-based web browser that supports frames and has better table rendering than lynx. Like its predecessor, links is navigable with the arrow keys, and the use of a mouse is supported.Unlike lynx, it also includes a handy menu (simply click on the top line with your mouse to activate) and generally formats web pages better.

wget

Unlike the other browsers we've looked at, wget(1) is non-interactive. Rather than display HTTP content, wget downloads it. This takes the “browsing” out of the web browser. Unlike the dump modes of other browsers, wget does not format its downloads; rather it copies the content in its exact form on the web server with all tags and binary data in place. It also supports several recursive options that can effectively mirror online content to your local computer.wget need not operate exclusively on HTTP content; it also supports FTP and several other protocols.

darkstar:~# wget ftp://ftp.osuosl.org/pub/slackware/slackware-current/ChangeLog.txt
--2010-05-01 13:51:19--
ftp://ftp.osuosl.org/pub/slackware/slackware-current/ChangeLog.txt
=> `ChangeLog.txt'
Resolving ftp.osuosl.org... 64.50.236.52
Connecting to ftp.osuosl.org|64.50.236.52|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/slackware/slackware-current ...  done.
==> SIZE ChangeLog.txt ... 75306
==> PASV ... done.    ==> RETR ChangeLog.txt ... done.
Length: 75306 (74K)
100%[======================================>] 75,306       110K/s   in 0.7s
2010-05-01 13:51:22 (110 KB/s) - `ChangeLog.txt' saved [75306]

Mail Clients

Slackware also includes a variety of email clients. If you're using a graphical desktop, you'll find Thunderbird, Kmail, sylpheed and others. As with web browsers, there are also applications that function within the shell. Once you start using an email client in the console, you may find yourself not wanting to use anything else; the flexibility and configurability can be addicting.

pine

pine is one of the oldest command-line interface mail clients still in existance and remains one of the most user-friendly. pine was created by the University of Washington and carries with it both a trademark and a copyright license that are difficult to work with. Thankfully back in 2005, the university saw fit to re-write it without the trademark and with a more open license, so alpine(1), the pine-clone distributed with Slackware, was born.

To start using alpine, simply type pine at the command line. Using it is very simple due to its menu-driven system as well as the command reference neatly located at the bottom of the screen. See for yourself:

Before configuring any mail client, you should check the documentation of your mail server to gather all of the pertinent information about what protocols and security measures your mail service uses. This will help you configure pine correctly. By default, pine will check for new e-mails delivered to a mail service running on your computer. Unless you're actually running such a mail service (many people do) this probably isn't what you want. Fortunately configuring pine is a straight forward process. Simply enter the [S]etup menu and chose the [C]onfig option. You'll be given an option to enter you name, mail path, SMTP server, and many other options.

mutt

Some people don't like pine. Some people want more control. Some people want a fully-configurable mail client with plugin support and a no-nonsense attitude. Those people use mutt(1). mutt isn't as user friendly as pine, but makes up for it with power. You won't find the user-friendly command reference at the bottom of the screen, mutt uses every last inch of real-estate for mail processing duty. It's feature support is extensive - threaded displays are no problem for the mighty mixed-breed! You can configure mutt with a .muttrc file in your home directory. With all the many different possible configuration options, there's even a man page for that, muttrc(5). You might want to read up on it.

Using mutt is unique because it is by nature a Mail User Agent (MUA), meaning its true purpose is to read and sort email. This was its only job originally, although some additional features such as retrieving mail via POP3 and even very basic transfering messages via SMTP have snuck into the application.

As is so often the case with robust console-based applications, the configuration options are myriad, and there is no “right” or “wrong” way of using mutt as long as it does what you want it to do. One thing to keep in mind if you are considering using mutt for mail handling is that its mail sending and receiving abilities are very limited. mutt focuses solely on sorting, reading, and composing mail messages in addition to other traditional Mail User Agent duties. This is keeping in focus with the UNIX philosophy of small tools that do one thing very well and which can be combined (or “chained”) with other tools to complete whatever tasks are required. With this in mind, you'll likely need to setup some external tool to receiving mail at a minimum.

The commands used to navigate around in mutt are highly customizable but the defaults can be listed by typing ?.

mailx

So those are great and everything, but what if you just want a mail client that isn't menu-driven? Thankfully mailx is here to save you.

mailx is based on the Berkeley Mail application, with a mail command appearing as early as Version 1 of AT&T's UNIX. It can be used either interactively or non-interactively.

mailx reads mail from your computer's mail spool and displays the usual combination of sender, subject, status, and size in a list, leaving the user at an interactive prompt. In fact, it might look familiar to you if you bothered checking your mail immediately after installing Slackware and read Pat Volkerding's greeting.

darkstar:~# mailx
Heirloom mailx version 12.4 7/29/08.Type ? for help.
"/var/spool/mail/root": 2 messages 2 new
>N1 To rootThu Mar 10 23:33 52/1902Register with the Linux counter project
N2 To rootThu Mar 10 23:35321/15417 Welcome to Linux (Slackware 14.0)!
?;

To read a message, enter the number of the message at the prompt. This displays the message using more, so use the RETURN key to view the next page. Once the end of the message has been reached, press q to return to the list view, or RETURN to continue to the next message.

To see a list of available commands, enter ? at the mail prompt; using the commands provided, you can view the headers of mail in the spool, reply, delete, save, and many other common email tasks.

mailx is most powerful when used in scripting. For all of the options available for mailx, view its man page. A simple way to send an email to someone requires only the command itself and the destination address.

darkstar:~$mailx bob@example.com

After the command has been issued, an interactive prompt appears for a subject line, the message body, and the end character (a single period on an otherwise empty line).

mailx can be used entirely without human intervention, however. Generally, it's safe to assume that any attribute you can define in the interactive shell for mailx can also be defined while scripting it or using it as one non-interactive command.

darkstar:~$ mailx -n -s "Test message" bob@example.com < ~/message.txt

In this example, the contents of the file message.txt would be sent as the message body to the specified recipient. No interaction from the user is required.

Within one's own computer (localhost) or one's own network, sending email in this manner is entirely possible. But over the internet a few more steps are usually required along the way. Of course, most notably there is usually an smtp server handling the delivery of your email. This, too, can be specified as part of your mail command:

darkstar:~$env MAILRC=/dev/null
from="bob@example.com (Bob Dobbs)"
smtp=relay.example.com mail -n -s "Test message" connie@example.com < ~/message.txt

In this case, the MAILRC variable is set to /dev/null in order to override any system defaults, and the smtp server as well as the FROM: line are defined. The rest of the command is the same as using mailx internally within one's own computer or network.

Over all, mailx is usually viewed as a mail client with the bare-minimum features; this is largely true, but when you need to be able to script sending notification emails or important update messages, it quickly becomes a lot more valuable than a fully interactive application like pine or mutt.

FTP Clients

Lots of data is stored on FTP servers the world over. In fact, Slackware Linux was first publically offered via FTP and continues to be distributed in this fashion today. Most open source software can be downloaded in source code or binary form via FTP, so knowing how to retrieve this information is a handy skill.

ftp

The simplest FTP client included with Slackware is named simply, ftp(1) and is a reliable if somewhat simple means of sending and retrieving data. ftp connects to an FTP server, asks for your username and password, and then allows you to put or get data to and from that server. ftp has fallen out of favor with more experienced users do to a lack of features, but remains a handy tool, and much of the documentation you see online will refer you to it.

Once an FTP session has been initialized, you'll be placed at a prompt somewhat like a shell.From here you can change and list directories using the “cd” and “ls” commands, just like a shell.Additionally, you may issue the “put” command to send a file to the server, or a “get” command to retrieve data from the server. If you're connecting to a public FTP server, you'll want to use the “anonymous” username and simply enter your e-mail address (or a fake one) for the password.

darkstar:~$ ftp ftp.osuosl.org
Name (ftp.osuosl.org:alan): anonymous
331 Please specify the password.
Password: secret
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd pub/slackware/slackware-current/
250 Directory successfully changed.
ftp> get ChangeLog.txt
local: ChangeLog.txt remote: ChangeLog.txt
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for ChangeLog.txt (33967
bytes).
226 File send OK.
33967 bytes received in 0.351 secs (94 Kbytes/sec)
ftp> bye
221 Goodbye.

ncftp

ncftp(1) (pronounced nick-f-t-p), is a more feature rich successor to ftp, supporting tab completion and recursive retrieval. It automatically connects to a server as the anonymous user, unless you specify a different username on the commandline with the -u argument. The primary advantage over ftp is the ability to send and retrieve multiple files at once with the “mput” and “mget” commands. If you pass the -R argument to either of them, they will recursively put or get data from directories.

darkstar:~# ncftp ftp.osuosl.org
Logging in...
Login successful.
Logged in to ftp.osuosl.org.
ncftp / > cd pub/slackware/slackware-current
Directory successfully changed.
ncftp ...ware/slackware-current > mget -R isolinux
isolinux/README.TXT: 4.63 kB 16.77 kB/s
isolinux/README_SPLIT.TXT: 788.00 B5.43 kB/s
isolinux/f2.txt: 793.00 B5.68 kB/s
isolinux/initrd.img:13.75 MB 837.91 kB/s
isolinux/iso.sort:50.00 B354.50 B/s
isolinux/isolinux.bin:14.00 kB 33.99 kB/s
isolinux/isolinux.cfg: 487.00 B3.30 kB/s
isolinux/message.txt:760.00 B5.32 kB/s
isolinux/setpkg: 2.76 kB 19.11 kB/s
ncftp ...ware/slackware-current > bye

lftp

The last client we're going to look at is lftp(1).Like ncftp, it supports tab completion and recursive activity, but has a more friendly license.Rather than user “mget” and “mput”, all recursive operations are handled with the “mirror” command.“mirror” has many different options available, so I'll have to refer you to the man page and the built-in “help” command for complete details.

darkstar:~# lftp ftp.osuosl.org
lftp ftp.osuosl.org:~> cd /pub/slackware/slackware-current
cd ok, cwd=/pub/slackware/slackware-current
lftp ftp.osuosl.org:/pub/slackware/slackware-current> mirror isolinux
Total: 2 directories, 16 files, 1 symlink
New: 16 files, 1 symlink
14636789 bytes transferred in 20 seconds (703.7K/s)
lftp ftp.osuosl.org:/pub/slackware/slackware-current> bye

rsync

Ready to see something cool? Have you ever found yourself needing just a handful of files from a large directory, but you're not entirely sure which files you already have and which ones you need? You can download the entire directory again, but that's duplicating a lot of work. You can pick and chose, manually check everything, but that's very tedious. Perhaps you've downloaded a large file such as an ISO, but something went wrong with the download? It doesn't make sense that you should have to pull down the entire file again if only a few bits have been corrupted.Enter rsync(1), a fast and versatile copying tool for local and remote files.

rsync uses a handful of simple, but very effective techniques to determine what needs to be changed. By checking file size and time stamps, it can determine if two files are different. If something has changed, it can determine what bytes are different, and simply download that handfull of data rather than an entire file. It is truly a marvel of modern technology.

In its simplist form, rsync connects to an rsync protocol server and downloads a list of files and directories, along with their sizes, timestamps, and other information. It then compares this to the local files (if any) to determine what it needs to transfer. Only files that are different will be synced.Additionally, it breaks up large files into smaller chunks and compares those chunks using a quick and simple hash function. Any chunks that match are not transferred, so the amount of data that must be copied can be dramatically reduced.rsync also supports compression, verbose output, file deletion, permission handling, and many other options. For a complete list, you'll need to refer to the man page, but I've included a small table of some of the more common options.

Table 16.1. rsync Arguments

-v | Increased verbosity
-c | Checksum all files rather than relying on file size and timestamp
-a | Archive mode (equivilant to -rlptgoD)
-e | Specify a remote shell to use
-r | Recursive mode
-u | Update - skip files that are newer on the receiving end
-p | Preserve permissions
-n | Dry-run - perform a trial run without making any changes
-z | Compress - handy for slow network connections

Due to the power and versatility of rsync, it can be invoked in a number of ways.The following two examples connect to an rsync protocol server to retrieve some information and to another server via ssh to encrypt the transmission.

darkstar:~# rsync -avz rsync://ftp.osuosl.org/pub/slackware/slackware-current/ \
/src/slackware-current/
darkstar:~# rsync -e ssh ftp.slackware.com:/home/alan/foo /tmp/foo

Chapter Navigation

Previous Chapter: Wireless Networking[4032]

Next Chapter: Package Management[4033]

Sources

Original source: http://www.slackbook.org/beta[4034]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, networking, mail clients, web browsers, rsync

Keeping Track of Updates

The -stable Branch

After a new version of Slackware is released, the Slackware team will, as needed, release updated packages to fix serious security vulnerabilities and particularly nasty bugs. Therefore, it's important to keep up with all of the patches for your version of Slackware, which is referred to as the -stable branch. There is also a -current branch, which is where we do our development work toward the next stable release (and as such, there are often intrusive changes there), but unless you're willing to work with a possibly broken system and are able to fix things on your own, we strongly recommend that you stick with the -stable branch.

Since -stable updates aren't distributed on the disks, you'll need to obtain them from the Internet. Many people and organizations offer mirrors from which you can download the entire Slackware tree (or only the patches/ directory) in any number of ways. While some mirrors offer web access, the most common ways of obtaining updates are via ftp and/or rsync servers. The Slackware project maintains a small list (organized by country) of known mirrors. If you're unsure which mirror to use, simply consult http://www.slackware.com/getslack/[4035] for suggestions. If you have a major university near you, there's a good chance that they offer a mirror of numerous open source projects, and Slackware may be among them. The only real requirement for a mirror is that it be complete; usually it's best to use a mirror near where you live in order to achieve the fastest transfer times and use the least amount of Internet resources.

So how do you know when there are updates? The best way is to consult the ChangeLog.txt on any up-to-date mirror. You can always find the latest changelogs for the -current and most recent -stable branch on the Slackware Project's web page, but if you're running an older version of Slackware, you'll need to check a mirror.

darkstar:~# wget -O - \
ftp://slackware.osuosl.org/pub/slackware/slackware64-current/ChangeLog.txt \
| less
Thu Aug 16 04:01:31 UTC 2012
Getting close!  Hopefully we've cleared out most of the remaining issues
and are nearly ready here.  We'll call this release candidate 2.
Unless there's a very good rationale, versions are frozen.
Any reports of remaining bugs will be gladly taken, though.
#include <more/cowbell.h>
a/aaa_base-14.0-x86_64-4.txz:  Rebuilt.
Remove mention of HAL in the initial welcome email (mention udisks2
instead).  Thanks to Dave Margell.
a/bash-4.2.037-x86_64-1.txz:  Upgraded.

Security Update Mailing List

While the Slackware team does release updated bugfix-only packages (i.e. not security fixes) occasionally, you're probably most interested in security fixes for vulnerabilities discovered after the -stable release. The Slackware Project maintains a mailing list that will notify you of any updated packages for such serious issues. In order to subscribe to the mailing list, send an e-mail to majordomo@slackware.com[4036] with the words subscribe slackware-security in the body of the message. The majordomo will be happy to add your name to the list, and when new packages are released, it will mail an advisory to you.

Upgrading Slackware Versions

Now that we've gone this far, you should feel reasonably competent in your ability to manage your Slackware system. But what do we do with it when there's a new release? Updating from one release of Slackware to another is a lot more complicated than simply updating a few packages. Each release changes a lot of things, and while many of these changes are small, some of them can completely break your system if you haven't prepared for them and/or don't understand what is changing and why. While some Linux distributions provide highly automated tools that attempt to handle every tiny detail for you, Slackware takes a much more hands-on approach to things.

The very first thing you should do before attempting an upgrade is the one that many people neglect: decide if it's really necessary to upgrade. If the old system is stable and doing everything you want it to do, there may be no need to do an operating system upgrade at all.

Assuming you decide to do the upgrade, then the second thing you should do is read the CHANGES_AND_HINTS.TXT file on your upgrade discs or a mirror. This file is updated during the development period before every release, and it lists a lot of helpful hints and tips to aid you in dealing with the changes.

Finally, read the UPGRADE.TXT file before proceeding. After doing these things, you may decide that it's less trouble and potential for problems to backup your configuration files and data and do a fresh installation of the new Slackware release rather than attempt a possibly tricky upgrade. However, if you still wish to continue, make backups of your data and configuration files first. At a minimum, it's good practice to backup the /etc and /home directories. This will give you a chance to perform a reinstall if something goes wrong with the upgrade.

Since every new version of Slackware has a few differences, giving complete instructions here is not only futile but potentially misleading. You should always consult the documentation included on your Slackware disks or your favorite mirror.

Chapter Navigation

Previous Chapter: Package Management[4037]

Next Chapter: The Linux Kernel[4038]

Sources

Original source: http://www.slackbook.org/beta[4039]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, package management

Filesystem Permissions

Permissions Overview

As we've discussed, Slackware Linux is a multi-user operating system. Because of this, its filesystems are mutli-user as well. This means that every file or directory has a set of permissions that can grant or deny privileges to different users. There are three basic permissions and three sets of permissions for each file. Let's take a look at an example file.

darkstar:~$ ls -l /bin/ls
-rwxr-xr-x 1 root root 81820 2007-06-08 21:12 /bin/ls

Recall from chapter 4 that ls -l lists the permissions for a file or directory along with the user and group that “own” the file. In this case, the permissions are rwxr-xr-x, the user is root and the group is also root. The permissions section, while grouped together, is really three separate pieces. The first set of three letters are the permissions granted to the user that owns the file. The second set of three are those granted to the group owner, and the final three are permissions for everyone else.

Table 10.1. Permissions of /bin/ls

Set | Listing | Meaning
Owner | rwx | The owner “root” may read, write, and execute
Group | r-x | The group “root” may read and execute
Others | r-x | Everyone else may read and execute

The permissions are pretty self explanatory of course, at least for files. Read, write, and execute allow you to read a file, write to it, or execute it. But what do these permissions mean for directories? Simply put, the read permissions grants the ability to list the directory's contents (say with ls). The write permission grants the ability to create new files in the directory as well as delete the entire directory, even if you otherwise wouldn't be able to delete some of the other files inside it. The execute permission grants the ability to actually enter the directory (with the bash built-in command cd for example).

Let's look at the permissions on a directory now.

darkstar:~$ ls -ld /home/alan
drwxr-x--- 60 alan users 3040 2008-06-06 17:14 /home/alan/

Here we see the permissions on my home directory and its ownership. The directory is owned by the user alan and the group users. The user is granted all rights (rwx), the group is granted only read and execute permissions (r-x), and everyone else is prohibited from doing anything.

chmod, chown, and chgrp

So now that we know what permissions are, how do we change them? And for that matter, how do we assign user and group ownership? The answer is right here in this section.

The first tool we'll discuss is the useful chown (1) command. Using chown, we can (you guessed it), change the ownership of a file or directory. chown is historically used only to change the user ownership, but can change the group ownership as well.

darkstar:~# ls -l /tmp/foo
total 0
-rw-r--r-- 1 alan users 0 2008-06-06 22:29 a
-rw-r--r-- 1 alan users 0 2008-06-06 22:29 b
darkstar:~# chown root /tmp/foo/a
darkstar:~# ls -l /tmp/foo
total 0
-rw-r--r-- 1 root users 0 2008-06-06 22:29 a
-rw-r--r-- 1 alan users 0 2008-06-06 22:29 b

By using a colon after the user account, you may also specify a new group account.

darkstar:~# chown root:root /tmp/foo/b
darkstar:~#  ls -l /tmp/foo
total 0
-rw-r--r-- 1 root users 0 2008-06-06 22:29 a
-rw-r--r-- 1 root root  0 2008-06-06 22:29 b

chown can also be used recursively to change the ownership of all files and directories below a target directory. The following command would change all the files under the directory /tmp/foo to have their ownership set to root:root.

darkstar:~# chown -R root:root /tmp/foo/b

Specifying a colon and a group name without a user name will simply change the group for a file and leave the user ownership intact.

darkstar:~# chown :wheel /tmp/foo/a
darkstar:~# ls -l /tmp/foo
ls -l /tmp/foo
total 0
-rw-r--r-- 1 root wheel 0 2008-06-06 22:29 a
-rw-r--r-- 1 root root  0 2008-06-06 22:29 b

The younger brother of chown is the slightly less useful chgrp(1). This command works just like chown, except it can only change the group ownership of a file. Since chown can already do this, why bother with chgrp? The answer is simple. Many other operating systems use a different version of chown that cannot change the group ownership, so if you ever come across one of those, now you know how.

There's a reason we discussed changing ownership before changing permissions. The first is a much easier concept to grasp. The tool for changing permissions on a file or directory is chmod(1). The syntax for it is nearly identical to that for chown, but rather than specify a user or group, the administrator must specify either a set of octal permissions or a set of alphabetic permissions. Neither one is especially easy to grasp the first time. We'll begin with the less complicated octal permissions.

Octal permissions derive their name from being assigned by one of eight digits, namely the numbers 0 through 7. Each permissions is assigned a number that is a power of 2, and those numbers are added together to get the final permissions for one of the permission sets. If this sounds confusing, maybe this table will help.

Table 10.2. Octal Permissions

Permission | Meaning
Read | 4
Write | 2
Execute | 1

By adding these values together, we can reach any number between 0 and 7 and specify all possible permission combinations. For example, to grant both read and write privileges while denying execute, we would use the number 6. The number 3 would grant write and execute permissions, but deny the ability to read the file. We must specify a number for each of the three sets when using octal permissions. It's not possible to specify only a set of user or group permissions this way for example.

darkstar:~# ls -l /tmp/foo/a
-rw-r--r-- 1 root root  0 2008-06-06 22:29 a
darkstar:~# chmod 750 /tmp/foo/a
darkstar:~# ls -l /tmp/foo/a
-rwxr-x--- 1 root root  0 2008-06-06 22:29 a

chmod can also use letter values along with '+' or − to grant or deny permissions. While this may be easier to remember, it's often easier to use the octal permissions.

Table 10.3. Alphabetic Permissions

Permission | Letter Value
Read | r
Write | w
Execute | x

Table 10.4. Alphabetic Users and Groups

Accounts Affected | Letter Value
User/Owner | u
Group | g
Others/World | o

To use the letter values with chmod, you must specify which set to use them with, either “u” for user, “g” for group, and “o” for all others. You must also specify whether you are adding or removing permissions with the “+” and “-” signs. Multiple sets can be changed at once by separating each with a comma.

darkstar:/tmp/foo# ls -l
total 0
-rw-r--r-- 1 alan users 0 2008-06-06 23:37 a
-rw-r--r-- 1 alan users 0 2008-06-06 23:37 b
-rw-r--r-- 1 alan users 0 2008-06-06 23:37 c
-rw-r--r-- 1 alan users 0 2008-06-06 23:37 d
darkstar:/tmp/foo# chmod u+x a
darkstar:/tmp/foo# chmod g+w b
darkstar:/tmp/foo# chmod u+x,g+x,o-r c
darkstar:/tmp/foo# chmod u+rx-w,g+r,o-r d
darkstar:/tmp/foo# ls -l
-rwxr--r-- 1 alan users 0 2008-06-06 23:37 a*
-rw-rw-r-- 1 alan users 0 2008-06-06 23:37 b
-rwxr-x--- 1 alan users 0 2008-06-06 23:37 c*
-r-xr----- 1 alan users 0 2008-06-06 23:37 d*

Which you prefer to use is entirely up to you. There are places where one is better than the other, so a real Slacker will know both inside out.

SUID, SGID, and the "Sticky" Bit

We're not quite done with permissions just yet. There are three other “special” permissions in addition to those mentioned above. They are SUID, SGID, and the sticky bit. When a file has one or more of these permissions set, it behaves in special ways. The SUID and SGID permissions change the way an application is run, while the sticky bit restricts deletion of files. These permissions are applied with chmod like read, write, and execute, but with a twist.

SUID and SGID stand for “Set User ID” and “Set Group ID” respectively. When an application with one of these bits is set, the application runs with the user or group ownership permissions of that application regardless of what user actually executed it. Let's take a look at a common SUID application, the humble passwd and the files it modifies.

darkstar:~# ls -l /usr/bin/passwd \
/etc/passwd \
/etc/shadow
-rw-r--r-- 1 root root    1106 2008-06-03 22:23 /etc/passwd
-rw-r----- 1 root shadow   627 2008-06-03 22:22 /etc/shadow
-rws--x--x 1 root root   34844 2008-03-24 16:11 /usr/bin/passwd*

Notice the permissions on passwd. Instead of an x in the user's execute slot, we have an s. This tells us that passwd is a SUID program, and when we run it, the process will run as the user “root” rather than as the user that actually executed it. The reason for this is readily apparent as soon as you look at the two files it modifies. Neither /etc/passwd nor /etc/shadow are writable by anyone other than root. Since users need to change their personal information, passwd must be run as root in order to modify those files.

So what about the sticky bit? The sticky bit restricts the ability to move or delete files and is only ever set on directories. Non-root users cannot move or delete any files under a directory with the sticky bit set unless they are the owner of that file. Normally anyone with write permission to the file can do this, but the sticky bit prevents it for anyone but the owner (and of course, root). Let's take a look at a common “sticky” directory.

darkstar:~# ls -ld /tmp
drwxrwxrwt 1 root root   34844 2008-03-24 16:11 /tmp

Naturally, being a directory for the storage of temporary files system wide, /tmp needs to be readable, writable, and executable by anyone and everyone. Since any user is likely to have a file or two stored here at any time, it only makes good sense to prevent other users from deleting those files, so the sticky bit has been set. You can see it by the presence of the t in place of the x in the world permissions section.

Table 10.5. SUID, SGID, and “Sticky” Permissions

Permission Type | Octal Value | Letter Value
SUID | 4 | s
SGID | 2 | s
Sticky | 1 | t

When using octal permissions, you must specify an additional leading octal value. For example, to recreate the permission on /tmp, we would use 1777. To recreate those permissions on /usr/bin/passwd, we would use 4711. Essentially, any time this leading fourth octet isn't specified, chmod assumes its value to be 0.

darkstar:~# chmod 1777 /tmp
darkstar:~# chmod 4711 /usr/bin/passwd

Using the alphabetic permission values is slightly different. Assuming the two files above have permissions of 0000 (no permissions at all), here is how we would set them.

darkstar:~# chmod ug+rwx,o+rwt /tmp
darkstar:~# chmod u+rws,go+x /usr/bin/passwd

Chapter Navigation

Previous Chapter: Users and Groups[4040]

Next Chapter: Working with Filesystems[4041]

Sources

Original source: http://www.slackbook.org/beta[4042]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, filesystem, permissions, suid, sgid, sticky bit, chmod, chown, chgrp

Wireless networking

iwconfig

Wireless networking is somewhat more complicated than traditional wired networking, and requires additional tools for setup. Slackware includes a diverse collection of wireless networking tools to allow you to configure your wireless network interface card (WNIC) at the most basic level. We won't cover everything here, but should give you a solid foundation to get up and running quickly. The first tool we are going to look at is iwconfig(8). When run without any argument, iwconfig displays the current wireless information on any and all NICs on your computer.

darkstar:~# iwconfig
lo        no wireless extensions.
eth0      no wireless extensions.
wmaster0  no wireless extensions.
wlan0     IEEE 802.11abgn  ESSID:"nest"
Mode:Managed  Frequency:2.432 GHz  Access Point:
00:13:10:EA:4E:BD
Bit Rate=54 Mb/s   Tx-Power=17 dBm
Retry min limit:7   RTS thr:off   Fragment thr=2352 B
Encryption key:off
Power Management:off
Link Quality=100/100  Signal level:-42 dBm
Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
Tx excessive retries:0  Invalid misc:0   Missed beacon:0
tun0      no wireless extensions.

Unlike wired networks, wireless networks are “fuzzy”. Their borders are hard to define, and multiple networks may overlap one another. In order to avoid confusion, each wireless network has (hopefully) unique identifiers. The two most basic identifiers are the Extended Service Set Identifier (ESSID) and the channel or frequency for radio transmission. The ESSID is simply a name that identifies the wireless network in question; you may have heard it referred to as the “network name” or something similar.

Typical wireless networks operate on 11 different frequencies. In order to connect to even the most basic wireless network, you will have to setup these two pieces of information, and possibly others, before setting up things like the WNIC's IP address. Here you can see that my ESSID is set to “nest” and my laptop is transmitting at 2.432 GHz. This is all that is required to connect to an unencrypted wireless LAN. (For any of you out there expecting to come to my house and use my unencrypted wireless, you should know that you'll have to break a 2048-bit SSL key before the access point will let you communicate with my LAN.)

darkstar:~# iwconfig wlan0 essid nest \
freq 2.432G

The freq and channel arguments control basically the same thing. You only need to use one. If you are unsure what frequency or channel to use, Slackware can usually figure this out for you.

darkstar:~# iwconfig wlan0 essid nest \
channel auto

Now Slackware will attempt to connect to the strongest access point on the “nest” essid operating at any frequency.

Wired Equivalent Protection (or Lack Thereof)

Wireless networking is by its very nature less secure than wired networking. Having your information travelling on the airwaves makes it highly susceptible to interception by third parties, so over the years a number of methods have been devised to make wireless networking more secure. The first was called Wired Equivilant Protection, or WEP for short, and fell far short of its goal. If you are still using WEP today, I encourage you to consider using WPA2 or some other form of stronger encryption. Attacks against WEP are trivial and take only minutes to perform. Unfortunately there are still access points configured for WEP, and you may need to connect to one from time to time. Connecting to WEP encrypted access points is fairly simple, particularly if you have the key in hexidecimal format. We'll need to pass the key argument along with the password in hexidecimal or ASCII format. If using an ASCII password, you'll need to prepend it with “s;” but generally speaking, hexidecimal format is preferred.

darkstar:~# iwconfig wlan0 \
key cf80baf8bf01a160de540bfb1c
darkstar:~# iwconfig wlan0 \
key s:thisisapassword

Wifi Protected Access

Wifi Protected Access (or WPA for short) was the successor for WEP that aimed to fix several problems with wireless encryption. Unfortunately, WPA had some flaws as well. An update called WPA2 offers even stronger protection. At this time, WPA2 is supported by nearly all wireless network cards and access points, but some older devices may only support WEP. If you need to secure your wireless network traffic, WPA2 should be considered the minimum level of protection required. Unfortunately, iwconfig is unable to setup WPA2 encryption on its own. For that, we need a helper daemon, wpa_supplicant(8).

Unfortunately, there's no easy way to manually configure a WPA2 protected network; you'll have to edit /etc/wpa_supplicant.conf directly with a text editor. Here we will discuss the simplest form of WPA2 protection, the Pre-Shared Key, or PSK for short. For details on setting up Slackware to connect to more complicated WPA2 encrypted networks, see the man page for wpa_supplicant.conf.

# /etc/wpa_supplicant.conf
# ========================
# This line enables the use of wpa_cli which is used by rc.wireless
# if possible (to check for successful association)
ctrl_interface=/var/run/wpa_supplicant
# By default, only root (group 0) may use wpa_cli
ctrl_interface_group=0
eapol_version=1
ap_scan=1
fast_reauth=1
#country=US
# WPA protected network, supply your own ESSID and WPAPSK here:
network={
scan_ssid=1
ssid="nest"
key_mgmt=WPA-PSK
psk="secret passphrase"
}

The block of text we're interested in is the network block enclosed by curly braces. Here we have set the ssid for the network “nest”, and “secret passphrase” as the PSK to be used. At this point, WPA2 is properly configured. You can run wpa_supplicant and then obtain an IP address via DHCP or set a static address. Of course, this is a lot of work; there must be an easier way to do this.

rc.inet1.conf revisited

Welcome back to rc.inet1.conf. You're recall that in networking[4043] we used this configuration file to automatically configure NICs whenever Slackware boots. Now, we will use it to configure wifi as well.

  If you're using WPA2, you'll still need to setup
wpa_supplicant.conf properly first, however.

Recall that each NIC had a name or number that identified the variables that correspond with it? The same hold true for wifi NICs, only they have even more variables due to the added complexity of wireless networking.

# rc.inet1.conf (excert)
# ======================
## Example config information for wlan0.  Uncomment the lines you need and fill
## in your info.  (You may not need all of these for your wireless network)
IFNAME[4]="wlan0"
IPADDR[4]=""
NETMASK[4]=""
USE_DHCP[4]="yes"
#DHCP_HOSTNAME[4]="icculus-wireless"
#DHCP_KEEPRESOLV[4]="yes"
#DHCP_KEEPNTP[4]="yes"
#DHCP_KEEPGW[4]="yes"
#DHCP_IPADDR[4]=""
WLAN_ESSID[4]="nest"
#WLAN_MODE[4]=Managed
#WLAN_RATE[4]="54M auto"
#WLAN_CHANNEL[4]="auto"
#WLAN_KEY[4]="D5AD1F04ACF048EC2D0B1C80C7"
#WLAN_IWPRIV[4]="set AuthMode=WPAPSK | \
#   set EncrypType=TKIP | \
#   set WPAPSK=96389dc66eaf7e6efd5b5523ae43c7925ff4df2f8b7099495192d44a774fda16"
WLAN_WPA[4]="wpa_supplicant"
#WLAN_WPADRIVER[4]="ndiswrapper"

When we discussed wired ethernet, each n in the variable corresponded with the n in ethn. Here however, that no longer holds true. Notice that the variable IFNAME[4] has a value of wlan0. It is common for wireless cards to have an interface name other than ethn and that is reflected here. When rc.inet1.conf is read by the start-up scripts, Slackware knows to apply all these options to the wlan0 wifi NIC instead of the (probably non-existant) eth4 wired NIC. Many of the other options are the same. IP address information is added in exactly the same way we discussed for wired network cards in networking[4044]; however, we have a lot of new variables that need some explanation.

To begin, WLAN_ESSID[n] and WLAN_CHANNEL[n] should be self-explainatory by now; they refer the the essid and frequency to use. WLAN_MODE[n] is either managed or ad-hoc. Anyone connecting to an access point will want to use managed mode. WLAN_KEY[n] is the WEP key to use, if you're forced to use WEP. WLAN_IWPRIV[n] is a very complicated variable that sets other variables inside itself. WLAN_IWPRIV[n] is used for WPA2 networks. Here you tell Slackware what authentication mode, encryption type, and key to use for WPA2 connections. Please note that WLAN_KEY[n] and WLAN_IWPRIV[n] are mutually exclusive; you can't use both on the same interface. If you successfully configure all this, then Slackware will attempt to connect to your wireless network as soon as the system boots.

But wait, that's so much work! And what if I need to connect to multiple wireless networks? I take my laptop to work and school and need to seemlessly setup those wireless connections as soon as one is within range. Doing things this way is simply too much work. You're absolutely correct.

Wicd

Introducing wicd(8), the premier wired and wireless network connection manager for the laptop user on the go. Pronounced “wicked”, wicd is capable of storing information for any number of wireless networks you need and connecting to them with a simple command or the click of a mouse. wicd is not part of the default Slackware installation at this time, as it interferes somewhat with the normal way of configuring network adapters, but you can find it in the /extra directory of your Slackware install disks or at your favorite mirror. wicd is both a network connection daemon and a graphical application for configuring networks. The CLI isn't forgotten either, as wicd-curses(8) is every bit as powerful as the traditional GUI front-end. In order to use wicd, you will need to disable support for any interfaces you have in rc.inet1.conf first.

# rc.inet1.conf
# =============
# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="no"
DHCP_HOSTNAME[0]=""
# Default gateway IP address:
GATEWAY=""

Now we can install wicd, setup the daemon to run on system boot-up, and begin using a more friendly application.

darkstar:~# installpkg /path/to/extra/wicd/wicd-1.6.2.1-1.txz
darkstar:~# chmod +x /etc/rc.d/rc.wicd
darkstar:~# /etc/rc.d/rc.wicd start

If you're predominately using the console, simply run wicd-curses from your command line. If instead, you are using a graphical desktop provided by X, you can start the graphical front-end from either the KDE or XFCE menu.

Optionally, you could manually run wicd-client(1) from a terminal or run dialogue.

On the graphical front-end, options for different networks are available via the Preferences button adjacent to the ESSID listed. In the terminal client, the same options can be reached by highlighting the ESSID you wish to use and pressing the right arrow key, which opens a configuration page for that network.

Chapter Navigation

Previous Chapter: Networking[4045]

Next Chapter: Basic Networking Utilities[4046]

Sources

Original source: http://www.slackbook.org/beta[4047]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, wireless, iwconfig, wicd

User and Group Management

What Are Users and Groups?

Slackware Linux inherits a strong multi-user tradition from its UNIX inspiration. This means that multiple people may use the system at once, but it also means that each of these people may have different permissions. This allows users to prevent others from modifying their files, or lets system administrators explicitly define what users can and cannot do on the system. Moreover, users need not be actual people at all. In fact, Slackware includes several dozen pre-defined user and group accounts that are not typically used by regular users. Rather these accounts allow the system administrator to segment the system for security reasons. We'll see how that's done in the next chapter on filesystem permissions.

Managing Users and Groups

Adding users and groups

The easiest way to add new users in Slackware is through the use of our very fine adduser shell script. adduser will prompt you to enter the details of the new user you wish to create and step you through the process quickly and easily. It will even create a password for the new user.

darkstar:~# adduser
Login name for new user []: david
User ID ('UID') [ defaults to next available ]:
Initial group [ users ]:
Additional UNIX groups:
Users can belong to additional UNIX groups on the system.
For local users using graphical desktop login managers such
as XDM/KDM, users may need to be members of additional groups
to access the full functionality of removable media devices.
* Security implications *
Please be aware that by adding users to additional groups may
potentially give access to the removable media of other users.
If you are creating a new user for remote shell access only,
users do not need to belong to any additional groups as standard,
so you may press ENTER at the next prompt.
Press ENTER to continue without adding any additional groups
Or press the UP arrow to add/select/edit additional groups
:  audio cdrom floppy plugdev video
Home directory [ /home/david ]
Shell [ /bin/bash ]
Expiry date (YYYY-MM-DD) []:
New account will be created as follows:
---------------------------------------
Login name.......:  david
UID..............:  [ Next available ]
Initial group....:  users
Additional groups:  audio,cdrom,floppy,plugdev,video
Home directory...:  /home/david
Shell............:  /bin/bash
Expiry date......:  [ Never ]
This is it... if you want to bail out, hit Control-C.  Otherwise, press
ENTER to go ahead and make the account.
Creating new account...
Changing the user information for david
Enter the new value, or press ENTER for the default
Full Name []:
Room Number []:
Work Phone []:
Home Phone []:
Other []:
Changing password for david
Enter the new password (minimum of 5, maximum of 127 characters)
Please use a combination of upper and lower case letters and numbers.
New password:
Re-enter new password:
Password changed.
Account setup complete.

The addition of optional groups needs a little explaining. Every user in Slackware has a single group that it is always a member of. By default, this is the “users” group. However, users can belong to more than one group at a time and will inherit all the permissions of every group they belong to. Typical desktop users will need to add several group memberships in order to do things like play sound or access removeable media like cdroms or USB flash drives. You can simply press the up arrow key at this section and a list of default groups for desktop users will magically appear. You can of course, add to or remove groups from this listing.

Now that we've demonstrated how to use the interactive adduser program, lets look at some powerful non-interactive tools that you may wish to use. The first is useradd(8). useradd is a little less friendly, but much faster for creating users in batches. This makes it ideal for use in shell scripts. In fact, adduser is just such a shell script and uses useradd for most of the heavy lifting. useradd has many options and we can't explain them all here, so refer to its man page for the complete details. Now, let's make a new user.

darkstar:~# useradd -d /data/home/alan -s /bin/bash -g users -G audio,cdrom,floppy,plugdev,video alan

Here I have added the user “alan”. I specified the user's home directory as /data/home/alan and used bash as my shell. Also, I specified my default group as “users” and added myself to a number of useful groups for dekstop use. You'll note that useradd does not do any prompting like adduser. Unless you want to accept the defaults for everything, you'll need to tell useradd what to do.

Now that we know how to add users, we should learn how to add groups. As you might have guessed, the command for doing this is groupadd(8). groupadd works in the same way as useradd, but with far fewer options. The following command adds the group “slackers” to the system.

darkstar:~# groupadd slackers

Deleting users and groups is easy as well. Simply run the userdel(8) and groupdel(8) commands. By default, userdel will leave the user's home directory on the system. You can remove this with the -r argument.

Other User and Group Tools

Several other tools exist for managing users and groups. Perhaps the most important one is passwd(1). This command changes a user account's password. Normal users may change their own passwords only, but root can change anyone's password. Also, root can lock a user account with the -l argument. This doesn't actually shutout the account, but instead changes the user's encrypted password to a value that can't be matched.

The easiest way for modifying a user's information is the usermod(8) utility which is capable of modifying everything from group membership to home directories. A full listing of its features won't be given here, so check the man page. usermod is perhaps the best tool to use for modifying a user's group members. The -s and -G arguments accomplish this.

darkstar:~# usermod -a -G wheel alan
darkstar:~# usermod -G wheel alan

It important to note the differences in the two commands above. The first command adds the user “alan” to the “wheel” group without modifying any other groups “alan” belongs to. The second command also makes “alan” a member of the “wheel” group, but also removes the user's membership from any other groups, something you will very rarely want to do!

Another useful tool is chsh(1) which changes a user's default shell. Like passwd, normal users can only change their own shell, but the root user can change anyone's.

The last tool we're going to discuss is chfn(1). This is used to enter identifying information on the user such as his phone number and real name. This information is stored in the passwd(5) file and retrieved using finger(1).

Managing Users and Groups Manually

Like most things in Slackware Linux, users and groups are stored in plain-text files. This means that you can edit all the details of a user, or even create a new user or group simply by editing these files and doing a few other tasks like creating the user's home directory. Of course, after you see how this is done you'll appreciate just how simple the included tools make this task.

Our first stop is the /etc/passwd file. Here, all the information about a user is stored, except for (oddly enough) the user's password. The reason for this is rather simple. /etc/passwd must be readable by all users on the system, so you wouldn't want passwords stored there, even if they are encrypted. Let's take a quick look at my entry in this file.

alan:x:1000:100:,,,:/home/alan:/bin/bash

Each line in this file contains a number of fields seperated by a colon. They are, from left to right: username, password, UID, GUID, a comment field, home directory, and shell. You'll notice that the password field for every entry is an x. That is because Slackware uses shadow passwords, so the actual encrypted password is stored in /etc/shadow. Let's take a look there.

alan:$1$HlR?M3fkL@oeJmsdLfhsLFM*4dflPh8:14197:0:99999:7:::

The shadow file contains more than just the encrypted password as you'll notice. The fields here, again from left to right, are: username, encrypted password, last day the password was changed, days before the password may be changed again, how many days before the password expires, days that the account will be disabled after expiring, when the account was disabled, and a reserved field. You may notice on some accounts that the various “days” fields often include very large numbers. The reason for this is that Slackware counts time from the “Epoch” which is January 1, 1970 for historical reasons.

To create a new user account, you'll just need to open these files using vipw(8). This will open /etc/passwd in the editor defined by your VISUAL variable or your EDITOR variable if VISUAL isn't defined. If neither is present, it will fall back to vi by default. If you pass the -s argument, it will open /etc/shadow instead. It's important to use vipw instead of using any other editor, because vipw will lock the file and prevent other programs from editing it right underneath your feet.

That isn't all you'll need to do however; you must also create the user's home directory and change the user's password using passwd.

Chapter Navigation

Previous Chapter: Printing[4048]

Next Chapter: Filesystem Permissions[4049]

Sources

Original source: http://www.slackbook.org/beta[4050]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, users, groups, passwd

Booting

Ok, now that you've gotten Slackware installed on your system, you should learn exactly what controls the boot sequence of your machine, and how to fix it should you manage to break it somehow. If you use Linux long enough, sooner or later you will make a mistake that breaks your bootloader. Fortunately, this doesn't require a reinstall to fix. Unlike many other operating systems that hide the underlying details of how they work, Linux (and in particular, Slackware) gives you full control over the boot process. Simply by editing a configuration file or two and re-running the bootloader installer, you can quickly and easily change (or break) your system. Slackware even makes it easy to dual-boot multiple operating systems, such as other Linux distributions or Microsoft Windows.

mkinitrd

Before we go any further, a quick discussion on the Linux kernel is warranted. Slackware Linux includes at least two, but sometimes more, different kernels. While they are all compiled from the same source code, and hence are the “same”, they are not identical. Depending on your architecture and Slackware version, the installer may have loaded your system with several kernels. There are kernels for single-processor systems and kernels for multi-processor systems (on 32bit Slackware). In the old days, there were lots of kernels for installing on many different kinds of hard drive controllers. More importantly for our discussion, there are “huge” kernels and “generic” kernels.

If you look inside your /boot directory, you'll see the various kernels installed on your system.

darkstar:~# ls -1 /boot/vmlinuz*
/boot/vmlinuz-huge-2.6.29.4
/boot/vmlinuz-generic-2.6.29.4

Here you can see that I have two kernels installed, vmlinuz-huge-2.6.29.4 and vmlinuz-generic-2.6.29.4. Each Slackware release includes different kernel versions and sometimes even slightly different names, so don't be alarmed if what you see doesn't exactly match what I have listed here.

Huge kernels are exactly what you might think; they're huge. However, that does NOT mean that they have all of the possible drivers and such compiled into them. Instead, these kernels are made to boot (and run) on every conceivable computer on which Slackware is supported (there may very well be a few out there that won't boot/work with them though). They most certainly contain support for hardware your machine does not (and never will) have, but that shouldn't concern you. These kernels are included for several reasons, but probably the most important is their use by Slackware's installer - these are the kernels that the Slackware installation disks run. If you chose to let the installer configure your bootloader for you, it chooses to use these kernels due to the incredible variety of hardware they support. In contrast, the generic kernels support very little hardware without the use of external modules. If you want to use one of the generic kernels, you'll need to make use of something called an initrd, which is created using the mkinitrd(8) utility.

So why should you use a generic kernel? Currently the Slackware development team recommends use of a generic kernel for a variety of reasons. Perhaps the most obvious is size. The huge kernels are currently about twice the size of the generic kernels before they are uncompressed and loaded into memory. If you are running an older machine, or one with some small ammount of RAM, you will appreciate the savings the generic kernels offer you. Other reasons are somewhat more difficult to quantify. Conflicts between drivers included in the huge kernels do appear from time to time, and generally speaking, the huge kernels may not perform as well as the generic ones. Also, by using the generic kernels, special arguments can be passed to hardware drivers seperately, rather than requiring these options be passed on the kernel command line. Some of the tools included with Slackware work better if your kernel uses some drivers as modules rather than statically building them into the kernel. If you're having trouble understanding this, don't be alarmed: just think “huge kernel = good, generic kernel = better”.

Unfortunately, using the generic kernels isn't as straightforward as using the huge kernels. In order for the generic kernel to boot your system, you must also include a few basic modules in an initird. Modules are pieces of compiled kernel code that can be inserted or removed from a running kernel (ideally using modprobe(8). This makes the system somewhat more flexible at the cost of a tiny bit of added complexity. You might find it easier to think of modules as device drivers, at least for this section. Typically you will need to add the module for whatever filesystem you chose to use for your root partition during the installer, and if your root partition is located on a SCSI disk or RAID controller, you'll need to add those modules as well. Finally, if you're using software RAID, disk encryption, or LVM, you'll also need to create an initrd regardless of whether you're using the generic kernel or not.

An initrd is a compressed cpio(1) archive, so creating one isn't very straightforward. Fortunately for you, Slackware includes a tool that makes this very easy: mkinitrd. A full discussion of mkinitrd is a bit beyond the scope of this book, but we'll show you all the highlights. For a more complete explanation, check the manpage or run mkinitrd with the –help argument.

darkstar:~# mkinitrd --help
mkinitrd creates an initial ramdisk (actually an initramfs cpio+gzip
archive) used to load kernel modules that are needed to mount the
root filesystem, or other modules that might be needed before the
root filesystem is available.  Other binaries may be added to the
initrd, and the script is easy to modify.  Be creative.  :-)
.... many more lines deleted ....

When using mkinitrd, you'll need to know a few items of information: your root partition, your root filesystem, any hard disk controllers you're using, and whether or not you're using LVM, software RAID, or disk encryption. Unless you're using some kind of SCSI controller (and have your root partition located on the SCSI controller), you should only need to know your root filesystem and partition type. Assuming you've booted into your Slackware installation using the huge kernel, you can easily find this information with the mount command or by viewing the contents of /proc/mounts.

darkstar:~# mount
/dev/sda1 on / type ext4 (rw,barrier=1,data=ordered)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/sda2 on /home type jfs (rw)
tmpfs on /dev/shm type tmpfs (rw)

In the example provided, you can see that the root partition is located on /dev/sda1 and is an ext4 type partition. If we want to create an initrd for this system, we simply need to tell this information to mkinitrd.

darkstar:~# mkinitrd -f ext4 -r /dev/sda1

Note that in most cases, mkinitrd is smart enough to determine this information on its own, but it never hurts to specify it manually. Now that we've created our initrd, we simply need to tell LILO where to find it. We'll focus on that in the next section.

Looking up all those different options for mkinitrd or worse, memorizing them, can be a real pain though, especially if you try out different kernels consistently. This became tedious for the Slackware development team, so they came up with a simple configuration file, mkinitrd.conf(5). You can find a sample file that can be easily customized for your system at /etc/mkinitrd.conf.sample directory. Here's mine.

darkstar:~# >/prompt>cat /etc/mkinitrd.conf.sample
# See "man mkinitrd.conf" for details on the syntax of this file
#
SOURCE_TREE="/boot/initrd-tree"
CLEAR_TREE="0"
OUTPUT_IMAGE="/boot/initrd.gz"
KERNEL_VERSION="$(uname -r)"
#KEYMAP="us"
MODULE_LIST="ext3:ext4:jfs"
#LUKSDEV="/dev/hda1"
ROOTDEV="/dev/sda1
ROOTFS="ext4"
#RESUMEDEV="/dev/hda2"
#RAID="0"
LVM="1"
#WAIT="1"

For a complete description of each of these lines and what they do, you'll need to consult the man page for mkinitrd.conf. Copy the sample file to to /etc/mkinitrd.conf and edit it as desired. Once it is setup properly, you need only run mkinitrd with the -F argument. A proper initrd file will be constructed and installed for you without you having to remember all those obscure arguments.

If you're unsure what options to specify in the configuration file or on the command-line, there is one final option. Slackware includes a nifty little utility that can tell what options are required for your currently running kernel /usr/share/mkinitrd/mkinitrd_command_generator.sh. When you run this script, it will generate a command line for mkinitrd that should work for your computer, but you may wish to check everything anyway.

darkstar:~# /usr/share/mkinitrd/mkinitrd_command_generator.sh
mkinitrd -c -k 2.6.33.4 -f ext3 -r /dev/sda3 -m \
usbhid:ehci-hcd:uhci-hcd:ext3 -o /boot/initrd.gz

LILO

LILO is the Linux Loader and is currently the default boot loader installed with Slackware Linux. If you've used other Linux distributions before, you may be more familiar with GRUB. If you prefer to use GRUB instead, you can easily find it in the extra/ directory on one of your Slackware CDs. However, since LILO is the default Slackware bootloader, we'll focus exclusively on it.

Configuring LILO can be a little daunting for new users, so Slackware comes with a special setup tool called liloconfig. Normally, liloconfig is first run by the installer, but you can run it at any time from a terminal.

liloconfig has two modes of operation: simple and expert. The “simple” mode tries to automatically configure lilo for you. If Slackware is the only operating system installed on your computer, the “simple” mode will almost always do the right thing quickly and easily. It is also very good at detecting Windows installations and adding them to /etc/lilo.conf so that you can choose which operating system to boot when you turn your computer on.

In order to use “expert” mode, you'll need to know Slackware's root partition. You can also setup other linux operating systems if you know their root partitions, but this may not work as well as you expect. liloconfig will try to boot each linux operating system with Slackware's kernel, and this is probably not what you want. Fortunately, setting up Windows partitions in expert mode is trivial. One hint when using expert mode: you should almost always install LILO to the Master Boot Record (MBR). Once upon a time, it was recommended to install the boot loader onto the root partition and set that partition as bootable. Today, LILO has matured greatly and is safe to install on the MBR. In fact, you will encounter fewer problems if you do so.

liloconfig is a great way to quickly setup your boot loader, but if you really need to know what's going on, you'll need to look at LILO's configuration file: lilo.conf(5) under the /etc directory. /etc/lilo.conf is separated into several sections. At the top, you'll find a “global” section where you specify things like where to install LILO (generally the MBR), any special images or screens to show on boot, and the timeout after which LILO will boot the default operating system. Here's what the global section of my lilo.conf file looks like in part.

# LILO configuration file
boot = /dev/sda
bitmap = /boot/slack.bmp
bmp-colors = 255,0,255,0,255,0
bmp-table = 60,6,1,16
bmp-timer = 65,27,0,255
append=" vt.default_utf8=0"
prompt
timeout = 50
# VESA framebuffer console @ 1024x768x256
vga = 773
.... many more lines ommitted ....

For a complete listing of all the possible LILO options, you should consult the man page for lilo.conf. We'll briefly discuss the most common options in this document.

The first thing that should draw your attention is the “boot” line. This determines where the bootloader is installed. In order to install to the Master Boot Record (MBR) of your hard drive, you simply list the hard drive's device entry on this line. In my case, I'm using a SATA hard drive that shows up as a SCSI device /dev/sda. In order to install to the boot block of a partition, you'll have to list the partition's device entry. For example, if you are installing to the first partition on the only SATA hard drive in your computer, you would probably use /dev/sda1.

The “prompt” option simply tells LILO to ask (prompt) you for which operating system to boot. Operating systems are each listed in their own section deeper in the file. We'll get to them in a minute. The timeout option tells LILO how long to wait (in tenths of seconds) before booting the default OS. In my case, this is 5 seconds. Some systems seem to take a very long time to display the boot screen, so you may need to use a larger timeout value than I have set. This is in part why the simple LILO installation method utilizes a very long timeout (somewhere around 2 whole minutes). The append line in my case was set up by liloconfig. You may (and probably should) see something similar when looking at your own /etc/lilo.conf. I won't go into the details of why this line is needed, so you're just going to have to trust me that things work better if it is present. :^)

Now that we've looked into the global section, let's take a look at the operating systems section. Each linux operating system section begins with an “image” line. Microsoft Windows operating systems are specified with an “other” line. Let's take a look at a sample /etc/lilo.conf that boots both Slackware and Microsoft Windows.

# LILO configuration file
... global section ommitted ....
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-2.6.29.4
root = /dev/sda1
initrd = /boot/initrd.gz
label = Slackware64
read-only
# Linux bootable partition config ends
# Windows bootable partition config begins
other = /dev/sda3
label = Windows
table = /dev/sda
# Windows bootable partition config ends

For Linux operating systems like Slackware, the image line specifies which kernel to boot. In this case, we're booting /boot/vmlinuz-generic-2.6.29.4. The remaining sections are pretty self-explanatory. They tell LILO where to find the root filesystem, what initrd (if any) to use, and to initially mount the root filesystem read-only. That initrd line is very important for anyone running a generic kernel or using LVM or software RAID. It tells LILO (and the kernel) where to find the initrd you created using mkinitrd.

Once you've gotten /etc/lilo.conf set up for your machine, simply run lilo(8) to install it. Unlike GRUB and other bootloaders, LILO requires you re-run lilo anytime you make changes to its configuration file, or else the new (changed) bootloader image will not be installed, and those changes will not be reflected.

darkstar:~# lilo
Warning: LBA32 addressing assumed
Added Slackware *
Added Backup
6 warnings were issued.

Don't be too scared by many of the warnings you may see when running lilo. Unless you see a fatal error, things should be just fine. In particular, the LBA32 addressing warning is commonplace.

Dual Booting

A bootloader (like LILO) is a very flexible thing, since it exists only to determine which hard drive, partition, or even a specific kernel on a partition to boot. This inherently suggests a choice when booting, so the idea of having more than one operating system on a computer comes very naturally to a LILO or GRUB user.

People “dual boot” for a number of reasons; some people want to have a stable Slackware install on one partition or drive and a development sandbox on another, other people might want to have Slackware on one and another Linux or BSD distribution on another, and still other people may have Slackware on one partition and a proprietary operating system (for work or for that one application that Linux simply cannot offer) on the other.

Dual booting should not be taken lightly, however, since it usually means that you'll now have two different operating systems attempting to manage the bootloader. If you dual boot, the likelihood of one OS over-writing or updating the bootloader entries without your direct intervention is great; if this happens, you'll have to modify GRUB or LILO manually so you can get into each OS.

There are two ways to dual (or multi) boot; you can put each operating system on its own hard drive (common on a desktop, with their luxury of having more than one drive bay) or each operating system on its own partition (common on a laptop where only one physical drive is present).

Dual Booting with Partitions

In order to set up a dual-boot system with each operating system on its own partition, you must first create partitions. This is easiest if done prior to installing the first operating system, in which case it's a simple case of pre-planning and carving up your hard drive as you feel necessary. See the section called “Partitioning”[4051] for information on using the fdisk or cfdisk partitioning applications.

If you're dual booting two Linux distributions, it is inadvisable to attempt to share a /home directory between the systems. While it is technically possible, doing so will increase the chance of your personal configurations from becoming mauled by competing desktop environments or versions.

It is, however, safe to use a common swap partition.

You should partition your drive into at least three parts:

One partition for Slackware

One partition for the secondary OS

One partition for swap

First, install Slackware Linux onto the first partition of the hard drive as described in Chapter 2, Installation[4052].

After Slackware has been installed, booted, and you've confirmed that everything works as expected, then reboot to the installer for the second OS. This OS will invariably offer to utilize the entire drive; you obviously do not want to do that, so constrain it to only the second partition. Furthermore, the OS will attempt to install a boot loader to the beginning of the hard drive, overwriting LILO.

You have a few possible courses of action with regards to the boot loader:

Possible Boot Loader Scenarios

If the secondary OS is Linux, disallow it from installing a boot manager.
If you're dual booting to another Linux distribution, the installer of that distribution usually asks if you want a boot loader installed. You're certainly free to not install a boot manager for it at all, and manually manage both Slackware and the other distribution with LILO.

Depending on the distribution, you might be editing LILO more frequently than you would if you were only running Slackware; some distributions are notorious for frequent kernel updates, meaning that you'll need to edit LILO to reflect the new configuration after such an update. But if you didn't want to edit configuration files every now and again, you probably wouldn't have chosen Slackware.

If the secondary OS is Linux, let it overwrite LILO with GRUB.

If you're dual booting to another Linux distribution, you are perfectly capable of just using GRUB rather than LILO, or install Slackware last and use LILO for both. Both LILO and GRUB have very good auto-detection features, so whichever one gets installed last should pick up the other distribution's presence and make an entry for it.

Since other distributions often attempt to auto-update their GRUB menus, there is always the chance that during an update something will become maligned and you suddenly find you can't boot into Slackware. If this happens, don't panic; just boot into the other Linux partition and manually edit GRUB so that it points to the correct partition, kernel, and initrd (if applicable) for Slackware in its menu.

Allow the secondary OS to overwrite LILO and go back later to manually re-install and re-configure LILO.

This is not a bad choice, especially when Windows is the secondary OS, but potential pitfalls are that when Windows updates itself, it may attempt to overwrite the MBR (master boot record) again, and you'll have to re-install LILO manually again.

To re-establish LILO after another OS has erased it, you can boot from your Slackware install media and enter the setup stage. Do <emphasis>not</emphasis> re-partition your drive or re-install Slackware; skip immediately to Configure[4053].

Even when using the “simple” option to install, LILO should detect both operating systems and automatically configure a sensible menu for you. If it fails, then add the entries yourself.

Dual Booting from Hard Drives

Dual booting between different physical hard drives is often easier than with partitions since the computer's BIOS or EFI almost invariably has a boot device chooser that allows you to interrupt the boot process immediately after POST and choose what drive should get priority.

The snag key to enter the boot picker is different for each brand of motherboard; consult the motherboard's manual or read the splash screen to find out what your computer requires. Typical keys are F1, F12, DEL. For Apple computers, it is always the Option (Alt) key.

If you manage the boot priority via BIOS or EFI, then each boot loader on each hard drive is only aware of its own drive and will never interfere with one another. This is rather contrary to what a boot loader is designed to do but can be a useful workaround when dealing with proprietary operating systems which insist upon being the only OS on the system, to the detriment of the user's preference.

If you don't have the luxury of having multiple internal hard drives and don't feel comfortable juggling another partition and OS on your computer, you might also consider using a bootable USB thumbdrive or even a virtual machine to give you access to another OS. Both of these options is outside the scope of this book, but they've commonplace and might be the right choice for you, depending on your needs.

Chapter Navigation

Previous Chapter: Installation[4054]

Next Chapter: Basic Shell Commands[4055]

Sources

Original source: http://www.slackbook.org/beta[4056]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackware, booting, mkinitrd, lilo, dual-boot

The Linux Kernel

What Does the Kernel Do?

You've probably heard people talking about compiling the kernel or building a kernel, but what exactly is the kernel and what does it do? The kernel is the center of your computer. It is the foundation for the entire operating system. The kernel acts as a bridge between the hardware and the applications. This means that the kernel is (usually) the sole piece of software responsible for ordering around the hardware components of your computer. It is the kernel that instructs the hard drive to search for a certain data stream. It is the kernel that instructs your network card to transmit rapid changes in voltage. The kernel also listens to hardware as well. When the network card detects a remote computer sending information, it forwards that information to the kernel. This makes the kernel both the single most important piece of software on your computer and the most complex.

Working with Modules

The complexity of a modern linux kernel is staggering. The source code for the kernel weighs in at nearly 400MB uncompressed. There are thousands of developers, hundreds of options, and if everything were built together, the kernel would soon pass 100MB in size itself. In order to keep the size of the kernel down (as well as the amount of RAM needed for the kernel), most of the kernel options are built as modules. You can think of these modules as device drivers which can be inserted or removed from a running kernel at will. In truth, many of them aren't device drivers at all, but contain support for things such as network protocols, security measures, and even filesystems. In short, nearly any piece of the linux kernel can be built as a loadable module.

It's important to realize that Slackware will automatically handle loading most modules for you. When your system boots, udevd(8) is started and begins to probe your system's hardware. For each device it finds, it loads the proper module and created a device node in /dev. This usually means that you will not need to load any modules in order to use your computer, but occasionally this is necessary.

So what modules are currently loaded on your computer and how do we load and unload them? Fortunately we have a full suite of tools for handling this. As you might have guessed, the tool for listing modules is lsmod(8).

darkstar:~# lsmod
Module                  Size  Used by
nls_utf8                1952  1
cifs                  240600  2
i915                  168584  2
drm                   168128  3 i915
i2c_algo_bit            6468  1 i915
tun                    12740  1
... many more lines ommitted ...

In addition to showing you what modules are loaded, it displays the size of each module and tells you what other modules are using it.

There are two applications for loading modules: insmod(8) and modprobe(8). Both will load modules and report any errors (such as loading a module for a device that isn't present in your system), but modprobe is preferred because it can load any module dependencies. Using either is straight-forward.

darkstar:~# insmod ext3
darkstar:~# modprobe ext4
darkstar:~# lsmod | grep ext
ext4                  239928  1
jbd2                   59088  1 ext4
crc16                   1984  1 ext4
ext3                  139408  0
jbd                    48520  1 ext3
mbcache                 8068  2 ext4,ext3

Removing modules can be a tricky process, and once again we have two programs for removing them: rmmod(8) and modprobe. In order to remove a module with modprobe, you'll need to use the -r argument.

darkstar:~# rmmod ext3
darkstar:~# modprobe -r ext4
darkstar:~# lsmod | grep ext

Compiling A Kernel and Why to do So

Most Slackware users will never need to compile a kernel. The huge and generic kernels contain virtually all the support you will need.

However, some users may need to compile a kernel. If your computer contains bleeding edge hardware, a newer kernel may offer improved support. Sometimes a kernel patch may be available that corrects a problem you are experiencing. In these cases a kernel compile is probably warranted. Users who simply want the latest and greatest version or who believe using a custom compiled kernel will give them greater performance can certainly upgrade, but are unlikely to actually notice any major changes.

If you still think compiling your own kernel is something you want or need to do, this section should walk you through the many steps. Compiling and installing a kernel is not that difficult, but there are a number of mistakes that can be made along the way, many of which can prevent your computer from booting and cause major frustration.

The first step is ensuring you have the kernel source code installed on your system. The kernel source package is included in the “k” disk set in the Slackware installer, or you can download another version from http://www.kernel.org/[4057]. Traditionally, the kernel source is located in /usr/src/linux, a symbolic link that points to the specific kernel release used, but this is by no means set in stone. You can place the kernel source code virtually anywhere without encountering any problems.

darkstar:~# ls -l /usr/src
lrwxrwxrwx  1 root root   14 2009-07-22 19:59 linux -> linux-2.6.29.6/
drwxr-xr-x 23 root root 4096 2010-03-17 19:00 linux-2.6.29.6/

The most difficult part of any kernel compile is the kernel configuration. There are hundreds of options, many of which can optionally be compiled into modules. This means there are thousands of ways to configure a kernel. Fortunately, there are a few handy tricks that can keep you from running into too much trouble. The kernel configuration file is .config. If you are very brave, you can manually edit this file with a text editor, but I highly recommend you use the kernel's built-in tools for manipulating .config.

Unless you are very familiar with configuring kernels, you should always start with a solid base configuration and modify it. This prevents you from skipping an important option that might force you to compile the kernel again and again until you get it right. The best kernel .config files to start with are those used by Slackware's default kernels. You can find them on your Slackware install disks or at your favorite mirror in the kernels/ directory.

darkstar:~# mount /mnt/cdrom
darkstar:~# cd /mnt/cdrom/kernels
darkstar:/mnt/cdrom/kernels# ls
VERSIONS.TXT  huge.s/  generic.s/  speakup.s/
darkstar:/mnt/cdrom/kernels# ls genric.s
System.map.gz  bzImage  config

You can replace the default .config file easily by copying or downloading the config file for the kernel you wish to use as a base. Here I am using Slackware's recommended generic.s kernel for a base, but you may wish to use the huge.s config file. The generic kernel builds more things as modules and thus creates a smaller kernel image, but it usually requires the use of an initrd.

darkstar:/mnt/cdrom/kernels# cp generic.s/config /usr/src/linux/.config

The Slackware kernel file lacks the “dot” while the kernel file includes it. If you forget, or simply copy the config to /usr/src whatever .config file was already present will be used instead.

If you want to use the configuration for the currently running kernel as your base, you may be able to locate it at /proc/config.gz. This is a special kernel-related file that includes the entire kernel configuration in a compressed format and requires that your kernel was built to support it.

darkstar:~# zcat /proc/config.gz > /usr/src/linux/.config

Now that we've created a solid base configuration, it's time to make any configuration changes we want. The entire kernel build process from configuration to compilation is performed with the make(1) command and special arguments to it. Each argument performs a different function.

If you are upgrading to a newer kernel release, you will definitely want to use the oldconfig argument. This will step through your base .config and look for missing elements that usually indicates that the new kernel release contains additional options. Since options are added at virtually every kernel release, this is generally a good thing to do.

darkstar:/usr/src/linux# make oldconfig
scripts/kconfig/conf -o arch/x86/Kconfig
*
* Restart config...
*
*
* File systems
*
Second extended fs support (EXT2_FS) [M/n/y/?] m
Ext2 extended attributes (EXT2_FS_XATTR) [N/y/?] n
Ext2 execute in place support (EXT2_FS_XIP) [N/y/?] n
Ext3 journalling file system support (EXT3_FS) [M/n/y/?] m
Ext3 extended attributes (EXT3_FS_XATTR) [Y/n/?] y
Ext3 POSIX Access Control Lists (EXT3_FS_POSIX_ACL) [Y/n/?] y
Ext3 Security Labels (EXT3_FS_SECURITY) [Y/n/?] y
The Extended 4 (ext4) filesystem (EXT4_FS) [N/m/y/?] (NEW) m

Here you can see that the new kernel I am compiling has added support for a new filesystem: ext4. oldconfig has gone through my original configuration, kept all the old options exactly as they were set, and prompted me on what to do with new options. Typically it is safe to choose the default option, but you may wish change this. oldconfig is a very handy tool for presenting you with only new configuration options, making it ideal for users who simply have to try out the latest kernel release.

For more serious configuration tasks, there are a multitude of options. The linux kernel can be configured in three primary ways. The first is config, which will step through each and every option one by one and ask what you would like to do. This is so tedious that hardly anyone ever uses it anymore.

darkstar:/usr/src/linux# make config
scripts/kconfig/conf arch/x86/Kconfig
*
* Linux Kernel Configuration
*
*
* General setup
*
Prompt for development and/or incomplete code/drivers (EXPERIMENTAL) [Y/n/?] Y
Local version - append to kernel release (LOCALVERSION) [] -test
Automatically append version information to the version string (LOCALVERSION_AUTO) [N/y/?] n
Support for paging of anonymous memory (swap) (SWAP) [Y/n/?]

Fortunately, there are two much easier ways to configure your kernel, menuconfig and xconfig. Both of these create a menu-driven program that lets you select and de-select options without having to step through each one. menuconfig is the most commonly used method, and the one I recommend. xconfig is only useful if you are attempting to compile the kernel from a graphical user interface within X. Both are so similar however, that we are only going to document menuconfig.

Running make menuconfig from a terminal will present you with the friendly curses-driven interface you see below. Each kernel section is given its own submenu, and you can navigate with the arrow keys.

If you are compiling a kernel that is the same release as the stock Slackware kernel, you must set the “Local version” option. This is found on the “General setup” submenu. Failure to set this will result in your kernel compile over-writing all the modules used by the stock kernels. This can quickly render your system unbootable.

Once you've finished configuring the kernel, it's time to begin compiling it. There are many different methods for this, but the most reliable is to use bzImage. When you pass this argument to make, the kernel compilation will begin and you will see lots of data scroll through the terminal until either the compile process is complete or a fatal error is encountered.

darkstar:/usr/src/linux# make bzImage
scripts/kconfig/conf -s arch/x86/Kconfig
CHK     include/linux/version.h
CHK     include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL    scripts/checksyscalls.sh
CC      scripts/mod/empty.o
HOSTCC  scripts/mod/mk_elfconfig
MKELF   scripts/mod/elfconfig.h
HOSTCC  scripts/mod/file2alias.o
... many hundreds of lines ommitted ...

If the process ends in an error, you should check your kernel configuration first. Compile errors are usually caused by a fault .config file. Assuming everything went alright, we're still not entirely finished, as we need to build the modules.

darkstar:/usr/src/linux# make modules
CHK     include/linux/version.h
CHK     include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-x86
CALL    scripts/checksyscalls.sh
HOSTCC  scripts/mod/file2alias.o
... many thousands of lines omitted ...

If both the kernel and the modules compiles finished sucessfully, we're ready to install them. The kernel image needs to be copied into a safe location, typically the /boot directory, and you should give it a unique name to avoid overwriting any other kernel images located there. Traditionaly kernel images are named vmlinuz with the kernel release and local version appended.

darkstar:/usr/src/linux# cat arch/x86/boot/bzImage > /boot/vmlinuz-release_number-local_version
darkstar:/usr/src/linux# make modules_install

Once these steps have been completed, you will have a new kernel image located under /boot and a new kernel modules directory under /lib/modules. In order to use this new kernel, you will need to edit lilo.conf, create an initrd for it (only if you need to load one or more of this kernel's modules to boot), and run lilo to update the boot loader. When you reboot, if all went according to plan, you should have an option to boot with your newly compiled kernel. If something went wrong, you may be spending some time fixing the problem.

Chapter Navigation

Previous Chapter: Keeping Track of Updates[4058]

Sources

Original source: http://www.slackbook.org/beta[4059]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, kernel

Process Control

Slackware systems often run hundreds or thousands of programs, each of which is referred to as a process. Managing these processes is an important part of system administration. So how exactly do we handle all of these seperate processes?

ps

The first step in managing processes is figuring out what processes are currently running. The most popular and powerful tool for this is ps(1). Without any arguments, ps won't tell you much information. By default, it only tells you what processes are running in your currently active shell. If we want more information, we'll need to look deeper.

darkstar:~$ ps
PID TTY          TIME CMD
12220 pts/4    00:00:00 bash
12236 pts/4    00:00:00 ps

Here you can see what processes you are running in your currently active shell or terminal and only some information is included. The PID is the “Process ID”; every process is assigned a unique number. The TTY tells you what terminal device the process is attached to. Naturally, CMD is the command that was run. You might be a little confused by TIME though, since it seems to move so slowly. This isn't the amount of real time the process has been running, but rather the amount of CPU time the process has consumed. An idle process uses virtually no CPU time, so this value may not increase quickly.

Viewing only our own processes isn't very much fun, so let's take a look at all the processes on the system with the -e argument.

darkstar:~$ ps -e
PID TTY          TIME CMD
1 ?        00:00:00 init
2 ?        00:00:00 kthreadd
3 ?        00:00:00 migration/0
4 ?        00:00:00 ksoftirqd/0
7 ?        00:00:11 events/0
9 ?        00:00:01 work_on_cpu/0
11 ?        00:00:00 khelper
102 ?        00:00:02 kblockd/0
105 ?        00:01:19 kacpid
106 ?        00:00:01 kacpi_notify
... many more lines omitted ...

The above example uses the standard ps syntax, but much more information can be discovered if we use BSD syntax. In order to do so, we must use the aux argument.

This is distinct from the -aux argument, but in most cases the two arguments are equivalent. This is a decades-old relic. For more information, see the man page for ps.

darkstar:~$ ps aux
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   3928   632 ?        Ss   Apr05   0:00 init [3]
root         2  0.0  0.0      0     0 ?        S    Apr05   0:00 [kthreadd]
root         3  0.0  0.0      0     0 ?        S    Apr05   0:00 [migration/0]
root         4  0.0  0.0      0     0 ?        S    Apr05   0:00 [ksoftirqd/0]
root         7  0.0  0.0      0     0 ?        S    Apr05   0:11 [events/0]
root         9  0.0  0.0      0     0 ?        S    Apr05   0:01 [work_on_cpu/0]
root        11  0.0  0.0      0     0 ?        S    Apr05   0:00 [khelper]
... many more lines omitted ....

As you can see, BSD syntax offers much more information, including what user controls the process and what percentage of RAM and CPU the process is consuming when ps is run.

To accomplish bits of this, on a per process basis, ps allows one or more process IDs (PIDs) to be provided in the command line, and has the '-o' flag to show a particular attribute of the PID.

darkstar:~$ ps -o cmd -o etime $$
CMD                             ELAPSED
/bin/bash                         12:22

What this is displaying, is the PID's command name (cmd), and its elapsed time (etime). The PID in this example, is a shell variable for the PID of the current shell. So you can see, in this example, the shell process has existed for 12 minutes, 22 seconds.

Using the pgrep(1) command, this can get more automatable.

darkstar:~$ ps -o cmd -o rss -o vsz $(pgrep httpd)
CMD                           RSS    VSZ
/usr/sbin/httpd -k restart  33456  84816
/usr/sbin/httpd -k restart  33460  84716
/usr/sbin/httpd -k restart  33588  84472
/usr/sbin/httpd -k restart  30424  81608
/usr/sbin/httpd -k restart  33104  84900
/usr/sbin/httpd -k restart  33268  85112
/usr/sbin/httpd -k restart  30640  82724
/usr/sbin/httpd -k restart  15168  67396
/usr/sbin/httpd -k restart  33180  84416
/usr/sbin/httpd -k restart  33396  84592
/usr/sbin/httpd -k restart  32804  84232

In this example, a subshell execution, using pgrep, is returning the PIDs of any process, whose command name includes 'httpd'. Then ps displaying the command name, resident memory size, and virtual memory size.

Finally, ps can also create a process tree. This shows you which processes have children processes. Ending the parent of a child process also ends the child. We do this with the -ejH argument.

darkstar:~$ ps -ejH
... many lines omitted ...
3660  3660  3660 tty1     00:00:00   bash
29947 29947  3660 tty1     00:00:00     startx
29963 29947  3660 tty1     00:00:00       xinit
29964 29964 29964 tty7     00:27:11         X
29972 29972  3660 tty1     00:00:00         sh
29977 29972  3660 tty1     00:00:05           xscreensaver
29988 29972  3660 tty1     00:00:04           xfce4-session
29997 29972  3660 tty1     00:00:16             xfwm4
29999 29972  3660 tty1     00:00:02             Thunar
... many more lines omitted ...

As you can see, ps(1) is an incredibly powerful tool for determining not only what processes are currently active on your system, but also for learning lots of important information about them.

As is the case with many of the applications, there is often several tools for the job. Similar to the ps -ejH output, but more terse, is pstree(1). It displays the process tree, a bit more visually.

darkstar:~$ pstree
init-+-atd
|-crond
|-dbus-daemon
|-httpd---10*[httpd]
|-inetd
|-klogd
|-mysqld_safe---mysqld---8*[{mysqld}]
|-screen-+-4*[bash]
|        |-bash---pstree
|        |-2*[bash---ssh]
|        `-bash---irssi
|-2*[sendmail]
|-ssh-agent
|-sshd---sshd---sshd---bash---screen
`-syslogd

kill and killall

Managing processes isn't only about knowing which ones are running, but also about communicating with them to change their behavior. The most common way of managing a program is to terminate it. Thus, the tool for the job is named kill(1). Despite the name, kill doesn't actually terminate processes, but sends signals to them. The most common signal is a SIGTERM, which tells the process to finish up what it is doing and terminate. There are a variety of other signals that can be sent, but the three most common are SIGTERM, SIGHUP, and SIGKILL.

What a process does when it receives a signal varies. Most programs will terminate (or attempt to terminate) whenever they receive any signal, but there are a few important differences. For starters, the SIGTERM signal informs the process that it should terminate itself at its earliest convenience. This gives the process time to finish up any important activities, such as writing information to the disk, before it closes. In contrast, the SIGKILL signal tells the process to terminate itself immediately, no questions asked. This is most useful for killing processes that are not responding and is sometimes called the “silver bullet”. Some processes (particularly daemons) capture the SIGHUP signal and reload their configuration files whenever they receive it.

In order to signal a process, we first need to know it's PID. You can get this easily with ps as we discused. In order to send different signals to a running process, you simply pass the signal number and -s as an argument. The -l argument lists all the signals you can choose and their number. You can also send signals by their name with -s.

darkstar:~$ kill -l
1) SIGHUP	 2) SIGINT	 3) SIGQUIT	 4) SIGILL
5) SIGTRAP	 6) SIGABRT	 7) SIGBUS	 8) SIGFPE
9) SIGKILL	10) SIGUSR1	11) SIGSEGV	12) SIGUSR2
13) SIGPIPE	14) SIGALRM	15) SIGTERM	16) SIGSTKFLT
... many more lines omitted ...
darkstar:~$ kill 1234 # SIGTERM
darkstar:~$ kill -s 9 1234 # SIGKILL
darkstar:~$ kill -s 1 1234 # SIGHUP
darkstar:~$ kill -s HUP 1234 # SIGHUP

Sometimes you may wish to terminate all running processes with a certain name. You can kill processes by name with killall(1). Just pass the same arguments to killall that you would pass to kill.

darkstar:~$ killall bash # SIGTERM
darkstar:~$ killall -s 9 bash # SIGKILL
darkstar:~$ killall -s 1 bash # SIGHUP
darkstar:~$ killall -s HUP bash # SIGHUP

top

So far we've learned how to look at the active processes for a moment in time, but what if we want to monitor them for an extended period? top(1) allows us to do just that. It displays an ordered list of the processes on your system, along with vital information about them, and updates periodically. By default, processes are ordered by their CPU percentage and updates occur every three seconds.

darkstar:~$ top
top - 16:44:15 up 26 days,  5:53,  5 users,  load average: 0.08, 0.03, 0.03
Tasks: 122 total,   1 running, 119 sleeping,   0 stopped,   2 zombie
Cpu(s):  3.4%us,  0.7%sy,  0.0%ni, 95.5%id,  0.1%wa,  0.0%hi,  0.2%si, 0.0%st
Mem:   3058360k total,  2853780k used,   204580k free,   154956k buffers
Swap:        0k total,        0k used,        0k free,  2082652k cached
PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
1 root      20   0  3928  632  544 S    0  0.0   0:00.99 init
2 root      15  -5     0    0    0 S    0  0.0   0:00.00 kthreadd
3 root      RT  -5     0    0    0 S    0  0.0   0:00.82 migration/0
4 root      15  -5     0    0    0 S    0  0.0   0:00.01 ksoftirqd/0
7 root      15  -5     0    0    0 S    0  0.0   0:11.22 events/0
9 root      15  -5     0    0    0 S    0  0.0   0:01.19 work_on_cpu/0
11 root      15  -5     0    0    0 S    0  0.0   0:00.01 khelper
102 root      15  -5     0    0    0 S    0  0.0   0:02.04 kblockd/0
105 root      15  -5     0    0    0 S    0  0.0   1:20.08 kacpid
106 root      15  -5     0    0    0 S    0  0.0   0:01.92 kacpi_notify
175 root      15  -5     0    0    0 S    0  0.0   0:00.00 ata/0
177 root      15  -5     0    0    0 S    0  0.0   0:00.00 ata_aux
178 root      15  -5     0    0    0 S    0  0.0   0:00.00 ksuspend_usbd
184 root      15  -5     0    0    0 S    0  0.0   0:00.02 khubd
187 root      15  -5     0    0    0 S    0  0.0   0:00.00 kseriod
242 root      20   0     0    0    0 S    0  0.0   0:03.37 pdflush
243 root      15  -5     0    0    0 S    0  0.0   0:02.65 kswapd0

The man page has helpful details on how to interact with top such as changing its delay interval, the order processes are displayed, and even how to terminate processes right from within top itself.

cron

Ok, so we've learned many different ways of viewing the active processes on our system and means of signalling them, but what if we want to run a process periodically? Fortunately, Slackware includes just the thing, crond(8). cron runs processes for every user on the schedule that user demands. This makes it very useful for processes that need to be run periodically, but don't require full daemonization, such as backup scripts. Every user gets their own entry in the cron database, so non-root users can periodically run processes too.

In order to run programs from cron, you'll need to use the crontab(1). The man page lists a variety of ways to do this, but the most common method is to pass the -e argument. This will lock the user's entry in the cron database (to prevent it from being overwritten by another program), then open that entry with whatever text editor is specified by the VISUAL environment variable. On Slackware systems, this is typically the vi editor. You may need to refer to the chapter on vi before continuing.

The cron database entries may seem a little archaic at first, but they are highly flexible. Each uncommented line is processed by crond and the command specified is run if all the time conditions match.

darkstar:~$ crontab -e
# Keep current with slackware
30 02 * * * /usr/local/bin/rsync-slackware64.sh 1>/dev/null 2>&1

As mentioned before, the syntax for cron entries is a little difficult to understand at first, so let's look at each part individually. From left to right, the different sections are: Minute, Hour, Day, Month, Week Day, and Command. Any asterisk * entry matches every minute, hour, day, and so on. So from the example above, the command is “/usr/local/bin/rsync-slackware64.sh 1>/dev/null 2>&1”, and it runs every weekday or every week of every month at 2:30 a.m.

crond will also e-mail the local user with any output the command generates. For this reason, many tasks have their output redirected to /dev/null, a special device file that immediately discards everything it receives. In order to make it easier for you to remember these rules, you might wish to paste the following commented text at the top of your own cron entries.

# Redirect everything to /dev/null with:
#   1>/dev/null 2>&1
#
# MIN HOUR DAY MONTH WEEKDAY COMMAND

By default, Slackware includes a number of entries and comments in root's crontab. These entries make it easier to setup periodic system tasks by creating a number of directories in /etc corresponding to how often the tasks should run. Any script placed within these directories will be run hourly, daily, weekly, or monthly. The names should be self-explanatory: /etc/cron.hourly, /etc/cron.daily, /etc/cron.weekly, and /etc/cron.monthly.

Chapter Navigation

Previous Chapter: The Bourne Again Shell[4060]

Next Chapter: The X Window System[4061]

Sources

* Original source: http://www.slackbook.org/beta[4062]
* Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, process control, ps, kill, killall, top, cron

The X Window System

What Is (And Isn't) X

Eons ago computer terminals came with a screen and a keyboard and not much else. Mice hadn't come into common use and everything was menu driven. Then came the Graphical User Interface (GUI) and the world was changed. Today users are accustomed to moving a mouse around a screen, clicking on icons and running tasks with fancy images and animation, but UNIX systems predated this and so GUIs were added almost as an afterthought. For many years, Linux and its UNIX brethren were primarily used without graphics of any sort, but today it is perhaps more common than not for users to prefer their Linux computers come with shiny, flashy, clickable GUIs, and all these GUIs run on X(7).

So what is X? Is it the desktop with the icons? Is it the menus? Is it the window manager? Does it mark the spot? The answer to all these is a resounding “no”. There are many parts to a GUI, but X is the most fundamental. X is that application that receives input from the mouse, keyboard, and possibly other devices. X is that application that tells the graphics card what to do. In short, X is the application that talks to your computer's hardware for graphical purposes; all other graphical applications simply talk to X.

Let's stop for a moment and talk about nomenclature. X is just one of a dozen names that you may encounter. It is also called X11, xorg, the X Window System, X Window, X11R6, X Version 11, and several others. Whatever you hear it called, simply understand that the speakers are referring to X.

Configuring the X Server

Once upon a time, configuring X was a difficult and painful process that caused the magic smoke to come gushing out of hundreds of monitors. Today X is a lot more user friendly. In fact, most users will not need to configure X at all, Slackware will simply figure out all the proper settings on its own. There are, however, still some computers that X can't properly auto-configure and will need a little bit of work on your part.

Once upon a time, the X configuration file was located at /etc/X11/xorg.conf, and if you create a file there, X will honor whatever settings you place within it. Fortunately, with X.Org 1.6.3 an /etc/X11/xorg.conf does not even need to be present for X to generate a working display. If for whatever reason, you need to make configuration changes to X, try to avoid using this file; it's antiquated and inflexible. Rather, the /etc/X11/xorg.conf.d/ directory is where you should put such tweaks. Any file you place within that directory will be read when X starts up. This allows you to split-up your configuration into more easily manageable parts. For example, here's my /etc/X11/xorg.conf.d/synaptics.conf file for my laptop.

darkstar:~$ cat /etc/X11/xorg.conf.d/synaptics.conf
Section "InputDevice"
Identifier      "Synaptics Touchpad"
Driver          "synaptics"
Option          "SendCoreEvents"        "true"
Option          "Device"                "/dev/psaux"
Option          "Protocol"              "auto-dev"
Option          "SHMConfig"             "on"
Option          "LeftEdge"              "100"
Option          "RightEdge"             "1120"
Option          "TopEdge"               "50"
Option          "BottomEdge"            "310"
Option          "FingerLow"             "25"
Option          "FingerHigh"            "30"
Option          "VertScrollDelta"       "20"
Option          "HorizScrollDelta"      "50"
Option          "MinSpeed"              "0.79"
Option          "MaxSpeed"              "0.88"
Option          "AccelFactor"           "0.0015"
Option          "TapButton1"            "1"
Option          "TapButton2"            "2"
Option          "TapButton3"            "3"
Option          "MaxTapMove"            "100"
Option          "HorizScrollDelta"      "0"
Option          "HorizEdgeScroll"       "0"
Option          "VertEdgeScroll"        "1"
Option          "VertTwoFingerScroll"   "0"
EndSection

By placing such options in individual files, you can easily manage your X configuration by sections.

Choosing a Window Manager

Slackware Linux includes many different window managers and desktop environments. Window managers are the applications responsible for painting application windows on the screen, resizing these windows, and similar tasks. Desktop environments include a window manager, but also add task bars, menus, icons, and more. Slackware includes both the KDE and XFCE desktop environments and several additional window managers. Which you use is entirely your own decision, but in general, window managers tend to be faster than desktop environments and more suitable to older systems with less memory and slower processors. Desktop environments will be more comfortable for users accustomed to Microsoft Windows.

The easiest way to choose a window manager is xwmconfig(1), included with Slackware Linux. This application allows a user to choose what window manager to run with startx.

Setting Up A Graphical Login

By default, when you boot your Slackware Linux system you are presented with a login prompt on a virtual terminal. This is more than adequate for most people's needs. If you need to run commandline applications, you may login and do so right away. If you want to run X, simply executing startx will do that for you nicely. But suppose you almost exclusively use your system for graphical duties like many laptop owners? Wouldn't it be nice for Slackware to take you straight into a GUI? Fortunately, there's an easy way to do just that.

Slackware uses the System V init system which allows the administrator to boot into or change to different runlevels, which are really just different “states” the computer can be in. In fact, shutting down the computer is really only a case of changing to a runlevel which accomplishes just that. Runlevels can be rather complicated, so we won't delve into them any further than necessary.

Runlevels are configured in inittab(5). The most common ones are runlevel 3 (Slackware's default) and runlevel 4 (GUI). In order to tell Slackware to boot to a GUI screen, simply open /etc/inittab with your favorite editor of choice. (You may wish to refer to one of the chapters on vi or emacs at this point.) Near the top, you'll see the relevant entries.

# 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
# Default runlevel. (Do not set to 0 or 6)
id:3:initdefault:

In this file (along with most configuration files) anything following a hash symbol # is a comment and not interpreted by init(8). Don't worry if you don't understand everything about inittab, as many veteran users don't either. The only line we are interested in is the last on above. Simply change the 3 to a 4 and reboot.

# 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
# Default runlevel. (Do not set to 0 or 6)
id:4:initdefault:

Chapter Navigation

Previous Chapter: Process Control[4063]

Next Chapter: Printing[4064]

Sources

Original source: http://www.slackbook.org/beta[4065]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, xwindows, gui, window managers

Working with Filesystems

The Filesystem Hierarchy

Slackware Linux stores all of its files and directories under a single / directory, typically referred to as “root”. This is in stark contract to what you may be familiar with in the form of Microsoft Windows. Different hard disk partitions, cdroms, usb flash drives, and even floppy disks can all be mounted in directories under /, but do not have anything like “drive letters”. The contents of these devices can be found almost anywhere, but there are some sane defaults that Slackware sets up for you. For example, cd-rw drives are most often found at /mnt/cd-rw. Here are a few common directories present on nearly all Slackware Linux installations, and what you can expect to find there.

Table 11.1. Filesystem Layout

/ | The root directory, under which all others exist
/bin | Minimal set of binary programs for all users
/boot | The kernel, initrd, and other requirements for booting Slackware
/etc | System configuration files
/dev | Collection of special files allowing direct access to hardware
/home | User directories where personal files and settings are stored
/media | Directory for auto-mounting features in DBUS/HAL
/mnt | Places to temporarily mount removable media
/opt | Directory where some (typicaly proprietary) software may be installed
/proc | Kernel exported filesystem for process information
/root | The root user's home directory
/sbin | Minimal set of system or superuser binaries
/srv | Site-specific data such as web pages served by this system
/sys | Special kernel implimentation details
/tmp | Directory reserved for temporary files for all users
/usr | All non-essential programs, libraries, and shared files
/var | Regularly changing data such as log files

Local Filesystem Types

The Linux kernel supports a wide variety of filesystems, which allows you to choose from a long list of features to tailor to your particular need. Fortunately, most of the default filesystem types are adequate for any needs you may have. Some filesystems are geared towards particular media. For example, the iso9660 filesystem is used almost exclusively for CD and DVD media.

ext2

ext2 is the oldest filesystem included in Slackware Linux for storing data on hard disks. Compared to other filesystems, ext2 is simplistic. It is faster than most others for reading and writing data, but does not include any journaling capability. This means that after a hard crash, the filesystem must be exhaustively checked to discover and (hopefully) fix any errors.

ext3

ext3 is the younger cousin of ext2. It was designed to replace ext2 in most situations and shares much the same code-base, but adds journaling support. In fact, ext3 and ext2 are so much alike that it is possible to convert one to the other on the fly without lose of data. ext3 enjoys a lot of popularity for these reasons. There are many tools available for recovering data from this filesystem in the event of catastrophic hardware failure as well. ext3 is a good general purpose filesystem with journaling support, but fails to perform as well as other journaling filesystems in specific cases. One pitfall to ext3 is that the filesystem must still go through this exhaustive check every so often. This is done when the filesystem is mounted, usually when the computer is booted, and causes an annoying delay.

ext4

ext4 is the latest in the ext series of filesystems. It was designed to build upon ext3 with new ideas on what filesystems should do. While Slackware supports ext4, you should remember that this filesystem is still very new (particularly in file system terms) and is under heavy development. If you require stability over performance, you may wish to use a different filesystem such as ext3. With that said, ext4 does boast some major improvements over ext3 in the performance arena, but many people don't yet trust it for stable use.

reiserfs

reiserfs is one of the oldest journaling filesystems for the Linux kernel and has been supported by Slackware for many years. It is a very fast filesystem particularly well suited for storing, retrieving, and writing lots of small files. Unfortunately there are few tools for recovering data should you experience a drive failure, and reiserfs partitions experience corruption more often than ext3.

XFS

XFS was contributed to the Linux kernel by SGI and is one of the best filesystems for working with large volumes and large files. XFS uses more RAM than other filesystems, but if you need to work with large files its performance there is well worth the penalty in memory usage. XFS is not particularly ill-suited for desktop or laptop use, but really shines on a server that handles medium to large size files all day long. Like ext3, XFS is a fully journaled filesystem.

JFS

JFS was contributed to the Linux kernel by IBM and is well known for its responsiveness even under extreme conditions. It can span colossal volumes making it particularly well-suited for Network Attached Storage (NAS) devices. JFS's long history and thorough testing make it one of the most reliable journaling filesystems available for Linux.

iso9660

iso9660 is a filesystem specifically designed for optical media such as CDs and DVDs. Since optical disks are read-only media, the linux kernel does not even include write support for this filesystem. In order to create an iso9660 filesystem, you must use user-land tools like mkisofs(8) or growisofs(8).

vfat

Sometimes you may need to share data between Windows and Linux computers, but can't transfer the files over a network. Instead you require a shared hard drive partition or a USB flash drive. The humble vfat filesystem is the best choice here since it is supported by the largest variety of operating systems. Unfortuantely, being a Microsoft designed filesystem, it does not store permissions in the same way as traditional Linux filesystems. This means that special options must be used to allow multiple users to access data on this filesystem.

swap

Unlike other filesystems which hold files and directories, swap partitions hold virtual memory. This is very useful as it prevents the system from crashing should all your RAM be consumed. Instead, the kernel copies portions of the RAM into swap and frees them up for other applications to use. Think of it as adding virtual memory to your computer, very slow virtual memory. swap is typically a fail-safe and shouldn't be relied upon for continual use. Add more RAM to your system if you find yourself using lots of swap.

Using mount

Now that we've learned what (some of) the different filesystems available in Linux are, it's time we looked at how to use them. In order to read or write data on a filesystem, that filesystem must first be mounted. To do this, we (naturally) use mount(8). The first thing we must do is decide where we want the filesystem located. Recall that there are no such things are drive letters denoting filesystems in Linux. Instead, all filesystems are mounted on directories. The base filesystem on which you install Slackware is always located at / and others are always located in subdirectories of /. /mnt/hd is a common place to temporarily locate a partition, so we'll use that in our first example. In order to mount a filesystem's contents, we must tell mount what kind of filesystem we have, where to mount it, and any special options to use.

darkstar:~# mount -t ext3 /dev/hda3 /mnt/hd -o ro

Let's disect this. We have an ext3 filesystem located on the third partition of the first IDE device, and we've decided to mount its contents on the directory /mnt/hd. Additionally, we have mounted it read-only so no changes can be made to these contents. The [-t ext3] argument tells mount what type of filesystem we are using, in this case it is ext3. This lets the kernel know which driver to use. Often mount can determine this for itself, but it never hurts to explicitly declare it. Second, we tell mount where to locate the filesystem's contents. Here we've chosen /mnt/hd. Finally, we must decide what options to use if any. These are declared with the [-o] argument. A short-list of the most common options follows.

Table 11.2. Common mount options

ro | read-only
rw | read-write (default)
uid | user to own the contents of the filesystem
gid | group to own the contents of the filesystem
noexec | prevent execution of any files on the filesystem
defaults | sane defaults for most filesystems

If this is your first Linux installation, the only options you typically need to be concerned about are ro and rw. The exception to this rule comes when you are dealing with filesystems that don't handle traditional Linux permissions such as vfat or NTFS. In those cases you'll need to use the uid or gid options to allow non-root users access to these filesystems.

darkstar:~# mount -t vfat /dev/hda4 /mnt/hd -o uid=alan

But Alan, that's appalling! I don't want to have to tell mount what filesystem or options to use everytime I load a CD. It should be easier than that. Well thankfully, it is. The /etc/fstab file contains all this information for filesystems that the installer sets up for you, and you can make additions to it as well. fstab(5) looks like a simple table containing the device to mount along with its filesystem type and optional arguments. Let's take a look.

darkstar:~# cat /etc/fstab
/dev/hda1        /                reiserfs    defaults               1   1
/dev/hda2        /home            reiserfs    defaults               1   2
/dev/hda3        swap             swap        defaults               0   0
/dev/cdrom       /mnt/cdrom       auto        noauto,owner,ro,users  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner           0   0
devpts           /dev/pts         devpts      gid=5,mode=620         0   0
proc             /proc            proc        defaults               0   0

If you have an entry in fstab for your filesystem, you need only tell mount the device node or the mount location.

darkstar:~# mount /dev/cdrom
darkstar:~# mount /home

One final use for mount is to tell you what filesystems are currently mounted and with what options. Simply run mount without any arguments to display these.

Network Filesystems

In addition to local filesystems, Slackware supports a number of network filesystems as both client and server. This allows you to share data between multiple computers transparently. We'll discuss the two most common: NFS and SMB.

NFS

NFS is the Network File System for Linux as well as several other common operating systems. It has modest performance but supports the full range of permissions for Slackware. In order to use NFS as either a client or a server, you must run the remote procedure call daemon. This is easily accomplished by setting the /etc/rc.d/rc.rpc file executable and telling it to start. Once it has been set executable, it will run automatically every time you boot into Slackware.

darkstar:~# chmod +x /etc/rc.d/rc.rpc
darkstar:~# /etc/rc.d/rc.rpc start

Mounting an NFS share is little different than mounting a local filesystem. Rather than specifying a local device, you must tell mount the domain name or IP address of the NFS server and the directory to mount with a colon between them.

darkstar:~# mount -t nfs darkstar.example.com:/home /home

Running an NFS server is a little bit different. First, you must configure each directory to be exported in the /etc/exports file. exports(5) contains information about what directories will be shared, who they will be shared with, and what special permissions to grant or deny.

# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.
/home/backup	192.168.1.0/24(sync,rw,no_root_squash)

The first column in exports is a list of the files to be exported via NFS. The second column is a list of what systems may access the export along with special permissions. You can specify hosts via domain name, IP address, or netblock address (as I have here). Special permissions are always a parenthetical list. For a complete list, you'll need to read the man page. For now, the only special option that matters is no_root_squash. Usually the root user on an NFS client cannot read or write an exported share. Instead, the root user is “squashed” and forced to act as the nobody user. no_root_squash prevents this.

You'll also need to run the NFS daemon. Starting and stopping NFS server support is done with the /etc/rc.d/rc.nfsd rc script. Set it executable and run it just like we did for rc.rpc and you are ready to go.

SMB

SMB is the Windows network file-sharing protocol. Connecting to SMB shares (commonly called samba shares) is fairly straight forward. Unfortuantely, SMB isn't as strongly supported as NFS. Still, it offers higher performance and connectivity with Windows computers. For these reasons, SMB is the most common network file-sharing protocol deployed on local networks. Exporting SMB shares from Slackware is done through the samba daemon and configured in smb.conf(5). Unfortunately configuring samba as a service is beyond the scope of this book. Check online for additional documentation, and as always refer to the man page.

Thankfully mounting an SMB share is easy and works almost exactly like mounting an NFS share. You must tell mount where to find the server and what share you wish to access in exactly the same way. Additionally, you must specify a username and password.

darkstar:~# mount -t cifs //darkstar/home /home -o username=alan,password=secret

You may be wondering why the filesystem type is cifs instead of smbfs. In older versions of the Linux kernel, smbfs was used. This has been deprecated in favor of the better performing and more secure general purpose cifs driver.

All SMB shares require the username and password arguments. This can create a security problem if you wish to place your samba share in fstab. You may avoid this problem by using the credentials argument. credentials points to a file which contains the username and password information. As long as this file is safely guarded and readable only by root, the likelyhood that your authentication credentials will be compromised is lessened.

darkstar:~# echo "username=alan" > /etc/creds-home
darkstar:~# echo "password=secret" >> /etc/creds-home
darkstar:~# mount -t cifs //darkstar/home -o credentials=/etc/creds-home

Chapter Navigation

Previous Chapter: Filesystem Permissions[4066]

Next Chapter: vi[4067]

Sources

Original source: http://www.slackbook.org/beta[4068]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, filesystem, network filesystems, nfs, smb, mount

Package Management

Package management is an essential part of any Linux distribution. Every piece of software included by Slackware, along with many third-party tools are distributed as source code that can be compiled, but compiling all those thousands of different applications and libraries is tedious and time consuming. That's why many people prefer to install pre-compiled software packages. In fact, when you installed Slackware, the setup program primarily worked by running package management tools on a list of packages. Here we'll look at the various tools used for handling Slackware packages.

pkgtool

The simplest way to perform package maintenance tasks is to invoke pkgtool(8), a menu-driven interface to some of the other tools. pkgtool allows you to install or remove packages as well as view the contents of those packages and the list of currently installed packages in a user-friendly ncurses interface.

pkgtool is a convenient and easy way to perform the most basic tasks, but for more advanced work more flexible tools are needed.

Installing, Removing, and Upgrading Packages

While pkgtool scores points for convenience, installpkg(8) is much more capable of handling odd tasks, such as quickly installing a single package, installing an entire disk set of packages, or scripting an install. installpkg takes a list of packages to install, and simply installs them without asking any questions. Like all Slackware package management tools, it assumes that you know what you're doing and doesn't pretend to be smarter than you. In its simplest form, installpkg simply takes a list of packages to install, and does exactly what you would expect.

darkstar:~# installpkg blackbox-0.70.1-i486-2.txz
Verifying package blackbox-0.70.1-i486-2.txz.
Installing package blackbox-0.70.1-i486-2.txz:
PACKAGE DESCRIPTION:
# blackbox (Blackbox window manager)
#
# Blackbox is that fast, light window manager you have been looking for
# without all those annoying library dependencies.
#
# Also included in this package is the bbkeys utility for controlling
# keyboard shortcut commands from within Blackbox.
#
# The Blackbox home page is http://blackboxwm.sourceforge.net
#
Package blackbox-0.70.1-i486-2.txz installed.

You can of course install multiple packages at a time, and in fact use shell wild cards.The following installs all of the “N” series packages from a mounted CD-ROM:

darkstar:~# installpkg /mnt/cdrom/slackware/n/*.txz

At any given time, you can see what packages are installed on your system by listing the contents of /var/log/packages, which lists not only every application on your system but also the version number. Should you want to know what individual files were installed as a part of that package, cat the contents of the package:

darkstar:~#cat /var/log/packages/foo-1.0-x86_64.txz

This will return everything from the size of the package, a description of what it does, and the name and location of every file installed as a part of the package.

Removing a package is every bit as easy as installing one. As you might expect, the command to do this is removepkg(8). Simply tell it which packages to remove, and removepkg will check the contents of the package database and remove all the files and directories for that package with one caveat. If that file is included in multiple installed packages, it will be skipped and if a directory has new files in it, the directory will be left in place. Because of this, removing packages takes a good while longer than installing them.

darkstar:~# removepkg blackbox-0.70.1-i486-2.txz

Finally, upgrading is just as easy with (you guessed it), upgradepkg(8) which first installs a new package, then removes whatever files and directories are left-over from the old package. One important thing to remember is that upgradepkg doesn't check to see if the previously installed package has a higher version number than the “new” package, so it can also be used to downgrade to older versions.

darkstar:~# upgradepkg blackbox-0.70.1-i486-2.txz
+==============================================================================
| Upgrading blackbox-0.65.0-x86_64-4 package using
./blackbox-0.70.1-i486-2.txz
+==============================================================================
Pre-installing package blackbox-0.70.1-i486-2...
Removing package
/var/log/packages/blackbox-0.65.0-x86_64-4-upgraded-2010-02-23,16:50:51...
--> Deleting symlink /usr/share/blackbox/nls/POSIX
--> Deleting symlink /usr/share/blackbox/nls/US_ASCII
--> Deleting symlink /usr/share/blackbox/nls/de
--> Deleting symlink /usr/share/blackbox/nls/en
--> Deleting symlink /usr/share/blackbox/nls/en_GB
...
Package blackbox-0.65.0-x86_64-4 upgraded with new package
./blackbox-0.70.1-i486-2.txz.

All of these tools have useful arguments. For example, the –root to installpkg will install packages into an arbitrary directory. The –dry-run argument will instruct upgradepkg to simply tell you what it would attempt without actually making any changes to the system. For complete details, you should (as always) refer to the man pages.

Package Compression Formats

In the past, all Slackware packages were compressed with the gzip(1) compression utility, which was a good compromise between compression speed and size.Recently, new compression schemes have been added and the package management tools have been upgraded to handle these. Today, official Slackware packages are compressed with the xz utility and end with .txz extensions.Older packages (and many third party packages) still use the .tgz extension.

It's worth emphasizing that .tgz and .txz (or, more succinctly, .t?z files) are very standard, non-unique extensions for compressed .tar files. This has many advantages; they're easy to build on nearly any UNIX system (many other package formats require special toolchains), and they're just as simple to de-construct.

However, it is also important to realize that just because all Slackware packages are .t?z files, not all .t?z files are Slackware packages. Installpkg won't magically install just any .t?z file, only Slackware packages.

slackpkg

Slackpkg is an automated tool for management of Slackware Linux Packages. It originally appeared in /extra for the release of slackware-12.1, and since the release of slackware-12.2 it has been included in the ap/ series of a base installation.

Just as you are able to use installpkg to install Slackware packages from the /extra directory included on the install media, you can use slackpkg to pull packages from the Internet and install them. This is particularly useful for security updates or significant application upgrades that are posted to the Slackware servers, some of which you may want to start using on your own system.

Without slackpkg, the process would be:

Notice in the Slackware changelog that an update has been released.

Look on your local Slackware mirror to find a download link of the package.

Download the package from a Slackware mirror to your hard drive.

Use either installpkg or pkgtool to install the downloaded package.

With slackpkg, this is reduced to:

Notice in the Slackware changelog that an update for foo has been released.

slackpkg install foo

Clearly, this streamlines a fairly common task.

To use slackpkg, configure your system with a Slackware mirror by editing /etc/slackpkg/mirrors as root. Find the mirror that is associated with your Slackware version and architecture, and uncomment it. This list of mirrors offers ftp and http access, but you must uncomment only one mirror.

Once a mirror has been selected, update the list of remote files by issuing the initial command slackpkg update. This should be done any time you notice that a new package has been posted (regularly checking in with the Slackware changelog is recommended; see Chapter 18, Keeping Track of Updates[4069] for more information).

To search for a package, use slackpkg search foo, and to install use slackpkg install foo.

Once a package has been installed with slackpkg, it can be removed or upgraded using pkgtool and the other package management commands as detailed inInstalling, Removing, and Upgrading Packages.

For more information see the man pages for slackpkg(8) and slackpkg.conf(5), and see its website at http://www.slackpkg.org/[4070]

rpm2tgz

One of the most ubiquitous package formats for Linux software is RPM; it's not uncommon to find a developer offering their application for download as either source code or an RPM file, and no more. In this case, you would have three options:

Build your own Slackware package.

Compile and install directly from source code.

Convert and install from RPM.

Building from source code or creating your own Slackware package is usually not as complex as you might think but installing directly from source code is generally discouraged because there is no easy way to track what has been installed on your system after issuing the make install command. Building your own Slackware packages is outside the scope of this chapter. So this leaves us with the helpful tool rpm2tgz.

rpm2tgz converts RPM packages into a Slackware package that can then be installed via pkgtool or installpkg. This circumvents the need to create your own Slackware package but grants you the benefit of being able to remove, update, and track what you've installed.

While a Slackware package is just a shell script and source code, an RPM package can by comparison be a maze of dependency listings and special instructions. Therefore, rpm2tgz will not always work, especially on very complex applications, and it will never magically resolve dependencies.

To try rpm2tgz, download an RPM file from a trusted source and convert it:

rpm2tgz foo-x.x.xx.rpm

The result is a .tgz file, so after the conversion is finished, the original RPM can safely be discarded. Use installpkg to install the Slackware package you've just created, provided that you've installed all dependency code for the application to actually function.

Chapter Navigation

Previous Chapter: Basic Networking Utilities[4071]

Next Chapter: Keeping Track of Updates[4072]

Sources

Original source: http://www.slackbook.org/beta[4073]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, package management, pkgtool, slackpkg, rpm2tgz

Vi

What is vi?

Scattered all around your computer are thousands of text files. To a new user, this may seem inconsequential, but almost everything in Slackware Linux uses a plain-text file for configuration. This allows users to make changes to the system quickly, easily, and intuitively. In chapter 5, we looked at a few commands such as cat and less that can be used to read these files, but what if we want to make changes to them? For that, we need a text editor, and vi is up to the task.

In short, vi is one of the oldest and most powerful text editors still used today. It's beloved by system administrators, programmers, hobbiests, and others the world over. In fact, nearly this entire book was written using vi; only the next chapter on emacs was written with that editor.

A little further explanation is needed to learn exactly what vi is today though, as Slackware Linux technically doesn't include vi. Rather, Slackware includes two vi “clones”, elvis(1) and vim(1). These clones add many additional features to vi such as syntax highlighting, binary editing modes, and network support. We won't go too deeply into all these details. By default, if you execute vi on Slackware Linux, you'll be using elvis, so all examples in this chapter will assume that is what you are using. If you've used another Linux distribution before, you may be more familiar with vim. If so, you might wish to change the symlink for /usr/bin/vi to point to /usr/bin/vim, or add an alias to your shell's startup scripts. vim is generally considered to be more feature-rich than elvis, but elvis is a much smaller program and contains more features than most users will ever need.

vi is very powerful, but also somewhat cumbersome and challening for a new user to learn. However, mastering vi is an important skill for any self-respecting system administrator to learn, as vi is included on nearly every Linux distribution, every BSD system, and every UNIX system in existance. It's even included in Mac OS X. Once you've learned vi, you'll not have to learn another text editor to work on any of these systems. In fact, vi clones have even been ported to Microsoft Windows systems, so you can use it there too.

The Different Modes of vi

New users are often frustrated when using vi for the first time. When invoked without any arguments, vi will display a screen something like this.

~
~
~
~
~
~
~
~
~
~
~
Command

At this point, the user will being typing and expect the keys he presses to appear in the document. Instead, something really strange happens. The reason for this is simple. vi has different operation “modes”. There is a command mode and an insert mode. Command mode is the default; in this mode, each keystroke performs a particular action such as moving the cursor around, deleting text, yanking (copying) text, searching, etc.

Opening, Saving, and Quitting

Ok, so you've decided that you want to learn how to use vi. The first thing to do is learn how to open and save files. Opening files is actually pretty easy. Simply type the filename as an argument on the command-line and vi will happily load it for you. For example, vi chapter_11.xml will open the file chapter_11.xml and load its content onto the screen, simple enough. But what if we've finished with one document and wish to save it? We can do that in command mode using the :w command. When in command mode, pressing the : key temporarily positions the cursor on the very bottom line of the window and allows you to enter special commands. (This is technically known as ex-mode after the venerable ex application which we will not document here.) The command to save your current work is :w. Once this is done, vi will write your changes to the buffer back into the file. If you wish to open another document, simply use the :e other_document command and vi will happily open it for you. If you've made changes to the buffer but haven't saved it yet, :e will fail and print a warning message on the bottom line. You can bypass this with the :e! command. Most ex-mode commands in vi can be “forced” by adding ! to them. This tells vi that you want to abandon any changes you've made to the buffer and open the other document immediately.

But what if I don't like my changes and want to quit or start over? That's easily done as well. Executing the :e! command without any arguments will re-open the current document from the beginning. Quitting vi is as simple as running the :q command if you haven't made any changes to the buffer, or :q! if you'd like to quit and abandon those changes.

Moving Around

Moving around in vi is perhaps the hardest thing for a new user to learn. vi does not traditionally use the directional arrow keys for cursor movement, although in Slackware Linux that is an option. Rather, movement is simply another command issued in command-mode. The reason for this is rather simple. vi actually predates the inclusion of directional arrow keys on keyboards. Thus, movement of the cursor had to be accomplished by using the few keys available, so the right-hand “home row” keys of h, j, k, and l were chosen. These keys will move the cursor about whenever vi is in command mode. Here's a short table to help you remember how they work.

Command | Result
h | Move the cursor one character left
j | Move the cursor one line down
k | Move the cursor one line up
l | Move the cursor one character right

Moving around is a little more powerful than that though. Like many command keys, these movement keys accept numerical arguments. For example, 10j will move the cursor down 10 lines. You can also move to the end or beginning of the current line with $ and ^, respectively.

Editing A Document

Now that we're able to open and save documents, as well as move around in them, it's time to learn how to edit them. The primary means of editing is to enter insert mode using either the i or a command keys. These either insert text at the cursor's current location, or append it after the cursor's current location. Once into insert mode, you can type any text normally and it will be placed into your document. You can return to command mode in order to save your changes by pressing the ESC key.

Vi Cheat Sheet

Since vi can be difficult to learn, I've prepared a short cheat sheat that should help you with the basics until you begin to feel comfortable.

Command | Result
h | Move the cursor one character left
j | Move the cursor one line down
k | Move the cursor one line up
l | Move the cursor one character right
10j | Move the cursor ten lines down
G | Move to the end of the file
^ | Move to the beginning of the line
$ | Move to the end of the line
dd | Remove a line (and store it in the copy buffer)
5dd | Remove 5 lines (and store them in the copy buffer)
dw | Remove a single word (and store it in the copy buffer)
5dw | Remove five words (and store them in the copy buffer)
yy | Yank (copy) a line (and store it in the copy buffer)
yw | Yank (copy) a single word (and store it in the copy buffer)
5yw | Yank five words (and store them in the copy buffer)
p | Paste the contents of the copy buffer at the cursor's location
P | Paste the contents of the copy buffer above the cursor's location
r | Replace a single character
R | Replace multiple characters
x | Delete a character
X | Delete the previous character
u | Undo the last action
:s'old'new'g | Replace all occurrences of 'old' with 'new' (current line only)
:%s'old'new'g | Replace all occurrences of 'old' with 'new' (all lines)
/asdf | Locate next occurrence of asdf
:q | Quit (without saving)
:w | Save the current document
:w file | Save the current document as 'file'
:x | Save and quit

Chapter Navigation

Previous Chapter: Working with Filesystems[4074]

Next Chapter: Emacs[4075]

Sources

Original source: http://www.slackbook.org/beta[4076]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, vi, text editor

Conventions Used in this Book

To provide a consistent and easy to read text, several conventions are followed throughout the book.

Typographic Conventions

Italic

An italic font is used for commands, emphasized text, and the first usage of technical terms.

Monospace

A monospaced font is used for error messages, commands, environment variables, names of ports, hostnames, user names, group names, device names, variables, and code fragments.

Bold

A bold font is used for user input in examples.

User Input

Keys are shown in bold to stand out from other text. Key combinations that are meant to be typed simultaneously are shown with “+” between the keys, such as:

Ctrl+Alt+Del

Meaning the user should type the Ctrl, Alt, and Del keys at the same time.

Keys that are meant to be typed in sequence will be separated with commas, for example:

Ctrl+X, Ctrl+Shift

Would mean that the user is expected to type the Ctrl and X keys simultaneously and then to type the Ctrl and Shift keys simultaneously.

Examples

Examples starting with E:\> indicate a MS-DOS® command. Unless otherwise noted, these commands may be executed from a “Command Prompt” window in a modern Microsoft® Windows® environment.

D:\> rawrite a: bare.i

Examples starting with # indicate a command that must be invoked as the superuser in Slackware. You can login as root to type the command, or login as your normal account and use su(1) to gain superuser privileges.

# dd if=bare.i of=/dev/fd0

Examples starting with % indicate a command that should be invoked from a normal user account. Unless otherwise noted, C-shell syntax is used for setting environment variables and other shell commands.

% top

Sources

Original source: http://slackbook.org/[4077]

slackbook

Introduction to Slackware

Why Use Slackware?

Slackware has a long tradition of excellence. Started in 1992 and first released in 1993, Slackware is the oldest surviving commercial Linux distribution. Slackware's focus on making a clean, simple Linux distribution that is as UNIX-like as possible makes it a natural choice for those people who really want to learn about Linux and other UNIX-like operating systems. In a 2012 interview, Slackware founder and benevolent dictator for life, Patrick Volkerding, put it thusly.

“I try not to let things get juggled around simply for the sake of making them different. People who come back to Slackware after a time tend to be pleasantly surprised that they don't need to relearn how to do everything. This has given us quite a loyal following, for which I am grateful.”

Slackware's simplicity makes it ideal for those users who want to create their own custom systems. Of course, Slackware is great in its own right as a desktop, workstation, or server as well.

Differences Compared to Other Linux Distributions

There are a great number of differences between Slackware and other mainstream distributions such as Red Hat, Debian, and Ubuntu. Perhaps the greatest difference is the lack of “hand-holding” that Slackware will do for the administrator. Many of those other distributions ship with custom graphical configuration tools for all manner of services. In many cases, these configuration tools are the preferred method of setting up applications on these systems and will overwrite any changes you make to the configuration files via other means. These tools often make it easy (or at least possible) for a rookie with no in-depth understanding of his system to setup basic services; however, they also make it difficult to do anything too out of the ordinary. In contrast, Slackware expects you, the system administrator, to do these tasks on your own. Slackware provides no general purpose setup tools beyond those included with the source code published by upstream developers. This means there is often a somewhat steeper learning curve associated with Slackware, even for those users familiar with other Linux distributions, but also makes it much easier to do whatever you want with your operating system.

Also, you may hear users of other distributions say that Slackware has no package management system. This is completely and obviously false. Slackware has always had package management (see Package Management[4078] for more information). What it does not have is automatic dependency resolution - Slackware's package tools trade dependency management for simplicity, ease-of-use, and reliability.

Licensing

Each piece of Slackware (this is true of all Linux distributions) is developed by different people (or teams of people), and each group has their own ideas about what it means to be “free”. Because of this, there are literally dozens and dozens of different licenses granting you different permissions regarding their use or distribution. Fortunately dealing with free software licenses isn't as difficult as it may first appear. Most things are licensed with either the Gnu General Public License or the BSD license. Sometimes you'll encounter a piece of software with a different license, but in almost all cases they are remarkably similar to either the GPL or the BSD license.

Probably the most popular license in use within the Free Software community is the GNU General Public License. The GPL was created by the Free Software Foundation[4079], which actively works to create and distribute software that guarantees the freedoms which they believe are basic rights. In fact, this is the very group that coined the term “Free Software.” The GPL imposes no restrictions on the use of software. In fact, you don't even have to accept the terms of the license in order to use the software, but you are not allowed to redistribute the software or any changes to it without abiding by the terms of the license agreement. A large number of software projects shipped with Slackware, from the Linux kernel itself to the Samba project, are released under the terms of the GPL.

Another very common license is the BSD license, which is arguably “more free” than the GPL because it imposes virtually no restrictions on derivative works. The BSD license simply requires that the copyright remain intact along with a simple disclaimer. Many of the utilities specific to Slackware are licensed with a BSD-style license, and this is the preferred license for many smaller projects and tools.

Chapter Navigation

Next Chapter: Installation[4080]

Sources

Original source: http://www.slackbook.org/beta[4081]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook

The shell

So you've installed Slackware and you're staring at a terminal prompt, what now? Now would be a good time to learn about the basic command line tools. And since you're staring at a blinking curser, you probably need a little assistance in knowing how to get around, and that is what this chapter is all about.

System Documentation

Your Slackware Linux system comes with lots of built-in documentation for nearly every installed application. Perhaps the most common method of reading system documentation is man(1). man (short for manual) will bring up the included man-page for any application, system call, configuration file, or library you tell it too. For example, man man will bring up the man-page for man itself.

Unfortunately, you may not always know what application you need to use for the task at hand. Thankfully, man has built-in search abilities. Using the -k switch will cause man to search for every man-page that matches your search terms.

The man-pages are organized into groups or sections by their content type. For example, section 1 is for user applications. man will search each section in order and display the first match it finds. Sometimes you will find that a man-page exists in more than one section for a given entry. In that case, you will need to specify the exact section to look in. In this book, all applications and a number of other things will have a number on their right-hand side in parenthesis. This number is the man page section where you will find information on that tool.

darkstar:~$ man -k printf
printf               (1)  - format and print data
printf               (3)  - formatted output conversion
darkstar:~$ man 3 printf

Man Page Sections

Section | Contents
1 | User Commands
2 | System Calls
3 | C Library Calls
4 | Devices
5 | File Formats / Protocols
6 | Games
7 | Conventions / Macro Packages
8 | System Administration
9 | Kernel API Descriptions
n | “New” - typically used to Tcl/Tk

Dealing with Files and Directories

Listing Files and Directory Contents

ls(1) is used to list files and directories, their permissions, size, type, inode number, owner and group, and plenty of additional information. For example, let's list what's in the / directory for your new Slackware Linux system.

darkstar:~$ ls /
bin/   dev/  home/  lost+found/  mnt/  proc/  sbin/  sys/  usr/
boot/  etc/  lib/   media/       opt/  root/  srv/   tmp/  var/

Notice that each of the listings is a directory. These are easily distinguished from regular files due to the trailing /; standard files do not have a suffix. Additionally, executable files will have an asterisk suffix. But ls can do so much more. To get a view of the permissions of a file or directory, you'll need to do a “long list”.

darkstar:~$ ls -l /home/alan/Desktop
-rw-r--r-- 1 alan users 15624161 2007-09-21 13:02 9780596510480.pdf
-rw-r--r-- 1 alan users  3829534 2007-09-14 12:56 imgscan.zip
drwxr-xr-x 3 alan root       168 2007-09-17 21:01 ipod_hack/
drwxr-xr-x 2 alan users      200 2007-12-03 22:11 libgpod/
drwxr-xr-x 2 alan users      136 2007-09-30 03:16 playground/

A long listing lets you view the permisions, user and group ownership, file size, last modified date, and of course, the file name itself. Notice that the first two entires are files, and the last three are directories. This is denoted by the very first character on the line. Regular files get a “-”; directories get a “d”. There are several other file types with their own denominators. Symbolic links for example will have an “l”.

Lastly, we'll show you how to list dot-files, or hidden files. Unlike other operating systems such as Microsoft Windows, there is no special property that differentiates “hidden” files from “unhidden” files. A hidden file simply begins with a dot. To display these files along with all the others, you just need to pass the -a argument to ls.

darkstar:~$ ls -a
.xine/    .xinitrc-backup  .xscreensaver  .xsession-errors  SBo/
.xinitrc  .xinitrc-xfce    .xsession      .xwmconfig/       Shared/

You also likely noticed that your files and directories appear in different colors. Many of the enhanced features of ls such as these colors or the trailing characters indicating file-type are special features of the ls program that are turned on by passing various arguments. As a convienience, Slackware sets up ls to use many of these optional arguments by default. These are controlled by the LS_OPTIONS and LS_COLORS environment variables. We will talk more about environment variables in chapter 5.

Moving Around the Filesystem

cd is the command used to change directories. Unlike most other commands, cd is actually not it's own program, but is a shell built-in. Basically, that means cd does not have its own man page. You'll have to check your shell's documentation for more details on the cd you may be using. For the most part though, they all behave the same.

darkstar:~$ cd /
darkstar:/$ls
bin/   dev/  home/  lost+found/  mnt/  proc/  sbin/  sys/  usr/
boot/  etc/  lib/   media/       opt/  root/  srv/   tmp/  var/
darkstar:/$cd /usr/local
darkstar:/usr/local$

Notice how the prompt changed when we changed directories? The default Slackware shell does this as a quick, easy way to see your current directory, but this is not actually a function of cd. If your shell doesn't operate in this way, you can easily get your current working directory with the pwd(1) command. (Most UNIX shells have configurable prompts that can be coaxed into providing this same functionality. In fact, this is another convience setup in the default shell for you by Slackware.)

darkstar:~$ pwd
/usr/local

File and Directory Creation and Deletion

While most applications can and will create their own files and directories, you'll often want to do this on your own. Thankfully, it's very easy using touch(1) and mkdir(1).

touch actually modifies the timestamp on a file, but if that file doesn't exist, it will be created.

darkstar:~/foo$ ls -l
-rw-r--r-- 1 alan users 0 2012-01-18 15:01 bar1
darkstar:~/foo$ touch bar2
-rw-r--r-- 1 alan users 0 2012-01-18 15:01 bar1
-rw-r--r-- 1 alan users 0 2012-01-18 15:05 bar2
darkstar:~/foo$ touch bar1
-rw-r--r-- 1 alan users 0 2012-01-18 15:05 bar1
-rw-r--r-- 1 alan users 0 2012-01-18 15:05 bar2

Note how bar2 was created in our second command, and the third command simpl updated the timestamp on bar1

mkdir is used for (obviously enough) making directories. mkdir foo will create the directory “foo” within the current working directory. Additionally, you can use the -p argument to create any missing parent directories.

darkstar:~$ mkdir foo
darkstar:~$ mkdir /slack/foo/bar/
mkdir: cannot create directory `/slack/foo/bar/': No such file or directory
darkstar:~$ mkdir -p /slack/foo/bar/

In the latter case, mkdir will first create “/slack”, then “/slack/foo”, and finally “/slack/foo/bar”. If you failed to use the -p argument, mkdir would fail to create “/slack/foo/bar” unless the first two already existed, as you saw in the example.

Removing a file is as easy as creating one. The rm(1) command will remove a file (assuming of course that you have permission to do this). There are a few very common arguments to rm. The first is -f and is used to force the removal of a file that you may lack explicit permission to delete. The -r argument will remove directories and their contents recursively.

There is another tool to remove directories, the humble rmdir(1). rmdir will only remove directories that are empty, and complain noisely about those that contain files or sub-directories.

darkstar:~$ ls
foo_1/ foo_2/
darkstar:~$ ls foo_1
bar_1
darkstar:~$ rmdir foo_1
rmdir: foo/: Directory not empty
darkstar:~$ rm foo_1/bar
darkstar:~$ rmdir foo_1
darkstar:~$ ls foo_2
bar_2/
darkstar:~$ rm -fr foo_2
darkstar:~$ ls

Archive and Compression

Everyone needs to package a lot of small files together for easy storage from time to time, or perhaps you need to compress very large files into a more manageable size? Maybe you want to do both of those together? Thankfully there are several tools to do just that.

zip and unzip

You're probably familiar with .zip files. These are compressed files that contain other files and directories. While we don't normally use these files in the Linux world, they are still commonly used by other operating systems, so we occasionally have to deal with them.

In order to create a zip file, you'll (naturally) use the zip(1) command. You can compress either files or directories (or both) with zip, but you'll have to use the -r argument for recursive action in order to deal with directories.

darkstar:~$ zip -r /tmp/home.zip /home
darkstar:~$ zip /tmp/large_file.zip /tmp/large_file

The order of the arguments is very important. The first filename must be the zip file to create (if the .zip extension is ommitted, zip will add it for you) and the rest are files or directories to be added to the zip file.

Naturally, unzip(1) will decompress a zip archive file.

darkstar:~$ unzip /tmp/home.zip

gzip

One of the oldest compression tools included in Slackware is gzip(1), a compression tool that is only capable or operating on a single file at a time. Whereas zip is both a compression and an archival tool, gzip is only capable of compression. At first glance this seems like a draw-back, but it is really a strength. The UNIX philosophy of making small tools that do their small jobs well allows them to be combined in myriad ways. In order to compress a file (or multiple files), simply pass them as arguments to gzip. Whenever gzip compresses a file, it adds a .gz extension and removes the original file.

darkstar:~$ gzip /tmp/large_file

Decompressing is just as straight-forward with gunzip which will create a new uncompressed file and delete the old one.

darkstar:~$ gunzip /tmp/large_file.gz
darkstar:~$ ls /tmp/large_file*
/tmp/large_file

But suppose we don't want to delete the old compressed file, we just want to read its contents or send them as input to another program? The zcat program will read the gzip file, decompress it in memory, and send the contents to the standard output (the terminal screen unless it is redirected, see the section called “Input and Output Redirection”[4082] for more details on output redirection).

darkstar:~$ zcat /tmp/large_file.gz
Wed Aug 26 10:00:38 CDT 2009
Slackware 13.0 x86 is released as stable!  Thanks to everyone who helped
make this release possible -- see the RELEASE_NOTES for the credits.
The ISOs are off to the replicator.  This time it will be a 6 CD-ROM
32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD.  We're taking
pre-orders now at store.slackware.com.  Please consider picking up a copy
to help support the project.  Once again, thanks to the entire Slackware
community for all the help testing and fixing things and offering
suggestions during this development cycle.

bzip2

One alternative to gzip is the bzip2(1) compression utility which works in almost the exact same way. The advantage to bzip2 is that it boasts greater compression strength. Unfortunately, achieving that greater compression is a slow and CPU-intensive process, so bzip2 typically takes much longer to run than other alternatives.

XZ / LZMA

The latest compression utility added to Slackware is xz, which implements the LZMA compression algorithm. This is faster than bzip2 and often compresses better as well. In fact, its blend of speed and compression strength caused it to replace gzip as the compression scheme of choice for Slackware. Unfortunately, xz does not have a man page at the time of this writing, so to view available options, use the –help argument. Compressing files is accomplished with the -z argument, and decompression with -d.

darkstar:~$ xz -z /tmp/large_file

tar

So great, we know how to compress files using all sorts of programs, but none of them can archive files in the way that zip does. That is until now. The Tape Archiver, or tar(1) is the most frequently used archival program in Slackware. Like other archival programs, tar generates a new file that contains other files and directories. It does not compress the generated file (often called a “tarball”) by default; however, the version of tar included in Slackware supports a variety of compression schemes, including the ones mentioned above.

Invoking tar can be as easy or as complicated as you like. Typically, creating a tarball is done with the -cvzf arguments. Let's look at these in depth.

tar Arguments

Argument | Meaning
c | Create a tarball
x | Extract the contents of a tarball
t | Display the contents of a tarball
v | Be more verbose
z | Use gzip compression
j | Use bzip2 compression
J | Use LZMA compression
p | Preserve permissions

tar requires a bit more precision than other applications in the order of its arguments. The -f argument must be present when reading or writing to a file for example, and the very next thing to follow must be the filename. Consider the following examples.

darkstar:~$ tar -xvzf /tmp/tarball.tar.gz
darkstar:~$ tar -xvfz /tmp/tarball.tar.gz

Above, the first example works as you would expect, but the second fails because tar has been instructed to open the z file rather than the expected /tmp/tarball.tar.gz.

Now that we've got our arguments straightened out, lets look at a few examples of how to create and extract tarballs. As we've noted, the -c argument is used to create tarballs and -x extracts their contents. If we want to create or extract a compressed tarball though, we also have to specify the proper compression to use. Naturally, if we don't want to compress the tarball at all, we can leave these options out. The following command creates a new tarball using the gzip compression alogrithm. While it's not a strict requirement, it's also good practice to add the .tar extension to all tarballs as well as whatever extension is used by the compression algorithm.

darkstar:~$ tar -czf /tmp/tarball.tar.gz /tmp/tarball/

Reading Documents

Traditionally, UNIX and UNIX-like operating systems are filled with text files that at some point in time the system's users are going to want to read. Naturally, there are plenty of ways of reading these files, and we'll show you the most common ones.

In the early days, if you just wanted to see the contents of a file (any file, whether it was a text file or some binary program) you would use cat(1) to view them. cat is a very simple program, which takes one or more files, concatenates them (hence the name) and sends them to the standard output, which is usually your terminal screen. This was fine when the file was small and wouldn't scroll off the screen, but inadequate for larger files as it had no built-in way of moving within a document and reading it a paragraph at a time. Today, cat is still used quite extensively, but predominately in scripts or for joining two or more files into one.

darkstar:~$ cat /etc/slackware-version
Slackware 14.0

Given the limitations of cat some very intelligent people sat down and began to work on an application to let them read documents one page at a time. Naturally, such applications began to be known as “pagers”. One of the earliest of these was more(1), named because it would let you see “more” of the file whenever you wanted.

more

more will display the first few lines of a text file until your screen is full, then pause. Once you've read through that screen, you can proceed down one line by pressing ENTER, or an entire screen by pressing SPACE, or by a specified number of lines by typing a number and then the SPACE bar. more is also capable of searching through a text file for keywords; once you've displayed a file in more, press the / key and enter a keyword. Upon pressing ENTER, the text will scroll until it finds the next match.

This is clearly a big improvement over cat, but still suffers from some annoying flaws; more is not able to scroll back up through a piped file to allow you to read something you might have missed, the search function does not highlight its results, there is no horizontal scrolling, and so on. Clearly a better solution is possible.

In fact, modern versions of more, such as the one shipped with Slackware, do feature a back function via the b key. However, the function is only available when opening files directly in more; not when a file is piped to more.

less

In order to address the short-comings of more, a new pager was developed and ironically dubbed less(1). less is a very powerful pager that supports all of the functions of more while adding lots of additional features. To begin with, less allows you to use your arrow keys to control movement within the document.

Due to its popularity, many Linux distributions have begun to exclude more in favor of less. Slackware includes both. Moreover, Slackware also includes a handy little pre-processor for less called lesspipe.sh. This allows a user to execute less on a number of non-text files. lesspipe.sh will generate text output from running a command on these files, and display it in less.

Less provides nearly as much functionality as one might expect from a text editor without actually being a text editor. Movement line-by-line can be done vi-style with j and k, or with the arrow keys, or ENTER. In the event that a file is too wide to fit on one screen, you can even scroll horizontally with the left and right arrow keys. The g key takes you to the top of the file, while G takes you to the end.

Searching is done as with more, by typing the / key and then your search string, but notice how the search results are highlighted for you, and typing n will take you to the next occurrence of the result while N takes you to the previous occurrence.

Also as with more, files may be opened directly in less or piped to it:

darkstar:~$  less
/usr/doc/less:/README
darkstar:~$  cat
/usr/doc/less:/README
/usr/doc/util-linux:/README | less

There is much more to less; from within the application, type h for a full list of commands.

Linking

Links are a method of referring to one file by more than one name. By using the ln(1) application, a user can reference one file with more than one name. The two files are not carbon-copies of one another, but rather are the exact same file, just with a different name. To remove the file entirely, all of its names must be deleted. (This is actually the result of the way that rm and other tools like it work. Rather than remove the contents of the file, they simply remove the reference to the file, freeing that space to be re-used. ln will create a second reference or “link” to that file.)

darkstar:~$ ln /etc/slackware-version foo
darkstar:~$ cat foo
Slackware 14.0
darkstar:~$ ls -l /etc/slackware-version foo
-rw-r--r-- 1 root root 17 2007-06-10 02:23 /etc/slackware-version
-rw-r--r-- 1 root root 17 2007-06-10 02:23 foo

Another type of link exists, the symlink. Symlinks, rather than being another reference to the same file, are actually a special kind of file in their own right. These symlinks point to another file or directory. The primary advantage of symlinks is that they can refer to directories as well as files, and they can span multiple filesystems. These are created with the -s argument.

darkstar:~$ ln -s /etc/slackware-version foo
darkstar:~$ cat foo
Slackware 140
darkstar:~$ ls -l /etc/slackware-version foo
-rw-r--r-- 1 root root 17 2007-06-10 02:23 /etc/slackware-version
lrwxrwxrwx 1 root root 22 2008-01-25 04:16 foo -> /etc/slackware-version

When using symlinks, remember that if the original file is deleted, your symlink is useless; it simply points at a file that doesn't exist anymore.

Chapter Navigation

Previous Chapter: Booting[4083]

Next Chapter: The Bourne Again Shell[4084]

Sources

Original source: http://www.slackbook.org/beta[4085]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, shell, archive, filesystem

The Bourne Again Shell

What Is A Shell?

Yeah, what exactly is a shell? Well, a shell is basically a command-line user environment. In essence, it is an application that runs when the user logs in and allows him to run additional applications. In some ways it is very similar to a graphical user interface, in that it provides a framework for executing commands and launching programs. There are many shells included with a full install of Slackware, but in this book we're only going to discuss bash(1), the Bourne Again Shell. Advanced users might want to consider using the powerful zsh(1), and users familiar with older UNIX systems might appreciate ksh. The truly masochistic might choose the csh, but new users should stick to bash.

Environment Variables

All shells make certain tasks easier for the user by keeping track of things in environment variables. An environment variable is simply a shorter name for some bit of information that the user wishes to store and make use of later. For example, the environment variable PS1 tells bash how to format its prompt. Other variables may tell applications how to run. For example, the LESSOPEN variable tells less to run that handy lesspipe.sh preprocessor we talked about, and LS_OPTIONS tuns on color for ls.

Setting your own envirtonment variables is easy. bash includes two built-in functions for handling this: set and export. Additionally, an environment variable can be removed by using unset. (Don't panic if you accidently unset an environment variable and don't know what it would do. You can reset all the default variables by logging out of your terminal and logging back in.) You can reference a variable by placing a dollar sign ($) in front of it.

darkstar:~$ set FOO=bar
darkstar:~$ echo $FOO
bar

The primary difference between set and export is that export will (naturally) export the variable to any sub-shells. (A sub-shell is simply another shell running inside a parent shell.) You can easily see this behavior when working with the PS1 variable that controls the bash prompt.

darkstar:~$ set PS1='FOO '
darkstar:~$ export PS1='FOO '
FOO

There are many important environment variables that bash and other shells use, but one of the most important ones you will run across is PATH. PATH is simply a list of directories to search through for applications. For example, top(1) is located at /usr/bin/top. You could run it simply by specifying the complete path to it, but if /usr/bin is in your PATH variable, bash will check there if you don't specify a complete path one your own. You will most likely first notice this when you attempt to run a program that is not in your PATH as a normal user, for instance, ifconfig(8).

darkstar:~$ ifconfig
bash: ifconfig: command not found
darkstar:~$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin:.

Above, you see a typical PATH for a mortal user. You can change it on your own the same as any other environment variable. If you login as root however, you'll see that root has a different PATH.

darkstar:~$ su -
Password:
darkstar:~# echo $PATH
/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/games:/opt/www/htdig/bin

Wildcards

Wildcards are special characters that tell the shell to match certain criteria. If you have experience with DOS, you'll recognize * as a wildcard that matches anything. bash makes use of this wildcard and several others to enable you to easily define exactly what you want to do.

This first and most common of these is, of course, *. The asterisk matches any character or combination of characters, including none. Thus b* would match any files named b, ba, bab, babc, bcdb, and so forth. Slightly less common is the ?. This wildcard matches one instance of any character, so b? would match ba and bb, but not b or bab.

darkstar:~$ touch b ba bab
darkstar:~$ ls *
b ba bab
darkstar:~$ ls b?
ba

No, the fun doesn't stop there! In addition to these two we also have the bracket pair “[ ]” which allows us to fine tune exactly what we want to match. Whenever bash see the bracket pair, it substitutes the contents of the bracket. Any combination of letters or numbers may be specified in the bracket as long as they are comma seperated. Additionally, ranges of numbers and letters may be specified as well. This is probably best shown by example.

darkstar:~$ ls a[1-4,9]
a1 a2 a3 a4 a9

Since Linux is case-sensitive, capital and lower-case letters are treated differently. All capital letters come before all lower-case letters in “alphabetical” order, so when using ranges of capital and lower-case letters, make sure to get them right.

darkstar:~$ ls 1[W-b]
1W 1X 1Y 1Z 1a 1b
darkstar:~$ ls 1[w-B]
/bin/ls: cannot access 1[b-W]: No such file or directory

In the second example, 1[b-W] isn't a valid range, so the shell treats it as a filename, and since that file doesn't exist, ls tells you so.

Tab Completion

Still think there's entirely too much work involved with using wildcards? You're right. There's an even easier way when you're dealing with long filenames: tab completion. Tab completion enables you to type just enough of the filename to uniquely identify it, then by hitting the TAB key, bash will fill in the rest for you. Even if you haven't typed in enough text to uniquely identify a filename, the shell will fill in as much as it can for you. Hitting TAB a second time will make it display a list of all possible matches for you.

Input and Output Redirection

One of the defining features of Linux and other UNIX-like operating systems is the number of small, relatively simple applications and the ability to stack them together to create complex systems. This is achieved by redirecting the output of one program to another, or by drawing input from a file or second program.

To get started, we're going to show you how to redirect the output of a program to a file. This is easily done with the '>' character. When bash sees the '>' character, it redirects all of the standard output (also known as stdout) to whatever file name follows.

darkstar:~$ echo foo
foo
darkstar:~$ echo foo > /tmp/bar
darkstar:~$ cat /tmp/bar
foo

In this example, we show you what echo would do if its stdout was not redirected to a file, then we re-direct it to the /tmp/bar file. If /tmp/bar does not exist, it is created and the output from echo is placed within it. If /tmp/bar did exist, then its contents are over-written. This might not be the best idea if you want to keep those contents in place. Thankfully, bash supports '»' which will append the output to the file.

darkstar:~$ echo foo
foo
darkstar:~$ echo foo > /tmp/bar
darkstar:~$ cat /tmp/bar
foo
darkstar:~$ echo foo2 >> /tmp/bar
darkstar:~$ cat /tmp/bar
foo
foo2

You can also re-direct the standard error (or stderr) to a file. This is slightly different in that you must use '2>' instead of just '>'. (Since bash can re-direct input, stdout, and stderr, each must be uniquely identifiable. 0 is input, 1 is stdout, and 2 is stderr. Unless one of these is specified, bash will make its best guess as to what you actually meant, and assumed anytime you use '>' you only want to redirect stdout. 1> would have worked just as well.)

darkstar:~$ rm bar
rm: cannot remove `bar': No such file or directory
darkstar:~$ rm bar 2> /tmp/foo
darkstar:~$ cat /tmp/foo
rm: cannot remove `bar': No such file or directory

You may also redirect the standard input (known as stdin) with the '<' character, though it's not used very often.

darkstar:~$ fromdos < dosfile

Finally, you can actually redirect the output of one program as input to another. This is perhaps the most useful feature of bash and other shells, and is accomplished using the '|' character. (This character is referred to as 'pipe'. If you here some one talk of piping one program to another, this is exactly what they mean.)

darkstar:~$ ps auxw | grep getty
root      2632  0.0  0.0   1656   532 tty2     Ss+  Feb21   0:00 /sbin/agetty 38400 tty2 linux
root      3199  0.0  0.0   1656   528 tty3     Ss+  Feb15   0:00 /sbin/agetty 38400 tty3 linux
root      3200  0.0  0.0   1656   532 tty4     Ss+  Feb15   0:00 /sbin/agetty 38400 tty4 linux
root      3201  0.0  0.0   1656   532 tty5     Ss+  Feb15   0:00 /sbin/agetty 38400 tty5 linux
root      3202  0.0  0.0   1660   536 tty6     Ss+  Feb15   0:00 /sbin/agetty 38400 tty6 linux

Task Management

bash has yet another cool feature to offer, the ability to suspend and resume tasks. This allows you to temporarily halt a running process, perform some other task, then resume it or optionally make it run in the background. Upon pressing CTRL+z, bash will suspend the running process and return you to a prompt. You can return to that process later. Additionally, you can suspend multiple processes in this way indefinitely. The jobs built-in command will display a list of suspended tasks.

darkstar:~$ jobs
[1]-  Stopped                 vi TODO
[2]+  Stopped                 vi chapter_05.xml

In order to return to a suspended task, run the fg built-in to bring the the most recently suspended task back into the foreground. If you have mutiple suspended tasks, you can specify a number as well to bring one of them to the foreground.

darkstar:~$ fg # "vi TODO"
darkstar:~$ fg 1 # "vi chapter_05.xml"

You can also background a task with (surprize) bg. This will allow the process to continue running without maintaining control of your shell. You can bring it back to the foreground with fg in the same way as suspended tasks.

Terminals

Slackware Linux and other UNIX-like operating systems allow users to interact with them in many ways, but the most common, and arguably the most useful, is the terminal. In the old days, terminals were keyboards and monitors (sometimes even mice) wired into a mainframe or server via serial connections. Today however, most terminals are virtual; that is, they exist only in software. Virtual terminals allow users to connect to the computer without requiring expensive and often incompatible hardware. Rather, a user needs only to run the software and they are presented with a (usually) highly customizable virtual terminal.

The most common virtual terminals (in that every Slackware Linux machine is going to have at least one) are the gettys. agetty(8) runs six instances by default on Slackware, and allows local users (those who can physically sit down in front of the computer and type at the keyboard) to login and run applications. Each of these gettys is available on different tty devices that are accessible seperately by pressing the ALT key and one of the function keys from F1 through F6. Using these gettys allows you to login multiple times, perhaps as different users, and run applications in those users' shells silmutaneously. This is most commonly done with servers which do not have X installed, but can be done on any machine.

On desktops, laptops, and other workstations where the user prefers a graphical interface provided by X, most terminals are graphical. Slackware includes many different graphical terminals, but the most commonly used are KDE's konsole and XFCE's Terminal(1) as well as the old standby, xterm(1). If you are using a graphical interface, check your tool bars or menus. Each desktop environment or window manager has a virtual terminal (often called a terminal emulater), and they are all labelled differently. Typically though, you will find them under a “System” sub-menu in desktop environments. Executing any of these will give you a graphical terminal and automatically run your default shell.

Customization

By now you should be pretty familiar with bash and you may have even noticed some odd behavior. For example, when you login at the console, you're presented with a prompt that looks a bit like this.

alan@darkstar:~$

However, sometimes you'll see a much less helpful prompt like this one.

bash-3.1$

The cause here is a special environment variable that controls the bash prompt. Some shells are considered “login” shells and others are “interactive” shells, and both types read different configuration files when started. Login shells read /etc/profile and ~/.bash_profile when executed. Interactive shells read ~/.bashrc instead. This has some advantages for power users, but is a common annoyance for many new users who want the same environment anytime they execute bash and don't care about the difference between login and interactive shells. If this applies to you, simply edit your own ~/.bashrc file and include the following lines. (For more information on the different configuration files used, read the INVOCATION section of the bash man page.)

# ~/.bashrc
. /etc/profile
. ~/.bash_profile

When using the above, all your login and interactive shells will have the same environment settings and behave identically. Now, anytime we wish to customize a shell setting, we only have to edit ~/.bash_profile for user-specific changes and /etc/profile for global settings. Let's start by configuring the prompt.

bash prompts come in all shapes, colors, and sizes, and every user has their own preferances. Personally, I prefer short and simple prompts that take up a minimum of space, but I've seen and used mutli-line prompts many times. One personal friend of mine even included ASCII-art in his bash prompt. To change your prompt you need only to change your PS1 variable. By default, Slackware attempts to configure your PS1 variable thusly:

darkstar:~$ echo $PS1
\u@\h:\w\$

Yes, this tiny piece of funny-looking figures controls your bash prompt. Basicaly, every character in the PS1 variable is included in the prompt, unless it is a escaped by a \, which tells bash to interpret it. There are many different escape sequences and we can't discuss them all, but I'll explain these. The first “\u” translates to the username of the current user. “\h” is the hostname of the machine the terminal is attached to. “\w” is the current working directory, and “\$” displays either a # or a $ sign, depending on whether or not the current user is root. A complete listing of all prompt escape sequences is listed in the bash man page under the PROMPTING section.

Since we've gone through all this trouble to discuss the default prompt, I thought I'd take some time to show you a couple example prompts and the PS1 variable values needed to use them.

Wed Jan 14 12:08 AM
alan@raven:~$ echo $PS1
\d \@\n\u@\h:\w$
HOST: raven - JOBS: 0 - TTY: 3
alan@~/Desktop/sb_3.0:$ echo $PS1
HOST: \H - JOBS: \j - TTY: \l\n\u@\w:\$

For even more information on configuring your bash prompt, including information on setting up colored prompts, refer to /usr/doc/Linux-HOWTOs/Bash-Prompt-HOWTO. After reading that for a short while, you'll get an idea of just how powerful your bash prompts can be. I once even had a prompt that gave me up to date weather information such as temperature and barometric pressure!

Chapter Navigation

Previous Chapter: Basic Shell Commands[4086]

Next Chapter: Process Control[4087]

Sources

Original source: http://www.slackbook.org/beta[4088]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, bash, task management, terminals

Installation

Slackware's installation is a bit more simplistic than that of most other Linux distributions and is very reminiscent of installing one of the varieties of BSD operating systems. If you're familiar with those, you should feel right at home. If you've never installed Slackware or have only used distributions that make use of graphical installers, you may feel a bit overwhelmed at first. Don't panic! The installation is very easy once you understand it, and it works on just about any x86 or x86_64 platform.

The latest versions of Slackware Linux are distributed on DVD or CD media, but Slackware can be installed in a variety of other ways. We're only going to focus on the most common method - booting from a DVD - in this book. If you don't have a CD or DVD drive, you might wish to take a look at the various README files inside the usb-and-pxe-installers directory at your favorite Slackware mirror. This directory includes the necessary files and instructions for booting the Slackware installer from a USB flash drive or from a network card that support PXE. The files there are the best source of information available for such boot methods.

Booting the Installer

Booting the installer is simply a process of inserting the Slackware install disk into your CD or DVD drive and rebooting. You may have to enter your computer's BIOS and alter the boot order to place the optical drive at a higher boot priority than your hard drives. Some computers allow you to change the boot order on the fly by pressing a specific function key during system boot-up. Since every computer is different, we can't offer instructions on how to do this, but the method is simple on nearly all machines.

Once your computer boots from the CD you'll be taken to a screen that allows you to enter any special kernel parameters. This is here primarily to allow you to use the installer as a sort of rescue disk. Some systems may need special kernel parameters in order to boot, but these are very rare exceptions to the norm. Most users can simply press enter to let the kernel boot.

Welcome to Slackware version 14.0 (Linux kernel 3.2.27)!
If you need to pass extra parameters to the kernel, enter them at the prompt
below after the name of the kernel to boot (huge.s etc).
In a pinch, you can boot your system from here with a command like:
boot: huge.s root=/dev/sda1 rdinit= ro
In the example above, /dev/sda1 is the / Linux partition.
To test your memory with memtest86+, enter memtest on the boot line below.
This prompt is just for entering extra parameters.  If you don't need to enter
any parameters, hit ENTER to boot the default kernel "huge.s" or press [F2]
for a listing of more kernel choices.

After pressing ENTER you should see a lot of text go flying across your screen. Don't be alarmed, this is all perfectly normal. The text you see is generated by the kernel during boot-up as it discovers your hardware and prepares to load the operating system (in this case, the installer). You can later read these messages with the dmesg(1) command if you're interested. Often these messages are very important for troubleshooting any hardware problems you may have. Once the kernel has completed its hardware discovery, the messages should stop and you'll be given an option to load support for non-us keyboards.

<OPTION TO LOAD SUPPORT FOR NON-US KEYBOARD>
If you are not using a US keyboard, you may need to load a different
keyboard map.  To select a different keyboard map, please enter 1
now.  To continue using the US map, just hit enter.
Enter 1 to select a keyboard map: _

Entering 1 and pressing ENTER will give you a list of keyboard mappings. Simply select the mapping that matches your keyboard type and continue on.

Welcome to the Slackware Linux installation disk! (version 14.0)
######  IMPORTANT!  READ THE INFORMATION BELOW CAREFULLY.  ######
- You will need one or more partitions of type 'Linux' prepared.  It is also
recommended that you create a swap partition (type 'Linux swap') prior
to installation.  For more information, run 'setup' and read the help file.
- If you're having problems that you think might be related to low memory, you
can try activating a swap partition before you run setup.  After making a
swap partition (type 82) with cfdisk or fdisk, activate it like this:
mkswap /dev/<partition> ; swapon /dev/<partition>
- Once you have prepared the disk partitions for Linux, type 'setup' to begin
the installation process.
- If you do not have a color monitor, type:  TERM=vt100
before you start 'setup'.
You may now login as 'root'.
slackware login: root

Unlike other Linux distributions which boot you directly into a dedicated installer program, Slackware's installer places you in a limited Linux distribution loaded into your system's RAM. This limited distribution is then used to run all the installation programs manually, or can be used in emergencies to fix a broken system that fails to boot. Now that you're logged in as root (there is no password within the installer) it's time to start setting up your disks. At this point, you may setup software RAID or LVM support if you wish or even an encrypted root partition, but those topics are outside of the scope of this book. I encourage you to refer to the excellent README_RAID.TXT, README_LVM.TXT, and README_CRYPT.TXT files on your CD if you desire to setup your system with these advanced tools. Most users won't have any need to do so and should proceed directly to partitioning.

Partitioning

Unlike many other Linux distributions, Slackware does not make use of a dedicated graphical disk partitioning tool in its installer. Rather, Slackware makes use of the traditional Linux partitioning tools, the very same tools that you will have available once you've installed Slackware. Traditionally, partitioning is performed with either fdisk(8) or cfdisk(8), both of which are console tools. cfdisk is preferred by many people because it is curses menu-based, but either works well. Additionally, Slackware includes sfdisk(8) and gdisk(8). These are more powerful command-line partitioning tools. gdisk is required to alter GUID partition tables found on some of today's larger hard drives. In this book, we're going to focus on using fdisk, but the other tools are similar. You can find additional instructions for using these other tools online or in their man pages.

In order to partition your hard drive, you'll first need to know how to identify it. In Linux, all hardware is identified by a special file called a device file. These are (typically) located in the /dev directory. Nearly all hard drives today, are identified as SCSI hard drives by the kernel, and as such, they'll be assigned a device node such as /dev/sda. (Once upon a time each hard drive type had its own unique identifier such as /dev/hda for the first IDE drive. Over the years the kernel's SCSI subsystem morphed into a generic drive access system and came to be used for all hard disks and optical drives no matter how they are connected to your computer. If you think this is confusing, imagine what it would be like if you had a system with a SCSI hard drive, a SATA CD-ROM, and a USB memory stick, all with unique subsystem indentifiers. The current system is not only cleaner, but performs better as well.)

If you don't know which device node is assigned to your hard drive, fdisk can help you find out.

root@slackware:/# fdisk -l
Disk /dev/sda: 72.7 GB, 72725037056 bytes
255 heads, 63 sectors/track, 8841 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Here, you can see that my system has a hard drive located at /dev/sda that is 72.7 GB in size. You can also see some additional information about this hard drive. The -l argument to fdisk tells it to display the hard drives and all the partitions it finds on those drives, but it won't make any changes to the disks. In order to actually partition our drives, we'll have to tell fdisk the drive on which to operate.

root@slackware:/# fdisk /dev/sda
The number of cylinders for this disk is set to 8841.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help):

Now we've told fdisk what disk we wish to partition, and it has dropped us into command mode after printing an annoying warning message. The 1024 cylinder limit has not been a problem for quite some time, and Slackware's boot loader will have no trouble booting disks larger than this. Typing m and pressing ENTER will print out a helpful message telling you what to do with fdisk.

Command (m for help): m
Command action
a   toggle a bootable flag
b   edit bsd disklabel
c   toggle the dos compatibility flag
d   delete a partition
l   list known partition types
m   print this menu
n   add a new partition
o   create a new empty DOS partition table
p   print the partition table
q   quit without saving changes
s   create a new empty Sun disklabel
t   change a partition's system id
u   change display/entry units
v   verify the partition table
w   write table to disk and exit
x   extra functionality (experts only)

Now that we know what commands will do what, it's time to begin partitioning our drive. At a minimum, you will need a single / partition, and you should also create a swap partition. You might also want to make a separate /home partition for storing user files (this will make it easier to upgrade later or to install a different Linux operating system by keeping all of your users' files on a separate partition). Therefore, let's go ahead and make three partitions. The command to create a new partition is n (which you noticed when you read the help).

Command: (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-8841, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-8841, default 8841): +8G
Command (m for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (975-8841, default 975): 975
Last cylinder or +size or +sizeM or +sizeK (975-8841, default 8841): +1G

Here we have created two partitions. The first is 8GB in size, and the second is only 1GB. We can view our existing partitions with the p command.

 Command (m for help): p
Disk /dev/sda: 72.7 GB, 72725037056 bytes
255 heads, 63 sectors/track, 8841 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot       Start      End          Blocks   Id  System
/dev/sda1                1      974         7823623+  83  Linux
/dev/sda2              975     1097          987997+  83  Linux

Both of these partitions are of type “83” which is the standard Linux filesystem. We will need to change /dev/sda2 to type “82” in order to make this a swap partition. We will do this with the t argument to fdisk.

Command (m for help): t
Partition number (1-4): 2
Hex code (type L to list codes): 82
Command (me for help): p
Disk /dev/sda: 72.7 GB, 72725037056 bytes
255 heads, 63 sectors/track, 8841 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot       Start      End          Blocks   Id  System
/dev/sda1                1      974         7823623+  83  Linux
/dev/sda2              975     1097          987997+  82  Linux swap

The swap partition is a special partition that is used for virtual memory by the Linux kernel. If for some reason you run out of RAM, the kernel will move the contents of some of the RAM to swap in order to prevent a crash. The size of your swap partition is up to you. A great many people have participated in a great many flamewars on the size of swap partitions, but a good rule of thumb is to make your swap partition about twice the size of your system's RAM. Since my machine has only 512MB of RAM, I decided to make my swap partition 1GB. You may wish to experiment with your swap partition's size and see what works best for you, but generally there is no harm in having “too much” swap. If you plan to use hibernation (suspend to disk), you will need to have at least as much swap space as you have physical memory (RAM), so keep that in mind.

At this point we can stop, write these changes to the disk, and continue on, but I'm going to go ahead and make a third partition which will be mounted at /home.

Command: (me for help): n
Command action
e   extended
p   primary partition (1-4)
p
Partition number (1-4): 3
First cylinder (1098-8841, default 1098): 1098
Last cylinder or +size or +sizeM or +sizeK (1098-8841, default 8841): 8841

Now it's time to finish up and write these changes to disk.

Command: (me for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@slackware:/#

At this point, we are done partitioning our disks and are ready to begin the setup program. However, if you have created any extended partitions, you may wish to reboot once to ensure that they are properly read by the kernel.

The setup Program

Now that you've created your partitions it's time to run the setup program to install Slackware. setup will handle formatting partitions, installing packages, and running basic configuration scripts step-by-step. In order to do so, just type setup at your shell prompt.

Help

If you've never installed Slackware before, you can get a very basic over-view of the Slackware installer by reading the Help menu. Most of the information here is on navigating through the installer which should be fairly intuitive, but if you've never used a curses-based program before you may find this useful.

Keymap

Before we go any further, Slackware gives you the opportunity to select a different mapping for your keyboard. If you're using a standard US keyboard you can safely skip this step, but if you're using an international keyboard you will want to select the correct mapping now. This ensures that the keys you press on your keyboard will do exactly what you expect them to do.

Addswap

If you created a swap partition, this step will allow you to enable it before running any memory-intensive activities like installing packages. swap space is essentially virtual memory. It's a hard drive partition (or a file, though Slackware's installer does not support swap files) where regions of active system memory get copied when your computer is out of useable RAM. This lets the computer “swap” programs in and out of active RAM, allowing you to use more memory than your computer actually has. This step will also add your swap partition to /etc/fstab so it will be available to your OS.

Target

Our next step is selecting our root partition and any other partitions we'd like Slackware to utilize. You'll be given a choice of filesystems to use and whether or not to format the partition. If you're installing to a new partition you must format it. If you have a partition with data on it you'd like to save, don't. For example, many users have a seperate /home partition used for user data and elect not to format it on install. This lets them install newer versions of Slackware without having to backup and restore this data.

Source

Here you'll tell the installer where to find the Slackware packages. The most common method is to use the Slackware install DVD or CDs, but various other options are available. If you have your packages installed to a partition that you setup in the previous step, you can install from that partition or a pre-mounted directory. (You may need to mount that partition with mount(8) first. See chapter 11 for more details.) Additionally, Slackware offers a variety of networked options such as NFS shares, FTP, HTTP, and Samba. If you select a network installation, Slackware will prompt you for TCP/IP information first. We're only going to discuss installation from the DVD, but other methods are similar and straightforward.

Select

One unique feature of Slackware is its manner of dividing packages into disksets. At the beginning of time, network access to FTP servers was available only through incredibly slow 300 baud modems, so Slackware was split into disk sets that would fit onto floppy disks so users could download and install only those packages they were interested in. Today that practice continues and the installer allows you to chose which sets to install. This allows you to easily skip packages you may not want, such as X and KDE on headless servers or Emacs on everything. Please note that the “A” series is always required.

Install

Finally we get to the meat of the installer. At this stage, Slackware will ask you what method to use to chose packages. If this is your first time installing Slackware, the “full” method is highly recommended. Even if this isn't your first time, you'll probably want to use it anyway.

The “menu” and “expert” options allow you to choose individual packages to install and are of use to skilled users familiar with the OS. These methods allow such users to quickly prune packages from the installer to build a very minimal system. If you don't know what you're doing (sometimes even if you do) you're likely to leave out crucial pieces of software and end up with a broken system.

The “newbie” method can be very helpful to a new user, but takes a very long time to install. This method will install all the required packages, then prompt you individually for every other package. The big advantage here is that is pauses and gives you a brief overview of the package contents. For a new user, this introduction into what is included with Slackware can be informative. For most other users it is a long and tedious process.

The “custom” and “tagpath” options should only be used by people with the greatest skill and expertise with Slackware. These methods allow the user to install packages from custom tagfiles. Tagfiles are only rarely used. We won't discuss them in this book.

Configure

Once all the packages are installed you're nearly finished. At this stage, Slackware will prompt you with a variety of configuration tasks for your new operating system. Many of these are optional, but most users will need to set something up here. Depending on the packages you've installed, you may be offered different configuration options than the ones shown here, but we've included all the really important ones.

The first thing you'll likely be prompted to do is setup a boot disk. In the past this was typically a 1.44MB floppy disk, but today's Linux kernel is far too large to fit on a single floppy, so Slackware offers to create a bootable USB flash memory stick. Of course, your computer must support booting from USB in order to use a USB boot stick (most modern computers do). If you do not intend to use LILO or another traditional boot loader, you should consider making a USB boot stick. Please note that doing so will erase the contents of whatever memory stick you're using, so be careful.

Nearly everyone will need to setup the LInux LOader, LILO. LILO is in charge of booting the Linux kernel and connecting to an initrd or the root filesystem. Without it (or some other boot loader), your new Slackware operating system will not boot. Slackware offers a few options here. The “simple” method attempts to automatically configure LILO for your computer, and works well with very simple systems. If Slackware is the only operating system on your computer, it should configure and install LILO for you without any hassels. If you don't trust the simpler method to work, or if you want to take an in-depth look at how to configure LILO, the “expert” method is really not all that complicated. This method will take you through each step and offer to setup dual-boot for Windows and other Linux operating systems. It also allows you to append kernel command parameters (most users will not need to specify any though).

LILO is a very important part of your Slackware system, so an entire section of the next chapter is devoted to it. If you're having difficulty configuring LILO at this stage, you may want to skip ahead and read Chapter 3 first, then return here.

This simple step allows you to configure and activate a console mouse for use outside of the graphical desktops. By activating a console mouse, you'll be able to easily copy and paste from within the Slackware terminal. Most users will need to choose one of the first three options, but many are offered, and yes those ancient two-button serial mice do work.

The next stage in configuring your install is the network configuration. If you don't wish to configure your network at this stage, you may decline, but otherwise you'll be prompted to provide a hostname for your computer. If you're unsure what to do here, you might want to read through Networking|Chapter 14, Networking[4089] first.

The following screens will prompt you first for a hostname, then for a domainname, such as example.org. The combination of the hostname and the domainname can be used to navigate between computers in your network if you use an internal DNS service or maintain your /etc/hosts file. If you skip setting up your network, Slackware will name your computer “darkstar” after a song by the Grateful Dead.

You have three options when setting your IP address; you may assign it a static IP, use DHCP, or configure a loopback connection. The simplest option, and probably the most common for laptops or computers on a basic network, is to let a DHCP server assign IP addresses dynamically. Unless you are installing Slackware for use as a network server, you probably do not need to setup a static IP address. If you're not sure which of these options to choose, pick DHCP.

Rarely DHCP servers requires you specify a DHCP hostname before you're permitted to connect. You can enter this on the Set DHCP Hostname screen. This is almost always be the same hostname you entered earlier.

If you choose to set a static IP address, Slackware will ask you to enter it along with the netmask, gateway IP address, and what nameserver to use.

The final screen during static IP address configuration is a confirmation screen, where you're permitted to accept your choices, edit them, or even restart the IP address configuration in case you decide to use DHCP instead.

Once your network configuration is completed Slackware will prompt you to configure the startup services that you wish to run automatically upon boot. Helpful descriptions of each service appear both to the right of the service name as well as at the bottom of the screen. If you're not sure what to turn on, you can safely leave the defaults in place. What services are started at boot time can be easily modified later with pkgtool.

Every computer needs to keep track of the current time, and with so many timezones around the world you have to tell Slackware which one to use. If your computer's hardware clock is set to UTC (Coordinated Universal Time), you'll need to select that; most hardware clocks are not set to UTC from the factory (though you could set it that way on your own; Slackware doesn't care). Then simply select your timezone from the list provided and off you go.

If you installed the X disk set, you'll be prompted to select a default window manager or desktop environment. What you select here will apply to every user on your computer, unless that user decides to run xwmconfig(1) and choose a different one. Don't be alarmed if the options you see below do not match the ones Slackware offers you. xwmconfig only offers choices that you installed. So for example, if you elected to skip the “KDE” disk set, KDE will not be offered.

The last configuration step is setting a root password. The root user is the “super user” on Slackware and all other UNIX-like operating systems. Think of root as the Administrator user. root knows all, sees all, and can do all, so setting a strong root password is just common sense.

With this last step complete, you can now exit the Slackware installer and reboot with a good old CTRL + ALT + DELETE. Remove the Slackware installation disk, and if you performed all the steps correctly, your computer will boot into your new Slackware linux system. If something went wrong, you probably skipped the LILO configuration step or made an error there somehow. Thankfully, the next chapter should help you sort that out.

When you have rebooted into your new Slackware installation, the very first step you should take is to create a user. By default, the only user that exists after the install is the root user, and it's dangerous to use your computer as root, given that there are no restrictions as to what that user can do.

The quickest and easiest way to create a normal user for yourself is to log in as root with the root password that you created at the end of the intallation process, and then issue the adduser command. This will interactively assist you in creating a user; see User and Group Management|the section called “Managing Users and Groups"[4090] for more information.

Chapter Navigation

Previous Chapter: Introduction[4091]

Next Chapter: Booting[4092]

Sources

Original source: http://www.slackbook.org/beta[4093]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, install, setup, partitioning

Networking

Netconfig

Computers aren't very interesting on their own. Sure, you can install games on them, but that just turns them into glorified entertainment consoles. Today, computers need to be able to talk to one another; they need to be networked. Whether you're installing a business network with hundreds or thousands of computers or just setting up a single PC for Internet access, Slackware is simple and easy. This chapter should teach you how to setup typical wired networks. Common wireless setup will be thoroughly discussed in the next section, but much of what you read here will be applicable there as well.

There are many different ways to configure your computer to connect to a network or the Internet, but they fall into two main categories: static and dymanic. Static addresses are solid; they are set with the understanding that they will not be changed, at least not anytime soon. Dynamic addresses are fluid; the assumption is that the address will change at some time in the future. Typically any sort of network server requires a static address simply so other machines will know where to contact it when they need services. Dynamic addresses tend to be used for workstations, Internet clients, and any machine that doesn't require a static address for any reason. Dynamic addresses are more flexible, but present complications of their own.

There are many different kinds of network protocols that you might encounter, but most people will only ever need to deal with Internet Protocol (IP). For that reason, we'll focus exclusively on IP in this book.

Manual Configuration

Ok, so you've installed Slackware, you've setup a desktop, but you can't get it to connect to the Internet or your business's LAN (local area network), what do you do? Fortunately, the answer to that question is simple. Slackware includes a number of tools to configure your network connection. The first we will look at is the very powerful ifconfig(8), which is used to setup or modify the configuration of the most common hardware for connecting to networks: a Network Interface Card (NIC or Ethernet Card). ifconfig is an incredibly powerful tool capable of doing much more than setting IP addresses. For a complete introduction, you should read its man page. For now, we're just going to use it to display and change the network addresses of some ethernet controllers.

darkstar:~# ifconfig
lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:699 errors:0 dropped:0 overruns:0 frame:0
TX packets:699 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:39518 (38.5 KiB)  TX bytes:39518 (38.5 KiB)
wlan0     Link encap:Ethernet  HWaddr 00:1c:b3:ba:ad:4c
inet addr:192.168.1.198  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::21c:b3ff:feba:ad4c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1630677 errors:0 dropped:0 overruns:0 frame:0
TX packets:1183224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1627370207 (1.5 GiB)  TX bytes:163308463 (155.7 MiB)
wmaster0  Link encap:UNSPEC  HWaddr 00-1C-B3-BA-AD-4C-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

As you can clearly see here, when run without any arguments, ifconfig will display all the information it has on all the ethernet cards (and wireless ethernet cards) present on your system. The above represents a typical wireless connection from my laptop, so don't be afraid if what you see on your system doesn't match. If you don't see any ethX or wlanX interfaces though, the interface may be down. To show all currently present NICs whether they are “up” or “down”, simply pass the -a argument.

darkstar:~# ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:19:e3:45:90:44
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:122780 errors:0 dropped:0 overruns:0 frame:0
TX packets:124347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:60495452 (57.6 MiB)  TX bytes:17185220 (16.3 MiB)
Interrupt:16
lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:699 errors:0 dropped:0 overruns:0 frame:0
TX packets:699 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:39518 (38.5 KiB)  TX bytes:39518 (38.5 KiB)
wlan0     Link encap:Ethernet  HWaddr 00:1c:b3:ba:ad:4c
inet addr:192.168.1.198  Bcast:192.168.1.255  Mask:255.255.255.0
inet6 addr: fe80::21c:b3ff:feba:ad4c/4 Scope:Link
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:1630677 errors:0 dropped:0 overruns:0 frame:0
TX packets:1183224 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1627370207 (1.5 GiB)  TX bytes:163308463 (155.7 MiB)
wmaster0  Link encap:UNSPEC  HWaddr 00-1C-B3-BA-AD-4C-00-00-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Notice that the eth0 interface is now listed among the returns. ifconfig can also change the current settings on a NIC. Typically, you would need to change the IP address and subnet mask, but you can change virtually any parameters.

darkstar:~# ifconfig eth0 192.168.1.1 netmask 255.255.255.0
darkstar:~# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:19:e3:45:90:44
inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
UP BROADCAST MULTICAST  MTU:1500  Metric:1
RX packets:122780 errors:0 dropped:0 overruns:0 frame:0
TX packets:124347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:60495452 (57.6 MiB)  TX bytes:17185220 (16.3 MiB)
Interrupt:16

If you look carefully, you'll notice that the interface now has the 192.168.1.1 IP address and a 255.255.255.0 subnet mask. We've now setup the basics for connecting to our network, but we still need to setup a default gateway and our DNS servers. In order to do that, we'll need to look at a few more tools.

Next on our stop through networking land is the equally powerful route(8). This tool is responsible for modifying the Linux kernel's routing table which affects all data transmission on a network. Routing tables can become immensely complex or they can be straight-forward and simple. Most users will only ever need to setup a default gateway, so we'll show you how to do that here. If for some reason you need a more complex routing table, you would be well advised to read the entire man page for route as well as consulting other sources. For now, let's take a look at our routing table immediately after setting up eth0.

darkstar:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo

I won't explain everything here, but the general information should be easy to pick up if you're familiar with networking at all. The Destination and Genmask fields specify a range of IP addresses to match. If a Gateway is defined, information in the form of packets will be sent to that host for forwarding. We also specify an interface in the final field that the information should traverse. Right now, we can only communicate with computers with addresses between 192.168.1.0 and 192.168.1.255 and ourselves through the loopback interface, a type of virtual NIC that is used for routing information from this computer to itself. In order to reach the rest of the world, we'll need to setup a default gateway.

darkstar:~# route add default gw 192.168.1.254
darkstar:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.254   0.0.0.0         UG    0      0        0 eth0

You should immediately notice the addition of a default route. This specifies what router should be used to reach any addresses that aren't specified elsewhere in our routing table. Now, when we try to connect to say, 64.57.102.34, the information will be sent to 192.168.1.254 which is responsible for delivering the data for us. Unfortunately, we're still not quite through. We need some way of converting domain names like slackware.com into IP addresses that the computer can use. For that, we need to make use of a DNS server.

Fortunately, setting up your computer to use an external (or even an internal) DNS server is very easy. You'll need to use your favorite text editor and open the /etc/resolv.conf file. Don't ask me what happened to the e. On my computer, resolv.conf looks like this.

# /etc/resolv.conf
search lizella.net
nameserver 192.168.1.254

Many users won't need the search line. This is used to map hostnames to domain names. Basically, if I attempt to connect to “barnowl”, the computer knows to look for “barnowl.lizella.net” thanks to this search line. We're mainly interested in the nameserver line. This tells Slackware what domain name servers (DNS) to connect to. Generally speaking, these should always be specified by IP address. If you know what DNS servers you should use, you can just add them one at a time to individual nameserver lines. In fact, I don't know of any practical limit to the number of nameservers that can be specified in resolv.conf, so add as many as you like. Once this is done, you should be able to communicate with other hosts via their fully qualified domain name.

But Alan! That's a lot of hard work! I don't want to do this time and again for dozens or even hundreds of machines. You're absolutely right, and that's why smarter people than you and me created DHCP. DHCP stands for Dynamic Host Control Protocol and is a method for automatically configuring computers with unique IP addresses, netmasks, gateways, and DNS servers. Most of the time, you'll want to use DHCP. The majority of wireless routers, DSL or cable modems, even firewalls all have DHCP servers to can make your life much easier. Slackware includes two main tools for connecting to an exising DHCP server and can even act as a DHCP server for other computers. For now though, we're just going to look at DHCP clients.

First on our list is dhcpcd(8), part of the ISC DHCP utilities. Assuming your computer is physically connected to your network, and that you have an operating DHCP server on that network, you can configure your NIC in one shot.

darkstar:~/ dhcpcd eth0

If everything went according to plan, your NIC should be properly configured, and you should be able to communicate with other computers on your network, and with the Internet at large. If for some reason, dhcpcd fails, you may want to try dhclient(8). dhclient is an alternative to dhcpcd and works in basically the same way.

darkstar:~/ dhclient eth0
Listening on LPF/eth0/00:1c:b3:ba:ad:4c
Sending on   LPF/eth0/00:1c:b3:ba:ad:4c
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.254
bound to 192.168.1.198 -- renewal in 8547 seconds.

Why does Slackware include two DHCP clients? Sometimes a particular DHCP server may be broken and not respond well to either dhcpcd or dhclient. In those cases, you can fall back to the other DHCP client in hopes of getting a valid response from the server. Traditionally, Slackware uses dhcpcd, and this works in the vast majority of cases, but it may become necessary at some point for you to use dhclient instead. Both are excellent DHCP clients, so use whichever you prefer.

Automatic Configuration with rc.inet1.conf

Manually configuring interfaces is an important skill to have, but it can become tedious. No one wants to manually setup their Internet connection every time the system boots. More importantly, you may not always have physical access to the machine when it boots. Slackware makes it easy to automatically configure ethernet (and wireless) cards at system startup with /etc/rc.d/rc.inet1.conf. For now, we're going to focus on traditional wired ethernet networking; the next chapter will discuss various wireless options.

rc.inet1.conf is an incredibly powerful configuration file, capable of configuring most of your network cards automatically when Slackware is started. The file is filled with useful comments, but there is also a man page that more thoroughly discusses its use. To begin, we're going to look at some of the options used on one of my personal machines.

# Config information for eth0:
IPADDR[0]="192.168.1.250"
NETMASK[=]"255.255.255.0"
USE_DHCP[0]=""
DHCP_HOSTNAME[0]=""
# Some lines ommitted.
GATEWAY="192.168.1.254"

This represents most of the information necessary to configure a static IP address on a single ethernet controller. netconfig will usually fill in these values for a single ethernet device for you. If you have multiple network cards in your machine and need all of them activated automatically at boot time, then you'll need to edit or add additional entries into this file in the same manner as above. First, let me go over some of the basics.

As you may have already guessed, IPADDR[n] is the Internet Protocol Address for the n network interface card. Typically, n corrosponds to eth0, eth1, and so on, but this isn't always the case. You can specify these values to pertain to a different network controller with the IFNAME[n] variable, but we will reserve that for wireless networking[4094], as it more commonly pertains to wireless network controllers.

Likewise, NETMASK[n] is the subnet mask to use for the network controller. If these lines are left empty, then static IP addresses will not be automatically assigned to this network controller. The USE_DHCP[n] variable tells Slackware (naturally) to use DHCP to configure the interface. DHCP_HOSTNAME[n] is rarely used, but some DHCP servers may require it. In that case, it must be set to a valid hostname. Finally, we come to the GATEWAY variable. It is actually set lower in the file than it appears in my example, and it controls the default gateway to use. You may be wondering why there is no GATEWAY[n] variable. The answer to that lies in how Internet Protocol works. I won't go into an in-depth discussion on that subject, but suffice it to say that there is only ever one default route that a computer can use no matter how many interfaces are attached to it.

If you need to use static IP addressing, you will have to obtain a unique static IP address and the subnet mask for the interface, as well as the default gateway address, and enter those here. There is no place to enter DNS information in rc.inet1.conf, so DNS servers will have to be manually placed into resolv.conf as discussed in Manual Configuration. Of course, if you use netconfig, this will be handled for you by that program. Now let's take a look at another interface on my computer.

# Config information for eth1:
IPADDR[1]=""
NETMASK[1]=""
USE_DHCP[1]="yes"
DHCP_HOSTNAME[1]=""

Here I am telling Slackware to configure eth1 using DHCP. I do not need to set the IPADDR[1] or NETMASK[1] variables when using DHCP (in fact, if they are set, they will be ignored). Slackware will happily contact a DHCP server as soon as the machine begins to boot.

Chapter Navigation

Previous Chapter: Emacs[4095]

Next Chapter: Wireless Networking[4096]

Sources

Original source: http://www.slackbook.org/beta[4097]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, networking, netconfig, dhcpcd

Emacs

What is Emacs?

vi and its clones are very functional and powerful editors. However, they are often considered not particularly extensible. vim is a successful and powerful vi variant that shrugs this trend, being both extremely extensible and lightweight. However, many users prefer a more “heavy” and extensible editor. This is why many people (including the author of this chapter) prefer Emacs.

Emacs takes extensibility up to eleven. Outside of a core of C, the rest of Emacs is written in a Lisp variant, nearly all of which is exposed to you, so that you may configure it or even extend it at will (many good Emacs Lisp tutorials can be found on the Internet). People have written all sorts of extensions in Emacs Lisp, from syntax highlighting for an obscure language, to a built-in terminal. In fact, there's even a vi emulation mode within Emacs (called viper), so you can still get the modal editing that comes with vi, while having access to the power of the Emacs core.

Like vi, there are many variants of Emacs (termed “emacsen”). However, the one most commonly used (and the only one in Slackware) is GNU Emacs. When people reference “Emacs” directly, they almost always mean GNU Emacs.

Unlike vi, Emacs operates more like a traditional editor by default. This means that most keyboard shortcuts can be performed without repeatedly changing modes. You can open up a file and start typing away without having to learn what the modes do, or forgetting which one you are currently using.

Starting Out

Emacs can be started simply by running the emacs command in your terminal. When you first start it in a console without arguments, you will see something that resembles this:

Starting Out[4098]

If you are in X windows, Emacs may start a GUI instead of running in your console. If this is the case and you don't want a GUI, you can invoke it with the flag '-nw'.

While here, you can browse around using the keyboard arrow keys. Underlined elements are links, and you can activate them by moving over them and pressing Enter. The documentation mentioned is very good, and can help you get your bearings should you have any problems. Also note how they describe key sequences such as Ctrl+H, meaning press the h key while holding down the CTRL key. Same deal with M-`, meaning to hold the the Meta key (usually Alt) and press the backtick ` key. When they say (e.g.) Ctrl+X Ctrl+C, this means to press the x key while holding down the CTRL key, then press the x key while also holding down the CTRL key. Conveniently, this is also one of the more important commands in Emacs: to close it.

Alternatively, if you call emacs with a file name as an argument, it will open that file, just like vi. Upon doing this, you will be presented with the contents of the file in question. Here, you can navigate the document using traditional arrow keys and type in information at will without any issues.

Say you make some edits, and you now want to save your file. The following key sequence will do that: Ctrl+XCtrl+S. If you made a new file, you will be prompted for this in what is called the “minibuffer”, the blank line below the gray line at the bottom of the screen. Type in the file name of your choice, then hit Enter. If you don't want to save the file, you can press Ctrl+G, which aborts operations that ask for input. Do note that tab-completion is usually available for operations that use the minibuffer.

Should you want to open a new file within your same Emacs session, type in Ctrl+XCtrl+F. You will be prompted for a file name in the minibuffer. Emacs doesn't care whether it exists or not. If it doesn't exist, a new buffer will be created for it (the file will be created upon saving with Ctrl+XCtrl+S), or it will be opened as expected. However, the old file will still be open! You can switch back to it using Ctrl+XCtrl+B, entering in the file's name (or more technically, the buffer's name), then hitting Enter.

How to Move Around

Like vi, Emacs is also older than the arrow keys on your keyboard. Also, like in vi, using the arrow keys to navigate files is also supported. While the vi movement keys are more ergonomic, emacs's are more “mnemonic”. However, it is still very possible to operate using the main Emacs keybindings quickly and efficiently. Here is a table of the basic movement keybindings:

Emacs Cursor Movement

Command | Result
Ctrl+F | Move the cursor one character to the right (forward)
Ctrl+B | Move the cursor one character to the left (backward)
Ctrl+N | Move the cursor one line down (next)
Ctrl+P | Move the cursor one line up (previous)

Of course, like with vi it is also possible to repeat these commands with a numeric argument. If you type in M-1 M-0 Ctrl+P, or Ctrl+U 10 Ctrl+P, the cursor will move ten lines up. If you type in M-5 Ctrl+F or Ctrl+U 5 Ctrl+F, the cursor will move five characters to the right.

Getting Help

Emacs contains a great deal of documentation, to the point that it is often called a “self-documenting” editor. This is because it provides mechanisms for providing users with documentation while you are using it.

Here are some useful functions that display documentation (they all start with Ctrl+H):

Accessing Emacs Documentation

Command | Result
Ctrl+H f FUNCTION-NAME Enter | Show documentation for function FUNCTION-NAME
Ctrl+H k Ctrl+X Ctrl+C | Show documentation for the function bound to the keysCtrl+X Ctrl+C
Ctrl+H t | Show the Emacs tutorial
Ctrl+H ? | Show all help-related functions

Ctrl+H t is especially useful if you want or need practice using Emacs.

Calling Functions

As noted earlier, Emacs exports a large number of functions to for interactive use. Some of these, like those opening and saving files, are mapped to keys. Others (like the ones for moving to the beginning and end of lines) are not. To call them, you have to invoke them. Say we want to call the function “end-of-line”. We would do this:

M-x end-of-line Enter

And the cursor would move to the end of the line, as the function name suggests.

Emacs Cheat Sheet

While Emacs can be simple to use, its scope can easily be overwhelming. Below are some useful Emacs commands. Some aspects have been simplified, most notably regarding text selection. These concepts, and more, are described the Emacs manual, and various on-line tutorials. Decent summaries can also be gleaned from web searches.

Emacs Cheat Sheet

Command | Result
Ctrl+F | Move the cursor one character to the right (forward)
Ctrl+B | Move the cursor one character to the left (backward)
Ctrl+N | Move the cursor one line down (next)
Ctrl+P | Move the cursor one line up (previous)
Ctrl+H f FUNCTION-NAME Enter | Show documentation for function FUNCTION-NAME
Ctrl+H k Ctrl+X Ctrl+C | Show documentation for the function bound to the keys Ctrl+X Ctrl+C
Ctrl+H T | Show the Emacs tutorial
Ctrl+H ? | Show all help-related functions
M-` | Access the Menu Bar
Ctrl+G | Cancel the current operation. This is most useful when in the minibuffer.
M-X FUNCTION-NAME Enter | Call the interactive function FUNCTION-NAME
M-1 M-0 Ctrl+N | Move the cursor ten lines down
Ctrl+U 10 Ctrl+N | Move the cursor ten lines down (same as above)
M-x beginning-of-line | Move the cursor to the beginning of the current line
M-x end-of-line | Move the cursor to the end of the current line
M-> | Move the cursor to the end of the buffer
M-< | Move the cursor to the beginning of the buffer
Ctrl+K | Remove text from the cursor to the end of the line and place it into the kill ring
Ctrl+Space | Enter selection mode (use normal motion keys to move around). Press C-space again to leave it.
Ctrl+W | While in selection mode, delete the selected region, and store the result into the kill ring
M-W | While in selection mode, store the selected region into the kill ring.
C-Y | “Yanks” the contents of the kill ring and places them at the cursor's location
Ctrl+/ | Undo the previous action. Unlike most other editors, this includes previous undo actions.
Insert | Enable or disable overwriting characters
Ctrl+S asdf Enter | Forward incremental search for the string “asdf”. Repeat Ctrl+S as needed to search for future items, or Ctrl+R (below) to search backwards.
Ctrl+R asdf Enter | Backward incremental search for the string “asdf”. Repeat Ctrl+R as needed to search for future items, or Ctrl+S (above) to search forwards.
M-% old Enter new Enter | Search for each instance of “old” and prompt you to replace it with “new”. You can force replacement of all items by typing ! at the replacement prompt.
Ctrl+X Ctrl+C | Exit Emacs, prompting you to save each unsaved buffer before doing so
Ctrl+X Ctrl+S | Save the currrent buffer to its file
Ctrl+X Ctrl+W new-file.txt Enter | Save the current buffer to a file “new-file.txt”

Chapter Navigation

Previous Chapter: vi[4099]

Next Chapter: Networking[4100]

Sources

Original source: http://www.slackbook.org/beta[4101]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, emacs, text editor

Printing

Choosing A Printer

Linux hasn't always had a great history with printers. For many years, printing was a black art to many Linux users, and very few printers worked reliably. Today, most printers will work well with Linux, but some still do not. If you're purchasing a new printer, be aware that many of the cheap inkjet models aren't as well supported in Linux as more expensive laser printers. If you're unsure about a printer, you can check online to see if others have had success with it.

All these warnings are perhaps a bit overkill though, as the large majority of printers work with Linux after only a brief and simple setup. The progress in this direction is largely due to the efforts of the Common UNIX Printing System, (CUPS). CUPS is a printing system used by Slackware and most other Linux distributions today. It primarily uses a graphical setup procedure accessed via a web browser. In order to setup a printer with CUPS, you'll need to open a web browser such as firefox, konqueror, or links and go to http://localhost:631[4102].

You might find that a quick click-through of CUPS configures your printer nearly automatically. Or, you may find that further configuration is required. To learn more about how printing works or how to get a stubborn printer configured, read on.

Getting the driver

There are, essentially, three types of printer drivers:

Postscript printers use the universal-ish language of Postscript to communicate with computers. A driver for postscript printers is usually not needed, since a postscript-compatible subsystem called Ghostscript is already installed.

Gutenprint are drivers engineered by GNU Linux developers. It provides support for roughly 700 printers.

Manufacturers may provide Linux drivers for their printers. Find out by going to the manufacturer's driver and support website and searching for your model.

Since gutenprint is already installed on Slackware, from this set of three categories, we have two methods of installing drivers:

For the manufacturer's drivers, installation is usually the same as any other software on your system; use installpkg or rpm2tgz to install the driver package. Be sure to read the documentation bundled with the drivers.

For Postscript printers, there is no “installation” as such; simply download the appropriate PPD file and keep it in a sensible location on your hard drive.

Once you've located and installed or downloaded the necessary components, you're ready to run CUPS.

Setting Up a Printer in CUPS

From this point onward, setting up a printer is just a series of following the step-by-step instructions with CUPS, but understanding how the printing configuration actually works might help clarify what CUPS does is doing.

The file /etc/cups/printers.conf consists of definitions which detail the printing devices your computer will be able to access, with one marked as the default device. If you wish to edit this file manually (and you probably don't), you must stop the cupsd CUPS daemon.

A typical entry would look something like this:

<Printer r1060>
Info Ricoh 1060
Location Downstairs
MakeModel Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6
DeviceURI lpd://192.168.4.8
State Idle
StateTime 1316011347
Type 12308
Filter application/vnd.cups-raw 0 -
Filter application/vnd.cups-raster 100 rastertogutenprint.5.2
# standard-ish stuff below here
Accepting Yes
Shared No
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy stop-printer
</Printer>

In this example, we have given the printer the name r1060, a human-readable identifier Ricoh 1060.

The MakeModel attribute is gained from lpinfo, which lists all available printer drivers on your system. So, if you know that you have a Ricoh 1060 that you want to print to, then you would issue this command as root:

darkstar:~# lpinfo -m | grep 1060

This lists the drivers that you have installed, grepping for the string 1060:

gutenprint.5.2://brother-hl-1060/expert Brother HL-1060 - CUPS+Gutenprint v5.2.6
gutenprint.5.2://ricoh-afc_1060/expert Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6

The MakeModel is the last half of the appropriate result; in this case Ricoh Aficio 1060 - CUPS+Gutenprint v5.2.6

The final vital entry is the device URI, or where on the network (or physical location, such as the USB port), the printer can be found. In this example, we use DeviceURI lpd: // 192.168.4.8 because we are using the lpd (line printer daemon) protocol to send data to the printer.

Now you understand what is being configured, and you can use the more common (and easier) method of doing this from the configuration tool that runs inside of a web browser.

In the CUPS interface, choose the Administration tab, and choose to Add Printer. You should be asked to enter administrative authorization here; enter root as the admin and your root password.

You will be presented with a list of printer interfaces and protocols that you can use for a printer. In many cases, you will want to add the printer via the LPD/LPR protocol (unless you've managed to find a printer that requires some other protocol).

Note that if the printer is plugged directly into your computer, and is on, you should see it listed as a Local Printer.

Assuming the printer is networked, the next screen will ask for the location of the printer. Using lpd: // as the protocol, enter the IP address of the printer. To find the IP address of the printer, you will probably need to look at the printer&#39;s settings, or you may be able to determine it from your router.

Whether your printer is connected via USB or network, the following screen will ask for human-readable details about the printer; this is for your reference only, so enter a name for the printer that makes sense to you and your users (the model number usually), a description (something that is distinctive about the printer if you have more than one of the same printers), and the location (describing where it is in the building).

On the next screen, point CUPS to the printer driver. If the printer is a postscript printer (as most laserprinters are) then you may need only the PPD for that printer. If your printer is not postscript or has special features that require additional drivers, then define the make (manufacturer) and you will then be presented with a list of available drivers. Select the appropriate driver.

The printer is now installed and will be the default printer for all of your applications.

Printing from the Command Line

Now that you have successfully installed and configured your printer, you may also use lpr to print from the command line.

lpr sends documents to a printer but before using it, you might want to define a default printer by using lpadmin as root:

# lpadmin -d r1060

In this example, r1060 is the human readable name given to the printer in either /etc/cups/printers.conf or in the CUPS configuration.

If you do not have root privileges on the workstation you are using, you can also set the PRINTER environment variable:

  $ PRINTER=r1060
$ export PRINTER

Once the printer has been set, then you may print:

$ lpr foo.txt

Formatting for Print

lpr, like so many other UNIX applications, does one thig: sends files to a printer. It doesn't much care if the file looks good or even fits on a page. When printing large text files that have not been formatted for print, use pr(1).

pr is a simple text formatter that takes any text document and makes sure that it contains line breaks and page breaks, with an optional header and footer, page numbering, and much more. It has many options, but the defaults are usually good enough. pr outputs the results of the formatting to standard out, meaning it simply takes the text document, formats it, and displays the results in the terminal. This, of course, means that it can be redirected to lpr:

darkstar:~$ pr foo.txt | lpr

This will format foo.txt and send the formatted output to the default printer.

As usual, see the pr man page for a list of the customizations you can make to the default formatting.

Chapter Navigation

Previous Chapter: The X Window System[4103]

Next Chapter: Users and Groups[4104]

Sources

Original source: http://www.slackbook.org/beta[4105]

Originally written by Alan Hicks, Chris Lumens, David Cantrell, Logan Johnson

slackbook, printing, printers, cups

[[_start.html

[1] https://docs.slackware.com/doku.php?id=slackware:slackware
[2] https://docs.slackware.com/doku.php?id=start
[3] https://docs.slackware.com/doku.php?id=slackware:install
[4] https://docs.slackware.com/doku.php?id=slackware:slackware
[5] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[6] https://docs.slackware.com/doku.php?id=slackware:community
[7] https://docs.slackware.com/doku.php?id=slackware:liveslak
[8] https://docs.slackware.com/doku.php?id=slackware:external
[9] https://docs.slackware.com/doku.php?id=slackware:slackware
[10] https://docs.slackware.com/doku.php?id=slackware:slackware
[11] https://docs.slackware.com/doku.php?id=slackware:slackware
[12] https://docs.slackware.com/doku.php?id=slackware:philosophy
[13] https://docs.slackware.com/doku.php?id=slackware:slackware
[14] https://docs.slackware.com/doku.php?id=slackbook:start
[15] http://slackbook.org/beta/
[16] https://docs.slackware.com/doku.php?id=slackware:faq
[17] https://docs.slackware.com/doku.php?id=slackware:readmes
[18] https://docs.slackware.com/doku.php?id=howtos:start
[19] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc-10.x_aarch64_cross-compiler
[20] https://docs.slackware.com/doku.php?id=howtos:misc:slackware64_current_with_lvm_and_luks_on_linodecloud
[21] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:hacking_the_xzpad700_7_tablet
[22] https://docs.slackware.com/doku.php?id=howtos:hardware:brother_printer_installation
[23] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:zram_slackware_arm_and_arm64
[24] https://docs.slackware.com/doku.php?id=fr:howtos:misc:enabling_sudo_on_slackware
[25] https://docs.slackware.com/doku.php?id=es:howtos:hardware:arm:hacking_the_xzpad700_7_tablet
[26] https://docs.slackware.com/doku.php?id=zh:slackware:slackware
[27] https://docs.slackware.com/doku.php?id=pt-br:howtos:software:java
[28] https://docs.slackware.com/doku.php?id=es:howtos:hardware:arm:raspberrypi4
[29] https://docs.slackware.com/doku.php?id=slackdocs:tutorial
[30] https://docs.slackware.com/doku.php?id=slackdocs:translation_guide
[31] https://docs.slackware.com/doku.php?id=slackdocs:styleguide
[32] https://docs.slackware.com/doku.php?id=playground:playground
[33] https://docs.slackware.com/doku.php?id=wiki:syntax
[34] https://docs.slackware.com/doku.php?id=wiki:syntax
[35] https://lists.alienbase.nl/mailman/listinfo/slackdocs
[36] https://lists.alienbase.nl/pipermail/slackdocs/
[37] https://docs.slackware.com/doku.php?id=slackdocs:contributing
[38] https://lists.alienbase.nl/mailman/listinfo/slackdocs
[39] https://docs.slackware.com/doku.php?id=slackdocs:mailing_list
[40] https://docs.slackware.com/doku.php?id=slackdocs:news
[41] https://docs.slackware.com/doku.php?id=slackdocs:stats
[42] https://en.wikipedia.org/wiki/EPUB
[43] https://docs.slackware.com/doku.php?id=epub:slackbook
[44] https://docs.slackware.com/doku.php?id=epub:slackdocs
[45] https://docs.slackware.com/doku.php?id=slackdocs:contact
[46] http://www.opensearch.org/
[47] https://docs.slackware.com/doku.php?id=start
[48] https://docs.slackware.com/start?do=register
[49] https://docs.slackware.com/doku.php?id=slackdocs:languages

[[_slackware_package_management.html

[50] http://www.securityfocus.com/bid/29179
[51] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:building_packages_with_sbopkg
[52] https://github.com/dslackw/slpkg
[53] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[54] http://www.slackbuilds.org
[55] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[56] http://www.linux.com/learn/tutorials/261878-intro-to-slackware-package-management
[57] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot
[58] http://www.linux.com
[59] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_slackware_snownews.html

[60] https://kiza.eu/software/snownews/snowscripts/
[61] http://en.wikipedia.org/wiki/RSS
[62] http://script4rss.sourceforge.net/
[63] https://docs.slackware.com/doku.php?id=slackware:common_software
[64] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_slackware_opera.html

[65] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[66] http://slackbuilds.org/repository/13.37/network/opera/
[67] http://my.opera.com/ruario/blog/2012/08/13/opera-12-01-for-slackware
[68] http://www.opera.com/browser/download/
[69] http://my.opera.com/ruario/blog/2010/12/26/automatic-conversion-of-opera-generic-linux-packages-into-slackware-format
[70] http://www.opera.com

[[_slackware_multilib.html

[71] http://www.pathname.com/fhs/pub/fhs-2.3.html#LIB64
[72] https://en.wikipedia.org/wiki/x86_64
[73] http://winehq.org/
[74] http://www.virtualbox.org/
[75] http://steampowered.com
[76] http://www.slackware.com/~alien/slackbuilds/steamclient/
[77] http://www.skype.com/
[78] http://www.citrix.com/lang/English/home.asp
[79] http://slackware.com/~alien/multilib/
[80] http://slackware.com/~alien/multilib/ChangeLog.txt
[81] http://slackware.com/~alien/multilib/ChangeLog.rss
[82] http://slakfinder.org/slackpkg+.html
[83] http://slakfinder.org/slackpkg+.html
[84] http://slamd64.com/
[85] http://slackware.com/~alien/multilib/
[86] http://bear.alienbase.nl/mirrors/people/alien/multilib/
[87] http://slackware.uk/people/alien/multilib/
[88] http://alien.slackbook.org/slackware/multilib/
[89] http://slackbuilds.org/mirror/alien/multilib/
[90] http://compat32pkg.sourceforge.net/
[91] http://slakfinder.org/slackpkg+.html
[92] http://slackpkg.org/
[93] http://www.brunorusso.eti.br/slackware/doku.php?id=multilib_para_o_slackware_x86_64
[94] http://www.slack-world.com/index.php/articles/43-general-system/85-multilib-slackware64
[95] http://wiki.slackware-fr.org/avance:articles:slackware64-multilib
[96] http://trac.cross-lfs.org/wiki/read#ReadtheCrossLinuxFromScratchBookOnline
[97] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib

[[_slackware_vlc.html

[98] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[99] http://www.slackware.com/~alien/slackbuilds/vlc/
[100] http://slackware.org.uk/people/alien/restricted_slackbuilds/vlc/
[101] http://www.videolan.org/
[102] http://wiki.videolan.org/Slackware

[[_slackware_package_management_hands_on.html

[103] http://slackbuilds.org
[104] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_slackware_localization.html

[105] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_kde
[106] http://wiki.xfce.org/translations
[107] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_xfce
[108] http://slackware.com/~alien/slackbuilds/libreoffice/
[109] http://slackware.com/~alien/slackbuilds/mozilla-firefox-l10n/
[110] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.mozilla.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/thunderbirdhttps://docs.slackware.com/releaseshttps://docs.slackware.com/
[111] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.mozilla.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/seamonkeyhttps://docs.slackware.com/releaseshttps://docs.slackware.com/
[112] http://connie.slackware.com/~alien/slackbuilds/libreoffice/
[113] http://connie.slackware.com/~alien/slackbuilds/libreoffice/
[114] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap06.html#tag_06
[115] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html#tag_07
[116] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html#tag_08_02
[117] http://eyegene.ophthy.med.umich.edu/unicode/
[118] http://www.utf-8.com/
[119] http://linuxdocs.org/HOWTOs/Unicode-HOWTO.html
[120] http://www.sourceware.org/glibc/wiki/Locales
[121] http://www.unicode.org/faq/
[122] http://people.w3.org/rishida/scripts/pickers/
[123] http://www.eki.ee/letter/
[124] http://duganchen.ca/writings/slackware/fonts/
[125] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[126] https://docs.slackware.com/doku.php?id=wiki:user:bocke
[127] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_slackware_window_manager.html

[128] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[129] https://docs.slackware.com/doku.php?id=slackware:window_managers:fluxbox
[130] https://docs.slackware.com/doku.php?id=slackware:window_managers:blackbox
[131] https://docs.slackware.com/doku.php?id=slackware:window_managers:windowmaker
[132] https://docs.slackware.com/doku.php?id=slackware:window_managers:fvwm2
[133] https://docs.slackware.com/doku.php?id=slackware:window_managers:twm
[134] https://docs.slackware.com/doku.php?id=slackware:window_managers:openbox
[135] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[136] https://docs.slackware.com/doku.php?id=howtos:window_managers:xmonad_tiling_window_manager
[137] https://docs.slackware.com/doku.php?id=howtos:window_managers:installing_e17

[[_slackware_liveslak.html

[138] https://github.com/Dlackware/dlackware
[139] http://www.studioware.org
[140] http://download.liveslak.org/
[141] http://slackware.uk/people/alien-slacklive/
[142] http://repo.ukdw.ac.id/slackware-live/
[143] http://ftp.slackware.pl/pub/slackware-live/
[144] http://ftp.osuosl.org/pub/slackware/slackware64-current/README_CRYPT.TXT
[145] https://www.slax.org/
[146] http://www.porteus.org/
[147] http://www.salixos.org/download.html
[148] http://www.slackel.gr/
[149] http://slackex.exton.net/
[150] mailto:alien@slackware.com
[151] http://git.liveslak.org/liveslak/
[152] http://www.slackware.com/~alien/liveslak/
[153] https://git.slackware.nl/liveslak/tree/README.txt
[154] https://liveslak.org/
[155] https://download.liveslak.org/
[156] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_slackware_package_and_dependency_management_shouldn_t_put_you_off_slackware.html

[157] https://people.opera.com/ruario/snapshot/Opera/
[158] https://web.archive.org/web/20140303100105/http://my.opera.com/ruario/blog/2011/09/26/slackware-package-and-dependency-management
[159] https://web.archive.org/web/20140303100105/http://en.wikipedia.org/wiki/Ar_
[160] https://web.archive.org/web/20140303100105/http://my.opera.com/ruario/blog/2011/03/13/slackware-a-simple-and-easy-to-use-linux-distribution
[161] https://web.archive.org/web/20140303100105/http://slackbuilds.org/
[162] https://web.archive.org/web/20140303100105/http://sbopkg.org/
[163] https://web.archive.org/web/20140303100105/http://sbopkg.org/queues.php
[164] https://web.archive.org/web/20140303100105/http://my.opera.com/ruario/blog/2011/09/26/slackware-package-and-dependency-management

[[_slackware_faq.html

[165] https://docs.slackware.com/doku.php?id=slackware:slackware
[166] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.comhttps://docs.slackware.com/pubhttps://docs.slackware.com/slackware-isohttps://docs.slackware.com/
[167] http://mirrors.slackware.com/mirrorlist/
[168] http://slackware.com/getslack/torrents.php
[169] https://www.patreon.com/slackwarelinux/​overview
[170] https://www.cafepress.com/volkerdi
[171] https://www.cafepress.com/profile/13904775
[172] http://www.linuxquestions.org/questions/interviews-28/interview-with-patrick-volkerding-of-slackware-949029/
[173] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[174] https://en.wikipedia.org/wiki/Upstream_%2528software_development%2529
[175] https://docs.slackware.com/doku.php?id=slackware:current
[176] http://www.linuxfromscratch.org/
[177] http://slackware.com/gpg-key
[178] https://docs.slackware.com/doku.php?id=slackware:install
[179] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[180] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[181] https://docs.slackware.com/doku.php?id=slackware:current
[182] https://docs.slackware.com/doku.php?id=slackware:external
[183] http://linuxquestions.org/questions/slackware-14/
[184] http://slackware.com/support/
[185] https://docs.slackware.com/doku.php?id=slackware:philosophy
[186] https://docs.slackware.com/doku.php?id=slackware:philosophy
[187] http://google.com/
[188] http://duckduckgo.com/
[189] http://www.linuxquestions.org/hcl/
[190] http://www.cups.org/
[191] http://www.openprinting.org/printers
[192] http://hplipopensource.com/hplip-web/index.html
[193] http://www.sane-project.org/
[194] http://www.ideasonboard.org/uvc/
[195] http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Main_Page
[196] https://launchpad.net/wizardpen
[197] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[198] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_use_slackware_installing_software
[199] https://docs.slackware.com/doku.php?id=slackware:common_software
[200] http://slackware.com/~alien/
[201] http://rlworkman.net/pkgs/
[202] http://www.slackbuilds.org/
[203] http://www.sbopkg.org
[204] http://slacky.eu
[205] https://docs.slackware.com/doku.php?id=slackware:rpm2tgz
[206] http://distro.ibiblio.org/amigolinux/download/src2pkg/
[207] http://software.jaos.org/#cpan2tgz
[208] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[209] http://wiktionary.org/wiki/automagic
[210] https://docs.slackware.com/doku.php?id=slackware:slapt-get
[211] http://www.linuxpackages.net
[212] http://www.slacky.eu
[213] http://www.salixos.org/
[214] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[215] https://docs.slackware.com/doku.php?id=slackware:philosophy
[216] http://docs.slackware.com/slackware:install?&#configuring_graphical_logins

[[_slackware_install.html

[217] http://www.syslinux.org/wiki/index.php/Doc/isolinux#HYBRID_CD-ROM.2FHARD_DISK_MODE
[218] https://docs.slackware.com/doku.php?id=slackware:pxe_install
[219] https://docs.slackware.com/doku.php?id=slackware:kde
[220] https://docs.slackware.com/doku.php?id=slackbook:users
[221] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[222] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[223] https://docs.slackware.com/doku.php?id=slackware:multilib
[224] http://slackbook.org/beta/#ch_install
[225] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.comhttps://docs.slackware.com/pubhttps://docs.slackware.com/slackware-isohttps://docs.slackware.com/
[226] http://slackware.com/getslack/torrents.php
[227] http://microlinux.fr/articles/slackware1.pdf
[228] http://microlinux.fr/articles/slackware2.pdf
[229] http://microlinux.fr/articles/slackware3.pdf
[230] http://microlinux.fr/articles/slackware4.pdf
[231] http://microlinux.fr/articles/slackware1.zip
[232] http://microlinux.fr/articles/slackware2.zip
[233] http://microlinux.fr/articles/slackware3.zip
[234] http://microlinux.fr/articles/slackware4.zip

[[_slackware_xfce.html

[235] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[236] http://www.xfce.org
[237] https://docs.slackware.com/doku.php?id=slackware:kde
[238] https://docs.slackware.com/doku.php?id=slackbook:users
[239] http://xfce-look.org/
[240] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_xfce
[241] http://www.slackbuilds.org
[242] http://www.xfce.org/about/tour
[243] http://wiki.xfce.org/faq
[244] http://xfce-look.org/
[245] https://docs.slackware.com/doku.php?id=wiki:user:kookiemonster

[[_slackware_external.html

[246] http://slackbook.org/
[247] http://slackwiki.com/
[248] http://wiki.alienbase.nl/
[249] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[250] http://wiki.linuxquestions.org/wiki/Slackware
[251] https://github.com/willysr/slackbasics-i18n/
[252] http://slackware.com/~vbatts/2011_SELF/2011_SELF.pdf
[253] http://slackware.com/~alien/tdose2009/t-dose-slackware.pdf
[254] http://slackware.com/~mozes/docs/slackware_pkg_presentation.pdf
[255] http://www.linuxquestions.org/questions/slackware-14/
[256] https://groups.google.com/forum/?fromgroups#!forum/alt.os.linux.slackware
[257] irc:https://docs.slackware.com/https://docs.slackware.com/irc.freenode.nethttps://docs.slackware.com/slackware
[258] http://slackagg.hashbangbash.com/
[259] http://slacky.eu/
[260] http://slackware-fr.org/
[261] http://slackware.ir/
[262] http://forum.slackware.pl
[263] http://humanreadable.nfshost.com/sdeg/index.htm
[264] http://alien.slackbook.org/blog/
[265] https://alphageek.slackware.nl/
[266] http://slackware.com/~mrgoblin/index.php
[267] http://www.basicconfig.com/
[268] https://noctslackv1.wordpress.com/
[269] http://slackware.ponce.cc/blog/
[270] http://rlworkman.net/
[271] http://slackblogs.blogspot.com/
[272] http://someslack.wordpress.com/
[273] http://blog.tpa.me.uk/
[274] https://bear.alienbase.nl/slackworld/
[275] http://www.gilandre.net/cgi-bin/wiki.cgi/SlackwareLinuxPage
[276] https://arm.slackware.com/
[277] http://pandorawiki.org/Software_projects/OS/Slackware

[[_slackware_current.html

[278] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[279] https://docs.slackware.com/doku.php?id=howtos:general_admin:task_scheduling
[280] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar

[[_slackware_slackware.html

[281] http://slackware.com/
[282] http://en.wikipedia.org/wiki/Patrick_Volkerding
[283] https://docs.slackware.com/doku.php?id=slackware:philosophy
[284] http://slackware.com/info/
[285] http://wikipedia.org/wiki/Slackware
[286] http://slackware.com/
[287] https://www.linuxquestions.org/questions/interviews-28/interview-with-patrick-volkerding-of-slackware-949029/
[288] http://bear.alienbase.nl/slackworld/issues.html
[289] https://github.com/ayaz/SlackWorld

[[_slackware_slackpkg.html

[290] https://slackpkg.org/
[291] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[292] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:systemupgrade
[293] https://slackpkg.org/

[[_slackware_pxe_install.html

[294] http://alien.slackbook.org/blog/out-of-the-box-pxe-install-server-in-slackware-13-37/
[295] http://alien.slackbook.org/blog/out-of-the-box-pxe-install-server-in-slackware-13-37/
[296] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_slackware_community.html

[297] http://slackbuilds.org
[298] http://www.linuxquestions.org/questions/slackware-14/
[299] http://linuxquestions.org/questions/slackware-14
[300] https://docs.slackware.com/doku.php?id=slackdocs:contributing

[[_slackware_common_software.html

[301] https://docs.slackware.com/doku.php?id=howtos:software:google-chrome
[302] https://docs.slackware.com/doku.php?id=slackware:opera
[303] https://docs.slackware.com/doku.php?id=slackware:flashplugin
[304] https://docs.slackware.com/doku.php?id=howtos:software:java
[305] https://docs.slackware.com/doku.php?id=slackware:skype
[306] https://docs.slackware.com/doku.php?id=slackware:libreoffice
[307] https://docs.slackware.com/doku.php?id=howtos:general_admin:taskwarrior
[308] https://docs.slackware.com/doku.php?id=slackware:mutt
[309] https://docs.slackware.com/doku.php?id=slackware:snownews
[310] https://docs.slackware.com/doku.php?id=slackware:vlc
[311] https://docs.slackware.com/doku.php?id=slackware:gimp
[312] https://docs.slackware.com/doku.php?id=slackbook:vi
[313] https://docs.slackware.com/doku.php?id=slackbook:emacs
[314] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware

[[_slackware_beginners_guide.html

[315] https://docs.slackware.com/doku.php?id=slackware:install
[316] https://docs.slackware.com/doku.php?id=slackbook:install
[317] https://docs.slackware.com/doku.php?id=howtos:hardware:proprietary_graphics_drivers
[318] https://docs.slackware.com/doku.php?id=slackbook:users
[319] https://docs.slackware.com/doku.php?id=slackware:localization
[320] https://en.wikipedia.org/wiki/Vulnerability_%2528computing%2529
[321] https://docs.slackware.com/doku.php?id=howtos:security:start
[322] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[323] https://docs.slackware.com/doku.php?id=slackbook:package_management
[324] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[325] https://docs.slackware.com/doku.php?id=slackbook:tracking_updates
[326] http://www.slackware.com/lists/
[327] http://www.slackware.com/~alien/tools/rsync_slackware_patches.sh
[328] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[329] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network
[330] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network#wireless_networks
[331] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:network#wpa_debugging
[332] http://wicd.net/
[333] http://projects.gnome.org/NetworkManager/
[334] http://slackbuilds.org/network/network-manager-applet/
[335] http://x.org
[336] https://en.wikipedia.org/wiki/OpenGL
[337] https://docs.slackware.com/doku.php?id=slackware:amd_nvidia
[338] https://docs.slackware.com/doku.php?id=slackware:window_manager
[339] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[340] https://docs.slackware.com/doku.php?id=howtos:window_managers:slim
[341] http://winehq.org
[342] https://docs.slackware.com/doku.php?id=slackware:multilib
[343] https://docs.slackware.com/doku.php?id=howtos:start
[344] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:systemupgrade
[345] https://docs.slackware.com/doku.php?id=slackware:current

[[_slackware_kde.html

[346] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[347] https://docs.slackware.com/doku.php?id=slackware:install
[348] http://alien.slackbook.org/ktown/
[349] http://slackbuilds.org/repository/13.37/desktop/kde44-oxygen-molecule/
[350] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_kde
[351] http://www.microlinux.fr/articles/kde4.pdf
[352] http://www.microlinux.fr/articles/kde4.zip

[[_slackware_philosophy.html

[353] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[354] http://www.slackbuilds.org
[355] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar

[[_slackware_slackbuild_scripts.html

[356] http://www.slackwiki.com/Writing_A_SlackBuild_Script
[357] http://slackbuilds.org/templates/
[358] http://www.slackbuilds.org
[359] http://alien.slackbook.org/AST/
[360] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[361] http://www.dawoodfall.net/slackbuilds/noversion/mkslack/
[362] http://www.slackbuilds.org/
[363] http://slackbuilds.org/templates/
[364] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar

[[_slackware_flashplugin.html

[365] http://www.adobe.com/products/flashplayer.html
[366] http://www.adobe.com/
[367] http://slackbuilds.org/repository/13.37/multimedia/flash-player-plugin/
[368] http://connie.slackware.com/~alien/slackbuilds/flashplayer-plugin/
[369] https://docs.slackware.com/doku.php?id=howtos:software:google-chrome
[370] http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/chromium-pepperflash-plugin/
[371] http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/chromium/
[372] https://docs.slackware.com/doku.php?id=slackware:opera
[373] http://slackbuilds.org/repository/13.37/multimedia/flash-player-plugin/
[374] http://support.google.com/chrome/bin/answer.py?hl=en&answer=108086

[[_slackware_package_repos.html

[375] http://www.slackbuilds.org
[376] http://slackware.it/
[377] http://connie.slackware.com/~alien/slackbuilds
[378] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_slackware_desktop_environment.html

[379] https://docs.slackware.com/doku.php?id=slackware:window_manager
[380] https://docs.slackware.com/doku.php?id=slackware:kde
[381] https://docs.slackware.com/doku.php?id=slackware:kde
[382] https://docs.slackware.com/doku.php?id=slackware:xfce
[383] http://gnome.org/
[384] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.comhttps://docs.slackware.com/pubhttps://docs.slackware.com/slackwarehttps://docs.slackware.com/slackware-10.2https://docs.slackware.com/ChangeLog.txt
[385] http://gnomeslackbuild.org/
[386] http://www.droplinegnome.net/
[387] http://mate-desktop.org/
[388] http://mateslackbuilds.github.com
[389] http://www.slackware.org.uk/msb/
[390] http://lxde.org/
[391] http://lxde.org/
[392] http://slackware.ponce.cc/blog/2010/08/23/easily-build-yourself-lxde-with-sbopkg/
[393] https://docs.slackware.com/doku.php?id=wiki:user:kookiemonster
[394] https://docs.slackware.com/doku.php?id=wiki:user:harishankar
[395] https://docs.slackware.com/doku.php?id=wiki:user:cmyster

[[_slackware_readmes.html

[396] http://ftp.slackware.com/pub/slackware/slackware-current/ANNOUNCE.14_1
[397] http://ftp.slackware.com/pub/slackware/slackware-current/BOOTING.TXT
[398] http://ftp.slackware.com/pub/slackware/slackware-current/CHANGES_AND_HINTS.TXT
[399] http://ftp.slackware.com/pub/slackware/slackware-current/CHECKSUMS.md5
[400] http://ftp.slackware.com/pub/slackware/slackware-current/CHECKSUMS.md5.asc
[401] http://ftp.slackware.com/pub/slackware/slackware-current/GPG-KEY
[402] http://ftp.slackware.com/pub/slackware/slackware-current/COPYING
[403] http://ftp.slackware.com/pub/slackware/slackware-current/COPYING3
[404] http://ftp.slackware.com/pub/slackware/slackware-current/COPYRIGHT.TXT
[405] http://ftp.slackware.com/pub/slackware/slackware-current/CRYPTO_NOTICE.TXT
[406] http://ftp.slackware.com/pub/slackware/slackware-current/ChangeLog.txt
[407] http://ftp.slackware.com/pub/slackware/slackware-current/FILELIST.TXT
[408] http://ftp.slackware.com/pub/slackware/slackware-current/GPG-KEY
[409] http://ftp.slackware.com/pub/slackware/slackware-current/PACKAGES.TXT
[410] http://ftp.slackware.com/pub/slackware/slackware-current/README.TXT
[411] http://ftp.slackware.com/pub/slackware/slackware-current/README.initrd
[412] http://ftp.slackware.com/pub/slackware/slackware-current/README_CRYPT.TXT
[413] http://ftp.slackware.com/pub/slackware/slackware-current/README_LVM.TXT
[414] http://ftp.slackware.com/pub/slackware/slackware-current/README_RAID.TXT
[415] http://ftp.slackware.com/pub/slackware/slackware64-current/README_UEFI.TXT
[416] http://ftp.slackware.com/pub/slackware/slackware-current/RELEASE_NOTES
[417] http://ftp.slackware.com/pub/slackware/slackware-current/SPEAKUP_DOCS.TXT
[418] http://ftp.slackware.com/pub/slackware/slackware-current/SPEAK_INSTALL.TXT
[419] http://ftp.slackware.com/pub/slackware/slackware-current/Slackware-HOWTO
[420] http://ftp.slackware.com/pub/slackware/slackware-current/UPGRADE.TXT
[421] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[422] http://ftp.slackware.com/pub/slackware/slackware-current/isolinux/README.TXT
[423] http://ftp.slackware.com/pub/slackware/slackware-current/source/README.TXT
[424] http://ftp.slackware.com/pub/slackware/slackware-current/usb-and-pxe-installers/README_PXE.TXT
[425] http://ftp.slackware.com/pub/slackware/slackware-current/usb-and-pxe-installers/README_USB.TXT
[426] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_window_managers_awesome.html

[427] http://awesome.naquadah.org/
[428] https://docs.slackware.com/doku.php?id=slackware:window_manager
[429] http://www.lua.org/
[430] http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
[431] http://slackbuilds.org/development/libxdg-basedir/
[432] http://slackbuilds.org/libraries/lgi/
[433] http://slackbuilds.org/development/lua/
[434] http://slackbuilds.org
[435] http://slackbuilds.org/desktop/awesome/
[436] http://awesome.naquadah.org/wiki/Awesome_3_configuration
[437] http://awesome.naquadah.org/
[438] http://awesome.naquadah.org/wiki/Main_Page
[439] http://awesome.naquadah.org/wiki/FAQ
[440] http://awesome.naquadah.org/doc/api/​
[441] http://awesome.naquadah.org/wiki/Awesome_3_configuration
[442] http://en.wikipedia.org/wiki/Dynamic_window_manager
[443] https://docs.slackware.com/doku.php?id=wiki:user:sbolokanov

[[_howtos_window_managers_xmonad_tiling_window_manager.html

[444] https://docs.slackware.com/doku.php?id=slackware:window_manager
[445] http://en.wikipedia.org/wiki/Tiling_window_manager
[446] http://xmonad.org/
[447] http://slackbuilds.org/desktop/xmonad/
[448] http://slackbuilds.org/desktop/dmenu/
[449] http://slackbuilds.org/desktop/stalonetray/
[450] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_window_managers_lumina.html

[451] https://slackbuilds.org/
[452] https://slackbuilds.org/
[453] https://lumina-desktop.org/
[454] https://project-trident.org/
[455] https://slackbuilds.org/
[456] http://www.slackware.com/~alien/slackbuilds/
[457] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela

[[_howtos_window_managers_keyboard_layout_in_fluxbox.html

[458] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout
[459] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_e17.html

[460] http://www.enlightenment.org/p.php?p=about&l=en
[461] https://docs.slackware.com/doku.php?id=slackware:window_manager
[462] http://trac.enlightenment.org/e/wiki/EFLOverview
[463] http://slacke17.sourceforge.net/
[464] http://sourceforge.net/projects/slacke17/files/slacke17/
[465] http://slackbuilds.org

[[_howtos_window_managers_keyboard_layout_in_kde.html

[466] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout
[467] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_i3wm.html

[468] https://docs.slackware.com/doku.php?id=slackware:window_manager
[469] http://www.i3wm.org/screenshots/
[470] http://slackbuilds.org/desktop/i3/
[471] http://docs.slackware.com/slackware:package_management_hands_on?s[]=build&s[]=slackbuild
[472] http://www.sbopkg.org/
[473] http://slackbuilds.org
[474] http://slackbuilds.org/libraries/libev/
[475] http://slackbuilds.org/libraries/yajl/
[476] http://slackbuilds.org/desktop/dmenu/
[477] http://slackbuilds.org/desktop/i3status/
[478] http://slackbuilds.org/libraries/confuse/
[479] http://www.slackword.net/?p=733
[480] http://www.slackbuilds.org
[481] http://slackbuilds.org/repository/14.1/perl/perl-JSON-XS/
[482] http://slackbuilds.org/repository/14.1/perl/perl-AnyEvent-Handle/
[483] http://slackbuilds.org/repository/14.1/perl/perl-AnyEvent-I3/
[484] http://www.phoronix.com/scan.php?page=news_item&px=MTA5NTY
[485] http://www.i3wm.org/docs/userguide.html#_default_keybindings
[486] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_i3
[487] http://www.i3wm.org/docs/userguide.html
[488] http://www.i3wm.org/docs/userguide.html#_tree
[489] http://www.youtube.com/watch?v=AWA8Pl57UBY&feature=youtu.be
[490] http://www.i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces
[491] http://www.i3wm.org/docs/userguide.html#_scratchpad
[492] http://www.slackword.net/?p=657
[493] http://slackbuilds.org/desktop/i3status/
[494] https://docs.slackware.com/doku.php?id=howtos:general_admin:taskwarrior
[495] http://www.i3wm.org/docs/
[496] mailto:i3-discuss-subscribe@i3.zekjur.net
[497] http://infra.in.zekjur.net/archives/i3-discuss/
[498] http://faq.i3wm.org/questions/
[499] https://www.reddit.com/r/i3wm/
[500] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_keyboard_layout_in_xfce.html

[501] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout
[502] http://slackbuilds.org/desktop/xfce4-xkb-plugin/
[503] http://www.slackbuilds.org/desktop/xfce4-xkb-plugin/
[504] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_dual_monitors.html

[505] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_keyboard_layout_in_i3.html

[506] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[507] http://slackbuilds.org/repository/13.37/desktop/i3/
[508] http://slackbuilds.org/repository/13.37/desktop/i3status/
[509] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[510] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_remotex_linux2linux.html

[511] https://cgit.freedesktop.org/xorg/xserver/commit/?id=cc59be38b7eff52a1d003b390f2994c73ee0b3e9
[512] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_remotex_windows2linux.html

[513] http://sourceforge.net/projects/xming/files/
[514] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_vnc.html

[515] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_keyboard_layout.html

[516] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_kde
[517] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_xfce
[518] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_fluxbox
[519] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_i3
[520] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_slim.html

[521] http://slim.berlios.de
[522] http://slackbuilds.org/result/?search=slim
[523] http://ngc891.blogdns.net/pub/projects/slim/slackware-preview.png
[524] http://ngc891.blogdns.net/?p=74
[525] http://slim.berlios.de/themes01.php
[526] http://slim.berlios.de/themes_howto.php
[527] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_howtos_window_managers_take_a_screenshot.html

[528] https://docs.slackware.com/doku.php?id=wiki:user:zithro

[[_howtos_window_managers_xfce_app_menu.html

[529] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_xfce_handy_launchers.html

[530] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_cli_manual_shells.html

[531] http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29
[532] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shell_comparison
[533] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_cli_manual_introduction.html

[534] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[535] http://www.slackbuilds.org
[536] http://slackbuilds.org/system/aterm/
[537] http://slackbuilds.org/system/eterm/
[538] http://slackbuilds.org/system/rxvt-unicode/
[539] http://slackbuilds.org/system/sakura/
[540] http://slackbuilds.org/system/terminator/
[541] http://en.wikipedia.org/wiki/Terminal_multiplexer
[542] http://slackbuilds.org/system/tmux/
[543] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[544] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex
[545] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_cli_manual_start.html

[546] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[547] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[548] https://docs.slackware.com/doku.php?id=wiki:user:b1ueb1aze
[549] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[550] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[551] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[552] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[553] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[554] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[555] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_cli_manual_first_steps.html

[556] https://docs.slackware.com/doku.php?id=howtos:general_admin:searching_and_reading_manpages_efficiently
[557] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[558] https://docs.slackware.com/doku.php?id=slackware:window_manager
[559] https://docs.slackware.com/doku.php?id=slackware:emacs
[560] http://www.viemu.com/vi-vim-cheat-sheet.gif
[561] http://www.openvim.com/tutorial.html
[562] http://en.wikibooks.org/wiki/Learning_the_vi_Editor
[563] http://www.sbernard.ee/vince.html
[564] http://www.moolenaar.net/habits.html
[565] http://www.vim.org/scripts/script.php?script_id=3760
[566] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[567] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[568] https://docs.slackware.com/doku.php?id=wiki:user:b1ueb1aze
[569] https://docs.slackware.com/doku.php?id=wiki:user:markush
[570] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_slackware_admin_slackware-proxmox-ve.html

[571] http://www.proxmox.com/proxmox-ve
[572] http://www.linux-kvm.org/page/Main_Page
[573] https://pve.proxmox.com/wiki/Main_Page
[574] http://solusvm.com/
[575] https://documentation.solusvm.com/

[[_howtos_slackware_admin_how_to_configure_fstab_and_lilo.conf_with_persistent_naming.html

[576] https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
[577] https://en.wikipedia.org/wiki/Universally_unique_identifier
[578] https://en.wikipedia.org/wiki/Master_boot_record
[579] https://en.wikipedia.org/wiki/GUID_Partition_Table
[580] https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
[581] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[582] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[583] https://docs.slackware.com/doku.php?id=wiki:user:bassmadrigal

[[_howtos_slackware_admin_how_to_chroot_from_media.html

[584] https://docs.slackware.com/doku.php?id=wiki:user:cmyster
[585] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_slackware_admin_building_the_linux_kernel_using_git_repository.html

[586] http://www.linuxfoundation.org/news-media/blogs/browse/2011/08/cracking-kernelorg
[587] http://kernel.org/
[588] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[589] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[590] https://wiki.gentoo.org/wiki/Safe_Cflags
[591] https://www.linuxquestions.org/questions/slackware-14/slackware-64bit-14-1-rc-kernel-3-10-16-and-virtualbox-4175481316/
[592] https://lkml.org/lkml/2013/4/16/473
[593] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[594] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[595] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh
[596] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh
[597] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[598] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[599] https://docs.slackware.com/doku.php?id=wiki:user:metaschima

[[_howtos_slackware_admin_querying_installed_packages.html

[600] http://www.slackbuilds.org
[601] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_slackware_admin_recovery_boot_option.html

[602] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_slackware_admin_grub_on_first_install.html

[603] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:installing_with_gpt_without_uefi
[604] https://docs.slackware.com/doku.php?id=wiki:user:ryanpcmcquen
[605] https://docs.slackware.com/doku.php?id=wiki:user:ruario

[[_howtos_slackware_admin_slackware_automation_using_ansible.html

[606] https://www.ansible.com/
[607] http://docs.ansible.com
[608] https://github.com/mmlj4/ansible_slackware_bootstrap
[609] https://github.com/mmlj4/ansible_slackware_bootstrap/blob/master/README.md

[[_howtos_slackware_admin_set_up_grub_as_boot_loader_on_uefi_based_hardware.html

[610] http://docs.slackware.com/howtos:slackware_admin:installing_on_uefi_hardware
[611] https://wiki.archlinux.org/index.php/Grub#UEFI_systems_2
[612] http://linux.dell.com/efibootmgr/
[613] https://docs.slackware.com/doku.php?id=wiki:user:arubin

[[_howtos_slackware_admin_building_packages_with_sbopkg.html

[614] https://sbopkg.org/
[615] https://slackbuilds.org/
[616] https://www.sbopkg.org/downloads.php
[617] https://www.sbopkg.org/docs.php
[618] http://gramps-project.org/
[619] https://www.sbopkg.org
[620] https://www.sbopkg.org/docs.php
[621] https://www.sbopkg.org/downloads.php
[622] https://www.sbopkg.org/queues.php
[623] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer
[624] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[625] https://docs.slackware.com/doku.php?id=wiki:user:willysr

[[_howtos_slackware_admin_creating_a_package_using_a_slackbuild_script.html

[626] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_use_slackware_installing_software
[627] http://slackbuilds.org/
[628] http://slackbuilds.org/
[629] http://slackbuilds.org/repository/13.0/games/pysolfc/
[630] http://downloads.sourceforge.net/pysolfc/PySolFC-1.1.tar.bz2
[631] http://slackbuilds.org/slackbuilds/13.0/games/pysolfc.tar.gz
[632] https://docs.slackware.com/doku.php?id=wiki:user:nocturnal.slacker
[633] https://noctslackv1.wordpress.com/2012/01/29/lets-build-a-slackbuild-revisited/

[[_howtos_slackware_admin_cross_compiling_the_linux_kernel.html

[634] https://buildroot.org
[635] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_slackware_admin_slackware-arubacloud.html

[636] https://www.arubacloud.com/vps/virtual-private-server-range.aspx
[637] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[638] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[639] https://slackbuilds.org/repository/14.2/system/open-vm-tools/?search=open-vm
[640] https://www.arubacloud.com/
[641] https://slackbuilds.org/repository/14.2/system/open-vm-tools/?search=open-vm
[642] https://docs.slackware.com/doku.php?id=wiki:user:andrixnet

[[_howtos_slackware_admin_building_a_package.html

[643] http://www.slackware.com/~mozes
[644] http://slack-desc.sourceforge.net
[645] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:slack-desc
[646] http://www.slackwiki.com/Building_A_Package
[647] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_slackware_admin_using_slackwares_kernel_build_scripts.html

[648] http://tty1.uk/scripts/kernel/
[649] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_howtos_slackware_admin_linux_kernel_options_for_uefi_and_elilo.html

[650] https://lkml.org/lkml/2013/4/16/473
[651] https://github.com/vathpela/efivar
[652] https://github.com/rhboot/efibootmgr
[653] ftp:https://docs.slackware.com/https://docs.slackware.com/mirrors.usc.eduhttps://docs.slackware.com/pubhttps://docs.slackware.com/linuxhttps://docs.slackware.com/distributionshttps://docs.slackware.com/slackwarehttps://docs.slackware.com/slackware64-14.1https://docs.slackware.com/README_UEFI.TXT
[654] https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi
[655] http://dl.dropbox.com/u/17629062/Shell2.zip
[656] http://blog.uncooperative.org/blog/2014/02/06/the-efi-system-partition/
[657] https://docs.slackware.com/doku.php?id=wiki:user:metaschima
[658] https://wiki.archlinux.org/index.php/UEFI
[659] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt

[[_howtos_slackware_admin_installing_on_uefi_hardware.html

[660] http://downloads.sourceforge.net/project/elilo/elilo/elilo-3.14/elilo-3.14-all.tar.gz
[661] https://docs.slackware.com/doku.php?id=wiki:user:ruario
[662] http://www.rodsbooks.com/efi-bootloaders/

[[_howtos_slackware_admin_hibernation.html

[663] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[664] http://slackware.osuosl.org/slackware-13.37/README_CRYPT.TXT
[665] http://www.slackwiki.com/Hibernate
[666] http://www.slackwiki.com/index.php?title=Hibernate&oldid=366
[667] http://www.slackwiki.com/index.php?title=Hibernate&oldid=368
[668] http://www.slackwiki.com/index.php?title=Hibernate&action=history
[669] https://docs.slackware.com/doku.php?id=wiki:user:yenn
[670] https://docs.slackware.com/doku.php?id=wiki:user:zithro

[[_howtos_slackware_admin_booting_install_from_hdd.html

[671] https://en.wikipedia.org/wiki/initrd
[672] http://slackware.osuosl.org/slackware64-14.0/kernels/huge.s/bzImage
[673] http://slackware.osuosl.org/slackware64-14.0/isolinux/initrd.img
[674] http://slackware.osuosl.org/slackware-14.0/kernels/hugesmp.s/bzImage
[675] http://slackware.osuosl.org/slackware-14.0/isolinux/initrd.img
[676] http://www.gnu.org/software/grub/manual/grub.html
[677] http://www.gnu.org/software/grub/manual/legacy/grub.html
[678] http://www.gnu.org/software/grub/manual/grub.html
[679] https://docs.slackware.com/doku.php?id=wiki:user:bormant

[[_howtos_slackware_admin_uefi_triple_boot_with_refind_on_slackware.html

[680] https://slackbuilds.org/
[681] https://sourceforge.net/projects/refind/
[682] https://docs.slackware.com/doku.php?id=wiki:user:aragorn2101
[683] http://www.rodsbooks.com/refind/

[[_howtos_slackware_admin_installing_with_gpt_without_uefi.html

[684] https://docs.slackware.com/doku.php?id=wiki:user:ruario
[685] http://www.linuxquestions.org/questions/slackware-14/fresh-install-64-14-1-with-gpt-without-efi-in-a-bios-motherboard-4175484184/#post5062475

[[_howtos_slackware_admin_efi_administration.html

[686] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_slackware_admin_runit.html

[687] http://smarden.org/runit/benefits.html
[688] https://slackbuilds.org/
[689] https://gitlab.com/chrisabela/runit_scripts_for_slackware
[690] https://slackbuilds.org/repository/14.2/system/runit-services/
[691] https://slackbuilds.org/repository/14.2/system/pause/
[692] https://docs.slackware.com/doku.php?id=howtos:general_admin:openrc
[693] https://wiki.gentoo.org/wiki/Runit#Runit_as_the_init_system
[694] https://gitlab.com/aadityabagga/runit-init-openrc
[695] https://github.com/void-linux/void-runit
[696] http://smarden.org/runit/
[697] https://en.wikipedia.org/wiki/Init
[698] https://voidlinux.org/usage/runit/
[699] https://www.youtube.com/watch?v=jiBlIhFxNJo
[700] http://kchard.github.io/runit-quickstart/
[701] https://www.slackbook.org/beta/
[702] https://gitlab.com/chrisabela/runit_scripts_for_slackware
[703] https://github.com/aadityabagga/runit-services
[704] https://wiki.gentoo.org/wiki/Runit
[705] https://github.com/void-linux/void-runit
[706] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela

[[_howtos_slackware_admin_systemupgrade.html

[707] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[708] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[709] http://www.nvidia.com/object/unix.html
[710] http://www2.ati.com/drivers/linux/installernotes.html
[711] https://docs.slackware.com/doku.php?id=howtos:hardware:proprietary_graphics_drivers
[712] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[713] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[714] http://slackware.com/~alien/multilib/
[715] http://slackware.com/~alien/multilib/14.0/
[716] https://docs.slackware.com/doku.php?id=howtos:software:java
[717] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_slackware_admin_kernelbuilding.html

[718] http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html
[719] http://www.slackware.com/~alien/tools/mkinitrd_command_generator.sh
[720] http://www.kernel.org/signature.html
[721] http://coredump.cl/wiki/doku.php?id=compilaci%C3%B3n_de_kernel
[722] http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding
[723] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[724] https://github.com/jose1711/slackware_stuff/blob/master/build_kernel_slackware.sh

[[_howtos_slackware_admin_set_up_syslinux_as_boot_loader_on_uefi_based_hardware.html

[725] http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project
[726] http://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi
[727] https://en.wikipedia.org/wiki/GUID_Partition_Table
[728] https://www.kernel.org/pub/linux/utils/boot/syslinux/
[729] http://www.syslinux.org/wiki/index.php?title=Library_modules
[730] http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project
[731] https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface

[[_howtos_slackware_admin_install_slackware_on_a_online.net_dedibox_baremetal_server.html

[732] https://www.online.net/en
[733] https://www.online.net/en/dedicated-server#anchor-start
[734] https://console.online.net/
[735] https://console.online.net/
[736] https://www.linuxquestions.org/
[737] https://www.linuxquestions.org/questions/linux-security-4/verifying-host-authenticity-ssh-after-logging-in-over-then-accessible-secure-serial-terminal-4175593807/#post5655311
[738] https://console.online.net/en/server/state/XXXXX/bmc
[739] https://www.linuxquestions.org/questions/linux-security-4/verifying-host-authenticity-ssh-after-logging-in-over-then-accessible-secure-serial-terminal-4175593807/#post5655311
[740] https://wiki.archlinux.org/index.php/LVM
[741] https://docs.slackware.com/doku.php?id=wiki:user:atelszewski

[[_howtos_slackware_admin_how_to_use_slackware_installing_software.html

[742] http://packages.slackware.com/
[743] http://slackfind.net/
[744] http://slacky.eu/
[745] http://salixos.org/
[746] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[747] http://www.slackware.com/~mozes/
[748] http://www.src2pkg.net/
[749] http://asic-linux.com.mx/~izto/checkinstall/
[750] http://code.google.com/p/deb2tgz/
[751] http://joeyh.name/code/alien/
[752] http://www.slackware.com/~alien/slackbuilds/
[753] http://www.slackware.com/~alien/restricted_slackbuilds/
[754] http://taper.alienbase.nl/mirrors/alien-kde/
[755] http://www.slackware.com/~alien/multilib/
[756] http://rlworkman.net/pkgs/
[757] http://www.droplinegnome.org/
[758] http://www.microlinux.fr/mled.php
[759] http://mateslackbuilds.github.io/
[760] http://ponce.cc/slackware/
[761] http://slacky.eu/
[762] http://salixos.org/
[763] https://docs.slackware.com/doku.php?id=wiki:user:peterwwillis
[764] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[765] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_slackware_admin_swapfile_hibernation.html

[766] http://slackware.osuosl.org/slackware-14.0/README_CRYPT.TXT
[767] https://wiki.archlinux.org/index.php/Swap
[768] https://answers.launchpad.net/ubuntu/+source/initramfs-tools/+question/193862
[769] https://docs.slackware.com/doku.php?id=wiki:user:fl0

[[_howtos_general_admin_setting_up_a_slackware_chroot.html

[770] http://www.slackware.com/getslack/
[771] http://tty1.uk/scripts/slackware/mkchroot
[772] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_chroot_from_media
[773] https://raw.githubusercontent.com/aadityabagga/scripts/master/chroot.sh
[774] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[775] http://www.thegeekstuff.com/2013/01/mount-umount-examples/
[776] https://wiki.archlinux.org/index.php/Chroot
[777] http://www.linuxquestions.org/questions/slackware-installation-40/install-slackware-to-a-folder-using-chroot-825598/#post4093831
[778] https://docs.slackware.com/doku.php?id=wiki:user:aaditya

[[_howtos_general_admin_install_fonts.html

[779] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_general_admin_rdiff-backup.html

[780] http://rdiff-backup.nongnu.org/
[781] https://slackbuilds.org/result/?search=librsync
[782] https://slackbuilds.org/result/?search=rdiff-backup
[783] https://docs.slackware.com/doku.php?id=wiki:user:klaatu

[[_howtos_general_admin_files_filesystem_copying_over_network.html

[784] http://www.linuxquestions.org/questions/slackware-14/copy-whole-filesystem-via-scp-4175449321/#post4887869
[785] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_general_admin_free_your_space.html

[786] http://slackbuilds.org/repository/13.37/system/ncdu/
[787] http://slackbuilds.org/repository/13.37/system/ncdu/
[788] http://www.slackbuilds.org
[789] http://docs.slackware.com/howtos:lets_build_a_slackbuild
[790] http://www.slackwiki.com/Writing_A_SlackBuild_Script
[791] http://www.src2pkg.net/
[792] http://www.kde.org/applications/utilities/sweeper/
[793] http://bleachbit.sourceforge.net/
[794] http://slackbuilds.org/
[795] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex
[796] http://www.slackword.net/?p=78
[797] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[798] https://docs.slackware.com/doku.php?id=wiki:user:cpt

[[_howtos_general_admin_kvm_libvirt.html

[799] http://libvirt.org
[800] http://www.linux-kvm.org/page/Main_Page
[801] http://www.slackbuilds.org
[802] http://www.slackbuilds.org
[803] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:pxe
[804] http://libvirt.org
[805] http://virt-manager.org
[806] http://wiki.qemu.org/Index.html
[807] http://www.linux-kvm.org/page/Main_Page
[808] https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/index.html
[809] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_general_admin_task_scheduling.html

[810] https://docs.slackware.com/doku.php?id=howtos:software:at
[811] https://docs.slackware.com/doku.php?id=howtos:software:cron
[812] https://docs.slackware.com/doku.php?id=howtos:software:anacron
[813] http://slackbuilds.org/repository/13.37/system/anacron/
[814] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[815] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot
[816] https://docs.slackware.com/doku.php?id=wiki:user:tdrssb
[817] https://docs.slackware.com/doku.php?id=howtos:general_admin:en.wikipedia.org_wiki_cron

[[_howtos_general_admin_taskwarrior.html

[818] http://taskwarrior.org
[819] http://slackbuilds.org/office/task/
[820] http://slackbuilds.org/development/lua/
[821] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[822] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[823] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_general_admin_resize_a_qemu_raw_image_with_an_ntfs_filesytem.html

[824] http://cauldrondevelopment.com/blog/2009/02/26/resize-qemu-ntfs-image/

[[_howtos_general_admin_udev_rules.html

[825] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_general_admin_cli_constructs_and_useful_info.html

[826] http://www.commandlinefu.com/commands/browse
[827] http://www.grymoire.com/Unix/Quote.html
[828] http://www.grymoire.com/Unix/Regular.html
[829] http://www.regular-expressions.info/
[830] http://xdialog.free.fr/
[831] https://sites.google.com/site/easybashgui/home
[832] http://code.google.com/p/gtkdialog/
[833] http://www.grymoire.com/Unix/
[834] http://www.tldp.org/LDP/abs/html/index.html
[835] http://www.catonmat.net/projects/cheat-sheets/
[836] http://www.zzee.com/solutions/linux-permissions.shtml
[837] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh

[[_howtos_general_admin_searching_and_reading_manpages_efficiently.html

[838] http://www.slackbuilds.org
[839] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_general_admin_openrc.html

[840] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[841] http://slackbuilds.org/repository/14.2/system/openrc/
[842] http://slackbuilds.org/repository/14.2/system/openrc-services/
[843] https://github.com/ConsoleKit2/ConsoleKit2/pull/113
[844] https://github.com/ConsoleKit2/ConsoleKit2/pull/113
[845] https://wiki.gentoo.org/wiki/OpenRC#openrc-init
[846] https://en.wikipedia.org/wiki/OpenRC
[847] https://wiki.gentoo.org/wiki/OpenRC
[848] https://github.com/OpenRC/openrc/
[849] https://github.com/OpenRC/openrc/blob/master/user-guide.md
[850] https://www.linuxquestions.org/questions/slackware-14/using-openrc-on-slackware-4175542567/
[851] https://gitlab.com/aadityabagga/openrc-services
[852] https://docs.slackware.com/doku.php?id=wiki:user:aaditya

[[_howtos_general_admin_serial_console.html

[853] http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO
[854] http://www.gnu.org/software/screen/manual
[855] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_software_rtai.html

[856] https://www.rtai.org/
[857] http://archive.li/fGaKC
[858] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_software_man2html.html

[859] https://docs.slackware.com/doku.php?id=howtos:software:asciidoc_mini_howto
[860] http://slackbuilds.org/office/pandoc/
[861] http://www.w3.org/Tools/info2www.html
[862] https://docs.slackware.com/doku.php?id=howtos:software:asciidoc_mini_howto
[863] https://docs.slackware.com/doku.php?id=wiki:user:pdi
[864] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_how_to_merge_pdf-files.html

[865] http://slackbuilds.org/repository/14.0/office/pdftk/
[866] http://slackbuilds.org/repository/14.0/office/pdfshuffler/
[867] http://slackbuilds.org/repository/14.0/python/pyPdf/
[868] http://slackbuilds.org/repository/14.0/python/pypoppler/
[869] https://docs.slackware.com/doku.php?id=wiki:user:markush
[870] http://www.linuxquestions.org/questions/slackware-14/which-tool-for-merging-pdf-files-4175453632/

[[_howtos_software_firefox.html

[871] https://github.com/mozilla/pdf.js
[872] https://docs.slackware.com/doku.php?id=wiki:user:arfon
[873] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[874] http://alien.slackbook.org/blog/make-firefox-understand-downloaded-files/
[875] http://www.linuxquestions.org/questions/slackware-14/make-firefox-aware-of-kde-apps-615686/#post4627197
[876] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_phoronix_test_suite.html

[877] https://www.phoronix-test-suite.com/
[878] https://slackbuilds.org/repository/14.2/system/phoronix-test-suite/
[879] http://openbenchmarking.org/showdown/pts/build-linux-kernel
[880] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_software_tmux.html

[881] http://slackbuilds.org/
[882] http://tmux.sourceforge.net/
[883] http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/FAQ
[884] http://tmux.sourceforge.net/
[885] http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/
[886] http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
[887] http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily
[888] https://docs.slackware.com/doku.php?id=wiki:user:escaflown

[[_howtos_software_efficient_cli_navigation.html

[889] https://docs.slackware.com/doku.php?id=slackbook:shell
[890] http://linux.byexamples.com/archives/138/directory-stack/#comment-99015
[891] http://www.slackword.net/?p=494
[892] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_software_texlive.html

[893] http://slackbuilds.org/
[894] http://www.tug.org/texlive/acquire-netinstall.html
[895] https://docs.slackware.com/doku.php?id=wiki:user:vaporseb

[[_howtos_software_cacti.html

[896] https://slackbuilds.org/repository/14.2/libraries/rrdtool
[897] https://slackbuilds.org/repository/14.2/network/cacti/
[898] https://docs.slackware.com/doku.php?id=howtos:network_services:httpd
[899] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware
[900] http://YOUR_MACHINE/cacti/install.php
[901] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_software_arpwatch.html

[902] https://en.wikipedia.org/wiki/IP_address
[903] https://en.wikipedia.org/wiki/MAC_address
[904] https://en.wikipedia.org/wiki/Address_Resolution_Protocol
[905] https://en.wikipedia.org/wiki/LAN
[906] https://en.wikipedia.org/wiki/ARP_spoofing
[907] https://slackbuilds.org/result/?search=arpwatch&sv=
[908] https://slackbuilds.org/howto/
[909] https://slackbuilds.org/faq/
[910] https://docs.slackware.com/doku.php?id=howtos:network_services:configuring_a_wireless_access_point
[911] https://ee.lbl.gov/
[912] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_software_irssi.html

[913] http://slackbuilds.org/result/?search=tor
[914] http://slackbuilds.org/result/?search=torsocks
[915] http://slackbuilds.org/result/?search=vidalia
[916] http://freenode.net/faq.shtml#nicksetup
[917] http://software.jaos.org/#cpan2tgz
[918] http://software.jaos.org/git/cpan2tgz
[919] http://slackbuilds.org/result/?search=cpan2tgz
[920] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[921] http://www.irssi.org/
[922] https://tools.ietf.org/html/rfc1459
[923] http://freenode.net/
[924] https://www.torproject.org/
[925] http://www.andrews-corner.org/irssi.html
[926] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela
[927] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_snmptrapd.html

[928] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_asciidoc.html

[929] https://docs.slackware.com/doku.php?id=howtos:software:man2html_mini_howto
[930] https://medium.com/@chacon/living-the-future-of-technical-writing-2f368bd0a272
[931] http://asciidoctor.org/
[932] http://slackbuilds.org/graphics/dblatex/
[933] http://dblatex.sourceforge.net/
[934] http://slackbuilds.org/system/source-highlight/
[935] https://www.gnu.org/software/src-highlite/source-highlight.html
[936] https://asciidoc.googlecode.com/hg/vim/syntax/asciidoc.vim
[937] http://www.methods.co.nz/asciidoc/chunked/ape.html
[938] http://asciidoc.org/
[939] http://asciidoc.org/userguide.html#X24
[940] https://docs.slackware.com/doku.php?id=howtos:software:man2html_mini_howto
[941] http://search.cpan.org/~diberri/HTML-WikiConverter-DokuWiki-0.53/lib/HTML/WikiConverter/DokuWiki.pm
[942] http://search.cpan.org/dist/HTML-WikiConverter/lib/HTML/WikiConverter.pm
[943] http://www.linuxquestions.org/questions/slackware-14/asciidoc-mini-howto-4175528145/
[944] https://docs.slackware.com/doku.php?id=wiki:user:pdi
[945] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_zabbix.html

[946] http://www.zabbix.com/
[947] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware
[948] https://docs.slackware.com/doku.php?id=howtos:software:httpd
[949] http://slackbuilds.org/repository/14.0/network/zabbix_agentd/
[950] http://slackbuilds.org/repository/14.0/network/zabbix_proxy/
[951] http://slackbuilds.org/repository/14.0/network/zabbix_server/
[952] http://slackbuilds.org/repository/14.0/network/zabbix_agentd/
[953] http://slackbuilds.org/repository/14.0/network/zabbix_proxy/
[954] http://slackbuilds.org/repository/14.0/network/zabbix_server/
[955] https://docs.slackware.com/doku.php?id=wiki:user:arfon
[956] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot
[957] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_ntop.html

[958] http://ntopmachine:3000

[[_howtos_software_monit.html

[959] https://mmonit.com/monit/
[960] https://slackbuilds.org/
[961] http://127.0.0.1:2812/
[962] https://mmonit.com/wiki/Monit/ConfigurationExamples
[963] https://mmonit.com/wiki/Monit/EnableSSLInMonit
[964] https://mmonit.com/wiki/Monit/Gmail
[965] https://mmonit.com/wiki/Monit/CustomTests
[966] https://docs.slackware.com/doku.php?id=wiki:user:lamerix

[[_howtos_software_boinc_gpu_ati_slackware.html

[967] http://boinc.berkeley.edu/dl/boinc_7.2.33_x86_64-pc-linux-gnu.sh
[968] http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/
[969] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_software_google_chrome.html

[970] http://slackbuilds.org/result/?search=chromium
[971] http://www.chromium.org/Home
[972] http://mirrors.slackware.com/slackware/slackware-current/extra/google-chrome/README
[973] http://mirrors.slackware.com/
[974] http://www.google.com/chrome
[975] http://slackbuilds.org/mirror/slackware/slackware-14.1/extra/google-chrome/
[976] http://www.chromium.org/getting-involved/dev-channel
[977] http://www.chromium.org/getting-involved/dev-channel
[978] http://mirrors.slackware.com/slackware/slackware-current/extra/google-chrome/README
[979] https://docs.slackware.com/doku.php?id=wiki:user:escaflown

[[_howtos_software_start.html

[980] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:start
[981] https://docs.slackware.com/doku.php?id=howtos:general_admin:start
[982] https://docs.slackware.com/doku.php?id=howtos:cloud:start
[983] https://docs.slackware.com/doku.php?id=howtos:databases:start
[984] https://docs.slackware.com/doku.php?id=howtos:emulators:start
[985] https://docs.slackware.com/doku.php?id=howtos:multimedia:start
[986] https://docs.slackware.com/doku.php?id=howtos:network_services:start
[987] https://docs.slackware.com/doku.php?id=howtos:security:start
[988] https://docs.slackware.com/doku.php?id=howtos:window_managers:start

[[_howtos_software_xpdf.html

[989] http://docs.slackware.com/slackbook:printing?s[]=cups#setting_up_a_printer_in_cups
[990] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_software_template.html

[991] https://docs.slackware.com/doku.php?id=howtos:software:link_here

[[_howtos_software_zoneminder.html

[992] https://docs.slackware.com/doku.php?id=howtos:software:ffmpeg
[993] https://docs.slackware.com/doku.php?id=howtos:software:mariadb
[994] https://slackbuilds.org/repository/14.2/system/ZoneMinder/
[995] https://docs.slackware.com/doku.php?id=wiki:user:arfon
[996] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_nagios.html

[997] http://sbopkg.org/
[998] http://slackbuilds.org/
[999] http://slackbuilds.org/network/nagios/
[1000] http://YOUR_MACHINE/nagios/
[1001] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_software_palemoon.html

[1002] https://www.palemoon.org/
[1003] https://slackbuilds.org/repository/14.2/development/gcclegacy494/
[1004] http://repo.khronosschoty.org/Slackware/gcc4.9.4/
[1005] http://repo.khronosschoty.org/Slackware/Pale-Moon/
[1006] http://www.slackware.com/~alien/slackbuilds/palemoon/
[1007] https://notabug.org/khronosschoty/SlackBuilds/src/master/network/palemoon
[1008] https://slackbuilds.org/repository/14.2/development/gcclegacy494/
[1009] https://notabug.org/khronosschoty/SlackBuilds/archive/master.tar.gz/
[1010] https://notabug.org/khronosschoty/SlackBuilds/archive/master.tar.gz
[1011] http://docs.slackware.com/howtos:software:palemoon#installation_instructions_for_slackware_142
[1012] http://docs.slackware.com/howtos:software:palemoon#installation_instructions_for_slackware_142
[1013] https://addons.palemoon.org/
[1014] https://addons.mozilla.org/firefox/
[1015] https://addons.palemoon.org/
[1016] http://prefbar.tuxfamily.org/
[1017] https://addons.mozilla.org/en-US/firefox/addon/keefox/versions/
[1018] https://slackbuilds.org/repository/14.2/misc/KeePassHttp/
[1019] https://addons.mozilla.org/en-US/firefox/addon/passifox/
[1020] https://www.palemoon.org/knownissues.shtml
[1021] https://bugzilla.mozilla.org/show_bug.cgi?id=733324#c9
[1022] http://www.slackware.com/~alien/slackbuilds/oxygen-gtk2/
[1023] https://www.palemoon.org/
[1024] https://docs.slackware.com/doku.php?id=howtos:software:google-chrome
[1025] https://docs.slackware.com/doku.php?id=howtos:software:google-chrome
[1026] https://docs.slackware.com/doku.php?id=wiki:user:khronosschoty

[[_howtos_software_at.html

[1027] http://unixhelp.ed.ac.uk/CGI/man-cgi?at
[1028] http://www.brunolinux.com/02-The_Terminal/The_at_Command.html
[1029] http://sathyaphoenix.wordpress.com/2009/01/18/using-at-command-to-schedule-jobs-in-linux/
[1030] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_software_java.html

[1031] http://www.oracle.com/technetwork/java/javase/downloads/index.html
[1032] http://www.java.com/en/download/installed.jsp
[1033] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[1034] http://slackware.com/~alien/slackbuilds/openjdk/
[1035] http://slackware.com/~alien/slackbuilds/icedtea-web
[1036] http://slackware.com/~alien/slackbuilds/rhino
[1037] http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt
[1038] https://en.wikipedia.org/wiki/Dot_
[1039] http://slackware.org.uk/slackware/slackware64-current/extra/java/README
[1040] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex
[1041] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_software_mplayer.html

[1042] http://www.linuxquestions.org/questions/slackware-14/slackware-documentation-project-4175422561/
[1043] http://zuttobenkyou.wordpress.com/2009/01/17/how-to-quickly-make-a-playlist-for-mplayer/
[1044] https://docs.slackware.com/doku.php?id=wiki:user:aschyiel

[[_howtos_zfs_home.html

[1045] http://fsf.org
[1046] http://opensource.org/
[1047] http://openzfs.org
[1048] http://zfsonlinux.org
[1049] http://slackbuilds.org
[1050] http://sbopkg.org
[1051] http://mathworld.wolfram.com/Intersection.html
[1052] https://docs.slackware.com/doku.php?id=wiki:user:dchmelik

[[_howtos_multimedia_netflix.html

[1053] http://docs.slackware.com/howtos:software:google-chrome

[[_howtos_multimedia_steam.html

[1054] https://en.wikipedia.org/wiki/Steam_%28software%29
[1055] https://docs.slackware.com/doku.php?id=slackware:multilib
[1056] http://www.slackware.com/~alien/slackbuilds/steamclient/
[1057] https://github.com/ValveSoftware/steam-for-linux/issues/1179#issuecomment-26445442
[1058] https://slackbuilds.org/repository/14.2/libraries/OpenAL/
[1059] https://slackbuilds.org/repository/14.2/libraries/libtxc_dxtn/
[1060] http://steamcommunity.com/app/238460/discussions/1/540741858956217983/?ctp=2#c540741859210052192
[1061] https://wiki.archlinux.org/index.php/Steam
[1062] http://alien.slackbook.org/blog/valves-steam-client-for-linux/
[1063] http://alien.slackbook.org/blog/steam-games-in-slackware/

[[_howtos_multimedia_pulseaudio_non-default.html

[1064] https://en.wikipedia.org/wiki/BlueZ
[1065] http://www.slackware.com/changelog/current.php?cpu=x86_64
[1066] https://wiki.archlinux.org/index.php/PulseAudio#ALSA.2Fdmix_without_grabbing_hardware_device
[1067] http://alien.slackbook.org/blog/tag/kde5/
[1068] https://docs.slackware.com/doku.php?id=howtos:multimedia:pulseaudio
[1069] https://docs.slackware.com/doku.php?id=wiki:user:lonestar

[[_howtos_multimedia_htpc.html

[1070] https://slackbuilds.org/result/?search=kodi&sv=
[1071] https://slackbuilds.org/result/?search=ffmpeg&sv=
[1072] http://www.sbopkg.org
[1073] https://docs.slackware.com/doku.php?id=howtos:network_services:home_nfs_howto
[1074] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_multimedia_pulseaudio.html

[1075] https://github.com/i-rinat/apulse
[1076] http://slackbuilds.org/repository/14.1/audio/pulseaudio/
[1077] http://repository.slacky.eu/
[1078] http://files.z01.eu/skype/
[1079] https://docs.slackware.com/doku.php?id=slackware:multilib
[1080] http://alsa.opensrc.org/Dsnoop
[1081] http://slackbuilds.org/repository/14.1/desktop/xfce4-volumed-pulse/
[1082] http://slackbuilds.org/repository/14.1/audio/ponymix/
[1083] https://wiki.archlinux.org/index.php/PulseAudio
[1084] https://docs.slackware.com/doku.php?id=wiki:user:fsleg

[[_howtos_multimedia_digital_audio_workstation_compensating_latency.html

[1085] https://wiki.linuxaudio.org/wiki/jack_latency_tests
[1086] https://www.systutorials.com/docs/linux/man/1-jack_iodelay/
[1087] https://manual.ardour.org/synchronization/latency-and-latency-compensation/
[1088] https://docs.slackware.com/doku.php?id=wiki:user:0xbf
[1089] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_multimedia_digital_audio_workstation_minimizing_latency.html

[1090] https://docs.slackware.com/doku.php?id=howtos:multimedia:digital_audio_workstation:compensating_latency
[1091] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[1092] https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface
[1093] http://linuxmusicians.com
[1094] https://alien.slackbook.org/blog/configuring-slackware-for-use-as-a-daw/
[1095] https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface
[1096] https://github.com/jackaudio/jackaudio.github.com/wiki/Differences-between-jack1-and-jack2
[1097] https://github.com/Gimmeapill/xruncounter
[1098] https://linuxmusicians.com/viewtopic.php?f=27&t=19268
[1099] https://linuxmusicians.com/viewtopic.php?f=27&t=19858&start=15
[1100] https://gist.github.com/SaveTheRbtz/f5e8d1ca7b55b6a7897b
[1101] https://docs.slackware.com/doku.php?id=wiki:user:0xbf

[[_howtos_multimedia_digital_audio_workstation_start.html

[1102] http://ardour.org/
[1103] https://lmms.io/
[1104] https://www.ableton.com/
[1105] https://www.image-line.com/flstudio/
[1106] https://new.steinberg.net/cubase/
[1107] https://www.avid.com/pro-tools
[1108] https://docs.slackware.com/doku.php?id=studioware:start
[1109] http://www.bandshed.net/avlinux/
[1110] https://qstudio64.tumblr.com/
[1111] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_multimedia_digital_audio_workstation_connecting_midi_devices.html

[1112] https://manual.ardour.org/setting-up-your-system/setting-up-midi/midi-on-linux/
[1113] http://linux-audio.4202.n7.nabble.com/Is-Xalsarawidi-the-same-as-Xraw-or-Xseq-td106370.html
[1114] https://discourse.ardour.org/t/midi-latency-measurement/87829
[1115] https://github.com/x42/jack_midi_latency
[1116] https://docs.slackware.com/doku.php?id=wiki:user:0xbf

[[_howtos_security_ssh.html

[1117] http://www.openssh.org
[1118] http://www.openssh.org
[1119] http://www.openssh.org
[1120] http://www.openssh.org
[1121] http://www.openssh.org
[1122] http://puppetlabs.com/
[1123] http://null.redcodenetwork.ro/changing-the-ssh-port-without-changing-it/
[1124] http://openssh.org/manual.html
[1125] https://docs.slackware.com/doku.php?id=wiki:user:noryungi

[[_howtos_security_installing_tor_using_a_slackbuild_script.html

[1126] https://www.torproject.org/index.html.en
[1127] http://slackbuilds.org/repository/13.37/libraries/libevent/
[1128] http://slackbuilds.org/repository/13.37/network/tor/
[1129] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:creating_a_package_using_a_slackbuild_script
[1130] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[1131] https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-basic/
[1132] https://torcheck.xenobite.eu/
[1133] https://docs.slackware.com/doku.php?id=wiki:user:nocturnal.slacker
[1134] https://www.torproject.org/download/
[1135] https://tb-manual.torproject.org/
[1136] https://docs.slackware.com/doku.php?id=wiki:user:nocturnal.slacker
[1137] https://noctslackv1.wordpress.com/2011/09/12/tor-on-slackware-and-arch/

[[_howtos_security_basic_security.html

[1138] http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/
[1139] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[1140] http://www.slackware.com/~alien/efg/
[1141] http://www.fwbuilder.org/
[1142] http://bugs.xfree86.org/show_bug.cgi?id=1376
[1143] http://whatismyipaddress.com/
[1144] https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
[1145] http://rkhunter.sourceforge.net/
[1146] http://www.clamav.net/lang/en/
[1147] http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/
[1148] http://slackwiki.com/Basic_Security_Fixes
[1149] http://slackwiki.com/Security_Assessment_using_Nmap

[[_howtos_security_openvpn.html

[1150] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[1151] http://mirrors.slackware.com/slackware/slackware64-14.0/source/n/openvpn/
[1152] http://en.wikipedia.org/wiki/Openvpn
[1153] https://docs.slackware.com/doku.php?id=wiki:user:comfree

[[_howtos_security_enabling_encrypted_swap.html

[1154] http://www.milner.ca/article/slackware-encrypted-swap
[1155] https://docs.slackware.com/doku.php?id=wiki:user:nyteowl

[[_howtos_security_enabling_secure_boot.html

[1156] https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git/
[1157] https://git.kernel.org/cgit/linux/kernel/git/jejb/sbsigntools.git/
[1158] http://slackbuilds.org
[1159] https://technet.microsoft.com/en-us/library/dn747883.aspx
[1160] https://docs.slackware.com/doku.php?id=wiki:user:turtleli
[1161] http://uefi.org
[1162] http://www.rodsbooks.com/efi-bootloaders/secureboot.html
[1163] http://blog.hansenpartnership.com/
[1164] https://technet.microsoft.com/en-us/library/dn747883.aspx

[[_howtos_security_start.html

[1165] http://www.slackware.com/lists/
[1166] http://www.slackware.com/security/
[1167] http://www.gilandre.net/cgi-bin/wiki.cgi/InstallDenyHostsOnSlackware
[1168] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[1169] https://docs.slackware.com/doku.php?id=howtos:security:inetd
[1170] https://docs.slackware.com/doku.php?id=howtos:security:ssh
[1171] https://docs.slackware.com/doku.php?id=howtos:security:enabling_encrypted_swap

[[_howtos_security_sshkeys.html

[1172] http://www.openssh.org
[1173] http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&apropos=0&sektion=1&manpath=OpenBSD+5.1&arch=i386&format=html
[1174] http://openssh.org/manual.html
[1175] https://docs.slackware.com/doku.php?id=wiki:user:noryungi

[[_howtos_misc_beaglebone_black_getting_started.html

[1176] https://beagleboard.org/getting-started
[1177] https://beagleboard.org/static/Drivers/Linux/FTDI/mkudevrule.sh
[1178] http://192.168.7.2
[1179] https://beagleboard.org/getting-started

[[_howtos_misc_xen_domu_guest.html

[1180] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming
[1181] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_fluxbox_setting_different_wallpapers_on_different_workspaces.html

[1182] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_misc_checking_a_slackware_version.html

[1183] http://slackjeff.com.br/artigos/verificando_versao_slackware.html
[1184] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_slackware_docker_image.html

[1185] https://hub.docker.com/r/vbatts/slackware/
[1186] https://github.com/vbatts/slackware-docker
[1187] http://docs.docker.com/reference/builder/
[1188] https://github.com/lotabout/docker-slackware/blob/master/slackware-slackpkgplus/Dockerfile
[1189] https://github.com/josemrb/docker-slackware/blob/develop/nginx/Dockerfile
[1190] https://docs.slackware.com/doku.php?id=wiki:user:lamerix
[1191] https://github.com/vbatts/slackware-docker
[1192] https://hub.docker.com/r/vbatts/slackware/

[[_howtos_misc_virtualisation_vmware_guest.html

[1193] https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.server_configclassic.doc_41/esx_server_config/security_deployments_and_recommendations/t_enable_copy_and_paste_operations_between_the_guest_operating_system_and_remote_console.html
[1194] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_ssh_on_tor.html

[1195] http://slackbuilds.org
[1196] https://www.antagonism.org/anon/ssh-tor.shtml

[[_howtos_misc_approach_to_web_development_on_slackware.html

[1197] https://docs.slackware.com/doku.php?id=howtos:misc:slackbuilds.org
[1198] http://localhost:8080
[1199] http://localhost:8080/
[1200] https://getcomposer.org/
[1201] https://packagist.org/
[1202] https://www.apachefriends.org/index.html
[1203] https://docs.slackware.com/doku.php?id=wiki:user:captain_sensible

[[_howtos_misc_openxenmanager.html

[1204] https://github.com/OpenXenManager/openxenmanager/archive/master.zip
[1205] https://github.com/OpenXenManager/openxenmanager
[1206] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_misc_proxying_smtp.html

[1207] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_misc_connect_client_over_ssh_tunnel_to_mariadb.html

[1208] https://docs.slackware.com/doku.php?id=howtos:databases:install_mariadb_on_slackware
[1209] https://mariadb.com/kb/en/library/data-in-transit-encryption/
[1210] https://www.slackbuilds.org/
[1211] https://mariadb.com/resources/blog/connecting-to-mariadb-through-an-ssh-tunnel/
[1212] https://docs.slackware.com/doku.php?id=wiki:user:mahafyi

[[_howtos_misc_slackware_router_-_quick_and_dirty.html

[1213] http://sarpi.fatdog.eu
[1214] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_misc_network_policy_based_routing.html

[1215] http://man7.org/linux/man-pages/man8/ip-rule.8.html
[1216] https://docs.slackware.com/doku.php?id=wiki:user:lamerix

[[_howtos_misc_software_raid_troubleshoot_howto.html

[1217] http://bear.alienbase.nl/mirrors/slackware-live/
[1218] http://www.linuxquestions.org/questions/slackware-14/repair-lilo-on-software-raid1-4175593663/
[1219] https://bugzilla.redhat.com/show_bug.cgi?id=606481
[1220] https://www.linux.org.ru/forum/admin/13033496?lastmod=1479927790872
[1221] https://raid.wiki.kernel.org/index.php/Linux_Raid
[1222] https://www.kernel.org/doc/Documentation/md.txt
[1223] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[1224] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_misc_anatomy_of_a_slackbuild.html

[1225] https://alien.slackbook.org/AST/
[1226] https://slackbuilds.org/repository/14.2/academic/latex2html/?search=latex2html
[1227] https://github.com/latex2html/latex2html/releases
[1228] https://github.com/latex2html/latex2html/archive/v2019.2/latex2html-2019.2.tar.gz
[1229] https://docs.slackware.com/doku.php?id=wiki:user:captain_sensible
[1230] https://slackbuilds.org/templates/
[1231] https://slackbuilds.org/repository/14.2/academic/latex2html/?search=latex2html
[1232] https://docs.slackware.com/doku.php?id=wiki:user:captain_sensible

[[_howtos_misc_get_acquainted_with_slackware.html

[1233] http://slackware.com
[1234] https://www.patreon.com/slackwarelinux/overview
[1235] http://mirrors.slackware.com/slackware/slackware-iso/
[1236] http://mirrors.slackware.com/
[1237] http://www.slackware.com/getslack/torrents.php
[1238] http://mirrors.slackware.com/slackware/
[1239] http://packages.slackware.com/
[1240] http://mirrors.slackware.com/slackware/slackware-iso/
[1241] http://docs.slackware.com
[1242] http://www.linuxquestions.org/questions/slackware-14/
[1243] http://wiki.linuxquestions.org/wiki/Slackware-Links
[1244] http://slint.fr
[1245] http://slint.fr/installer.html
[1246] http://slint.fr/package.html
[1247] http://mirrors.slackware.com/slackware/
[1248] http://mirrors.slackware.com/slackware/slackware-iso/
[1249] http://tmux.sourceforge.net/
[1250] http://packages.slackware.com/
[1251] http://slackbuilds.org
[1252] http://slackbuilds.org/howto/
[1253] http://www.sbopkg.org/
[1254] http://slackbuilds.org/
[1255] http://www.slackware.com/~alien/slackbuilds/
[1256] http://rlworkman.net/pkgs/
[1257] http://ponce.cc/slackware/
[1258] http://www.slackware.org.uk/
[1259] http://www.salixos.org/
[1260] http://www.slackware.org.uk/msb/
[1261] http://slacky.eu/slacky/Pagina_principale
[1262] http://slackbuilds.org
[1263] http://slakfinder.org/slackpkg+.html
[1264] http://slackbuilds.org/templates/
[1265] http://docs.slackware.com
[1266] http://www.slackware.com/changelog/
[1267] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_devastator_scroll_lock.html

[1268] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_script_autostart_output_to_console_x.html

[1269] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[1270] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_misc_variables_in_bash.html

[1271] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_network_interace_bonding.html

[1272] http://libteam.org/
[1273] https://docs.slackware.com/doku.php?id=wiki:user:lamerix

[[_howtos_misc_lxc.html

[1274] https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/
[1275] https://en.wikipedia.org/wiki/LXC
[1276] https://linuxcontainers.org/
[1277] https://wiki.debian.org/LXC
[1278] https://www.linuxquestions.org/questions/slackware-14/starting-lxc-container-in-slackware-14-2-a-4175614421/
[1279] https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/
[1280] https://docs.slackware.com/doku.php?id=wiki:user:montagdude

[[_howtos_misc_enabling_sudo_on_slackware.html

[1281] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_biffs_slackware_tips.html

[1282] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[1283] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_slackware64_current_with_lvm_and_luks_on_linodecloud.html

[1284] https://www.linuxquestions.org/questions/slackware-14/linode-update-to-current-success-4175632480/
[1285] http://ftp.slackware.com/pub/slackware/slackware64-current/README_CRYPT.TXT
[1286] https://mirrors.slackware.com/
[1287] https://www.linuxquestions.org/questions/slackware-14/grub-error-in-latest-slackware-current-4175693691/
[1288] https://www.linode.com/docs/guides/use-luks-for-full-disk-encryption/
[1289] https://docs.slackware.com/doku.php?id=wiki:user:mahafyi

[[_howtos_misc_games_ut2004.html

[1290] https://www.linuxquestions.org/questions/blog/disturbed1-175451/native-ut2004-from-gog-com-3305/

[[_howtos_misc_wireless_with_wpa_cli.html

[1291] https://wiki.archlinux.org/index.php/WPA_supplicant
[1292] https://docs.slackware.com/doku.php?id=wiki:user:slackwood

[[_howtos_misc_how-to_translate_a_document_in_asciidoc_format.html

[1293] http://asciidoc.org/
[1294] http://slint.fr/slint.html.en
[1295] http://slint.fr/slint.en.txt
[1296] http://asciidoc.org/userguide.html
[1297] http://powerman.name/doc/asciidoc
[1298] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_dokuwiki_versus_asciidoc_markups.html

[1299] http://docs.slackware.com/
[1300] http://slint.fr/misc/convtags
[1301] http://slackbuilds.org/repository/14.1/development/source-highlight/
[1302] http://slint.fr/misc/convtags/README
[1303] http://www.methods.co.nz/asciidoc/userguide.html
[1304] http://docs.slackware.com/wiki:syntax
[1305] https://www.dokuwiki.org/faq:lists
[1306] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_internationalization_and_localization_of_shell_scripts.html

[1307] http://www.gnu.org/software/gettext/manual/gettext.html
[1308] http://pubs.opengroup.org/onlinepubs/009695399/nframe.html
[1309] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/contents.html
[1310] http://pubs.opengroup.org/onlinepubs/009695399/utilities/contents.html
[1311] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_find_packages_with_filenames.html

[1312] http://packages.slackware.com
[1313] http://slakfinder.org/
[1314] https://docs.slackware.com/doku.php?id=wiki:user:maschinenhans

[[_howtos_databases_postgresql.html

[1315] https://en.wikipedia.org/wiki/PostgreSQL
[1316] http://slackbuilds.org/repository/14.1/system/postgresql/
[1317] https://slackbuilds.org/repository/14.2/libraries/php-pgsql/
[1318] http://www.linuxquestions.org/questions/slackware-14/slackware-postgresql-and-php-118505/
[1319] https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/php
[1320] https://docs.slackware.com/doku.php?id=wiki:user:aaditya

[[_howtos_databases_install_mariadb_on_slackware.html

[1321] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[1322] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_databases_microsoft_drivers_for_php_for_sql_server.html

[1323] https://www.microsoft.com/en-IE/sql-server/sql-server-2017
[1324] http://www.unixodbc.org/
[1325] https://slackbuilds.org/repository/14.2/libraries/unixODBC/
[1326] https://github.com/sbopkg/sbopkg
[1327] https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
[1328] https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql/
[1329] https://packages.microsoft.com/debian/8/prod/pool/main/m/mssql-tools/
[1330] https://github.com/Microsoft/msphpsql

[[_howtos_databases_install_mysql_on_slackware.html

[1331] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[1332] http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf8-in-my-cnf
[1333] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_hardware_asus_eeepc.html

[1334] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[1335] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[1336] http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/eeepc-acpi-scripts/
[1337] http://slackbuilds.org/repository/14.0/system/laptop-mode-tools/
[1338] https://bbs.archlinux.org/viewtopic.php?id=74951&p=2
[1339] http://www.linuxquestions.org/questions/slackware-14/slackware-13-1-on-a-netbook-asus-eee-1005ha-811813/
[1340] https://docs.slackware.com/doku.php?id=wiki:user:weput
[1341] https://www.linuxquestions.org/questions/user/kernel-p4n1c-375149/

[[_howtos_hardware_ssd.html

[1342] https://www.gnu.org/software/parted/manual/parted.html#align_002dcheck
[1343] http://asalor.blogspot.com/2011/08/trim-dm-crypt-problems.html
[1344] http://ftp.slackware.com/pub/slackware/slackware64-14.1/README_CRYPT.TXT

[[_howtos_hardware_sound_problems_on_slackware.html

[1345] https://slackbuilds.org/result/?search=alsaequal&sv=

[[_howtos_hardware_syncing_hardware_clock_and_system_local_time.html

[1346] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[1347] http://harishankar.org/blog/entry.php/how-to-set-your-computer-039-s-hardware-clock-to-local-time-and-make-linux-recognize-it

[[_howtos_hardware_gps_devices.html

[1348] http://www.slackbuilds.org
[1349] http://www.gpsbabel.org/
[1350] http://www.qlandkarte.org/
[1351] http://www.openstreetmap.org/
[1352] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_hardware_audio_and_snd-hda-intel.html

[1353] http://docs.slackware.com/howtos:hardware:sound_problems_on_slackware
[1354] https://docs.slackware.com/doku.php?id=wiki:user:allend
[1355] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar

[[_howtos_hardware_virginmobile_and_ovation_mc760_modem.html

[1356] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_hardware_brother_printer_installation.html

[1357] https://support.brother.com
[1358] https://bear.alienbase.nl/mirrors/people/alien/multilib/
[1359] https://slackware.uk/people/alien/multilib/
[1360] http://localhost:631

[[_howtos_hardware_bfq_io_scheduler.html

[1361] http://algo.ing.unimo.it/people/paolo/disk_sched/
[1362] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[1363] http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php
[1364] https://docs.slackware.com/doku.php?id=wiki:ricky_cardo:xxx

[[_howtos_hardware_soundblaster-live-5.1.html

[1365] http://alsa.opensrc.org/Emu10k1
[1366] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.suse.comhttps://docs.slackware.com/pubhttps://docs.slackware.com/peoplehttps://docs.slackware.com/tiwaihttps://docs.slackware.com/awesfxhttps://docs.slackware.com/
[1367] http://www.alsa-project.org/~james/sound-fonts/8MBGMSFX.SF2
[1368] http://www.systemshock.org/index.php?topic=3188.0
[1369] http://www.alsa-project.org/~tiwai/awedrv.html#SoundFonts
[1370] https://docs.slackware.com/doku.php?id=howtos:software:vi
[1371] https://docs.slackware.com/doku.php?id=howtos:software:nano
[1372] https://docs.slackware.com/doku.php?id=howtos:software:midnight_commander
[1373] https://docs.slackware.com/doku.php?id=howtos:multimedia:audacious
[1374] http://slackbuilds.org
[1375] http://www.alsa-project.org/~tiwai/awedrv.html
[1376] http://alsa.opensrc.org/Emu10k1
[1377] http://www.systemshock.org/index.php?topic=3188.0
[1378] http://www.simpilot.net/~richnagel/#downloads
[1379] http://alsa.opensrc.org/Asfxload
[1380] http://vladimir-stupin.blogspot.com/2012/05/midi-debian-gnulinux.html
[1381] https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456
[1382] https://github.com/koppi/renoise-refcards/wiki/HOWTO-setup-EMU10k-soundfont-DSP-on-Ubuntu-11.10
[1383] http://www.linuxquestions.org/questions/slackware-14/sound-problems-in-slackware64-14-1-xfce-4175497387/
[1384] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[1385] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[1386] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_hardware_acer_aspire_one_za3.html

[1387] http://unix.stackexchange.com/questions/49815/x-server-problem-on-slackware-14-and-poulsbo-module-gma500

[[_howtos_hardware_chromebook_pixel.html

[1388] http://docs.slackware.com/howtos:hardware:chromebook_pixel#sources
[1389] http://docs.slackware.com/slackware:install
[1390] https://github.com/raphael/linux-samus
[1391] https://en.wikipedia.org/wiki/Konami_Code
[1392] https://slackbuilds.org/repository/14.1/system/xbindkeys/
[1393] https://github.com/jakeday/chromebook-pixel-slackware
[1394] https://github.com/raphael/linux-samus
[1395] https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/chromebook-pixel-2015
[1396] https://wiki.archlinux.org/index.php/Chromebook_Pixel_2

[[_howtos_hardware_arm_gcc-10.x_aarch64_cross-compiler.html

[1397] http://arm.slackware.com
[1398] https://docs.slackware.com/howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler
[1399] https://github.com/raspberrypi/linux
[1400] https://docs.slackware.com/howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler
[1401] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.1.0-arm-1.txz
[1402] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.29.2-arm-1.txz
[1403] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.7.4-arm-1.txz
[1404] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-4.txz
[1405] http://arm.slackware.com/
[1406] https://www.linuxquestions.org/questions/slackware-arm-108/
[1407] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/
[1408] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[1409] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[1410] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[1411] https://www.github.com/raspberrypi/
[1412] https://ftp.gnu.org/gnu/
[1413] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[1414] https://docs.slackware.com/doku.php?id=slackwarearm:faq
[1415] http://wiki.osdev.org/GCC_Cross-Compiler
[1416] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[1417] https://www.raspberrypi.org/documentation/linux/kernel
[1418] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_gcc_aarch64_cross-compiler.html

[1419] http://www.slackware.com/~mozes/
[1420] https://docs.slackware.com/slackwarearm:faq
[1421] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-4.1.4-arm-1.txz
[1422] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.11.0-arm-1.txz
[1423] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.0.4-arm-1.txz
[1424] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.0-arm-1.txz
[1425] https://www.github.com/raspberrypi/linux
[1426] https://github.com/raspberrypi/firmware
[1427] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/gawk-4.1.4-arm-1.txz
[1428] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/git-2.11.0-arm-1.txz
[1429] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/bison-3.0.4-arm-1.txz
[1430] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/flex-2.6.0-arm-1.txz
[1431] http://arm.slackware.com/FAQs
[1432] http://wiki.osdev.org/GCC_Cross-Compiler
[1433] https://www.raspberrypi.org/documentation/linux/kernel
[1434] https://www.github.com/raspberrypi/
[1435] https://ftp.gnu.org/gnu/
[1436] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[1437] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_raspberrypi.html

[1438] http://sarpi.fatdog.eu/
[1439] http://stanleygarvey.com/slackwarearm_rpi/index.php
[1440] http://www.daves-collective.co.uk/raspi/
[1441] http://elinux.org/RPi_Kernel_Compilation
[1442] http://www.raspberrypi.org/downloads
[1443] https://docs.slackware.com/doku.php?id=wiki:user:mozes
[1444] https://docs.slackware.com/doku.php?id=wiki:user:louigi600
[1445] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj
[1446] https://docs.slackware.com/doku.php?id=wiki:user:streamthreader

[[_howtos_hardware_arm_raspberrypi3.html

[1447] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi2
[1448] http://sarpi.fatdog.eu/
[1449] http://sarpi64.fatdog.eu/
[1450] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[1451] https://www.raspberrypi.org/documentation/configuration/uart.md
[1452] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[1453] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_automatically_setting_system_time_on_arm_devices.html

[1454] https://www.ebay.com/sch/i.html?_from=R40&_nkw=RTC&_sacat=0&_sop=15
[1455] https://docs.slackware.com/doku.php?id=howtos:network_services:ntp
[1456] https://www.linuxquestions.org/questions/slackware-arm-108
[1457] https://docs.slackware.com/howtos:network_services:ntp
[1458] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak
[1459] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_nginx.html

[1460] https://nginx.org/
[1461] https://www.nginx.com/resources/faq/
[1462] https://w3techs.com/technologies/comparison/ws-apache,ws-microsoftiis,ws-nginx
[1463] https://slackbuilds.org/repository/14.2/network/nginx/
[1464] http://nginx.org/download/
[1465] http://nginx.org/download/nginx-1.17.9.tar.gz
[1466] https://goaccess.io
[1467] http://nginx.org
[1468] https://github.com/allinurl/goaccess
[1469] http://goaccess.io
[1470] http://https://slackbuilds.org/repository/14.2/system/goaccess/
[1471] http://slackware.uk/slackwarearm/slackwarearm-current/
[1472] https://nginx.org/download/
[1473] https://slackbuilds.org/slackbuilds/14.2/network/nginx/
[1474] https://slackbuilds.org/repository/14.2/system/goaccess/
[1475] https://goaccess.io/download
[1476] https://sarpi.fatdog.eu/index.php?p=downloads
[1477] https://w3techs.com/technologies/comparison/ws-apache,ws-nginx
[1478] https://www.nginx.com/resources/faq/
[1479] https://nginx.org/en/docs/faq.html
[1480] https://www.aosabook.org/en/nginx.html
[1481] https://goaccess.io/faq
[1482] https://github.com/allinurl/goaccess
[1483] http://aal.fatdog.eu
[1484] http://www.slackware.com/~mozes/
[1485] https://feeds.acast.com/public/shows/slackchat
[1486] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_hacking_the_xzpad700_7_tablet.html

[1487] https://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#image_builder
[1488] https://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#image_builder
[1489] http://www.linuxquestions.org/questions/slackware-arm-108/
[1490] http://linux-sunxi.org/Main_Page
[1491] http://en.wikipedia.org/wiki/Usb#Physical_appearance
[1492] http://linux-sunxi.org/Main_Page
[1493] http://linux-sunxi.org/BROM
[1494] http://cubiestore.com/products/usd-breakout-board
[1495] http://i246.photobucket.com/albums/gg113/louigi600/XZPAD700/board_big_zps34ed425c.jpg
[1496] http://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#wrapping_up
[1497] http://dl.linux-sunxi.org/users/amery/sunxi-3.0/latest/a13_mid_hwpack.tar.xz
[1498] http://dl.linux-sunxi.org/users/amery/testing-3.4/latest/a13_mid_hwpack.tar.xz
[1499] https://github.com/linux-sunxi/linux-sunxi
[1500] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/rootshttps://docs.slackware.com/
[1501] http://download.doozan.com/a10/a10_base-1.3.zip
[1502] http://forum.doozan.com/list.php?6
[1503] http://www.berryterminal.com/doku.php/berryboot_a10
[1504] http://tmerle.blogspot.fr/2012/09/mele-a2000-my-own-linux-flash-kitchen.html
[1505] http://linux-sunxi.org/Initial_Ramdisk
[1506] http://releases.linaro.org/latest/ubuntu/precise-images/alip
[1507] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/rootshttps://docs.slackware.com/
[1508] http://homepage3.nifty.com/tsato/xvkbd/#download
[1509] http://scotland.proximity.on.ca/contrib-images/hansg/Fedora-18-a10-armhfp-r2.img.xz
[1510] http://linux-sunxi.org/Allwinner_SoC_Family
[1511] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/xzpad700
[1512] http://ftp.slackware.org.uk/slackwarearm/people/louigi600/xzpad700
[1513] https://docs.slackware.com/doku.php?id=rsync:rsync.slackware.org.uk_slackwarearm_people_louigi600_xzpad700
[1514] http://www.linuxquestions.org/questions/slackware-arm-108/
[1515] http://sourceforge.net/projects/bclash/files/a1x_image_builder/a1x_slackwarearm_image_creator.txz/download
[1516] http://linux-sunxi.org/How_to_boot_the_A10_over_the_network
[1517] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_arm_architecture_numbers.html

[1518] http://www.arm.linux.org.uk/developer/machines/
[1519] http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

[[_howtos_hardware_arm_qemu_support_in_slackware_arm.html

[1520] https://www.linuxquestions.org/questions/slackware-arm-108/qemu-system-arm-panic-on-x86_64-a-4175670124/
[1521] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/boardsupporthttps://docs.slackware.com/qemuhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/helper-scriptshttps://docs.slackware.com/
[1522] https://www.qemu.org/
[1523] https://distcc.github.io/
[1524] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.0/
[1525] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/
[1526] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/
[1527] http://slackware.uk/slackwarearm/
[1528] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.com::slackwarearmhttps://docs.slackware.com/slackwarearm-14.2
[1529] http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/
[1530] https://slackbuilds.org/howto/
[1531] http://slackbuilds.org/repository/14.2/development/device-tree-compiler/
[1532] http://slackbuilds.org/repository/14.2/system/qemu/
[1533] https://en.wikipedia.org/wiki/Secure_Digital
[1534] https://www.qemu.org/documentation/
[1535] http://192.168.1.2:8000/slackwarearm-current/
[1536] https://docs.slackware.com/doku.php?id=howtos:network_services:setup_apache
[1537] http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/installer_launch
[1538] http://192.168.1.2
[1539] http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/disk_launch
[1540] http://www.slackware.com/~mozes/
[1541] http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/
[1542] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_hardware_arm_zram_slackware_arm_and_arm64.html

[1543] https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/
[1544] https://haydenjames.io/raspberry-pi-performance-add-zram-kernel-parameters/
[1545] https://www.kernel.org/doc/html/v5.10/admin-guide/blockdev/zram.html
[1546] https://www.lotar.altervista.org/wiki/how-to/zram-in-slackware
[1547] http://oprod.net/compress-ram-with-zram-in-slackware/
[1548] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_hardware_arm_releases_current.html

[1549] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_Tegra20.TXT
[1550] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:qemu_support_in_slackware_arm
[1551] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_AllWinner_A20.TXT
[1552] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_AllWinner_H3.TXT
[1553] http://sarpi.fatdog.eu/

[[_howtos_hardware_arm_raspberrypi3_wap.html

[1554] http://www.ebaystores.co.uk/thepihut
[1555] https://www.amazon.co.uk/dp/B004Y6MIXS
[1556] https://slackbuilds.org/repository/14.2/graphics/qrencode/
[1557] http://www.slackware.com/~alien/slackbuilds/qrencode/build/
[1558] https://play.google.com/store/apps/details?id=com.google.zxing.client.android
[1559] https://play.google.com/store/apps/developer?id=ZXing+Team
[1560] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_hardware_arm_interfacing_i2c_devices.html

[1561] http://en.wikipedia.org/wiki/I2c
[1562] http://www.lm-sensors.org/wiki/I2CTools
[1563] http://www.lm-sensors.org/wiki/I2CTools
[1564] http://www.ti.com/lit/ds/symlink/pca9306.pdf
[1565] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_slackwarearm_local-mirror-repository.html

[1566] http://slackware.uk/people/alien/tools/
[1567] http://http://slackware.uk/people/alien/tools/
[1568] http://https://idlemoor.github.io/slackrepo/
[1569] https://docs.slackware.com/slackware:philosophy
[1570] http://slackware.uk/people/alien/tools/
[1571] http://https://idlemoor.github.io/slackrepo/
[1572] https://www.kingston.com/memory-cards/canvas-go-plus-microsd-card
[1573] http://example.com
[1574] https://en.wikipedia.org/wiki/Cron#Overview
[1575] https://crontab.guru/every-day-8am
[1576] https://crontab.guru/every-8-hours
[1577] https://linux.die.net/man/8/logrotate
[1578] https://linux.die.net/man/8/logrotate
[1579] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/
[1580] http://192.168.1.17/slackwarearm
[1581] http://localhost/slackwarearm
[1582] https://www.linuxquestions.org/questions/slackware-arm-108
[1583] https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
[1584] https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
[1585] https://slackware.uk
[1586] https://fatdog.eu
[1587] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_toshiba_ac100_dynabook_az.html

[1588] http://arm.slackware.com/
[1589] https://launchpad.net/ubuntu/+source/linux-ac100/
[1590] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/kernel_ac100_3.0.27.tgz
[1591] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/boot.img
[1592] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/rescue.img
[1593] https://gitorious.org/ac100/abootimg.git
[1594] http://ftp.slackware.org.uk/slackwarearm/slackwarearm-devtools/minirootfs/roots/
[1595] https://dl.dropboxusercontent.com/u/40761340/sos-uboot-r5-alpha.bin
[1596] https://ac100.grandou.net/sosbootr5
[1597] http://ac100.grandou.net/kerneldev#mainline_git_kernel
[1598] https://gitorious.org/~marvin24/ac100/marvin24s-kernel.git
[1599] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_gcc-9.x_aarch64_cross-compiler.html

[1600] http://arm.slackware.com
[1601] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[1602] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.0.1-arm-1.txz
[1603] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.22.0-arm-1.txz
[1604] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.4.1-arm-1.txz
[1605] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-1.txz
[1606] https://www.github.com/raspberrypi/linux
[1607] https://github.com/raspberrypi/firmware
[1608] http://sarpi64.fatdog.eu/
[1609] http://sarpi64.fatdog.eu/files/extra/SARPi64.SlackBuild-aarch64-cc.txt
[1610] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/gawk-5.0.1-arm-1.txz
[1611] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/git-2.22.0-arm-2.txz
[1612] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/bison-3.4.1-arm-1.txz
[1613] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/flex-2.6.4-arm-3.txz
[1614] https://www.github.com/raspberrypi/
[1615] https://ftp.gnu.org/gnu/
[1616] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[1617] https://docs.slackware.com/doku.php?id=slackwarearm:faq
[1618] http://wiki.osdev.org/GCC_Cross-Compiler
[1619] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[1620] https://www.raspberrypi.org/documentation/linux/kernel
[1621] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_start.html

[1622] http://arm.slackware.com/installation/
[1623] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_14.2
[1624] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_current

[[_howtos_hardware_arm_raspberrypi3_network.html

[1625] http://sarpi.co.uk/
[1626] http://sarpi.co.uk
[1627] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_hardware_arm_olinuxinoa10s.html

[1628] http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/
[1629] http://www.malaya-digital.org/hcd_axp-md.patch
[1630] https://drive.google.com/file/d/0B-bAEPML8fwlYkItdU1TTm1VN0E/edit?usp=sharing
[1631] https://drive.google.com/file/d/0B-bAEPML8fwlY3llVDJxelY3d28/edit?usp=sharing
[1632] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/roots
[1633] http://www.malaya-digital.org/dev.tar.gz
[1634] http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/
[1635] https://github.com/linux-sunxi/u-boot-sunxi/wiki
[1636] http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/
[1637] https://docs.slackware.com/doku.php?id=wiki:user:balky

[[_howtos_hardware_arm_raspberrypi2.html

[1638] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[1639] http://sarpi.fatdog.eu/
[1640] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[1641] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[1642] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[1643] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_raspberrypi4.html

[1644] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi3
[1645] http://sarpi.fatdog.eu/
[1646] http://sarpi64.fatdog.eu/
[1647] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[1648] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[1649] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[1650] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_releases_14.2.html

[1651] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_TRIMSLICE.TXT
[1652] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_KIRKWOOD.TXT
[1653] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_QEMU.TXT
[1654] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_BANANAPI.TXT
[1655] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[1656] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi2
[1657] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi3
[1658] http://docs.slackware.com/howtos:hardware:arm:toshiba_ac100_dynabook_az
[1659] http://pandorawiki.org/Software_projects/OS/Slackware
[1660] http://www.malaya-digital.org/setting-up-slackware-arm-14-1-on-the-olinuxino-a10-lime-from-scratch/
[1661] http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/
[1662] http://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet
[1663] http://rpc.suroot.com/slackwarearm-live/
[1664] http://slaxbmc.blogspot.it/2014/04/slaxbmc-141-is-released.html

[[_howtos_hardware_arm_kernel_2.6.38_ac100.html

[1665] https://launchpad.net/ubuntu/+source/linux-ac100/
[1666] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_naming_slackware_packages.html

[1667] http://ftp.arm.slackware.com/slackwarearm/unsupported/slackwarearm-14.1/packages/
[1668] http://www.slackware.com/~mozes/docs/arm-pkgnamingconvention.txt

[[_howtos_hardware_arm_hummingboard.html

[1669] http://www.solid-run.com/products/hummingboard/
[1670] http://www.solid-run.com/products/cubox-i-mini-computer/
[1671] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_cpu_frequency_scaling.html

[1672] https://www.linuxquestions.org/questions/slackware-14/slackware-64bit-14-1-rc-kernel-3-10-16-and-virtualbox-4175481316/
[1673] https://plus.google.com/+ArjanvandeVen/posts/dLn9T4ehywL
[1674] https://docs.slackware.com/doku.php?id=wiki:user:markush
[1675] https://docs.slackware.com/doku.php?id=wiki:user:metaschima

[[_howtos_hardware_proprietary_graphics_drivers.html

[1676] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[1677] http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx
[1678] http://www.linuxquestions.org/questions/slackware-14/warzone2100-sbo-on-14-1-with-ati-r7-graphics-not-working-4175540818/page2.html#post5356236
[1679] http://slackbuilds.org/
[1680] https://docs.slackware.com/doku.php?id=slackware:multilib
[1681] http://slackbuilds.org/result/?search=nvidia
[1682] http://sbopkg.org/
[1683] http://www.nvidia.com/object/unix.html
[1684] http://www.nvidia.com/object/unix.html
[1685] https://docs.slackware.com/doku.php?id=slackware:multilib
[1686] ftp:https://docs.slackware.com/https://docs.slackware.com/download.nvidia.comhttps://docs.slackware.com/XFree86https://docs.slackware.com/Linux-x86_64https://docs.slackware.com/256.44https://docs.slackware.com/READMEhttps://docs.slackware.com/commonproblems.html
[1687] https://docs.slackware.com/doku.php?id=slackware:multilib
[1688] https://docs.slackware.com/doku.php?id=wiki:user:rinias

[[_howtos_hardware_smart_hdd_diagnostics.html

[1689] https://www.us-cert.gov/security-publications/data-backup-options
[1690] http://www.smartmontools.org/wiki
[1691] https://www.ultimatebootcd.com/
[1692] https://en.wikipedia.org/wiki/S.M.A.R.T.
[1693] https://en.wikipedia.org/wiki/Bathtub_curve
[1694] http://hardware.slashdot.org/story/13/03/01/224257/how-power-failures-corrupt-flash-ssd-data
[1695] http://research.google.com/archive/disk_failures.pdf
[1696] http://www.smartmontools.org/browser/trunk/www/badblockhowto.xml
[1697] https://en.wikipedia.org/wiki/S.M.A.R.T.
[1698] https://www.us-cert.gov/security-publications/data-backup-options

[[_howtos_hardware_processor_affinity.html

[1699] https://en.wikipedia.org/wiki/Processor_affinity
[1700] http://www.oracle.com/products/database/overview/
[1701] http://www-01.ibm.com/software/data/db2/
[1702] http://minecraft.net
[1703] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_hardware_enable_linux_multi-queue_block_io_queueing_mechanism_blk-mq.html

[1704] https://docs.slackware.com/doku.php?id=wiki:user:lamerix
[1705] https://www.thomas-krenn.com/en/wiki/Linux_Multi-Queue_Block_IO_Queueing_Mechanism_
[1706] http://kernel.dk/blk-mq.pdf
[1707] https://lwn.net/Articles/552904/

[[_howtos_hardware_hardware_diagnostics.html

[1708] http://en.wikipedia.org/wiki/Beep_codes
[1709] http://www.bioscentral.com/
[1710] http://www.memtest.org/
[1711] http://pyropus.ca/software/memtester/
[1712] http://pinouts.ru/Power/atxpower_pinout.shtml
[1713] http://pinouts.ru/Power/atx_v2_pinout.shtml
[1714] http://sourceforge.net/apps/trac/smartmontools/wiki
[1715] http://www.sysresccd.org/SystemRescueCd_Homepage
[1716] http://www.ultimatebootcd.com/
[1717] http://mikelab.kiev.ua/index_en.php?page=PROGRAMS/vmt_en
[1718] http://sourceforge.net/projects/vmtce/files/
[1719] http://www.ultimatebootcd.com/
[1720] http://sourceforge.net/projects/cudagpumemtest/
[1721] http://www.memtest.org/
[1722] http://www.mersenne.org/freesoft/#source
[1723] http://www.lm-sensors.org/
[1724] http://www.memtest.org/
[1725] http://www.cgsecurity.org/wiki/TestDisk
[1726] http://foremost.sourceforge.net/
[1727] http://www.sysresccd.org/SystemRescueCd_Homepage
[1728] http://www.howtocleananything.com/home-interior-tips/computer/how-to-clean-thermal-paste-off-cpu/
[1729] http://www.maximumpc.com/article/howtos/howto_install_cpu_and_apply_thermal_paste
[1730] http://www.linuxquestions.org/questions/showthread.php?p=5162136
[1731] https://wiki.archlinux.org/index.php/Mouse_acceleration
[1732] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh
[1733] https://docs.slackware.com/doku.php?id=wiki:user:tobisgd
[1734] https://docs.slackware.com/doku.php?id=wiki:user:metaschima

[[_howtos_hardware_serial_installation.html

[1735] http://www.pcengines.ch/apu.htm
[1736] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:usbboot#assembling_the_usb_image

[[_howtos_hardware_nvidia_optimus.html

[1737] http://www.slackbuilds.org/guidelines/
[1738] https://github.com/WhiteWolf1776/Bumblebee-SlackBuilds
[1739] https://docs.slackware.com/doku.php?id=slackware:multilib
[1740] http://www.slackbuilds.org/faq/#version_update
[1741] http://docs.slackware.com/slackware:multilib
[1742] http://bumblebee-project.org/
[1743] https://github.com/Bumblebee-Project/Bumblebee/wiki
[1744] https://github.com/jgeboski/
[1745] https://github.com/jgeboski/Bumblebee-SlackBuilds
[1746] https://github.com/whitewolf1776/Bumblebee-SlackBuilds
[1747] https://docs.slackware.com/doku.php?id=wiki:user:tommyc
[1748] https://docs.slackware.com/doku.php?id=wiki:user:poprocks
[1749] https://download.nvidia.com/XFree86/Linux-x86_64/450.80.02/README/primerenderoffload.html

[[_howtos_hardware_displaylink.html

[1750] https://slackbuilds.org/repository/14.2/development/dkms/
[1751] http://www.displaylink.com/downloads/ubuntu
[1752] https://wiki.archlinux.org/index.php/DisplayLink
[1753] http://displaylink.org/forum/forumdisplay.php?f=29

[[_howtos_network_services_tunnel_interfaces.html

[1754] http://slackbuilds.org/result/?search=autossh
[1755] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[1756] https://docs.slackware.com/doku.php?id=wiki:user:ricky_cardo

[[_howtos_network_services_postfix_dovecot_mysql.html

[1757] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:email_firewall
[1758] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:database
[1759] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:uid_gid
[1760] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:ssl
[1761] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:postfix
[1762] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:dovecot
[1763] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_wifi_to_eth_bridge_routing.html

[1764] https://en.wikipedia.org/wiki/OSI_model
[1765] https://en.wikipedia.org/wiki/OSI_model
[1766] https://wiki.openwrt.org/doc/howto/clientmode
[1767] http://freecode.com/projects/parprouted
[1768] https://linux.die.net/man/8/parprouted
[1769] http://www.hazard.maks.net/parprouted/parprouted-0.7.tar.gz
[1770] https://docs.slackware.com/doku.php?id=wiki:user:slacker
[1771] https://wiki.debian.org/BridgeNetworkConnectionsProxyArp

[[_howtos_network_services_setup_apache.html

[1772] https://docs.slackware.com/doku.php?id=howtos:network_services:setup_apache_php_mysql
[1773] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_network_services_kerberizing_slackware_without_pam.html

[1774] http://slackbuilds.org/repository/14.1/network/krb5/
[1775] http://slackbuilds.org/repository/14.1/network/krb5/
[1776] http://arktur.shuttle.de/CD/Testpakete/Kerberos/krb5.html
[1777] https://docs.slackware.com/doku.php?id=wiki:user:jamesaxl

[[_howtos_network_services_weave.html

[1778] http://docs.services.mozilla.com/howtos/run-sync.html
[1779] http://docs.services.mozilla.com/howtos/run-sync.html
[1780] http://www.virtualenv.org/
[1781] http://slackware.com/~alien/slackbuilds/virtualenv/
[1782] http://slackbuilds.org/python/virtualenv/
[1783] http://code.google.com/p/modwsgi/
[1784] http://slackware.com/~alien/slackbuilds/mod_wsgi/
[1785] http://slackbuilds.org/result/?search=mod_wsgi
[1786] http://support.mozilla.com/kb/what-firefox-sync
[1787] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[1788] http://alien.slackbook.org/blog/setting-up-your-own-mozilla-sync-server/

[[_howtos_network_services_dropbox.html

[1789] http://www.dropbox.com
[1790] http://slackbuilds.org/result/?search=dropbox
[1791] https://www.dropbox.com/install?os=lnx
[1792] https://www.dropbox.com/download?dl=packages/dropbox.py
[1793] https://docs.slackware.com/doku.php?id=wiki:user:cmyster

[[_howtos_network_services_running_an_access_point_from_a_slackware_box.html

[1794] http://wireless.kernel.org/en/developers/Documentation/mac80211
[1795] http://w1.fi/hostapd/
[1796] http://www.securityfocus.com
[1797] http://wireless.kernel.org/en/users/Documentation/hostapd
[1798] https://blog.cloudflare.com/path-mtu-discovery-in-practice/
[1799] http://en.wikipedia.org/wiki/Iptables#mediaviewer/File:Netfilter-packet-flow.svg
[1800] http://en.wikipedia.org/wiki/Iptables#mediaviewer/File:Netfilter-packet-flow.svg
[1801] http://www.gnutomorrow.com/r/namecheap
[1802] http://www.dnsexit.com/
[1803] http://www.dynu.com/
[1804] http://freedns.afraid.org/
[1805] http://i246.photobucket.com/albums/gg113/louigi600/ARM/IMG_20160109_084509_zpshwu4p9x9.jpg
[1806] http://www.linuxquestions.org/questions/slackware-arm-108/initiating-shutdown-from-a-button-press-4175494505/page3.html#post5476882
[1807] http://docs.slackware.com/howtos:hardware:arm:start
[1808] http://ftp.slackware.org.uk/slackwarearm/slackwarearm-devtools/minirootfs/roots/
[1809] http://www.linuxquestions.org/questions/slackware-arm-108/anyone-else-interested-in-running-some-of-their-arm-devices-with-root-mounted-read-only-4175590642/
[1810] http://slackware.uk/slackwarearm/people/louigi600/rpi/rpi_wrap_512mb.img.txz
[1811] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_network_services_home_nfs_howto.html

[1812] http://nfs.sourceforge.net/nfs-howto/
[1813] http://rlworkman.net/howtos/NFS_Firewall_HOWTO
[1814] http://nfs.sourceforge.net/nfs-howto/
[1815] http://rlworkman.net/howtos/NFS_Firewall_HOWTO

[[_howtos_network_services_dovecot_with_sieve.html

[1816] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1817] http://slackbuilds.org/repository/14.1/network/dovecot-pigeonhole/?search=pigeonhole
[1818] https://github.com/sbopkg/sbopkg/releases/download/0.37.0/sbopkg-0.37.0-noarch-1_cng.tgz
[1819] http://wiki2.dovecot.org/Pigeonhole/ManageSieve/Configuration
[1820] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1821] https://github.com/thsmi/sieve/blob/master/nightly/0.2.3/sieve-0.2.3h.xpi?raw=true
[1822] https://github.com/thsmi/sieve/blob/master/nightly/
[1823] https://docs.slackware.com/doku.php?id=wiki:user:tim

[[_howtos_network_services_joomla.html

[1824] http://www.joomla.org/download.html
[1825] http://httpd.apache.org/docs/current/mod/core.html#documentroot
[1826] http://beautifulserver.com
[1827] http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf8-in-my-cnf
[1828] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_network_services_postfix_dovecot_mysql_dovecot.html

[1829] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1830] http://slackbuilds.org
[1831] http://slackbuilds.org/howto/
[1832] http://wiki2.dovecot.org/FrontPage
[1833] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1834] http://wiki2.dovecot.org/
[1835] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_postfix.html

[1836] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1837] http://slackbuilds.org
[1838] http://slackbuilds.org/howto/
[1839] http://www.postfix.org/documentation.html
[1840] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1841] http://www.postfix.org/documentation.html
[1842] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_ssl.html

[1843] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1844] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1845] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_database.html

[1846] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1847] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1848] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_email_firewall.html

[1849] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1850] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1851] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_uid_gid.html

[1852] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1853] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[1854] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_setup_apache_php_mysql.html

[1855] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware
[1856] http://localhost/test.php
[1857] http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux
[1858] https://docs.slackware.com/doku.php?id=wiki:user:pavel

[[_howtos_network_services_dhcp_server_via_dnsmasq.html

[1859] https://docs.slackware.com/doku.php?id=slackware:pkgtool
[1860] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[1861] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_network_services_install_openwebmail.html

[1862] http://openwebmail.org/openwebmail/download/current/
[1863] http://www.linuxquestions.org/questions/slackware-14/suidperl-in-slack-14-a-4175450139/
[1864] http://openwebmail.org/openwebmail/doc/faq.txt
[1865] http://openwebmail.org/openwebmail/doc/readme.txt
[1866] http://www.unixresources.net/linux/lf/45/archive/00/00/01/69/16969.html
[1867] http://mail.savs.hcc.edu.tw/~chuavv/articles/openwebmail-en.html
[1868] http://search.cpan.org/search?query=CGI&mode=all
[1869] http://svn.apache.org/repos/asf/spamassassin/branches/3.3/INSTALL
[1870] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[1871] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_network_services_wol.html

[1872] http://slackbuilds.org
[1873] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_network_services_configuring_a_wireless_access_point.html

[1874] http://www.slackbuilds.org
[1875] https://docs.slackware.com/doku.php?id=wiki:user

[[_howtos_network_services_scanning_with_sane_in_a_network.html

[1876] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_network_services_nfs_root.html

[1877] https://docs.slackware.com/doku.php?id=howtos:network_services:nfs-quick_and_dirty_setup
[1878] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_network_services_ntp.html

[1879] http://www.pool.ntp.org
[1880] http://en.wikipedia.org/wiki/Julian_day
[1881] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_howtos_network_services_openvpn.html

[1882] http://slackbuilds.org
[1883] http://openvpn.net
[1884] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.com
[1885] http://portforward.com/
[1886] http://slackbuilds.org
[1887] http://en.wikipedia.org/wiki/OpenVPN
[1888] https://wiki.archlinux.org/index.php/OpenVPN
[1889] http://slackwiki.com/OpenVPN_smcr_2012
[1890] http://www.no-ip.com
[1891] http://roy.marples.name/projects/openresolv/index
[1892] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela

[[_howtos_network_services_roaming_profiles.html

[1893] https://docs.slackware.com/doku.php?id=howtos:network_services:ntp
[1894] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_howtos_network_services_checkpoint_snx_client.html

[1895] https://sc1.checkpoint.com/documents/R77/CP_R77_VPN_AdminGuide/14702.htm
[1896] https://docs.slackware.com/doku.php?id=slackware:multilib
[1897] http://www.slackware.com/~vbatts/pam/
[1898] https://docs.slackware.com/doku.php?id=slackware:multilib
[1899] https://docs.slackware.com/doku.php?id=wiki:user:xflow7

[[_howtos_network_services_ethernet_bridging_with_openvpn.html

[1900] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[1901] https://www.virtualbox.org/
[1902] https://docs.slackware.com/doku.php?id=howtos:network_services:dhcp_server_via_dnsmasq
[1903] https://slackbuilds.org/repository/14.2/network/tunctl/?search=tunctl
[1904] https://wiki.linuxfoundation.org/networking/bridge
[1905] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[1906] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[1907] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[1908] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_network_services_iscsi.html

[1909] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_network_services_citrix_client.html

[1910] https://docs.slackware.com/doku.php?id=slackware:multilib
[1911] https://en.wikipedia.org/wiki/Motif_
[1912] http://lesstif.sourceforge.net/apps.html
[1913] http://www.opengroup.org/openmotif/
[1914] http://www.slackware.com/~alien/slackbuilds/openmotif/
[1915] http://www.citrix.com/downloads/citrix-receiver/receivers-by-platform.html
[1916] http://www.citrix.com/downloads/
[1917] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_network_services_desktop_printer_sharing_cups.html

[1918] http://localhost:631/
[1919] http://www.slackware.com/~alien/efg/
[1920] http://localhost:631/help/sharing.html?TOPIC=Getting+Started
[1921] http://localhost:631/printers
[1922] http://localhost:631/printers/
[1923] http://localhost:631/admin/log/error_log
[1924] https://docs.slackware.com/doku.php?id=wiki:user:drgibbon

[[_howtos_network_services_slackware_print_server.html

[1925] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_network_services_ipxe.html

[1926] https://docs.slackware.com/doku.php?id=howtos:network_services:dhcp_server_via_dnsmasq
[1927] http://boot.ipxe.org/undionly.kpxe
[1928] http://ipxe.org
[1929] http://ipxe.org/examples
[1930] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_network_services_nfs-quick_and_dirty_setup.html

[1931] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_network_services_subversion.html

[1932] http://www.slackwiki.com/Subversion

[[_howtos_network_services_tinc.html

[1933] http://www.tinc-vpn.org
[1934] http://www.tinc-vpn.org/download/
[1935] http://www.tinc-vpn.org

[[_howtos_games_conan_exiles.html

[1936] https://store.steampowered.com/agecheck/app/440900/
[1937] https://developer.valvesoftware.com/wiki/SteamCMD
[1938] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_games_template.html

[1939] https://docs.slackware.com/doku.php?id=howtos:games:link_here

[[_howtos_games_halflife_dedicated_server.html

[1940] http://store.steampowered.com/app/70/
[1941] http://valvesoftware.com/
[1942] https://www.google.com/search?q=LXC&btnI=lucky
[1943] http://slackware.ponce.cc/blog/2012/11/02/lxc-containers-on-slackware-14-0/
[1944] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:minimal_slackware_server
[1945] https://developer.valvesoftware.com/wiki/SteamCMD
[1946] https://developer.valvesoftware.com/wiki/HLDSUpdateTool
[1947] https://store.steampowered.com/join/
[1948] https://developer.valvesoftware.com/wiki/Steam_Application_IDs
[1949] http://alienbase.nl/half-life/
[1950] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_emulators_helper_script_for_managing_qemu_virtual_machines.html

[1951] http://www.linuxquestions.org/questions/blog/louigi600-808242/minimize-the-amount-of-code-in-your-bash-scripts-37137/
[1952] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_emulators_z80.html

[1953] http://www.z80.de/myz80.zip
[1954] http://slackbuilds.org
[1955] http://www.dosbox.com
[1956] http://dosbox.sourceforge.net/wiki
[1957] http://z80cpu.eu/mirrors/oak.oakland.edu/
[1958] http://www.classiccmp.org/cpmarchives/cpm/
[1959] http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/
[1960] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer

[[_howtos_emulators_retroarch.html

[1961] https://www.retroarch.com/

[[_howtos_emulators_pcsx2.html

[1962] http://docs.slackware.com/slackware:multilib?s[]=multilib
[1963] http://pcsx2.net/download/releases/linux.html

[[_howtos_emulators_trs80.html

[1964] http://www.classiccmp.org/cpmarchives/trs80/mirrors/www.discover-net.net/~dmkeil/
[1965] http://slackbuilds.org/result/?search=dosbox&sv=
[1966] http://slackbuilds.org
[1967] http://www.dosbox.com
[1968] http://dosbox.sourceforge.net/wiki
[1969] http://www.classiccmp.org/cpmarchives/trs80/mirrors/www.discover-net.net/~dmkeil/
[1970] http://www.trs-80.com/
[1971] http://trs80stuff.net/
[1972] http://www.retroarchive.org/cpm/
[1973] http://www.retroarchive.org/cpm/cdrom/
[1974] http://www.sharpmz.org/succpminfo06.htm
[1975] http://z80cpu.eu/mirrors/oak.oakland.edu/
[1976] http://www.classiccmp.org/cpmarchives/cpm/
[1977] http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/
[1978] http://www.sydex.com/about.html
[1979] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer

[[_howtos_emulators_vms-pci-passthrough.html

[1980] https://docs.slackware.com/howtos:emulators:vms
[1981] https://docs.slackware.com/doku.php?id=wiki:user:nikos

[[_howtos_emulators_binfmt_misc.html

[1982] http://winehq.org/
[1983] http://qemu.org/
[1984] http://armedslack.org/
[1985] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[1986] https://en.wikipedia.org/wiki/binfmt_misc

[[_howtos_emulators_start.html

[1987] https://www.google.com/search?q=Operating_system&btnI=lucky
[1988] https://www.google.com/search?q=Video_game_console&btnI=lucky

[[_howtos_emulators_xtrs.html

[1989] http://slackbuilds.org
[1990] http://manpages.ubuntu.com/manpages/lucid/man1/xtrs.1.html
[1991] http://amigakit.leamancomputing.com/catalog/product_info.php?products_id=842
[1992] http://www.tim-mann.org/trs80.html
[1993] http://www.tim-mann.org/catweasel.html
[1994] http://www.kanolabs.com
[1995] http://www.trs-80.com/
[1996] http://trs80stuff.net/
[1997] http://www.retroarchive.org/cpm/
[1998] http://www.retroarchive.org/cpm/cdrom/
[1999] http://www.sharpmz.org/succpminfo06.htm
[2000] http://z80cpu.eu/mirrors/oak.oakland.edu/
[2001] http://www.classiccmp.org/cpmarchives/cpm/
[2002] http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/
[2003] http://www.sydex.com/about.html
[2004] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer

[[_howtos_cloud_docker.html

[2005] https://docs.slackware.com/doku.php?id=wiki:user:bifferos
[2006] https://www.linuxquestions.org/questions/slackware-14/fail-to-install-runc-package-for-docker-4175616167/

[[_howtos_cloud_aws_ec2.html

[2007] https://docs.slackware.com/doku.php?id=howtos:misc:xen_domu_guest
[2008] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role
[2009] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html
[2010] https://github.com/aws/amazon-ssm-agent
[2011] https://www.ssh.com/ssh/copy-id
[2012] https://man.openbsd.org/sshd_config#PermitRootLogin
[2013] https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html
[2014] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_cloud_start.html

[2015] http://aws.amazon.com/

[[_howtos_slackware_slackware_libre.html

[2016] http://slackjeff.com.br/artigos/slackware_free.html
[2017] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_slackware_magiic.html

[2018] https://slackbuilds.org/repository/14.2/system/magiic/?search=magiic
[2019] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_slackware_kernel_huge_for_generic.html

[2020] http://slackjeff.com.br/artigos/huge4generic.html
[2021] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_window_managers_awesome.html

[2022] http://awesome.naquadah.org/
[2023] https://docs.slackware.com/doku.php?id=slackware:window_manager
[2024] http://www.lua.org/
[2025] http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
[2026] http://slackbuilds.org/development/libxdg-basedir/
[2027] http://slackbuilds.org/libraries/lgi/
[2028] http://slackbuilds.org/development/lua/
[2029] http://slackbuilds.org
[2030] http://slackbuilds.org/desktop/awesome/
[2031] http://awesome.naquadah.org/wiki/Awesome_3_configuration
[2032] http://awesome.naquadah.org/
[2033] http://awesome.naquadah.org/wiki/Main_Page
[2034] http://awesome.naquadah.org/wiki/FAQ
[2035] http://awesome.naquadah.org/doc/api/​
[2036] http://awesome.naquadah.org/wiki/Awesome_3_configuration
[2037] http://en.wikipedia.org/wiki/Dynamic_window_manager
[2038] https://docs.slackware.com/doku.php?id=wiki:user:sbolokanov

[[_howtos_window_managers_xmonad_tiling_window_manager.html

[2039] https://docs.slackware.com/doku.php?id=slackware:window_manager
[2040] http://en.wikipedia.org/wiki/Tiling_window_manager
[2041] http://xmonad.org/
[2042] http://slackbuilds.org/desktop/xmonad/
[2043] http://slackbuilds.org/desktop/dmenu/
[2044] http://slackbuilds.org/desktop/stalonetray/
[2045] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_window_managers_lumina.html

[2046] https://slackbuilds.org/
[2047] https://slackbuilds.org/
[2048] https://lumina-desktop.org/
[2049] https://project-trident.org/
[2050] https://slackbuilds.org/
[2051] http://www.slackware.com/~alien/slackbuilds/
[2052] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela

[[_howtos_window_managers_keyboard_layout_in_fluxbox.html

[2053] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout
[2054] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_e17.html

[2055] http://www.enlightenment.org/p.php?p=about&l=en
[2056] https://docs.slackware.com/doku.php?id=slackware:window_manager
[2057] http://trac.enlightenment.org/e/wiki/EFLOverview
[2058] http://slacke17.sourceforge.net/
[2059] http://sourceforge.net/projects/slacke17/files/slacke17/
[2060] http://slackbuilds.org

[[_howtos_window_managers_keyboard_layout_in_kde.html

[2061] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout
[2062] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_i3wm.html

[2063] https://docs.slackware.com/doku.php?id=slackware:window_manager
[2064] http://www.i3wm.org/screenshots/
[2065] http://slackbuilds.org/desktop/i3/
[2066] http://docs.slackware.com/slackware:package_management_hands_on?s[]=build&s[]=slackbuild
[2067] http://www.sbopkg.org/
[2068] http://slackbuilds.org
[2069] http://slackbuilds.org/libraries/libev/
[2070] http://slackbuilds.org/libraries/yajl/
[2071] http://slackbuilds.org/desktop/dmenu/
[2072] http://slackbuilds.org/desktop/i3status/
[2073] http://slackbuilds.org/libraries/confuse/
[2074] http://www.slackword.net/?p=733
[2075] http://www.slackbuilds.org
[2076] http://slackbuilds.org/repository/14.1/perl/perl-JSON-XS/
[2077] http://slackbuilds.org/repository/14.1/perl/perl-AnyEvent-Handle/
[2078] http://slackbuilds.org/repository/14.1/perl/perl-AnyEvent-I3/
[2079] http://www.phoronix.com/scan.php?page=news_item&px=MTA5NTY
[2080] http://www.i3wm.org/docs/userguide.html#_default_keybindings
[2081] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_i3
[2082] http://www.i3wm.org/docs/userguide.html
[2083] http://www.i3wm.org/docs/userguide.html#_tree
[2084] http://www.youtube.com/watch?v=AWA8Pl57UBY&feature=youtu.be
[2085] http://www.i3wm.org/docs/userguide.html#_automatically_putting_clients_on_specific_workspaces
[2086] http://www.i3wm.org/docs/userguide.html#_scratchpad
[2087] http://www.slackword.net/?p=657
[2088] http://slackbuilds.org/desktop/i3status/
[2089] https://docs.slackware.com/doku.php?id=howtos:general_admin:taskwarrior
[2090] http://www.i3wm.org/docs/
[2091] mailto:i3-discuss-subscribe@i3.zekjur.net
[2092] http://infra.in.zekjur.net/archives/i3-discuss/
[2093] http://faq.i3wm.org/questions/
[2094] https://www.reddit.com/r/i3wm/
[2095] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_keyboard_layout_in_xfce.html

[2096] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout
[2097] http://slackbuilds.org/desktop/xfce4-xkb-plugin/
[2098] http://www.slackbuilds.org/desktop/xfce4-xkb-plugin/
[2099] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_dual_monitors.html

[2100] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_keyboard_layout_in_i3.html

[2101] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[2102] http://slackbuilds.org/repository/13.37/desktop/i3/
[2103] http://slackbuilds.org/repository/13.37/desktop/i3status/
[2104] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[2105] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_remotex_linux2linux.html

[2106] https://cgit.freedesktop.org/xorg/xserver/commit/?id=cc59be38b7eff52a1d003b390f2994c73ee0b3e9
[2107] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_remotex_windows2linux.html

[2108] http://sourceforge.net/projects/xming/files/
[2109] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_vnc.html

[2110] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_keyboard_layout.html

[2111] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_kde
[2112] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_xfce
[2113] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_fluxbox
[2114] https://docs.slackware.com/doku.php?id=howtos:window_managers:keyboard_layout_in_i3
[2115] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_window_managers_slim.html

[2116] http://slim.berlios.de
[2117] http://slackbuilds.org/result/?search=slim
[2118] http://ngc891.blogdns.net/pub/projects/slim/slackware-preview.png
[2119] http://ngc891.blogdns.net/?p=74
[2120] http://slim.berlios.de/themes01.php
[2121] http://slim.berlios.de/themes_howto.php
[2122] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_howtos_window_managers_take_a_screenshot.html

[2123] https://docs.slackware.com/doku.php?id=wiki:user:zithro

[[_howtos_window_managers_xfce_app_menu.html

[2124] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_window_managers_xfce_handy_launchers.html

[2125] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_cli_manual_start.html

[2126] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[2127] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2128] https://docs.slackware.com/doku.php?id=wiki:user:b1ueb1aze
[2129] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2130] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2131] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2132] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2133] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2134] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[2135] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_cli_manual_shells.html

[2136] http://en.wikipedia.org/wiki/Bash_%28Unix_shell%29
[2137] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shell_comparison
[2138] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_cli_manual_introduction.html

[2139] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[2140] http://www.slackbuilds.org
[2141] http://slackbuilds.org/system/aterm/
[2142] http://slackbuilds.org/system/eterm/
[2143] http://slackbuilds.org/system/rxvt-unicode/
[2144] http://slackbuilds.org/system/sakura/
[2145] http://slackbuilds.org/system/terminator/
[2146] http://en.wikipedia.org/wiki/Terminal_multiplexer
[2147] http://slackbuilds.org/system/tmux/
[2148] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2149] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex
[2150] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_cli_manual_start.html

[2151] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[2152] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2153] https://docs.slackware.com/doku.php?id=wiki:user:b1ueb1aze
[2154] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2155] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2156] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2157] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2158] https://docs.slackware.com/doku.php?id=howtos:cli_manual:first_steps
[2159] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[2160] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_cli_manual_first_steps.html

[2161] https://docs.slackware.com/doku.php?id=howtos:general_admin:searching_and_reading_manpages_efficiently
[2162] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[2163] https://docs.slackware.com/doku.php?id=slackware:window_manager
[2164] https://docs.slackware.com/doku.php?id=slackware:emacs
[2165] http://www.viemu.com/vi-vim-cheat-sheet.gif
[2166] http://www.openvim.com/tutorial.html
[2167] http://en.wikibooks.org/wiki/Learning_the_vi_Editor
[2168] http://www.sbernard.ee/vince.html
[2169] http://www.moolenaar.net/habits.html
[2170] http://www.vim.org/scripts/script.php?script_id=3760
[2171] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[2172] https://docs.slackware.com/doku.php?id=howtos:cli_manual:shells
[2173] https://docs.slackware.com/doku.php?id=wiki:user:b1ueb1aze
[2174] https://docs.slackware.com/doku.php?id=wiki:user:markush
[2175] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_slackware_admin_slackware-proxmox-ve.html

[2176] http://www.proxmox.com/proxmox-ve
[2177] http://www.linux-kvm.org/page/Main_Page
[2178] https://pve.proxmox.com/wiki/Main_Page
[2179] http://solusvm.com/
[2180] https://documentation.solusvm.com/

[[_howtos_slackware_admin_how_to_configure_fstab_and_lilo.conf_with_persistent_naming.html

[2181] https://wiki.archlinux.org/index.php/persistent_block_device_naming#by-label
[2182] https://en.wikipedia.org/wiki/Universally_unique_identifier
[2183] https://en.wikipedia.org/wiki/Master_boot_record
[2184] https://en.wikipedia.org/wiki/GUID_Partition_Table
[2185] https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
[2186] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2187] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2188] https://docs.slackware.com/doku.php?id=wiki:user:bassmadrigal

[[_howtos_slackware_admin_how_to_chroot_from_media.html

[2189] https://docs.slackware.com/doku.php?id=wiki:user:cmyster
[2190] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_slackware_admin_building_the_linux_kernel_using_git_repository.html

[2191] http://www.linuxfoundation.org/news-media/blogs/browse/2011/08/cracking-kernelorg
[2192] http://kernel.org/
[2193] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2194] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2195] https://wiki.gentoo.org/wiki/Safe_Cflags
[2196] https://www.linuxquestions.org/questions/slackware-14/slackware-64bit-14-1-rc-kernel-3-10-16-and-virtualbox-4175481316/
[2197] https://lkml.org/lkml/2013/4/16/473
[2198] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2199] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2200] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh
[2201] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh
[2202] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2203] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2204] https://docs.slackware.com/doku.php?id=wiki:user:metaschima

[[_howtos_slackware_admin_querying_installed_packages.html

[2205] http://www.slackbuilds.org
[2206] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_slackware_admin_recovery_boot_option.html

[2207] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_slackware_admin_grub_on_first_install.html

[2208] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:installing_with_gpt_without_uefi
[2209] https://docs.slackware.com/doku.php?id=wiki:user:ryanpcmcquen
[2210] https://docs.slackware.com/doku.php?id=wiki:user:ruario

[[_howtos_slackware_admin_slackware_automation_using_ansible.html

[2211] https://www.ansible.com/
[2212] http://docs.ansible.com
[2213] https://github.com/mmlj4/ansible_slackware_bootstrap
[2214] https://github.com/mmlj4/ansible_slackware_bootstrap/blob/master/README.md

[[_howtos_slackware_admin_set_up_grub_as_boot_loader_on_uefi_based_hardware.html

[2215] http://docs.slackware.com/howtos:slackware_admin:installing_on_uefi_hardware
[2216] https://wiki.archlinux.org/index.php/Grub#UEFI_systems_2
[2217] http://linux.dell.com/efibootmgr/
[2218] https://docs.slackware.com/doku.php?id=wiki:user:arubin

[[_howtos_slackware_admin_building_packages_with_sbopkg.html

[2219] https://sbopkg.org/
[2220] https://slackbuilds.org/
[2221] https://www.sbopkg.org/downloads.php
[2222] https://www.sbopkg.org/docs.php
[2223] http://gramps-project.org/
[2224] https://www.sbopkg.org
[2225] https://www.sbopkg.org/docs.php
[2226] https://www.sbopkg.org/downloads.php
[2227] https://www.sbopkg.org/queues.php
[2228] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer
[2229] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2230] https://docs.slackware.com/doku.php?id=wiki:user:willysr

[[_howtos_slackware_admin_creating_a_package_using_a_slackbuild_script.html

[2231] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_use_slackware_installing_software
[2232] http://slackbuilds.org/
[2233] http://slackbuilds.org/
[2234] http://slackbuilds.org/repository/13.0/games/pysolfc/
[2235] http://downloads.sourceforge.net/pysolfc/PySolFC-1.1.tar.bz2
[2236] http://slackbuilds.org/slackbuilds/13.0/games/pysolfc.tar.gz
[2237] https://docs.slackware.com/doku.php?id=wiki:user:nocturnal.slacker
[2238] https://noctslackv1.wordpress.com/2012/01/29/lets-build-a-slackbuild-revisited/

[[_howtos_slackware_admin_cross_compiling_the_linux_kernel.html

[2239] https://buildroot.org
[2240] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_slackware_admin_slackware-arubacloud.html

[2241] https://www.arubacloud.com/vps/virtual-private-server-range.aspx
[2242] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[2243] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2244] https://slackbuilds.org/repository/14.2/system/open-vm-tools/?search=open-vm
[2245] https://www.arubacloud.com/
[2246] https://slackbuilds.org/repository/14.2/system/open-vm-tools/?search=open-vm
[2247] https://docs.slackware.com/doku.php?id=wiki:user:andrixnet

[[_howtos_slackware_admin_building_a_package.html

[2248] http://www.slackware.com/~mozes
[2249] http://slack-desc.sourceforge.net
[2250] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:slack-desc
[2251] http://www.slackwiki.com/Building_A_Package
[2252] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_slackware_admin_using_slackwares_kernel_build_scripts.html

[2253] http://tty1.uk/scripts/kernel/
[2254] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_howtos_slackware_admin_linux_kernel_options_for_uefi_and_elilo.html

[2255] https://lkml.org/lkml/2013/4/16/473
[2256] https://github.com/vathpela/efivar
[2257] https://github.com/rhboot/efibootmgr
[2258] ftp:https://docs.slackware.com/https://docs.slackware.com/mirrors.usc.eduhttps://docs.slackware.com/pubhttps://docs.slackware.com/linuxhttps://docs.slackware.com/distributionshttps://docs.slackware.com/slackwarehttps://docs.slackware.com/slackware64-14.1https://docs.slackware.com/README_UEFI.TXT
[2259] https://svn.code.sf.net/p/edk2/code/trunk/edk2/ShellBinPkg/UefiShell/X64/Shell.efi
[2260] http://dl.dropbox.com/u/17629062/Shell2.zip
[2261] http://blog.uncooperative.org/blog/2014/02/06/the-efi-system-partition/
[2262] https://docs.slackware.com/doku.php?id=wiki:user:metaschima
[2263] https://wiki.archlinux.org/index.php/UEFI
[2264] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/plain/Documentation/x86/x86_64/uefi.txt

[[_howtos_slackware_admin_installing_on_uefi_hardware.html

[2265] http://downloads.sourceforge.net/project/elilo/elilo/elilo-3.14/elilo-3.14-all.tar.gz
[2266] https://docs.slackware.com/doku.php?id=wiki:user:ruario
[2267] http://www.rodsbooks.com/efi-bootloaders/

[[_howtos_slackware_admin_hibernation.html

[2268] https://docs.slackware.com/doku.php?id=slackware:desktop_environment
[2269] http://slackware.osuosl.org/slackware-13.37/README_CRYPT.TXT
[2270] http://www.slackwiki.com/Hibernate
[2271] http://www.slackwiki.com/index.php?title=Hibernate&oldid=366
[2272] http://www.slackwiki.com/index.php?title=Hibernate&oldid=368
[2273] http://www.slackwiki.com/index.php?title=Hibernate&action=history
[2274] https://docs.slackware.com/doku.php?id=wiki:user:yenn
[2275] https://docs.slackware.com/doku.php?id=wiki:user:zithro

[[_howtos_slackware_admin_booting_install_from_hdd.html

[2276] https://en.wikipedia.org/wiki/initrd
[2277] http://slackware.osuosl.org/slackware64-14.0/kernels/huge.s/bzImage
[2278] http://slackware.osuosl.org/slackware64-14.0/isolinux/initrd.img
[2279] http://slackware.osuosl.org/slackware-14.0/kernels/hugesmp.s/bzImage
[2280] http://slackware.osuosl.org/slackware-14.0/isolinux/initrd.img
[2281] http://www.gnu.org/software/grub/manual/grub.html
[2282] http://www.gnu.org/software/grub/manual/legacy/grub.html
[2283] http://www.gnu.org/software/grub/manual/grub.html
[2284] https://docs.slackware.com/doku.php?id=wiki:user:bormant

[[_howtos_slackware_admin_uefi_triple_boot_with_refind_on_slackware.html

[2285] https://slackbuilds.org/
[2286] https://sourceforge.net/projects/refind/
[2287] https://docs.slackware.com/doku.php?id=wiki:user:aragorn2101
[2288] http://www.rodsbooks.com/refind/

[[_howtos_slackware_admin_installing_with_gpt_without_uefi.html

[2289] https://docs.slackware.com/doku.php?id=wiki:user:ruario
[2290] http://www.linuxquestions.org/questions/slackware-14/fresh-install-64-14-1-with-gpt-without-efi-in-a-bios-motherboard-4175484184/#post5062475

[[_howtos_slackware_admin_efi_administration.html

[2291] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_slackware_admin_runit.html

[2292] http://smarden.org/runit/benefits.html
[2293] https://slackbuilds.org/
[2294] https://gitlab.com/chrisabela/runit_scripts_for_slackware
[2295] https://slackbuilds.org/repository/14.2/system/runit-services/
[2296] https://slackbuilds.org/repository/14.2/system/pause/
[2297] https://docs.slackware.com/doku.php?id=howtos:general_admin:openrc
[2298] https://wiki.gentoo.org/wiki/Runit#Runit_as_the_init_system
[2299] https://gitlab.com/aadityabagga/runit-init-openrc
[2300] https://github.com/void-linux/void-runit
[2301] http://smarden.org/runit/
[2302] https://en.wikipedia.org/wiki/Init
[2303] https://voidlinux.org/usage/runit/
[2304] https://www.youtube.com/watch?v=jiBlIhFxNJo
[2305] http://kchard.github.io/runit-quickstart/
[2306] https://www.slackbook.org/beta/
[2307] https://gitlab.com/chrisabela/runit_scripts_for_slackware
[2308] https://github.com/aadityabagga/runit-services
[2309] https://wiki.gentoo.org/wiki/Runit
[2310] https://github.com/void-linux/void-runit
[2311] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela

[[_howtos_slackware_admin_systemupgrade.html

[2312] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2313] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[2314] http://www.nvidia.com/object/unix.html
[2315] http://www2.ati.com/drivers/linux/installernotes.html
[2316] https://docs.slackware.com/doku.php?id=howtos:hardware:proprietary_graphics_drivers
[2317] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2318] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2319] http://slackware.com/~alien/multilib/
[2320] http://slackware.com/~alien/multilib/14.0/
[2321] https://docs.slackware.com/doku.php?id=howtos:software:java
[2322] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_slackware_admin_kernelbuilding.html

[2323] http://uwsg.iu.edu/hypermail/linux/kernel/0007.3/0587.html
[2324] http://www.slackware.com/~alien/tools/mkinitrd_command_generator.sh
[2325] http://www.kernel.org/signature.html
[2326] http://coredump.cl/wiki/doku.php?id=compilaci%C3%B3n_de_kernel
[2327] http://alien.slackbook.org/dokuwiki/doku.php?id=linux:kernelbuilding
[2328] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2329] https://github.com/jose1711/slackware_stuff/blob/master/build_kernel_slackware.sh

[[_howtos_slackware_admin_set_up_syslinux_as_boot_loader_on_uefi_based_hardware.html

[2330] http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project
[2331] http://docs.slackware.com/howtos:slackware_admin:installing_with_gpt_without_uefi
[2332] https://en.wikipedia.org/wiki/GUID_Partition_Table
[2333] https://www.kernel.org/pub/linux/utils/boot/syslinux/
[2334] http://www.syslinux.org/wiki/index.php?title=Library_modules
[2335] http://www.syslinux.org/wiki/index.php?title=The_Syslinux_Project
[2336] https://wiki.archlinux.org/index.php/Unified_Extensible_Firmware_Interface

[[_howtos_slackware_admin_install_slackware_on_a_online.net_dedibox_baremetal_server.html

[2337] https://www.online.net/en
[2338] https://www.online.net/en/dedicated-server#anchor-start
[2339] https://console.online.net/
[2340] https://console.online.net/
[2341] https://www.linuxquestions.org/
[2342] https://www.linuxquestions.org/questions/linux-security-4/verifying-host-authenticity-ssh-after-logging-in-over-then-accessible-secure-serial-terminal-4175593807/#post5655311
[2343] https://console.online.net/en/server/state/XXXXX/bmc
[2344] https://www.linuxquestions.org/questions/linux-security-4/verifying-host-authenticity-ssh-after-logging-in-over-then-accessible-secure-serial-terminal-4175593807/#post5655311
[2345] https://wiki.archlinux.org/index.php/LVM
[2346] https://docs.slackware.com/doku.php?id=wiki:user:atelszewski

[[_howtos_slackware_admin_how_to_use_slackware_installing_software.html

[2347] http://packages.slackware.com/
[2348] http://slackfind.net/
[2349] http://slacky.eu/
[2350] http://salixos.org/
[2351] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[2352] http://www.slackware.com/~mozes/
[2353] http://www.src2pkg.net/
[2354] http://asic-linux.com.mx/~izto/checkinstall/
[2355] http://code.google.com/p/deb2tgz/
[2356] http://joeyh.name/code/alien/
[2357] http://www.slackware.com/~alien/slackbuilds/
[2358] http://www.slackware.com/~alien/restricted_slackbuilds/
[2359] http://taper.alienbase.nl/mirrors/alien-kde/
[2360] http://www.slackware.com/~alien/multilib/
[2361] http://rlworkman.net/pkgs/
[2362] http://www.droplinegnome.org/
[2363] http://www.microlinux.fr/mled.php
[2364] http://mateslackbuilds.github.io/
[2365] http://ponce.cc/slackware/
[2366] http://slacky.eu/
[2367] http://salixos.org/
[2368] https://docs.slackware.com/doku.php?id=wiki:user:peterwwillis
[2369] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[2370] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_slackware_admin_swapfile_hibernation.html

[2371] http://slackware.osuosl.org/slackware-14.0/README_CRYPT.TXT
[2372] https://wiki.archlinux.org/index.php/Swap
[2373] https://answers.launchpad.net/ubuntu/+source/initramfs-tools/+question/193862
[2374] https://docs.slackware.com/doku.php?id=wiki:user:fl0

[[_howtos_general_admin_setting_up_a_slackware_chroot.html

[2375] http://www.slackware.com/getslack/
[2376] http://tty1.uk/scripts/slackware/mkchroot
[2377] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_chroot_from_media
[2378] https://raw.githubusercontent.com/aadityabagga/scripts/master/chroot.sh
[2379] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[2380] http://www.thegeekstuff.com/2013/01/mount-umount-examples/
[2381] https://wiki.archlinux.org/index.php/Chroot
[2382] http://www.linuxquestions.org/questions/slackware-installation-40/install-slackware-to-a-folder-using-chroot-825598/#post4093831
[2383] https://docs.slackware.com/doku.php?id=wiki:user:aaditya

[[_howtos_general_admin_install_fonts.html

[2384] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_general_admin_rdiff-backup.html

[2385] http://rdiff-backup.nongnu.org/
[2386] https://slackbuilds.org/result/?search=librsync
[2387] https://slackbuilds.org/result/?search=rdiff-backup
[2388] https://docs.slackware.com/doku.php?id=wiki:user:klaatu

[[_howtos_general_admin_files_filesystem_copying_over_network.html

[2389] http://www.linuxquestions.org/questions/slackware-14/copy-whole-filesystem-via-scp-4175449321/#post4887869
[2390] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_general_admin_free_your_space.html

[2391] http://slackbuilds.org/repository/13.37/system/ncdu/
[2392] http://slackbuilds.org/repository/13.37/system/ncdu/
[2393] http://www.slackbuilds.org
[2394] http://docs.slackware.com/howtos:lets_build_a_slackbuild
[2395] http://www.slackwiki.com/Writing_A_SlackBuild_Script
[2396] http://www.src2pkg.net/
[2397] http://www.kde.org/applications/utilities/sweeper/
[2398] http://bleachbit.sourceforge.net/
[2399] http://slackbuilds.org/
[2400] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex
[2401] http://www.slackword.net/?p=78
[2402] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[2403] https://docs.slackware.com/doku.php?id=wiki:user:cpt

[[_howtos_general_admin_kvm_libvirt.html

[2404] http://libvirt.org
[2405] http://www.linux-kvm.org/page/Main_Page
[2406] http://www.slackbuilds.org
[2407] http://www.slackbuilds.org
[2408] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:pxe
[2409] http://libvirt.org
[2410] http://virt-manager.org
[2411] http://wiki.qemu.org/Index.html
[2412] http://www.linux-kvm.org/page/Main_Page
[2413] https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Administration_Guide/index.html
[2414] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_general_admin_task_scheduling.html

[2415] https://docs.slackware.com/doku.php?id=howtos:software:at
[2416] https://docs.slackware.com/doku.php?id=howtos:software:cron
[2417] https://docs.slackware.com/doku.php?id=howtos:software:anacron
[2418] http://slackbuilds.org/repository/13.37/system/anacron/
[2419] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[2420] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot
[2421] https://docs.slackware.com/doku.php?id=wiki:user:tdrssb
[2422] https://docs.slackware.com/doku.php?id=howtos:general_admin:en.wikipedia.org_wiki_cron

[[_howtos_general_admin_taskwarrior.html

[2423] http://taskwarrior.org
[2424] http://slackbuilds.org/office/task/
[2425] http://slackbuilds.org/development/lua/
[2426] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[2427] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[2428] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_general_admin_resize_a_qemu_raw_image_with_an_ntfs_filesytem.html

[2429] http://cauldrondevelopment.com/blog/2009/02/26/resize-qemu-ntfs-image/

[[_howtos_general_admin_udev_rules.html

[2430] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_general_admin_cli_constructs_and_useful_info.html

[2431] http://www.commandlinefu.com/commands/browse
[2432] http://www.grymoire.com/Unix/Quote.html
[2433] http://www.grymoire.com/Unix/Regular.html
[2434] http://www.regular-expressions.info/
[2435] http://xdialog.free.fr/
[2436] https://sites.google.com/site/easybashgui/home
[2437] http://code.google.com/p/gtkdialog/
[2438] http://www.grymoire.com/Unix/
[2439] http://www.tldp.org/LDP/abs/html/index.html
[2440] http://www.catonmat.net/projects/cheat-sheets/
[2441] http://www.zzee.com/solutions/linux-permissions.shtml
[2442] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh

[[_howtos_general_admin_searching_and_reading_manpages_efficiently.html

[2443] http://www.slackbuilds.org
[2444] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_general_admin_openrc.html

[2445] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[2446] http://slackbuilds.org/repository/14.2/system/openrc/
[2447] http://slackbuilds.org/repository/14.2/system/openrc-services/
[2448] https://github.com/ConsoleKit2/ConsoleKit2/pull/113
[2449] https://github.com/ConsoleKit2/ConsoleKit2/pull/113
[2450] https://wiki.gentoo.org/wiki/OpenRC#openrc-init
[2451] https://en.wikipedia.org/wiki/OpenRC
[2452] https://wiki.gentoo.org/wiki/OpenRC
[2453] https://github.com/OpenRC/openrc/
[2454] https://github.com/OpenRC/openrc/blob/master/user-guide.md
[2455] https://www.linuxquestions.org/questions/slackware-14/using-openrc-on-slackware-4175542567/
[2456] https://gitlab.com/aadityabagga/openrc-services
[2457] https://docs.slackware.com/doku.php?id=wiki:user:aaditya

[[_howtos_general_admin_serial_console.html

[2458] http://www.tldp.org/HOWTO/Remote-Serial-Console-HOWTO
[2459] http://www.gnu.org/software/screen/manual
[2460] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_software_start.html

[2461] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:start
[2462] https://docs.slackware.com/doku.php?id=howtos:general_admin:start
[2463] https://docs.slackware.com/doku.php?id=howtos:cloud:start
[2464] https://docs.slackware.com/doku.php?id=howtos:databases:start
[2465] https://docs.slackware.com/doku.php?id=howtos:emulators:start
[2466] https://docs.slackware.com/doku.php?id=howtos:multimedia:start
[2467] https://docs.slackware.com/doku.php?id=howtos:network_services:start
[2468] https://docs.slackware.com/doku.php?id=howtos:security:start
[2469] https://docs.slackware.com/doku.php?id=howtos:window_managers:start

[[_howtos_software_rtai.html

[2470] https://www.rtai.org/
[2471] http://archive.li/fGaKC
[2472] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_software_man2html.html

[2473] https://docs.slackware.com/doku.php?id=howtos:software:asciidoc_mini_howto
[2474] http://slackbuilds.org/office/pandoc/
[2475] http://www.w3.org/Tools/info2www.html
[2476] https://docs.slackware.com/doku.php?id=howtos:software:asciidoc_mini_howto
[2477] https://docs.slackware.com/doku.php?id=wiki:user:pdi
[2478] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_how_to_merge_pdf-files.html

[2479] http://slackbuilds.org/repository/14.0/office/pdftk/
[2480] http://slackbuilds.org/repository/14.0/office/pdfshuffler/
[2481] http://slackbuilds.org/repository/14.0/python/pyPdf/
[2482] http://slackbuilds.org/repository/14.0/python/pypoppler/
[2483] https://docs.slackware.com/doku.php?id=wiki:user:markush
[2484] http://www.linuxquestions.org/questions/slackware-14/which-tool-for-merging-pdf-files-4175453632/

[[_howtos_software_firefox.html

[2485] https://github.com/mozilla/pdf.js
[2486] https://docs.slackware.com/doku.php?id=wiki:user:arfon
[2487] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2488] http://alien.slackbook.org/blog/make-firefox-understand-downloaded-files/
[2489] http://www.linuxquestions.org/questions/slackware-14/make-firefox-aware-of-kde-apps-615686/#post4627197
[2490] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_phoronix_test_suite.html

[2491] https://www.phoronix-test-suite.com/
[2492] https://slackbuilds.org/repository/14.2/system/phoronix-test-suite/
[2493] http://openbenchmarking.org/showdown/pts/build-linux-kernel
[2494] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_software_tmux.html

[2495] http://slackbuilds.org/
[2496] http://tmux.sourceforge.net/
[2497] http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/FAQ
[2498] http://tmux.sourceforge.net/
[2499] http://blog.hawkhost.com/2010/06/28/tmux-the-terminal-multiplexer/
[2500] http://blog.hawkhost.com/2010/07/02/tmux-%E2%80%93-the-terminal-multiplexer-part-2/
[2501] http://lukaszwrobel.pl/blog/tmux-tutorial-split-terminal-windows-easily
[2502] https://docs.slackware.com/doku.php?id=wiki:user:escaflown

[[_howtos_software_efficient_cli_navigation.html

[2503] https://docs.slackware.com/doku.php?id=slackbook:shell
[2504] http://linux.byexamples.com/archives/138/directory-stack/#comment-99015
[2505] http://www.slackword.net/?p=494
[2506] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex

[[_howtos_software_texlive.html

[2507] http://slackbuilds.org/
[2508] http://www.tug.org/texlive/acquire-netinstall.html
[2509] https://docs.slackware.com/doku.php?id=wiki:user:vaporseb

[[_howtos_software_cacti.html

[2510] https://slackbuilds.org/repository/14.2/libraries/rrdtool
[2511] https://slackbuilds.org/repository/14.2/network/cacti/
[2512] https://docs.slackware.com/doku.php?id=howtos:network_services:httpd
[2513] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware
[2514] http://YOUR_MACHINE/cacti/install.php
[2515] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_software_arpwatch.html

[2516] https://en.wikipedia.org/wiki/IP_address
[2517] https://en.wikipedia.org/wiki/MAC_address
[2518] https://en.wikipedia.org/wiki/Address_Resolution_Protocol
[2519] https://en.wikipedia.org/wiki/LAN
[2520] https://en.wikipedia.org/wiki/ARP_spoofing
[2521] https://slackbuilds.org/result/?search=arpwatch&sv=
[2522] https://slackbuilds.org/howto/
[2523] https://slackbuilds.org/faq/
[2524] https://docs.slackware.com/doku.php?id=howtos:network_services:configuring_a_wireless_access_point
[2525] https://ee.lbl.gov/
[2526] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_software_irssi.html

[2527] http://slackbuilds.org/result/?search=tor
[2528] http://slackbuilds.org/result/?search=torsocks
[2529] http://slackbuilds.org/result/?search=vidalia
[2530] http://freenode.net/faq.shtml#nicksetup
[2531] http://software.jaos.org/#cpan2tgz
[2532] http://software.jaos.org/git/cpan2tgz
[2533] http://slackbuilds.org/result/?search=cpan2tgz
[2534] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2535] http://www.irssi.org/
[2536] https://tools.ietf.org/html/rfc1459
[2537] http://freenode.net/
[2538] https://www.torproject.org/
[2539] http://www.andrews-corner.org/irssi.html
[2540] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela
[2541] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_snmptrapd.html

[2542] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_asciidoc.html

[2543] https://docs.slackware.com/doku.php?id=howtos:software:man2html_mini_howto
[2544] https://medium.com/@chacon/living-the-future-of-technical-writing-2f368bd0a272
[2545] http://asciidoctor.org/
[2546] http://slackbuilds.org/graphics/dblatex/
[2547] http://dblatex.sourceforge.net/
[2548] http://slackbuilds.org/system/source-highlight/
[2549] https://www.gnu.org/software/src-highlite/source-highlight.html
[2550] https://asciidoc.googlecode.com/hg/vim/syntax/asciidoc.vim
[2551] http://www.methods.co.nz/asciidoc/chunked/ape.html
[2552] http://asciidoc.org/
[2553] http://asciidoc.org/userguide.html#X24
[2554] https://docs.slackware.com/doku.php?id=howtos:software:man2html_mini_howto
[2555] http://search.cpan.org/~diberri/HTML-WikiConverter-DokuWiki-0.53/lib/HTML/WikiConverter/DokuWiki.pm
[2556] http://search.cpan.org/dist/HTML-WikiConverter/lib/HTML/WikiConverter.pm
[2557] http://www.linuxquestions.org/questions/slackware-14/asciidoc-mini-howto-4175528145/
[2558] https://docs.slackware.com/doku.php?id=wiki:user:pdi
[2559] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_zabbix.html

[2560] http://www.zabbix.com/
[2561] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware
[2562] https://docs.slackware.com/doku.php?id=howtos:software:httpd
[2563] http://slackbuilds.org/repository/14.0/network/zabbix_agentd/
[2564] http://slackbuilds.org/repository/14.0/network/zabbix_proxy/
[2565] http://slackbuilds.org/repository/14.0/network/zabbix_server/
[2566] http://slackbuilds.org/repository/14.0/network/zabbix_agentd/
[2567] http://slackbuilds.org/repository/14.0/network/zabbix_proxy/
[2568] http://slackbuilds.org/repository/14.0/network/zabbix_server/
[2569] https://docs.slackware.com/doku.php?id=wiki:user:arfon
[2570] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot
[2571] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_ntop.html

[2572] http://ntopmachine:3000

[[_howtos_software_monit.html

[2573] https://mmonit.com/monit/
[2574] https://slackbuilds.org/
[2575] http://127.0.0.1:2812/
[2576] https://mmonit.com/wiki/Monit/ConfigurationExamples
[2577] https://mmonit.com/wiki/Monit/EnableSSLInMonit
[2578] https://mmonit.com/wiki/Monit/Gmail
[2579] https://mmonit.com/wiki/Monit/CustomTests
[2580] https://docs.slackware.com/doku.php?id=wiki:user:lamerix

[[_howtos_software_boinc_gpu_ati_slackware.html

[2581] http://boinc.berkeley.edu/dl/boinc_7.2.33_x86_64-pc-linux-gnu.sh
[2582] http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/
[2583] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_software_google_chrome.html

[2584] http://slackbuilds.org/result/?search=chromium
[2585] http://www.chromium.org/Home
[2586] http://mirrors.slackware.com/slackware/slackware-current/extra/google-chrome/README
[2587] http://mirrors.slackware.com/
[2588] http://www.google.com/chrome
[2589] http://slackbuilds.org/mirror/slackware/slackware-14.1/extra/google-chrome/
[2590] http://www.chromium.org/getting-involved/dev-channel
[2591] http://www.chromium.org/getting-involved/dev-channel
[2592] http://mirrors.slackware.com/slackware/slackware-current/extra/google-chrome/README
[2593] https://docs.slackware.com/doku.php?id=wiki:user:escaflown

[[_howtos_software_start.html

[2594] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:start
[2595] https://docs.slackware.com/doku.php?id=howtos:general_admin:start
[2596] https://docs.slackware.com/doku.php?id=howtos:cloud:start
[2597] https://docs.slackware.com/doku.php?id=howtos:databases:start
[2598] https://docs.slackware.com/doku.php?id=howtos:emulators:start
[2599] https://docs.slackware.com/doku.php?id=howtos:multimedia:start
[2600] https://docs.slackware.com/doku.php?id=howtos:network_services:start
[2601] https://docs.slackware.com/doku.php?id=howtos:security:start
[2602] https://docs.slackware.com/doku.php?id=howtos:window_managers:start

[[_howtos_software_xpdf.html

[2603] http://docs.slackware.com/slackbook:printing?s[]=cups#setting_up_a_printer_in_cups
[2604] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_software_template.html

[2605] https://docs.slackware.com/doku.php?id=howtos:software:link_here

[[_howtos_software_zoneminder.html

[2606] https://docs.slackware.com/doku.php?id=howtos:software:ffmpeg
[2607] https://docs.slackware.com/doku.php?id=howtos:software:mariadb
[2608] https://slackbuilds.org/repository/14.2/system/ZoneMinder/
[2609] https://docs.slackware.com/doku.php?id=wiki:user:arfon
[2610] https://docs.slackware.com/doku.php?id=wiki:user:markand

[[_howtos_software_nagios.html

[2611] http://sbopkg.org/
[2612] http://slackbuilds.org/
[2613] http://slackbuilds.org/network/nagios/
[2614] http://YOUR_MACHINE/nagios/
[2615] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_software_palemoon.html

[2616] https://www.palemoon.org/
[2617] https://slackbuilds.org/repository/14.2/development/gcclegacy494/
[2618] http://repo.khronosschoty.org/Slackware/gcc4.9.4/
[2619] http://repo.khronosschoty.org/Slackware/Pale-Moon/
[2620] http://www.slackware.com/~alien/slackbuilds/palemoon/
[2621] https://notabug.org/khronosschoty/SlackBuilds/src/master/network/palemoon
[2622] https://slackbuilds.org/repository/14.2/development/gcclegacy494/
[2623] https://notabug.org/khronosschoty/SlackBuilds/archive/master.tar.gz/
[2624] https://notabug.org/khronosschoty/SlackBuilds/archive/master.tar.gz
[2625] http://docs.slackware.com/howtos:software:palemoon#installation_instructions_for_slackware_142
[2626] http://docs.slackware.com/howtos:software:palemoon#installation_instructions_for_slackware_142
[2627] https://addons.palemoon.org/
[2628] https://addons.mozilla.org/firefox/
[2629] https://addons.palemoon.org/
[2630] http://prefbar.tuxfamily.org/
[2631] https://addons.mozilla.org/en-US/firefox/addon/keefox/versions/
[2632] https://slackbuilds.org/repository/14.2/misc/KeePassHttp/
[2633] https://addons.mozilla.org/en-US/firefox/addon/passifox/
[2634] https://www.palemoon.org/knownissues.shtml
[2635] https://bugzilla.mozilla.org/show_bug.cgi?id=733324#c9
[2636] http://www.slackware.com/~alien/slackbuilds/oxygen-gtk2/
[2637] https://www.palemoon.org/
[2638] https://docs.slackware.com/doku.php?id=howtos:software:google-chrome
[2639] https://docs.slackware.com/doku.php?id=howtos:software:google-chrome
[2640] https://docs.slackware.com/doku.php?id=wiki:user:khronosschoty

[[_howtos_software_at.html

[2641] http://unixhelp.ed.ac.uk/CGI/man-cgi?at
[2642] http://www.brunolinux.com/02-The_Terminal/The_at_Command.html
[2643] http://sathyaphoenix.wordpress.com/2009/01/18/using-at-command-to-schedule-jobs-in-linux/
[2644] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_software_java.html

[2645] http://www.oracle.com/technetwork/java/javase/downloads/index.html
[2646] http://www.java.com/en/download/installed.jsp
[2647] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2648] http://slackware.com/~alien/slackbuilds/openjdk/
[2649] http://slackware.com/~alien/slackbuilds/icedtea-web
[2650] http://slackware.com/~alien/slackbuilds/rhino
[2651] http://slackware.com/~alien/slackbuilds/openjdk/build/README.txt
[2652] https://en.wikipedia.org/wiki/Dot_
[2653] http://slackware.org.uk/slackware/slackware64-current/extra/java/README
[2654] https://docs.slackware.com/doku.php?id=wiki:user:sycamorex
[2655] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_software_mplayer.html

[2656] http://www.linuxquestions.org/questions/slackware-14/slackware-documentation-project-4175422561/
[2657] http://zuttobenkyou.wordpress.com/2009/01/17/how-to-quickly-make-a-playlist-for-mplayer/
[2658] https://docs.slackware.com/doku.php?id=wiki:user:aschyiel

[[_howtos_multimedia_netflix.html

[2659] http://docs.slackware.com/howtos:software:google-chrome

[[_howtos_multimedia_steam.html

[2660] https://en.wikipedia.org/wiki/Steam_%28software%29
[2661] https://docs.slackware.com/doku.php?id=slackware:multilib
[2662] http://www.slackware.com/~alien/slackbuilds/steamclient/
[2663] https://github.com/ValveSoftware/steam-for-linux/issues/1179#issuecomment-26445442
[2664] https://slackbuilds.org/repository/14.2/libraries/OpenAL/
[2665] https://slackbuilds.org/repository/14.2/libraries/libtxc_dxtn/
[2666] http://steamcommunity.com/app/238460/discussions/1/540741858956217983/?ctp=2#c540741859210052192
[2667] https://wiki.archlinux.org/index.php/Steam
[2668] http://alien.slackbook.org/blog/valves-steam-client-for-linux/
[2669] http://alien.slackbook.org/blog/steam-games-in-slackware/

[[_howtos_multimedia_pulseaudio_non-default.html

[2670] https://en.wikipedia.org/wiki/BlueZ
[2671] http://www.slackware.com/changelog/current.php?cpu=x86_64
[2672] https://wiki.archlinux.org/index.php/PulseAudio#ALSA.2Fdmix_without_grabbing_hardware_device
[2673] http://alien.slackbook.org/blog/tag/kde5/
[2674] https://docs.slackware.com/doku.php?id=howtos:multimedia:pulseaudio
[2675] https://docs.slackware.com/doku.php?id=wiki:user:lonestar

[[_howtos_multimedia_htpc.html

[2676] https://slackbuilds.org/result/?search=kodi&sv=
[2677] https://slackbuilds.org/result/?search=ffmpeg&sv=
[2678] http://www.sbopkg.org
[2679] https://docs.slackware.com/doku.php?id=howtos:network_services:home_nfs_howto
[2680] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_multimedia_pulseaudio.html

[2681] https://github.com/i-rinat/apulse
[2682] http://slackbuilds.org/repository/14.1/audio/pulseaudio/
[2683] http://repository.slacky.eu/
[2684] http://files.z01.eu/skype/
[2685] https://docs.slackware.com/doku.php?id=slackware:multilib
[2686] http://alsa.opensrc.org/Dsnoop
[2687] http://slackbuilds.org/repository/14.1/desktop/xfce4-volumed-pulse/
[2688] http://slackbuilds.org/repository/14.1/audio/ponymix/
[2689] https://wiki.archlinux.org/index.php/PulseAudio
[2690] https://docs.slackware.com/doku.php?id=wiki:user:fsleg

[[_howtos_multimedia_digital_audio_workstation_compensating_latency.html

[2691] https://wiki.linuxaudio.org/wiki/jack_latency_tests
[2692] https://www.systutorials.com/docs/linux/man/1-jack_iodelay/
[2693] https://manual.ardour.org/synchronization/latency-and-latency-compensation/
[2694] https://docs.slackware.com/doku.php?id=wiki:user:0xbf
[2695] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_multimedia_digital_audio_workstation_minimizing_latency.html

[2696] https://docs.slackware.com/doku.php?id=howtos:multimedia:digital_audio_workstation:compensating_latency
[2697] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2698] https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface
[2699] http://linuxmusicians.com
[2700] https://alien.slackbook.org/blog/configuring-slackware-for-use-as-a-daw/
[2701] https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface
[2702] https://github.com/jackaudio/jackaudio.github.com/wiki/Differences-between-jack1-and-jack2
[2703] https://github.com/Gimmeapill/xruncounter
[2704] https://linuxmusicians.com/viewtopic.php?f=27&t=19268
[2705] https://linuxmusicians.com/viewtopic.php?f=27&t=19858&start=15
[2706] https://gist.github.com/SaveTheRbtz/f5e8d1ca7b55b6a7897b
[2707] https://docs.slackware.com/doku.php?id=wiki:user:0xbf

[[_howtos_multimedia_digital_audio_workstation_start.html

[2708] http://ardour.org/
[2709] https://lmms.io/
[2710] https://www.ableton.com/
[2711] https://www.image-line.com/flstudio/
[2712] https://new.steinberg.net/cubase/
[2713] https://www.avid.com/pro-tools
[2714] https://docs.slackware.com/doku.php?id=studioware:start
[2715] http://www.bandshed.net/avlinux/
[2716] https://qstudio64.tumblr.com/
[2717] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_multimedia_digital_audio_workstation_connecting_midi_devices.html

[2718] https://manual.ardour.org/setting-up-your-system/setting-up-midi/midi-on-linux/
[2719] http://linux-audio.4202.n7.nabble.com/Is-Xalsarawidi-the-same-as-Xraw-or-Xseq-td106370.html
[2720] https://discourse.ardour.org/t/midi-latency-measurement/87829
[2721] https://github.com/x42/jack_midi_latency
[2722] https://docs.slackware.com/doku.php?id=wiki:user:0xbf

[[_howtos_multimedia_digital_audio_workstation_compensating_latency.html

[2723] https://wiki.linuxaudio.org/wiki/jack_latency_tests
[2724] https://www.systutorials.com/docs/linux/man/1-jack_iodelay/
[2725] https://manual.ardour.org/synchronization/latency-and-latency-compensation/
[2726] https://docs.slackware.com/doku.php?id=wiki:user:0xbf
[2727] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_multimedia_digital_audio_workstation_minimizing_latency.html

[2728] https://docs.slackware.com/doku.php?id=howtos:multimedia:digital_audio_workstation:compensating_latency
[2729] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2730] https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface
[2731] http://linuxmusicians.com
[2732] https://alien.slackbook.org/blog/configuring-slackware-for-use-as-a-daw/
[2733] https://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface
[2734] https://github.com/jackaudio/jackaudio.github.com/wiki/Differences-between-jack1-and-jack2
[2735] https://github.com/Gimmeapill/xruncounter
[2736] https://linuxmusicians.com/viewtopic.php?f=27&t=19268
[2737] https://linuxmusicians.com/viewtopic.php?f=27&t=19858&start=15
[2738] https://gist.github.com/SaveTheRbtz/f5e8d1ca7b55b6a7897b
[2739] https://docs.slackware.com/doku.php?id=wiki:user:0xbf

[[_howtos_multimedia_digital_audio_workstation_start.html

[2740] http://ardour.org/
[2741] https://lmms.io/
[2742] https://www.ableton.com/
[2743] https://www.image-line.com/flstudio/
[2744] https://new.steinberg.net/cubase/
[2745] https://www.avid.com/pro-tools
[2746] https://docs.slackware.com/doku.php?id=studioware:start
[2747] http://www.bandshed.net/avlinux/
[2748] https://qstudio64.tumblr.com/
[2749] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_multimedia_digital_audio_workstation_connecting_midi_devices.html

[2750] https://manual.ardour.org/setting-up-your-system/setting-up-midi/midi-on-linux/
[2751] http://linux-audio.4202.n7.nabble.com/Is-Xalsarawidi-the-same-as-Xraw-or-Xseq-td106370.html
[2752] https://discourse.ardour.org/t/midi-latency-measurement/87829
[2753] https://github.com/x42/jack_midi_latency
[2754] https://docs.slackware.com/doku.php?id=wiki:user:0xbf

[[_howtos_security_start.html

[2755] http://www.slackware.com/lists/
[2756] http://www.slackware.com/security/
[2757] http://www.gilandre.net/cgi-bin/wiki.cgi/InstallDenyHostsOnSlackware
[2758] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[2759] https://docs.slackware.com/doku.php?id=howtos:security:inetd
[2760] https://docs.slackware.com/doku.php?id=howtos:security:ssh
[2761] https://docs.slackware.com/doku.php?id=howtos:security:enabling_encrypted_swap

[[_howtos_security_ssh.html

[2762] http://www.openssh.org
[2763] http://www.openssh.org
[2764] http://www.openssh.org
[2765] http://www.openssh.org
[2766] http://www.openssh.org
[2767] http://puppetlabs.com/
[2768] http://null.redcodenetwork.ro/changing-the-ssh-port-without-changing-it/
[2769] http://openssh.org/manual.html
[2770] https://docs.slackware.com/doku.php?id=wiki:user:noryungi

[[_howtos_security_installing_tor_using_a_slackbuild_script.html

[2771] https://www.torproject.org/index.html.en
[2772] http://slackbuilds.org/repository/13.37/libraries/libevent/
[2773] http://slackbuilds.org/repository/13.37/network/tor/
[2774] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:creating_a_package_using_a_slackbuild_script
[2775] https://docs.slackware.com/doku.php?id=slackware:slackbuild_scripts
[2776] https://addons.mozilla.org/en-US/firefox/addon/foxyproxy-basic/
[2777] https://torcheck.xenobite.eu/
[2778] https://docs.slackware.com/doku.php?id=wiki:user:nocturnal.slacker
[2779] https://www.torproject.org/download/
[2780] https://tb-manual.torproject.org/
[2781] https://docs.slackware.com/doku.php?id=wiki:user:nocturnal.slacker
[2782] https://noctslackv1.wordpress.com/2011/09/12/tor-on-slackware-and-arch/

[[_howtos_security_basic_security.html

[2783] http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/
[2784] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2785] http://www.slackware.com/~alien/efg/
[2786] http://www.fwbuilder.org/
[2787] http://bugs.xfree86.org/show_bug.cgi?id=1376
[2788] http://whatismyipaddress.com/
[2789] https://en.wikipedia.org/wiki/List_of_TCP_and_UDP_port_numbers
[2790] http://rkhunter.sourceforge.net/
[2791] http://www.clamav.net/lang/en/
[2792] http://www.thegeekstuff.com/2008/06/the-ultimate-guide-for-creating-strong-passwords/
[2793] http://slackwiki.com/Basic_Security_Fixes
[2794] http://slackwiki.com/Security_Assessment_using_Nmap

[[_howtos_security_openvpn.html

[2795] https://docs.slackware.com/doku.php?id=howtos:window_managers:i3wm
[2796] http://mirrors.slackware.com/slackware/slackware64-14.0/source/n/openvpn/
[2797] http://en.wikipedia.org/wiki/Openvpn
[2798] https://docs.slackware.com/doku.php?id=wiki:user:comfree

[[_howtos_security_enabling_encrypted_swap.html

[2799] http://www.milner.ca/article/slackware-encrypted-swap
[2800] https://docs.slackware.com/doku.php?id=wiki:user:nyteowl

[[_howtos_security_enabling_secure_boot.html

[2801] https://git.kernel.org/cgit/linux/kernel/git/jejb/efitools.git/
[2802] https://git.kernel.org/cgit/linux/kernel/git/jejb/sbsigntools.git/
[2803] http://slackbuilds.org
[2804] https://technet.microsoft.com/en-us/library/dn747883.aspx
[2805] https://docs.slackware.com/doku.php?id=wiki:user:turtleli
[2806] http://uefi.org
[2807] http://www.rodsbooks.com/efi-bootloaders/secureboot.html
[2808] http://blog.hansenpartnership.com/
[2809] https://technet.microsoft.com/en-us/library/dn747883.aspx

[[_howtos_security_start.html

[2810] http://www.slackware.com/lists/
[2811] http://www.slackware.com/security/
[2812] http://www.gilandre.net/cgi-bin/wiki.cgi/InstallDenyHostsOnSlackware
[2813] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[2814] https://docs.slackware.com/doku.php?id=howtos:security:inetd
[2815] https://docs.slackware.com/doku.php?id=howtos:security:ssh
[2816] https://docs.slackware.com/doku.php?id=howtos:security:enabling_encrypted_swap

[[_howtos_security_sshkeys.html

[2817] http://www.openssh.org
[2818] http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-keygen&apropos=0&sektion=1&manpath=OpenBSD+5.1&arch=i386&format=html
[2819] http://openssh.org/manual.html
[2820] https://docs.slackware.com/doku.php?id=wiki:user:noryungi

[[_howtos_misc_beaglebone_black_getting_started.html

[2821] https://beagleboard.org/getting-started
[2822] https://beagleboard.org/static/Drivers/Linux/FTDI/mkudevrule.sh
[2823] http://192.168.7.2
[2824] https://beagleboard.org/getting-started

[[_howtos_misc_xen_domu_guest.html

[2825] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:how_to_configure_fstab_and_lilo.conf_with_persistent_naming
[2826] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_fluxbox_setting_different_wallpapers_on_different_workspaces.html

[2827] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_misc_checking_a_slackware_version.html

[2828] http://slackjeff.com.br/artigos/verificando_versao_slackware.html
[2829] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_slackware_docker_image.html

[2830] https://hub.docker.com/r/vbatts/slackware/
[2831] https://github.com/vbatts/slackware-docker
[2832] http://docs.docker.com/reference/builder/
[2833] https://github.com/lotabout/docker-slackware/blob/master/slackware-slackpkgplus/Dockerfile
[2834] https://github.com/josemrb/docker-slackware/blob/develop/nginx/Dockerfile
[2835] https://docs.slackware.com/doku.php?id=wiki:user:lamerix
[2836] https://github.com/vbatts/slackware-docker
[2837] https://hub.docker.com/r/vbatts/slackware/

[[_howtos_misc_virtualisation_vmware_guest.html

[2838] https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.server_configclassic.doc_41/esx_server_config/security_deployments_and_recommendations/t_enable_copy_and_paste_operations_between_the_guest_operating_system_and_remote_console.html
[2839] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_ssh_on_tor.html

[2840] http://slackbuilds.org
[2841] https://www.antagonism.org/anon/ssh-tor.shtml

[[_howtos_misc_approach_to_web_development_on_slackware.html

[2842] https://docs.slackware.com/doku.php?id=howtos:misc:slackbuilds.org
[2843] http://localhost:8080
[2844] http://localhost:8080/
[2845] https://getcomposer.org/
[2846] https://packagist.org/
[2847] https://www.apachefriends.org/index.html
[2848] https://docs.slackware.com/doku.php?id=wiki:user:captain_sensible

[[_howtos_misc_openxenmanager.html

[2849] https://github.com/OpenXenManager/openxenmanager/archive/master.zip
[2850] https://github.com/OpenXenManager/openxenmanager
[2851] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_misc_proxying_smtp.html

[2852] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_misc_connect_client_over_ssh_tunnel_to_mariadb.html

[2853] https://docs.slackware.com/doku.php?id=howtos:databases:install_mariadb_on_slackware
[2854] https://mariadb.com/kb/en/library/data-in-transit-encryption/
[2855] https://www.slackbuilds.org/
[2856] https://mariadb.com/resources/blog/connecting-to-mariadb-through-an-ssh-tunnel/
[2857] https://docs.slackware.com/doku.php?id=wiki:user:mahafyi

[[_howtos_misc_slackware_router_-_quick_and_dirty.html

[2858] http://sarpi.fatdog.eu
[2859] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_misc_network_policy_based_routing.html

[2860] http://man7.org/linux/man-pages/man8/ip-rule.8.html
[2861] https://docs.slackware.com/doku.php?id=wiki:user:lamerix

[[_howtos_misc_software_raid_troubleshoot_howto.html

[2862] http://bear.alienbase.nl/mirrors/slackware-live/
[2863] http://www.linuxquestions.org/questions/slackware-14/repair-lilo-on-software-raid1-4175593663/
[2864] https://bugzilla.redhat.com/show_bug.cgi?id=606481
[2865] https://www.linux.org.ru/forum/admin/13033496?lastmod=1479927790872
[2866] https://raid.wiki.kernel.org/index.php/Linux_Raid
[2867] https://www.kernel.org/doc/Documentation/md.txt
[2868] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[2869] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_misc_anatomy_of_a_slackbuild.html

[2870] https://alien.slackbook.org/AST/
[2871] https://slackbuilds.org/repository/14.2/academic/latex2html/?search=latex2html
[2872] https://github.com/latex2html/latex2html/releases
[2873] https://github.com/latex2html/latex2html/archive/v2019.2/latex2html-2019.2.tar.gz
[2874] https://docs.slackware.com/doku.php?id=wiki:user:captain_sensible
[2875] https://slackbuilds.org/templates/
[2876] https://slackbuilds.org/repository/14.2/academic/latex2html/?search=latex2html
[2877] https://docs.slackware.com/doku.php?id=wiki:user:captain_sensible

[[_howtos_misc_get_acquainted_with_slackware.html

[2878] http://slackware.com
[2879] https://www.patreon.com/slackwarelinux/overview
[2880] http://mirrors.slackware.com/slackware/slackware-iso/
[2881] http://mirrors.slackware.com/
[2882] http://www.slackware.com/getslack/torrents.php
[2883] http://mirrors.slackware.com/slackware/
[2884] http://packages.slackware.com/
[2885] http://mirrors.slackware.com/slackware/slackware-iso/
[2886] http://docs.slackware.com
[2887] http://www.linuxquestions.org/questions/slackware-14/
[2888] http://wiki.linuxquestions.org/wiki/Slackware-Links
[2889] http://slint.fr
[2890] http://slint.fr/installer.html
[2891] http://slint.fr/package.html
[2892] http://mirrors.slackware.com/slackware/
[2893] http://mirrors.slackware.com/slackware/slackware-iso/
[2894] http://tmux.sourceforge.net/
[2895] http://packages.slackware.com/
[2896] http://slackbuilds.org
[2897] http://slackbuilds.org/howto/
[2898] http://www.sbopkg.org/
[2899] http://slackbuilds.org/
[2900] http://www.slackware.com/~alien/slackbuilds/
[2901] http://rlworkman.net/pkgs/
[2902] http://ponce.cc/slackware/
[2903] http://www.slackware.org.uk/
[2904] http://www.salixos.org/
[2905] http://www.slackware.org.uk/msb/
[2906] http://slacky.eu/slacky/Pagina_principale
[2907] http://slackbuilds.org
[2908] http://slakfinder.org/slackpkg+.html
[2909] http://slackbuilds.org/templates/
[2910] http://docs.slackware.com
[2911] http://www.slackware.com/changelog/
[2912] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_devastator_scroll_lock.html

[2913] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_script_autostart_output_to_console_x.html

[2914] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[2915] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_misc_variables_in_bash.html

[2916] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_network_interace_bonding.html

[2917] http://libteam.org/
[2918] https://docs.slackware.com/doku.php?id=wiki:user:lamerix

[[_howtos_misc_lxc.html

[2919] https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/
[2920] https://en.wikipedia.org/wiki/LXC
[2921] https://linuxcontainers.org/
[2922] https://wiki.debian.org/LXC
[2923] https://www.linuxquestions.org/questions/slackware-14/starting-lxc-container-in-slackware-14-2-a-4175614421/
[2924] https://stgraber.org/2014/02/09/lxc-1-0-gui-in-containers/
[2925] https://docs.slackware.com/doku.php?id=wiki:user:montagdude

[[_howtos_misc_enabling_sudo_on_slackware.html

[2926] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_misc_biffs_slackware_tips.html

[2927] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[2928] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_slackware64_current_with_lvm_and_luks_on_linodecloud.html

[2929] https://www.linuxquestions.org/questions/slackware-14/linode-update-to-current-success-4175632480/
[2930] http://ftp.slackware.com/pub/slackware/slackware64-current/README_CRYPT.TXT
[2931] https://mirrors.slackware.com/
[2932] https://www.linuxquestions.org/questions/slackware-14/grub-error-in-latest-slackware-current-4175693691/
[2933] https://www.linode.com/docs/guides/use-luks-for-full-disk-encryption/
[2934] https://docs.slackware.com/doku.php?id=wiki:user:mahafyi

[[_howtos_misc_games_ut2004.html

[2935] https://www.linuxquestions.org/questions/blog/disturbed1-175451/native-ut2004-from-gog-com-3305/

[[_howtos_misc_wireless_with_wpa_cli.html

[2936] https://wiki.archlinux.org/index.php/WPA_supplicant
[2937] https://docs.slackware.com/doku.php?id=wiki:user:slackwood

[[_howtos_misc_how-to_translate_a_document_in_asciidoc_format.html

[2938] http://asciidoc.org/
[2939] http://slint.fr/slint.html.en
[2940] http://slint.fr/slint.en.txt
[2941] http://asciidoc.org/userguide.html
[2942] http://powerman.name/doc/asciidoc
[2943] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_dokuwiki_versus_asciidoc_markups.html

[2944] http://docs.slackware.com/
[2945] http://slint.fr/misc/convtags
[2946] http://slackbuilds.org/repository/14.1/development/source-highlight/
[2947] http://slint.fr/misc/convtags/README
[2948] http://www.methods.co.nz/asciidoc/userguide.html
[2949] http://docs.slackware.com/wiki:syntax
[2950] https://www.dokuwiki.org/faq:lists
[2951] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_internationalization_and_localization_of_shell_scripts.html

[2952] http://www.gnu.org/software/gettext/manual/gettext.html
[2953] http://pubs.opengroup.org/onlinepubs/009695399/nframe.html
[2954] http://pubs.opengroup.org/onlinepubs/009695399/basedefs/contents.html
[2955] http://pubs.opengroup.org/onlinepubs/009695399/utilities/contents.html
[2956] https://docs.slackware.com/doku.php?id=wiki:user:didierspaier

[[_howtos_misc_virtualisation_vmware_guest.html

[2957] https://pubs.vmware.com/vsphere-4-esx-vcenter/index.jsp?topic=/com.vmware.vsphere.server_configclassic.doc_41/esx_server_config/security_deployments_and_recommendations/t_enable_copy_and_paste_operations_between_the_guest_operating_system_and_remote_console.html
[2958] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_misc_games_ut2004.html

[2959] https://www.linuxquestions.org/questions/blog/disturbed1-175451/native-ut2004-from-gog-com-3305/

[[_howtos_databases_postgresql.html

[2960] https://en.wikipedia.org/wiki/PostgreSQL
[2961] http://slackbuilds.org/repository/14.1/system/postgresql/
[2962] https://slackbuilds.org/repository/14.2/libraries/php-pgsql/
[2963] http://www.linuxquestions.org/questions/slackware-14/slackware-postgresql-and-php-118505/
[2964] https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/php
[2965] https://docs.slackware.com/doku.php?id=wiki:user:aaditya

[[_howtos_databases_install_mariadb_on_slackware.html

[2966] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2967] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_databases_microsoft_drivers_for_php_for_sql_server.html

[2968] https://www.microsoft.com/en-IE/sql-server/sql-server-2017
[2969] http://www.unixodbc.org/
[2970] https://slackbuilds.org/repository/14.2/libraries/unixODBC/
[2971] https://github.com/sbopkg/sbopkg
[2972] https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server
[2973] https://packages.microsoft.com/debian/8/prod/pool/main/m/msodbcsql/
[2974] https://packages.microsoft.com/debian/8/prod/pool/main/m/mssql-tools/
[2975] https://github.com/Microsoft/msphpsql

[[_howtos_databases_install_mysql_on_slackware.html

[2976] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[2977] http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf8-in-my-cnf
[2978] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_hardware_asus_eeepc.html

[2979] https://docs.slackware.com/doku.php?id=slackware:beginners_guide
[2980] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[2981] http://taper.alienbase.nl/mirrors/people/alien/slackbuilds/eeepc-acpi-scripts/
[2982] http://slackbuilds.org/repository/14.0/system/laptop-mode-tools/
[2983] https://bbs.archlinux.org/viewtopic.php?id=74951&p=2
[2984] http://www.linuxquestions.org/questions/slackware-14/slackware-13-1-on-a-netbook-asus-eee-1005ha-811813/
[2985] https://docs.slackware.com/doku.php?id=wiki:user:weput
[2986] https://www.linuxquestions.org/questions/user/kernel-p4n1c-375149/

[[_howtos_hardware_ssd.html

[2987] https://www.gnu.org/software/parted/manual/parted.html#align_002dcheck
[2988] http://asalor.blogspot.com/2011/08/trim-dm-crypt-problems.html
[2989] http://ftp.slackware.com/pub/slackware/slackware64-14.1/README_CRYPT.TXT

[[_howtos_hardware_sound_problems_on_slackware.html

[2990] https://slackbuilds.org/result/?search=alsaequal&sv=

[[_howtos_hardware_syncing_hardware_clock_and_system_local_time.html

[2991] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar
[2992] http://harishankar.org/blog/entry.php/how-to-set-your-computer-039-s-hardware-clock-to-local-time-and-make-linux-recognize-it

[[_howtos_hardware_gps_devices.html

[2993] http://www.slackbuilds.org
[2994] http://www.gpsbabel.org/
[2995] http://www.qlandkarte.org/
[2996] http://www.openstreetmap.org/
[2997] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_hardware_audio_and_snd-hda-intel.html

[2998] http://docs.slackware.com/howtos:hardware:sound_problems_on_slackware
[2999] https://docs.slackware.com/doku.php?id=wiki:user:allend
[3000] https://docs.slackware.com/doku.php?id=wiki:user:vharishankar

[[_howtos_hardware_virginmobile_and_ovation_mc760_modem.html

[3001] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_hardware_brother_printer_installation.html

[3002] https://support.brother.com
[3003] https://bear.alienbase.nl/mirrors/people/alien/multilib/
[3004] https://slackware.uk/people/alien/multilib/
[3005] http://localhost:631

[[_howtos_hardware_bfq_io_scheduler.html

[3006] http://algo.ing.unimo.it/people/paolo/disk_sched/
[3007] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:kernelbuilding
[3008] http://algo.ing.unimo.it/people/paolo/disk_sched/sources.php
[3009] https://docs.slackware.com/doku.php?id=wiki:ricky_cardo:xxx

[[_howtos_hardware_soundblaster-live-5.1.html

[3010] http://alsa.opensrc.org/Emu10k1
[3011] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.suse.comhttps://docs.slackware.com/pubhttps://docs.slackware.com/peoplehttps://docs.slackware.com/tiwaihttps://docs.slackware.com/awesfxhttps://docs.slackware.com/
[3012] http://www.alsa-project.org/~james/sound-fonts/8MBGMSFX.SF2
[3013] http://www.systemshock.org/index.php?topic=3188.0
[3014] http://www.alsa-project.org/~tiwai/awedrv.html#SoundFonts
[3015] https://docs.slackware.com/doku.php?id=howtos:software:vi
[3016] https://docs.slackware.com/doku.php?id=howtos:software:nano
[3017] https://docs.slackware.com/doku.php?id=howtos:software:midnight_commander
[3018] https://docs.slackware.com/doku.php?id=howtos:multimedia:audacious
[3019] http://slackbuilds.org
[3020] http://www.alsa-project.org/~tiwai/awedrv.html
[3021] http://alsa.opensrc.org/Emu10k1
[3022] http://www.systemshock.org/index.php?topic=3188.0
[3023] http://www.simpilot.net/~richnagel/#downloads
[3024] http://alsa.opensrc.org/Asfxload
[3025] http://vladimir-stupin.blogspot.com/2012/05/midi-debian-gnulinux.html
[3026] https://bugs.launchpad.net/ubuntu/+source/awesfx/+bug/183456
[3027] https://github.com/koppi/renoise-refcards/wiki/HOWTO-setup-EMU10k-soundfont-DSP-on-Ubuntu-11.10
[3028] http://www.linuxquestions.org/questions/slackware-14/sound-problems-in-slackware64-14-1-xfce-4175497387/
[3029] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[3030] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco
[3031] https://docs.slackware.com/doku.php?id=wiki:user:mfillpot

[[_howtos_hardware_acer_aspire_one_za3.html

[3032] http://unix.stackexchange.com/questions/49815/x-server-problem-on-slackware-14-and-poulsbo-module-gma500

[[_howtos_hardware_chromebook_pixel.html

[3033] http://docs.slackware.com/howtos:hardware:chromebook_pixel#sources
[3034] http://docs.slackware.com/slackware:install
[3035] https://github.com/raphael/linux-samus
[3036] https://en.wikipedia.org/wiki/Konami_Code
[3037] https://slackbuilds.org/repository/14.1/system/xbindkeys/
[3038] https://github.com/jakeday/chromebook-pixel-slackware
[3039] https://github.com/raphael/linux-samus
[3040] https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/chromebook-pixel-2015
[3041] https://wiki.archlinux.org/index.php/Chromebook_Pixel_2

[[_howtos_hardware_arm_gcc-10.x_aarch64_cross-compiler.html

[3042] http://arm.slackware.com
[3043] https://docs.slackware.com/howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler
[3044] https://github.com/raspberrypi/linux
[3045] https://docs.slackware.com/howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler
[3046] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.1.0-arm-1.txz
[3047] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.29.2-arm-1.txz
[3048] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.7.4-arm-1.txz
[3049] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-4.txz
[3050] http://arm.slackware.com/
[3051] https://www.linuxquestions.org/questions/slackware-arm-108/
[3052] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/
[3053] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[3054] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[3055] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[3056] https://www.github.com/raspberrypi/
[3057] https://ftp.gnu.org/gnu/
[3058] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[3059] https://docs.slackware.com/doku.php?id=slackwarearm:faq
[3060] http://wiki.osdev.org/GCC_Cross-Compiler
[3061] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[3062] https://www.raspberrypi.org/documentation/linux/kernel
[3063] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_gcc_aarch64_cross-compiler.html

[3064] http://www.slackware.com/~mozes/
[3065] https://docs.slackware.com/slackwarearm:faq
[3066] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-4.1.4-arm-1.txz
[3067] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.11.0-arm-1.txz
[3068] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.0.4-arm-1.txz
[3069] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.0-arm-1.txz
[3070] https://www.github.com/raspberrypi/linux
[3071] https://github.com/raspberrypi/firmware
[3072] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/gawk-4.1.4-arm-1.txz
[3073] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/git-2.11.0-arm-1.txz
[3074] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/bison-3.0.4-arm-1.txz
[3075] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/flex-2.6.0-arm-1.txz
[3076] http://arm.slackware.com/FAQs
[3077] http://wiki.osdev.org/GCC_Cross-Compiler
[3078] https://www.raspberrypi.org/documentation/linux/kernel
[3079] https://www.github.com/raspberrypi/
[3080] https://ftp.gnu.org/gnu/
[3081] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[3082] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_raspberrypi.html

[3083] http://sarpi.fatdog.eu/
[3084] http://stanleygarvey.com/slackwarearm_rpi/index.php
[3085] http://www.daves-collective.co.uk/raspi/
[3086] http://elinux.org/RPi_Kernel_Compilation
[3087] http://www.raspberrypi.org/downloads
[3088] https://docs.slackware.com/doku.php?id=wiki:user:mozes
[3089] https://docs.slackware.com/doku.php?id=wiki:user:louigi600
[3090] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj
[3091] https://docs.slackware.com/doku.php?id=wiki:user:streamthreader

[[_howtos_hardware_arm_raspberrypi3.html

[3092] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi2
[3093] http://sarpi.fatdog.eu/
[3094] http://sarpi64.fatdog.eu/
[3095] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[3096] https://www.raspberrypi.org/documentation/configuration/uart.md
[3097] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[3098] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_automatically_setting_system_time_on_arm_devices.html

[3099] https://www.ebay.com/sch/i.html?_from=R40&_nkw=RTC&_sacat=0&_sop=15
[3100] https://docs.slackware.com/doku.php?id=howtos:network_services:ntp
[3101] https://www.linuxquestions.org/questions/slackware-arm-108
[3102] https://docs.slackware.com/howtos:network_services:ntp
[3103] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak
[3104] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_nginx.html

[3105] https://nginx.org/
[3106] https://www.nginx.com/resources/faq/
[3107] https://w3techs.com/technologies/comparison/ws-apache,ws-microsoftiis,ws-nginx
[3108] https://slackbuilds.org/repository/14.2/network/nginx/
[3109] http://nginx.org/download/
[3110] http://nginx.org/download/nginx-1.17.9.tar.gz
[3111] https://goaccess.io
[3112] http://nginx.org
[3113] https://github.com/allinurl/goaccess
[3114] http://goaccess.io
[3115] http://https://slackbuilds.org/repository/14.2/system/goaccess/
[3116] http://slackware.uk/slackwarearm/slackwarearm-current/
[3117] https://nginx.org/download/
[3118] https://slackbuilds.org/slackbuilds/14.2/network/nginx/
[3119] https://slackbuilds.org/repository/14.2/system/goaccess/
[3120] https://goaccess.io/download
[3121] https://sarpi.fatdog.eu/index.php?p=downloads
[3122] https://w3techs.com/technologies/comparison/ws-apache,ws-nginx
[3123] https://www.nginx.com/resources/faq/
[3124] https://nginx.org/en/docs/faq.html
[3125] https://www.aosabook.org/en/nginx.html
[3126] https://goaccess.io/faq
[3127] https://github.com/allinurl/goaccess
[3128] http://aal.fatdog.eu
[3129] http://www.slackware.com/~mozes/
[3130] https://feeds.acast.com/public/shows/slackchat
[3131] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_hacking_the_xzpad700_7_tablet.html

[3132] https://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#image_builder
[3133] https://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#image_builder
[3134] http://www.linuxquestions.org/questions/slackware-arm-108/
[3135] http://linux-sunxi.org/Main_Page
[3136] http://en.wikipedia.org/wiki/Usb#Physical_appearance
[3137] http://linux-sunxi.org/Main_Page
[3138] http://linux-sunxi.org/BROM
[3139] http://cubiestore.com/products/usd-breakout-board
[3140] http://i246.photobucket.com/albums/gg113/louigi600/XZPAD700/board_big_zps34ed425c.jpg
[3141] http://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#wrapping_up
[3142] http://dl.linux-sunxi.org/users/amery/sunxi-3.0/latest/a13_mid_hwpack.tar.xz
[3143] http://dl.linux-sunxi.org/users/amery/testing-3.4/latest/a13_mid_hwpack.tar.xz
[3144] https://github.com/linux-sunxi/linux-sunxi
[3145] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/rootshttps://docs.slackware.com/
[3146] http://download.doozan.com/a10/a10_base-1.3.zip
[3147] http://forum.doozan.com/list.php?6
[3148] http://www.berryterminal.com/doku.php/berryboot_a10
[3149] http://tmerle.blogspot.fr/2012/09/mele-a2000-my-own-linux-flash-kitchen.html
[3150] http://linux-sunxi.org/Initial_Ramdisk
[3151] http://releases.linaro.org/latest/ubuntu/precise-images/alip
[3152] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/rootshttps://docs.slackware.com/
[3153] http://homepage3.nifty.com/tsato/xvkbd/#download
[3154] http://scotland.proximity.on.ca/contrib-images/hansg/Fedora-18-a10-armhfp-r2.img.xz
[3155] http://linux-sunxi.org/Allwinner_SoC_Family
[3156] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/xzpad700
[3157] http://ftp.slackware.org.uk/slackwarearm/people/louigi600/xzpad700
[3158] https://docs.slackware.com/doku.php?id=rsync:rsync.slackware.org.uk_slackwarearm_people_louigi600_xzpad700
[3159] http://www.linuxquestions.org/questions/slackware-arm-108/
[3160] http://sourceforge.net/projects/bclash/files/a1x_image_builder/a1x_slackwarearm_image_creator.txz/download
[3161] http://linux-sunxi.org/How_to_boot_the_A10_over_the_network
[3162] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_arm_architecture_numbers.html

[3163] http://www.arm.linux.org.uk/developer/machines/
[3164] http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

[[_howtos_hardware_arm_qemu_support_in_slackware_arm.html

[3165] https://www.linuxquestions.org/questions/slackware-arm-108/qemu-system-arm-panic-on-x86_64-a-4175670124/
[3166] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/boardsupporthttps://docs.slackware.com/qemuhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/helper-scriptshttps://docs.slackware.com/
[3167] https://www.qemu.org/
[3168] https://distcc.github.io/
[3169] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.0/
[3170] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/
[3171] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/
[3172] http://slackware.uk/slackwarearm/
[3173] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.com::slackwarearmhttps://docs.slackware.com/slackwarearm-14.2
[3174] http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/
[3175] https://slackbuilds.org/howto/
[3176] http://slackbuilds.org/repository/14.2/development/device-tree-compiler/
[3177] http://slackbuilds.org/repository/14.2/system/qemu/
[3178] https://en.wikipedia.org/wiki/Secure_Digital
[3179] https://www.qemu.org/documentation/
[3180] http://192.168.1.2:8000/slackwarearm-current/
[3181] https://docs.slackware.com/doku.php?id=howtos:network_services:setup_apache
[3182] http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/installer_launch
[3183] http://192.168.1.2
[3184] http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/disk_launch
[3185] http://www.slackware.com/~mozes/
[3186] http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/
[3187] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_hardware_arm_zram_slackware_arm_and_arm64.html

[3188] https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/
[3189] https://haydenjames.io/raspberry-pi-performance-add-zram-kernel-parameters/
[3190] https://www.kernel.org/doc/html/v5.10/admin-guide/blockdev/zram.html
[3191] https://www.lotar.altervista.org/wiki/how-to/zram-in-slackware
[3192] http://oprod.net/compress-ram-with-zram-in-slackware/
[3193] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_hardware_arm_releases_current.html

[3194] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_Tegra20.TXT
[3195] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:qemu_support_in_slackware_arm
[3196] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_AllWinner_A20.TXT
[3197] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_AllWinner_H3.TXT
[3198] http://sarpi.fatdog.eu/

[[_howtos_hardware_arm_raspberrypi3_wap.html

[3199] http://www.ebaystores.co.uk/thepihut
[3200] https://www.amazon.co.uk/dp/B004Y6MIXS
[3201] https://slackbuilds.org/repository/14.2/graphics/qrencode/
[3202] http://www.slackware.com/~alien/slackbuilds/qrencode/build/
[3203] https://play.google.com/store/apps/details?id=com.google.zxing.client.android
[3204] https://play.google.com/store/apps/developer?id=ZXing+Team
[3205] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_hardware_arm_interfacing_i2c_devices.html

[3206] http://en.wikipedia.org/wiki/I2c
[3207] http://www.lm-sensors.org/wiki/I2CTools
[3208] http://www.lm-sensors.org/wiki/I2CTools
[3209] http://www.ti.com/lit/ds/symlink/pca9306.pdf
[3210] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_slackwarearm_local-mirror-repository.html

[3211] http://slackware.uk/people/alien/tools/
[3212] http://http://slackware.uk/people/alien/tools/
[3213] http://https://idlemoor.github.io/slackrepo/
[3214] https://docs.slackware.com/slackware:philosophy
[3215] http://slackware.uk/people/alien/tools/
[3216] http://https://idlemoor.github.io/slackrepo/
[3217] https://www.kingston.com/memory-cards/canvas-go-plus-microsd-card
[3218] http://example.com
[3219] https://en.wikipedia.org/wiki/Cron#Overview
[3220] https://crontab.guru/every-day-8am
[3221] https://crontab.guru/every-8-hours
[3222] https://linux.die.net/man/8/logrotate
[3223] https://linux.die.net/man/8/logrotate
[3224] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/
[3225] http://192.168.1.17/slackwarearm
[3226] http://localhost/slackwarearm
[3227] https://www.linuxquestions.org/questions/slackware-arm-108
[3228] https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
[3229] https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
[3230] https://slackware.uk
[3231] https://fatdog.eu
[3232] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_toshiba_ac100_dynabook_az.html

[3233] http://arm.slackware.com/
[3234] https://launchpad.net/ubuntu/+source/linux-ac100/
[3235] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/kernel_ac100_3.0.27.tgz
[3236] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/boot.img
[3237] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/rescue.img
[3238] https://gitorious.org/ac100/abootimg.git
[3239] http://ftp.slackware.org.uk/slackwarearm/slackwarearm-devtools/minirootfs/roots/
[3240] https://dl.dropboxusercontent.com/u/40761340/sos-uboot-r5-alpha.bin
[3241] https://ac100.grandou.net/sosbootr5
[3242] http://ac100.grandou.net/kerneldev#mainline_git_kernel
[3243] https://gitorious.org/~marvin24/ac100/marvin24s-kernel.git
[3244] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_gcc-9.x_aarch64_cross-compiler.html

[3245] http://arm.slackware.com
[3246] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[3247] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.0.1-arm-1.txz
[3248] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.22.0-arm-1.txz
[3249] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.4.1-arm-1.txz
[3250] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-1.txz
[3251] https://www.github.com/raspberrypi/linux
[3252] https://github.com/raspberrypi/firmware
[3253] http://sarpi64.fatdog.eu/
[3254] http://sarpi64.fatdog.eu/files/extra/SARPi64.SlackBuild-aarch64-cc.txt
[3255] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/gawk-5.0.1-arm-1.txz
[3256] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/git-2.22.0-arm-2.txz
[3257] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/bison-3.4.1-arm-1.txz
[3258] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/flex-2.6.4-arm-3.txz
[3259] https://www.github.com/raspberrypi/
[3260] https://ftp.gnu.org/gnu/
[3261] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[3262] https://docs.slackware.com/doku.php?id=slackwarearm:faq
[3263] http://wiki.osdev.org/GCC_Cross-Compiler
[3264] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[3265] https://www.raspberrypi.org/documentation/linux/kernel
[3266] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_start.html

[3267] http://arm.slackware.com/installation/
[3268] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_14.2
[3269] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_current

[[_howtos_hardware_arm_raspberrypi3_network.html

[3270] http://sarpi.co.uk/
[3271] http://sarpi.co.uk
[3272] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_hardware_arm_olinuxinoa10s.html

[3273] http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/
[3274] http://www.malaya-digital.org/hcd_axp-md.patch
[3275] https://drive.google.com/file/d/0B-bAEPML8fwlYkItdU1TTm1VN0E/edit?usp=sharing
[3276] https://drive.google.com/file/d/0B-bAEPML8fwlY3llVDJxelY3d28/edit?usp=sharing
[3277] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/roots
[3278] http://www.malaya-digital.org/dev.tar.gz
[3279] http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/
[3280] https://github.com/linux-sunxi/u-boot-sunxi/wiki
[3281] http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/
[3282] https://docs.slackware.com/doku.php?id=wiki:user:balky

[[_howtos_hardware_arm_raspberrypi2.html

[3283] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3284] http://sarpi.fatdog.eu/
[3285] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3286] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[3287] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[3288] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_raspberrypi4.html

[3289] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi3
[3290] http://sarpi.fatdog.eu/
[3291] http://sarpi64.fatdog.eu/
[3292] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3293] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[3294] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[3295] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_releases_14.2.html

[3296] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_TRIMSLICE.TXT
[3297] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_KIRKWOOD.TXT
[3298] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_QEMU.TXT
[3299] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_BANANAPI.TXT
[3300] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3301] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi2
[3302] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi3
[3303] http://docs.slackware.com/howtos:hardware:arm:toshiba_ac100_dynabook_az
[3304] http://pandorawiki.org/Software_projects/OS/Slackware
[3305] http://www.malaya-digital.org/setting-up-slackware-arm-14-1-on-the-olinuxino-a10-lime-from-scratch/
[3306] http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/
[3307] http://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet
[3308] http://rpc.suroot.com/slackwarearm-live/
[3309] http://slaxbmc.blogspot.it/2014/04/slaxbmc-141-is-released.html

[[_howtos_hardware_arm_kernel_2.6.38_ac100.html

[3310] https://launchpad.net/ubuntu/+source/linux-ac100/
[3311] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_naming_slackware_packages.html

[3312] http://ftp.arm.slackware.com/slackwarearm/unsupported/slackwarearm-14.1/packages/
[3313] http://www.slackware.com/~mozes/docs/arm-pkgnamingconvention.txt

[[_howtos_hardware_arm_hummingboard.html

[3314] http://www.solid-run.com/products/hummingboard/
[3315] http://www.solid-run.com/products/cubox-i-mini-computer/
[3316] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_cpu_frequency_scaling.html

[3317] https://www.linuxquestions.org/questions/slackware-14/slackware-64bit-14-1-rc-kernel-3-10-16-and-virtualbox-4175481316/
[3318] https://plus.google.com/+ArjanvandeVen/posts/dLn9T4ehywL
[3319] https://docs.slackware.com/doku.php?id=wiki:user:markush
[3320] https://docs.slackware.com/doku.php?id=wiki:user:metaschima

[[_howtos_hardware_proprietary_graphics_drivers.html

[3321] https://docs.slackware.com/doku.php?id=howtos:cli_manual:introduction
[3322] http://support.amd.com/us/gpudownload/linux/Pages/radeon_linux.aspx
[3323] http://www.linuxquestions.org/questions/slackware-14/warzone2100-sbo-on-14-1-with-ati-r7-graphics-not-working-4175540818/page2.html#post5356236
[3324] http://slackbuilds.org/
[3325] https://docs.slackware.com/doku.php?id=slackware:multilib
[3326] http://slackbuilds.org/result/?search=nvidia
[3327] http://sbopkg.org/
[3328] http://www.nvidia.com/object/unix.html
[3329] http://www.nvidia.com/object/unix.html
[3330] https://docs.slackware.com/doku.php?id=slackware:multilib
[3331] ftp:https://docs.slackware.com/https://docs.slackware.com/download.nvidia.comhttps://docs.slackware.com/XFree86https://docs.slackware.com/Linux-x86_64https://docs.slackware.com/256.44https://docs.slackware.com/READMEhttps://docs.slackware.com/commonproblems.html
[3332] https://docs.slackware.com/doku.php?id=slackware:multilib
[3333] https://docs.slackware.com/doku.php?id=wiki:user:rinias

[[_howtos_hardware_smart_hdd_diagnostics.html

[3334] https://www.us-cert.gov/security-publications/data-backup-options
[3335] http://www.smartmontools.org/wiki
[3336] https://www.ultimatebootcd.com/
[3337] https://en.wikipedia.org/wiki/S.M.A.R.T.
[3338] https://en.wikipedia.org/wiki/Bathtub_curve
[3339] http://hardware.slashdot.org/story/13/03/01/224257/how-power-failures-corrupt-flash-ssd-data
[3340] http://research.google.com/archive/disk_failures.pdf
[3341] http://www.smartmontools.org/browser/trunk/www/badblockhowto.xml
[3342] https://en.wikipedia.org/wiki/S.M.A.R.T.
[3343] https://www.us-cert.gov/security-publications/data-backup-options

[[_howtos_hardware_processor_affinity.html

[3344] https://en.wikipedia.org/wiki/Processor_affinity
[3345] http://www.oracle.com/products/database/overview/
[3346] http://www-01.ibm.com/software/data/db2/
[3347] http://minecraft.net
[3348] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_hardware_enable_linux_multi-queue_block_io_queueing_mechanism_blk-mq.html

[3349] https://docs.slackware.com/doku.php?id=wiki:user:lamerix
[3350] https://www.thomas-krenn.com/en/wiki/Linux_Multi-Queue_Block_IO_Queueing_Mechanism_
[3351] http://kernel.dk/blk-mq.pdf
[3352] https://lwn.net/Articles/552904/

[[_howtos_hardware_hardware_diagnostics.html

[3353] http://en.wikipedia.org/wiki/Beep_codes
[3354] http://www.bioscentral.com/
[3355] http://www.memtest.org/
[3356] http://pyropus.ca/software/memtester/
[3357] http://pinouts.ru/Power/atxpower_pinout.shtml
[3358] http://pinouts.ru/Power/atx_v2_pinout.shtml
[3359] http://sourceforge.net/apps/trac/smartmontools/wiki
[3360] http://www.sysresccd.org/SystemRescueCd_Homepage
[3361] http://www.ultimatebootcd.com/
[3362] http://mikelab.kiev.ua/index_en.php?page=PROGRAMS/vmt_en
[3363] http://sourceforge.net/projects/vmtce/files/
[3364] http://www.ultimatebootcd.com/
[3365] http://sourceforge.net/projects/cudagpumemtest/
[3366] http://www.memtest.org/
[3367] http://www.mersenne.org/freesoft/#source
[3368] http://www.lm-sensors.org/
[3369] http://www.memtest.org/
[3370] http://www.cgsecurity.org/wiki/TestDisk
[3371] http://foremost.sourceforge.net/
[3372] http://www.sysresccd.org/SystemRescueCd_Homepage
[3373] http://www.howtocleananything.com/home-interior-tips/computer/how-to-clean-thermal-paste-off-cpu/
[3374] http://www.maximumpc.com/article/howtos/howto_install_cpu_and_apply_thermal_paste
[3375] http://www.linuxquestions.org/questions/showthread.php?p=5162136
[3376] https://wiki.archlinux.org/index.php/Mouse_acceleration
[3377] https://docs.slackware.com/doku.php?id=wiki:user:htexmexh
[3378] https://docs.slackware.com/doku.php?id=wiki:user:tobisgd
[3379] https://docs.slackware.com/doku.php?id=wiki:user:metaschima

[[_howtos_hardware_serial_installation.html

[3380] http://www.pcengines.ch/apu.htm
[3381] http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:usbboot#assembling_the_usb_image

[[_howtos_hardware_nvidia_optimus.html

[3382] http://www.slackbuilds.org/guidelines/
[3383] https://github.com/WhiteWolf1776/Bumblebee-SlackBuilds
[3384] https://docs.slackware.com/doku.php?id=slackware:multilib
[3385] http://www.slackbuilds.org/faq/#version_update
[3386] http://docs.slackware.com/slackware:multilib
[3387] http://bumblebee-project.org/
[3388] https://github.com/Bumblebee-Project/Bumblebee/wiki
[3389] https://github.com/jgeboski/
[3390] https://github.com/jgeboski/Bumblebee-SlackBuilds
[3391] https://github.com/whitewolf1776/Bumblebee-SlackBuilds
[3392] https://docs.slackware.com/doku.php?id=wiki:user:tommyc
[3393] https://docs.slackware.com/doku.php?id=wiki:user:poprocks
[3394] https://download.nvidia.com/XFree86/Linux-x86_64/450.80.02/README/primerenderoffload.html

[[_howtos_hardware_displaylink.html

[3395] https://slackbuilds.org/repository/14.2/development/dkms/
[3396] http://www.displaylink.com/downloads/ubuntu
[3397] https://wiki.archlinux.org/index.php/DisplayLink
[3398] http://displaylink.org/forum/forumdisplay.php?f=29

[[_howtos_hardware_arm_start.html

[3399] http://arm.slackware.com/installation/
[3400] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_14.2
[3401] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_current

[[_howtos_hardware_arm_gcc-10.x_aarch64_cross-compiler.html

[3402] http://arm.slackware.com
[3403] https://docs.slackware.com/howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler
[3404] https://github.com/raspberrypi/linux
[3405] https://docs.slackware.com/howtos:hardware:arm:gcc-9.x_aarch64_cross-compiler
[3406] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.1.0-arm-1.txz
[3407] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.29.2-arm-1.txz
[3408] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.7.4-arm-1.txz
[3409] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-4.txz
[3410] http://arm.slackware.com/
[3411] https://www.linuxquestions.org/questions/slackware-arm-108/
[3412] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/
[3413] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[3414] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[3415] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/
[3416] https://www.github.com/raspberrypi/
[3417] https://ftp.gnu.org/gnu/
[3418] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[3419] https://docs.slackware.com/doku.php?id=slackwarearm:faq
[3420] http://wiki.osdev.org/GCC_Cross-Compiler
[3421] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[3422] https://www.raspberrypi.org/documentation/linux/kernel
[3423] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_gcc_aarch64_cross-compiler.html

[3424] http://www.slackware.com/~mozes/
[3425] https://docs.slackware.com/slackwarearm:faq
[3426] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-4.1.4-arm-1.txz
[3427] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.11.0-arm-1.txz
[3428] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.0.4-arm-1.txz
[3429] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.0-arm-1.txz
[3430] https://www.github.com/raspberrypi/linux
[3431] https://github.com/raspberrypi/firmware
[3432] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/gawk-4.1.4-arm-1.txz
[3433] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/git-2.11.0-arm-1.txz
[3434] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/bison-3.0.4-arm-1.txz
[3435] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/flex-2.6.0-arm-1.txz
[3436] http://arm.slackware.com/FAQs
[3437] http://wiki.osdev.org/GCC_Cross-Compiler
[3438] https://www.raspberrypi.org/documentation/linux/kernel
[3439] https://www.github.com/raspberrypi/
[3440] https://ftp.gnu.org/gnu/
[3441] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[3442] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_raspberrypi.html

[3443] http://sarpi.fatdog.eu/
[3444] http://stanleygarvey.com/slackwarearm_rpi/index.php
[3445] http://www.daves-collective.co.uk/raspi/
[3446] http://elinux.org/RPi_Kernel_Compilation
[3447] http://www.raspberrypi.org/downloads
[3448] https://docs.slackware.com/doku.php?id=wiki:user:mozes
[3449] https://docs.slackware.com/doku.php?id=wiki:user:louigi600
[3450] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj
[3451] https://docs.slackware.com/doku.php?id=wiki:user:streamthreader

[[_howtos_hardware_arm_raspberrypi3.html

[3452] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi2
[3453] http://sarpi.fatdog.eu/
[3454] http://sarpi64.fatdog.eu/
[3455] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[3456] https://www.raspberrypi.org/documentation/configuration/uart.md
[3457] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[3458] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_automatically_setting_system_time_on_arm_devices.html

[3459] https://www.ebay.com/sch/i.html?_from=R40&_nkw=RTC&_sacat=0&_sop=15
[3460] https://docs.slackware.com/doku.php?id=howtos:network_services:ntp
[3461] https://www.linuxquestions.org/questions/slackware-arm-108
[3462] https://docs.slackware.com/howtos:network_services:ntp
[3463] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak
[3464] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_nginx.html

[3465] https://nginx.org/
[3466] https://www.nginx.com/resources/faq/
[3467] https://w3techs.com/technologies/comparison/ws-apache,ws-microsoftiis,ws-nginx
[3468] https://slackbuilds.org/repository/14.2/network/nginx/
[3469] http://nginx.org/download/
[3470] http://nginx.org/download/nginx-1.17.9.tar.gz
[3471] https://goaccess.io
[3472] http://nginx.org
[3473] https://github.com/allinurl/goaccess
[3474] http://goaccess.io
[3475] http://https://slackbuilds.org/repository/14.2/system/goaccess/
[3476] http://slackware.uk/slackwarearm/slackwarearm-current/
[3477] https://nginx.org/download/
[3478] https://slackbuilds.org/slackbuilds/14.2/network/nginx/
[3479] https://slackbuilds.org/repository/14.2/system/goaccess/
[3480] https://goaccess.io/download
[3481] https://sarpi.fatdog.eu/index.php?p=downloads
[3482] https://w3techs.com/technologies/comparison/ws-apache,ws-nginx
[3483] https://www.nginx.com/resources/faq/
[3484] https://nginx.org/en/docs/faq.html
[3485] https://www.aosabook.org/en/nginx.html
[3486] https://goaccess.io/faq
[3487] https://github.com/allinurl/goaccess
[3488] http://aal.fatdog.eu
[3489] http://www.slackware.com/~mozes/
[3490] https://feeds.acast.com/public/shows/slackchat
[3491] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_hacking_the_xzpad700_7_tablet.html

[3492] https://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#image_builder
[3493] https://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#image_builder
[3494] http://www.linuxquestions.org/questions/slackware-arm-108/
[3495] http://linux-sunxi.org/Main_Page
[3496] http://en.wikipedia.org/wiki/Usb#Physical_appearance
[3497] http://linux-sunxi.org/Main_Page
[3498] http://linux-sunxi.org/BROM
[3499] http://cubiestore.com/products/usd-breakout-board
[3500] http://i246.photobucket.com/albums/gg113/louigi600/XZPAD700/board_big_zps34ed425c.jpg
[3501] http://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet#wrapping_up
[3502] http://dl.linux-sunxi.org/users/amery/sunxi-3.0/latest/a13_mid_hwpack.tar.xz
[3503] http://dl.linux-sunxi.org/users/amery/testing-3.4/latest/a13_mid_hwpack.tar.xz
[3504] https://github.com/linux-sunxi/linux-sunxi
[3505] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/rootshttps://docs.slackware.com/
[3506] http://download.doozan.com/a10/a10_base-1.3.zip
[3507] http://forum.doozan.com/list.php?6
[3508] http://www.berryterminal.com/doku.php/berryboot_a10
[3509] http://tmerle.blogspot.fr/2012/09/mele-a2000-my-own-linux-flash-kitchen.html
[3510] http://linux-sunxi.org/Initial_Ramdisk
[3511] http://releases.linaro.org/latest/ubuntu/precise-images/alip
[3512] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/rootshttps://docs.slackware.com/
[3513] http://homepage3.nifty.com/tsato/xvkbd/#download
[3514] http://scotland.proximity.on.ca/contrib-images/hansg/Fedora-18-a10-armhfp-r2.img.xz
[3515] http://linux-sunxi.org/Allwinner_SoC_Family
[3516] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/xzpad700
[3517] http://ftp.slackware.org.uk/slackwarearm/people/louigi600/xzpad700
[3518] https://docs.slackware.com/doku.php?id=rsync:rsync.slackware.org.uk_slackwarearm_people_louigi600_xzpad700
[3519] http://www.linuxquestions.org/questions/slackware-arm-108/
[3520] http://sourceforge.net/projects/bclash/files/a1x_image_builder/a1x_slackwarearm_image_creator.txz/download
[3521] http://linux-sunxi.org/How_to_boot_the_A10_over_the_network
[3522] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_arm_architecture_numbers.html

[3523] http://www.arm.linux.org.uk/developer/machines/
[3524] http://www.simtec.co.uk/products/SWLINUX/files/booting_article.html

[[_howtos_hardware_arm_qemu_support_in_slackware_arm.html

[3525] https://www.linuxquestions.org/questions/slackware-arm-108/qemu-system-arm-panic-on-x86_64-a-4175670124/
[3526] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/boardsupporthttps://docs.slackware.com/qemuhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/helper-scriptshttps://docs.slackware.com/
[3527] https://www.qemu.org/
[3528] https://distcc.github.io/
[3529] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.0/
[3530] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.1/
[3531] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-14.2/
[3532] http://slackware.uk/slackwarearm/
[3533] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.com::slackwarearmhttps://docs.slackware.com/slackwarearm-14.2
[3534] http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/
[3535] https://slackbuilds.org/howto/
[3536] http://slackbuilds.org/repository/14.2/development/device-tree-compiler/
[3537] http://slackbuilds.org/repository/14.2/system/qemu/
[3538] https://en.wikipedia.org/wiki/Secure_Digital
[3539] https://www.qemu.org/documentation/
[3540] http://192.168.1.2:8000/slackwarearm-current/
[3541] https://docs.slackware.com/doku.php?id=howtos:network_services:setup_apache
[3542] http://slackware.uk/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/installer_launch
[3543] http://192.168.1.2
[3544] http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/slackwarearm-current/helper-scripts/disk_launch
[3545] http://www.slackware.com/~mozes/
[3546] http://ftp.arm.slackware.com/slackwarearm/boardsupport/qemu/
[3547] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_hardware_arm_zram_slackware_arm_and_arm64.html

[3548] https://haydenjames.io/linux-performance-almost-always-add-swap-part2-zram/
[3549] https://haydenjames.io/raspberry-pi-performance-add-zram-kernel-parameters/
[3550] https://www.kernel.org/doc/html/v5.10/admin-guide/blockdev/zram.html
[3551] https://www.lotar.altervista.org/wiki/how-to/zram-in-slackware
[3552] http://oprod.net/compress-ram-with-zram-in-slackware/
[3553] https://docs.slackware.com/doku.php?id=wiki:user:mralk3

[[_howtos_hardware_arm_releases_current.html

[3554] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_Tegra20.TXT
[3555] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:qemu_support_in_slackware_arm
[3556] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_AllWinner_A20.TXT
[3557] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/installdocshttps://docs.slackware.com/INSTALL_AllWinner_H3.TXT
[3558] http://sarpi.fatdog.eu/

[[_howtos_hardware_arm_raspberrypi3_wap.html

[3559] http://www.ebaystores.co.uk/thepihut
[3560] https://www.amazon.co.uk/dp/B004Y6MIXS
[3561] https://slackbuilds.org/repository/14.2/graphics/qrencode/
[3562] http://www.slackware.com/~alien/slackbuilds/qrencode/build/
[3563] https://play.google.com/store/apps/details?id=com.google.zxing.client.android
[3564] https://play.google.com/store/apps/developer?id=ZXing+Team
[3565] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_hardware_arm_interfacing_i2c_devices.html

[3566] http://en.wikipedia.org/wiki/I2c
[3567] http://www.lm-sensors.org/wiki/I2CTools
[3568] http://www.lm-sensors.org/wiki/I2CTools
[3569] http://www.ti.com/lit/ds/symlink/pca9306.pdf
[3570] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_slackwarearm_local-mirror-repository.html

[3571] http://slackware.uk/people/alien/tools/
[3572] http://http://slackware.uk/people/alien/tools/
[3573] http://https://idlemoor.github.io/slackrepo/
[3574] https://docs.slackware.com/slackware:philosophy
[3575] http://slackware.uk/people/alien/tools/
[3576] http://https://idlemoor.github.io/slackrepo/
[3577] https://www.kingston.com/memory-cards/canvas-go-plus-microsd-card
[3578] http://example.com
[3579] https://en.wikipedia.org/wiki/Cron#Overview
[3580] https://crontab.guru/every-day-8am
[3581] https://crontab.guru/every-8-hours
[3582] https://linux.die.net/man/8/logrotate
[3583] https://linux.die.net/man/8/logrotate
[3584] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/
[3585] http://192.168.1.17/slackwarearm
[3586] http://localhost/slackwarearm
[3587] https://www.linuxquestions.org/questions/slackware-arm-108
[3588] https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
[3589] https://tldp.org/LDP/Bash-Beginners-Guide/html/sect_12_02.html
[3590] https://slackware.uk
[3591] https://fatdog.eu
[3592] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_toshiba_ac100_dynabook_az.html

[3593] http://arm.slackware.com/
[3594] https://launchpad.net/ubuntu/+source/linux-ac100/
[3595] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/kernel_ac100_3.0.27.tgz
[3596] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/boot.img
[3597] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.org.ukhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/peoplehttps://docs.slackware.com/louigi600https://docs.slackware.com/ac100https://docs.slackware.com/rescue.img
[3598] https://gitorious.org/ac100/abootimg.git
[3599] http://ftp.slackware.org.uk/slackwarearm/slackwarearm-devtools/minirootfs/roots/
[3600] https://dl.dropboxusercontent.com/u/40761340/sos-uboot-r5-alpha.bin
[3601] https://ac100.grandou.net/sosbootr5
[3602] http://ac100.grandou.net/kerneldev#mainline_git_kernel
[3603] https://gitorious.org/~marvin24/ac100/marvin24s-kernel.git
[3604] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_gcc-9.x_aarch64_cross-compiler.html

[3605] http://arm.slackware.com
[3606] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[3607] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/a/gawk-5.0.1-arm-1.txz
[3608] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/git-2.22.0-arm-1.txz
[3609] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/bison-3.4.1-arm-1.txz
[3610] http://ftp.arm.slackware.com/slackwarearm/slackwarearm-current/slackware/d/flex-2.6.4-arm-1.txz
[3611] https://www.github.com/raspberrypi/linux
[3612] https://github.com/raspberrypi/firmware
[3613] http://sarpi64.fatdog.eu/
[3614] http://sarpi64.fatdog.eu/files/extra/SARPi64.SlackBuild-aarch64-cc.txt
[3615] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/ahttps://docs.slackware.com/gawk-5.0.1-arm-1.txz
[3616] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/git-2.22.0-arm-2.txz
[3617] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/bison-3.4.1-arm-1.txz
[3618] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-currenthttps://docs.slackware.com/slackwarehttps://docs.slackware.com/dhttps://docs.slackware.com/flex-2.6.4-arm-3.txz
[3619] https://www.github.com/raspberrypi/
[3620] https://ftp.gnu.org/gnu/
[3621] ftp:https://docs.slackware.com/https://docs.slackware.com/gcc.gnu.orghttps://docs.slackware.com/pubhttps://docs.slackware.com/gcchttps://docs.slackware.com/infrastructure
[3622] https://docs.slackware.com/doku.php?id=slackwarearm:faq
[3623] http://wiki.osdev.org/GCC_Cross-Compiler
[3624] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:gcc_aarch64_cross-compiler
[3625] https://www.raspberrypi.org/documentation/linux/kernel
[3626] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_hardware_arm_start.html

[3627] http://arm.slackware.com/installation/
[3628] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_14.2
[3629] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:releases_current

[[_howtos_hardware_arm_raspberrypi3_network.html

[3630] http://sarpi.co.uk/
[3631] http://sarpi.co.uk
[3632] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_hardware_arm_olinuxinoa10s.html

[3633] http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/
[3634] http://www.malaya-digital.org/hcd_axp-md.patch
[3635] https://drive.google.com/file/d/0B-bAEPML8fwlYkItdU1TTm1VN0E/edit?usp=sharing
[3636] https://drive.google.com/file/d/0B-bAEPML8fwlY3llVDJxelY3d28/edit?usp=sharing
[3637] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-devtoolshttps://docs.slackware.com/minirootfshttps://docs.slackware.com/roots
[3638] http://www.malaya-digital.org/dev.tar.gz
[3639] http://olimex.wordpress.com/2013/06/19/building-linux-for-a10s-from-scratch/
[3640] https://github.com/linux-sunxi/u-boot-sunxi/wiki
[3641] http://olimex.wordpress.com/2013/10/28/building-debian-sd-card-for-linux-with-kernel-3-4-from-scratch-for-a10s-olinuxino-micro/
[3642] https://docs.slackware.com/doku.php?id=wiki:user:balky

[[_howtos_hardware_arm_raspberrypi2.html

[3643] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3644] http://sarpi.fatdog.eu/
[3645] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3646] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[3647] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[3648] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_raspberrypi4.html

[3649] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi3
[3650] http://sarpi.fatdog.eu/
[3651] http://sarpi64.fatdog.eu/
[3652] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3653] https://www.raspberrypi.org/documentation/linux/kernel/building.md
[3654] https://docs.slackware.com/doku.php?id=wiki:user:exaga
[3655] https://docs.slackware.com/doku.php?id=wiki:user:yugiohjcj

[[_howtos_hardware_arm_releases_14.2.html

[3656] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_TRIMSLICE.TXT
[3657] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_KIRKWOOD.TXT
[3658] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_QEMU.TXT
[3659] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.arm.slackware.comhttps://docs.slackware.com/slackwarearmhttps://docs.slackware.com/slackwarearm-14.2https://docs.slackware.com/INSTALL_BANANAPI.TXT
[3660] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi
[3661] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi2
[3662] https://docs.slackware.com/doku.php?id=howtos:hardware:arm:raspberrypi3
[3663] http://docs.slackware.com/howtos:hardware:arm:toshiba_ac100_dynabook_az
[3664] http://pandorawiki.org/Software_projects/OS/Slackware
[3665] http://www.malaya-digital.org/setting-up-slackware-arm-14-1-on-the-olinuxino-a10-lime-from-scratch/
[3666] http://www.malaya-digital.org/setting-up-slackware-arm-14-0-on-the-olinuxino-a10s-from-scratch/
[3667] http://docs.slackware.com/howtos:hardware:arm:hacking_the_xzpad700_7_tablet
[3668] http://rpc.suroot.com/slackwarearm-live/
[3669] http://slaxbmc.blogspot.it/2014/04/slaxbmc-141-is-released.html

[[_howtos_hardware_arm_kernel_2.6.38_ac100.html

[3670] https://launchpad.net/ubuntu/+source/linux-ac100/
[3671] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_hardware_arm_naming_slackware_packages.html

[3672] http://ftp.arm.slackware.com/slackwarearm/unsupported/slackwarearm-14.1/packages/
[3673] http://www.slackware.com/~mozes/docs/arm-pkgnamingconvention.txt

[[_howtos_hardware_arm_hummingboard.html

[3674] http://www.solid-run.com/products/hummingboard/
[3675] http://www.solid-run.com/products/cubox-i-mini-computer/
[3676] https://docs.slackware.com/doku.php?id=wiki:user:exaga

[[_howtos_network_services_tunnel_interfaces.html

[3677] http://slackbuilds.org/result/?search=autossh
[3678] https://docs.slackware.com/doku.php?id=howtos:security:sshkeys
[3679] https://docs.slackware.com/doku.php?id=wiki:user:ricky_cardo

[[_howtos_network_services_postfix_dovecot_mysql.html

[3680] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:email_firewall
[3681] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:database
[3682] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:uid_gid
[3683] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:ssl
[3684] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:postfix
[3685] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql:dovecot
[3686] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_wifi_to_eth_bridge_routing.html

[3687] https://en.wikipedia.org/wiki/OSI_model
[3688] https://en.wikipedia.org/wiki/OSI_model
[3689] https://wiki.openwrt.org/doc/howto/clientmode
[3690] http://freecode.com/projects/parprouted
[3691] https://linux.die.net/man/8/parprouted
[3692] http://www.hazard.maks.net/parprouted/parprouted-0.7.tar.gz
[3693] https://docs.slackware.com/doku.php?id=wiki:user:slacker
[3694] https://wiki.debian.org/BridgeNetworkConnectionsProxyArp

[[_howtos_network_services_setup_apache.html

[3695] https://docs.slackware.com/doku.php?id=howtos:network_services:setup_apache_php_mysql
[3696] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_network_services_kerberizing_slackware_without_pam.html

[3697] http://slackbuilds.org/repository/14.1/network/krb5/
[3698] http://slackbuilds.org/repository/14.1/network/krb5/
[3699] http://arktur.shuttle.de/CD/Testpakete/Kerberos/krb5.html
[3700] https://docs.slackware.com/doku.php?id=wiki:user:jamesaxl

[[_howtos_network_services_weave.html

[3701] http://docs.services.mozilla.com/howtos/run-sync.html
[3702] http://docs.services.mozilla.com/howtos/run-sync.html
[3703] http://www.virtualenv.org/
[3704] http://slackware.com/~alien/slackbuilds/virtualenv/
[3705] http://slackbuilds.org/python/virtualenv/
[3706] http://code.google.com/p/modwsgi/
[3707] http://slackware.com/~alien/slackbuilds/mod_wsgi/
[3708] http://slackbuilds.org/result/?search=mod_wsgi
[3709] http://support.mozilla.com/kb/what-firefox-sync
[3710] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[3711] http://alien.slackbook.org/blog/setting-up-your-own-mozilla-sync-server/

[[_howtos_network_services_dropbox.html

[3712] http://www.dropbox.com
[3713] http://slackbuilds.org/result/?search=dropbox
[3714] https://www.dropbox.com/install?os=lnx
[3715] https://www.dropbox.com/download?dl=packages/dropbox.py
[3716] https://docs.slackware.com/doku.php?id=wiki:user:cmyster

[[_howtos_network_services_running_an_access_point_from_a_slackware_box.html

[3717] http://wireless.kernel.org/en/developers/Documentation/mac80211
[3718] http://w1.fi/hostapd/
[3719] http://www.securityfocus.com
[3720] http://wireless.kernel.org/en/users/Documentation/hostapd
[3721] https://blog.cloudflare.com/path-mtu-discovery-in-practice/
[3722] http://en.wikipedia.org/wiki/Iptables#mediaviewer/File:Netfilter-packet-flow.svg
[3723] http://en.wikipedia.org/wiki/Iptables#mediaviewer/File:Netfilter-packet-flow.svg
[3724] http://www.gnutomorrow.com/r/namecheap
[3725] http://www.dnsexit.com/
[3726] http://www.dynu.com/
[3727] http://freedns.afraid.org/
[3728] http://i246.photobucket.com/albums/gg113/louigi600/ARM/IMG_20160109_084509_zpshwu4p9x9.jpg
[3729] http://www.linuxquestions.org/questions/slackware-arm-108/initiating-shutdown-from-a-button-press-4175494505/page3.html#post5476882
[3730] http://docs.slackware.com/howtos:hardware:arm:start
[3731] http://ftp.slackware.org.uk/slackwarearm/slackwarearm-devtools/minirootfs/roots/
[3732] http://www.linuxquestions.org/questions/slackware-arm-108/anyone-else-interested-in-running-some-of-their-arm-devices-with-root-mounted-read-only-4175590642/
[3733] http://slackware.uk/slackwarearm/people/louigi600/rpi/rpi_wrap_512mb.img.txz
[3734] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_network_services_home_nfs_howto.html

[3735] http://nfs.sourceforge.net/nfs-howto/
[3736] http://rlworkman.net/howtos/NFS_Firewall_HOWTO
[3737] http://nfs.sourceforge.net/nfs-howto/
[3738] http://rlworkman.net/howtos/NFS_Firewall_HOWTO

[[_howtos_network_services_dovecot_with_sieve.html

[3739] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3740] http://slackbuilds.org/repository/14.1/network/dovecot-pigeonhole/?search=pigeonhole
[3741] https://github.com/sbopkg/sbopkg/releases/download/0.37.0/sbopkg-0.37.0-noarch-1_cng.tgz
[3742] http://wiki2.dovecot.org/Pigeonhole/ManageSieve/Configuration
[3743] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3744] https://github.com/thsmi/sieve/blob/master/nightly/0.2.3/sieve-0.2.3h.xpi?raw=true
[3745] https://github.com/thsmi/sieve/blob/master/nightly/
[3746] https://docs.slackware.com/doku.php?id=wiki:user:tim

[[_howtos_network_services_joomla.html

[3747] http://www.joomla.org/download.html
[3748] http://httpd.apache.org/docs/current/mod/core.html#documentroot
[3749] http://beautifulserver.com
[3750] http://stackoverflow.com/questions/3513773/change-mysql-default-character-set-to-utf8-in-my-cnf
[3751] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_network_services_postfix_dovecot_mysql_dovecot.html

[3752] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3753] http://slackbuilds.org
[3754] http://slackbuilds.org/howto/
[3755] http://wiki2.dovecot.org/FrontPage
[3756] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3757] http://wiki2.dovecot.org/
[3758] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_postfix.html

[3759] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3760] http://slackbuilds.org
[3761] http://slackbuilds.org/howto/
[3762] http://www.postfix.org/documentation.html
[3763] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3764] http://www.postfix.org/documentation.html
[3765] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_ssl.html

[3766] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3767] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3768] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_database.html

[3769] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3770] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3771] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_email_firewall.html

[3772] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3773] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3774] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_uid_gid.html

[3775] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3776] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3777] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_setup_apache_php_mysql.html

[3778] https://docs.slackware.com/doku.php?id=howtos:databases:install_mysql_on_slackware
[3779] http://localhost/test.php
[3780] http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux
[3781] https://docs.slackware.com/doku.php?id=wiki:user:pavel

[[_howtos_network_services_dhcp_server_via_dnsmasq.html

[3782] https://docs.slackware.com/doku.php?id=slackware:pkgtool
[3783] https://docs.slackware.com/doku.php?id=slackware:slackpkg
[3784] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_network_services_install_openwebmail.html

[3785] http://openwebmail.org/openwebmail/download/current/
[3786] http://www.linuxquestions.org/questions/slackware-14/suidperl-in-slack-14-a-4175450139/
[3787] http://openwebmail.org/openwebmail/doc/faq.txt
[3788] http://openwebmail.org/openwebmail/doc/readme.txt
[3789] http://www.unixresources.net/linux/lf/45/archive/00/00/01/69/16969.html
[3790] http://mail.savs.hcc.edu.tw/~chuavv/articles/openwebmail-en.html
[3791] http://search.cpan.org/search?query=CGI&mode=all
[3792] http://svn.apache.org/repos/asf/spamassassin/branches/3.3/INSTALL
[3793] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[3794] https://docs.slackware.com/doku.php?id=wiki:user:wisedraco

[[_howtos_network_services_wol.html

[3795] http://slackbuilds.org
[3796] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_network_services_configuring_a_wireless_access_point.html

[3797] http://www.slackbuilds.org
[3798] https://docs.slackware.com/doku.php?id=wiki:user

[[_howtos_network_services_scanning_with_sane_in_a_network.html

[3799] https://docs.slackware.com/doku.php?id=wiki:user:markush

[[_howtos_network_services_nfs_root.html

[3800] https://docs.slackware.com/doku.php?id=howtos:network_services:nfs-quick_and_dirty_setup
[3801] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_network_services_ntp.html

[3802] http://www.pool.ntp.org
[3803] http://en.wikipedia.org/wiki/Julian_day
[3804] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_howtos_network_services_openvpn.html

[3805] http://slackbuilds.org
[3806] http://openvpn.net
[3807] ftp:https://docs.slackware.com/https://docs.slackware.com/ftp.slackware.com
[3808] http://portforward.com/
[3809] http://slackbuilds.org
[3810] http://en.wikipedia.org/wiki/OpenVPN
[3811] https://wiki.archlinux.org/index.php/OpenVPN
[3812] http://slackwiki.com/OpenVPN_smcr_2012
[3813] http://www.no-ip.com
[3814] http://roy.marples.name/projects/openresolv/index
[3815] https://docs.slackware.com/doku.php?id=wiki:user:chrisabela

[[_howtos_network_services_roaming_profiles.html

[3816] https://docs.slackware.com/doku.php?id=howtos:network_services:ntp
[3817] https://docs.slackware.com/doku.php?id=wiki:user:kikinovak

[[_howtos_network_services_checkpoint_snx_client.html

[3818] https://sc1.checkpoint.com/documents/R77/CP_R77_VPN_AdminGuide/14702.htm
[3819] https://docs.slackware.com/doku.php?id=slackware:multilib
[3820] http://www.slackware.com/~vbatts/pam/
[3821] https://docs.slackware.com/doku.php?id=slackware:multilib
[3822] https://docs.slackware.com/doku.php?id=wiki:user:xflow7

[[_howtos_network_services_ethernet_bridging_with_openvpn.html

[3823] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[3824] https://www.virtualbox.org/
[3825] https://docs.slackware.com/doku.php?id=howtos:network_services:dhcp_server_via_dnsmasq
[3826] https://slackbuilds.org/repository/14.2/network/tunctl/?search=tunctl
[3827] https://wiki.linuxfoundation.org/networking/bridge
[3828] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[3829] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[3830] https://docs.slackware.com/doku.php?id=howtos:network_services:openvpn
[3831] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_network_services_iscsi.html

[3832] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_network_services_citrix_client.html

[3833] https://docs.slackware.com/doku.php?id=slackware:multilib
[3834] https://en.wikipedia.org/wiki/Motif_
[3835] http://lesstif.sourceforge.net/apps.html
[3836] http://www.opengroup.org/openmotif/
[3837] http://www.slackware.com/~alien/slackbuilds/openmotif/
[3838] http://www.citrix.com/downloads/citrix-receiver/receivers-by-platform.html
[3839] http://www.citrix.com/downloads/
[3840] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_network_services_desktop_printer_sharing_cups.html

[3841] http://localhost:631/
[3842] http://www.slackware.com/~alien/efg/
[3843] http://localhost:631/help/sharing.html?TOPIC=Getting+Started
[3844] http://localhost:631/printers
[3845] http://localhost:631/printers/
[3846] http://localhost:631/admin/log/error_log
[3847] https://docs.slackware.com/doku.php?id=wiki:user:drgibbon

[[_howtos_network_services_slackware_print_server.html

[3848] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_network_services_ipxe.html

[3849] https://docs.slackware.com/doku.php?id=howtos:network_services:dhcp_server_via_dnsmasq
[3850] http://boot.ipxe.org/undionly.kpxe
[3851] http://ipxe.org
[3852] http://ipxe.org/examples
[3853] https://docs.slackware.com/doku.php?id=wiki:user:fdonkers

[[_howtos_network_services_nfs-quick_and_dirty_setup.html

[3854] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_network_services_subversion.html

[3855] http://www.slackwiki.com/Subversion

[[_howtos_network_services_tinc.html

[3856] http://www.tinc-vpn.org
[3857] http://www.tinc-vpn.org/download/
[3858] http://www.tinc-vpn.org

[[_howtos_network_services_postfix_dovecot_mysql_dovecot.html

[3859] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3860] http://slackbuilds.org
[3861] http://slackbuilds.org/howto/
[3862] http://wiki2.dovecot.org/FrontPage
[3863] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3864] http://wiki2.dovecot.org/
[3865] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_postfix.html

[3866] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3867] http://slackbuilds.org
[3868] http://slackbuilds.org/howto/
[3869] http://www.postfix.org/documentation.html
[3870] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3871] http://www.postfix.org/documentation.html
[3872] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_ssl.html

[3873] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3874] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3875] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_database.html

[3876] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3877] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3878] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_email_firewall.html

[3879] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3880] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3881] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_network_services_postfix_dovecot_mysql_uid_gid.html

[3882] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3883] https://docs.slackware.com/doku.php?id=howtos:network_services:postfix_dovecot_mysql
[3884] https://docs.slackware.com/doku.php?id=wiki:user:astrogeek

[[_howtos_games_conan_exiles.html

[3885] https://store.steampowered.com/agecheck/app/440900/
[3886] https://developer.valvesoftware.com/wiki/SteamCMD
[3887] https://docs.slackware.com/doku.php?id=wiki:user:arfon

[[_howtos_games_template.html

[3888] https://docs.slackware.com/doku.php?id=howtos:games:link_here

[[_howtos_games_halflife_dedicated_server.html

[3889] http://store.steampowered.com/app/70/
[3890] http://valvesoftware.com/
[3891] https://www.google.com/search?q=LXC&btnI=lucky
[3892] http://slackware.ponce.cc/blog/2012/11/02/lxc-containers-on-slackware-14-0/
[3893] https://docs.slackware.com/doku.php?id=howtos:slackware_admin:minimal_slackware_server
[3894] https://developer.valvesoftware.com/wiki/SteamCMD
[3895] https://developer.valvesoftware.com/wiki/HLDSUpdateTool
[3896] https://store.steampowered.com/join/
[3897] https://developer.valvesoftware.com/wiki/Steam_Application_IDs
[3898] http://alienbase.nl/half-life/
[3899] https://docs.slackware.com/doku.php?id=wiki:user:alienbob

[[_howtos_emulators_start.html

[3900] https://www.google.com/search?q=Operating_system&btnI=lucky
[3901] https://www.google.com/search?q=Video_game_console&btnI=lucky

[[_howtos_emulators_helper_script_for_managing_qemu_virtual_machines.html

[3902] http://www.linuxquestions.org/questions/blog/louigi600-808242/minimize-the-amount-of-code-in-your-bash-scripts-37137/
[3903] https://docs.slackware.com/doku.php?id=wiki:user:louigi600

[[_howtos_emulators_z80.html

[3904] http://www.z80.de/myz80.zip
[3905] http://slackbuilds.org
[3906] http://www.dosbox.com
[3907] http://dosbox.sourceforge.net/wiki
[3908] http://z80cpu.eu/mirrors/oak.oakland.edu/
[3909] http://www.classiccmp.org/cpmarchives/cpm/
[3910] http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/
[3911] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer

[[_howtos_emulators_retroarch.html

[3912] https://www.retroarch.com/

[[_howtos_emulators_pcsx2.html

[3913] http://docs.slackware.com/slackware:multilib?s[]=multilib
[3914] http://pcsx2.net/download/releases/linux.html

[[_howtos_emulators_trs80.html

[3915] http://www.classiccmp.org/cpmarchives/trs80/mirrors/www.discover-net.net/~dmkeil/
[3916] http://slackbuilds.org/result/?search=dosbox&sv=
[3917] http://slackbuilds.org
[3918] http://www.dosbox.com
[3919] http://dosbox.sourceforge.net/wiki
[3920] http://www.classiccmp.org/cpmarchives/trs80/mirrors/www.discover-net.net/~dmkeil/
[3921] http://www.trs-80.com/
[3922] http://trs80stuff.net/
[3923] http://www.retroarchive.org/cpm/
[3924] http://www.retroarchive.org/cpm/cdrom/
[3925] http://www.sharpmz.org/succpminfo06.htm
[3926] http://z80cpu.eu/mirrors/oak.oakland.edu/
[3927] http://www.classiccmp.org/cpmarchives/cpm/
[3928] http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/
[3929] http://www.sydex.com/about.html
[3930] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer

[[_howtos_emulators_vms-pci-passthrough.html

[3931] https://docs.slackware.com/howtos:emulators:vms
[3932] https://docs.slackware.com/doku.php?id=wiki:user:nikos

[[_howtos_emulators_binfmt_misc.html

[3933] http://winehq.org/
[3934] http://qemu.org/
[3935] http://armedslack.org/
[3936] https://docs.slackware.com/doku.php?id=wiki:user:alienbob
[3937] https://en.wikipedia.org/wiki/binfmt_misc

[[_howtos_emulators_start.html

[3938] https://www.google.com/search?q=Operating_system&btnI=lucky
[3939] https://www.google.com/search?q=Video_game_console&btnI=lucky

[[_howtos_emulators_xtrs.html

[3940] http://slackbuilds.org
[3941] http://manpages.ubuntu.com/manpages/lucid/man1/xtrs.1.html
[3942] http://amigakit.leamancomputing.com/catalog/product_info.php?products_id=842
[3943] http://www.tim-mann.org/trs80.html
[3944] http://www.tim-mann.org/catweasel.html
[3945] http://www.kanolabs.com
[3946] http://www.trs-80.com/
[3947] http://trs80stuff.net/
[3948] http://www.retroarchive.org/cpm/
[3949] http://www.retroarchive.org/cpm/cdrom/
[3950] http://www.sharpmz.org/succpminfo06.htm
[3951] http://z80cpu.eu/mirrors/oak.oakland.edu/
[3952] http://www.classiccmp.org/cpmarchives/cpm/
[3953] http://z80cpu.eu/mirrors/oldcomputers.dyndns.org/rechner/
[3954] http://www.sydex.com/about.html
[3955] https://docs.slackware.com/doku.php?id=wiki:user:ldkraemer

[[_howtos_cloud_start.html

[3956] http://aws.amazon.com/

[[_howtos_cloud_docker.html

[3957] https://docs.slackware.com/doku.php?id=wiki:user:bifferos
[3958] https://www.linuxquestions.org/questions/slackware-14/fail-to-install-runc-package-for-docker-4175616167/

[[_howtos_cloud_aws_ec2.html

[3959] https://docs.slackware.com/doku.php?id=howtos:misc:xen_domu_guest
[3960] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html#vmimport-role
[3961] https://docs.aws.amazon.com/vm-import/latest/userguide/vmie_prereqs.html
[3962] https://github.com/aws/amazon-ssm-agent
[3963] https://www.ssh.com/ssh/copy-id
[3964] https://man.openbsd.org/sshd_config#PermitRootLogin
[3965] https://docs.aws.amazon.com/vm-import/latest/userguide/vmimport-import-snapshot.html
[3966] https://docs.slackware.com/doku.php?id=wiki:user:bifferos

[[_howtos_cloud_start.html

[3967] http://aws.amazon.com/

[[_howtos_slackware_slackware_libre.html

[3968] http://slackjeff.com.br/artigos/slackware_free.html
[3969] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_slackware_magiic.html

[3970] https://slackbuilds.org/repository/14.2/system/magiic/?search=magiic
[3971] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_howtos_slackware_kernel_huge_for_generic.html

[3972] http://slackjeff.com.br/artigos/huge4generic.html
[3973] https://docs.slackware.com/doku.php?id=wiki:user:slackjeff

[[_studioware_start.html

[3974] http://www.slackware.com
[3975] http://studioware.org
[3976] https://github.com/eviljames/studioware
[3977] https://docs.slackware.com/doku.php?id=studioware:applications_list
[3978] https://docs.slackware.com/doku.php?id=studioware:quick_start
[3979] https://docs.slackware.com/doku.php?id=studioware:quick_start
[3980] http://studioware.org/sepkg
[3981] https://docs.slackware.com/doku.php?id=studioware:quick_start
[3982] https://docs.slackware.com/doku.php?id=studioware:going_further
[3983] https://docs.slackware.com/doku.php?id=studioware:tips_and_hints
[3984] https://docs.slackware.com/doku.php?id=wiki:user:mesa
[3985] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_studioware_quick_start.html

[3986] http://www.slackware.com/~alien/slackbuilds/openjdk/
[3987] http://studioware.org/files/tools/sepkg/
[3988] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_studioware_tips_and_hints.html

[3989] http://www.slackware.com/~alien/slackbuilds/openjdk/
[3990] http://wiki.linuxaudio.org/wiki/system_configuration#the_kernel
[3991] http://alsa.opensrc.org/Jack_and_Loopback_device_as_Alsa-to-Jack_bridge
[3992] http://gamesplusone.com/alsa_to_jack.html
[3993] http://alien.slackbook.org/blog/setting-up-jack-audio-in-slackware/
[3994] http://studioware.org/mesa/configs/asoundrc-examples-mesa.txt
[3995] https://docs.slackware.com/doku.php?id=wiki:user:mesa
[3996] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_studioware_applications_list.html

[3997] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_studioware_start.html

[3998] http://www.slackware.com
[3999] http://studioware.org
[4000] https://github.com/eviljames/studioware
[4001] https://docs.slackware.com/doku.php?id=studioware:applications_list
[4002] https://docs.slackware.com/doku.php?id=studioware:quick_start
[4003] https://docs.slackware.com/doku.php?id=studioware:quick_start
[4004] http://studioware.org/sepkg
[4005] https://docs.slackware.com/doku.php?id=studioware:quick_start
[4006] https://docs.slackware.com/doku.php?id=studioware:going_further
[4007] https://docs.slackware.com/doku.php?id=studioware:tips_and_hints
[4008] https://docs.slackware.com/doku.php?id=wiki:user:mesa
[4009] https://docs.slackware.com/doku.php?id=wiki:user:dive

[[_slackbook_start.html

[4010] http://www.slackbook.org/
[4011] https://docs.slackware.com/doku.php?id=slackbook:conventions_used_in_this_book
[4012] https://docs.slackware.com/doku.php?id=slackbook:intro_to_slackware
[4013] https://docs.slackware.com/doku.php?id=slackbook:install
[4014] https://docs.slackware.com/doku.php?id=slackbook:booting
[4015] https://docs.slackware.com/doku.php?id=slackbook:shell
[4016] https://docs.slackware.com/doku.php?id=slackbook:bash
[4017] https://docs.slackware.com/doku.php?id=slackbook:process_control
[4018] https://docs.slackware.com/doku.php?id=slackbook:xwindow_system
[4019] https://docs.slackware.com/doku.php?id=slackbook:printing
[4020] https://docs.slackware.com/doku.php?id=slackbook:users
[4021] https://docs.slackware.com/doku.php?id=slackbook:filesystem_permissions
[4022] https://docs.slackware.com/doku.php?id=slackbook:working_with_filesystems
[4023] https://docs.slackware.com/doku.php?id=slackbook:vi
[4024] https://docs.slackware.com/doku.php?id=slackbook:emacs
[4025] https://docs.slackware.com/doku.php?id=slackbook:network
[4026] https://docs.slackware.com/doku.php?id=slackbook:wifi
[4027] https://docs.slackware.com/doku.php?id=slackbook:basic_networking_utilities
[4028] https://docs.slackware.com/doku.php?id=slackbook:package_management
[4029] https://docs.slackware.com/doku.php?id=slackbook:tracking_updates
[4030] https://docs.slackware.com/doku.php?id=slackbook:linux_kernel
[4031] http://www.slackbook.org/beta

[[_slackbook_basic_networking_utilities.html

[4032] https://docs.slackware.com/doku.php?id=slackbook:wifi
[4033] https://docs.slackware.com/doku.php?id=slackbook:package_management
[4034] http://www.slackbook.org/beta

[[_slackbook_tracking_updates.html

[4035] http://www.slackware.com/getslack/
[4036] mailto:majordomo@slackware.com
[4037] https://docs.slackware.com/doku.php?id=slackbook:package_management
[4038] https://docs.slackware.com/doku.php?id=slackbook:linux_kernel
[4039] http://www.slackbook.org/beta

[[_slackbook_filesystem_permissions.html

[4040] https://docs.slackware.com/doku.php?id=slackbook:users
[4041] https://docs.slackware.com/doku.php?id=slackbook:working_with_filesystems
[4042] http://www.slackbook.org/beta

[[_slackbook_wifi.html

[4043] https://docs.slackware.com/doku.php?id=slackbook:network
[4044] https://docs.slackware.com/doku.php?id=slackbook:network
[4045] https://docs.slackware.com/doku.php?id=slackbook:network
[4046] https://docs.slackware.com/doku.php?id=slackbook:basic_networking_utilities
[4047] http://www.slackbook.org/beta

[[_slackbook_users.html

[4048] https://docs.slackware.com/doku.php?id=slackbook:printing
[4049] https://docs.slackware.com/doku.php?id=slackbook:filesystem_permissions
[4050] http://www.slackbook.org/beta

[[_slackbook_booting.html

[4051] https://docs.slackware.com/doku.php?id=slackbook:install
[4052] https://docs.slackware.com/doku.php?id=slackbook:install
[4053] https://docs.slackware.com/doku.php?id=slackbook:install
[4054] https://docs.slackware.com/doku.php?id=slackbook:install
[4055] https://docs.slackware.com/doku.php?id=slackbook:shell
[4056] http://www.slackbook.org/beta

[[_slackbook_linux_kernel.html

[4057] http://www.kernel.org/
[4058] https://docs.slackware.com/doku.php?id=slackbook:tracking_updates
[4059] http://www.slackbook.org/beta

[[_slackbook_process_control.html

[4060] https://docs.slackware.com/doku.php?id=slackbook:bash
[4061] https://docs.slackware.com/doku.php?id=slackbook:xwindow_system
[4062] http://www.slackbook.org/beta

[[_slackbook_xwindow_system.html

[4063] https://docs.slackware.com/doku.php?id=slackbook:process_control
[4064] https://docs.slackware.com/doku.php?id=slackbook:printing
[4065] http://www.slackbook.org/beta

[[_slackbook_working_with_filesystems.html

[4066] https://docs.slackware.com/doku.php?id=slackbook:filesystem_permissions
[4067] https://docs.slackware.com/doku.php?id=slackbook:vi
[4068] http://www.slackbook.org/beta

[[_slackbook_package_management.html

[4069] https://docs.slackware.com/doku.php?id=slackbook:tracking_updates
[4070] http://www.slackpkg.org/
[4071] https://docs.slackware.com/doku.php?id=slackbook:basic_networking_utilities
[4072] https://docs.slackware.com/doku.php?id=slackbook:tracking_updates
[4073] http://www.slackbook.org/beta

[[_slackbook_vi.html

[4074] https://docs.slackware.com/doku.php?id=slackbook:working_with_filesystems
[4075] https://docs.slackware.com/doku.php?id=slackbook:emacs
[4076] http://www.slackbook.org/beta

[[_slackbook_conventions_used_in_this_book.html

[4077] http://slackbook.org/

[[_slackbook_intro_to_slackware.html

[4078] https://docs.slackware.com/doku.php?id=slackbook:package_management
[4079] http://fsf.org
[4080] https://docs.slackware.com/doku.php?id=slackbook:install
[4081] http://www.slackbook.org/beta

[[_slackbook_shell.html

[4082] https://docs.slackware.com/doku.php?id=slackbook:bash
[4083] https://docs.slackware.com/doku.php?id=slackbook:booting
[4084] https://docs.slackware.com/doku.php?id=slackbook:bash
[4085] http://www.slackbook.org/beta

[[_slackbook_bash.html

[4086] https://docs.slackware.com/doku.php?id=slackbook:shell
[4087] https://docs.slackware.com/doku.php?id=slackbook:process_control
[4088] http://www.slackbook.org/beta

[[_slackbook_install.html

[4089] https://docs.slackware.com/doku.php?id=slackbook:network
[4090] https://docs.slackware.com/doku.php?id=slackbook:users
[4091] https://docs.slackware.com/doku.php?id=slackbook:intro_to_slackware
[4092] https://docs.slackware.com/doku.php?id=slackbook:booting
[4093] http://www.slackbook.org/beta

[[_slackbook_network.html

[4094] https://docs.slackware.com/doku.php?id=slackbook:wifi
[4095] https://docs.slackware.com/doku.php?id=slackbook:emacs
[4096] https://docs.slackware.com/doku.php?id=slackbook:wifi
[4097] http://www.slackbook.org/beta

[[_slackbook_emacs.html

[4098] https://docs.slackware.com/doku.php?id=slackbook:emacs-startup.png
[4099] https://docs.slackware.com/doku.php?id=slackbook:vi
[4100] https://docs.slackware.com/doku.php?id=slackbook:network
[4101] http://www.slackbook.org/beta

[[_slackbook_printing.html

[4102] http://localhost:631
[4103] https://docs.slackware.com/doku.php?id=slackbook:xwindow_system
[4104] https://docs.slackware.com/doku.php?id=slackbook:users
[4105] http://www.slackbook.org/beta