Friday, August 7, 2009

But its not google

Curious to see what would come up, I entered that search term in both google and bing, the results are curious. Have to wonder why no one trusts MS, because they cant do anything without spinning it in a positive light for themselves.

Yes I know I posted this from a windows machine. I'm on lunch at work, I account for 3/4 of my wages for being forced to use windows.

Saturday, June 13, 2009

Automated LVM mounting script

After having had enough of walking people through how to mount a LVM from a LiveCD I finally got eternally tired of if. This script was done entirely in self defense, however as it is meant to be run to rescue an installation that was done on LVM, it might be handy for a few others as well as it boils down to just 4 commands ... OK one of them is a chained command, but whose counting.

Please note, this script needs to be run with root priveledges and was written to run using LVM2.

I hope it helps someone else.

p.s. sorry for the text size, but it was the only way to keep the formatting correct.

#! /bin/bash
## This script is released under the GPL version 2
## copyright (2009) James Cook
## Thanks goes to Klaus Knopper who reminded me of something
## very simple that I had forgotten at the time, thanks bud.
## the author may be contacted at:
## azerthoth (at)

## Check for user is root
## Thanks to micia for the suggestion
if [ $UID -ne 0 ]; then
echo "You need to be root to run this script!"
exit 1
## get them all into /dev/mapper
modprobe dm-mod 2> /dev/null || :
vgscan --ignorelockingfailure --mknodes || :
vgchange -aly --ignorelockingfailure || return 2
mkdir /LVM
cd /dev/mapper
## Create directories and mount
for FILE in *; do
test -b "$FILE" && mkdir /LVM/$FILE && mount /dev/mapper/$FILE /LVM/$FILE 2>/dev/null
## List good partitions
echo "Cleaning up LVMs that were swap partitions or with unsupported"
echo "File Systems from the list. This will not effect those partitions"
echo "There is just no need to list or parse them"
rmdir /LVM/Vol* 2>/dev/null"
echo " "
echo "The following LVM(s) were mounted for you and are ready to use"
echo " "
ls /LVM
echo " "
echo "You can find them in /LVM"

Friday, March 27, 2009

Beta Testers

We all know that pre release projects will have bugs, and for as long as they do we will need people to beta test. Beta testing is rather simple, you push on it until it breaks, then you document what you did or what was not working when you got it. You aren't going to be held accountable for fixing what you find ... just pass it on in a documented and usable form. You may be asked to try a few things to see if it fixes the problem, which means again, you need to know what steps you took that put you in the position that your in, if any.

The other night, and not for the first time mind you, one of the folks from the beta team came wandering in to the support channel looking for assistance. There isn't a thing wrong with that at all. However ... you knew there was a however coming didn't you ... do not assume you know more than the support folks. Face it, if that were the case, you wouldn't need support in the first place. Don't argue or ask why three hundred times when one of the support crew asks you to run a command. We realize that you want to understand why we are doing something, but our time is valuable too, understanding can come later, or it may come moments after you run the command or do what you are asked to do.

Folks, being on the beta team does not abrogate you from the same rules of conduct we expect of anyone else. We expect a little courtesy and a willingness to follow directions so that we can diagnose and hopefully fix your problem (which by the way as a beta tester YOU get to document). If your coming in for support, we do not expect you to be argumentative, we don't ever expect you to be appreciative either, most of us got over that hang up a long time ago. There are some awfully smart folks who volunteer their time to do support. Never assume you know more than they do, because odds are you don't.

So for those beta testers who think that their positions allow them to step outside the bounds of civility when seeking support ... think again. We rightfully expect more from beta testers, not less. Work with us and we will work with you, argue with us and we will ignore you. Argue with us to much and we will remove you from channel, and pass on to the boss that we are having issues with you.

p.s. who am I to make these demands? absolutely nobody. Just one of the folks who spends time doing support or researching and documenting. So you can take what I say with whatever size grain of salt (and/or tequila) that you choose.

Sunday, March 22, 2009

Funtoo too

Well, I spent the weekend getting Funtoo set up and working, well not the whole weekend. I started puttering after dinner on Saturday, grab the base files and such, chroot in and do the kernel. Went to bed while my first pass world update was processing. Got back around to playing with it again after lunch and spent a few hours tinkering.

All done now, or as done as it needs to be for the moment. The urge to add more to it will likely strike many more times. In all though it only took a few hours to get a nice ~amd64 set up going. Very minimal global USE flags, I keep dumping things off to package.use to keep it tight. I'm happy so far, the new system is speedy as I could wish for, no real bells or whistles. Just a Fluxbox desktop and using Slim as the log in GUI. Both being nicely configurable and neither having any of the over the top dependencies that come with KDE/KDM or Gnome/GDM.

Still even with all it's lean mean speed, it's not enough to drag me off of using Sabayon as my primary OS. But I wouldn't be a computer geek if I didn't at least play around a little bit, and if your going to play, I might as well play with something that is designed to kick the crap out of any other distro out there.

