Believe it or not, I’ve just spent the last several hours spelunking around FreeBSD, and end it with a smile lol.

I got tired of a program I was writing (and a minor headache), so… I turned my attention to something that’s been on my todo list for ages. Tracking more and more of how the system handles it’s startup procedures. It would certainly be a bit more helpful to my understandings, if I had ever had time to learn x86 assembly. Maybe someday, I’ll get to that part of my todo list, lol but by then AMD64 will probably be old as a Pentium :

Well after 0500 now, time to get some sleep…. Flibin’ work early tomorrow, and another day of… annoyance.

Terry@dixie$ uptime && shutdown -p +2 'head hits keyboard, begins to snore loudly'
9:23AM up 6:15, 2 users, load averages: 0.07, 0.09, 0.06
Shutdown at Fri Oct 31 09:25:48 2008.
shutdown: [pid 3624]
Terry@dixie$
*** System shutdown message from Terry@dixie.launchmodem.com ***
System going down in 2 minutes

head hits keyboard, begins to snore loudly


h man, if I never see apt-get mania again, I’ll be happy lol.

$ sudo apt-get install -y foo
....
$ sudo apt-get install -y foo-doc foo-eggs foo-ham foo-spam

To be honest, if whoever organized this thing… doesn’t know what database normalization means, I’d be shocked as shit lol.

I’ve been using a mixture of vim/ssh to setup sal1600 with my standard operating environment, thankfully Ubuntu has a decent package search site hehe. I still need to sort out Java (jdk, jre, browser plugins), flash plugins (maybe anyway), realplayer, and codecs for mplayer. But for the most part, I’m up to go. I’ll need to go over libraries with a fine tooth come, to make sure I don’t lose anything. I really don’t like GNU/Linux, I like the Linux kernel well enough, but the mish-mash of parts pisses me off. But, given the choice of Windows or GNU/Linux, I’d rather put up with it. As far as Linux distributions go, Ubuntu is probably one of the best desktop systems. It’s certainly not my favorite distribution (Slackware), but it likes my desktops hardware much better… Something no other GNU/Linux distro has done lol. One thing I regret about my desktop, it usually needs kicking into obedience a lot of times under any OS.

Tomorrow, I’ve got 3 main goals after work:

  1. Setup XFire plugin for Pidgin
  2. Tweak my dual head X.Org configuration
  3. Combat test SWAT 4: TSS for performance

If I can play SWAT comfortably on GNU/Linux, I’m more then willing to switch back to a single monitor. Which really, is a shame b/c the X Windows System truly offers a better experience then what I’ve had with Windows multi-monitor support. The real concession will be having to shift to a usable resolution to play SWAT :.

For the most part, I’ve only used the 2nd monitor as a dumping ground for extra programs. Most of the time, I’m alternating between 2-5+ programs. On my laptop however, I’ve found it perfectly comfortable to arrange 3 virtual desktops to “split” the workload. I guess, I will probably end up with something similiar on my desktop now. 1600x1200px on a 19″ CRT is just to small for the amount of programs I interact with; but the 2880px wide (-monitor edges in the centre) that my current setup gives, is also a bit too darn big… optical scrolling sucks. This really makes me wish I had one big 22″ LCD, but I’m not sure if anything with a /sane/ price and good performance for action games, has caught up yet (probably has).

My original design specs for sal1600, did call for an LCD – not because I /like/ them, but because it’s a pain to lug a CRT around haha !

Muahuaha !!! I love this thing.

$ vim pf.conf.new
... write new packet filter configuration file
$ pfctl -nf pf.conf.new
... silent output if no errors
$ su - root
Password:
# cd /etc
# mv pf.conf pf.conf.old
# cp /home/Terry/pf.conf.new /etc/pf.conf && rm /home/Terry/pf.conf.new
# chmod 644 pf.conf && chown root:wheel pf.conf
# echo 'pfctl -F all -d' | at hhmm
... unlock the door if we screw up
# pfctl -e

