Monday, 27 April 2009

Obtaining, Trying and Installing Linux

You can purchase Linux CD's from the internet if you have a slow connection, have trouble downloading your fave distro or dont want to mess about burning install CD's yourself.

Buy Linux CD's

Note that buying a CD does not mean that you are supporting that particular distribution, as the proceeds will likely go to the vendor who creates the CDs for their materials and labour. If you want to support a distribution financially, visit their website and look to see if there is a donate / merchandise store link. =)

However, you might want to reconsider downloading the distribution as you will get a more upto date revision, and you may find that some flavours of linux e.g. Ubuntu, Slax and Gentoo for starters allow you to run or install linux from a USB memory stick.

Other flavours may even allow you to download linux via bittorrent, such as BlueOnyx. You may wish to try several flavours before you select a particular one, as for example BlueOnyx is a great Server appliance distribution, but people who want to use linux on a single machine may well find that a Desktop edition is more tailored to their needs, e.g. Ubuntu, Kubuntu, Suse

Labels: , , , , , , , ,

Thursday, 26 February 2009

BlueOnyx

I have decided to follow the (*) BlueOnyx distribution, as it picks up where BlueQuartz was trailing off. It is no 5106R as opposed to 5100R, and retains the sausalito / cce configuration tools.

Customary to practice, I never try a new system out on a production server, so in this case I opted to install it on a spare HDD in an older laptop while I performed some testing.

Since the machine may become disconnected from the network after the install, making it impossible to reach the familiar '/login' url from another client, I have occaissionally opted to install a basic X environment on BlueQuartz, not good for production performance, but great for doing all in one testing, and development on a stand-alone server, lets say =)

There are some new features in BlueOnyx, so I couldn't wait to tryout my fresh install. The install was great, and you now have the following options for install:

- 20GB LVM partition layout
self - manual partition config
small - 10GB LVM installation layout

It is also possible to run 'linux rescue' ... as I found out:

in order to install X + GNOME on BlueQuartz, I did (as root)

yum update
yum grouplist
yum groupinstall "X Window System" "GNOME Desktop Environment"

this failed in BlueOnyx, something about 'dependancy libxxxx.0.so' so I tried X + KDE instead, which appeared to install successfully. To my horror though, I got the dreaded Kernel Panic on reboot.

The solution for me was to 'boot linux' to enter the rescue mode, and

# cd /mnt/sysimage/etc/selinux
# vi config
edit the line "SELINUX=enforcing" into "SELINUX=permissive", save and
# exit
to reboot into the system. (I suggest you simply edit /etc/selinux/config after installing X, but before rebooting, to spare yourself from having to use the rescue system)

This way, instead of

