Hacking My MAC Address, And Recovering Photo's off of an SD card.

For those of you anxiously awaiting my new addition to the tutorial series, I just want to say sorry that it’s been a while. Sometimes life has to come before hobbies and my life has been pretty exciting this past week. First of all, my family has moved across town into a new house, so most of my time has been taken up by unpacking, spending money, installing appliances etc. Also my wife and I are both a little on edge because we only have a couple more days left before we have a new addition to our family, my second son Clinton. Honestly, with all of this going on it’s a miracle that I managed to get my new motherboard installed and my computer up and running again!

The installation of the new mother board went about as smooth and flawlessly as I could have possibly hoped for. After getting the hardware all hooked up, I just hit the on button and everything booted perfectly. The only problem that I ran across, and the first topic of this post, was that my Ethernet card’s MAC address, for whatever reason, wasn’t being recognized by my router when trying to add my PC to the reserved IP list. Of course I started out with a google search, which resulted in several people trying to fix this same problem in Windows, and mostly failing (sadly for them this fix involves registry hacking apparently) and a bunch of results saying “the mac address is built into the hardware, you can’t change it!” which I called BS on.

So then I moved onto my next resource, the Arch Linux Forums. Here I found about 100 different solutions to my problem, none of which really suited my needs.
I learned that the command to spoof your mac address is ifconfig {interface} hw ether XX:XX:XX:XX:XX:XX which is great, did the job. However, to run this command, the interface must be down, and then brought back up again afterwards. Also, the change is not persistent, as in the minute you reboot, your mac is back to the original factory defaults! LAME! So then I looked into sticking this command into one of the start-up scripts somewhere. The first thing I tried was inserting the above command into /etc/rc.local. This did achieve the desired affect of changing my MAC, however it performs this after the network daemon has already started, meaning that once booted, I would have had to re-bounce my network connection to get the reserved IP assigned to me. double lame. I finally settled on sticking the above command into /etc/rc.multi prior to the “Start daemons” loop. and now I have the desired mac address, and can have my reserved DHCP.

The next most interesting thing I’ve had to do this week is recover all of my family photos for the past few months off of a corrupted SD card. For whatever reason, the camera that we purchased back around Christmas occasionally tends to completely destroy the SD card filesystem for no reason at all (this is the first time it has ever happened to us, we learned that it is a commonly existing problem from product reviews on-line). My wife had the first go at recovering the data from the disk. After a while she came across a “free” program on-line that would recover the data. It turns out that it worked! but to “get” the photos that had just been recovered by the software, you had to download their $30US “download” software. What a scam. So she passed the task onto me. After a little bit of hunting around I discovered this fun program for rescuing data and photos from corrupted volumes called “testdisk” (available in the Extra repository for Archers) which includes a software called “photorec” specifically designed for hunting down and recovering photographs and movies. It worked like a charm :) took about 5 minutes, and recovered all of my photos from the last year flawlessly. I looked at the product documentation and it seems both testdisk and photorec are going to be pretty handy additions to my Linux tool set. I suggest trying them out some time!

Leave a Reply