enabling or disabling the packet filter (-e, -d) kills the SSH connection, but in the event of any embarrassing “oh crap, I’ve locked myself out” accidents, the at job will flush the firewalls settings and disable it. Believe me, if you’ve got a system running with no head or physical inputs (e.g. no monitor, no keyboard), ya really want to use such a thing… I still remember coming home from a *very* bad day at work, working on my rule sets, and locking myself out 5 times, and having to hook up a monitor and keyboard to the server each time >_>.

What wonders you can learn from one bad day, huh?

At least tonight, I’ve not locked myself out once… despite the days troubles, hehe. One of the reasons I like OpenBSDs packet filter, it’s simple, it’s powerful, just read the fine manual, use your gray matter, and it works! The rule sets are fairly easy to read, and OpenBSD documentation is second to none. Heck the manual page even gives the pf.conf syntax in Backus-Naur Form. The only complex part of pf, is the networking stuff – not the configuration. And of course, I love anything that is configured through a sane text file, rather then having to fire up some cornball program lol. Really, I wish I had the resources to replace my router with an OpenBSD machine, that way I wouldn’t have to learn my way around a new web-interface whenever one pops its final cork.

Ahh… At least one good thing happened this weekend!!!

the general rant of the night

Oh what fun it would be to have Google Chrome + Plugins (that work) on FreeBSD or even just chromium + plugins (that works)… It would certainly beat the dozen or so others available (all of the main stream ones are also available in native & linux versions).

All the better, would be a cross platform web browser besides Lynx that does not suck… but Google Chrome at least presents a usable technology for surfing the web 10+ hours a day, even if it’s essentially winsucks only for mere mortorals… for the time being.

And best of all, would be a web browser better then lynx, that didn’t piss me off *eventually* or prove tiresome to use for such long periods of time.

Vim rules text editing !

An interesting thing to come up in #vim, Why, oh WHY, do those #?@! nutheads use vi?. Which reminds me a lot of why vim has ruined me for all other editors, except vi.

When I first took up programming, I had started with C++ (probably not a good choice), and I selected an IDE so I could concentrate on C++, not the compiler and debugger. When I started to learn other languages, which my C++ focused IDE didn’t give a flying flub about, So I quickly came to the conclusion, that since I would never _stop_ learning, I would do best to find a general purpose code editor. Because if I kept using IDEs, I would spend more time learning to use Integrated Development Environment XYZ then programming something meaningful in language XYZ.

I knew that the most widely used (read if the machine supports text, it probably runs this editor) would likely be Emacs and Vim. I’m the kinda guy, I like to use the same tools without caring about the OS ‘too much’. Although I don’t mind if a program changes widget styles to match, I hate things like Firefox that change from Microsoft ‘Tools->Preferences” and Unix “Edit->Preferences” instead of just creating a damn “Settings” entry in the file menu. So obviously, an editor that works that way, can suck my **** lol. Emacs and Vim are fairly consistent.

At that point in time, text editing consisted of Left, Right, Up, Down, Delete, Backspace, Page Up, Page Down, Home, and End… nothing else (I had yet to learn the control modifier to them). Currently, the number of actions I know in Vi and Vim, far exceed that by the size of the death star, hell… I know more emacs then that, and I haven’t “really” used emacs in years. But I didn’t really care about that kind of stuff at the time, I just wanted something with syntax highlighting and extreme portability.

I knew full well, that Vim and Emacs were extremely powerful tools; but they would take learning to use that effectively. A knife is a simple weapon, using it ain’t. (And admitidly, if emacs was a pocket knife, it would be the “swiss army knife” to existing Swiss Army Knifes, as swiss army knifes are to classic pocket knifes.) The main thing that attracted me to Vim and Emacs, was hat they support many languages out of the box (vim 7.2 supports around ~500 by now, for syntax highlighting alone.), and could be extended with support for more.

So for one reason or another, I gave vim the first try. I couldn’t even figure out how to open or save files with it; as I had elected not to use the graphical editing interface. I basically chucked Vim in the corner and started looking at emacs, choosing XEmacs over GNU Emacs. XEmacs proved to be a quite a nice editor and very useful to me. In fact, I think my user account on Josephine still has XEmacs for Windows as my default text editor. Later on down the road, I was reading a skit, using pico, gnu emacs, and vi. Reading the part on lowly Vi, it all looked pretty darn logical all of a sudden lol. So I started to play around with Vim, using the :help system to learn to use Vi. In a short period of time, I became much more effective at editing text then Iw as under XEmacs or Wordpad; in my case vi commands were also much easier to remember before muscle memory caught up.

