Pages

Thursday, July 26, 2018

Run Slackware 14.2 in GNOME Boxes on Fedora 28

For the next few months I will be studying for the CompTIA Linux+ certification exam at my local college.  I chose to install Fedora 28 on my laptop to immerse myself in the study material.  Online sources state that any Linux distribution can be used to study for the Linux+ certification exam.  The study material I am using is: "Linux+ Guide to Linux Certification, Third Edition" by Jason W. Eckert.  Within the book Fedora 13 is suggested as the accompanying Linux distribution.  Version 13 is a bit old and the latest version of Fedora is version 28.

While I study I plan to still do a bit of work on the SlackBuilds I maintain on SlackBuilds.org.  I installed the GNOME 3.28 spin of Fedora 28 which comes with GNOME Boxes for Virtualization.  Slackware installed just fine but I had a few problems:
  1. X would not start stating that no screens could be found
  2. Sound did not work in the X once I did get it to start
  3. Networking did not start by using rc.inet1.conf or with Network Manager
Slackware 14.2 with a failed startx execution in GNOME Boxes.
Other Linux distributions work out of the box using the default settings in GNOME Boxes.  I think this is due to the Express Installation option that sets up sane defaults on a distribution by distribution basis.  GNOME Boxes offers a number of distributions as an installation source for download.  There is not an option to install Slackware using any of the automated sources on Fedora 28.  I had to install using an ISO file I downloaded myself.  As a result I made a few changes to get Slackware working properly.  The easiest way to do this is to install the virt-manager GUI along side GNOME Boxes.  Boxes has very limited options available for customization.  You could also edit the XML for each virtual machine using the virsh edit command, but that can get confusing if you do not know the syntax.

The first thing I did was launch virt-manager and connect to the QEMU/KVM user session on my machine.  Go to File -> Add Connection:
Add virt-manger QEMU/KVM user session on Fedora 28.
After that select the virtual machine you want to edit and open it.  Then go to the virtual machine settings.  Set your Video Card to use the Model VGA.  Set  the Sound Device to use the Model ich6.  Set the Virtual Network Interface Device Model to be e1000.  Essentially what this does is tell the virtual machine to load the correct kernel modules for each virtual device that is not found or recognized by Slackware.  Here are some pictures to explain a bit better:

Set Slackware in virt-manager to use a VGA adaper.


Set Slackware in virt-manager to use the ich6 sound device.

Set Slackware in virt-manager to use e1000 NIC device model.

After that I closed virt-manager and opened up GNOME Boxes.  Slackware Linux 14.2, SalixOS, and Zenwalk Linux all work as expected at this point.  It might be good to get the QXL driver working for more graphics intensive applications within the Slackware virtual machines.  I will only be testing a few very basic GUI applications so the VGA (vesa I guess) video driver should be just fine.

Fedora 28 with Slackware 14.2 on Gnome Boxes machine menu.

Fedora 28 with Slackware 14.2 running in Gnome Boxes.
Thanks for reading and I hope this post was beneficial.  Leave a comment if you have any questions or corrections for this post.

Relevant Links:
  





Tuesday, March 20, 2018

Use a Raspberry Pi as a Slackware Mirror on your Local Area Network

A few weeks ago I began work on updating all the SlackBuilds I maintain on SlackBuilds.org.  It had been a while since I did any work.  My usual development environment involved a few virtual machines managed by VirtualBox.  I would use the snapshot feature in VirtualBox to freeze both my x86 and x86_64 installations of Slackware 14.2.  Then I would use git and clone my GitHub SlackBuild repository on each machine.  All SlackBuild changes on the virtual machines would be synchronized to GitHub and back to the host system.  This process used to work great even though it was a bit wasteful of bandwidth.

I've been forced to do things a bit differently now because I no longer have a very fast internet connection.  The 1Gbps connection is now a 100Mbps connection.  With several smart phones, smart televisions, laptops, and Raspberry Pi's, this connection can be a bit slow.  Just the videos streaming and software security updates can be an issue at times.  It is especially an issue if I am running 4-6 virtual machines all accessing the network on top of all the physical devices.  As a result, I've changed my development environment.

I now host a Slackware 14.2 and a Slackware-current (both x86 and x86_64) mirror on a Raspberry Pi 1 B+, which also doubles as a print server on my home network.  That particular Pi has a 10/100 Mbit/s Ethernet port, so it is fast enough for my needs.  Sadly this Pi is running Raspbian instead of Slackware.  On my Raspberry Pi 3 B, which is also my LAN gateway, I host all of my git repositories.  The Slackware mirrors are using the HTTP protocol, are hosted using Apache2, and physically sit on an external USB hard drive connected to the Pi 1 B+.

I took Eric Hameleers's (aka Alien BOB) old rsync_current.sh script and modified it for my needs, since the newer mirror-slackware-current.sh script does not work with Raspbian.  You can use the latter if your Pi is running Slackware-arm and you will achieve the same results using the below configuration  It is all synced and stored on the USB hard drive at /usb/Slackware-Mirror.  Here is my Apache2 configuration for the curious.  It is a very basic configuration, it could probably be improved, but it works fine for my needs.  See the links at the bottom of this post for information about configuring Apache2 on Slackware.

$ sudo cat  /etc/apache2/sites-available/slackware-mirror.conf
<VirtualHost *:80>
    ServerName 192.168.150.180
    ServerAdmin webmaster@localhost
    DocumentRoot /usb/Slackware-Mirror/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    <Directory "/usb/Slackware-Mirror">
        Options Indexes FollowSymLinks
        IndexOptions FancyIndexing VersionSort NameWidth=*
        AllowOverride All
        Order allow,deny
        Allow from all
        Require all granted
     </Directory>
</VirtualHost>

On each Slackware host I now just have to comment out everything in /etc/slackpkg/mirrors and add a URL pertaining the the Slackware release at the bottom of the file:

#----------------------------------------------------------------
# Local Area Network Mirror
#----------------------------------------------------------------
http://192.168.150.180/slackware64-current/

If you are following along, be sure the change slackware64-current/ to slackware-current/, or slackware64-14.2/, or slackware-14.2/ for your desired Slackware release.

Then I run the usual commands as root to update slackpkg:

$ slackpkg update gpg && slackpkg update

My router does have the ability to serve DNS on the LAN using dnsmasq.  I chose to opt out of that for the mirror because it adds latency to the process of downloading and installing packages.

The next pieces I added to this puzzle were the cron jobs that run rsync_current.sh that later email me about any updates to the Slackware tree.  I changed the MAILTO address for privacy reasons.

$ crontab -e
MAILTO="notify@domain"
0 4 * * * /bin/sh /usb/Slackware-Mirror/rsync_current.sh
0 5 * * * ARCH=x86 /bin/sh /usb/Slackware-Mirror/rsync_current.sh
0 16 * * * REL=14.2 /bin/sh /usb/Slackware-Mirror/rsync_current.sh
0 17 * * * REL=14.2 ARCH=x86 /bin/sh /usb/Slackware-Mirror/rsync_current.sh

Finally I installed and configured Postfix for email delivery using a gmail account.  I used the following tutorial to do so:  Configure Postfix to use Gmail as a Mail Relay

Keep in mind that Slackware 14.2 uses the Sendmail service for email services.  Slackware-current uses Postfix.

Now I can provision virtual machines among other various devices on my LAN with Slackware.  The best part is that I am saving bandwidth for myself and for the Slackware mirrors I would otherwise be hammering with file transfers.

Relevant Links: