Tag Archives: Linux - Page 2

Being a Successful Idiot

I started off trying to write this post last night with a long and complicated explanation of my experience when I first got my job. I scraped all of that in favor of something much simpler: when I started out as a real world developer (see: getting paid) I was an idiot. But please don’t misunderstand me here, I am still an idiot. The day I stop being an idiot is the day I die because, you know… I’ll be dead.

idiot

Eh, not impressed with the google image results this time

Thankfully for me, my overall financial health, and those I work for/with, I don’t let that stop me from doing my job. Frankly I would say that most people, not even just those in software development, but everyone, is in the same boat as me though. The difference between an unsuccessful idiot and their successful counterpart is what they do about it. I spend every day trying to learn new things about my craft, be that studying the code I am trying to fix or improve, reading some articles, or just talking to another developer. All of these things, especially the last, are mandatory to be one of the successful idiots.

Some other “wisdom” I have to offer:

  • Meet up with developers, hang out where they do. Be social and bullshit.
  • Troll github, google code, and whatever else you can to see what people are doing.
  • Experiment and do stupid stuff, no matter what it is (programming/tech related that is)
  • Customize your shit!! Figure out what editor you want to use and what OS, then bend them to your will to make your life easier.
  • All the things this guys says: Letter to a Young Developer I just stumbled upon that article and he already seems smarter than I am.

That’s pretty much all I have, but take it with a grain of salt. I did just write a whole post stating that I am an idiot after all.

 

FreeNAS, An Experiment In Awesomeness

For the longest time, I have had an old computer running Ubuntu with your typical samba setup so I could keep my music, videos, and backups stored in one spot, in a RAID 1 array of course. Where this setup sucks is when you want to handle using that share for Time Machine or to stream videos to your PS3/360. Sure there are ways to do it, I have tried a few with limited success, but nothing as simple as what I just experienced with FreeNAS.

This isn’t a setup guide, not really, I just wanted to point out how blindingly easy it was to get everything I have wanted out of my central storage server for a long time. Want to have Time Machine backup to your new NAS?

That was pretty hard wasn't it?

BAM! Done! One drop down and you now can use the machine for a central Time Machine backup location. Next up on the list is to be able to stream video and music to a game system. What does FreeNAS have for us?

Too damn easy.

You really can’t ask for more here, just another drop down and you are all set to go. Just make sure to enable the web user interface, or it won’t show up as a server when you power up your PS3.

Like I said, you can’t beat how easy this was, no weird hacks or spending hours on forums. Just a few drop downs after the initial setup and you are golden. True I already knew what I was doing so it may not be as smooth for others, but I think if you follow this LifeHacker guide, you will be fine too.

Apache Idiocy

So I seem to learn a lot of lessons the hard way lately, smashing my head into a problem like it is a brick wall. At least until my google-fu powers kick in and I finally find a clue to my issue.

What was it this time? What new found way have I driven myself to the brink of insanity? Apache’s mod_rewrite and this one line in my site config:

AllowOverride None

The revelation that the google-fu provided me was that this one line in my directory directives was stopping all of my efforts to get rewrite rules working. Once removed, everything worked just fine.

The lesson here boys and girls of the internets is that just copy and pasting default configs without really understanding what everything does is a dangerous path, one that will only lead to misery. Hopefully this information will find some wayward soul faster than it did me and save them a lot of frustration!

For Want Of A Google Search, The Kingdom Was Lost

When I set out to write this post I promised myself that I would try to keep my cynicism and negativity to a minimum. But the solution to what I have experienced over the past week has nearly driven me mad…

Our tale begins when I decided to finally utilize some spare computer components I had laying around to build a better PC to use at work. After receiving some parts from newegg that were still needed, the build itself went rather smoothly. My trouble began when I attempted an OS install (with my distro of choice Ubuntu 9.10 “Karmic Koala”) for some strange reason the hard drive would not show up in the damn partitioner.