Why do I use Vim, and utterly hate all other editors? (Except for vi and microemacs.) Most typical editors are week in the knees, trying to ‘edit’ text with them after living with vi/vim, just feels like dancing with a cement kimono, I work with textural information non stop, be it books, web browsing, television, instant messengering, e-mail, games, etc; even the operating systems command line interface, let alone editing text files lol.

*Actually* learning how to use vim the right way, quickly lead to editing smoothly and learning how to learn more ;-). One thing I like about vim, it is modal like vi, and my brain is essentially modal as well! And unlike emacs, it doesn’t seem to slow my down when exercising my “ten fingered typist” style of using a keyboard. With vim, the only limit is you mind. Tonight, I’ve actually learned 4-6 new things (most of which are vi compatible hehe) tonight, that allow me to edit even more effectively then I have been. Which if I had to compare to the best offerings of notepad.exe or MS Word, Vim has allowed me to be 1,000,000,000,000,000,000^256 times more effective. And yesterday, I spent what, like 16 hours editing code?

If I had to use something like notepad for that, I would go out of my fucking mind !!!!!

Just for the heck of it, 1,000,000,000,000,000,000^256 is the equivalent of:

1,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

But I don’t think I know how to count that high in written English LOL.

HOWTO boot FreeBSD, Linux, and Windows XP with GAG, GRUB, LILO, and BootEasy

Abstract

This posting endeavours to allow users to successfully boot the following Operating systems: Windows XP, most GNU/Linux distro, and FreeBSD/PC-BSD; using the following boot loaders: GAG, GRUB, LILO, PC-BSD (aka BootEasy). The target audience are PC-BSD users coming from Linux.

There will be several references provided at the end of the posting.

Using the Graphical Boot Manager, GAG

Simply boot off the install media and follow the on screen instructions.

Note well that must install a boot loader such as LILO or GRUB in a Linux / partition in order to boot Linux from GAG, like most other abstract boot loaders.

Using GNU GRUB

In order to boot PC-BSD from GRUB, you must tell GRUB which drive, slice, and
partition to load from; usign GRUBs own notation
syntax
.

The systems kernel is stored on disk as /boot/kernel/kernel and it’s Loadable Kernel Module (LKM) drivers are stored in the same directory; with a .ko suffix. Although it is possible to load the kernel directly, it is better to load stage three instead, which gives you an easier interface to loading the desired kernel.

You will have to edit the GRUBs configuration file. The name and location of GRUBs configuration varies based on your Operating System. Under Debian (and thus Ubuntu), OpenSUSE, and FreeBSD based systems, you will find it as /boot/grub/menu.lst. On Fedora/Red Hat Linux and Gentoo based systems you will find it in /boot/grub/grub.conf. Many distros may provide a symbolic link to /etc/grub.conf, please refer to your operating systems documentation if you can not find the file.

Open it as root and edit it accordingly with the settings for your system. This example is is meant for triple booting Windows XP, GNU/Linux, and PC-BSD, where they are installed in that order, into primary partitions.

title WindowsXP
root (hd0,0)
makeactive
chainloader --force +1
boot

title Foo Linux
root (hd0,1)
kernel /boot/vmlinuz

title PC-BSD
root (hd0,2,a)
kernel /boot/loader

By default, if the slice number is omitted, GRUB searches the first slice which has a partition. I have however specified the slice number in this example.

If your distro has already configured Windows and Linux in menu.lst/grub.conf,
you should probably leave it as is; appending the PC-BSD entry to the
configuration. The location and file name of the linux kernel can vary a bit,
/boot/vmlinuz, /vmlinuz, and /boot/vmlinuz-x.y.z should be common, but my grasp
of Linux kernels dates to Linux 2.2, not modern 2.6 — as always check your
operating systems documentation when necessary! initrd users please see the grub
manuls notes on
linux
.

