Monday, January 29, 2007

A plan man

Ahhh a theory that proves its snuff.

The MP Warehouse map is a nice little hostage rescue. We have about 4 levels
and two buildings. Theres also a loading dock on one flank.

The first building is a loading area. Roughly 4 floors. Ground, Lower Window
(Sniper area) and Catwalk to second building (hostage 1). Briefing room with
upper window (Large room). Then an upper area with a storeroom and a skybridge
to the second building (hostage 2).

The second building is a large warehouse with stairs on its far Eastern flank
going to Level 2 with the first hostage. Also a stairwell in the center of the
warehouse in the hostage area. Where we have a room like this

  ___________________________________
__|________|           |Stairs up||||
__D________D         Window         |
  | |  |   -------------------------|
  | |  |               | Cat |      |
  | |  |               | Walk|      |
  | |  |               |Above|      |
  | |  |             _______________|
  | |  |_____________|Stairs down___|
  |_|                               |
  |      Few Boxes       Many Boxes |
  |   Hostage                       |
  |____________________________ D __|
  | Stairs down||||||||||||||||     |
  -----------------------------------

D = Door

Full of tangos. Theres two on that catwalk above the room that shoot the
hostage in the upper area. That window room has stairs going up to the catwalk.

If those guys are alive and you enter from the stairs 'round thew many boxes.
They kill the upper hostage. Oh most every time today, when we assaulted from
the stairs and catwalk from the other building (to the left of the window
room). The top hostage died, once we lost the lower one hehe.

When I plugged the guys on the catwalk, nada ! The top hostage was safe when we
took the lower. So we could proceed to save the top one as fast as possible.



I've been playing long enough with my analytical mind. To start finding reasons
why things work or don't work. I also bet Hexen a virtual beer on the outcome
of one of the tests. My past tests won me one hehe. So we have to ether take
the upper & lower at the same time. Or take care of those goons. Personally,
what I'm liking when you can have an 8 man team. Set up to snipe the catwalk
guys, have an element bang the brains out of the top hostage area. While
another team or teams take the lower. With 8 men on duty with SD weapons one
could enact a risky but realistically fun (imho) plan of multiple entry &
simultaneous take downs.

Alpha / Red team of 3 to take the top hostage, must clear first building.

Bravo / Blue team of 3 to take the stairs to the lower hostage with bangs. The
RG breaks off, uses gas to cover his flank (left) and sets up to snipe the
catwalk guys using a scoped or automatic weapon.

Charley / Green team of 2 to enters building 1 from the ground floor, backs up
Alpha / Red. While Charley / Green moves onto the catwalk, Alpha / Red moves up
the stairs, threw the upper window briefing room. Up the stairs into the store
room and onto the sky bridge.

All teams report in position, hold for entry on pre-elected team leaders GO
code. On the go, Alpha / Red slides open the door, tosses in 3-4 flashbangs to
cover as much of the room as possible. Including the area near them, the boxes
to the right, and near the hostage at 12 o clock far / catwalk to his left.
Green / Charley kicks in or breachs the catwalk door on level 2 and floods into
the lower hostage area. As Bravo / Blue kicks in or breaches their door on the
stairs, flash bangs and clears. Bravo / Blue and Alpha / Red take their
hostages and get the heck out of Dodge while Charley / Green clears out any
remaining threats.


Just a short idea to thinker with hehe. Basically take all hostages and threats
to the hostages as close to the same time as possible. Using SD weapons to
sneak in to position. Then toss in a few firecrackers and over whelm the tangos
from multiple angles and in multiple rooms at once.


I ain't no Spider for nut'n man.

Friday, January 26, 2007

Hackish Solutions

Well, couldn't stand my bloody wireles keyboard any more. Its a nice one, made by a chinise company that specializes in KBs. Restamped Gateway of course.

The keyboard I got for $3 at a library book sale (along with a pretty sweet 15" Monitor). Has a problem of a sticking left shift. Well I think I've fixed it.

I Rolled over the keyboard and unplugged it. Unscrewed stuff and took off the bottom. I unscrewed what looked like a grounding wire and metal plate. Pull off a flat flismy layer with a pattern on it. No clue what its for yet. Then pulled off the wafer that interfaced with the keys. Yes I did read the technical manual to the NCC-1701-D a few to many times when I was young. So 'wafer' is in my technical volcabulary, thank you. The thing was pretty clean, so no problems. Packed every thing back up but the key was still sticky. Although not as bad, so what I did. Was to improvise from masking tape & a cable tie (which has been sitting on my desk annoying me for weeks). To make a little anti-stick sticky buffer. So instead of the key getting pushed down far enough to get STUCK it would be buffered back up from the cushion effect. So far it works prety good,maybe 95% of the time no stuck key, vs 75%. Not bad for a quick & DIRTY solution. Not very elagent but gee it worked well :-).

Thursday, January 25, 2007

bounty

Plentiful day really. When I logged on both Valroe and Leon happened to be on. Ahh perfections start. Managed to get Miles for back up, Rasas office for ASCII support, TS2 for Voice over, TG#1 for operations and take care of some business.

Wiz has been showing me around the site. I'm really lucky to have some one to teach me. I know he didn't, so he had to learn the hardway and fast often enough. Although I am sorry about the amount of AFK'age I've put him threw.

Oddly enough, ma was complaning that I "don' do any thing but sit infront of that ing computer all day". Well I think Wiz might disagree with her on that <_< ehehe!

Been working threw a nice book on html4/xhtml1/css2. I know that we're on 1.0/1.1 recommendation & 2.0 working drafts for xhtml. But it helps. I do know my way around plane old HTML enough but I'm not familer with CSS. Casscading Style Sheets do how ever seem a good thing to learn. Oh well hehe. I also need to start learning PHP a bit, I want to inhale the manual some time along with a few others.

Tuesday, January 23, 2007

Honor

I have been perhapes, more greatly honored then I ever thought I could be.

Who knows, maybe they will put me to good use without over working my sorry @l2$$

Monday, January 22, 2007

Note to self

My scratch pad.

>3. any tryout should be posted on the calendar so everyone in the clan
>knows that there will be a tryout. Before you make the appointment, the
>tryout administrators need to be all lined up.

Now if I could just wrangle a few people into the right position at the same time. If I have to, I'll conduct this tryout my self although I'd really like it if a LCpl can do it.

Supplimental note to self, be more agressive if neccessary about getting people involved then come as you are lets get the flubber done on time.

MicroMac

Been playing a bit, installed editors/ uemacs, qemacs, em, mg, jove, and emacs.

uemacs is a simple MicroEMACS 4.0 set up, looks good for learning. I.e. a Pico/Nano style shortcut buffer on top.

qemacs wouldn't start, so much for quick emacs

em is a modified MicroEMACS 3.x/4.0 with an ID of uEmacs/PK-TOY 4.0.17

jove is Johnatons Own Version of Emacs, looks like my favorite so far. It asks "Some buffers haven't been saved; leave anyway? " rather then a save y/n, modified buffers exist still leave yes or no and please say exactly yes or no blah blah like GNU Emacs. em & uemacs share joves trate here as well but mg takes after emacs proper. Only mg won't ask before exit if its the stratch buffer.

emacs, well is GNU Emacs. Slow loading bukly bastard with a 4.5MB binary !! Compare to the others which are smaller then nvi/nex but bigger then ed. I suppose the fact that its the only emacsen in this list that has X11/GUI support warrents its bulk... maybe

Terry@Dixie$ du -ch /usr/local/bin/emacs                                   8:04
4.5M    /usr/local/bin/emacs

Terry@Dixie$ du -ch /usr/local/bin/jove                                    8:05
148K    /usr/local/bin/jove

Terry@Dixie$ du -ch /usr/bin/nex                                           8:05
304K    /usr/bin/nex

Terry@Dixie$ du -ch /usr/bin/vi                                            8:05
304K    /usr/bin/vi

Terry@Dixie$ du -ch /usr/local/bin/uemacs                                  8:06
124K    /usr/local/bin/uemacs

Terry@Dixie$ du -ch /usr/local/bin/em                                      8:06
 84K    /usr/local/bin/em

Terry@Dixie$ du -ch /usr/local/bin/mg                                      8:06
 98K    /usr/local/bin/mg

Terry@Dixie$ du -ch /usr/local/bin/vim                                     8:06
1.4M    /usr/local/bin/vim


As you can see, em is the smallest and emacs the fatest. So far, I think I like Jove but they all seem to lack GNU/X Emacs self-documentational nature. Personally I prefer nVi or Vim, but Jove is pretty nice. All of these emacsen do support multiple editing buffers, which is one thing I did like 'bout emacs back when I used to use XEmacs as my primary editor.

mg is a variant of MicroEMACS maintained by the OpenBSD people, nice little editor. I've never used OpenBSD and have little expirence with NetBSD so I don't know if they have an easyeditor like FreeBSD's ee but I'd reckon mg could serve the same purpose. I generally use 'vi' on systems lacking vim though, so I dunno. So far in my travels the only editor I can't use well, has got to be ed and emacs. Why? Because ed's '?' error message annoys me and GNU Emacs just pisses me off by its very nature.I can use Emacs pretty well, I just choose not to (again I prever Vi)

Saturday, January 20, 2007

shocker

Well to day I did get a bit of a shock. Me, Wiz, Shield, Recon, and a few pubs on TG#1. Between maps Shield tells Wiz he's in vialation of the Code of Honor.

Wiz got promoted to Troop Captain, a fine thing :-)
He's our web master, keeps the site going, good SNCO for as long as I've known'em. Maybe as close to a mentor I've had in [SAS]. Its always good when friends got promoted hehehe.

Next map. Shield tells me I am breaking CoH too, tells me I have Wiz's old Rank (sgt). So I tag up after bumblers moement. A min later Shield says he made a Mistake, I'm not a Sgt I'm SSM.

I miss read SSM as RSM, since we have not had any SSM in awhile. Kinda embarrasing on X-Fire for a minute. When I re-read Shields msg and saw the first S and corrected it. I was never so happy to be promoted ! lol. Wew...

Turns out my m8 Rasa is also a SSM and our mutual team mate Rouge is acting RSM. Really, I was hoping they'd just promote Rouge to Sgt and let us Cpl have a good leader. Damn I'm glad they picked Rouge. Not that I have issues but, hes the best and I'm actually glad we all skipped regular sgt. I've always looked at the higher ranksk with respect, first time I met Shield. This was before he was CO, prolly Major or an SNCO. I called him Sir. Being the sort he is, of course he didn't like the 'sir' part.

Even though, I have a lot of respect for our officers and every member. To be honest, I've always looked on the 'Sgt' rank as sort of a death curse. Since Wiz made Sgt way back when, I noticed how his activity dropped. Not to mention JB, Blade e.t.c. This is why after Cpl, I stopped sending promo-suggestions. Being where we are now I'm happy. I was some what fearing promotion actually.


To be honest, for a long time I've always wrestled with the idea of leaving. Even when I was a P.R. But, when I was a P.R. I had such joy and I desided I wanted to continue on to the Selection Course in the hopes of some day passing on what I learned. My time in the [SAS] has really been a blessing to me, in numerous ways really. As a trp I trained my self to a razors edge, as a LCpl I floundered (imho). I remember being told that it was a Sgts job for such things, never have really wanted to have rank. Well, I did always have a soft spot for Cpl. Thanks to Adze, Wiz, JB, and Blade. I remember when I was just a newbie Adze was always popping in/out. That bloody Cpl was inspiring slash annoying. Being a Cpl, really was the highest I wanted to go. Just high enough to be free to get involved in training/clan matters but low enough to be sure I'd spend a lot of time with the server, public, and members.

Really what good is a job if you don't get to be with your friends and meet new people ? At least as an SSM I know I can still be where I want, yet still be useful to the team. The happiest thing they could have ever given me for a Rank they did. Trooper when I passed my second tryout with a 98%. Any thing after thats kinda gravy as long as I can be useful.

So what is my new Job Description?

/****************************
The Squadron Sergeant Major, working closely with the Regiment Sergeant Major, will be expected to make suggestions regarding our [SAS] member training procedures, and implement any necessary changes upon approval of the Captain. The Squadron Sergeant Major must ensure that all Staff Sergeants are correctly educating the [SAS] membership and Sergeants are correctly educating prospective members on all aspects of the [SAS] Code of Honor and Standard Operating Procedure Training.

The Squadron Sergeant Major will report directly to the Regiment Sergeant Major about their training methods and scheduling, but he is allowed to, when necessary, act independently to provide supplemental training to the [SAS] membership.

The Squadron Sergeant Major is responsible for administering the Advanced Training Awards Tryout to selected [SAS] members. Eligibility to participate in the ATA Tryout is determined by the SSM. In situations where the SSM is not able, due to logistical reasons, to administer the ATA, the RSM or a qualified trainer shall act as a replacement for that instance.
************************/

The ATA part is a bit dated since the one fearsome training map for it. Has been released for general training, I use it often. But other wise the JD looks 'bout ripe. Speaking of ATAs the only person to come close or actualyl did do it on the first (can't remeber which) was Random when he was CO. I take my helmet off to ye for that !

Great map for self-training though heheehe.
Some how its ironic, mine is a gneration that may be best noted for 'dis-functional' familes. But mine tends to work on the un-functional side...

Sigh, back to code I guess.

Tuesday, January 16, 2007

QTechnic

I've been working around in assistant and designer (qt3). Docuementation is pretty good and the system looks neat. TO be honest, I started on it because I was bored =/

When it comes to graphical toolkits I'm some what familer with Javas AWT (abstract window toolkit) as it was in the pre JDK1.0 days. I've never writen a AWT app. Dang gum it, get up for five minutes and the dogs all ready bamboozled me out of my spot ! So far I think I like QT, good solid documentation. Good GUI for making a GUI, and seems a pretty smart system for building graphical applications. I prefer ANSI C to C++ but C++ does have its virtues.

I once started a GTK+ C tutorial but I couldn't stand the examples... To much of the GNU coding style in it. Just seeing a function ( like, this ); makes me cringe !

Personally I like functions like this:
type
name(parm1, etc); {
        /* code */
}

and thats generally how I write C. When I first started learning programming in C++ I wrote out in the style the tutorial dictated, namely.

int main()
{
    // Code
}

As various coding styles have always interested me and I like the idea of beauty meets readibility. I some how developed an attraction to keeping the opening sqiggy brace on the same line rather then the next line. I don't know why but I find it more astectic.

Saturday, January 13, 2007

PC-BSD Backup-Howto

/****************************************************************************
 *                                NOTICE                                                                           *
 ****************************************************************************
 * This is still under construction. Having gotton very tired before getting*
 * this far. Makes this less then optimal. Also since I have little in the  *
 * way of practical exp. It will probably show. I've never had need or using*
 * any of my backups.                                                       *
 *                                                                          *
 * I did enjoy learning a few new things like basic cpio usage, well.       *
 * I've read about using tar/cpio/afio/dump before. But I've only really    *
 * used bsdtar with / without gzip/bzip2 for the most part.                 *
 * I will get stuff cleaned up as soon as I can. Feedback/comments always   *
 * Welcome.                                                                 *
 *                                                                          *
 * Chow                                                                     *
 ***************************************************************************/


The most important policy a computer owner ever works on. Is his/her backup
plan, what happens if that hard drive blows up or you erase all your mp3s ?

Since PC-BSD is a desktop based OS, I'll think more so from a desktop users
perspective then a server. I also don't know of many people that have 'tape'
drives at home so I'm not saying any thing about what I don't own.

Why should I back up my data ?

0.) In case of hard ware failure, namely the hard drive

1.) In case of disaster. Such as fire/flood/electric surge

2.) In case of accidental deletion, oops I just shredded my tax returns the
night before tax day !

3.) In case you have to reinstall the Operating System and want your data.

4.) Just in case you install another Operating System and it over writes some
data.

All good reasons to have a plan, further more its generally assumed that before
you go installing OSes, partitioning drives, e.t.c. that you got back ups.


Ok, so I need backups but where to put them?

Good question, depends on the type. I generally use a mixture of drives and
disks. You should keep them in a safe place, probably not in the same area as
the computer. In case of a fire or burst pipe. You might loose the computer but
not the backups on a shelf down the hall. A fireproof safe would be nice if you
got one.

Remember, while it can be secure on your computer behind passwords and access
controls. Once your data is backed up there is no protection. Although you can
backup encrypted user files with luck and decrypt them after restore. Such as
ones Documents. If your backups contain sensitive information be _sure_ to keep
them in a secure location. It can be just as easy for a smart thief to restore
a backup of yours on his/her computer as it is for you. If given access to the
backup media.

When to backup ?

The question is how much could you afford to loose? If you work on files
often such as a writer, programmer, or an artist. You might want to backup
daily. If your a casual user more worried about bookmarks and mailboxes. Ever
two weeks to two months might do it. Really your the only one who would know.

If you want to automate the task we will be looking at tools meant for that
purpose.

What to backup ?

This is all a matter of personal preference. The most important things for the
desktop user are files. Namely one would rather save a few 1000 family photos
then installed software that can be reinstalled. My suggestion is at the bare
_minimal_ that you backup your home directory and any major file storage
folders or collections.

System configuration can also be important. Maybe you had to make some changes
to get your system working right or theres just some stuff you don't want to
tinker with again. Hopefully you did write down any changes you had to make,
like wireless configuration details e.t.c. But a backup never hurts ! I'd
suggest you backup the /etc directory, the loader.conf file and modules
directory in /boot/ if you have drivers there, as well relevant directories
under /usr/local/ if your software requires it (like global configuration
files). It might also be of interest to grab the /var directory and system logs.

At best

/boot/loader.conf
/boot/modules
/etc
/usr/home/

What to backup to!

Any proper safe location. If you do use a tape drive, I suggest you take _good_
care of the thing and don't use it very often. If you don't know what tape
drives are don't worry, I've never used one ether.

The best storage medium you can get would be CD-R, DVD-R, CD-RW, DVD+R, or Hard
Drive. You will need a burner to write files to a disk but heres a run down.

CD-R, needs a CD Burner. Holds about 650MB of data and files burned to it are
stored for as long as the disk lasts.

CD-RW, needs a CD Burner, works just like a CD-R but you can erase files from
itand reuse the disk. Costs a little more but can be well worth it.

DVD-R / DVD+R, needs a DVD burner but tends to hold much more data, a bit over
4.3GB or over 4,400 MB. Most burners to day support both -R and +R formats, I'd
suggest DVD-R but what ever your systems support.

There are also DVD-RW and Dual Layed DVD media that your drives may support. A
DVD Burner will also burn CD-R and CD-RW :-)

Another good medium is the external USB hard drive or large capacity USB
sticks. These are good in that they can be used just like hard drive space, but
taken else wheres for storage. If you often use a USB stick for file shares,
you should back it up as well in case of loss or damage.

You can also use hard drives, if you have several computers a reliable one can
be tasked with a high capacity hard drive for the purpose.


My greatest fear is generally for hardware failure rather then accidental
deletion, I'm kinda careful. So I generally make use of hard drives then
optical media for storing long-term backups.


How to backup ?

Interesting question, lets think a few. We have a few options we can

Archive the whole system and stick it some where safe.

Take a snapshot of the file system, good if your prone to erasing stuff

Copies of the disks, poor mans RAID.


If for some reason you are working with a Database, stop the thing before you
back it up. Or at least check the documentation on it before backing it up.
Trust me you don't want to break that local copy of a website your developing
do you ? Hehehe. Our major software will be dump, cpio, and a few
archive/compression systems.

Dump, the real way to backup a toilet bowl !

Sorry just had to say it. Dump writes raw data blocks that make up
files/folders I'd suggest reading the man page on dump(8) and restore(8) if you
have need of it use it. If you know how to, I'd really say use it. The manual
pages are very good but feel tape-drive centric. Perhaps some one with more
experience with dump/restore can provide better info.

Here is a
good article


If you don't understand a lick of that or the manual page, do not bother with
dump unless you have to. Trust me, you'll only get a headache. Learning the
details of dump/restore is also on my to do list.

That being said, dump and restore are probably the _best_ thing you have in the
arsenal of backup and restore tools.


Tar and Friends, the zippy way.

This is probably my most used method and it should prove usable for most
desktop systems. The basic idea behind tar is you take many files and create
one. For example tar can take the files tom, dick, and harry. And turn them
into the file 'names.tar', when unpacked you get your tom, dick, and harry
files back. The problem here is tar does not compress data to save space. For
this if we are not working with just a few small files. We probably want to
archive it with tar, then compress it using a program like gzip or bzip2.

PC-BSD uses BSDTar but includes GNUTar as tar and gtar respectively. See the
man page tar(1) and the info file on tar (GNU info page). If your used to
advanced tar usage under GNU/Linux you might find gtar more to your liking.
For basic usage the differences are not worth noting.

We can create a tar archive like so in the konsole

tar -cf files_to_add tarfilename.tar

If we want to be quick about compressing this file we can do it in one line and
use ether gzip (tar.gz) or bzip2 (tar.bz2) like so:

tar -czf filename.tar.gz files_to_add
tar -cjf filename.tar.bz2 files_to_add

GZip is faster but BZip2 may offer smaller files but use more resources when
dealing with bigger files. One can also backup over the network using ssh or
rsh if necessary. For simple usage like this we can use the graphical program
'ark' but it may take longer to process the operation (imho). To extract the
files we can open it in ark and extract it or simply run

tar -xzf filename.tar.gz
tar -xjf filename.tar.bz2

A quick and dirty way to back up ones home directory would be to run ark as the
root user from the run dialog or konqueror in super user mode. Add the folder
/usr/home/ to a new archive of given format or to create it like so from
a root konsole.

cd /usr/home
tar -cpzf Terry home-Terry.tar.gz

That is, create a tar archive of my home directory, preserve my file
permissions, and gzip it from the file 'Terry' in the current directory.


A far bit of warning, the manual on tar will make your eyes bleed so its
probably best to look for examples or use ark until your used to the command.

See Pee Eye Oh, I see you.

The program cpio or 'copy input / output' is the backup tool I recommend along
with pax. Its usage is more complex then tar but more useful. The version
included with PC-BSD/FreeBSD is GNU cpio.

A simple way to create a file with cpio from a konsole is like this

find ./ -print | cpio -vo --format=crc > filename

Will make a ASCII cpio archive in the new portable SVR4 format with a checksum
of all files/folders in the current directory. To restore it to the current
directory.

cpio -vidm < filename The v option means be verbose, that is show us what its doing. The -o option is create, -i is extract. -d is make directories as needed, -m is preserve modification times, and --format= is the archive format. Thumb
around the manual page for more details. Sadly this lacks compression :-( The
sysutils/afio port is an updated cpio program with more options including built
in compression.

Any one seen K-PAX?

Since the many versions of tar and pax in use by commercial UNIX and Free Unix
likes such as HP-UP & Solaris on one side. And GNU and BSD on the other
userland side. Have various compatiblity issues from time to time. POSIX UNIX
standards people. Created their own program called 'pax'

If your prone to 'Distro' hopping or having to deal with several different Unix
systems you probably would prefer pax to cpio. Dru Lavigne has a great article
about it, so rather then write about it I suggest you read
hers
:-)

Heres a simple usage of it just for the same of this document.

pax -wf archivename /what_to_archive

cd /where/to/restore/to
pax -rf /to/archivename


Direct Device Access
dd(1) is a utility to convert and copy files. It has more use then it sounds
really. dd is a powerful tool and a dangerous one. If your not used to it,
please don't make a typo trust me it could be bad. This program can do some raw
disk copy jobs and even has use in computer forensics to get byte exact copies
of drives. It is also some what hated in that it is used very diffrent from
other UNIX programs. Rather then -options you use a option=value method for
setting options. Here is a demostration of coping a mounted floppy disk in drive fd0.

dd if=/dev/fd0 of/tmp/floppy.image

Which very well may take awhile, we can add the obs= option to write
'bytes' at bytes at once and ibs= to read at 'bytes' at bytes per once.
Or we can just use the bs= option to set both the same. Thus to speed up
stuff.

We now have a copy of the sucker as I'll show with the file and Disk Usage
programs.

file /tmp/fd.image
fd.image: x86 boot sector, code offset 0x3c, OEM-ID "BSD 4.4", sectors/cluster 8, root entries 512, sectors 2880 (volumes <=32 MB) , sectors/FAT 2, serial number 0x742c15e2, unlabeled, FAT (12 bit) du -h /tmp/fd.image 1.4M /tmp/fd.image I only had 96K of data on the floppy but it is a byte for byte copy of the disk. So the image is a full 1.4 megs. Now I will copy it to another blank disk, raw. At approx 16 Kilobytes per. First unmount the disk and insert a blank floppy. dd if=/tmp/fd.image of=/dev/fd0 bs=16384 Now we can mount it and bingo its the mirror image of our old disk complete with the free space on it. mount_msdosfs /dev/fd0 /mnt/fd0/ We can even use rsh or ssh to do this over a network. Remember if you want to 'dd' an image of your hard drive. It will be the same size. For example if I used my systems ad0s1a partition as the In File (if=/dev/ad0s1a) and my ad0s1a partition is 7GB in size with 4GB free space and 3GB used space. The resulting image would be 7GB in size _not_ 3GB. So one must have space to store the image. You would probably be better off with dump but dd has its value. Since dd will probably need to be run as root for much of its usage as a backup tool. I suggest that you _read_ this section of Wikipedia on *WHAT NOT TO DO WITH DD* before using the command and erasing data instead of cloning it! dd
Anti-Examples


Once PC-BSD has released a GUI program for making backups things will get
simpler. In the mean time here are some ports you might research:

rchivers/mtf             A Unix reader for the Microsoft Tape Format used by NT Backup
archivers/rvm             An archive manager that uses rsync to manage backups
databases/usogres         Real-time backup utility for PostgreSQL
deskutils/multisync-backup Multisync backup plugin
emulators/vmsbackup       Reads VMS BACKUP tapes
misc/afbackup             AF's backup system
misc/afbackup-client      AF's backup system
misc/afbackup-server      AF's backup system
multimedia/streamdvd      A fast tool to backup Video DVDs 'on the fly'
palm/pilot-link           PalmPilot communications utilities (backup/restore/install/debug/...)
sysutils/afio             Archiver & backup program w/ builtin compression
sysutils/bacula-client    The network backup solution (client)
sysutils/bacula-client-devel The network backup solution (client) - DEVELOPMENT Version
sysutils/bacula-server    The network backup solution (server)
sysutils/bacula-server-devel The network backup solution (server) - DEVELOPMENT Version
sysutils/be_agent         VERITAS Backup Exec (tm) UNIX Agent
sysutils/bksh             Backup-only shell
sysutils/boxbackup        An open source, completely automatic on-line backup system for UNIX
sysutils/cdbkup           Simple but full-featured backup/restore perl scripts (uses gnu tar)
sysutils/cpbk             Backup Copy programm
sysutils/dar              A full featured command-line backup tool, aimed for disks
sysutils/dirvish          Network backup system based off of rsync
sysutils/duplicity        Untrusted backup using rsync algorithm
sysutils/dvdbackup        Backup content from DVD to hard disk
sysutils/flexbackup       Perl-based flexible backup system that can use dump/afio/cpio/tar/star
sysutils/fsbackup         File system backup and synchronization utility
sysutils/hdup             The little, spiffy, backup tool
sysutils/kdar             KDar is KDE-based backuptool using libdar
sysutils/pdumpfs          A daily backup system similar to Plan9's dumpfs
sysutils/pdumpfs-clean    A utility to clean up old backup files of a pdumpfs archive
sysutils/rdiff-backup     Local/remote mirroring+incremental backup
sysutils/rdiff-backup-devel Local/remote mirroring+incremental backup
sysutils/reoback          Simple but flexible ftp/nfs backup script


Some links that may be of interest

Stress
testing the backup utilities


FreeBSD Backup Strategies
FreeBSD Backup Basics

Thursday, January 11, 2007

sighs und curses

Been thinking a bit about a friends remark... A good mixture of delight and desiaseter in such thoughts but oh well. A spider can always dream. The odds of a girl friend as nutty about computers as I, is sadly slim. I'm the most "geeky" person I know in town. Aside from professionals with comute I'm also probably the only person in town who knows *nix.


Any way, I've been learning a new library. I'm some what able with the standard C library if a tad un-skilled. Not like I have many excuses for using every routine in my spare time xD So I've started on ncurses, much more interesting then GUI development IMHO because in a console level of usage. A good UI is a must, at least to be powerful yet eligent the way that Vi or Emacs are.

So far I've learned how to create a little window box and move it around with my arror keys. Not really useful but the concept it thought me was.

Mainly that we can loop threw calling getch() or simular routine till we get to our desired escape method. And use a switch/case setup to implement what we want to do on a given input. Like

/* from the file */
while((ch = getch()) != KEY_F(1)) {
        switch(ch) {

        case KEY_LEFT:
                destroywin(my_win);
                my_win = create_newwin(height, width, starty,--startx);
                break;
        case KEY_RIGHT:
                destroy_win(my_win);
                my_win = create_newwin(height, width, starty,++startx);
                break;
        case KEY_UP:
                destroy_win(my_win);
                my_win = create_newwin(height, width, --starty,startx);
                break;
        case KEY_DOWN:
                destroy_win(my_win);
                my_win = create_newwin(height, width, ++starty,startx);
                break;
        }
}

This and the ideas that come to me with this concept. Blow my mind away, I never thought that much about it. Really the most I thought about such things were based on Javas AWT. Although I've writen very little Java and I like it that way. I probably am most familer with Java then any other high-level language but I really do prefer C.

Hopefully in time, I'll learn a lot more and maybe can work on some thing I've always wanted to do. You see, one part of my studies has been to try and take what I've learned and implement some thing. In the paste I've used an integer calculator to redesign to test my understanding of various ideas. I remember the first one I worked on, maybe 2 years ago was testing my abilities with Functions when I first started to learn C++