Admittedly I did not devote a ton of time trying to figure out what was going on. Since I was using one of my older drives I figured that most likely it was the drive was bad, but I also considered that the SATA cable or controller was. With that to start on, I went through every iteration of the possible issues I had so far; different drive, different cable and different controller. This got me no where other than frustrated and annoyed. My suspicions then led me to the Ubuntu disk itself; did the iso download become corrupted somehow, is my CD-ROM bad, could there be an issue stemming from the fact that I was installing Ubuntu 64-bit? After about a week of working a few free minutes here and there…I was still where I started, I even installed Ubuntu Server 64-bit to try to figure out the issue.

After all this work, I was forced to swallow my pride and resort to trolling google to try and find the solution. After a few bumbling tries at getting the right search string, I finally found my answer on ubuntuforums.org:

Usually this happens when you have raid meta data settings on the hdd. 9.10 can detect them and is confused whether the hdd is part of raid array or not.

First make sure you don’t have any raid settings enabled in bios, because they can put raid info on the hdd even when it’s only one hdd. The SATA Type option should not be RAID.

Of course, all of this if you are NOT running raid. If you are, that’s another story.

Then boot the ubuntu live desktop, and in terminal do:

[sourcecode language="bash"]
sudo dmraid -E -r /dev/sda
sudo apt-get remove dmraid
[/sourcecode]
(if you have one hdd, for more you might need to use /dev/sdb, /dev/sdc, etc)

Restart the install process and it should be fine. Provided that was the problem.

After following the instructions, of course everything worked fine and the rest of the install went without a further issue.

I really want to continue on a tirade about how ridiculous an issue this is, but I will refrain since I am growing bored of writing this post. I will just leave with one last note:

Usually this happens when you have raid metadata settings on the hdd.

That, as far as I am concerned, is bullshit. After TWO hard drives (and disabling the RAID function before the second one I think) that was still an issue?!

I guess at least I got it working before I threw the computer out the window…

Sometimes I Hate Gentoo

So the other day I decided to move my web server, which of course requires me to shut it down, something that even the thought of made me cringe.

Since installing gentoo on my server, even though there are numerous positives to it, I have found that restarting gentoo is always a game of Russian Roulette. Funny though with gentoo its seems like instead of your chances being one out of six for a “severe headache” it is more like five out of six. What I mean by that is that whenever I have had to restart the damn thing, I find that something has broken. This of course I can only blame on myself since it is because I an no where near as careful as I should be when I update the damn thing (curse you emerge world). I have to say though, using gentoo will get you to learn very quickly how to diagnose and fix problems with a linux install,well at least by actually fixing it and not just reinstalling from scratch.

This restart was of course, no different, and when the OS loaded I saw an error message about the machine’s hostname:

* You should stop using /etc/hostname and use /etc/conf.d/hostname
* Setting hostname to # /etc/conf.d/hostname

# Set to the hostname of this machine
HOSTNAME=”LINUX_BOX” …
hostname: name too long
* Failed to set the hostname

Now because of this issue, not only did the system’s hostname get screwed up, but also apache would not start because there was no hostname as far as the system was concerned. Of course considering this is supposed to be a web server…not having apache working is kinda bad. First thing I did was check all the usual culprits to make sure nothing changed with the hostname:

/etc/hostname
/etc/hosts
sysctl kernel.hostname

Of course, nothing looked out of the ordinary and I was wondering how the heck it was possible that the host name was “too long,” especially since I did not change it. So like usual when I encounter pretty much any problem I don’t know how to fix, I relied on my old buddy google for the answer. As my luck would have it, I did not find anything that could help me, no matter what combination I tried of the error messages I was getting. I even tried searching how to tell gentoo to “stop using /etc/hostname and use /etc/conf.d/hostname” but once again no luck!

Before I completely lost hope, I decided to try something on a whim and rename /etc/hostname to /etc/hostname.bak (before trying to delete it) just to see what would happen…and of course that fixed it! So all that time spent trying to search for the answer, and it was as simple as FREAKING DELETING A DAMN FILE!!

Well at least it works again and I can be proud of the fact that I did not have to resort to doing a fresh install…or well…throwing the damn thing out a window…for now at least.

Optimization WordPress Plugins & Solutions by W3 EDGE