Showing posts with label Slackware. Show all posts
Showing posts with label Slackware. Show all posts

Sunday, October 4, 2015

Linux, BSD Unix - Some of what I've Learned.

v0.3
04 Oct 15

You have a superseded desktop or laptop gathering dust.  Perhaps you have an itch, or you have a somewhat energetic and inquisitive young one who you would love to see entertained.

First off, if you just want to have a desktop with all the bells and whistles provided, then Linux Mint or Ubuntu are for you.

http://distrowatch.com/dwres.php?resource=major

If, however you want to dig a bit deeper then I have a story for you.  Navigating the Linux and BSD maze is a little like an adventure game, full of treading in cow-pats and "oh-wow" moments - and if you are caught off guard, full of career opportunities.

Before I start though, go to Wikipedia and look at the "Unix", "Linux", "Debian", "Slackware" and "FreeBSD"pages.  Having a look at "Distrowatch" wouldn't hurt either...

 So, what is the difference?  Which one to choose?  Here are a few random thoughts I have jotted down that you might find useful.

BSD and Linux

The first thing is that the "BSD" systems are direct descendants of the original Bell Labs UNIX.  If you want to run a Unix system, then choose one of these.  BSD Unicies are developed by a dedicated team to ensure everything works together.  Linux or more correctly GNU / Linux is a  collection of software pieces that together approximates a Unix-like system.  Whilst a person experienced in Linux would find a BSD system familiar, there are distinct differences.

Debian and Slackware

For many years, I ran both Debian and Slackware on various machines at home.  They are each excellent Linux distributions being the two oldest, and the basis for so many other Linux flavours.  One significant thing is that support for desktop features is far stronger in Linux than BSD.  Skype and Flash are two examples, although that "support" is not exactly strong.

Slackware is a KDE desktop-centric distro with no native support for Gnome or dependency checking.  It needs some tweaking of text configuration files - somewhat like Unix.  Debian is Gnome-centric and has excellent administrative tools with extensive dependency checking.

PC-BSD and FreeBSD

Even though I have a lot of respect for these Linux flavours, I now use FreeBSD - so how did that come about?

I moved from Slackware to Debian to get the admin tools and their integrated development cycle, but then gradually I started peeking at PC-BSD for its easy intallation and powerful ZFS file system.  Then Linux changed with many distros going for a new initialisation system called "systemd" which did concern me a little.  I thought of going back to Slackware but then tried PC-BSD for a bit and fell in love with Jails and ZFS.

Two things destroyed my PC-BSD experience.  Upgrades between versions were problematical, though I suspect that has been largely fixed.  The real killer was that it started mis-behaving after a graphic card replacement and then just plain refused to install.  FreeBSD installed fine, which was puzzling since PC-BSD is simply FreeBSD with lovely desktop polish and ease-of-use.

FreeBSD

Why do I like FreeBSD?

Unlike Linux, FreeBSD has a simple base installation.  It is a complete text environment with the Kernel and Userland (utilities) to allow you to use it as a C development platform.

All packages added by you the user are added under " /usr/local ".  I love this for two reasons.
  • This allows sensible partitioning which I have used on an Asus eeepc to install a graphical environment.
  • Updates are easy to understand and perform.  "freebsd-update" updates the base system and "pkg update" updates the user installed packages.
In order to make the most of the power of FreeBSD then the 64 bit version is preferred as the ZFS file system is not as stable on the 32 bit version and so the standard UFS file system is preferred on 32 bit.

ZFS - what is that?  Magic.  Pure Magic.

And for "Steak Knives" you get Jails.  A jail is a type of virtualisation with shared resources - those of you who know about jails will cringe at this but to get the idea across, that will do.

Don't expect to be up and running with FreeBSD in an instant.  Do some reading and watch some Youtube videos.  It is not hard to configure (there are two really important config files - /boot/loader.conf and /etc/rc.conf) and once you get the "zen" of it all it flows easily.

I really like FreeBSD for its stability and consistency - the more I use it the more I love it.



Later ...

Thursday, January 26, 2012

Debian Wheezy in VirtualBox - Part 6

v 0.2

I have to say that I'm really enjoying playing with Wheezy in Virtualbox.  It is letting me have a really good look at where things are going - although the downside is that it is too easy to just stop my work and have a bit more of a peek.  I'm no expert, however it is really interesting finding a problem and then seeing what information there is available to get around it.  It is made so much easier because I am starting with a solid base system that I'm not relying on that I can just incrementally improve.

On to what I have been doing ..

Documentation

There really is an amazing amount of documentation and how-to information available for Debian, not only on the Internet at large but also on the Debian Website and within the installation itself.  One example is the "Debian Reference" we installed in my last post. 

Another package to look at installing is the "menu-xdg" to compliment "menu", the Debian menu package.  I installed it thinking I would perhaps GET a Debian menu in Xfce, but not to be - I think I'll have to define a menu-hook for it and do it manually - but not right now.

" dhelp " is a package worth installing.  Once it is on your system, open a terminal and type " dhelp" .. it compiles a list of HTML documentation on your system and presents it in the default Web browser.

If you get really keen and open the file browser, look in " /usr/share/doc " .. a documentation package for almost every package you have installed .. even one that describes the Debian Menu system in detail.

Open Synaptic and search on "documentation" ... extensive stuff in the Debian Repositories.

Other places to find great stuff are The Linux Documentation Project , and the Rute User Tutorial , not forgetting the Linux Cookbook .  Of course, the Slackware Linux Book project is just wonderful, and I've really been impressed with the detail of the documentation at Gentoo Linux.

I think that is enough for today.



Later ...............

Friday, June 17, 2011

Debian Squeeze - VirtualBox Guest Additions

v 0.3

This post has a number of connections - it ties together a number of the posts I've made today and also my post on Bitcoin mining.  As I posted there, you can let the mining happen in a Windows environment and run a normal desktop, say Slackware or Debian under Virtualbox.  I noted that playing video clashes with Bitcoin mining, but not if you run it in a Virtual Machine.

Slackware already comes with all the required build tools to install Guest Additions and all it requires for that is to mount the Guest Additions ISO and run the script.  Debian needs a bit more.  You need to ensure the kernel headers and the build tools are installed - either by installing Module assistant and then using the command " m-a prepare " or downloading the headers and build tools as described in the previous NVidia driver post.  If you find you need an alternative compiler version, the refer to the post on that.

Finally, just mount the Guest Editions ISO (in its most basic form you can find it in the Virtualbox directory) and then run the appropriate install script on that ISO.  Very simple.


Later.....

Jan 2012

Upon re-reading this, it seems a little spartan - I've detailed the process a little better in my post today on installing Debian Wheezy in Virtualbox...

Rgds

Saturday, June 4, 2011

Bitcoin - Solo Mining - Windows 7 - ATI HD 6970

v 0.7
Before you do anything with Bitcoin, you need to be running the Bitcoin software.  Of course, you will have visited the Bitcoin website and read everything there.  The software is on the front page of the website.

Bitcoin Website.

I ran the software for a couple of days before I realised that I was only using the Intel processor, not my video card's GPU to generate bitcoins.  Some research and I downloaded Guiminer and tried that, however whilst this provided part of the puzzle, it failed to get things working and I ended up doing the gruntwork with the command line "poclbm".  Of course, since the command line programs are supplied with Guiminer, then no extra download for that is needed.

The final piece of the puzzle is getting "OpenCL" working.  Guiminer does NOT recognise the latest AMD incarnation, only the previous one.  I ended up installing both, so had to choose when I started the command line up, as you will see when I get to the startup command line instructions.

Software
Guiminer
https://github.com/Kiv/poclbm
Download button on the upper right lets you download the latest .. here is a direct link to the latest at time of writing:  https://github.com/downloads/Kiv/poclbm/guiminer-20110521.exe