One of my hearts secret desires has been to design a niffty text editor, dang I'd love it. I could learn so much and working on it would give me some thing to do. If I could, I'd even like to try and implement a 'vile' style that merges vi/vim/emacs commands into a single modal editor. Plus give me a chance to make GUI front ends, good excuses to learn more OO and GTK/QT, maybe add wordstar key setups as an excuse to learn them. Not really necessary but still it'd be a fun project for my young mind to toy with.

dang it, my minds starting to wonder off to the first paragraph of this post, time to hit Vi and play with gcc.

Tuesday, January 9, 2007

Dang

Made to feel like a floor flushing heel just because I'm trying to learna new library and toy with an old program. Well, new library for me if not for the likes of people like Bill Joy....

Is it my fault that I couldn't work on stuff during the day after work? Well I knew she was gonna change her bloody mind about not going out shopping today. So I didn't start any thing, sure enough she did. Ya get a feel for it after awhile !

So, out of the store by 2215Z (1715 local) and home to what? Chores x 3 different fields. Few spare moments before dinner to type of the ncurses version of hello world, didn't even have a chance to compile the puke. So after dinner, after putting the leftovers away with a chaptor of R6 in between. And being stuffed full of leftover pie she wants to get rid of (from Christmas/NYE). I finnally got some time, so I boot my laptop. I had been doing the leg work on Vectra from ssh on SAL so I could use Vi and GCC without that vile cmd.exe, worthless terminal emulator imho. Ma's watching the soaps, lucky for me I have zsh set not to beep a lot...

Ya know its not exactly my fault that Vi does not give you the greatest warning that your at the EOF other then a BEEP. Sheesh man, I'm trying to _L E A R N_ some thing and I'm made to feel like a crimenal. What the heck... Oh and of course since its not my 'School work' it doesn't matter worth a damn eh? Well pluck you - people used to go to college just to get access to a frigging compiler years ago !!! Let along having the internet to help learn about such things. Dang gum it.

She'll raise all hell, tackle a bison to the ground if it denies her Respect but you so much as make a sound while the soaps are on and your on top of Amercias Most Wanted. Shes watching TV, some thing I as a former couch potato must of my younger life admit. I don't do often - I'd rather learn some thing. Does she care? Not a fricking damn bit. If it was in the name of my over due biology test rather then trying to learn my way around ncurses. And skim threw a few files in /usr/src. I think she'd still treat me like this...


Its a sad fact I've been learning these days. That a man can starve tp death on a full belly. Some times I wish, I didn't know that Luke 4:4 was right in more ways then I first thought.

I try to be respectful of others, I'm sorry for the beeps. I even asked if she wanted me to switch to the desktop. I was using a TTYV or 'Virtual Console' instead of KDE, because all I needed was my shell, ssh client, vi, lynx, and gcc. No need for a big GUI for accessing a box w/o X11 eh?

I think, I hate my life.... dispair out rules joy I think, for me any way. To her Michelangelo's Pietà and David are art. And yes it is very greatly so. But to me, so is every bit of what I see in the FreeBSD sources, some thing I want to study and learn from. Just as Michelangelo had once learned from the working of human bodies how to better create sculpture. To me, source code is a work of art if its done right. For me, things such as FreeBSD, Linux, Vim, are all works of art. I'd yern to study under a master programmer.....

Monday, January 8, 2007

Ysterday, we got a tornado warning. About 20 minutes heads up to get to cover. Two dogs /w collars + harnesses, ma, me, bird, newt, and fish in the bathroom with supplies.

Since Mikey (parakeet) has his cage on a table, a playpen on a few boxes (my old school books haha) and a close rack turned into a toy rack full of perches. All netted in with a thin mesh. We had to get him caged and out of there. I yanked off the computers, pulled the cordless phones/networking gizmos closer to storm time.

I'm glad that I got to stick to my operational doctrine. Leave no one behind, I'd rather blow away trying then leave them. The storm passed within about 7-15km so we where fine. Where we live we usually get no damage, trees sway but hold hehe. Mostly had rain but no wind/hail.

Prayer beats fear, and although I don't think I quite learned it in the context En4cer ment. I get the idea that you don't just sit there and take a dump. You keep going, firing, aiming, engaging, or you die.

Sunday, January 7, 2007

Overload it !

Well, one thing I wanted to do with the little script I tossed together to rip out left over & broken symlinks from the Amarok.pbi. Was to make it possible to use it on any broken symlink. I redid it real nice and simple

blgrep.sh pattern options

i.e. grep for this and pass options to rm in case its needed. The only problem is that the type of file to track down was hard coded, i.e. '@' or symbolic link. (man 1 ls). So I've made it much more compucated then it had to be to make it usable for just about any thing ls -F and file gives me. Usage is pretty simple and the path defaults to the current directory.

blgrep [path (optional)] [grep pattern] [rm options (optional)] [type, i.e. /*@%=|]

Still toying with it on how to improve its workings. Not really necessary to do any of this but I did enjoy the chance to get to know getopts/OPTARG/OPTIND, case and break/continue as they apply to BourneShell a bit more then I did. Doesn't seem much different then what I'm used to really.

#!/bin/sh
# broken link grep
#
# This was writen to track down broken symbolic links. With some modifications
# it has been made to grep other things to kill.
#
# Probably should rename this file rmgrep or some thing.
#

export PATH='/bin:/usr/bin'

D_FLAG="./"             # Directory to list
G_FLAG=""               # Pattern to grep files output for
R_FLAG=""               # Options to pass to rm
T_FLAG=""               # For sed in ls|grep|sed pipeline
OPT_FLAGS=""    # Storage

usage() {
        echo ""
        echo "Usage: blgrep [ -d PATH -g PATTERN -r RMOPTIONS -t TYPE]"
        echo ""
        echo "PATH is passed to ls, PATTERN passed to grep, RMOPTIONS"
        echo -n "is passed to rm. See ls(1) for the -F option for more"
        echo " info on TYPE"
        echo ""
}

hunt() {
for BL in `ls -F "$D_FLAG" | grep "$T_FLAG" | sed "s/$T_FLAG//g" 2> /dev/null`
do
        DEL=$(file $BL | grep "$G_FLAG" | sed 's/:.*//g' 2> /dev/null)
        echo Removing: $DEL
        rm $R_FLAG $DEL
# Havn't tested R_FLAG since before the getopts conversion.
done
}

