|
Installing Windows without a working CD-ROM drive
Tuesday, January 06, 2009 | Technology
I had this old laptop that survived probably 8 years or more (seems to be bought in 2000) and the DVD-ROM drive's broken. I ripped the thing apart hoping to find a loose connection but unfortunately it was a cracked PCB, so I gave up trying to repair the drive.
The laptop booted up fine, but the Windows 98 installation was goofed. It would BSOD every other minute and I was faced with the ultimate challenge - how do you install Windows (XP) without a freakin CD-ROM drive?
You'll need the help of another computer, that's for sure. Here's how.
Grab one of those $10 2.5" external USB hard drive chassis from a PC store and stick that laptop hard drive in there. If you're using a 3.5", get a standard USB to IDE converter. If you're using SATA, get the SATA one (duh).
Install VMware Server 1.0 on another PC. Get 1.0. 2.0 is a memory hog. It's free for download and use at www.vmware.com.
Grab a DOS floppy image from bootdisk.com; get the .IMG files, not the .EXE. Yes, you heard it. DOS.
Attach the USB disk to the PC where you installed VMware Server. Create a new Virtual Machine. Select "Windows 95" as the operating system. When prompted to add a disk, tell it to use an entire physical disk - and this would be your USB disk.
Go to C:\Virtual Machines\Your Virtual Machine Name\ or wherever you created the Virtual Machine.
Open up the .vmdk file using Notepad. You'll need to change the type from SCSI (lsilogic or buslogic) to IDE (ide).
Open up the .vmx file using Notepad and change scsi0:0 to ide0:0. Also change the type from SCSI (lsilogic or buslogic) to IDE (ide) if it's there.
When you plugged in your USB disk, Windows would have detected it as a drive. Go ahead and partition / format it using Windows's Disk Management tool. This is found by right-clicking on My Computer and selecting Manage.
Now, get to VMware Console and mount the DOS .IMG file you downloaded earlier and boot it.
Once DOS is up, check your hard drive and make sure you don't get the wrong disk mounted by running the command FDISK C:
Now, you'll need to install the DOS O/S into C: drive. Issue the command SYST C:. If that doesn't work, you'll need to run FORMAT C: /S. Make super sure you didn't set VMware to use the wrong disk before running this step!
Now that C: is bootable, copy HIMEM.SYS and SMARTDRV.EXE from A: drive to C: drive using the COPY command, e.g. COPY A:\HIMEM.SYS C:
These files are required to allow access to the high memory area (above 640kb) thus HIMEM.SYS and in turn this will allow SMARTDRV.EXE to utilize disk cache for faster disk access.
You'll also need to create a CONFIG.SYS file to instruct DOS to load the HIMEM.SYS driver. Enter the following command to do so.
TYPE DEVICE=HIMEM.SYS >C:\CONFIG.SYS
You'll also need to create an AUTOEXEC.BAT file to instruct DOS to load the SMARTDRV.EXE program on startup. Enter the following command to do so.
TYPE @SMARTDRV.EXE >C:\AUTOEXEC.BAT
Now, you may reboot the VMware machine again to ensure that it boots from C: drive fine. After that, shut it down.
Unplug and reattach the USB disk. This is to ensure you see the drive in your Windows Explorer.
Get to Windows Exporer, and copy the entire i386 folder from your Windows XP CD to the USB drive.
Once you're done, get that drive back into the old laptop/PC and boot it up.
Once you arrive at the C:\ prompt, type the following command to start the Windows XP setup process:
C:\I386\WINNT
Have fun!
posted by detach at 04:44:17 PM | permanent link
| 0 comments
I'm not visiting Sim Lim Square ever again
Tuesday, December 09, 2008 | Technology
I haven't been to Sim Lim Square (SLS) for a long time. SLS is a popular "computer" paradise for tourists visting Singapore and it is one of the "tourist attaction" that I would highly not recommend visiting.
When I was young... like 10 years ago in 1998, SLS was the place to go for geeks. If you wanted to build a new PC, you'd go to SLS. If you wanted more RAM, you'd go to SLS. If you wanted the best graphics card money can buy, you'd go to SLS. If you wanted to get the craziest overclocking tools, you'd go to SLS. Most importantly, if you wanted a bargain, you'd go to SLS.
Back in '98 SLS, shops in SLS would openly display prices that were very competitive. A bargain hunter would walk past these stores and grab paper flyers with full pricing information of all products they carry and go from stall to stall to find the best bargain for, say, a hard drive.
Although this is still practised today, many stalls are starting to use con tactics. I made about 4 or 5 visits to SLS lately because I've been visiting a luthier's shop nearby. I thought SLS had changed for the better, but in fact it has gotten worse. I shall write my experience here for the unweary shopper.
No Pricetag Scam
If you see a product without a pricetag, just walk away. Most likely they're going to quote you based on how you approach them. If you're a tourist, be sure to get the highest price quote ever. These sellers will then try to talk you into buying the product, such as offering a "lower" price if you pay cash.
Wenxi approached a stall that was selling accessorries and asked for the price of a 4GB Toshiba USB thumbdrive. The seller quoted him $45 and surely we knew it was a ripoff price and wanted to walk away after saying thank you. The seller then started asking Wenxi if he would be paying by cash. The way he asked was very dramatic - he leaned forwarded, asked if he would pay cash, then whisper the price in his ears as if it was the best deal and nobody else should hear it. $38 was the quote. Stores that were openly displaying prices for 4GB thumbdrives were selling them for $29.
That's not the best part yet. I was at the cafeteria in SingTel Comcenter and saw that an 8GB thumbdrive (not 4GB) was selling for $29.90. Pushy con(sales) man not included. I'm sure with my Challenger membership, I could have gotten it for somewhat cheaper than $29.90.
So you decide, bargain or no bargain?
Goods and Services Tax (GST) Scam
Sellers would first quote you a good price, and then just before you make the payment they'd tell you that you'll need to pay 7% GST on top of the quoted price. Most people would take this as something that they "have no choice but to pay". This is not true. In fact, GST registration is not mandatory for all shops in Singapore; GST registration is only mandatory if the turnover of a business entity exceeds S$1million annually. A proper GST registered retailer must also quote prices inclusive of GST during a sale, and at the same time must have their GST registration number displayed prominently on the sales invoices with the exact amount of GST paid reflected.
I was hunting for an Axioo Pico UMPC in SLS. I decided to make my purchase at a particular store that served me well as they were kind enough to open the box, show me the unit let me feel it's weight with a 6-cell battery. After I agreed to buy the unit, they informed me I had to pay GST. The GST added a whopping $52 dollars on to the price tag of $749 making its total slightly past $800.
Being a retail business owner myself, I knew the rules of the game and left the store. I bought the same laptop from another store at $758 inclusive of GST.
Missing Component Scam
Some of you may be aware of the last two scams, but this may be new to you. Being a mobile phone retailer, I have heard numerous horror stories relating to such scams.
In this scam, the seller would quote you a price that seemed either unbelievably cheap or very resonable. After you make the purchase, the seller will then ask you if you'd like to purchase an accessory that would otherwise have been bundled with the product.
For example, if you were buying an iPod, they would quote you $380 when everywhere else retails it at $399 and later inform you that you'd have to buy the data cable at a whopping $40 when it should have been bundled.
Counterfeit Scam
This largely applies for software, but at times also to hardware. Nowadays anything can be replicated to look just like real. Earlier this year, some SLS shops were busted by the police for selling counterfeit copies of Microsoft Windows.
As I walked past Sim Lim Square, I saw counterfeit copies of the popular Apple iPod music players on sale. They had the same packaging, material, shape and even colour choices. But what's inside of these "MP4" players are nothing like a real iPod. A sales girl tried to convince me it was an (Apple) iPod, so I tried playing with one and it was barely useable with a trashy chinese software inside.
For the unweary, Apple controls the retail prices of its products. If somewhere other than an Apple store sells an iPod, it would be very closely priced to what you'd get at an Apple store. If it's unbelivably cheap, chances are that it's a fake.
Top-up Scam
In this scam, the seller would convince you to buy something that you would later find to be unsatisfactory and then offer you a top-up for a pricier product.
Francis walked into a SLS store and saw a cordless phone that was on sale really cheap, so he asked the seller if the phone was good. The seller informed him that it's a good phone but with intermittent "poor signal quality" that was not a cause for worry. So Francis decided to get the phone and paid for it while at the same time requesting to test the unit before he leaves the store. Note that SLS shops usually do not allow you to test a brand new unit unless you commit to buy it.
When Francis made a test call, he found that there was a persistent chirp made by the phone and told the seller he could not accept it. The seller then started getting defensive and said it was exactly what he had informed Francis about - the intermittent "poor signal quality". When Francis asked for a refund, he was denied and the seller started to get aggressive. The seller also said that if Francis didn't believe him, he could test the other units and they would all be the same.
Francis knew right away this was a scam and that they had kept a defective batch of phones to close a sale. The seller later recommended him another model that was far more expensive than the one he bought. In the end Francis left the store without making the top-up.
Buyers, please note that unlike large stores like Harvery Norman, SLS stores do not have a refund policy. In fact, it is almost impossible for any small shops to honour a refund policy due to the way their business operates with cash stock. So before you make the payment, insist that you want to test the product. If it's a product that can't be tested (such as RAM or hard drive), make very sure that it's covered by a manufacturer's warranty (not the store's own warranty!)
Where's safe to shop?
Now that you've read the horror stories, where's a safe(r) place to shop?
- Funan center. This place is also touted as the "computer" paradise, but for the "richer". If you are an unweary tourist, this place is certainly much safer.
- Harvey Norman, Courts, Best Denki, Challenger, Cyberactive. Any of these big stores found at major shopping centers such as Vivo and Suntec are safe places to make your IT purchases.
- Buy direct from manufacturers such as Dell or Apple. You won't go wrong with this one - at least there's warranty coverage.
- Now for some publicity of my own, my business WhyMobile was founded on the principles of consumer fair pricing; prices are displayed prominently and quoted nett. We stand by our principles and do not practise any GST or missing component gimmick. If you need a mobile phone, this is the place to go.
Edit: I have updated the SLS page in Wikipedia hoping that this would help the unwary. Please contribute and fix the bad English!
posted by detach at 02:54:17 AM | permanent link
| 2 comments
31-bit (255.255.255.254) subnets, RFC 3021
Thursday, November 27, 2008 | Technology
For those who are wondering WTH is a /31 subnet (255.255.255.254), here's some very interesting information.
Traditionally, PtP links were assigned a /30 subnet (255.255.255.252), yeilding a network address, 2 host addresses and a broadcast address. Objectively speaking, this is a 100% waste of network addresses - for every 2 host I need, I created 2 unused addresses... unless you use IP-directed broadcast, that's a different story.
The 31-bit netmask is proposed by RFC 3021. This reduces the number of wasted addresses and makes the 2 addresses in the network completely available for use by hosts and removes the network and broadcast addresses.
So what happens to broadcast? Directed broadcasts are not supported, but 255.255.255.255 broadcasts can still be accepted. Also, the network now becomes the first host addresses, e.g. 192.168.0.0/31 is the network where 192.168.0.0 and 192.168.0.1 are both useable IPs.
For the Cisco gurus, it is currently supported by Cisco devices running 12.2(T) and above. Here's how:
ip subnet-zero interface Vlan1 ip address 192.168.0.0 255.255.255.254
My copy of CentOS 4 running kernel 2.6.9 supports this as well.
eth0 Link encap:Ethernet HWaddr 00:0C:29:CD:7C:00 inet addr:192.168.0.1 Bcast:192.168.0.1 Mask:255.255.255.254
Here's the two boxes communicating...
PING 192.168.0.0 (192.168.0.0) 56(84) bytes of data. 64 bytes from 192.168.0.0: icmp_seq=0 ttl=255 time=7.02 ms 64 bytes from 192.168.0.0: icmp_seq=1 ttl=255 time=2.32 ms 64 bytes from 192.168.0.0: icmp_seq=2 ttl=255 time=3.02 ms
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.0.0 0.0.0.0 255.255.255.254 U 0 0 0 eth0
Vincent has also verified that this is completely routable in his lab router setup (via OSPF). I'm sure it would work for other routing protocols... it doesn't really matter.
However, Windows XP gives me an error indicating that there's only 1 host bit so that means it's not supported. I'm not sure if Vista or Windows 2008 supports this, maybe somebody can verify?
ISPs, why are you still wasting your limited IP address space!?
posted by detach at 01:33:03 AM | permanent link
| 1 comments
M1 Mobile Broadband and UMPC Review
Tuesday, November 18, 2008 | Technology
My new job is quite a big change from the old - I spend more time at a customer's site which might not provide any Internet. It's amazing what happens when there's no Internet. I get into some sort of a withdrawal symptom; I would take out my iPhone and start surfing and downloading e-mails. I will go crazy and start doing funny things to the machines around me. A few hours later, I'm out of the DC and downstairs having coffee and/or falling asleep.
So I decided I should get myself a mobile broadband AND a Ultra Mobile Personal Computer (UMPC) to make myself a completely geeky road warrior.
I picked the M1 broadband which was a pretty straightforward decision because they were the only ones offering a 1mbps no-frills 6 month contract at $22+ per month. Included was free rental of a Huawei E220 HSDPA modem.
Apart from extremely crappy drivers that came originally with the Huawei device (please go to M1's site and download a software update) I must say I am very satisfied with the service so far. In fact, it is sometimes faster than my home broadband (StarHub MaxOnline 8mbps) when it comes to YouTube!
Moving on, I went to hunt for a UMPC at Sim Lim Square. It's been ages since I walked into Sim Lim Square but that place hasn't changed in years. We bumped into a store trying to sell us thumbdrives like we were angmors.
Friend: "Er, how much for this?" *points at Toshiba 8GB thumbdrive without a price tag*
Salesman: "$45"
Friend: "Er.... ok nevermind..." (we saw another store selling it at $32)
Salesman: "OK! You pay cash ah! Cash? You pay cash?"
Friend: "Yah..."
Salesman: "You pay cash! I give you $38..."
Friend: "Er, nevermind..."
Salesman: "Still too expensive?"
And we walked off yah. Nevermind. Let me get back to my review...
I tried the following UMPCs:
- Dell Mini 9
- Lenovo Ideapad S10
- Asus EEE PC 901
- Axioo Pico (MSI Wind OEM)
- Acer Aspire One Note
- HP Mini 2133
My selection criteria for UMPCs were simple. All I wanted was a comfortable keyboard/touchpad and long battery life. Everything else was a bonus.
I developed a simple keyboard test and that was to type the following piece of code:
public static void main(string args[]) { System.out.print("Hello world\n"); return; }
And also to hit the standard keyboard shortcuts like WinKey+R (Run), WinKey+E (Explorer), Ctrl+X/C/V, Alt+F4
---
Dell Mini 9
This was the first UMPC that caught my eye. On first sight the keyboard looks decent - the keys were not tiny like the other UMPCs. I almost bought it when I decided to try the keyboard further - as soon as I started typing code, I found the keyboard extremely crippled; the F1-9 keys are laid out as a Fn subkey on the "ASD..." row and the [] {} brackets were also a Fn subkey. Without the brackets, programming on this keyboard is almost impossible.
The keys were also not aligned like a typical keyboard (the Q key is almost directly above the A key but the Z key is still half a key apart from the A key). Google a photo of the keyboard to see for yourself.
Nonetheless if you are not a tech guy this UMPC might work out fine as a day-to-day web surfing rig.
Price: SGD 599
The pros: Low price with Windows XP, very small, decent mouse.
The cons: Absolutely terrible keyboard, especially for tech guys.
Verdict: 2/10 (Due to extremely terrible keyboard.)
---
Lenovo Ideapad S10
This was the second UMPC I tried because its sleek and slim design caught my eye. The code typed fine on the keyboard but there was still some difficulty getting it right. The screen was LED backlit so it has slightly better battery life than competitors. The only drawback was the lack of USB ports (only 2) and its price.
Price: SGD 799
The pros: Sleek design, pink looks very sweet for girls, LED backlight, decent battery life.
The cons: A little more pricey, only 2 USB ports, small trackpad, keyboard needs a little getting used to.
Verdict: 8/10
---
Asus Eee PC 901
I guess many people are familiar with this one and it needs no further introduction. Getting straight to the point here - I absolutely hate the trackpad buttons. They need considerable force to click.
Price: SGD 789
The pros: Cheap linux option, solid-state Disk (SSD), very good battery life, decent keyboard.
The cons: Difficult to click buttons on trackpad, weird power button location, cheap build, a little pricey.
Verdict: 6/10 (Due to poor trackpad buttons and cheap build.)
---
Axioo Pico (White)
At first I walked away from this UMPC because it was a brand that I've never heard of. (Now you know how important branding can be!) After some research I found out that this is actually by a local company and is the OEM of MSI's Wind so I decided to give it a try. To my surprise, the Pico had the most comfortable keyboard amongst all the other UMPCs. The trackpad was also decent although the buttons could do with some improvement. The best part was that they offered a 6-cell version that provides up to 5 hours of battery life.
Note: There is a black verson available. The black version has a totally different keyboard. Please see below.
Price: SGD 699 (3-cell battery), SGD 759 (6-cell battery)
The pros: 6-cell battery option gives crazy battery life, very comfortable keyboard, well built.
The cons: Not the nicest design out there but you could live with it.
Verdict: 9/10 (Due to excellent keyboard and 6-cell battery option.)
---
Axioo Pico (Black)
Although they carry the same name (Pico), the black version has a completely different chassis and keyboard from the white. It certainly does look better, but the keyboard and trackpad are terrible. Also, only a 3-cell version is available on the market for the black version as of this writing.
Price: SGD 699
The pros: Looks a little better than the white version.
The cons: Terrible keyboard and trackpad, only 3-cell option available.
Verdict: 4/10 (Due to terrible keyboard.)
---
Acer Aspire One Note
This is another laptop that needs no introduction. Just like the Asus Eee PC, I absolutely hate how the trackpad buttons are aligned.
Price: SGD 698
The pros: Cheap linux option, SSD option, good battery life.
The cons: Terrible trackpad button location.
Verdict: 6/10 (Due to terrible trackpad buttons.)
---
HP Mini 2133
There's much to debate about this one. I love the build - it's undoubtedly the best of all UMPCs. The aluminium or magnesium or whatever metallic case makes this look like a good business companion. The keyboard's also almost as good as a full-sized keyboard and very comfortable. However, the VIA CPU and reflective screen irks me.
Prrice: SGD 1199
The pros: Excellent build, excellent keyboard, runs Vista (depends on how you see it!)
The cons: Slow processor, very expensive, terrible trackpad button location, only 2 USB ports, runs hot, short battery life (about 2 hours), runs Vista (depends on how you see it!).
Verdict: 7/10 (The pros make up for the cons; you can consider it if you want a really nice keyboard)
---
So what did I get?
The Axioo Pico... and I'm loving every moment of it!
posted by detach at 01:16:04 AM | permanent link
| 1 comments
Qala Datacenter Power Outage
Monday, October 06, 2008 | Technology
There was a massive power outage at Qala yesterday. QQblogs went down, together with all the other sites hosted in the same rack. I'm furious. I've switched from datacenter to datacenter because of poor service and empty promises. Is there a datacenter in Singapore that doesn't make empty promises? Tell me about it.
Here's a list of datacenters I've been to... since probably 1998 or so:
- WingTai - Left because they closed shop
- Intermedia - They aren't exactly a datacenter but they have rack spaces that they resell. Intermedia used to be hosted at PCCW (excellent datacenter!) and later shifted to 1-Net without any notification or consent - you could imagine one day your servers went down, nobody was contactable, and the next day your servers are up and you see the traceroute changed. Of course everybody jumped and wanted out. Then I found out that Intermedia didn't pay their bills and as a result the line was cut and all were servers held up. 1-Net refused to release our servers and we were completely stuck. Intermedia people also didn't pick up phone calls and was they were no-show when we finally managed to contact them and meet them. Long story cut short, don't buy co-location from idiots.
- PCCW - Back to PCCW but as a direct customers this time, but they decided to wind up their small-time co-location business so we shifted once again. I was quite upset actually because they had the best datacenter I've been to so far!
- Pacific Interenet - Moved out after a series of power failures, network outages (due to individual racks tripping the circuit breaker), poor cooling (the datacenter got really warm at times), poor call center response, security guard missing from data center at times and poor inter-departmental communication. I have had quarrels with the security guard for removing my server when my bills were paid and when I've sufficiently notified of my account termination. Read this post.
- Qala - Good price and pretty decent network speed but a poorly setup datacenter with only 1 staging computer, no staging area, access cards held by datacenter staff (you had to make a call for them to come open the door for you), racks a little too shallow and don't fit standard Dell rails, they charge you for rack trays, and of course the recent massive power outages affecting the entire datacenter.
After all these saga I might as well just get an ADSL line and put a 21U rack in my home. The money I pay for a datacenter in a year can easily cover the cost of a steel cage and a UPS. I think that's a better alternative.
Here's my e-mail to Qala:
Yesterday (Sunday) morning at about 9-10 am the power at the Qala datacenter went out, shutting down a lot of our servers. At first I thought it was a network issue, but after a while I realized my switch was back up but some servers were still down so I went to the datacenter and found out that there's already a lot of people there all due a massive power blackout. I checked with the security guard and he say this is a planned electrical maintenance. I can accept a network outage but I cannot accept a power outage. The data center has 3-4 levels of power (mains, UPS, and backup generator and a second backup generator) so there should be no excuse for a power failure. Even if so, the three stage power backup should be sufficient to hold the data center's power for a few hours - enough to notify customers and allow us to plan and take action, e.g. shut down our servers. Because of this power failure a few of my machines had hard drive errors and I have to spend hours recovering the data. The other issue is that there's no notice of this planned maintenance communicated to us, and there was no notification that our servers were down, and that I have not receive any report of the incident from yesterday - not even an interim report which most data centers would have sent out within an hour or two of an outage. In the peak of the disaster yesterday the whole data center also had no lights (I had to bring my own lights - see picture), not enough monitor/keyboard, not enough pass and poor security access clearance. I also had to wait at the main door for almost 10 minutes before somebody opened it. When I got in, I see the whole NOC team sitting inside eating pizza and I only see 2-3 persons helping out with over 20-30 customers on site recovering their servers.


posted by detach at 03:53:15 PM | permanent link
| 2 comments
Cisco NAT for Dummies
Friday, October 03, 2008 | Technology
Apparently Cisco does not apply the KISS (Keep it Simple, Stupid) principle in the design of their product.
I have this Cisco 800 Series Router sitting on my desk now and I'm configuring it for SingTel's ADSL with a /28 static IP subnet. So I was considering hooking up the entire office directly to it and setting up NAT for the server when I was overwhelmed with the NAT terminologies used! Yes, this is my first time setting up NAT on a Cisco and it has never been more difficult.
Adding on to my list of frustrations was the lack of support for more than 1 VLAN (like, WTF?) and the inability to assign an IP address to individual ethernet ports so I decided that the router shall remain a KISS router in this case and we'll get a proper firewall box for NAT and etc. instead.
So anyway, after some reading up and twiddling, here's a summarized Cisco NAT guide for dummies.
First, there are two magical terms you have to learn - outside and inside. Cisco people (I call them Cisco people because they seem to live a world of their own) call it outside NAT and inside NAT as if they weren't confusing enough.
Sorry for my rant. Back to the topic.
- Outside stands for... outside. The WAN link. The public. The Internet. The dark side. The evil side. Whatever you may call it.
- Inside stands for... inside. The LAN link. The VPN. The private segment. The trusted side. Whatever you may call it.
So before you set up NAT, you will have to tell the router which interface belongs to which side. So for my case, ATM0 is the dark side, and Vlan1 is the trusted side.
Router> en Router# conf term Router(config)# int atm0 Router(config-if)# ip nat outside Router(config-if)# exit Router(config)# int vlan1 Router(config-if)# ip nat inside Router(config-if)# exit
Here you have it. Now the router knows where the interfaces belong, we can now start telling it what to do!
So here's another bunch of terms you have to learn.
- Static NAT. We all know this. This means a one-to-one NAT - to map an address to another.
- Dynamic NAT. This is the many-to-many NAT. How does it map I am clueless but I am thinking it's either random or in sequence. Whichever it may be, uncertainty is always bad. KISS.
- Overload NAT. This is the many-to-one NAT. It's a new term to me but Cisco people seem to know it at the back of their heads for some reason. Linux guys will know it as masquerading.
- Destination NAT. This translates the destination as opposed to the above three that translates the source address. I won't cover this here.
Static NATs are easy. These are generic source address translations. You only need to add a static NAT line and you're done. The following line adds a static public IP 12.34.56.78 that translates to 192.168.0.10:
Router(config)# ip nat inside source static 192.168.0.10 12.34.56.78
For the remaining NATs, we have some work to do.
First, you'll need to create an access list. An access list is identified by it's access list number and is used Cisco-wide to determine access to various things - such as for firewall, NAT, whatever. So it's good to plan your access list numbers. The weird part of this is that the access list uses a wildcard instead of a netmask, so take note! The example below adds my private LAN IP range to ACL number 10:
Router(config)# access-list 10 permit 192.168.0.0 0.0.0.255
Next, you'll need to consider how many outside (public) IPs you have. If you have multiple that you wish to NAT, you will need to create a NAT pool. The NAT pool is a bunch of IP addresses that is to be seen on the outside. If you only have one public IP, don't worry - no NAT pool is required - we can assign the NAT to an interface.
Here, I create a pool called "WAN" with address range 12.34.56.1 to 12.34.56.10. Skip this if you don't have a range of addresses to use.
Router(config)# ip nat pool WAN 12.34.56.1 12.34.56.10 netmask 255.255.255.0
And then we'll start to add the NAT line using the access list "10" we just created and the pool of addresses called "WAN".
If you have the same number of IP addresses both inside and outside, you'll do this:
Router(config)# ip nat inside source list 10 pool WAN
BUT if you have more inside addresses than outside, you will need to add the overload keyword, like so:
Router(config)# ip nat inside source list 10 pool WAN overload
Lastly, if you only have one public (outside) IP address, you can assign the NAT directly to an interface instead, like so:
Router(config)# ip nat inside source list 10 interface atm0 overload
Once you're done you can check your NAT statistics and translation table:
Router# show ip nat statistics Router# show ip nat translations
I haven't had a chance to test all the NATs though, so let me know if I provided any incorrect information!
posted by detach at 10:53:38 AM | permanent link
| 2 comments
Vista is OK really... since SP1
Friday, September 12, 2008 | Technology
I've just installed a fresh copy of Windows Vista SP1 on my desktop at home. Oddly this rig with a 3.0GHz processor and 1.x GB of RAM gave a Vista score of 1, and I figured out it was because of a weak integrated graphics card.
I've messed around with a few Vista machines now. Recently Eileen's laptop busted and she reinstalled with Vista. Girlfriend's new HP mini notebook also runs Vista.
The experience of using Vista is not as bad as I thought. Initially I had my laptop running with Windows XP installed with Vista Transformation Pack - it basically installs some system files and themes to make your XP system look like a Vista box, but that's terribly unstable, slow, and still lacks some finishing touches of the real Vista.
To my surprise, the copy of Vista I installed was quick and responsive and felt almost like Windows XP, only a little slower but with beefed up graphics.
Surely the new user interface and navigation takes a little getting used to, but once you start getting familiar, it's not that bad - it was the same when we switched from Windows 98 to XP back in the early 2000s.
The UAC (the annoying prompt that asks your permission all the time) is actually a decent feature and I would recommend any non saavy person to use Vista because of the presence of UAC. Without UAC, people don't even know if some malware got installed.
Also, Windows Update now comes with a desktop client. On Windows XP, it was an annoying taskbar balloon that shows a progress but you can never tell it to stop downloading.
However, I do have some complaints about Vista like everybody else.
There's a constant memory usage in excess of 500MBs (yes, I'm talking about a fresh install of Vista without the wham bang Dell/HP/IBM bloatware) and the occassional CPU and disk activity. I'm not sure if the memory was actually active or used as cache - I will check on this later.
On a desktop it doesn't seem obvious, but on portables, the extra CPU and disk activity means shorter battery life and more heat. There's some tweaks available (Vista Battery Saver?) to fix this, though.
There's also a strange network detection thing that figures out if you are on a private network or connected to the Interenet which irks me. I still don't know how it works and don't know how to fix it when it refuses to get on the Interenet.
Before you blast my ass, here's for the Linux fans out there (I'm one myself, BTW) - Running something like Ubuntu with Gnome would suck up equally as much memory as Vista, but it's user experience still lacks behind any modern commercial desktop operating system like MacOS X or even Windows XP. Linux was built to be a multi-user console operating system and should remain that way - that's why I've always installed my Linux boxes without a GUI, and cursed terribly when Oracle's (Java) installer asked for one.
Thumbs up for Microsoft, they have a pretty satisfied Vista user here. I should be migrating more of my computers to Vista when I have time.
posted by detach at 02:38:59 PM | permanent link
| 2 comments
Cure the World of Spam!
Friday, September 12, 2008 | Technology
If you ever sent mail to my hotmail address, this is what you will get from the auto-responder:
Hi,
You have reached my junk mail account. I do not check this account regularly. If you have an important message, please send it to my active e-mail address at (removed) or my business e-mail if your e-mail is business-related.
Please do not send chain mails to my e-mail account above. I do not care if somebody 100,000 miles away is dying and if the email contributes 10 cents, or if you will get a deposit in your bank account by simply forwarding an e-mail. I absolutely hate junk mails and spam, and I strongly advocate that forwarding chain mails will only contribute to the world's ever increasing volume of spam. If you do send junk to me, your e-mail address will be blocked immediately without prior notice. Lastly, if you ever do send out junk mails to others, please add their e-mail addresses to the BCC list. By including their e-mail addresses in a field other than BCC, you are forwarding their e-mail addresses to people who might harvest these information and sell them for money. And in return of your "good deed", your poor friends will be getting more endless spam.
Your understanding is very much appreciated.
So, please... cure the world of spam. Delete that junk mail and tell your friends off. It's the right thing to do.
posted by detach at 02:11:48 PM | permanent link
| 0 comments
.NET Framework Bug: System.Net.IPAddress
Thursday, June 05, 2008 | Technology
Check this out - Just stumbled upon a major bug in the .NET framework (3.5, other versions not tested)
// 192.168.0.1 long l1 = 192; long l2 = 168; long l3 = 0; long l4 = 1;
long l = (l1 << 24) + (l2 << 16) + (l3 << 8) + l4;
IPAddress ip = new IPAddress(l);
Console.WriteLine(ip.ToString());
-- output -- 1.0.168.192 <- ??!?!?!?! WTF
Update: I've posted this up on MSDN forums. Let's see what the experts say: http://forums.msdn.microsoft.com/en-US/netfxnetcom/thread/dfad951d-4d4a-45c1-b44b-7396464e247a
posted by detach at 02:24:53 PM | permanent link
| 5 comments
Chinese SQL?
Wednesday, February 27, 2008 | Technology
An extract from a MSN conversation: Kiev Leong says: Jansen says (10:45 AM):
got implement before chinese sql?
Kiev says (10:45 AM):
WAH no lol
lol my fren ask me chinese sql sia
Me says:
选 * 从 t_user 以 user_id = "老爸" 排用 first_name SELECT * FROM t_user WHERE user_id = "father" ORDER BY first_name ?? chinese sql there you have it
posted by detach at 10:49:49 AM | permanent link
| 0 comments
iPod Mini 4G Takeapart
Friday, November 16, 2007 | Technology
Update: I edited this entry to correct some mistakes and make it a little more detailed. My sis's iPod Mini 4G won't sync up. When I place it by my ear, the rythmic clicking sounds tell me it's about time the disk gets replaced. To verify if the disk was really bad, I got into diagnostic mode (hold rew + menu keys) and did a disk scan. Similary it showed some illegible error message but I knew for sure now that the disk was bad. So... I decided to take the iPod apart. Thanks to iFixit, I found a very detailed iPod Mini disassembly guide. With a lot (!) of patience, I heated the top/bottom white plastic pieces with a hair dryer until they're warm. I placed the iPod in between a vice holding the rounded sides and slowly pried the plastic pieces up using a small flat screwdriver. Soon enough the two plastic pieces came out. If you're the asthetic-sensitive type, be very careful not to force your screwdriver or otherwise you will leave dent marks on the metal and plastic surfaces. Also, my biggest mistake was to heat the plastic while prying them up. The heat actually wrapped the plastic, so... allow the plastic to cool a little first! Looking into the top/bottom I saw two metal plates. The bottom metal piece was held by a spring like action. I slowly pinched the springs together to release the bottom metal plate. 
Bottom metal plate held by spring action. Turning the iPod around, I unscrewed the two screws holding the top plate using a small philips screwdriver. (Thanks to my heli toolbox, all these tools came in very handy.) 
Top metal piece held by two screws on each side. Lastly, a ribbon connector at the bottom connects the main board to the touch wheel. I pried the connecter outwards, taking extra care not to rip the ribbon apart. (I ripped off a ribbon cable a long time ago while removing a keyboard from an IBM laptop, so I know how horrible it felt!) Right about now, just about everything holding the iPod electronics are detached. With a gentle push from the bottom, everything inside popped out. Wow...
Left to right: iPod outer case and touch wheel, main board, battery and top/bottom plastic covers. Turning the main board around revealed the lithium polymer battery (1 cell ~3.7v) and a 4GB Hitachi Microdrive. The Microdrive had rubber bumpers on its edges and was wrapped up in tape to hold them together. Removing all the tape revealed a CF connector.
Back of the mainboard with battery and microdrive. 
A closer shot of the battery and microdrive. Some searching on the Internet also revealed many success stories of using CF flash cards as replacement for these microdrives. In fact, this blog entry had all the details I needed. It seems promising, since CF flash cards are non mechnical and are not prone to mechnical failures. I'll drop by some stores tomorrow to grab a CF flash card and have this iPod all refreshed. Meanwhile, plugging the microdrive into my CF reader didn't seem to work out... 
Edit: I plugged the Microdrive to another reader and it worked. A chkdsk found about 100kb of bad sectors. Yeikes. To be continued...
posted by detach at 12:28:11 AM | permanent link
| 1 comments
Getting Started with Facebook
Monday, November 12, 2007 | Technology
I guess the Facebook madness has only just picked up in Singapore. "What's Facebook?", you may ask. "Another Friendster?" Urm... well, yea. Sorta. It's more than a Friendster. Well, with Friendster you have to stick to whatever they build. Like the photo gallery, the blog, the messaging. In Facebook, it's a little different... people (programmers, developers, geeks, whatever you call 'em...) get to create their own stuff, like games, messaging systems, etc. and Facebook brings them all together. It's open, and that's really good news coz that also means there's thousands and thousands of these applications in Facebook! So, let's get started on writing your first Facebook application. This will come in a multi-part series, somewhat like a strip-tees. It makes you wanna come back for more, but don't wait outside my door... Before you even do anything, make sure you have an account in Facebook. Add a few friends and soon enough somebody might have thrown a sheep at you. It all starts... Becoming a Facebook Developer First, add the Developer Application. You might also want to know the Facebook Developer's Site where all the documentation lives.
No certification required at this moment, but you must know one of HTML, XML, PHP, Java, ASP.NET, etc. Maybe one day there'll be a FBCAD (Facebook Certified Application Developer) Registering Your First Application Once you've added the Developer Application, you should see it on the left navigation. Click on it, and click on the button Set Up New Application. 
Here, you'll need to call your Fengshui master for the most ideal name, somewhat not in the likes of The Big Bad Teriyaki Gong. The name should be short and meaningful. In addition, I have my personal rule that the name should be no more than two words so it fits nicely into the left navigation without wrapping.
Also expand the Optional Fields. Support e-mail should be your e-mail address, the Callback URL is actually the URL of where you will host your codes. The Canvas Page URL the URL for your app on Facebook. This URL also requires a Fengshui master, since good names are probably already taken, and a name like apps.facebook.com/thebigbadteriyakigong ... Leave the rest alone and click Submit. I know it all sounds a little confusing now but I will get to this later. Downloading The API Client Go to the Facebook Developer's Site Resource Page and download the API client for your platform/language. For the sake of simplicity I'll work with PHP, although I've also developed in ASP.NET 2.0. (ASP.NET developers looking for more information can download the Powerpoint Slides from the recent presentation I gave at the Singapore Facebook Developer's Garage held in NUS.)
Facebook Hello World Having downloaded the Client API, there should be some sample codes that accompany it. Before we even start, let's learn a little about two modes of operation for Facebook Applications - FBML or IFrame. FBML, short for Facebook Markup Language is a proprietary XML markup that you can use to quickly generate very consistent Facebook-ish UI for the application you're about to create. It also has some very quick/easy-to-use FBML tags that allow you to create floating DHTML dialogs without actually writing ANY Javascript at all. Amusing? Confused?
IFrame, as we all know (if you don't... stop! Do a little catch up on your HTML and return in a bit!) basically places your site in an IFrame. The drawback of this is that you'll have to write every single bit of UI starting from the <html> tags, to your style sheets, your Javascripts, and also make numerous API calls to retrieve usernames, etc. So it all sounds like FBML is the way to go? The architectural differences between the two are obvious. FBML requires your application to "proxy" through Facebook's server, so that Facebook can parse the FBML and later translate them to HTML. IFrame simply sends the user directly to your server. That's not all. There are also other drawbacks of FBML. - Your apps are at the mercy of Facebook's FBML parsers. If they break, your apps break. If they change something, your apps break. If they decide not to continue FBML, you're gonna pee in your pants.
- Your apps proxy through Facebook's servers. This means the more latency between their servers and yours, the slower your app gets served up to the users. Facebook does enforce a (~5s?) response timeout, which I'll discuss next time.
- Facebook's server send POST requests to your callback pages. If for some reason you can't handle HTTP POST requests, you'll have to go for IFrame. IIS has an issue with POST requests and static files.
You may think now that you're just developing an app "for fun", think again. There's a possibility your app might take off, and by the time you have 100,000 users, investors queuing up, etc. you'll regret you made the wrong FBML/IFrame decision a few weeks ago... However, if you're in a rush for time, or looking to develop something that ties in nicely with Facebook's sleek UI, you can look into FBML. How FBML + Callback URL Works STOP right here if you're lost. Do read the all that stuff on Facebook Developer's Site before you proceed. So, I believe the IFrame concept is simple to understand. My biggest question mark was how FBML and the Callback URL actually works. Well, to explain it as simply as I could think of... Assuming that... - Your callback URL is http://mysite.com/fb/
- Your Facebook App URL is http://apps.facebook.com/mygongapp
When somebody accesses http://apps.facebook.com/mygongapp/somepage.php, Facebook will in turn access http://mysite.com/fb/somepage.php. Get the idea now? (Yes, I felt something hit my head when I realized this.) Simply put it, Facebook appends whatever you prefix to the application URL to your callback URL. Allright, I believe this contains more than enough information to kick off. Come back for more, soon! - Justin
posted by detach at 11:00:12 PM | permanent link
| 0 comments
I'm not the only one with a Vista problem
Friday, September 28, 2007 | Technology
Looks like I'm not the only one with a Vista problem. Check this: "Why Microsoft must abandon Vista to save itself While Vista was originally touted by Microsoft as the operating system savior we've all been waiting for, it has turned out to be one of the biggest blunders in technology. With a host of issues that are inexcusable and features that are taken from the Mac OS X and Linux playbook, Microsoft has once again lost sight of what we really want..." Read more: http://www.news.com/8301-10784_3-9785337-7.html?tag=nefd.only
posted by detach at 02:05:39 AM | permanent link
| 1 comments
Vista! A pain in the butt...
Sunday, September 23, 2007 | Technology
I've never felt so vexed (need for a stronger word) before, being tech savvy but not able to find my way around a computer that's essentially operated by a mouse. Windows Vista is getting on my nerves. Dad just bought a new laptop a few months back, which unfortunately was not pre-loaded with the correct operating system (need Vista Business to get on the office DC), so it ended up as a travel use computer and he brings it home occasionally. I'm lying on my bed now, bashing away at this blog using Firefox. Yes, Firefox. I will not touch IE. So here's what happened in the past hour or so. The computer booted up to a crawl despite it having 1GB of RAM. A quick check using Task Manager revealed in excess of 700MB guzzled up the moment Vista boots. A bunch of crazy prompts start appearing from the notification area - Windows Update, Norton LiveUpdate, Windows Defender Update, Your Computer is not Firewalled, ahhhh help! Notification Confusion Syndrome (NCS), anyone? It never gets worse than this! Fine, I'll update every damn thing. I click update. "Do you want to continue?". I click LiveUpdate. "Do you want to continue?". I click anything, "do you want to continue?" Of course I want to freaking continue, damnit! There's a reason why I am logged in as the Administrator... or am I not? Yes, I am. OK, so the old Windows reboot still exists. After an update, I need to reboot. Fine, I'll reboot. After I reboot, MORE UPDATES. You know what I mean, I will not describe the process further. The computer is still bloody slow. Now what? I usually hit Disk Defragmenter in XP. In a crazy attempt to search for "My Computer"... where the hell did that go? Oh, it's called "Computer" now. Right. Right-click C: drive, select properties. Select Tools, Disk Defragmenter (luckily it still exists). Screen starts to dim out, I have the hunch... Yes, I was correct. Freaking "do you want to continue?" prompt came back. Yes, I want to continue, damnit! Great, now I found defrag was already on a scheduled task. Since I don't trust Windows that much, I ran defrag anyway. Where did that nice colored chart go? All I see is a twirling circle. What a bore. I don't even know how effective it gets. I wanted to get on MSN... wait a minute. No MSN? Where did it go. Download and install. Then some Live Signin Assistant appears, seems like it might lock my Live ID to my Windows account. Bad. "Do you want to continue?" No, not this time! Back to the old problem. Computer is still slow. I opened up Task Manager and not for once I saw the CPU go below 20%. WTH is hogging the CPU? Task Manager itself takes a constant 4-6%. Something is not right. This is a dual core system BTW! ... WHAT IS WRONG WITH VISTA? WHY DID MICROSOFT FUCK IT UP?
posted by detach at 01:13:31 AM | permanent link
| 2 comments
Humping Dog USB
Friday, May 04, 2007 | Technology
I'ma gonna get one of these Humping Dog USB drive. $19+ from MyVirtualZone .
posted by detach at 03:56:34 PM | permanent link
| 1 comments
Software Development
Monday, April 30, 2007 | Technology
posted by detach at 05:19:56 PM | permanent link
| 0 comments
Edited template
Thursday, February 01, 2007 | Technology
I just removed my outdated homepage and made it redirect to my blog instead. I figured the only two constantly updated sections were my blog and photo gallery. Everything else was otherwise useless and a pain to maintain.
Did some minor changes to my template. I love it simple. The dumb picture on the left was actually Photoshop'ed. (Yeap, there wasn't supposed to be a big bird on my shoulder.) And what's with me and Microsoft? After I've done all the template editing, I loaded my blog up in IE and the template was slightly messed up. WHY?! I didn't use any CSS, Layers, Javascript... nothing fancy at all. It's just all tables, images and basic HTML tags. I even made it as compliant with XML as I could, so why does it always have to mess up in IE? This is not the first time! Argh!
Maybe it's just me...Or maybe it's just a lousy web browser?
posted by detach at 02:52:44 AM | permanent link
| 1 comments
Red Flag Linux
Sunday, September 24, 2006 | Technology
An absolutely fabulous spoof of the familiar operating system. If you can read chinese, even the icons are named in the same fashion. Read more about Red Flag Linux at Wikipedia .
posted by detach at 10:05:25 PM | permanent link
| 0 comments
Web Design: Time Breakdown
Saturday, September 09, 2006 | Technology
posted by detach at 03:09:19 AM | permanent link
| 3 comments
Maxtor HDD On Fire
Friday, September 01, 2006 | Technology
You wouldn't believe this: http://www.dragonsteelmods.com/index.php?option=com_content&task=view&id=351&Itemid=1 I'm beginning to worry for my HP ProLiant ML110 server already...
posted by detach at 11:50:50 AM | permanent link
| 1 comments
Oracle 10g Production Bugs
Friday, August 25, 2006 | Technology
Everything works. The only thing that broke was the dbstart script. Look what I found! ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle (line 78)
Spelling mistake (LISTENER), misleading variable name (it's supposed to be just ORACLE_HOME) and lastly, HARDCODED path name. How did this slip past their QC? I'm turning more racist by the day.
posted by detach at 07:20:40 PM | permanent link
| 0 comments
Slow VMware Console? Solution here
Monday, August 14, 2006 | Technology
I believe many out there are running VMware over a typical 512kbps broadband connection. As with my experience and a thousand of other forum posts, the console is horribly slow to work over anything less than 1mbps. The server boots faster than what I can see on the screen and I was unable to bring up the Boot Menu after a series of crazy ESC button poking for half an hour. I decided to fix it and came up with a solution that makes the VMware console work like a charm, which made me wonder why they didn't add basic lossless compression in the first place. Here's how:
Somewhere at the back of my mind, I had a vague impression that SSH could do two things that I needed so badly at the moment -- port forwarding and compression. And so it was true. I set up SSH port forwarding. I was using Windows, so I configured PuTTY to enable compression (it's off by default) as well as local port forwarding over SSH to port 902 (VMware Console runs on this port). Then I re-attempted my connection. It was still dirt slow. Then it suddenly hit me -- you can't compress an encrypted channel because the data's random. I clicked around VMware Server Console and finally found the place to disable SSL encryption (Host -> Settings) and now my console responds like a charm, even over a 512kbps link. The end result: my link's still secure (encrypted over SSH) while I get close to realtime response for VMware Server Console. Ah, the wonders of SSH and compression...
posted by detach at 03:00:54 PM | permanent link
| 1 comments
Arrival of the X2100
Tuesday, August 08, 2006 | Technology
I recieved my spanking new Sun Fire X2100 server in a huge carton box complete with CPU, RAM and DVD drive last Friday. After some close examination, the server was indeed built to my expectations -- it had a solid chassis and was nicely designed inside-out with cooling and all that would beat the shit out of any other 1U box I buy in SLS for the same price.
I removed the server from its box, installed the black DVD drive (which was a little not-so-aesthetic) and set up the server in my office rack.

The server starts like a jet ready for takeoff. The fans were so noisy (15,000rpm [!]) that we could hear it from our office two walls behind the server room -- so bad that some thought it was spoilt and that I should send it for repair. Having checked the Internet, I found many other links relating to the noise of the X2100 and that it was normal. Anyway, it didn't matter to me -- all I needed to know is that the server runs cool. Cooling is very important to hardware health, especially hard drives.
I bought two 250GB Seagate Barracuda 7200.10 hard drives (featuring the latest perpendicular recording technology) and installed CentOS 4.3 along with VMWare Server. The drive can be installed using the provided "blank" brackets and slides nicely into the hot-plug SATA bays. It's running overnight now in office for a burn-in test while the 250GB RAID-1 array resyncs. My rating for the X2100: 9/10 (minus one point for the black DVD drive!)
posted by detach at 12:07:09 AM | permanent link
| 0 comments
Home Server Experiment
Friday, August 04, 2006 | Technology

What you're looking at is my home server. (Yes, I run one at home.) It basically acts as a proxy server to cache frequently accessed web pages and allows me to do some traffic control as well. Recently my old 12" B&W monitor blew, so thanks to Hanzhong, he managed to find me a pretty cool 10" color monitor, which is sitting atop my machine now. The monitor works flawlessly.
Look closer and you'll see an old-ish Nokia 7110 sitting behind the keyboard connected to the serial port via a data cable. I've successfully gotten gnokii to work with with my phone to send and receive SMSes. The next task is to get this thing into the datacenter and setup a SMS server to allow myself to be notified of problems as well as send commands back to the server when the network is down. Pretty cool eh? I also just got my brand new Sun X2100 this afternoon and I'll be setting it up over the next few days. Stay tuned for more updates!
posted by detach at 12:26:11 AM | permanent link
| 0 comments
Datacenter Visit
Wednesday, August 02, 2006 | Technology
Yes, last Friday I was at the new datacenter, all ready to put a test server on trial. Here's some photos to go along. 
That's the tiny PSU fan I had to apply grease on. It's working fine now.

The "server" running (actually a BookPC) VMware on Linux and three other virtual machines in a small, neat package, all ready to be deployed to the datacenter.  There's the server in the "trial" rack. It's a little blur, though. 
Damn! Those two big guys are SGI Origin 2000 Supercomputers and they are standing there unplugged, unused, completely wasted! You add those two up together and they have more processing power than I can ever harness with the computing resources in office and at home.
posted by detach at 12:43:29 AM | permanent link
| 1 comments
New Hardware
Monday, July 31, 2006 | Technology

Within the past week I've gotten myself some hardware to prepare for a new venture. I bought a used 3com SuperStack II 1100 layer 3 managed 10/100 ethernet switch (above) and got it cleaned up. If you read my blog religiously (warning: bad for health), you'll know I'm a clean freak. As expected, I took the switch apart and washed the chasis in soap and water, and cleaned up the electronics using a small brush. After cleaning, I tested the switch and it works great. I upgraded the switch with the latest firmware via TFTP and switched it off -- the fans are too noisy to be running this beast at home.
I also bought a used Dell LCD panel in very mint condition at $120 (cheap!) to do all my hardware testing at home, otherwise I would have to do most of my testing during office hours, which was very difficult to concentrate on with phones ringing and people bugging you endlessly. You can see half of the LCD sitting atop the switch. Last Friday I moved my VMware test machine into the datacenter for a trial run to test out the bandwidth. Stay tuned for more updates!
posted by detach at 12:55:55 AM | permanent link
| 0 comments
Cleaning the iBook Keyboard
Wednesday, July 26, 2006 | Technology

Last night I decided to take on a challenging task - to clean up my old iBook G3 keyboard which had hair and all sorts of dirt and grime trapped underneath the keys. Note: Do NOT use a sharp object and attempt to remove the dirt from your keyboard by prying them out. It will only scratch the surface underneath and leave a black line. What you'll need:
- Lots of patience (I took 2 hours)
- A thin metal object to "unhook" the keys, like a paperclip
- A plastic container for cleaning your keys in soap and water (DON'T do it at your basin! You risk having your keys down the drain.)
- Cloth for drying parts
- Hair dryer for making drying easier
- Toothbrush for brushing off dirt
- Lots of patience
Power off your iBook and remove the keyboard before you proceed. You can follow this guide.
Before you begin, remember a few things:
- The plastic parts are very fragile, so do not use force!
- They keyboard will come apart in 4 layers. First layer being the keys, second layer holds the rubber springs, third layer is the pressure sensitive circuitry, and the last layer is the metal base. All except the circuitry layer is washable in water.
- Dry your keyboard completely before reassembly. Any traces of water may damage your keyboard and your iBook.
Once you're all mentally prepared, then go ahead and view my photoblog of the cleaning process.
posted by detach at 12:00:03 PM | permanent link
| 0 comments
Overheating Madness
Saturday, July 22, 2006 | Technology
Recently all sorts of fans around me are failing, causing heat problems. The most critical ones being the tiny PSU fan at the back of my VMWare test machine. I applied some traditional sewing machine "singer oil" to the fan last week and it dried up again this week, started buzzing crazily and eventually stopped turning. It all happened like this...
The machine was freezing for no apparent reason and I almost gave up troubleshooting it. At first I thought the PSU was overheating due to a faulty fan so I dripped some tiny amount of oil into it. Then, I thought it was the crappy Maxtor hard drive overheating and bought a CoolerMaster hard disk fan. (Actually the hard drive ran so hot I could hardly place my hands on it for more than a minute!) It didn't really solve the problem, so I replaced the IDE cable and reinstalled the O/S thinking it was a corrupt installation due to a partially faulty IDE cable and/or overheating hard disk. (Yes, if your computer hangs for no apparent reason and your parallel IDE cable looks crapped out, it is most likely crapped out in 70% of the cases I encounter.) Nope that didn't work. Then I one fine day I was looking at the thermal sensors in the setup utility and found that my Celeron 1GHz was running in excess of 90 deg C. OMFG! I touched the heat sink and it hardly felt warm to the touch. It seems like the CPU wasn't having good thermal contact with the heat sink. I dug out an old syringe of thermal paste which I used back in 1999 when I was overclocking my Celeron 300A to 504MHz (mind you, amost 68% increase in clock speed!) There was just so so so little left but it was more than enough to cover the top of the tiny celeron die. I applied the paste, put the heat sink back on, booted into linux and left some CPU intensive tasks running. My CPU never exceeded 70 deg C after that and the heat sink feels warmer to the touch than before. The machine didn't freeze either.
Just as I thought my VMware machine would be running along fine, I woke up one morning to the sound of a buzzing fan. I touched the top of the system's chasis and it was bloody warm. The PSU fan was dead again. Touching the PSU after removing the chasis cover was an extremely painful experience. It was so hot I couldn't even put a finger on it for over three seconds. This time round, I trusted the sewing machine oil no more. They were never made to be durable under heat. I applied thick, black castrol grease instead. After putting the fan back on, and being electrocuted along the way (I was testing the PSU fan without reassembling the PSU cover yet when my nails touched a metal heatsink when the power was still live), the fan didn't buzz anymore. It wasn't running as fast as before, probably due to the sticky grease, but at least it works now. After about an hour or so, the fan was running back at normal speed. I guess it takes a while to run in the grease. :) After about another hour or so of joy, my external firewire hard drive was giving problems as well, and then... of all things, I heard yet another buzzing noise. This time was from a tiny little fan at the back of the drive enclousre. Same thing -- I took it apart and applied some grease. After an hour or so, the fan runs normally. Typical black castrol grease (used in cars) are cheap stuff and should last you long enough. If you have the money, you should pay a little bit for the Tamiya Mini 4WD Grease. Those are designed specifically for small motors that run resonably hot at high speeds -- exactly what we need for computer fans. Don't use Singer Oil or spray-on lubricants. They will evaporate too quickly. Further reading on Grease
posted by detach at 01:23:25 AM | permanent link
| 0 comments
Mac Conspiracy?
Thursday, July 20, 2006 | Technology
Just 2 months ago, my girlfriend's iBook died. It simply refuses to boot. I even e-mailed Apple, and they couldn't solve the problem. The last option, as you should have guessed, was to send it in to Apple for a diagnosis at a hefty fee. I decided to take matters into my own hands and took her iBook apart. Mid-way through removing the top RF shield, I decided to check if the system could power on, so I connected up the power adaptor short the jumpers for the power switch. Surprisingly, it booted. I heard the "dang" of life. Hmmm.. wait a minute... "the dang of life"? Pun intended!
Just 30 minutes ago, my iBook died on me too! (We both have the same iBook.) This time, I decided to try my luck. Just as I was done taking apart the bottom cover, bottom shield, keyboard and RAM, I decided to give it a go, and to my amusement, my iBook booted up as well. It couldn't be that two iBooks failed the same way and the same proceedure got them booted up again. I didn't do anything but take the iBooks apart.
Maybe it was programmed to fail? But then again, it's the "dang" of life. Think different.
posted by detach at 01:07:19 AM | permanent link
| 3 comments
I run linux on...
Monday, July 17, 2006 | Technology
What else has linux been ported to? 02:22 < enclaved> I run linux on my testicles 02:22 < enclaved> The legacy support is amazing 02:23 < detach-> enclaved: it's quite sad your testicles are legacy. mine's bleeding edge ;) 02:23 < enclaved> stop shaving them then detach-
posted by detach at 02:27:39 AM | permanent link
| 0 comments
Redundancy
Tuesday, July 11, 2006 | Technology
03:01 -!- |BNz [n=sw1p@dlowless.gotadsl.co.uk] has joined #centos 03:02 < |BNz> anyone know what "tainted kernel" is all about? 03:02 < |BNz> trying to get a x306 working with centos 4.2... 03:04 < range> Well yes. A kernel is tainted if you've loaded a non free driver. 03:04 < Zathrus> which means that nobody will want to hear about it if you have problems. 03:05 < detach-> must be the sata controller 03:05 < range> Why CentOS 4.2? 03:05 < |BNz> its basically a errrm.... 03:06 < |BNz> well its hard to tell but... 03:06 < |BNz> aic76xxx isnt working 03:06 < detach-> "They say that if you play a Microsoft CD backwards, you hear satanic voices. That's nothing, because if you play it forwards, it installs Windows." 03:06 < |BNz> trying to get SCSI hardware raid working on a x306 03:06 < |BNz> (ibm) 03:06 < orc_orc> detach-: let go of your anger, boy .... 03:07 < |BNz> what makes the kernel claim tainted? 03:07 < range> |BNz: Loading of a non free driver. 03:07 < |BNz> ffs... does that mean the driver wont load? 03:07 < |BNz> is there a workaround? 03:07 < |BNz> i've been playing with rpm's and .ko files and stuff... (during the installer) 03:08 < detach-> |BNz: think ibm support short changed you. call them! 03:08 < Zathrus> no, it just means you won't get support from anyone. 03:08 < range> No. That doesn't mean that the driver doesn't load. That only means that the driver taints the kernel and everyone will tell you to go ask the vendor. 03:08 < |BNz> ibm sux0r badly... i'm convinced im 90% there though... 03:08 < |BNz> i had to vi a .ko file and turn a 686 into a 586 though :) 03:08 < Evolution> |BNz: uh, no. IBM hardware is quite nice. 03:08 < detach-> |BNz: think ibm support short changed you. call them! 03:08 * range seconds that. 03:08 < Evolution> |BNz: wtf? 03:09 < Evolution> funniest statement so far today [15:08:35] < |BNz> i had to vi a .ko file and turn a 686 into a 586 though :) 03:09 < detach-> LOL 03:09 < |BNz> anyway - so having installed linux (finally) using the right driver 03:09 < Evolution> that's the second worst thing I've ever heard. 03:09 < orc_orc> Evolution: /me suspects very recent hardware with controller sigs not yet in an older upstream installer 03:09 < detach-> Evolution: i had to vi /dev/hda ;) 03:09 < |BNz> i know!!! 03:10 < |BNz> evolution: i do know this!!! 03:10 < Zathrus> Evolution: and the worst is... ? 03:10 < dan__t> hackeriffic. 03:10 < |BNz> indeed! 03:10 < |BNz> basically ibm supply a driver for rhel4update2 03:10 < |BNz> so i'm desperately trying to use that 03:10 < |BNz> thus centos 4.2 03:10 < detach-> call ibm dude 03:10 < Evolution> Zathrus: I knew I guy who tried to edit the glibc binaries to increment the version number on solaris so he could install something . 03:10 < cannonball> I had to hexedit a mutt binary once to make it work better with an imap server (can't remember if it was scalix or zimbra). 03:10 < detach-> you paid for the hardware plus support 03:11 < Zathrus> Evolution: I'm not sure I can even properly respond to that... 03:11 < |BNz> in terms of support -erm, i'm not sure we have any 03:11 < |BNz> basically the basic issue is - that centos sees a raid1 hw array 03:11 < |BNz> as sda and sdb. 03:11 < Evolution> basically the basic issue? wtf 03:11 * Evolution phones the dept of redundancy dept 03:12 < detach-> rofl
posted by detach at 03:30:52 AM | permanent link
| 0 comments
Pun Intended
Sunday, July 09, 2006 | Technology
posted by detach at 03:58:13 AM | permanent link
| 0 comments
Smashed! To powder!
Monday, April 24, 2006 | Technology
I just got a piece of spoilt 9.1GB SCSI SCA2 hard drive from Hanzhong. The moment I got home, I dismantled the drive while sitting on my bed cos I was expecting the usual shiny platter in a dust-free environment. To my surprise, I saw black powder falling from the hard drive as I took the top cover apart. The hard drive platter was filled with BLACK POWDER, very similar to those you find in laser printer toner! I couldn't make out what happened but I think either the drive heads were smashed or the magnets from the voice coil assembly disintegrated. I've just put the cover back on the drive lest more powder lands on my bed. I can't wipe off the stains! I will find a day to take photographs of the drive internals. It's really one in a million to see hard drives smashed to such an extent. Meanwhile, stay away from IBM SCSI drives.
posted by detach at 11:25:30 PM | permanent link
| 0 comments
Solaris 10 and Software RAID
Friday, April 14, 2006 | Technology
Managed to get two old 9.1gb SCSI (80-pin SCA2 LVD) drives from SLS at $80 each for the old Sun Netra 200 server waiting eagerly on my desk to serve public web requests. I got a minimal configuration of Solaris 10 installed and went on to create software RAID on the two noisy SCSI drives which I described to Jiajing as machine gun fire at "own-time, own-target". As I created the RAID mirrors, the drives started their machine gun fire as the RAID resynchronization took place. It was a tedious, but yet amusing process altogether. I shall document it here for future reference as well! First, for any software RAID to work, both disks must have slices (a.k.a. partitions, for the Linux/Windows people) of the same size. For me, I prefer to put it as "laid out the same way", which means both disks are the same type and have identical slice start and end cylinder. This would ensure that the slices are exactly the same size down to the cylinder level. In Solaris, we use the format utility as opposed to the fdisk utility in Linux to create slices and manage your disk (confusing for Windows users? Hah!) There's more to the format utility than partitioning, but I won't detail them here.
Next, we need a little understanding of state databases. Solaris Volume Manager stores information of volumes in state databases. Since it uses a majority consenseus algorithm -- which means at least 50% of state database replicas must be consistent to work -- you'll need to create at least three (3) state databases so that if one is corrupt, your system still boots.
For a RAID-1 (mirror), you should create two (2) 64mb slices on each disk for state databases (metadb) to make a total of four (4) of them. In an even a mirror fails, at least two replicas still exists (2 out of 4 is 50%). An example disk layout would therefore look like: /dev/dsk/c0t0d0s0 root 8GB /dev/dsk/c0t0d0s1 swap 512MB /dev/dsk/c0t0d0s2 metadb1 64MB /dev/dsk/c0t0d0s3 metadb2 64MB If you didn't plan your partition layout and started installing Solaris 10 with a whole disk fully utilized, you wouldn't be able to proceed with setting up RAID. Let's create the state databases on both identical disks: $ metadb -af -c 2 /dev/dsk/c0t0d0s2 /dev/dsk/c0t0d0s3 $ metadb -af -c 2 /dev/dsk/c0t1d0s2 /dev/dsk/c0t1d0s3 Next, we need to understand that each RAID-1 mirror consists of two RAID-0 submirrors. Therefore, we need to make a single disk slice into RAID-0 before we can mirror two slices as RAID-1. Here, we set up RAID-0 meta devices named d11 and d12 from slice 0 of both disks. $ metainit -f d11 1 1 /dev/dsk/c0t0d0s0 $ metainit -f d12 1 1 /dev/dsk/c0t1d0s0 And then we'll create the RAID-1 meta device called d10, which contains RAID-0 meta device d11 as a submirror. $ metainit d10 -m d11 At this point of time, we have a RAID-1 device d10 with only one working mirror d11. Now, we get the system to recognize and use the newly created RAID-1 device as root and reboot to start using it.
$ metaroot d10 $ reboot
Once the system's booted, we'll attach the submirror d12, so that d10 will now have two submirrors -- d11 and d12. $ metattach d10 d12 If you check, you should see the the newly created mirror d10 resyncronizing, and your hard drive LED glowing as well! Check how your meta devices are doing on a regular basis:
$ metastat d10: Mirror Submirror 0: d11 State: Okay Submirror 1: d12 State: Okay Pass: 1 Read option: roundrobin (default) Write option: parallel (default) Size: 2100735 blocks (1.0 GB)
d11: Submirror of d10 State: Okay Size: 2100735 blocks (1.0 GB) Stripe 0: Device Start Block Dbase State Reloc Hot Spare c0t0d0s0 0 No Okay Yes
d12: Submirror of d10 State: Okay Size: 2100735 blocks (1.0 GB) Stripe 0: Device Start Block Dbase State Reloc Hot Spare c0t1d0s0 0 No Okay Yes Repeat process for each disk (except if it is not the root disk, skip the metaroot and reboot step!)There you have it, Solaris RAID!
posted by detach at 10:25:18 AM | permanent link
| 0 comments
Tammy Saga: How to Protect your Privacy
Thursday, March 23, 2006 | Technology
I just wrote an article on how to protect your privacy at WhyMobile which should be taken seriousy, given the rate of handphone theft nowadays. ;-)
posted by detach at 01:05:43 PM | permanent link
| 0 comments
Virtualization with VMWare Player
Tuesday, March 14, 2006 | Technology
I've been running Linux on VMWare Player for some time now and is very satisified with the performance (almost near native performance) it gives. I will be trying out other OSes on VMWare as well as other virtualization technologies over the next months. I am still experimenting with the OS X port of Qemu with Windows 2000 and SuSE (OSS) 10.0 I will write more on that later. I've created a Virtual Machine Template (75kb) for those who are new to this. It includes a 2G disk to start with. I've also included the qemu-img program so that you can create larger disk images when you need to. Usage: qemu-img create -f vmdk <filename.vmdk> <size G> E.g.: qemu-img create -f vmdk disk.vmdk 4G The VMX file is basically a text file containing configuration information. I'd recommend you to edit it and set the guestOS before proceeding. The following are guestOS values you can use:
Microsoft Windows, 32-bit
* winVista = Windows Vista (experimental) * longhorn = Windows Longhorn (experimental) * winNetBusiness = Windows 2003 Small Business Server * winNetEnterprise = Windows 2003 Enterprise Server * winNetStandard = Windows 2003 Server * winNetWeb = Windows 2003 Web Server Edition * winXPPro = Windows XP Professional Edition * winXPHome = Windows XP Home Edition * win2000AdvServ = Windows 2000 Advanced Server * win2000Serv = Windows 2000 Server * win2000Pro = Windows 2000 Professional * winNT = Windows NT * winMe = Windows Me * win98 = Windows 98 * win95 = Windows 95 * win31 = Windows 3.1 / Windows 3.11 * windows = Other Windows
Microsoft Windows, 64-bit
* winVista-64 = Windows Vista x64 Edition (experimental) * longhorn-64 = Windows Longhorn x64 Edition (experimental) * winNetEnterprise-64 = Windows 2003 Enterprise Server x64 Edition * winNetStandard-64 = Windows 2003 Server x64 Edition * winXPPro-64 = Windows XP Professional x64 Edition
Linux, 32-bit
* ubuntu = Ubuntu Linux * redhat = Red Hat Linux * rhel4 = Red Hat Enterprise Linux 4 * rhel3 = Red Hat Enterprise Linux 3 * rhel2 = Red Hat Enterprise Linux 2 * suse = SuSE Linux * sles = SuSE Linux Enterprise Server * mandrake = Mandrake Linux * nld9 = Novell Linux Desktop 9 * sjds = Sun Java Desktop System * turbolinux = Turbo Linux * other26xlinux = Other Linux on a 2.6.x kernel * other24xlinux = Other Linux on a 2.4.x kernel * linux = Other Linux
Linux, 64-bit
* ubuntu-64 = Ubuntu Linux 64-bit * rhel4-64 = Red Hat Enterprise Linux 4 64-bit * rhel3-64 = Red Hat Enterprise Linux 3 64-bit * sles-64 = SuSE Linux Enterprise Server 64-bit * suse-64 = SuSE Linux 64-bit * other26xlinux-64 = Other Linux 2.6.x 64-bit * other24xlinux-64 = Other Linux 2.4.x 64-bit * otherlinux-64 = Other Linux 64-bit
Sun Microsystems Solaris
* solaris10-64 = Solaris 10 64-bit * solaris10 = Solaris 10 * solaris9 = Solaris 9 * solaris8 = Solaris 8 * solaris7 = Solaris 7 * solaris6 = Solaris 6 * solaris = Other Solaris
Novell Netware
* netware6 = Netware 6.x * netware5 = Netware 5.x * netware4 = Netware 4.x * netware = Other Netware
FreeBSD
* freeBSD-64 = FreeBSD 64-bit * freeBSD = FreeBSD
Apple Darwin
* darwin = Apple Darwin (unsupported)
Other
* other = Other OS * other-64 = Other 64-bit OS
posted by detach at 11:16:31 AM | permanent link
| 1 comments
iBook G3 Hard Drive Upgrade
Sunday, March 12, 2006 | Technology
I finally had enough of the 4200rpm drive in my old iBook and bought a Seagate Momentus 40gb (5200 rpm) drive at the IT fair for S$114.
I woke up in the morning and began taking my trusty old iBook G3 apart. It proved true that the iBook is completely non user-serviceable. I managed to get my hands on the Apple iBook Service Manual and followed the instructions step-by-step till I got to the hard disk embedded deep within. (It's a good idea to have them printed out.)
There are many sites on the Internet documenting the hard disk replacement procedure for iBook G3. However, many of them document unnecessary steps that could cause potential confusion, additional cold sweat and possibly even heart attack. So read this: if you're about to dismantle your iBook for a hard drive replacement, THERE IS NO NEED TO REMOVE THE BOTTOM RF SHIELD. You only need to remove (in the following order) the battery, the keyboard, bottom case, top case and top rf shield. Additionally, you can call me to do the replacement for you at a fee. The entire surgery was two solid hours under a table lamp. I had pen, paper, blutack, tape, and an entire set of screwdrivers (including torx type) prepared. As I took screws out, I blu-tacked some of the larger screws beside the holes it should go. For really complex ones, I drew a screw map to identify where each screw should go. At one stage (Top RF shield) there were over 10 screws of different sizes.
During the replacement I noticed many things that the Apple Service Center has done not in accordance to the service manual. My rubber feets have fallen off as they have not been replaced with new feets. My top rf shield has 3 missing pieces of foil, probably torn off by Apple engineers during the logic board replacement and my display hinge screws were badly worn out to an extent that there is no way to unscrew it other than using a plier. If you're ever buying an Apple product, be prepared to repair it yourself. After reassembling my iBook, I reinstalled Mac OS X and ran XBench. This time my hard drive faired much better (almost twice) than before and I could feel the difference. I took much lesser time to load applications as well. For the geeks, faster I/O completion means your CPU is freed to do other things quickly. This does, in some ways, effectively improve processing speed. Overall, I'm happy with my upgraded iBook, but still extremely unhappy with Apple Care. Maybe Steve ought to take care of this.
posted by detach at 12:03:55 PM | permanent link
| 2 comments
Microsoft Woes
Monday, May 26, 2003 | Technology
Man, Microsoft's history for me. I'll use Windows machines on a need-to-use basis. You couldn't hate proprietary technologies more. I just got myself a 12" Apple iBook. It's a neat little beauty. However, the first switch for Windows users would have been a headache. No more Windows Explorer, and that's not only it -- not until you realize that you can't fucking export mail in Outlook! I spent hours trying to figure out how the hell I could get my mails out of Outlook and finally found Netscape which could import mails from Outlook and save them in standard UNIX Mbox format. I finally got my mails imported into Mail.app after countless hours of trying. Installed Office v.X for Mac and realized that... oh shit... Microsoft Entourage (an Outlook clone for Mac) stores its mail in some proprietary file... and same story -- it couldn't EXPORT the mail. It could import virtually almost everything but not export them. What's even more interesting was that the Mac "Outlook" couldn't import Windows Outlook files... great... It makes me realize that Microsoft made it obvious that they were trying to prevent people from switching away from their products. So much for my trust in Microsoft... And so... I was happily using my Mac when I recieved a CD from Starie that she copied from the video Kenneth made while he was in Pulau Ubin. To my horror, the video was in WMV format. Awesome, now I need to power up a Windows machine to view the video. Just as I expected, some 90% CPU usage on a PIII 1GHz and almost crappy video quality. a 33 minute movie was 420MB huge. I thought... maybe a Mac would have better performance (coz I had better performance on my 800MHz Mac when viewing a Quicktime video than on a 1GHz Windows) ... but I was wrong. The video was almost as crappy as you would view it on a 300MHz Windows box and I concluded that Microsoft products should be scrapped on Mac machines, or for that matter of fact, everybody should just dump Wintel boxes and get a Mac. I decided to convert the WMV file to an MPEG-4 file.. and that's what I'm doing right now while I type this blog. Hopefully it's done really quick and I can place it online for download.
posted by detach at 04:45:28 AM | permanent link
| 0 comments
|