Stream opencl
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-vista-win7-32.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-vista-win7-64.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-xp32.exe
http://developer.amd.com/Downloads/ati-stream-sdk-v2.3-xp64.exe

or

AMD SDK
amd-app-sdk-v2.4-windows-64.exe    from
http://developer.amd.com/sdks/amdappsdk/downloads/pages/default.aspx


Here is a guide for guiminer which helped me to get started, however I had to work out the end details:  http://forum.bitcoin.org/index.php?topic=10438

Procedure

Install and run Bitcoin.  For mining with your GPU, you will need to run bitcoin as a server, but for the moment, we can look at the interface.  There is your bitcoin wallet address, and on the bottom right, your connection status and downloaded blocks.  If you want to generate coins with your CPU, then click "settings" and "generate coins".  Don't expect much.

Make sure you have un-installed any conflicting video drivers and installed the latest ATI drivers for the 6970.  I also ran a registry cleaner to make sure there were no confusing pointers, then rebooted.

If I had to do it over again, I would only load the "ati-stream-sdk-v2.3".  Guiminer recognises it and it saves an extra flag in the command line.  Reboot.

Install and run "guiminer".  Have it in a convenient directory that is easy to refer to on the command line.  We will be using the "poclbm" program it comes with later.  What you get out of running the command line is that you can set up the configuration files.  IF you have installed the stream sdk properly, then everything will work when it starts up and you will see it has found your video card in the "Device" drop down, otherwise it will complain that it can't find an "opencl" device.
  • Select "solo" miner.
  • Under solo utilities, enter the username and password you wish to use to log into the bitcoin server.
  • Enter any extra flags you want to use for the device (see the hardware comparison from the previous post).
  • Save the configuration.
There are two configuration files:

First
\User\AppData\Roaming\bitcoin\bitcoin.conf
Within that file, should be two lines set from guiminer.
        rpcuser=username
        rpcpassword=password

Next
\User\\AppData\Roaming\poclbm\poclbm.ini
Inside this is the solo miner configuration.

{
    "profiles": [
        {
            "username": "user",
            "balance_auth_token": "",
            "name": "Default",
            "hostname": "localhost",
            "external_path": "",
            "flags": "-f60 -v -w128",
            "autostart": false,
            "device": 0,
            "password": "password",
            "port": "8332"
        },
    ],
    "bitcoin_executable": "C:\\Program Files (x86)\\Bitcoin\\bitcoin.exe",
    "show_opencl_warning": true,
    "show_summary": true,
    "show_console": false
}

The Command Line

Open the command line.

       start /D"C:\Program Files (x86)\Bitcoin" bitcoin.exe -server

This line starts the bitcoin program as a server.  The bitcoin window will open as a separate process. The directory switch means you can run the command from anywhere.
Wait till a connection has been made.

start /DC:\pro\guiminer poclbm.exe --platform=1 --device=0 --user=username --pass=password

Enter the above command line (altered for your machine of course).  Note the directory switch nominates the directory - there is a space between the directory and the program executable name.  Also note the --platform switch.  I use 1 because I have two possible libraries as I have both the AMD and the ATI Stream libraries loaded - ATI Stream is the second one (1) that the system recognised first, so I'm staying with that.  I follow it with the device switch which is the video card, and then the username and password that you set in the configuration file.

It took me a while to get it sorted, but then my Video card sprang to life and the fan went wild and you could almost feel the load.  Instead of 3 M/hash per second, I was getting 350 M/hash per second.

Best of luck and I hope it works as advertised.



Later ...

Update:
I included a flag "-f60" in the poclbm.ini file.  I found without that flag, the default of "-f30" made the priority of the poclbm process too high.  I would find that after an hour or so, with the computer churning away, if I came back and wanted to do some work on the machine, it would apparently "lock" up on me and I'd have to reboot.

