This blog is about anything technically opensource or copyleft-ed/ GPL-ed, obviously most of it Linux or connected to Linux in some way.

Sunday, December 26, 2010

MAC cloning

I never thought that cloning MAC addresses was so simple, especially in Linux. But first I will digress as usual and start off as to what led me to cloning the MAC address. To skip all the blabber, goto to the bullets where it says skipblabber. :) Since my Toshiba laptop went out for service, it has started giving many problems in a row. First the heating issue led to a shutdown problem, then I messed up the alcohol used to clean the chips' heatsinks and conked my display off. The service guys fixed that but damaged all the navigation keys which almost need me to stand on them to move intermittently. With so many problems, how would I not suspect the laptop's networking when my ISP refused to connect?

My ISP kept on giving me errors on all flavours: Vista, Maverick and even downgrade installations to Jaunty! The error code indicated authentication problems, which may be protocol issues. I went ahead and got the ethernet and wifi checked elsewhere and all worked fine. Only then did I call my ISP and ask what the heck was going on. It turns out that my ISP has recently locked the account to a single MAC address for "security reasons". They wanted me to fill up a form to say that they should open my account to other MAC addresses and any misuse then would be my responsibility. I went straightaway looking for forms but they didn't tell me that Sunday their branch here is closed. I came back disappointed, but a search online landed me a simpler solution. Why go out at all signing forms when a few keystrokes get the job done?! :) So here goes:


skipblabber:
  • Get your source system (my PC thats locked with the ISP) MAC address by ipconfig /all if you're in Windoze or in good ol' Linux you check the entry for ether by ifconfig. This MAC is used further as xx:xx:xx:xx:xx:xx
  • Repeat the above for the target system (my laptop thats locked out from the ISP) so that I can jot it down in case something ever goes wrong. Contingency, that is. :)
  • To change the target MAC on Linux:
    • sudo ifconfig eth0 down
    • sudo ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
    • sudo ifconfig eth0 up (Goes off on reboot)
    • OR in recent Ubuntu systems, just right click on network ->Edit Connections -> Eth0 -> Edit -> add xx:xx:xx:xx:xx:xx to Clone MAC. (Stays on reboot)
  • To change the target MAC on Windoze:
    • Go to LAN properties -> General -> Configure (LAN card) -> Advanced -> Network Address (Property) -> add xx:xx:xx:xx:xx:xx to Value -> OK
    • Disable & enable the LAN or reboot (the Windoze way) :)
    • OR regedit/ regedit32 and expand HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\ Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}
    • While there, check all subkeys 0001, 0002... till you get your LAN card in DriverDesc.
    •  Add xx:xx:xx:xx:xx:xx to NetworkAddress value.
    • Reboot.
If all went well, ipconfig /all or ifconfig should show you xx:xx:xx:xx:xx:xx as your new MAC. You need to try connecting to your ISP after the MAC change. In case of Linux, this would mean:
  • sudo poff -a dsl-provider
  • sudo pon dsl-provider
  • OR sudo pppoeconf (if not already done earlier)
Note: In case your pppoeconf is stuck at 100% and goes nowhere, you're fast and lazy at the same time like me. :) You didn't read all that pppoeconf throws and pressed enter, enter,... If that, pppoeconf is likely stuck searching other network interfaces for announcements; this is a guess, by the way. Best way to get ahead immediately now is to unplug the LAN cable and replug it. :) Don't worry, its at 100% on eth0 search, so it will have those settings.

Thursday, December 16, 2010

Using Linux for Windows fix!

I downloaded the trial version of BitDefender antivirus for my XP today and in its scanning during the installation itself, it found some 3 issues with Windows files and quarantined them. It asked for a reboot to continue installation. On reboot, it resumed or started the scan afresh without even really giving me my desktop; it was a blank screen with BitDefender scanning in the foreground. Meanwhile, a pop-up box told me that SYSTEM is going for a shutdown as the explorer.exe or some other service crashed. Well, okay, hardly a choice! However, on restart this time, I got a command line message on NTOSKRNL.EXE missing. Obviously, BitDefender knocked it off for a virus or something and am stuck with a command line. Worse yet, I can't restore it because I don't have a DVD/CD ROM drive. (It *burnt* a couple of months back).

So much for background. Next, I rebooted in Ubuntu Maverick and searched my system for an XP install ISO dumped. Maverick is awesome, because it opened .iso as is. Within that I386 folder, there was this NTOSKRNL.EX_ that needed to be expanded. I sent it straight down to my pen drive, ran an expand on it from Vista on my laptop and got it back here. All I needed now is to get the expanded NTOSKRNL.EXE (renamed from expanded NTOSKRNL.EX_) into C:\Windows\System32\. Phew.

Windows is mighty sick but my bank webpages and software unfortunately works only with Windows. :(

Friday, September 3, 2010

Maverick Meerkat 10.10 beta

I installed the Maverick beta today and had device string error or something like that as soon as I ran off the install from the USB drive. I went to the expert mode and installed it using the old CUI interface.

I also have an XP for dual boot on my PC and chose Grub instead of Grub 2 for boot loader. Everything went well till I tried to boot XP, which too failed with an "Error 11: Unrecognized device string". On edit, I found that the boot string for XP had  (hd0, msdos1). This is wrong and works with (hd0, 0) which is Grub language for /dev/sda1. Looks like this same error had caused the install failure. I'm not sure if any or all of this is mentioned in known issues; I didn't read through them in the excitement of getting things go. :)

I'm happy with installing Maverick beta over Lucid instead of an upgrade because my Lucid had some unresolvable issue of taking the entire RAM immediately on boot up. I wasted enough time finding what was taking so much memory, but didn't succeed there! Maverick doesn't hog as much memory.

Sunday, March 7, 2010

Getting hands dirty

Its been a while since I played with any core hardware. I've been postponing my temptations to get a beagle (now more options of hawk/leopard) board since over a year for reasons best known to me in my sleep. ;) I've been itching to get my hands dirty with one thing or the other. Last I held my soldering gun was when my ADSL was screwed up due to line static. I went around checking the cause for noise in the internal wiring and hunted it down to the rosette box. I tried bypassing that seeming balloon and that needed manhandling of the delicate telephone wire onto a rugged external line. I managed to solder it out. Its a penny job if you look at it, but the pleasure of holding the solder gun with the 60-40 melting is indescribable. :)

This time around, I was pissed off with how my Toshiba A100 laptop dies off due to overheating. Since the past 2-3 Ubuntu releases, long usages have been shutting off the laptop with the touchpad almost burning. I've tried to get a laptop cooling pad in vain, but what use are external set of fans when Toshiba overheats to death on its own? Its a shame. Vista, the junk that came loaded with the A100, used to keep the laptop booted for longer hours than Ubuntu as per my usage. That, however, doesn't solve my problem. My earlier experience with trying to pull the DVD drive off the laptop or pulling the HDD didn't seem userfriendly with the Toshiba. I'm a fan of Japanese products, but all the Jap products I've used are really service unfriendly! Sadly, I tried my hands to get to the internal fan yesterday not wanting to travel to a service centre which is quite far from here, not to mention that I hardly trust any of those people to do a good job and in time.

I've this addictive habit of taking a task to its very end knowing the risks at most times. So I opened the laptop which was a painful effort. I almost assumed that I will break a couple of plastic locks and then they won't fit back easily needing a bit of gluing together. To my surprise that didn't happen, but I was shocked out enough to write off 45k (cost price) worth of my laptop because the fan was way difficult to get to and all the cables between the top and bottom of laptop came off loose! This design sickens me to no end. All the cables are half my finger's length-- no exaggeration there-- 3 buses on the main board were held on to the connectors with latching locks. (Sadly, these connectors are new to me). It scared the hell out of me when they came off due to some tagging on to them when pulling the panels apart. Not only is the distance insufficient to put them back together but now I need to push the bus in the lock putting my thick hands between the panels and then push the lock to latch in the bus with the other hand. Crazy freaks! 3 of them!! Putting them together brought out other end of one of these sick buses. That was pathetic. After I got them together, somehow, there were 2 more button type grounding-like pins. What were they thinking making those dumb gold pin button connectors? To put these back on and keep them in place while playing with other connectors was an add-on pain. When I got all this together, I was good to go... Oh! I did not mention the reason I opened the laptop was the fan, which got taken care of. Before this mess of wiring got put together, I'd pulled off the fan and pulled the parts apart, blown away a ton of dust and washed the fan, save the coils. :)

Hmm, I was saying I was good to go... or so I thought. While closing the panels together I saw that there was this flat connector which I suspected to be the display cable. Now, believe you me when I say that this Toshiba design bottoms off even those sick main board connectors! This weirdo cable was half my nail's length from the panel, loosely changing its angle, and I'm supposed to fit this onto the main board while closing the panel! Barely a forcep's flat side was reaching into this gap! No press fit this one. I closed the panels praying that maybe they are press-fitting each other... high hopes. :) The laptop booted up, but without display, a much expensive problem to fix. Well, at least I was sure that its the display cable. I tried much and gave up yesterday. Now, I'd a bigger problem to look at: find a good service centre and somehow convince them to take an open laptop without display for a fan problem! An impossible proposition, very expensive, if possible. Just for a fan, I was quoted 2k+approx 1k labour. 3k there. Add the cost of explaining an open laptop without display! Hah! I realized I wrote off 45 grands, possibly.

Today I took the issue in broad daylight. Why the hell is the cable so short? I got no answers, not even dumb ones. I opened more parts around the cable to no avail. Then I decided to pull onto the cable with all my forcep-strength. I got another half a nail's length. Whoa! More pulling risked the cable/connector/display.. God knows whats at the other end of that cable. With multiple forceps, crushed fingers and God's will I got the connector in. And the A100 is working... to what cooling benefit I do not know. If I find a powerful fan, I will likely open it again. :D


Why such excruciating details, you may ask and I'll say fair question indeed. How else do you expect me to share my pain of accepting burning 45 grands due to many sick unthought designs into an otherwise good Japanese brand called Toshiba?! :D

--

Followers