...
unmounting old /dev
unmounting old /proc
unmounting old /sys
audit(1235663670.224:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
Unable to load SELinux Policy. Machine is in enforcing mode. Halting now.
Kernel panic - not syncing: Attempted to kill init!

you get
...
unmounting old /sys
INIT: version 2.86 booting
...

=D

Labels: , , , , , , ,

Tuesday, 21 October 2008

bluequartz website

Grrr! I keep forgetting how to get to what I want on the http://bluequartz.org/ website, on account of the homepage being, well, a bit sucky. Dont let that put you off though - heres how to get to some good stuff:

http://bluequartz.org/docs/

This page has links about
# Adding your menu item on UI (Yutaka Yasuda, Cobalt Users Group)
# gcc installation to BlueQuartz 5100R / FC1 Ref. Kit (Yutaka Yasuda Cobalt Users Group)
# BlueQuartz serial console HOWTO (Makoto Oda, Cobalt Users Group)
# How to translate messages of UI (Michael Stauber)

http://bluequartz.org/trac/

but the most important link:

Sausalito Developer's Guide
ftp://ftp-eng.cobalt.com/pub/developer/TechNotes/SSDK.pdf

Labels: , , , , ,

Monday, 4 August 2008

BlueQuartz::DB4

Hi folks - just having some more fun poking around under the hood of the sausalito UI (user interface) for BlueQuartz linux. I'm actually just trying to amend one of the package names installed under the BlueLinQ tab, because I have installed Webmin 1.250, and after upgrading it to 1.420 BlueLinQ has frustratingly kept the original 1.250 version number.

I have traversed the JavaScripts, read the PHP, and found my way into the $cce objects. That led me to the discovery of the cce.so module used by the php4 admin backend webserver. it would appear that with this, the $cce object in PHP communicates with the /usr/sausalito/sbin/cced daemon via the cced.socket unix socket. (I could be slightly off here, but that seems to be vaguely representative?)

There are 2 xml files in the /usr/sausalito/ui/style folder which define the colour schemes, 'Merlot' and 'trueBlue'. However, there are over 100 other .xml files in the /usr/sausalito/ui subfolders, which looked like a good place to find where BlueQuartz kept its data, but upon inspection appeared only to contain definitions for the various menus etc associated with the admin UI.

Without looking at (for) the objects, methods and function calls in the php which manipulate the cced, I investigated the cceclient /usr/sausalito/bin/cceclient. I recommend setting up an alias by using a line like "alias cceclient='/usr/sausalito/bin/cceclient'" in your terminal session (or better, in your ~/.bashrc file) to make it easier. See my earlier post for commands you can use, and READ THE WARNINGS!

So now you've got access to the backend. Perhaps you can even GET and SET some values, and whilst this may be enough to solve the above problem (altering the description of an installed package), I was still curious about where it stored the data, as it wasnt in any of the .xml files found thus far, I couldn't see any evidence in the MySQL db, and there was no sign of a postgreSQL server either.

The clue is /usr/sausalito/db4 - looks like a Berkeley db4 v4.0.14 backend, and sure enough, the apache admin instance also has dba support built in. It doesnt appear to use SQL, resembling more of a structured file like xml with key=value pairs. I'll try and update this section shortly...

Until then, for more info see these links:

/usr/sausalito/db4/docs/index.html is the path to the (local) documentation on BlueQuartz and contains the API for C/C++, Java and Tcl. See also the docu about the supporting utilities (in db4/bin)

Adding dba support to php

How to Create a db4 Database from a Text File or Array

http://www.stanford.edu/services/pubsw/package/libraries/db4.html

"Description: Embedded database and hash file library
Source: http://www.sleepycat.com/

Berkeley DB is a programmatic toolkit that provides high-performance built-in database support for desktop and server applications and for information appliances.

The Berkeley DB access methods include B+tree, Extended Linear Hashing, Fixed and Variable-length records, and Queues. Berkeley DB provides full transactional support, database recovery, online backups, and separate access to locking, logging and shared memory caching subsystems."

Labels: , , , , , , , ,

Sunday, 3 August 2008

Samba howto - connecting from linux

Credits once again go to www.raqpak.com (site offline) for this. Its targeted towards Cobalt users, but it could be applicable to anyone on a linux machine trying to access a windows resource. I included it mainly for my own reference here, although I suppose I could compliment it with the counterpart - how to setup a Samba share on Cobalt / BlueQuartz / Linux for windows users to access


Mount a windows NT/2000/98 path

If you want to mount a windows filesystem onto your Qube3 use the following command:

mount -t smbfs -o username=theuser,password=thepass //servername/sharename /home/groups/home/network

Change username/password as required (If you dont need to authenticate, remove the entry and the -o option parameter completely)
Create the directory you want to mount the drive to, so in the above example create /home/groups/home/network first then do the mount statement.

If possible, before a reboot or shutdown, do a:
umount /home/groups/home/network
otherwise the reboot will take longer as it unmounts the system itself.

(For this to work i'm assuming you've configured your network file sharing/workgroup stuff correctly as its all related)

Labels: , , , , , ,

RaQ::Security - htaccess

Another article I found from www.raqpak.com (site offline)

htaccess & directory security
HowTo secure your folders


There are a lot of posts to do with .htaccess file and how to use them correctly on Cobalt Raq products.

The most noted problem is the authentication actually seems to allow anyone whos registered with the RaQ to get behind the secured area. This is only true if the file hasn't been configured correctly, as when set correctly it will read only the users specified in the .htpasswd file as per any normal configuration.

Create the .htaccess file as follows:

# Access file
order allow,deny
allow from all
require valid-user
AuthPAM_Enabled off
Authname "My Secure Directory"
Authtype Basic
AuthUserFile /home/sites/home/path/to/.htpasswd


This is the same as any standard .htaccess except it includes the AUTHPAM setting, this is because Apache on the RaQ's have been compiled with PAM (Pluggable Authentication Module) support, and so will authenticate via the system if it cannot authenticate via the password file.

Create the htpasswd file in the usual way:
htpasswd -c /home/sites/home/path/to/.htpasswd myuser
And type the password in.

Labels: , , , , , , , , ,

BlueQuartz::Using the cceclient tool

Came across this excellent article whilst messing around with Sausalito, the backend UI on my BlueQuartz server. Its a low level way of accessing cce, the Cobalt Configuration Engine, and from what I gather an efficient way of hosing your system if not careful.

(It resembles accessing Cisco switches over serial console links, or using the MSC / MMSC on my SGI Origin servers, and has a very arcane feel to it. Perhaps I should set the terminal font colour to green or amber for best effect)

I pinched it from http://www.cobaltfaqs.com/index.php/Using_cceclient_tool, and reposted it here, because you never know when useful stuff like this will disappear. Dont forget to check the original page, in case their copy is fresher.

Using cceclient tool
From CobaltFAQs

CCE is the Cobalt Configuration Engine. It is a series of XML files that are used to configure the user interface settings. This is not a beginner tool. There is no undo function so be careful.

You must be logged in as root. Then issue the command:

/usr/sausalito/bin/cceclient

This will bring you to a command prompt:

100 CSCP/0.80 200 READY

Help is available by typing

help

ADMIN suspend | resume : suspend or resume write operations

AUTH : Authenticate as a user

AUTHKEY : Attempt to resume a session

BEGIN : Begin a transaction

BYE [SUCCESS | FAIL | DEFER] : Disconnect immediately, indicating exit status

CLASSES : List all classes

CREATE [= ...] : Create a new instance of the specified class

DESTROY : Destroy the specified object

ENDKEY : Expire the current sessionid now

FIND [= ...] : Find instances of the specified class, matching given criteria

GET [.] : Get a list of key=value pairs for the specified object

HELP : Show help about all commands currently available

NAMES | : List available namespaces for an object or class

SET [.] [= ...] : Set all listed keys to listed values in the specified object

WHOAMI : Get the object id of the currently logged in user

To exit use the command:

bye

Please note that commands are case specific! Also, there is no undo for these commands so I suggest capturing the settings before editing by using the GET command. Use the cceclient command at your own risk!

--ChrisD 18:18, 15 May 2005 (UTC)

Labels: , , , , , ,