Update 2:
The "-f60" flag has definitely improved stability with no noticeable loss of processing.  The only problems I've had is when trying to play a Youtube video, when the system locks up.

Update 3:
The lock-up remains no matter what "f" flag I use.  It would appear that Flash video and bitcoin mining are mutually exclusive.

Update 4:
The solution I use (for the machine lockup with video playback) is to use a virtual machine for much of my work.  I have Debian 64 set up as a virtual machine using Virtualbox, and I also have instructions for a Slackware VM elsewhere in this blog.  Video playback works fine in the VM and it all works seemlessly.  My normal use of the machine barely touches its capabilities and I can run the mining on Windows.

Update 5:
Yesterday I found I had "rcp connection problems".  Solutions presented on the net didn't work for me.  Then I had a look at the bitcoin version I had (21) .... I updated to the latest (23) and the problems went away.  I also discovered that once you start the bitcoin server, you can then start the poclbm miner.  It will complain about no connection etc but as soon as there is one it starts churning away.

Update 6:
There was an update to my Catalyst Control Center from AMD tonight.  It broke the miner I had sorted.  That's the bad news - it gets better from here.  In the article above, I talk of downloading the ATI stream SDK 2.3 ... well, that is broke and we must move on.  Install the AMD 2.4 SDK and all will be fine.  In my setup, I had both - the 2.4 was platform 0 and the 2.3 was platform 1 (as reported to me).  I simply changed the "platform=1" switch to "platform=0" and all was again well.

Saturday, April 30, 2011

Slackware Leet in Virtualbox

v 0.2


With the release of Slackware v 13.37 (Leet) I thought it was about time to get an installation up and running again.  I've always loved Slackware, even though I use Debian as my base install for the desktops in my house.  I have one desktop with Windows 7 installed - simply because it is needed for a Flight Simulator - but I have Debian 6.0 64 bit installed in Virutalbox for my other stuff.

I keep hearing how difficult Slackware is to install which I personally think is rubbish, provided you have taken the minor trouble to read the readily available information from the revised Slackbook project, or a simple Google search.  Anyone who hasn't done even the basic searches to help themselves deserves what they get.  Of course, here is where I admit to cheating a little - instead of using the tools in Slackware to partition and format, I use the Linux distro "Parted Magic".

Here we go.
  • Download the Slackware DVD iso image
  • Download the Parted Magic iso image
  • Use the Virtualbox "wizard" to create a new Slackware machine.  (I used v 4.04 of VB)
I should note here, that I modified the settings to allow a machine that was 20 gig, that expanded as required so as to not take up space, 1.5 gig memory, 64 meg video memory.
  • Mount the Parted Magic ISO on the VM DVD drive and boot the machine.
  • Create at least one partition on the VM and format.  I used ext4.
  • Unmount the Parted Magic ISO and mount the Slackware ISO
  • Reboot.
  • You will eventually be invited to log in as root with no password required
  • "setup"
  • I re-formatted the partition as I chose for the install disk - this sets up fstab
  • Had the installer find the Slackware install DVD
  • Chose to install everything
  • Selected KDE as the window manager
  • Set up the networking - nominated a hostname and a simple domain name and defaults.
After all this was done, I unmounted the Slackware DVD and rebooted.  I ended up at the log-in prompt again, logged in as root and typed "startx".  KDE crashed half way through starting.

Bother.  Google.  Solution found.

From the changelog, Nov 16, 2010:
...
If X crashes at start, try disabling compositing. Create a file
named /etc/X11/xorg.conf.d/disable-composite.conf with this in it:
Section "Extensions"
Option "Composite" "Disable"
EndSection
...

Here is where you get a payoff for being even basically proficient in a standard Linux editor, such as "vi".  This was done, and just because I could, I restarted and "startx".   Worked like a charm.

