PS4 and Clonezilla

There’s not much to say except that it is possible to clone your PS4′s hard drive. We here at Operationlinux have attempted and succeeded at doing so. The only pitfall we noticed was that you need space for the entire hard drive; for some reason Clonezilla did not distinguish between used and unused space. The default PS4 drive is 400GB.

Happy Cloning!

Posted in Linux | 3 Comments

MythTV Frontend

This tutorial will guide you through installing mythtv’s frontend on a Kubuntu machine.

So the easiest way to install mythfrontend is through a package. But guess what? If you already have a master backend server that wasn’t installed with the exact same package and version you won’t be able to connect! If you try you may see an error similar to “database schema 1307,1254 is newer than expected“. That’s even if both machines are running version “0.26″, a micro version will prevent the connection. So we had to install from the same source code as our running master backend server.

Compile from source
When compiling from source you will encounter errors when a necessary library isn’t found. For example:

ERROR: can not find libuuid. (debian uuid-dev; RedHat libuuid-devel)
OR qmake for Qt4.6 or newer not found.
OR ERROR! You must have FreeType installed to compile MythTV.

So then you go install that library and recompile until you see the next problem and repeat. It’s a slow and painful process. But we’ve found a much easier way to avoid these errors. Type this command:

# apt-get build-dep mythtv (R1)

That will install all the necessary libraries to compile mythtv, it’s truly fantastic. The only negative is this is dependent on a machine running apt (i.e. debian based linux distro).

Obtain the same source code tar ball used in your backend, in our case mythtv-0.26.0.tar.bz2 (R2). Extract and run configure:

operationlinux@greeny:~/tmp/mythtv-0.26.0$ ./configure –enable-nonfree –disable-backend

and then

$ make [took about half-hour!]

And now as root to install it on the system:

root@greeny:/home/operationlinux/tmp/mythtv-0.26.0# make install

Test that it’s installed

operationlinux@greeny:~/tmp/mythtv-0.26.0$ mythfrontend –help
mythfrontend version: [v0.26.0]

And to launch the GUI just type
$ mythfrontend


Connecting to your master backend server.
Before your client can connect to the server you need to make sure your mysql database can have network connections and not just localhost connections. So inside the mysql command line interpreter:

mysql> GRANT ALL ON mythconverg.* TO mythtv@’192.168.1.%’ IDENTIFIED BY “[SECRET]“;
mysql> GRANT CREATE TEMPORARY TABLES ON mythconverg.* TO mythtv@’192.168.1.%’ IDENTIFIED BY “[SECRET]“;

We actually just edited the mc.sql file to have these additional lines and then re-ran the line below but you can do it interactively.

$ mysql -u root -p < mythtv-0.26.0/database/mc.sql

Now to explain the 192.168.1.% that allows everyone on our subnet to connect, but your subnet might be different. If your IP address is something like, you’d change it to 10.0.0.%.

Now your mythfrontend machine can connect to the master backend server. Have fun.


Posted in Linux | Leave a comment

MythTV Backend

DVR (Digital Video Recorder) aka PVR
The modern VHS, the ability to record TV to watch it later, fast forward, rewind, pause, and even skip commercials! These devices are affordable to buy off the shelf but here at operationlinux we’ll show you how we made our own from open source and a desktop computer.

TV tuner
First thing you’ll need is a TV tuner. What that does is take the TV signal out of the air or cable and then converts it to a format your computer understands. We ended up buying the Silicon Dust HDHR3-US; it is a really nice product because it connects to your network whereas most tuners connect internally through PCI. But you could probably get away with almost any tuner as long as it supports Linux.

We took a quick look at XBMCBuntu and really liked the Live DVD but ended up choosing the elder DVR software MythTV to install. We installed mythtv version 0.26.0 and ran into many problems! But eventually we conquered all the pitfalls operationlinux-style! Hopefully our misadventures will help the next person who has trouble…

We have a headless server running Slackware. Our goal is to run this server all the time so it can record TV, and then have client boxes connect to it to watch live TV and recordings. Slackware is hardcore linux, you install most software from source code. We came across a really nice website called to help you along that path.

First make sure mysql is running, in Slackware this is really easy.

Opening the startup script for mysql (R3) and it’s great, followed its directions.
# mysql_install_db –user=mysql
root@blade:/etc/rc.d# chmod u+x rc.mysqld
root@blade:/etc/rc.d# ./rc.mysqld start
root@blade:/etc/rc.d# 121025 19:51:15 mysqld_safe Logging to ‘/var/lib/mysql/blade.err’.
121025 19:51:15 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql

Go download the tar ball (R1) in our example mythtv-0.26.0.tar.bz2.

