The Temple of Fu

code, systems and games

Archive for the ‘Slackware’ Category

Slackware 14 – System Upgrade

leave a comment »

I use slackpkg to manage my installed packages because I am a Slacker.

I am currently using:
cat /etc/slackware-version
Slackware 14.0

As root:

Make sure to have kernel references uncommented in your blacklist.
nano /etc/slackpkg/blacklist

Edit /etc/slackpkg/mirrors and uncomment a mirror used under Stable making sure to have all under Current commented out.
nano /etc/slackpkg/mirrors

Update the package listing database
slackpkg update

Check the Changelog
cat /var/lib/slackpkg/ChangeLog.txt

If you have a new version of slackpkg available you will need to upgrade it first.
slackpkg upgrade slackpkg

slackpkg new-config

Updgrade the GNU C libraries since the new packages are compiled against that new glibc version.
slackpkg upgrade glibc-solibs

Install every package marked in the changelog file that has been “Added”.
slackpkg install-new

Compare every Slackware package currently installed with the the mirror. If a different version is available, that version will be downloaded and upgraded.
slackpkg upgrade-all

Packages that are currently installed and are not part of the release upgrading to.
slackpkg clean-system

Reboot.

Advertisements

Written by lordfu

May 20, 2016 at 10:01 am

VirtualBox – VERR_NOT_SUPPORTED

leave a comment »

I am currently using version 4.28.r838376 of VirtualBox from Oracle. Today was spring cleaning on my main desktop. I updated loads of drivers, updated my bios for my Asus P8Z68 V-Pro motherboard, fixed registry errors, uninstalled programs, the whole shebang really. Everything went awesome, that is until I decided to start a virtual machine.

I tried starting a Slackware Linux guest I have and promptly received the error message VD:VERR_NOT_SUPPORTED. FIrst thing I thought was “I hope I have a backup, cause this looks like disk failure”. I then decided to boot a Windows guest I have to see if it was in the same shape. It gave a different message but one that directly referenced VTX and a CPU.

This made the light bulb in my head turn on! Knowing that I had updated my BIOS I wondered if I forgot to reset everything. So I rebooted, hopped into the BIOS and looked at Intel Virtualization Technology and it was disabled. Once this was turned back on all of my virtual machines are working fine again.

Hope this helps.

Written by lordfu

June 30, 2013 at 1:26 am

Slackware 14 – Metasploit Install

leave a comment »

These are the notes as I recall from doing a Metasploit install, they may not be 100% but you are welcome to them.

Download a SlackBuild and the source, there was a build for 13.37
$wget http://slackbuilds.org/slackbuilds/13.37/network/framework.tar.gz
$wget http://downloads.metasploit.com/data/releases/archive/framework-4.0.0-linux-x64-full.run

Move them to /usr/src
#mv framework.tar.gz /usr/src/
#mv framework-4.0.0-linux-x64-full.run /usr/src/

Extract the framework
#tar -xvf framework.tar.gz

Move the framework source into the extracted folder
#mv framework-4.0.0-linux-x64-full.run /usr/src/framework/

Allow execution
#cd /usr/src/framework
#chmdod +x framework.Slackbuild
#chmdod +x framework-4.0.0-linux-x64-full.run

From the Readme:
You will need “postgres” user and group before running the installer, if you
haven’t installed SlackBuilds PostgreSQL you should run these commands to be
compatible. Default database server listening port is 7175.:

#groupadd -g 209 postgres
#useradd -u 209 -g 209 -d /var/lib/pgsql postgres

Add something like to /etc/rc.d/rc.local to start the shipped PostgreSQL daemon:
# Start Metasploit Framework PostgreSQL
if [ -x /etc/rc.d/rc.framework-postgres ]; then
/etc/rc.d/rc.framework-postgres start
fi

Add something like to /etc/rc.d/rc.local_shutdown to stop the service.:

# Stop Metasploit Framework PostgreSQL
if [ -x /etc/rc.d/rc.framework-postgres ]; then
/etc/rc.d/rc.framework-postgres stop
fi

Build the package and then install it.
#./framework.Slackbuild
#installpkg /tmp/framework-4.0.0-x86_64-1_Sbo.tgz

Metasploit ships with its own bundles of Postgres and Ruby.

Note the database connection string
#cat /opt/framework-4.0.0/config/database.yml

Setup msfconsole to use framework shipped Ruby version.
#nano /opt/framework-4.0.0/msf3/msfconsole

Change top line to read:
#!/opt/framework-4.0.0/ruby/bin/ruby

Launch the console
#/opt/framework-4.0.0/msf3/msfconsole

Install postgres driver
msf> gem install pg -- --with-pg-config=/opt/framework-4.0.0/postgresql/bin/pg_config

Setup tables
msf>db_connect msf3:[password]@localhost:7175/msf3

Hope this helps!

Written by lordfu

April 1, 2013 at 1:21 pm

Slackware – Fluxbox (random background slideshow)

with one comment

I have used Fluxbox in the past and Loved It! At some point I decided to play with XFCE and meh, it’s ok {grin} I made the switch back recently to FB. As anyone who has used FB before it is a pretty barren environment to begin with but I did find a style I liked so I applied it but I was missing a nice background. You can set a background using the following (note some sites will say to use the backgrounds folder under ./fluxbox but I don’t, I am a rebel like that). Make sure that any images you put under this directory adhere to Unix file naming conventions (no spaces etc), I also do not do scaling on these images so what you put under there is what will be displayed, so get wallpapers that fit your resolution.

