Archive for June, 2007

Faking MAC Address in Linux

I’m house-sitting for my brother, and I brought my computer over so I didn’t die of boredom, alone, in a house for a week. The problem is the Internet over here is hooked up directly to the modem, and the Internet provider will only provide an Internet address (IP address) to the ethernet card that was registered to them: the one in my brother’s computer. So, I turned on the computer, checked out the advanced properties of the ethernet card to get the MAC (physical) address and wrote it down. In Linux, using ifconfig, you can tell a particular interface to pretend its address is something else. If you’re using a Debian derivative (I’m using Ubuntu), you’ll probably need sudo before the command.

Note: Copy your current MAC address and put it somewhere safe, just in case – I haven’t tested to see if this is permanent, yet.

On the command line:

sudo ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx

Or, to make it permanent, put it in /etc/network/interfaces

auto eth0
iface eth0 inet dhcp
hw ether xx:xx:xx:xx:xx:xx

If you get an error message, saying the “Device or Resource is busy” then you probably have to bring the interface down first: sudo ifconfig eth0 down. Use ifconfig eth0 to check that it worked – it should show the new address if no error was reported. Once that was done, I connected my computer to the modem and the provider was much more cooperative with my DHCP requests. 😀 Yay, Internet on my computer again! 🙂

I hate hardware problems

I think my laptop has officially died. I knew the hard drive was going, and it finally went. Knowing that day was nearing, I didn’t have any important information on it, so that’s ok. Anyway, I bought a new 2.5″ hd to replace it… but it doesn’t always work. I know, that sounds strange, but depending on how I keep the hd in my laptop (manually, with my hand seems to work more often than actually putting the cover on) it seems the drive does not connect completely, and most definitely not consistently. 🙁 I know the new drive is ok, because I also bought a 2.5″ drive enclosure to hopefully salvage my old laptop drive (not able) and was able to test it out fine. Yesterday, I got fed up and decided to take apart my laptop and see if I could see a problem of a loose connection or something. Unfortunately, disassembling a laptop is not very straight-forward. Even after removing every screw I could find and prying at the snapped edges I could not figure out how to completely remove the back cover from the laptop – it still seem connected somewhere in the centre. I didn’t want to force anything so I thought I’d better put it back together. After putting the HD in again, and booting it up, I saw “IDE #1 ERROR” which means there is now something wrong w/the DVD drive. Great, I either loosened or damaged something while trying to take it apart. Oddly enough, it then pretends to work and boots…. I can use it for a short while, and then it gets read errors and I must restart, unsure if it will start again. *Sigh*

I’m not sure if I should take it somewhere to get repaired. The laptop is over 4 years old and no longer covered by warranty… so the service alone would likely be costly, before looking at any replacement parts. The battery has been dead for quite a while so that’s another thing to replace… It’s probably a better option to hold off on anything laptop-related until I need one, then just get a new one appropriate to my needs at the time.

Maybe I’ll try taking this thing apart again….

some links