root@blade:~/downloads# bzip2 -d mythtv-0.26.0.tar.bz2
39m to 148m way2go bzip
(R4) has lots of slack commands
root@blade:~/downloads/mythtv-0.26.0# ./configure
yasm not found, use –disable-yasm for a crippled buildIf you think configure made a mistake, make sure that you are using the latest
version of MythTV from git. If the latest version fails, report the problem to the mailing list or IRC #mythtv on
Include the log file “config.ep” produced by configure as this will help
solving the problem.

Our first problem, we have to install yasm. We will use, you download two files a normal tar.gz and the source code tar.gz. Then you place the source into the normal tars extracted directory, then run its config which will make an install package.

# wget
# wget
root@blade:~/downloads# tar -xvf yasm.tar.gz
root@blade:~/downloads# mv yasm-1.1.0.tar.gz yasm/
root@blade:~/downloads# cd yasm
root@blade:~/downloads/yasm# ./yasm.SlackBuild

Slackware package /tmp/yasm-1.1.0-i486-1_SBo.tgz created.
# installpkg /tmp/yasm-1.1.0-i486-1_SBo.tgz

Package yasm-1.1.0-i486-1_SBo.tgz installed.
root@blade:~/downloads/mythtv-0.26.0# ./configure
ERROR! You must have the Lame MP3 encoding library installed to compile MythTV.

Our second ERROR, not too hard though, we will do the slackbuilds method (in full detail above) to install lame.

# wget

# installpkg /tmp/lame-3.98.4-i486-1_SBo.tgz

FINALLY got the config in mythtv-0.26.0 to work here’s the full output:
root@blade:~/downloads/mythtv-0.26.0# ./configure
WARNING: disabling Python bindings; missing MySQLdb
WARNING: disabling Python bindings; missing lxml
WARNING: disabling Python bindings; missing urlgrabber
WARNING: disabling Perl bindings; missing HTTP::Request
WARNING: disabling Perl bindings; missing LWP::UserAgent
WARNING: disabling Perl bindings; missing Net::UPnP::QueryResponse
WARNING: disabling Perl bindings; missing Net::UPnP::ControlPoint
WARNING: disabling Perl bindings; missing IO::Socket::INET6
# Basic Settings
Compile type profile
Compiler cache yes
DistCC yes
qmake /usr/bin/qmake
install prefix /usr/local
runtime prefix /usr/local
CPU x86 x86_32 (AMD Athlon(tm) XP 3200+)
yasm yes
MMX enabled yes
MMX2 enabled yes
3DNow! enabled yes
3DNow! extended enabled yes
SSE enabled yes
SSSE3 enabled yes
AVX enabled yes
CMOV enabled no# Input Support
Joystick menu yes
lirc support yes
libCEC device support no [/usr/include]
Video4Linux sup. yes (v1 yes)
ivtv support yes
HD-PVR support yes
FireWire support no
DVB support yes [/usr/include]
DVB-S2 support yes
HDHomeRun support yes
Ceton support yes
IPTV support yes
ASI support no

# Sound Output Support
PulseAudio support no
OSS support yes
ALSA support yes
JACK support no
libfftw3 support no

# Video Output Support
x11 support yes
xrandr support yes
xv support yes
VDPAU support no
VAAPI support no
CrystalHD support no
OpenGL video yes
MHEG support yes
libass subtitle support no

# Misc Features
multi threaded libavcodec yes
libxml2 support yes [/usr/include/libxml2]
libdns_sd (Bonjour) no
libcrypto yes
Frontend yes
Backend yes
OpenGL ES 2.0 no

# Bindings
bindings_perl no
bindings_python no
bindings_php yes

# External Codec Options
mp3lame no
faac no
xvid no
x264 no
vpx no
SDL no

Creating libs/libmythbase/mythconfig.h and libs/libmythbase/mythconfig.mak

tried to run qmake but didn’t exist so just ran “make”, getting a billion warnings about not able to distribute work, in the output it looks like make called qmake so maybe this is more up to date then my doc (R4).
RAN for a whole hour with many warnings, killing and trying this:
# ./configure –disable-distcc
took about 45 minutes and appeared to work
# make
# make install

Now setup the database, there is a script “mc.sql” within the database subfolder.

$ mysql -u root < mc.sql

Next you need to run /usr/local/bin/mythtv-setup but we cannot on this headless server so we’ll need to do a remote X-Windows session. That could be a tutorial by itself so we won’t go into that here, just know we used the ssh method seen below. is the IP Address of our Slackware server and the ssh command is being run on a Linux client with a full GUI (X-Windows, KDE).

operationlinux@greeny:~$ ssh -X operationlinux@ /usr/local/bin/mythtv-setup
operationlinux@′s password:
/usr/bin/xauth: creating new authority file /home/operationlinux/.Xauthority

