lesson five

April 9, 2008

hanging out in ##woodchucks, rob0 makes a comment that he’s: “editing apcupsd stuff. I cannot let it power off the machine in a shutdown. I made a special runlevel 2 which is like 1, but has network and sshd and syslogd”. this is a classic example of something that makes me go.. “huhhhh?” so i go looking things up to try to understand.

[And usually, i enter what i'm beginning to call "Acronym hell" (like dependency hell, but with acronyms). take the apcupsd. I put it into google, and i get the website for it straight away, which is good, but its not terribly informative to someone who is very new to stuff. "Apcupsd can be used for power mangement and controlling most of APC's UPS models on Unix and Windows machines. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office." uhhhhh... huh? and no links as to what most of this means. so i go to wikipedia. which is better, in that i can follow links where i don't understand.]

Anyway. apcupsd is a program, a daemon (a background process program) that works with APC (a company) uninterruptible power supplies (which is the thing that saves your computer going up in smoke when there’s a power spike or cut).

runlevel is the thing that describes where the computer is in any stage.. so when you’ve just turned your computer on, its in one run level, when its in the XWindows its in another. Slackware has six levels. level 1 is single, level 2 is full multi-user with no display manager. (whatever that is). ahah… just spotted on the wikipedia page: “Lower run levels are useful for maintenance or emergency repairs, since they usually don’t offer any network services at all.”.. so.. maybe what rob means is he’s making a special thing that runs the computer at the minimum level possible, that keeps the stuff he needs running, running, in the event of a powercut, so that the UPS keeps the machine running for as long as possible before that runs out too.

[and yes, I'm well aware it would be far easier to actually ask rob what he meant by it all but that's missing the point: by doing this and going and looking stuff up i'm learning. and i probably will ask him at some point cos he's got no idea i'm doing this right now.]

sshd = secure shell. i guess so he can run some command stuff. that would be pretty necessary i guess. syslog.. hm. ahhh ok i think i see why this is necessary, so it can record what was going on with the computer so if there’s a problem, rob can see what it is. that makes sense too.

so i get it. i think. i’ll ask him later if i was right.. i think he’s a bit busy atm.. !!


lesson four

April 7, 2008

One of the tools Michiel has given me to help me learn is a book; “Linux Start Up Guide” by Fred Hantlemann. I’ve been reading some of it before i went to bed the last few nights (to be truthfully honest, mostly because reading just a couple of pages has me snoring before i know it. Its not boring or anything, more that.. well, mention words like “variables” and my eyes start closing of their own accord. annoying, really), and finally got to the point where, really, i had to start trying some of what i was reading if i was to make any sense of it (you know, the old “Tell Me I will forget, Show Me I will remember, Involve Me I will understand!”).

So Chapter 3 (“Operating Linux”) so far has had me using the whoami, the who am i, the id and the set commands, the ps -al command, the ls one (which i knew already) and ls /usr/bin | more, and more /var/log/debug which gave me a rude reply about not having access. well :P to you too matey.

It then went into detail about how to move and copy files, using the cp and mv commands, and how to make a directory (mkdir).

Then it started in on Vi. Now, this i’d heard of: Michiel had gone to some effort to explain to me why emacs = bad and Vim (the uptodatebigbrother verson of Vi) is good. not that i was any the wiser, then, as i didn’t really understand what an editor was. to me, an editor is the person in charge of a magazine. So i went looking on the intertubewebthingie to see if i could understand it a bit better. Wikipedia was a start: it led me to a page on why Vi (pronounced Vee-eye, not Vie) was the greatest gift to man, and why some nutheads use Vi/Vim. (at which point i turned to Michiel and asked him, is Vi/Vim good? he said yes. so emacs is bad. at least, from his perspective. Do i agree? no idea. yet. :D ) so i think i understand now, what an editor is. its a program that lets you write. you can write normal text (although you’d be better off using a word processor or something if that was all you wanted to do) but you can also write programs. However, there’s a catch. in order to execute (i.e. run) your new program you either have to use the command interpreter to execute the contents of it, or you can mark the file as an executable.

huh? okay.. whats the Command Interpreter? (reading these things is frustrating: you understand one thing and get 20 more questions). Well, that was the next bit of the book, funnily enough, and the bit that sent me back to the intertubesfount-of-all-info. According to the book, the job of a Command Interpreter is “to analyse, or interpret command lines entered by the user and start any programs cited”. well, hey, that sounds like konsole, which is what Michiel tells me to use when he wants me to do something (and i’m slowly getting less scared of). and this goes back to another conversation we had, where he tried (and failed, although not his fault) to explain the difference between konsole and Bash (as an example of a Command Interpreter). Wikipedia was my starting point (Its not for nothing i’m known as wikislut), although not terribly illuminating, it was thinking about what i’d read in the book and everything else i’d learned that finally clued me in: Bash will do a lot of the things Konsole does, but Bash does more than Konsole does too. Konsole will only run or execute files, Bash will do the analyzing part as well.

So.. to make a program you have to write it first in an editor like Vim (or the much hated emacs), then use a command interpreter to analyse it and get it to run. analyse.. meaning check it works? Maybe i’ve got my understanding totally wrong, but it seems like a terribly long winded way to go about it. why not one program that will do everything: write the code, check it for bugs, then execute it?

hmmmm. see what i mean? … understand something.. get more questions.. argh!!!

I’m going to go have a bath and think this through some more.


lesson three

April 3, 2008

thanks to fred (he of the “do-not-click-that-link” fame) i now know what had, in my head, been called the thingiemahjig before now, is really called. its a backplate. (apparently he is jerryrigging one). a video on how to install one can be found here. Duct tape is a wonderful thing, by the way. no, not for gagging me, for sticking together a blank backplate to an IDE controller. i think, anyway. (I do know it came with a PCI backplate that is ATX incompatible, and no, i don’t know what any of that means either).


lesson two notes

April 2, 2008

how to deal with a headache induced by Michiel attempting to explain how bash is both a language and a program (shell) and konsole uses bash but isn’t a shell: crack open a cadbury’s creme egg and dunk 48% cocoa solid chocolate squares into the fondant egg. then sit back and enjoy the sugarrushrrrrrrrrrrrrrideee… *twitch*

moving around within the command line:

rm = remove
cd = change directory
ls = listing
Q = quit
less = view the contents of a file one page at a time.
man man = manual pages.
man = manual pages so man XXX would be manual page for XXX (fill in the gaps with a program name)
mc = midnight commander, a sort of command line version of file manager

man 1 XXX = first page of the man page for XXX program

File structure of linux:  called the Filesystem Hierarchy Standard, maintained by the free standards group, although not all of the contributors obey it. (they’re norty). But slackware does. YAY for slackware! so most things on linux/unix computers that obey this will be found in the same place. Useful.

back to the packages thing:

files within packages aren’t all within the same place. important point, this! its not like windows where you have c:/programfiles/microsoftoffice or anything like that. the packages have index cards within the box that tells you where the file is, not that the file is necessarily within the box. also packages aren’t always the same as the program, although sometimes they are. (looks like it can never be simple. huh.) this page has useful info on this.

final note: GUI = Graphical Interface = point n click programs that you love.


lesson one notes

April 2, 2008

compile = build. configure = specifications.
all programs come in source code.
slackbuilds are just instructions for turning source code into a package suitable for slackware.
a package is a box that contains files.
to make a package run on your system you need to use a package manager – in slackware, that’s pkgtool.
there are some good and bad package managers out there. slackware’s package manager is good cos it doesn’t address dependencies for you, it assumes you have addressed those yourself so forces you to take full control of your own system.

all packages are also archives, so a tgz or tar system is also an archive and a package.

configure script = the bit of script that tells the package manager *where* to install things.

where to store things:
/bin and /sbin = program files that is the basic basic level to get box running, no mounting of other partitions
/usr/bin and /usr/sbin = other program files like KDE, kmail, kobe, etc. but are going to be common to all users on that computer.
/usr/local/bin and /usr/local/sbin = stuff that’s really only for the one usr

if you install a package without a configure script it will automatically try to put it in /usr/local but this is not right – good practice file trees say most packages should be put in /usr. only a few things get put in /usr/local, usually things that cannot be packaged because either the developer is shit or there’s no point because all the files for that program are kept in one directory anyway like SL or UT.

Linux is different to windows in that if a program uses lots of files, windows stores the files for one program in one directory, and if another program needs the same file then it puts the file on your computer twice (in a different place). Slackware doesn’t do this, so if program A and program B both need File X then file X is put in location B and program A and program B contain references to it and where it is.


educating kethry

April 2, 2008

of course, the title for this blog is taken from the film, Educating Rita. If you’ve not seen it then very basically, its about a hairdresser who has educational aspirations, she changes her name and starts an open university course, and in so doing, changes her life.

I don’t pretend quite the same lofty life changing aspirations with this, more.. that i want to learn about slackware. I’ve written some about this in the “about & why” page, but more than just a boring series of notes i also want to write some of my observations about this path i’m on, provide links to useful places, and generally provide a non-geek’s perspective into a geeky world. I hope it’ll be funny in places, as well as useful, to me, at least.

This isn’t all of my life: i also love cooking, gardening, many other things (which i write about on my main blog) and as such sometimes this may have to take a bit of a back seat to the other things in my life. however, i’ll try to keep learning, even if the learning is a little bit ad hoc and stuttery.

I’m a reasonably bright lady, with some basic computer knowledge (I did Computing GCSE, and have worked with computers for years, although mostly as a secretary/adminstrator) so i have a good grounding for it. I used to have an old BBC Micro Computer as a kid (Chuckie Egg still rocks!), graduated onto Microsoft Works (going back nearly 20 years now), then to Dad’s Microsoft Windows computer which he got for an OU course – which ran Ami-Pro as a WP, and other Lotus software – and which i taught myself to use in the early 1990s. Eventually moved to Microsoft Office with the company i worked for, using MS Access and other databases very successfully, but always as a user, never as admin, never using code or any kind of language (not even in queries, never used SQL, just point and click). I didn’t let go of Windows until after i met Michiel – in fact, didn’t even know Linux and Unix existed.

Anyway. here we go, off on the journey. You coming?