Using LILO

For those whom still prefer the LInux LOader, you can still use it for booting PC-BSD: edit /etc/lilo.conf accordingly:

# cp /etc/lilo.conf /root/lilo.conf.old
# vi /etc/lilo.conf
# /sbin/lilo

I will leave the top matter in lilo.conf as an exercise to the reader (if you use LILO, you should know this); so working off the GRUB example, the /etc/lilo.conf file should look like:

other=/dev/hda1
label=WinXP
table=/dev/hda

image=/boot/vmlinuz
label=FooLinux
root=/dev/hda2
table=/dev/hda

other=/dev/hda2
label=PCBSD
root=/dev/hda3
table=/dev/hda

NB that initrd users will want to add a initrd=/path/to/your/initrd/img rule to
the FooLinux image specs.

Users with multiple hard drives, please refer to the FreeBSD
FAQ
for details.

Using the PC-BSD Boot Loader

The header is actually miss leading, as this is really just the boot loader used by FreeBSD, a.k.a. Boot Easy or /boot/boot0. Hence forth called BootEasy.

To boot your operating systems with BootEasy, once is installed – just reboot the PC. Following the previous examples, you would see a prompt like this:

F1: DOS
F2: Linux
F3: FreeBSD

Press F1 on the keyboard to load Windows XP, F2 to chainload FooLinux, or F3 to load PC-BSD.

Note well that you must have a suitable boot loader installed into the linux / partition in order to boot linux from BootEasy.

The FreeBSD FAQ specifically recommends to install
LILO into the Linux /
, although GRUB should work fine when installed into Linuxes /

References

Post script:

If you have a problem with my spelling, grammar, or punctuation: you can pay my family to go on a shopping spree and leave me free to type slower then I can physically move my fingers across the keys.

Disclaimer

The information provided here is done for your convenience at the authors expanse, it however is without any form of warranty or guarantee of fittness — use at yur own risk, I’m not responsible.

Well, never made it to the PS2, but made it t dinner and a good nap xD

Tomorrow I need to clean the newts tank, work n deploying the next site mock up for Rouge, and finish more of todays work. It shouldn’t take to long to have this site mock up ready, so I’ll probably be working on my own stuff son, which reminds me; I wanted to make a quick back-scratcher for taking notes.

The personal project I’m working on, calls for a domain specific language; so I need to start writing the specification for it. Luckily the output is in a language I know well. All in all, it should be about as complex, as implementing a bc that compiles to dc, which is a lot simpler then implementing bc in C, lol.

Hmm, in a quick look to see what the current version of Pidgin was; I found this psting in the news page: Why I Hate “Modern” IM

This reminds me of why I stopped using the official AIM client from AOL, they turned it into a massive pile of horse-shit lol. MSN Messenger which was my first IM-technology, I gave up on Microsofts clients around 7.something. XFire is a balance between “acceptable” and “Good”, but still lacks a lot of the more, ehh… “I use this thing all day” kind of bonuses.

In my experience, all instant messengering clients are piles of garbage, taped together with a pretty face. Pidgin is just a bit more bearable then most; I use pidgin daily on Windows XP and FreeBSD, ranging from AIM to XMPP support. It sucks plenty, but it sucks less then Kopete, and it’s more portable then any other such app I’ve met :. And it’s still better then any IM client I’ve used. The only decent clients I’ve used, the very minimalist GoogleTalk client, the version of AIM that was out when I was a Potentional Recruit for [SAS], Pidgin, and Kopete, but all leave much to be desired… But they still beat the ever loving, flying, freaking heck, out of the last version of AIM I downloaded from AOL looool.

Now if only there was that perfect IM client….

If such a thing were even possible

Hole in Adobe software allows free movie downloads

This reminds me, the Flash v7 plugin for Linux, stores it’s files in a common format until the plugin exits; that can be easily played in with mplayer /tmp/plugintmp-

That reminds me, I’ve still need to write a cronjob to nuke the temp files, since one of the music streams I use, is flash based, and /tmp is nly ~512mb lol.