################
#     START    #
################

if [ ! $1 ]
then
        usage
fi

while getopts d:g:r:t:h OPT_FLAGS
do
        case $OPT_FLAGS in
                d) D_FLAG=$OPTARG;;
                g) G_FLAG=$OPTARG;;
                r) R_FLAG=$OPTARG;;
                t) T_FLAG=$OPTARG;;
                h) usage;;      # Help
                \?) usage;;
        esac

        hunt    # remove all matches
done

Saturday, January 6, 2007

Live Op #5

My 5th live oop, a failure but a well done one.

Hexen made the map, Miles ran the op. Very good although I think it was morea job for Rainbow then the SAS :-)

Profesional Tangos took over the bang, at least 3 hostages or more. All presumed in the upper conference room. GSG9 called in to storm it, mission failed. Hostage takers issued demands, SAS called in. Sniper support with eyes on Obj. Team:

Red One: SAS_LCpl_Leon
Red Two: SAS_Sgt_Wiz
Gold: SAS_Cpl_Spidey01 (EL)
Blue Two: SAS_Trp_Fox (2IC)
Blue One: SAS_Cpl_Rasa

Rifle-One: GSG9_Bones (SAS_Trp_Miles) on special loan from the locals for Sniper/Intel support.

I assigned the callsigns/formations since they elected me EL while I was away. With mostly the help of Fox and Rasa I sorted our plan of action. We would enter threw the side door of the [SAS]_Banking_House map. Clear the area and drop gas at the ends of the hall. Move up stairs, Red One and Red Two button hooking, slicing pies and dropping a gas on the risky side. Blue Two placing a charge while Blue One would cover me to clear to back rooms. As Red Team got in position on the other side of the Obj. I'd high tail around, place a C2 on the door while Red and Blow readied. I'd rejoin Blue Team and give the GO.

My charge would blow the far door from us open. Foxes Charge would blow our door. Wiz and Rasa would chuck in flashbangs to cover the room. While Bones (Miles) would snipe. Like this

______________________________
| R1                         |
|                            |
|    b    _______            |
| R2     /       \           |
|        |        |          |
 C       | Table  |          D
D        |        |         C
|        |        |          |
|        |        |       B1 |__D___
D        \________/    b     | G    |
|                         B1 W      | 
|_____W_______W_______W______|______|

              ^
            Sniper

R1 = Red One     B1 = Blue One
R2 = Red Two     B2 = Blue Two
G = Gold         C = Charge
b = Bang         D = Door
W = Window

Red would bang and button hook Snipers-left, Blue would Breach Bang and button hook Snipers-right. I would blast the first charge (deversionary entry) and kick in the door to the adjacent room to take care of any threat to Blue, risky but clock work. No one would be in any ones line of fire, well maybe the hostages but you can't help that.

Every one would give a clear, Fox (B2) would nab the hostages and I'd set up in the hallway and call a reform. If there was less then 3 hostages, B1 the Rear Guard (Rasa) would guard the hostages while Rifle-One covered with a sniper rifle and hide in a secure room near by. R1, R2, G, B2 would form up and move out going door-to-door-to-door bang by bang trying to clear the remaining (other half) of the upstairs as quickly and as safe as possible. We couldn't be sure if their would be hostages in the other areas and we couldn't risk the known hostages for them. If we whent precision clearing RvS style with no tacaids we would loose a hostage and compromise the mission. So any one out there had to sit tight.

If at least three hostages were there, we'd grab them and huzzle out to Exfil. Take a sec to catch our breath then start systematicly clearing the buildings other half till we got the other hostage(s).


Sounds great eh? Especially since we couldn't have long sticks /w bangs to flash the windows or bang/breach & repel threw the things from the roof like IRL. All whent well till we got in side on the stairs. A door open at 12, hostage sighted and ran for us. Door to the target open at 3 (to hostage room) and tangos coming our way. Rasa got shot and he was the Rear Guard, then the hostage got shot. Some times life just tosses you a ball that smacks you in the head, can't catch it.

Was a very good map, we also planned it like clockwork. I lead it, Rasa and Miles (Bones) being cheif advisors as possible. Every one got to do Q&C, nothing left to chance but dumb luck. Which shot us in the toe.