2012-10-27 11:17:46.771165 E Error preparing query: SELECT DISTINCT dirname FROM storagegroup WHERE groupname = :GROUP AND hostname = :HOSTNAME
2012-10-27 11:17:46.771254 E Driver error was [2/1146]:
QMYSQL3: Unable to prepare statement
Database error was:
Table ‘mythconverg.storagegroup’ doesn’t exist2012-10-27 11:17:46.772136 E DB Error (StorageGroup::StorageGroup()):
Query was:
SELECT DISTINCT dirname FROM storagegroup WHERE groupname = :GROUP AND hostname = :HOSTNAME
Bindings were:
:GROUP=”Themes”, :HOSTNAME=”blade”
Driver error was [2/1064]:
QMYSQL: Unable to execute query
Database error was:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘:GROUP AND hostname = :HOSTNAME’ at line 1

2012-10-27 11:17:48.690654 E MySQL time zone support is missing. Please install it and try again. See ‘mysql_tzinfo_to_sql’ for assistance.

So those are pretty serious errors. We ran the same command a second time and the only error generated is the timezone one then the X-window closes immediately. The ERROR tells us to see mysql_tzinfo_to_sql, that happens to be an executable (R6). Here’s how we fixed our database:

operationlinux@blade:~/mythtv-0.26.0/database$ mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root mysql

It generated some silly Warnings but it appeared to work. Now you can run the GUI setup to completion.

operationlinux@greeny:~$ ssh -X operationlinux@ /usr/local/bin/mythtv-setup

Now to a confusing part, the tutorial we read (R2) told us to initially setup a account but within the myth setup GUI (mythtv-setup) our only options are or over the air (EIT scan). And even later within their own tutorial they mention and have a screenshot of schedulesdirect instead of zap2it. For now we left it over the air.

operationlinux@blade:~$ mythfilldatabase
had a lot of ERRORs don’t think it downloaded the channel data.
“2012-10-27 13:29:09.697318 E DataDirect: Failed to get data: Download error”
then it complained the master server isn’t running…

We probably didn’t do this part correct but we still got the backend to run.

$ mythbackend


Now to prove it is working we connect the mythfrontend…coming up next we’ll show you how we did that.


R3: vi /etc/rc.d/rc.mysqld

Posted in Linux | 4 Comments


Today instead of an “Operation” we will do a more normal Blog post and the topic is Virtualization. So what does Virtualization mean? Well first something that is Virtual is like the real thing but not quite. Like a reproduction of a famous painting it’s not the original but still looks good. Another term you hear associated with Virtualization is Virtual Machine . A Virtual Machine is a Virtual computer. It’s not what you see next to your desk and you don’t have a physical way to turn on a Virtual Machine. A Virtual Machine is like any other program you have on your computer.  Like any program you double click an icon on your desktop and Voilà a virtual computer starts running within your computer. In the window that pops up after you double click the Virtual Machine you will see a computer booting up, just like when you start your real computer!

So why on earth would I want a Virtual Computer when I have the real thing?

Advantages of Virtual:

  • You can have many different computers on one computer.  More specifically you can have many different Operating Systems running on one computer.  So if you want to try out Macintosh® but your physical computer is a Windows® machine you can install a virtual Macintosh® to try it out!
  • Virtual Backups are easier than a real computer backup.  To backup a Virtual Machine is as easy as backing up a File.
  • Portability; once you backup your virtual machine to a file you can then take your virtual machine backup file and go run it on your friend’s computer.  Every thing you keep in the virtual computer will be accessible!

Disadvantages of Virtual:

  • Virtual computers aren’t as fast as real computers.  Because the virtualzation program has to make a virtual home for your new Virtual computer (Virtual Machine) it takes away some of the computer’s raw power.  This is particularly noticed in resource intensive tasks like playing a video game.
  • Vendor Lock in.  Your Virtual Computer will only run on one Virtualization software package.  So if you want to share your computer with a friend they would have to install the same Virtualization Software.  The good news is there are many free Virtualization software packages.

I want to play with Virtualization, where do I get started?  (We have experience with the first two only):

Posted in Uncategorized | 1 Comment

WordPress and FTP

We self host WordPress and during our installation we came to a difficult part…setting up FTP.  The way the WordPress “update automatically” features work is through an FTP account.  You setup an FTP user for WordPress to use so it can FTP into your web server and update/install plugins, themes or even WordPress itself!  The “automatic” part of this feature is so nice that we decided we should install an FTP user.  This post will walk you through the exact steps operationlinux had to take, enjoy.

We run Very Secure FTP, the service was already running on our CentOS machine so this example will not go into installing vsftp.