$fbsetbg -l path_to_image

I thought cool but I want rotating images every X minutes. I found a bash script on the web that I modified a little.


#!/bin/bash
# Reads a given directory and set a random
# wallpaper using the images on that dir.

WALLPAPERDIR="$HOME/wallpapers"

if [[ -d "${WALLPAPERDIR}" ]]
then
while(true)
do
files=$(ls "${WALLPAPERDIR}")
file_matrix=($files)
num_files=${#file_matrix[*]}
#feh --bg-scale
fbsetbg -c "${WALLPAPERDIR}/${file_matrix[$((RANDOM%num_files))]}"
sleep 10m
#sleep 5s
done
fi

exit 0

I left the original call to feh in there but commented it out, it is not part of the standard Slackware install and I could not find a package that I wanted to use, and really didn’t feel like making my own at this time. fbsetbg is part of the core install so that is good enough for me for right now, there was however one tiny little thing. After creating the script, allowing execution of it and then running it, I would receive a weird warning.

$chmod +x random_wallpaper_slideshow.sh
$~/chmod +x random_wallpaper_slideshow.sh
wmsetbg warning: could not open domain file /home/fu/GNUstep/Defaults/WindowMaker

Simply typing the following command in a terminal setup the needed directories so that the warning went away.
$ wmsetbg

Now I can run the following and get a nice wallpaper slideshow after logging in.
$ ~/scripts/random_wallpaper_slideshow.sh &

Instead of running the above command I opted for editing the following file.
~/.fluxbox/startup

My fluxbox startup file now looks like the following, every time I startx my script will run and provide me a nice slideshow.

#!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored.

# Change your keymap:
xmodmap "/home/fu/.Xmodmap"

# Applications you want to run with fluxbox.
# MAKE SURE THAT APPS THAT KEEP RUNNING HAVE AN ''&'' AT THE END.
#
# unclutter -idle 2 &
# wmnd &
# wmsmixer -w &
# idesk &

# Start DBUS session bus:
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
eval $(dbus-launch --sh-syntax --exit-with-session)
fi

# And last but not least we start fluxbox.
# Because it is the last app you have to run it with ''exec'' before it.

fluxbox &
fbpid=$1
# or if you want to keep a log:
# exec fluxbox -log "/home/fu/.fluxbox/log"

sleep 1
{
. ~/scripts/random_wallpaper_slideshow.sh &
} &

wait $fbpid

Hope this helps!

Written by lordfu

March 9, 2013 at 8:44 pm

Posted in Linux, Slackware

Slackware – Kernel Upgrade to 3.8.1

with one comment

I woke up late last night, 12PM EST, and after reading a post that kernel.org had upgraded their website I took a visit. Well, that led me to saying ‘Hey I should upgrade my kernel! I was running 3.4.X something or rather that comes with Slack 14, it was stable but I felt the need to break something! {grin}

Here’s what I did, note YMMV! I used Pats config for the 3.7.1.x64 kernel as a starting point instead of my existing.

As root:

#cd /usr/src

#wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.8.1.tar.bz2

#tar -xvf linux-3.8.1.tar.bz2

#rm linux
Removes the existing symlink

#ln -s linux-3.8.1 linux
Creates a new symlink pointing to your new linux source

#wget http://slackware.mirrors.tds.net/pub/slackware/slackware-current/source/k/config-x86_64/config-huge-3.7.1.x64

#cp config-huge-3.7.1.x64 linux/.config

#cd linux

#make oldconfig
I ran 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).

#make bzImage modules

#make modules_install

#cp arch/x86/boot/bzImage /boot/vmlinuz-custom-3.8.1
Copies the new kernel file

#cp System.map /boot/System.map-custom-3.8.1
Copies the System.map

#cp .config /boot/config-custom-3.8.1
Backup copy of my kernel config

#cd /boot

#rm System.map
Deletes the old link

#ln -s System.map-custom-3.8.1 System.map
Creates a new link

Edit /etc/lilo.conf and added a new entry for your new kernel. Leave the old just in case!

#lilo

Reboot and enjoy! Hope this helps!

Resources:
Alien Bob

Note:
Doing this on a Slackware image I have running in VirtualBox caused my screen not to be fullsized and I also lost scrolling with my mouse,as well as the back button ability on my mouse. I upgraded VirtualBox to 4.2.8 r83876 and then recompiled the Guest Additions and all was good!

Written by lordfu

March 3, 2013 at 7:51 pm

Posted in Linux, Slackware

Slackware – What version am I running?

with one comment

I usually don’t run the latest release but I am instead only keeping my installed packages current. So how do you know which version of Slack you are actually running? Well here you go!

cat /etc/slackware-version

Hope this helps!

Written by lordfu

March 3, 2013 at 12:29 am

Posted in Linux, Slackware

Slackware – mplayer – no video when playing video from UI (the selected video_out device is incompatible with this codec)

leave a comment »

Hello again!

I decided to install Slackware 14. After install any movies that I double clicked on were opened and played but with no video screen! When executing the following command the video played just fine!
mplayer video_file

What I found was that I was getting an error of (the selected video_out device is incompatible with this codec). To fix this I went into mplayer preferences and set the Video device to use X11(XImage/Shm) and now videos play within the GUI via double click.

Hope that helps!

Written by lordfu

November 8, 2012 at 2:50 pm

Posted in Linux, Slackware