Friday, March 26, 2010

Linux and Nvidia Problem

I recently bought a new Toshiba laptop, the A505-S6033, from Best Buy a few weeks ago. For less than $1000, this laptop boasted an Intel i7-720QM processor, 4 gigabytes of memory, and an Nvidia 310M dedicated graphics card (not to mention decent speakers). There are a few things worth mentioning, since I had been using Windows XP Professional and Ubuntu for quite a long time and never touched Vista. This was the first time I was going to own a computer with Windows 7. My plan was to do some dual-booting with Windows 7 and Ubuntu Linux 9.04, a plan that was going to cause some a huge headache.

Beforehand, I had bought a Dell with Windows 7. I had owned it for a few days, when I noticed a clicking sound- I diagnosed the problem as the sound chip being bad. Prior to returning it, the Dell laptop would not properly recognize the Western Digital My Book 3.0. I didn't know whether this was a software or hardware problem. When I got the new Toshiba laptop, I had the same problem. The Western Digital My Book used pretty standard drivers, and I checked to make sure it wasn't defective. It mounts properly on Mac OS X 10.5, 10.6, Ubuntu 9.04, and Slackware 11.0, and badblocks didn't catch anything (Also note that any other external hard drive I tried worked without problems). At this point, I gave up and wanted to put my Ubuntu on the drive. I went into the Windows administrative tools and shrunk the volume so I could make room for the Ubuntu partition.

It had a few hiccups, but installed properly. One thing I noticed that on a clean install of Ubuntu 9.04, it would freeze on where the login screen shows up. I decided to try Nvidia's proprietary driver (185)- this is where my problems started. After rebooting, it seemed that X server was crashing. My major problem was it would loop the login screen- as soon as the login screen displayed, it would crash and restart the login. Upon further investigation, I logged in through the optional recovery boot of Ubuntu. From there I tried the startx command. It gave me an error-


(EE) NVIDIA(0): The NVIDIA kernel module does not appear to be receiving
(EE) NVIDIA(0): interrupts generated by the NVIDIA graphics device
(EE) NVIDIA(0): PCI:1:0:0. Please see Chapter 8: Common Problems in the
(EE) NVIDIA(0): README for additional information.
(EE) NVIDIA(0): Failed to initialize the NVIDIA graphics device!

I did many things to try to resolve this, including using the new Ubuntu 10.04, getting EDID from Windows 7 (SEC3041.bin), setting boot options to acpi=off, and trying the new Nvidia drivers. Nothing. To really abridge the solution, I went into Ubuntu again through the recovery boot option and changed the /etc/X11/xorg.conf file.

You'll eventually see a part that says Driver "Nvidia". Change that back to Driver "nv".

I rebooted, and now it lets me login properly. At this point, I am still having a few minor problems which include-

Wireless not working
IRQ issues
A few performance issues

Other than that, it seems like I am at least above water now. I am going to try compiling and using Gentoo soon, maybe I will have less problems.

Tuesday, March 9, 2010

Tapion's Theme on Guitar (Dragonball Z)

A very abridged way to play Tapion's theme. It is easier to be played with a capo on the first fret. The video shows me playing it a step down because I just wanted to get the point across.


My tablature for playing this is:
(2x):
E - - 1 - 8 6 4 6 - 1 3 4 - 4 6 4 3 -
B 1 1 - - - - - - - - - - - - - - - -- -
G - - - - - - - - - - - - - - - - - - - -
D - - - - - - - - - - - - - - - - - - - -
A - - - - - - - - - - - - - - - - - - - -
E - - - - - - - - - - - - - - - - - - - -

then,

(1x):
E - - 1 - - - 1 - 8 6 4 6 - - - - 6 - 1 3 4 4 3 1 - 1
B 1 1 - 1 - 1 - - - - - - - 6 - - 6 - - - - - - - - - - 4 -
G - - - - 1 - - - - - - - - - 6 - - - - - - - - - - - -
D - - - - - - - - - - - - - - - - - - - - - - - - - - - -
A - - - - - - - - - - - - - - - - - - - - - - - - - - - -
E - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Sorry for the really bad alignment, but you got the idea! Happy riffing!

Saturday, March 6, 2010

Understanding The Way of The Hacker

Understanding the Hacker Mind

If you own a computer, chances are you have heard the term "hacker". When the average computer user at home thinks of a hacker, they often think of a deragatory adjective associated with the word. Just to shed some quick light, the verb hacking means to cut or shape into something useful. Let's say you have a $1.00 lighter with a removable metal top. Your friend needs help starting a camp fire and he cannot get his stove lighter to work. You take out your lighter, pop the metal top off, and rig the lighter by twisting it as far as it goes to get the most flame out of it. But you don't stop there. You angle the small lever up and over back without turning the gear to release less fluid. This gives you a much larger flame that's needed. This is a very small example of how a hacker thinks.

Now with this $1.00 "hacked" lighter. You have ethics on how you will want to use this tool. Do you use it to help light camp fires or do you go around setting tents on fire? Behind the tools are the person who controls them. They can use it for good or evil- or even for a cause that blends the line between them. Behind the modern hacker is a person with a set of morals and ethics. The guys who use it for good are called "white hats" and opposingly are the "black hats". The hackers in between are known as "gray hats".

I won't go into the history of hackers- not because it isn't important, but I cannot possibly cover the extensive history of it. There's no clear starting point of when true hacking began. However, the history and culture is very important to learn. We are now at a crucial point in evolution in which we rely heavily on technology. Today, hackers are more correlated with computers and questionable activities.

To really understand what is going on, there are many examples you can use. Take for instance, Monty Python and the Holy Grail. During the Tale of Lancelot, you hear a conversation with a king and his guard. The king tells him to not let anyone in or out except for him. The guard keeps misinterpreting what he says each time. Basically what a hacker will do is manipulate protocols or words or even the way a sentence is structured. For example, let's say your mom leaves a note for your dad on the table that says:

"Give Matt $50 for allowance."

Now you come by and you see this note left for your brother Matt. You'd really like 50 bucks to spend. So using the hacker mindset, you cross out Matt's name and put your name above where you scratched off. Wait, it's too obvious- so you take out an eraser instead and erase that whole part and put your name instead of Matt's. Now it reads:

"Give Jonny $50 for allowance."

Excellent. From a hacking point of view, you have successfully taken information and changed it to something useful for you. You are a great black hat hacker. You don't stop there. You erase $50 and make it $100 instead. Now you're going to get $100 dollars instead of $50! Wait. You are getting ahead of yourself- you don't really want to get in too much trouble and want to do this in a way where you won't get caught. You decide to change it back to $50 and destroy the note once your dad has read it. That was there is no proof of your change. So once your dad reads it and walks away, grab the note and burn it with your $1.00 rigged lighter. Now when your dad finds out that he paid the wrong person, he can argue what she wrote and it can be disregarded as an error of writing the wrong name by your mom.

Sounds technical. Imagine having a full paragraph in which you can edit something and take advantage of it. To make this very short and sweet, the larger the note, the more places you can find something to edit and get something from it. Now what does this have to do with hacking computers? It's the same thing, only with computer language! It only works if you know the language and how the computer works. Imagine trying to get your $50 from a mother that has photographic memory and will remember what was written down. You can't get away with it! Knowing how everything works is very essential.

Imagine that there were an arbitrary amount of mistakes per 1000 lines of writing- let's say 5-10 mistakes. Let's say you are reading a 1200 page novel, or roughly 30000 lines. Then you can say that this book will probably have 150 to 300 mistakes. Conveniently, that's the same amount of errors in computer programs per 1000 lines of code! Just to give you an idea, your Windows operating system is written with MILLIONS of lines of code. Wow. Talk about painful.

You can have the mind of a hacker and not be a hacker. You can consider it almost like a school of thought or method of learning. The real learning is done with reading, lots of practice, and experience. A person can be very intelligent and smart, wanting to learn more, but not be a hacker. You can be not all that clever, but know a few ways to get by taking shortcuts or combining ideas and be a hacker. All that matters is the desire to learn and implement your knowledge in new ways. Take something that works in a VERY specific way and make it work in a different way through modification- that is a hack. The more time you spend in any given field, you need to make efficent use of your time. That is when hacks are needed. Having a hacker mindset is definitely a good thing.

Think of hacking as applying the "outside the box" methodology.