Now, I found the resolution limited to 800x600.  Google again.  Found out how to install the VB Guest additions, which I suspected would fix this.  Easy again.  I chose the menu selection to install the guest additions, and I found the iso mounted under /media.  Even if this does not happen, you can mount the guest additions iso (found in the VirtualBox directory).  In this ISO is a "VboxLinuxAdditions.run" file.  Simply move to the ISO as root and run " ./VboxLinuxAdditions.run ".

Reboot.

When you restart KDE you will find your resolution is now 1024x768 as the max.  All you need to do to enlarge it is to drag the window larger and it will resize.

Done.

I will admit to writing parts of this from memory the next day, however with some care, it is really not that difficult to sort out.


Later ....


Saturday, January 1, 2011

Debian, Slackware and Bling

v 0.1.3

After writing the first part of my "Debian Thoughts" post, I had the urge to diverge slightly and write about one of the interesting intrusions into the Linux world - Bling!

Increasingly when I read reviews of Linux distributions there is a seeming expectation that once the installation CD is inserted into the drive, the install routine will engage the ESP function and set itself up to the exact configuration that the user will like.  Naturally, Slackware and to a lesser extent Debian fail miserably in this test as the ESP package never makes it into the repositories. That Slackware has a "Gasp" TEXT install routine is enough to have some reviewers go wash their mouths out to eliminate the taste.

A confession .... yes, I have been observed on occasion to be the perfect candidate for a TV series called "Grumpy Old Men gone Troppo".  I would like to think that these people with challenged attention spans will mature in time, but as I grow older I become less optimistic.  Back to the article ....

The problem I see is that the reviewers have unrealistic expectations of what can be achieved out of the box and they never realise what a disaster Windows is to install.  The review is really a review about how easy the distribution is to install by mind control.  I once read a review someone did of a Windows install, and it was not pretty.

Now, enough of giving a man a Fish for a meal, and about teaching him HOW to fish so he can eat forever.

Both Slackware and Debian are high quality distributions with great depth.  They have extensive documentation and can be used for almost any task.  It is a bit like Emacs v a standard text editor.  On first blush the standard editor is easy to use, however after a while, it plateaus whilst Emacs just keeps climbing as you learn all those new things it can do.

I fell in love with Debian the first time I met it a long time ago.  I was aware of Slackware but a little wary of its lack of "package management dependencies".  I was using Red Hat 7 for a while and one day after I'd been sucked into "RPM Dependency Hell" I chanced upon this review by Eugenia at OSNews.  By chance, I'd been looking at Vector linux on an older machine I had and had come to realise how really easy the init routines were to manipulate (how hard can it be to remove a comment character?). I was sold and had Slackware for  a couple of years until sometime just before Debian Etch was released.  Whilst I still loved Slackware, Debian was more suited to what I needed.

Which leads me on to the Slackware package management and in particular lack of dependency checking.  Who exactly decided that this was a problem?  It all seems pretty straight forward to me.  If you want to install a package onto Slackware 13.1 for example, then install the one that was prepared for your Slackware version.  And if it doesn't come with a note telling you if there are any additional dependencies then there is a big question mark over the head of the person who prepared the package.

Am I missing something?

Oh yes, I was talking about Bling, wasn't I?

I applaud people for trying to make Linux easier to use and understand, but as I've learnt from my Emacs adventure, there is only so much that can be achieved.  Flashy things are great for the surface, however these days you need something that has depth, is bug free and that will serve you well for a long time.  Many derivative distributions of both Slackware and Debian seem to try to "outbling" each other and as they fork, they introduce incompatibilities with the original graft stock.  We have to learn enough new things on a daily basis these days without having to re-learn the operation of our computer.

To me, the ideal derivative distro would be that it simply modifies a base.  An excellent example of this concept is the "GenieOS" that was based on Debian Sarge.  It used the Debian "preseed" functinality to present the user with an install that had useful customisations.  Any derivative distro that loses compatibility with its graft stock makes me seriously concerned.

I think I've imposed my views for long enough now, I hope it has been both entertaining and of value.  There are a couple of ideas I'll expand on later.


Later.