Thanks Daniel for both Gentoo and Funtoo, I would never have learned what my computer was really capable of without them.

Sunday, March 1, 2009

Mounting LVM

Mounting an LVM may seem a bit intimidating, it's not. In reality, despite the length of this entry, you will only be running a handful of commands, and most of those just to get the needed information. Do not despair, this will be as painless as possible. All of these commands will be run as root from a terminal. Please also remember that your volume names may differ from the guide, please make sure to adjust accordingly.

# pvs

This should give you an output similar to

sabayonx86 sabayonuser # pvs
PV VG Fmt Attr PSize PFree
/dev/sda2 VolGroup00 lvm2 a- 7.88G 32.00M
If we look closely we can see that /dev/sda2 holds a lvm that is 7.88 gig in size. In this case, thats the one we want, as it is the only one.

So now we want to see what is actually in that lvm

# lvdisplay /dev/VolGroup00

sabayonx86 sabayonuser # lvdisplay /dev/VolGroup00

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID SWp2V0-1xPU-0tOP-UnPs-snxF-THUl-pZMKb2
LV Write Access read/write
LV Status available
# open 0
LV Size 6.88 GB
Current LE 220
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 251:0

--- Logical volume ---
LV Name /dev/VolGroup00/LogVol01
VG Name VolGroup00
LV UUID MGBeJP-ohrX-KLju-5V78-iJOi-pP3w-huaOmC
LV Write Access read/write
LV Status available
# open 0
LV Size 992.00 MB
Current LE 31
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 251:1
We are looking for two things out of that list. LV name and LV Size. We have one that is 6.88 GB and one that is 992 MB. We can safely assume that the smaller of the two is /swap so the larger must be our real filesystem. That one is named /dev/VolGroup00/LogVol00.

So now we have all the information that we need. We need only to make a mount point and actually mount the volume.

# cd /mnt
# mkdir lvm
# vgscan --mknodes
# lvchange -ay /dev/VolGroup00/LogVol00
# mount /dev/VolGroup00/LogVol00 /mnt/lvm

If all went well then can now get inside and look around, make changes, chroot in, or whatever caused us to want to mount the LVM in the first place.

See that wasn't so hard now was it. ~Az

Tuesday, February 24, 2009

Mr. Stallmans Internet

*initially published @*

Once more unto the breach my friends, Richard M. Stallman (RMS) has laid another profound thought process out there for us to digest. This man is definitely worth everyones respect. Whether you agree with him or not, he has given the whole planet gifts that it does not even realize for the most part. While not the creator of the concept that the code for software should be free, he is without a doubt the one who codified the concept. He laid out exactly what it means for software to be free, in such a fashion that even most laymen could understand it. This alone should earn him the respect of the planet, however, it does not stop at that point.

He is tireless in his campaign to right the wrongs he perceives of the modern technological world, from copyright reform to software patents, from speaking out about Darfur to the oppression of civil rights in any form in any country that he becomes aware of. The man is a machine when it comes to doing his level best to improve the situation of all of humanity, everywhere. There is some debate among the Open Source community as to who is more influential RMS or Linus Torvalds. I think Linus puts it well in that he is just an engineer while RMS is the conductor. However, when all the rest of RMS's goals and accomplishments are laid out, it is no stretch of the imagination to place him on the field of history along with Nicola Tesla, the man who invented the 20th and now 21st century, or Nelson Mandella whose tireless campaign for basic human rights landed him in jail. While RMS, to my knowledge hasn’t been jailed for his beliefs, as he tells it, a run in with the Transportation Safety Authority almost landed him there due to some imprecise language on the part of one of their gestapo agents.

With all that said, you would think that I was among those who idolize and indemnify him. I do not. Like the coyote in his never ending chase for the road runner, he through every fault of his own, keeps snatching defeat from the jaws of victory. To keep with the coyote and road runner analogy for a moment longer, the coyote did once catch the speeding bird, and then let it go because the thrill of the chase was better than the catching. RMS too has had a win, and then let it go so as to continue the chase into the sunset. However the debates over that rocket and roller skate chase are legion, and take up enough screen real estate already.

Let’s take a look at what has me annoyed with Mr. Stallman this time. In a recent interview with Thomas Nowak, as published on, RMS dropped this seemingly profound piece of wisdom.

Tarabaz: How can we stop censoring the internet, and help personally in this fight?

RMS: I have four suggestions:

* Keep your wireless networks open, so that you will not become an enforcer for an unjust Internet regime.

* Tell politicians you demand they legalize sharing of all published works, and that you will accept no excuse for failing to do this.

* Reject all products with Digital Restrictions Management that you don’t have the means to crack, and never make an exception.

* Join the campaign.

Full article at

Lets take these in reverse order, and save the major sticking point for last.