Create an ordinary UNIX user. But set the shell to nothing and the home directory to where you have the WordPress files hosted. We set the shell to nothing aka "/sbin/nologin" for security reasons, see (R1) for details.

[root@ns1 blog2]# useradd -d /var/www/operationlinux/blog2/ -s /sbin/nologin wpftp

In our example the FTP user is "wpftp" and we host the files at "/var/www/operationlinux/blog2/".

Give your new user a password (just follow the prompts).

[root@ns1 blog2]# passwd wpftp

Now you have a UNIX user who exists on the system but who is harmless because they can’t login to the machine through a shell. Next we have to add them to the vsftp config files.

/etc/vsftpd$ vi user_list

# vsftpd userlist
# If userlist_deny=NO, only allow users in this file
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.


As you can see we appened the newly created user.

Test that it works.
operationlinux@greeny:~/learn$ ftp
Connected to
220 Welcome to
Name ( wpftp
331 Please specify the password.
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls


Posted in Linux | 1 Comment

Install jEdit

The easiest way to install JEdit on my Kubuntu is to use apt, like so:

root@greeny:~# apt-get install jedit
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
ca-certificates-java icedtea-6-jre-cacao java-common libaccess-bridge-java libaccess-bridge-java-jni openjdk-6-jre
openjdk-6-jre-headless openjdk-6-jre-lib tzdata tzdata-java
Suggested packages:
default-jre equivs icedtea6-plugin sun-java6-fonts ttf-sazanami-gothic ttf-kochi-gothic ttf-sazanami-mincho
ttf-kochi-mincho ttf-telugu-fonts ttf-oriya-fonts ttf-kannada-fonts ttf-bengali-fonts
The following NEW packages will be installed:
ca-certificates-java icedtea-6-jre-cacao java-common jedit libaccess-bridge-java libaccess-bridge-java-jni
openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib tzdata-java
The following packages will be upgraded:
1 upgraded, 10 newly installed, 0 to remove and 313 not upgraded.
Need to get 37.8MB of archives.
After this operation, 122MB of additional disk space will be used.
Do you want to continue [Y/n]? n

But it installs a lot of dependencies and maybe a Java edition you don’t want.  Since I install Java manually I’ll show you how to install JEdit with a custom Java install.

-Go to jEdit’s download page
-Click the “Java-based installer” it will download a jar, then run it:

operationlinux@greeny:~/Downloads$ java -jar jedit4.3.2install.jar

-A nice GUI will popup, it’s default values are pretty good, but you can change it to install it wherever you like.
-Note the handy command line commands!

-Now that might not be enough, you have to make sure your PATH variable can resolve the ‘jedit’ you just installed.  I had to do the following:

operationlinux@greeny:~$ vi ~/.bashrc
export PATH=$PATH:~/bin
#That’s assuming your executable is in your ~/bin directory.
operationlinux@greeny:~$ . ~/.bashrc
Now “jedit” will work from anywhere on my system.

Next I’ll show you how to make a nice GUI icon you can click.

Posted in Java, Linux | Leave a comment

Obtain standard Java…and then put it in a standard place.

OBTAIN .bin file
-Go to
-The JRE is sufficient (if you’re asking you won’t need the JDK) part way down the page is “Download JRE”, click it.
-On the next page you’ll see a Platform drop down, since this blog is all about Linux I’m installing on “Linux x64″
-Download the non-rpm edition, in my case it’s called “jre-6u23-linux-x64.bin”

INSTALL in a standard location
Now that you downloaded the .bin file above follow these steps
-Become the root user
-Place the bin file in /usr/local
-Run it:
Before you can run the file it has to be executable (done with chmod)

root@greeny:/usr/local# chmod a+x jre-6u23-linux-x64.bin
root@greeny:/usr/local# ./jre-6u23-linux-x64.bin

on the next screen you’ll see a license repeatedly hit <enter> (or ‘f’ to skip) until you see
Please enter “yes” or “no”.

Do you agree to the above license terms? [yes or no]

Type yes <enter> if you agree, then you see it basically “unzip” the file into a directory
…inflating: jre1.6.0_23…
-Create a symbolic link (more on why, later)

root@greeny:/usr/local# ln -s jre1.6.0_23/ java


operationlinux@greeny:~$ vi ~/.bashrc
export JAVA_HOME=/usr/local/java
export PATH=$JAVA_HOME/bin:$PATH
Source your bashrc, reloads variables.
…or could just launch a new shell
operationlinux@greeny:~$ . .bashrc


operationlinux@greeny:~$ java -version
java version “1.6.0_23″
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09, mixed mode)


“Oracle and Java are registered trademarks of Oracle and/or its affiliates.”

Posted in Java, Linux | 2 Comments