Read posts about lpi

September 26

LPI 102 - I passed! (Punkadyne Labs (Punkwalrus))

I am now LPI Level 1 certified!

Hoo-ray! The test was really hard, though. Mostly fill-in-the-blanks, with a lot of esoteric questions. If it had been a bar fight, my victim would have looked worse than me, but not by much. I'd still have a split lip and walk away with a limp. I can't comment much on the exam for NDA reasons, but I still felt like I wasn't being tested on core knowledge as much as I was being tested on, "Suppose this happened?" I would say I was tested on stuff I didn't study for, and only pulled out of my ass from stuff I did back at AOL or as a hobby moment when I got stuck at something.

There was also some oddball scoring. Like I got a 33% on a set of 2 questions. I would think the only outcomes from 2 questions would be a 0%, 50%, or 100%. Maybe they mean in hex.

Anyway, I passed, and I am grateful my cold didn't make me too woozy. Next, I am on to my CompTIA Network+, then MCITP, which will be the really hard one. After that, I think I go back to LPI, but for Level 2. Posted in: linux , lpi

LPI 102 Exam notes: EXAM TOMORROW (Punkadyne Labs (Punkwalrus))

Man, I am so brain dead. First, I have a cold. I got sick from the hospital visit yesterday, which happens a lot when I visit hospitals. I get cold chills, then get some kind of virus or bacterial infection. So far, this hasn't been TOO bad, but it's annoying when I am trying to study.

I didn't make too many LJ notes this pass because I knew a lot of stuff already. I also didn't have as much time to study as I wanted. When I pass this, I will be a genuine Certified Level 1 Linux Professional by the Linux Professional Institute. Level 1 means I get Magic Missile and Tenser's Floating Disk. [snort]

I am nervous as hell... again. One last bit of "type to remember." I got too used to subnet calculators. I wrote this page years ago, recently updated it, but I forgot one vital piece of information: you are given an IP and subnet mask: how do you find out the network and broadcast address?

There's nothing special about this, it's done all the time. Let's take this example.

192.168.3.14/29

That's a class C address, as you would know because it's over 191 for the first octet. You know /29 is really:

Slash mask: 2526 2728 2930
Increment: 12864 3216 84
255.255.255...: .128.192 .224.240 .248.252


So we know the network is in increments of 8.

192.168.3.0
192.168.3.8
192.168.3.16

We know its #2 in this list because it's less than 16. So in this case we know the network is 192.168.3.8, the broadcast address is 192.168.3.15 (one less than 16). Posted in: linux , lpi
September 12

LPI 102 Exam notes: 14 days until the exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
Booting a Linux system

One final thing about kernels: if you need to pass options to the kernel itself, this has to be done on the kernel command line in LILO or GRUB. Modular options are contained in:

/etc/modules.conf for Linux 2.4.x systems
/etc/modprobe.conf or /etc/modprobe.d/* for Linux 2.6.x systems

You can see kernel boot messages via the command "dmesg," but if your system has been up for a while, the boot messages get lost because dmesg has a finite limit. Some distros will dump it to /var/log/boot.log or something so you will always have a copy of messages fom the more recent boot. But not always, so you may want to put it in /etc/rc.local as the last thing to execute.

All system logs are kept in /var/log, the most famous of which is /var/log/messages. You should read one for a while. Go ahead, I'll wait. There is also secure, which has login messages, mail.log, which has your mail logs, and a lot of other applications also put their log messages here.

Run Levels
When Linux boot, there's various "run levels" to tell the initialized services when to run.

0 - Halt the system. Dead stop.
1 - "Single user mode," which is the most basic bare minimum needed to have a working system. No networking or services run. This can also be stated by "s" or "S" for single. You can only access the system via console/keyboard, obviously.
2 - Most basic multiuser. This is the default non-GUI for Debian, and Red hat it does not have NFS avialble
3 - Default multiuser for Red Hat based systems, non-GUI. Debian does not use this runlevel, typically.
4 - Typically unused by anybody.
5 - For Red Hat, this is like runlevel 3, but with GUI enabled.
6 - Reboot the system.

Obviously, don't use init 0 or 6 for default runlevels, or your system will shut down or reboot continuiosly on booting. Doh! Runlevels are set in /etc/inittab:

id:3:initdefault:

In this case, this is runlevel 3 on a headless box where video would be pointless.

To change the init runlevel from root is easy:

init 6

Is the same as "reboot." Older users may use "telinit" but these days, it's just a link to "init".

The command runlevel will show you the previous runlevel followed by the current one. "3 5" will tell you that you were in level 3, but went to 5. "N 3" means nothing was before (like the machine turned on) and you are currently in runlevel 3.

Okay, here's a good thing to know: suppose you have a system where you need the root password because the admin has a heart attack from too many cases of BAWLS and Cheetos, and you need into the system. Reboot it to single mode (init 1) and then type "passwd" at the root prompt. Now, most distros will let you do this, but some are more stubborn and you'll get a root login/password prompt anyway. There are ways around this too.

If you are already at the prompt (on the console, not over network), simply type "init 1" and there you go. But that never happens, right? If you were at the prompt, you probably don't need the password.

If you have LILO, it's pretty simple. When you boot, at the prompt, type:

boot: linux single

In some systems, "boot" is "LILO" instead.

But GRUB is a little more difficult. From the boot menu:

1. Highlight the kernel you wish to boot into, and hit "e" on the keyboard
2. This will bring you to the various boot lines. Select the one that starts with "kernel" and hit "e" again
3. At the end of the line, hit space, and type either single or 1
4. Some systems are locked down harder than that. If this is the case, go to the end of that line, hit space, and type single init=/bin/bash
5. Hit enter and then type "b" for boot

This will come in handy. Write it down somewhere. One day, it will save your ass, and will do so more than once.

When the init process boots, the run levels themselves are kind of arbitrary without some listing of what to do with each setp. This is accomplished by "rc" scripts in the /etc directory.

The scripts for running thing, usually services and prep work, are in the directory /etc/init.d/

The file "/etc/rc" is a script that changes the runlevels. There's a series of 7 directories after that, labeled /etc/rc.0/ through /etc/rc6.d/ (which will be hereby called /etc/rcX.d/ to refer to them all. These contain only symbolic links to scripts in /etc/init.d/ as shown here for my CentOS /etc/rc3.d/ directory (only the middle, there's a lot here):

[... stuff]
lrwxrwxrwx 1 root root 19 Mar 16 15:20 K92ip6tables -> ../init.d/ip6tables
lrwxrwxrwx 1 root root 15 Mar 16 15:28 K95kudzu -> ../init.d/kudzu
lrwxrwxrwx 1 root root 25 Mar 16 13:21 K99readahead_later -> ../init.d/readahead_later
lrwxrwxrwx 1 root root 23 Mar 16 13:20 S00microcode_ctl -> ../init.d/microcode_ctl
lrwxrwxrwx 1 root root 22 Jul 1 10:01 S02lvm2-monitor -> ../init.d/lvm2-monitor
lrwxrwxrwx 1 root root 25 Mar 16 13:21 S04readahead_early -> ../init.d/readahead_early
lrwxrwxrwx 1 root root 18 Mar 16 13:05 S06cpuspeed -> ../init.d/cpuspeed
[... more stuff]

Those that start with "S" stands for "start" and those with "K" are "kill." The number specify what order they need to be run. Most of the time, "kill"
just ensures a service installed will NOT run, except for init 0, 1, and 6, where most of them will kill anything running to go into single user or halt/reboot.

There are various other ones to look at:

Red Hat like distros:
/etc/rc.sysinit is the first thing run. You should leave this alone, because many upgrades will replace this script, and then what will you do, Mr. Smartypants?
/etc/rc.local is the last thing run. This is kind of like a "Startup" folder for various programs you want to run after the system has finished booting. This is not replaced by any upgrade.

Debian-esque distros:
/etc/init.d/rcS is the first thing run
There is no "rc.local" for Debian, but those who need it will create it in /etc/init.d/rc.local, and then create symbolic links in /etc/rcX.d/S99local

To run a service by hand, most of the time, a good program will have put itself in the init.d directory with BASIC "start | stop" options. For instance:

/etc/init.d/httpd start

Will start the Apache web server. I mean, if you didn't have it set to run at boot. But httpd has super options, like "reload" or "restart." Many other scripts aren't as snazzy, so you usually can find out what it supports by running just the script:

# /etc/init.d/httpd
Usage: httpd {start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}


Red Hat distros went one further with making this shit simple:

The command chkconfig will add/remove services from runlevels. It defaults to 3 and 5, but you can specify on the command line.

service "whatever" is a shortcut for /etc/init.d/whatever, but it has to be added as a service via chkconfig.

See the man pages for details on these two commands, I don't think this is on the LPI, but it's nifty anyway. I think it can be added to Debian via a package.

Last but not least is "shutdown" and all its options. Some of the more common ones are:

shutdown -r now [reboot now]
shutdown -r +5 ATTENTION - Rebooting system in 5 minutes [Reboot in 5 minutes after you send a message to all logged in users]
shutdown -h 00:05 [halt/shut down at 5 min past midnight]
shutdown -c Sorry, false alarm [cancel shut down in progress with message to all logged in users]

See the man page for more goodies.

There are other commands to do this, like halt, reboot, and poweroff. If these are called in run level 1-5, they call shutdown instead. In run levels 1 and 6, they have other options for repair, like syncing dists, not writing to wtmp, shut off things in a certain order, and so on. See the man pages for those things.

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrible idea. Please read this entry with a healthy amount of skepticism, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: linux , lpi
September 5

LPI 102 Exam notes: 21 days until the exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
LILO and GRUB

It's pronounced "LIL-LO," by the way, because it stands for LInux LOader. I think everyone calls it "GRUB" like the bug, but I am sure the guy who did our Virtuozzo training who pronounced it "Lee-NUX" and "SEN-toss" would call it "GEE-RUB" or "GROO-BEE" GRUB stands for "GRand Unified Bootloader," for those keeping score.

Almost no one uses LILO these days. But you have to know it for the LPI, so I will cover it here. Well, the first part of that statement may not be true, because I have to use LILO on this one box I have where the IDE channel is messed up (it was a prototype motherboard). I could install CentOS, but it wouldn't boot. If I booted it from a rescue CD and installed LILO as a package, then it worked. So maybe that will happen to you if you have some weird-assed hardware.

So. LILO. There are two things you need to know about LILO. The first is that the config file is in the /etc directory as /etc/lilo.conf. It's a fun little text file with NAZI-like rules. The basic lines for a kernel are simple:

image=/boot/vmlinuz-custom-kernel-U-made
label=MyCustomKernel
root=/dev/sda
read-only


Now, if you are the clever sort, you might suddenly wonder, "How can it read fron an /etc directory at boot when /etc won't be mounted yet?" Yeah, see that's the thing, isn't it? So we have to do a very important, usually forgotten step 2, which is to run the command "lilo" which is usually in /sbin/lilo. Otherwise, you'll boot and not see your kernel listed for selection. Shows you! So remember that adding a kernel in LILO requires TWO STEPS:

1. Edit /etc/lilo.conf
2. Run lilo

LILO is pretty simple, but not very flexible. Oh, sure, there are lots of options you can put in lilo.conf, but that whole two step shenanigans started some people thinking there was a better way. And so they came up with GRUB.

Now, the study guide I have barely covers GRUB for the 102, but the online test I took asked GRUB questions, and I got no LILO/GRUB questions at all during the 101. The LPI specs are a little vague, so I will cover some of the basics here.

GRUB, in its standard vanilla form, has a config file in /boot/grub/menu.lst which has all the options. Debian, for instance, puts it here. However, all Red Hat based distros puts it in /boot/grub/grub.conf and in addition, has a symbolic link /etc/grub.conf for those who were used tio LILO back in the day. Not knowing this during a repair crisis will fuck you up. So remember:

Default install on most distros: /boot/grub/menu.list
RedHat, CentOS, Fedora distros: /boot/grub/grub.conf and a link in /etc/grub.conf

Same file, different name.

GRUB is a lot more flexible, has a rescue shell, and can display graphics at boot time. As far as installing a new kernel, it's about the same, but there are more options available. But since this study guide really only goes to how to add a kernel, I won't go through install stuff.

GRUB thinks of hard drives as items in /boot/grub/device.map, which can be checked if you find you're booting off the wrong drive. It doesn't care about IDE or SCSI, either. GENERALLY, it will map to IDE then SCSI, but it looks at devices a little more differently. The GRUB device maps look like this:

(hd0) /dev/cciss/c0d0

In this case, the first hard drive is a SCSI card. It could also be:

(hd0) /dev/hda

The first IDE device.

GRUB looks are devices in it own order, and follow the pattern hdx,n where x= device, and n=partiton. Unlike devices in /dev, which start at 1, GRUB starts at 0. So:

hd0,0 = first partition on the first drive
hd0,2 = third partition on the first drive
hd1,1 = second partition on the second drive

Sometimes this confuses those used to thinking of those as /dev/hda1, hda3, and hdb2. A grub.conf kernel entry will look like this:
title CentOS (2.6.18-92.1.10.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-92.1.10.el5 ro root=LABEL=/
        initrd /initrd-2.6.18-92.1.10.el5.img

title is what it will be labeled on the menu on boot. Make it as desriptive as possible, yet remain brief. "Cust 2.6.13 Kernel w/new expr SCSI controller" or something.

root is the root partition (in this case, the first partition on the first drive). This will be /boot in most cases.

kernel this is the new kernel you compiled, with the path relative to /boot. Don't make the mistake pf putting it like /boot/vmzlinuz-blah because then GRUB will look for it in /boot/boot/vlinuz-blah, and fail. You add your kernel options here, too. The "ro" causes the kernel to mount the drive "read-only" initially; later the drive will be remounted read/write. This is generally done so fsck can run on / at bootup. "root" tells line in the fstab that will be your root partition to start from once the kernel has booted. There are a LOT more options available here. I set my vga=791 so that my console text is not as huge and chunky.

initrd is "initial RAM disk." It's generally used for loading modules required to initialize your root filesystem. If you have these modules compiled directly into the kernel then it's not necessary to have one, but you need to change references to LABEL= in your /etc/fstab and /boot/grub.conf to the actual devices. Some people debate whether it's necessary these days, but it's added by default in many cases.

But make sure you save the entry (and files in /boot) of your OLD kernel in case your new kernel shits the bed. Manm, some people do "rpm -u" (upgrade) with new kernels on Red Hat instead of "rpm -i" (install) and then it dies, and they don't have an old kernel.

Don't be that guy.

So now, that wasn't so hard, was it?

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrible idea. Please read this entry with a healthy amount of skepticism, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: bootloader , grub , lilo , linux , lpi
September 3

LPI 102 Exam notes: 23 days until the exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
I scheduled my next LPI exam for the 26th. After I pass this exam, I will be LPI Level 1 certified, which I think means I get +1 against saving throws, more Magic Missiles, and the spell Tenser's Floating Disk.

I looked over what was going to be my tasks for the next part of the exam a few days ago. Holy cow, ran right into rebuilding the kernel from the start! In all honesty, this is not hard, I have done it many times before.

THANK YOU, GENTOO!

Again, Gentoo and LFS have proven their worth beyond a kind of "gee whiz" nerd factor in my life. Add to that: basic networking stuff, crontab mojo, printing, booting, Apache, NFS, DNS, SSH, and some base issues with Linux security. That's pretty intense. In fact, a lot of this stuff is intense for someone who decided to take the test fresh off the turnip truck. I only have confidence I can study because I have been doing this for so long.

I have taken a practice exam, and scored a 60.61% (again, 70% or higher is passing), which is a good baseline from nothing, I think! I know about half this stuff already, but I still have to make sure I know all the facets. This will be harder than the previous exam.

Am I nervous already? Yeah. But I felt so good passing this one time, I want to feel that way again. And this time, it will be a full certification I can put on resumes (right now I can only say, "working to my LPI Level 1").

Some nifty stuff about the Linux Kernel
The kernel is the core software that manages hardware, like CPU, memory, peripherals, and process scheduling. It is the interface for programs to to indirectly access the hardware. This is why it's so stable most of the time and allows the system to be a true multiuser system. The software can crash, but the kernel will still keep going. Of course, if you have no way to interface the kernel, you're still up shit pulsar without a gravity generator. Sometimes this happens, but it's rare.

Windows has kernel32, but it doesn't have such a hard line between the hardware and the user, which is why it crashes more. But this does make it faster for intensive processes, like having a GUI. Sadly, what it gains in that way, it often loses again when it comes to the "monolithic" structure. Windows has to assume that you could be running any hardware at any time.

Linux can also be "monolithic," but unlike Windows, it doesn't have to be. Being monolithic is a safe "default" if Linux doesn't know what hardware will be set up on the system. A lot of "EZ-U-Install" kernels are like this, from Red Hat to Ubuntu. BUT... suppose you want to trim down the kernel for speed and resources. This is the true strength behind Linux, and is why it can be run on so many types of machines: you can run it modular. Being modular means you don't run anything you don't need, and it becomes very, very flexible.

Linux modular files are "objects," which is why the modules end with ".o" (apparently ".ko" in 2.6 kernels) and are compiled, but not necessarily linked unless you specify it to be. Most modules are distributed with the kernel and compiled along with it. But they are very closely related, so each kernel has its separate set of modules to prevent module-A from screwing up kernel-B.

Modules are stores in /lib/modules/$kernel.version, where $kernel.version would be something you can get from a "uname -r" command, like 2.6.8-10. Then it is further divided into sub directories. Here's an example from my home box:

[punkie@pippi ~]$ ls -l /lib/modules/2.6.18-92.1.6.el5.centos.plus/kernel/
total 28
drwxr-xr-x 3 root root 4096 Jul 1 10:02 arch
drwxr-xr-x 2 root root 4096 Jul 1 10:02 crypto
drwxr-xr-x 38 root root 4096 Jul 1 10:02 drivers
drwxr-xr-x 34 root root 4096 Jul 1 10:02 fs
drwxr-xr-x 4 root root 4096 Jul 1 10:02 lib
drwxr-xr-x 24 root root 4096 Jul 1 10:02 net
drwxr-xr-x 9 root root 4096 Jul 1 10:02 sound


lsmod will list what modules are loaded (same with cat /proc/modules) in the order of module, size, use count, and what is using it.

insmod will "insert" a module into the running kernel. If it hasn't been loaded, it will be now. Just make sure you have it. Sometimes, you have to insert a supporting module before you can insert the module you want.

rmmod removes the module. Again, make sure there's nothing dependent on it.

modinfo will tell you about the module. Options to remember are -a for author, -d for description, and -p for parameters.

modpropbe is like insmod on steroids. It's a wrapper around insmod, but will load all the prerequisite modules as well. In addition, it has a lot more fun options:

-a will load all modules, and when used with -t, will load all modules of one type
-c displays a complete module configuration, including stuff from modules.conf
-l lists modules, can be combined with -t
-r remove modules (on steroids)
-s send to syslog instead of STOUT
-t with listed module type will load all modules in that directory until a match is found, or it runs out of modules to try. This is useful for probing hardware.
-v verbose mode

The LPI stuff I have lists lines for /etc/modules.conf, but most of my systems have /etc/modprobe.conf or /etc/modprobe.d/[conf files]. This may be CentOS specific, or maybe kernel 2.4 specific. It seems to be modeules.conf on my Red Hat boxes with 2.45 at work, so I am going to go with 2.4 specific.

I need to learn what all those lines mean.

/lib/modules/$kernel.verson/modules.dep shows the dependencies that need to be automatically loaded. Having a bad one, or an outdated one, is a very bad thing.

The next entry, we'll show you HOW to compile a Linux kernel. If you already know how to do this, I'd suggest you tell everyone in your company what a PITA this is, how ong it takes, demand an electric slide rule, and a pony. If you don't know how to do this, don't worry, it's a lot simpler than it sounds.

AS LONG AS YOU DON'T SCREW UP!!!

Just kidding.

OR AM I????

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrible idea. Please read this entry with a healthy amount of skepticim, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: linux , lpi
September 1

The 3-day weekend so far... (Punkadyne Labs (Punkwalrus))

I am still happy I passed that exam. SRSLY. We had sushi afterward to celebrate.

Brickfair 2008Saturday I went out with [info]lohquesse and [info]moliarity to Brickfair 2008, and let me say that while I was sort of expecting a kind of small, 100-200 TCEP crowd, I was amazed not only that there were quite possibly a thousand or more people there, but some of the demonstrations of skill were AMAZING. Seriously, at $10/head, it was a bargain. In the back of my head were tons of whiners about "specialized pieces," which I always said, "A creative mind does not depend on the medium." Well, this Saturday I had PROOF, because so many builders used "specialized pieces" to do things with Lego bricks that were absolutely incredible and amazing. In fact, it occurred to me that many people who whine about "specialized pieces" never do anything with their "regular blocks," and so they can all suck it. I saw TALENT, and best of all, KID talent. The kind of kid talent you don't get by sending your child to gymnastic meets 4-5 times a week. The kind of talent that only the artistic mind could do. And they competed with adults. If you have a couple of minutes, and want to see raw talent in the art medium of Lego building blocks, check out my Flickr set.

Sunday I hung out with [info]stodgycat, [info]aksident, Rob, and later [info]cyaneyed. Most of us played "The Order of the Stick." I got to meet a guy named Michael. Scarlet helped me pick out some Halloween treats for this year. Posted in: brickfair , heares , lego , lpi
August 29

"All jokes aside, yeah you do got a tiny cock!" (Punkadyne Labs (Punkwalrus))

Anyway, why the funny title? Well, I got spam in my inbox today that said that, and I thought it was coincidental that I just wrung my hands in glee over the Fall of the Enzite Bandit in a previous entry.

So, I have mixed news. The big major news of the days is I PASSED! Yay! Thanks to all those well wishers, I couldn't have done it without you. So today is officially a GOOD day! Also, I get to see the DC Rollergirls next Sunday in Dulles with Scarlet AND [info]takayla, so that will be cool... anyone else coming? Sept 6th at Dulles Expo Center. I got my iPhone case, which I had been waiting for, and now I can have my iPhone clipped to my belt. So far, I like it.

The next is kind of a bummer, BUT, I am NOT taking it personally. I will NOT be doing Opening Ceremonies for Katsucon. No, I was not fired, but they have a different con chair and programming director, and they thought the OC needed something more spruced up, which has been my goal for a long time. Sadly, they don't want me as Emcee. This may be an end of an era for me, since I have been doing stagework at cons since the early 1990s, and now I have no gig! I used to do Prune Bran, Strange Tea, Rocky Horror, art show auctioneer, cosplay halftime show, emcee for OC for both FanTek and Katsucon,as well as lots and lots of panels. Oh no! What will I do now at Katsucon? Relax? Hardly, I am doing staff suite grunt work, so I have some gig. I have been offered an "alumni" badge for quite some time now, but I currently feel kind of bad riding on Katsucon's dime and not doing any volunteer work (but may take them up on it years from now). I feel sad this has ended, and I will miss my audience, but it's less work, and I can focus on other things. This golden ride had to end someday, and I am grateful for the time I had. I wish Nick (the new programming head) the very best in the hard work ahead. Posted in: dcrollergirls , iphone , katsucon , lpi , oc , spam
August 28

On exams and iPhones (Punkadyne Labs (Punkwalrus))

I sort of did a work from home thing for tomorrow because of the exam. I was paranoid that Metro would stop running (it often does at the worst times), and I can get a little more sleep in this way. [info]takayla has a neurologist appointment anyway, based on her latest medical issues, and I can go with her.

I am really nervous about the exam. Nervous meaning I feel out of control whether I pass or not. Part of me thinks that they quiz you more on stuff that a little too specific than a general overview of what you know. I am a Linux admin, pass or no, and I don't have daily problems or frustrations like I do with Windows (and even that is less and less with added experience).

Please, please send me some good brain vibes. I really don't want to pay another $158 to take this again (work only reimburses me if I pass).

I finally got my f*&%$!ing AT&T; voicemail set up. Sadly, their support pages were next to useless because they assumed I had a RAZR or something. "To access your voicemail, go to voicemail, and hit 1." Yeah, that did a whole lot of nothing. Here's what worked:

1. Dial your own phone number from your cell phone.
2. Follow the prompts.

I found that out from a non-AT&T; forum.

I still like the phone a lot. The 3G network sucks terribly to the point of being unreliable more than half the time. While most of the time it's like half a bar, the random times it has a lot of bars, it will still have a hit or miss connectivity. I switched to EDGE, so I can text and do voice with it reliably, and that connection/receptions good enough for me. It's clearer than my RAZR, at any rate. And I have optimism that these problems will eventually go away as AT&T; matures the network, and Apple fixes their firmware.

Another drawback is something I guessed might happen, and that's the ringer and vibration are too slight to hear or feel most of the time. I chose a piercing "old style telephone ring" for a ringtone, but I can only hear it when its in a quiet room and near me. Before this sounds like a rag on the iPhone, keep in mind I am slowly going deaf because of a hereditary nerve deafness. I had this problem with the RAZR, too.

Some things I immediately liked are the maps. It may not give turn-by-turn like some nicer 3G phones, but I don't drive yet. If I really need one for driving, I'll buy a Tom Tom or something. One free application I have really enjoyed is the "Wikipanion." No longer will I have to remember to look something up, I can do it on the spot. I also spent 99 cents for a Koi pond, wich has been cool. Posted in: iphone , lpi
August 27

I hate exams (Punkadyne Labs (Punkwalrus))

I have been taking practice tests in preparation for the LPI exam and failed EVERY. SINGLE. ONE.

The score is always the same, too, from 65-67% (70% or greater is passing).

FUCK!

The worst part is, most practice exams don't give you the right answer. So who knows what I think I know but actually don't. I knew I never went to college for a reason, :(

Yes, I am taking practice tests that give you the answer. I fail those, too. Somehow, it likes to target at least 5% of the stuff I don't know and magnifies it to 1/3rd of the test like a fucking magnet.

Man, I am pissed off. Posted in: linux , lpi
August 26

LPI 101 Exam notes: 3 days to exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
Man, I am in the home stretch. I am so close to this exam, I can feel it breathing down my neck.

All my life, all I ever had for a Linux system was either I was admin, or admin and sole owner of the box. /home was almost always a separate partition, and when my users used up too much space, I just deleted stuff. Even back in the days when I had 1.2gb drives, I usually ran out of space in /var because of some runaway mail spooling or apache logs. But Linux has had the ability to mange user quotes all along... just click my ruby slippers...

First, you have to set quotas on the disk using fstab (Fle system table), like so:

/dev/hda4  /home  ext3  defaults,usrquota,grpquota 1 2


Then you have to create TWO files:

/home/quota.user
/home/quota.group

chmod both to 600 so they are only r/w by owner (root)

Run quotacheck -auvg and wait for it to build those two databases above. Then run quotaon -a to turn on the disk quota (that is, enforce it). Then you have to mkake sure that at boot, the policy is still enforced in rc.sysint or something else in the /etc/init.d directory.

Then, for good measure, put in the quotacheck command in a weekly run script to check on user quotas.

So now what? Well, you have four options: group soft and hard limits, and user soft and hard limits.

Soft limits are warnings you are about to reach the hard limit, so you should have the soft limts be lower than the hard ones, obviously. It has a Grace Period.

Hard limits are the end of the road, budyy. No more inodes or disk space for yuo! This is a 1.2gb hard drive for over 50 students! SEIG HEIL!

The grace period is the time during which the soft limit may be exceeded. The grace period can be expressed in seconds, minutes, hours, days, weeks, or months, giving the system administrator a great deal of freedom in determining how much time to give users to get their disk usage below their soft limit.

quota -u user_id will show you the user quotas
quota -q will show you who's over the limit

edquota -u user_id will launch vi to edit the quotas for the user, mien fuhrer.
edquota -t will launch vi to edit the grace period
edquota -g group_ID will launch vi to edit the quotas for the group (duh)

repquota produces a summarized quota information for a file system. Here is a sample output repquota gives:
# repquota -a 
                                Block limits               File limits 
        User            used    soft    hard  grace    used  soft  hard  grace 
        root      --  175419       0       0          14679     0     0 
        bin       --   18000       0       0            735     0     0 
        uucp      --     729       0       0             23     0     0 
        man       --      57       0       0             10     0     0 
        user1     --   13046   15360   19200            806  1500  2250 
        user2     --    2838    5120    6400            377  1000  1500


Zat ees not FUNNI!

quotaoff -av turns off quotas, which you may need from time to time if things get stuck or you get sick of the whole NAZI mess.

Oh, crap, I enacted Godwin's Law. This post has to end now, and I lost the entry.

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrible idea. Please read this entry with a healthy amount of skepticim, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: linux , lpi
August 25

More on training (Punkadyne Labs (Punkwalrus))

It looks like I will be doing more of the LPI track than the Linux+ track. My boss wants me to focus progress on the MCITP and Network+ side of things by the end of the year, so it was discussed (not decided) to drop the Linux+ until possibly next year since "it's really only a basic Linux cert anyway in comparison to the LPI track."

I am really nervous about the exam. I am nervous because in the practice tests, I get wrong answers because I misread the question. This sucks donkey waffles. It's like I know the material, I just test poorly. That CCNA whipped my ass 8 years ago. I remember reading the questions, and they didn't make any sense compared to what I just studied. It was like a nightmare. The fact I got 60-65% was not "better than nothing" because I didn't get the cert.

The RHCE wasn't so bad because at least you can figure out what you did wrong as you are setting stuff up. Not so much with multiple choice/fill in the blanks.

This was the total opposite of what I experience back in school: I never did the homework, but I aced tests. Arg... :( Posted in: linux , lpi , mcitp , training , work

LPI 101 Exam notes: 4 days to exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
I did a shitload of studying over the weekend. I had to stop because my head hurt. I got made because my dyslexia, which I made peace with once I got out of high school, has reminded me of why it was probably a good idea I never went back to school. Things will stick to my brain like throwing spaghetti on a wall. Some stick, others slide off no matter what I do.

Oh, how I will ramble.

Some new stuff I sort of "learned" follows. While I sort of understood these concepts, I had a lot of problems remembering what order anything was. I had to develop some mnemonics to try and remember them for the test.

ln, the link feature. It's

ln [-s] original_file link_name, like

ln -s lancelot link

(secret chimp... duh nuh nuuuuh...)

Damn, I hated that show! But Link comes second after Lancelot, so hopefully, I'll remember this. For mount, I have to thing "DM for "Dungeon master" for "Device then mount" like

mount /dev/hda6 /var

The rest I know, like -t iso9660 for loop devices, -t nfs for NFS mounts, and so on. I use the stuff all the time, but I always forget the order! Hopefully, these will help.

Next, I had to get the file permissions nailed down. Again, I got confused on order. Like It's User, Group, Other. I'd get "o" confused with "owner," which sucks. So I am trying "UG Other," so I remember "o" stands for "other." You'd think "Well, if 'u' means "user' then... " No. Because when I had a command like:

chown o+x filename

I'd think it mean, "Make the file executable by owner." I also got the order of stuff mixed up in my dyslexic brain. UGO will help (it's like UFO), but to remember "other" will be hard. Why, brain, why? OTHER OTHER OTHER!!! [sigh]

I am grateful that when I started in the UNIX days back in 1989/1990, I was told how to do everything by octal numbers, like:

chmod 755 perl_script.cgi

It was funny, I never thought of these as "octal," just "uses the numbers 0, 1, 2 and 4 in any combination to get 0-7." I just assumed we didn't use 8-9 because... well, I never thought that far. But yes, 0-7 is octal. So if you add 1 to 7, you get 10 (in octal). I bet this messes with those kids who went to school after the removed the "new math" curriculum in school (which happened around the time I went to school, so I got a combination of the old "new math" and the new "what the hell were we smoking in the 1960s to teach kids math this way?"... but I digress...)

So, with the octal numbers, you have 4 modes (like an IP address has 4 octets). Each of these access mode bits represents Special, User, Group, Other.

The new stuff (for me) was the "hidden" (for me) first three access mode bits, the SUID, the SGID, and the "sticky bit." I knew about the "sticky bit" because it was in the RHCE exam, and I thought, "OooOOooh how clever." Then never used it and promptly forgot it. I don't know if it was around when I started UNIX, I only remember the 3 octal access modes, and not the one before it. I supposed it existed back then, and I was never taught to use it.

SUID only works on executable files (not directories) and SETS the USER ID of the process run to the file OWNER (who may be different from the schmuck who launched it). Let's say you have a file owned by root, like passwd, but accessible to anyone, like passwd. Joeuser launches the executable, like passwd, but since the file, like passwd, is owned by root, the process launches AS root (not as joeuser, who would get a permission error otherwise), which you need for certain programs to give them root access, like passwd. This is great! Except when it's not, and joeuser is a hacker, and you have some other executable that will run AS root, no matter who launches it, and then joeuser starts his tomfoolery.

SGID is the same thing for an executable, but for groups. In addition, setting the directory SGID will do something really nifty: new files created in that directory will be assigned to the group ownership of the directory itself.

And then there's "the sticky but," as it's called, used to be run only on executables. But nowadays, it's most commonly used for protection of files. When it's set by the user, the only users who can delete or rename the files are the user themselves, the directory owner, and root of course. This allows a team of people to create and modify files, but only the owner can remove/ranme them (which is kind of the same thing, when you look at it).

The rest I knew. Back in the day, we did a lot of "chmod 755" stuff, which makes the file fully accessible by the user, but only readable and executable by everyone else. The order of this is

RWX, the Rude Walrus Exchange (hah, I kill me)

So you have this neat octet code. I remember when Allon first explained this to me, and how you could get any number from 0 to 7 with just four numbers. I spent a day and 3 hours thinking how nifty this was, and how it all tied in.

4 = read
2 = write
1 = execute
0 = nothing

In UNIX, this 755 is also rwx-r-xr-x

In addition, there's a "umask," which like a netmask, is a sort of filter when files are created by the current user in the current shell. The default umask is 0002, which leaves your files clean and minty fresh as 7775 (in some distros, it's 0022, so that would be 7755, check by typing umask)

chmod = change mode (the access modes)
chown = change owner
chgrp = change group

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrible idea. Please read this entry with a healthy amount of skepticim, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: linux , lpi
August 11

Man... I gotta study hard (Punkadyne Labs (Punkwalrus))

This is gonna be one big year for my edjumacation. Here's what's on my docket to learn and pass by May of next year:

LPI 101: Exam Aug 29th
LPI 102: Hopefully an exam by mid-Sept (if I pass both, I am LPI Level 1 certified)
Network+: Exam around mid-Oct
Linux+: Exam around mid-Nov
MCITP: Server Administrator by Christmas (3 exams)
LPI 201 & 202: by February (to get LPI Level 2 certs)
RHCE: Re-cert for Red Hat (mine will expire) Dine by April
LPI 301: Done by May/June (to get LPI Level 3 certs)

I'll be certified to install Windows or Linux on a dead badger by then. Posted in: linux , lpi , mcitp

LPI 101 Exam notes: 18 days to exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
Ugh, I forgot my book at home. But that's okay, because Cailin provided me with links to her web site and some notes he made. It's not in the order the book was, but I know kind of where I left off.

Regular expressions. You know, I use these a lot, but mostly for globbing (the ubiquitous *). Once in a while, in Perl, I use the "RegEx" set to make decisions. But I don't have a lot of stuff committed to memory, and especially not BASH, because when I do RegEx, I usually do it in Perl, but in either case, I often just look up what I need, cut and paste, and then forget it. This is why I am still a low-class programmer. I have issues with ever basic commands. I always get the caret (^) mixed up, for instance:

^n - matches start of string that begins with n
[^n] - matches any string NOT containing just n

The first part works, the next one does not work like I expect. I keep thinking it's going to work like "grep -v" but it doesn't. I think it's a "complete line" thing. I did a lot of testing with this stupid thing, and made a file containing 3 lines:

ABC
abc
xyz


If I did an egrep ^A I got just the 1st line, which is what I expected. If I did an egrep [^A], all 3 lines showed up. I expected the 1st line not to. But I think the [^A] means "the whole line," because when I added a 4th line that simply said "A", it didn't show up in either egrep. And to prove this theory, I did egrep [^ABC], and to my surprise, neither the 1st OR 4th lines showed up! In addition, a egrep [^CBA] had the same result. So I am just not "getting" this at all. Is is an "both and/or" situation, like a "super-and?" I added a 5th line, and made it simply "B." egrep [^CBA] excluded it, but egrep [^BA] showed the 1st line, "ABC" which seems to support my theory of "super-and."

This needs more meditation for my teeny, teeny brain.

__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrikle idea. Please read this entry with a healthy amount of skepticim, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: linux , lpi
August 9

LPI 101 Exam notes: 21 days to exam (Punkadyne Labs (Punkwalrus))

Since I goof off and LJ so much, I have decided to hijack the process and write my study notes and thoughts. But they are probably totally boring for those not interested in Linux. These notes may be very long and disjointed, so... I put them...

For those interested, think there needs to be corrections, have neat trivia, or have some things to say: COMMENTS ARE ENCOURAGED!!!
___________
So, where was I? You know, I never realized the man command has so much junk around it. I was curious why sometimes they had entries like, "See also smb.conf(8)." What does the "8" stand for? Oh, they are sections! Hah, cool.

I have already spent a few chapters of my main study guide as of this entry, filling in the gaps of my hardware knowledge, notably SCSI and USB.

Now I am learning all the stuff about the bash shell I should have known for these last few years. My first shell was csh, way before bsh, and then bash. I knew that $PS1 was the prompt, but I should type it to remember it. The command export SOMEVAR will make SOMEVAR an environmental variable. I have never needed this, because I mostly work with scripts that are in one shell, but it's nice to know.

There's a note that your last session is the one to write your history to ~/.bash_history. Man, there' also a good list here of commands that WOULD come in useful. Like:

!! - redo last command
!n - redo command n from history. I knew this, but I have never needed it because when I do "history," I just cut and paste from the terminal window.
!-n - Redo command of the last command, minus n. Again, see above.
!string - Redo command that starts with string
!?string - Redo command that contains with string

I think I shall use !?, !string, and !?string more now. Thanks LPI! This is exactly why I wanted to take this exam!

Bash also does Emacs bindings, but I never did Emacs because when given a choice between Emacs and vi, I chose vi because it was on EVERYTHING back in the day, and Emacs was considered a huge memory hog. Note to self: learn Emacs.

The "META" key on a PC keyboard is really the "ALT" key

[Control] + rstring is a handy search thing for a previous command. OooOOooh...

I knew about cut where -d is delimiter and -f is field, head, tail, and nl (number line), but I didn't know about:

expand, which converts tabs to spaces (handy). I has an opposite called unexpand
fmt, which manipulates paragraphs and text width.
od, dumps files in octal and other formats
join, which will join (text) files at various points
split, splits a (text) file into various parts
paste, pastes lines, which can have what to paste with (-d). This would be handy in creating e-mail address lists from /etc/passwd and making cvs files.
pr, which can take text and output them in columns with headers and nifty stuff that is lpr-friendly. This is WAY cool. Go play with it. Here's a command to start you off: ls -a | pr -n -h "Files in $(pwd)."
xargs, Okay, I know about and I use this, but barely understand how it works. I have a LOT of problems with -0 and -print0 and all that when dealing with stupid Windows files with spaces.
tee, which takes std output and puts it on the screen AND a file of your choosing
ps, I only ever do ps aux and ps, never anything else. It's far more flexible, like -Uuser for user, -f for tree, -w for wide (don't truncate), and -Ccommand for command
pstree is a lot like ps -f

They go into kill a lot, and I need to hunker down and study this. Sure, I use "kill -9" all the time, but kill can be used for so much more.

kill -HUP 1015 : Hang up process 1015. This used to be for modems, which would then reset and reload the config for the next call. But nowadays, it's more used for services where you just want the process config to be reread

kill -INT 1015 : Interrupt. This is really what's sent with "[control] + C."

kill -KILL 1015 : Infamous "kill -9" which is "terminate with extreme prejudice."

kill -TERM 1015 : Terminate nicely, if possible. Lets a service shut down gracefully.

kill -TSTP 1015 : Terminate and stop process, but leave it ready to go. It "pauses" the process in most cases, like "[control] + Z"

kill -CONT 1015 : Continue process from TSTP, like fg or fb from a [control] + Z

nice I have always had a weak spot for, since I rarely use it these days. The numbers range from -20 to +19 where, from left to right, are more powerful to weaker (it's counter-intuitive, so think of it like old AD&D; Armor class where lower is better). A normal process starts out priority in the dead middle, 0. "Nice" set it to +10, unless you go nice --10 (notice 2 dashes) or nice -n -10, which will set the priority at -10, halfway up the high end of the scale.

renice is best when the program is already running. -u states ALL that users processes. renice -10 -u jdean would set all of jdean's processes to -10 (higher). renice never needs the second dash, BTW.


__________
Disclaimer: While I have been managing Linux systems for almost 10 years now, but I am mostly self-taught. I have a RHCT certification, but I am taking the LPI and CompTIA Linux+ exams to "flesh out" some of the gaps that occur from too much real-world experience versus my lack of good old fashioned book learnin'. This entry in no way assures you my thoughts are correct, I will have frequent misspellings, and they may or may not help you pass the LPI. HUGE parts of the exam will be missing because I already know half of it by heart, so using me as your only study guide is a terrikle idea. Please read this entry with a healthy amount of skepticim, and PLEASE feel free to correct or add comments! My ego is hardy enough to admit when I am wrong. Posted in: linux , lpi
April 6

w00t! Passed my LPIC-102! (Kilala.nl (Cailin Coilleach)) by Cailin Coilleach

Yay! There wasn't much reason for my doubting :) I passed with a 690 score (on a 200-930 scale), which boils down to 87% of 73 questions answered correctly. Not bad... Not bad at all...

Next up: ITIL Foundations!

Posted in: lpi , lpic-102 , study , sysadmin , work