Points 3 and 4, are actually the same thing, and on the face of it make perfect sense to anyone who believes in freedom. The problem I have with it is pretty simple. There are places where I do not want anyone to be able to change the code and leave it a functional piece of equipment such as cruise missiles. Imagine someone getting in and making a change or two that pass undetected. Trust me, I don't want that thing to ever take flight. If someone tampers with the machine that controls an I.V. drip in the hospital, I want that thing to start screaming it's little alarm and turn into a very useless brick.

Point 2, I actually wrote about some time ago. Not going into detail now, as that article is pretty easy to find. He is in essence trying to destroy the GPL from the inside by removing the only protection and all the teeth that it has.

The previous points are mentioned only in passing and have little to do with the actual topic at hand.

Point 1 is the major problem this time around. It seems benign enough on the surface, even positive and proactive, but let’s break it down for what it really means.

* Keep your wireless networks open, so that you will not become an enforcer for an unjust Internet regime.

First objection is the keep your wireless networks open part. Nice thought, however, the first failing point is this leaves your IP address open to any malicious hacker, script kiddie, and pervert who want to not have what ever they are doing point back to them. Yes, most routers keep logs of the MAC addresses that connect to them, but I challenge anyone to track that back to a mobile computer or device a month or so after the fact. Let’s also not discount that it is functionally impossible to secure your computers and internal network from outside access. Why make it easier by granting access to the center of your network in the first place? The mentality of the individual involved is sure to make them try and see just how far they can penetrate.

There is also the little fact that many in the world live with a bandwidth cap or access charge per whatever time increment is the custom in that area, be it minute, hour, day or so on. This means that the bandwidth and access granted is at that moment my personal possession. I can think of nowhere in the world, where personal freedom and liberty, something that RMS espouses, are paid even basic lip service that would require or even ask me to share my possessions with anyone without my consent. To put it another way, I don't leave my garage door open so that anyone can come in and wander off with my tools without my knowledge. The tools weren't free, nor is the access, and neither is even remotely duplicable by the common person.

It's fairly easy now to read that as neither your personal privacy, security nor ownership is of any consequence when it comes to a perceived 'greater good'. This is the first failing point of the comment and just as a start, it is a doozy. The second part, however, fails on an even more epic scale.

Second objection is the unjust internet regime portion. This one can be debunked with a few simple facts. Neither you nor I own the copper, satellite, servers, or fiber optic rings that actually carry that data. That belongs to the companies that purchased, launched, or installed them. Next is the misconception that you purchase internet access, when in fact you do not. You lease your internet access. Purchase denotes ownership in perpetuity or until some point that you dispose of it in some manner, at which time you no longer can be said to own it. Leasing it on the other hand, as is what you are actually doing, grants you only access and use. When you lease a space for business, the landlord still actually owns the physical property and lets you use the space, within reason.

The same thing applies to the internet. While leasing, you are granted access to what is there, within the restrictions of the folks who actually own the equipment you are using. You own your computer, and are free to do with it what you like. However, your computer and the internet is kind of like your car and the road. You can do lots of things with your car too, but once you put it on a road, you are restricted by laws and regulations that ensure that you do not intentionally or unintentionally damage or destroy anything that does not belong to you. This is called civility. The same can be said about the folks who actually do own the hardware that your computer is driving down. They are well within their rights to say what protocols and ports are open for you to lease and use. Like driving your car at 120 miles per hour, you may want to but there are reasons you cannot. There are protocols and services that do the same thing on the internet, and while you may want to do or use these, it does not give anyone the right to do so. The companies are within their rights, to limit or flat deny such things so as to allow fair and equitable use for all who lease access to the services their hardware provides.

In a perfect world, would free, unlimited and unfettered access be a good thing? Yes, of course. However, that is not the case. The reality of it is that there are physical and financial limitations involved that will be there for the foreseeable future. The technology of wireless mesh networking is just now coming to pass, and while that is a step in that direction, it works only within the limitations of a local network. A mesh network is not the internet itself. To get to the internet, one or more of the mesh nodes would still need to lease those services, which of course then fall under the rightful restrictions of those who own that particular chunk of hardware.

So I think that the comment has been fully dissected.

* Keep your wireless networks open, so that you will not become an enforcer for an unjust Internet regime.

The first, you have no rights to, and the second does not exist except in the minds of a few who don't understand why driving 200 miles an hour through a school zone is a bad idea. In the end, the restrictions are not in place to preclude individual freedom and liberty, but precisely because of individual freedom and liberty. Mr. Stallman’s view of how the internet should work is in direct conflict with this concept. Taking liberty from one and giving to another is just a form of theft. Whether for the greater good or not, theft and repression is never justified. Ultimately, there are individuals attached to all the wonderful hardware we use to transfer data, play games, and talk to each other, who actually own it.

Nuff said, rant over.