Since I screwed up and took the wrong tactical aids and it was like 1min into it. We did it again, Rasa brought a time machine 8=( They put it to a vote. Rasa, Miles, and Wiz voted yes the rest refused. Oh well, I'm not much on the idea for me its strictly one shot john. We did it by the numbers and got shot in the toe before we got upstairs haha. After that as per tradition after a live op success or fail. We played it Killhouse style.

Same plan failed, so we tried dymanic for fun (my idea) without any iron clad formation (Rasas idea). The plan was basically to bang threw, see if we could clear it quickly and still reach the hostage. Wiz wasn't happy with it, nore was I really but I figured we could use a break for a round. After he left Fox modified the plan for safety and we did it. After one round I left b/c it was getting late. To late to walk the dogs after typing this =/

Oh well maybe I can code before supper...

Monday, January 1, 2007

Upgrades

I tared and bziped all the files I wanted to save from my home directory and
copied my /etc directory and /boot/loader.conf file to my recovery partition.

I opened konqueror and navigated to my smb shares to copy the 660MB.tar.bz2
file over. Thats not to bad for 800+ MB of files hehe.

Booted off the 1.3 install disk (disk 1) and slected an upgrade for my 1.3
install. Yes to allow NTP and BSDStats. THen it stated with the update.

Reboot whent without problem, it generated a new ssh keys e.t.c. I was unable
to login, I wasn't sure if KDE wasn't starting or if the update broke my login
database or some thing because I had rebuilt it after making some
configuration changes or what. I switched to a ttyv and tried to login, I got
as far as the new motd and bombed out back to getty with the error message that
/usr/local/bin/zsh didn't exsist. Ok no problem there, logged in as root and
did a portinstall of shells/zsh

Desktop was mostly normal the only changes being my icon set and wallpaper was delted so I got the defaults. Even Vim which Iinstalled from source was removed. Aramroki.pbi is broken by this update:

Amarok could not find any sound-engine plugins. Amarok is now updating the KDE configuration database. Please wait a couple of minutes, then restart Amarok.
If this does not help, it is likely that Amarok is installed under the wrong prefix, please fix your installation using:
$ cd /path/to/amarok/source-code/
$ su -c "make uninstall"
$ ./configure --prefix=`kde-config --prefix` && su -c "make install"
$ kbuildsycoca
$ amarok
More information can be found in the README file. For further assistance join us at #amarok on irc.freenode.net.


Gee thanks PC-BSD.

My USB stick does not automount when I plug it in. I don't really mind since I tend to leave it in and have to mount it by hand. Now look at this:

Terry@Dixie$ mount /mnt/da0s1 17:24
mount: /mnt/da0s1: unknown special file or file system
Terry@Dixie$ mount_msdosfs /dev/da0s1 /mnt/da0s1 17:25

EXACTLY the samerly thing that was in the RC, fixed my ass. The onyl difference is it failed to mount the drive. On my fresh install on the desktop it auto-mounted to /media/LEXAR a temp mnt point that bypassed the documented /mnt/da0s* all together. On here I have to mount it specifically as a fat32 fs from the CLI.

Now very strangely every thing that was installed into /usr/local/ is gone. Yet for example wmclockmon and blackbox. They are no longer in the database /var/db/pkg according to pkg_info but they are still installed into /usr/X11R6/ so I think they did a booboo here. I'm very interested in just what exactly the installers upgrade feature does to my system.

The end result is that every PBI must be reinstalled from Seamonkey to Java. The least they could've done if they wanted to erase every thing installed into /usr/local period was to rm all in /Programs too. So now if I ever have a problem installing a new version of blackbox or any thing window maker before the translition is comlete. They will here from me directly !!

Even the entire linux compat was FUBAR. Realplayer.pbi made by Kris Moore RPM'd in its deps but they are gone. Yet the 1.3 upgrade installed a FC4 Linux ABI. Complete with linux flashplugin wrapper. Since I need gmake to build most stuff I know of using GTK, if QT needs any thing other then qmake probably you need gmake for QT/KDE apps too.


Luckly my gkrellm2.pbi is ran from my Autostart directory stright from the PBI in /Programs rather then my path. So no problem there. Copied over my wallpapers and its good I have the old icon sets as part of my KDE icon sets PBI that I was working on. It would auto install any of them if not detected and delete them all at removal if one wanted.

THANK GOD the new Kaffeine is more stable it was driving me crazy. At least I have some thing that will play .ogg files now danke !

Since my install of the allcodecs PBI installed to /usr/lib I don't expect any problems with media playback unless I install some thing from ports. Personally I think I will just cut up the pbi db and rm most of /Programs/* and start over. At least my system seems stable. I see changes in /PCBSD/cardDetect but as long as I don't have to screw around to get my resolution back I'm happy enough.

It seems they didn't meddle with /etc to much good because I lost my backup of it. I fixed /etc/login.conf and a few fles to spec and rebuild the db. Think I lost al changes in /etc/ssh but I can borrow a copy from Vectra.

So far the half assed job of uninstalling software before hand and breaking most of my PBIs aside and making me have to type 2x as much to mount my USB stick aside. I'm happier with the upgrade then with the fresh install. I see they owned my loader.conf file so is it a wonder my Atheros card is not detected ? I'll merge these real quick after checking the diff. I don't know what they did that I see no sound drivers being loaded at without using loader.conf or defualts/loader.conf but hopefully it will help people getting sound working.

I loaded my wlan and ath modules and got back online in a snap. Unpacked my always on hand copy of the vim source code in /tmp and began to configure and gmake it with gtk20 support. The changes made to konquerors profiles were lost on me since I customized most of them in my home directory. I usually use PersonalBrowser and SmallExplorer or Kommander the ones I made any way.

To clean up the PBI problem I removed all broken PBI directories from /Programs.
I removed the scripts in /Programs/.sbin that they used. I removed the entries from /Programs/.config/ProgList after backing it up just in case. It says not to edit by hand but I don't think I can do much damage with a backup in hand. Still I don't trust any of the PC-BSD utils as far as I can throw a 100 Ton Atlas. I removed a few things in /usr/local/share that were left over. I changed over to /usr/local/share/applnk/My Programs where the K-Menu entries for PBI are kept. And eracticated the ones left.

I removed the borken links in /usr/X11R6/* and /usr/home/Terry/.kde/share/applnk/M Programs/. Of course I could have used PC-BSDs software manager to do most of this but I would rather keep that strong connection with my system that I have from regular usage. So far life is good, I'll just make an alias or a script for mounting my USB stick and assuming that the Amarok.pbi is totally incompabible with PC-BSD 1.3 I will half to make some packages on my desktop and jet them over. Hopefully there won't be much problem with it

So far the update looks to have gone good. Stabiltiy may be better then it was
before, software is up to date without me having to compile it all for 24
hours. BSDStats should now track my system and it seems the denyhosts stuff was
setup but I don't think PF was, good I've been needing to read the manual on
that any way.

What was the cost? Downloading the install disks ISO and burning it to a CD-R.
Having to reinstall much software, most of which was installed via PBI or
stright from sources, having to clean up after the upgrade broke/remove it all
(I did it the harder way), Loosing my many icon sets and wallpapers. Lucky for
me I keep my wallpapers in my home directory and copy them over to KDE hehe ^_^
and I was working on a PBI full of icon sets. The highest price, Amarok my
favorite music player. Also my /usr/local/projects folder with the files for my
KDE icon sets, Amarok styles (lucky I have this one in my home dir), Ogle, Vim,
Blackbox, xmss and others that I forgot to backup before PC-BSD wasted it by
mistake.

Oh wells theres always ports :-)