FreeBSD
Archived Posts from this Category
Archived Posts from this Category
This is a list of all the things that make it feel old. I started this while working at a place that ran a lot of FreeBSD machines. I never got around to finishing it because we started implementing linux boxes, but I think the complaints are still valid. The real shame is that I only wrote down 6 out of about 100 different things. Mostly it’s trivial stuff, but trivial stuff should be the easiest to fix- the FreeBSD people had a real fear of painting barns (take that as you will).
3 comments Saturday 24 Mar 2007 | Jesse Morgan | FreeBSD, Open Source, Rant
So we just got these shiny new Netgear GSM7224 layer two 24 port managed switches, and I went about setting up MRTG. mrtg and snmp are one of my weak areas- I’m not too good at networking stuff to begin with, and mrtg has always seemed just out of my reach. Well, between rewiring half of the serverroom and threatening mrtg with a stick, I got it all working! now I can finally monitor network traffic and figure out which one of these network cards is a chatty cathy.
perhaps now I’ll set up mrtg on my system at home and play around with it more.
0 comments Monday 07 Aug 2006 | Jesse Morgan | FreeBSD, Hobbies, Open Source, Work
Another well used mode is Visual Mode, which turns your cursor into a hilighter.
open a textfile with several lines of text ad move the cursor to the middle
switch from command mode to visual mode:
v
You’ll notice as you move the cursor around, you highlight different sections from the point you started to the point you left. you can press [esc] to return to command mode.
hilight a few lines of text from command mode:
[shift]v[upkey]
my adding the modifier [shift] when pressing V, you switch to ‘visual line mode’. This allows you to copy paragraphs easily.
hilight a block of text from command mode:
[ctrl]v[upkey][upkey][rightkey]
Now what good is visual mode? we” for deleting or replacing, of course! This is great when you have the following block of text:
[option min="1" max="10" ][/option]
[option min="11" max="19" multiplier="10000" ]cp[/option]
[option min="20" max="38" multiplier="1000" ]sp[/option]
[option min="39" max="95" multiplier="100" ]gp[/option]
[option min="96" max="100" multiplier="10" ]pp[/option]
and you’ve decided you no longer need min and max.
- move the cursor in command mode over the ‘m’ in ‘min’ on the first line
- press [ctrl]v[downkey][downkey][downkey][downkey]
- press the right arrowkey until the closing quote on “100″ is covered
- press ‘d’
all your text will be gone. But suppose you didn’t want the text to be gone, you wanted to replace it with something else?
- press ‘u’ and the text will reappear
- re-highlight it and press ‘c’ (text should disapepar)
- type your replacement string (use=”false”) and press [esc]
within a moment or two, use=”false” should jump up across all five lines
Visual modes are also useful for narrowing the scope of a search and replace, but I’ll get to that when I cover search and replacing.
0 comments Monday 10 Jul 2006 | Jesse Morgan | Vim, FreeBSD, Utility, Open Source, Linux
Deleting in vim can be done several ways- in insert mode, the delete key and backspace key perform as you’d expect them to, but what if you want more?
delete the character to the left of the cursor:
[esc]d[left arrow]
delete the character to the right of the cursor:
[esc]d[right arrow]
deleting the current line from insert mode:
[esc]dd
deleting the current line and the one below from insert mode:
[esc]d[downkey]
deleting the current line and the one above from insert mode:
[esc]d[upkey]
deleting current character and 4 to the right:
d5[rightkey]
deleting current line and 2 below:
d2[downkey]
You’ll notice from those last two examples that deleting characters to the left and right include the current character in the count, but deleting lines above and below do not. Weird.
0 comments Monday 10 Jul 2006 | Jesse Morgan | Vim, FreeBSD, Utility, Open Source, Linux
Vim is a great tool, but using is can be a pita in the beginning- hence, we go through the basics. There are several command modes, but we’ll only discuss a few at first: Command Mode and Insert Mode.
Command mode is used to perform actions like saving, searching, etc. Insert mode is used to insert and delete text. You’ll be switching between them a lot.
Open a file from the cli:
$ vim foo.php
change to insert mode from Command mode:
press 'i'
change to command mode from insert mode:
press [esc]
save from insert mode:
press [esc]:w[enter]
save and quit from insert mode:
press [esc]:wq[enter]
quit and do NOT save from insert mode:
press [esc]:q![enter]
An there you have it.
0 comments Monday 10 Jul 2006 | Jesse Morgan | Vim, FreeBSD, Utility, Open Source, Linux
Something that is really aggrivating the hell out of me is FreeBSD’s package management system. I’ve heard people go on and on about how it’s the best out there, but frankly I’m unimpressed.
The main reason for this is there is no way to determine ALL of the dependencies that are going to be installed when I install a package.
Lets do a comparison of a freeciv install on my workstations vs the freebsd server:
genbox ~ # emerge -tp freeciv These are the packages that I would merge, in reverse order: Calculating dependencies ...done! [ebuild N ] games-strategy/freeciv-2.0.8 [ebuild N ] media-libs/sdl-mixer-1.2.6-r1 [ebuild N ] media-libs/smpeg-0.4.4-r7
As you can see, freeciv is dependent on sdl-mixer- not only that, sdl-mixer is dependent on smpeg, meaning for freeciv to be installed, BOTH sdl-mixer and smpeg need to be installed beforehand. you see not only the dependencies, but the dependencies of the dependencies. Fortuately for this example, there were only 2 layers of dependencies and they were fairly small.
Now, lets look at freebsd- to see the dependencies, you can’t actually do it from the command line- you have to visit their website: http://www.freebsd.org/cgi/ports.cgi?query=freeciv&stype=all&sektion=all
We can see there are a couple of matching packages, but we’re only interested in
freeciv-2.0.8 A civilisation clone for X11; multiplayer Long description : Sources : Changes : Download Maintained by: infofarmer@gmail.com Requires: Xaw3d-1.5E_1, expat-2.0.0_1, fontconfig-2.3.2_4,1, freetype2-2.1.10_3, gettext-0.14.5_2, jpeg-6b_4, libdrm-2.0.1_1, libiconv-1.9.2_2, pkgconfig-0.20_2, png-1.2.8_3, python-2.4.3, tiff-3.8.2, xorg-libraries-6.9.0
This shows all dependencies, not just the ones that need to be installed- but only one layer. What packages will freetype require installed? how about xorg-libraries? The best answer I’ve been able to find as of yet is “look them up for each dependency” and then for their dependencies, and then theirs. All of this manually, all of this through their website. plus, you have to make sure that each package you look up isn’t already installed. How many packages will it take?
I have yet to find a way to show dependencies of dependencies in freebsd, and several very competent BSD admins I know haven’t been able to answer this question.
My question is, WHY!?!? This is entry level base functionality that debian, gentoo, mandriva, suse and even freaking RHEL can do- why can’t BSD, the people behind the ports system, do this?
I’m afraid I know the answer to this question- they’re comfortable with what they have. I truly hope I am wrong. If anyone knows of the proper FreeBSD way to find dependencies of dependencies on the command line, please, let me know.
0 comments Wednesday 03 May 2006 | Jesse Morgan | FreeBSD, Open Source, Rant, Linux, IRC
I don’t know if BSD can smell the gnu in my blood or what, but it is seriously putting up a fight. As I mentioned in the previous post’s followups, I got kde working finally- however every time I pop open Konqueror and hit slashdot, the entire machine locks solid. Not just konqueror, not just X; the whole machine.
Now, I know slashdot has a troll meme about BSD dying, but this is ridiculous. I had kde up and running for a good 24 hours before I popped open konqueror the first time, so it’s not like an instant hardware failure or something. I’ve been able to do everything fine in Linux for years on this hardware- Still works after this experience, as well. Konqueror, although not my first choice browser, has never had this issue before, either.
So what I’m really wondering is, where does the fault lie? Even if it is kde/konqueror based, why is a user-level application locking the entire system? Is it the fault of X, which probably falls in the top 20 most useful unix programs? Is it BSD itself? Perhaps K_F was right, maybe it is a library issue.
I know one thing for sure; VP was right when he said FreeBSD was not a workstation OS. I can’t cope with that kind of instability- I have no choice but to go back to Linux. I need to get shit done. I’ll convert my Ridllr sideproject box to BSD and see what I can do there. I hope it makes a MUCH better server than it does a workstation…
0 comments Monday 27 Mar 2006 | Jesse Morgan | FreeBSD, Open Source, Rant, Linux, Work
So, I’m compiling a list of what’s missing from my BSD install from the get go.
I know a lot of these arguments are of the vein “But that’s now how linux does it!”
Yes, I know, BSD isn’t linux, and yeah you could probably argue it’s apples to oranges or that BSD is more secure. But these are simple things. And to those who argue that BSD has better documentation than Linux, I suggest you check out the gentoo project’s documentation- it somehow manages to cover exactly what you need and does it in an efficient manner.
For cryin out loud guys, being “a real unix” doesn’t mean you have to stagnate.
1 comment Saturday 25 Mar 2006 | Jesse Morgan | FreeBSD, Reviews, Open Source, Rant, Work
Holy crap, welcome to 1980. The FreeBSD install is going to take a little bit longer than I thought. I booted off the Install CD and the first thing I noticed was the lack of color. Not shiny pretty GUI color, but angry fruit salad color. As pages of white text on black blackground whizzed past my screen, nothing stuck out as important; I noticed no dividers between sections. This is a very small, trivial thing, but it is nice. Compare and contrast with say a gentoo liveCD- I’m not even talking about the background images and framebuffered text; I just mean colored headers.
Never underestimate the power of syntax coloring.
Next up, HD partitioning- the tool they’re using is sorta like cfdisk, but ugly. I panicked at this point because I wasn’t sure where I wanted to install fbsd, and I was having second thoughts about completely wiping draccus. None of the partitions were labeled in silly ways like “hda1″, just (IIRC) ranges of blocks. Solution? Jumped back to linux, found a 15 gig partition that I had forgotten about, moved the stuff to the 150 gig linux partition, then booted off an unbuntu LiveCD I picked up at the FOSE Convention, and am currently resizing the 150 gig, deleting the 15 gig, and merging the free space so I can dedicate aroung 70 gigs to FreeBSD.
Unfortunately I’ve run out of time this morning to actually install FBSD, but I’ll get to it tonight. GParted is a very nice tool, BTW. Hopefully it’ll be done running e2fsck on the HD by the time I get home ![]()
0 comments Wednesday 22 Mar 2006 | Jesse Morgan | FreeBSD, Reviews, Open Source, Work
Well, the new job is gonna have a bucket full of FreeBSD servers. It’s been a while since I tinkered with FBSD, so it’ll be a challenge. To prepare for that challenge, I’ve decided to convert Draccus (my workstation) to BSD. The following is a list of hurdles I’ll need to surpass before I start in April:
I’m presuming I’ll have no problems with my Nvidia 6600 GT, Audigy 4 soundcard, or other common hardware. With the problems I’ve been having with linux as of late (specifically draccus) there is a moderate chance I might fully convert from Linux to BSD. If I can accomplish the above list, I will continue using FBSD for one year. The disc is burning now.
0 comments Tuesday 21 Mar 2006 | Jesse Morgan | FreeBSD, Hobbies, Open Source, Work