Sunday, November 01, 2009

Installing Ubuntu over USB flash drive RAID array in Intel Atom 330

Ubuntu makes it pretty simple to install it over USB flash drive RAID array. You can install it using flash drive itself.

Why would you do it? Flash drives are pretty cheap nowdays, even for capacities worth GBs. You can create RAID array out of more than one flash drive and have a system that can tolerate disk failures. Linux distros do not eat up diskspace like Windows so you can fit entire box in minimum two flash drives.

I downloaded Ubuntu server installation from a mirror and transferred the ISO to flash drive using Unetbootin. This has worked effortlessly for desktop live CD and I could boot in minutes. The installation also transferred itself onto other flash drive in system. However, I could not find any advanced options during live image - hdd transfer. So decided to download Server ISO.

It took 5 hours to get the image from net :( Unetbootin transferred it to flash but the installation kept complaining about missing CD-ROM drive. There are few links on web which mention you can mount the filesystem on /cdrom during setup. It worked but then setup kept complaining about something or the other. Finally hacked out CD-ROM drive from sister's desktop at midnight (she stays few miles away).

Once CD-ROM drive was there, setup was breeze. You need to make sure that USB emulation is set to "HDD" or "Fixed Disk" in the BIOS setup and boot using CD.

Setup is RAID aware and it provides easy options to create software RAID volumes. Setup also installs GRUB on all drives. This helps if you loose one RAID member and reboot.

Here are few screenshots during the install

- Choose manual mode to create partitions
- Create partitions on member drives first (keep sizes of partitions same. They can be in any order)
- Once partitions are created, come back to partitioning menu and create MD devices. Here you need to create as many partitions you need and make sure you select partitions of same sizes.
- Provide mount points to each partition and other usual parameters
- Commit changes and proceed, setup will do its job
- Reboot and test.




I tried removing one flash drive online and the system continued. However, if you try to reinsert that drive back online, the drive letter changes and hence the drive wont join RAID group. I would suggest you shutdown system, add drive and then restart. This is not the ideal thing to do but if the system is so critical, you wont be running it like this anyway ;)

If you are going to add a HDD after this, make sure that the HDD is not part of system boot sequence in BIOS. I am also not sure how the system will behave if you add more flash drives to the system. When the system is on, it should not cause harm, however, during boot the system might assign different drive letters. A quick look at mdadm.conf makes me believe that the RAID array is configured to look for disk signatures so you are at no risk if drive letters changes. Dont have a flash drive now to check that.

Let me know if it works for you. Following two links have been quiet helpful to me.

http://www.dedoimedo.com/computers/linux-raid.html#mozTocId435101
https://help.ubuntu.com/9.04/installation-guide/i386/boot-usb-files.html
http://www.linuxforums.org/forum/ubuntu-help/138532-solved-install-packages-cdrom-thru-terminal.html

Tuesday, October 27, 2009

Are you fan of DXDIAG?

Whats the first (or one of the firsts) things that you do after installing a new instance of Windows?

I usually run DxDiag. Is this something that you too do?

Diagnostics utilities always amused me. It started with CheckIT for DOS which I ran on MS-DOS 3/4. My usual screen that time was MS-DOS prompt and then GW-BASIC interpreter. No wonder CheckIT caught my attention. It was something screenful and had lots of information - much more than I could interpret. I behaved exactly like Number 5 from the movie - Short Circuit. I ran around craving for "Input" most of the time then and diagnostics gave me that :)

Windows 95 came along and it took away most of the fun of running MS-DOS diags. But DxDiag was cool. Watching the DxDiag video test somehow became "the thing to do". Running it and watch the white rectangle and colourful cube jumping around the screen was quickest and coolest thing you could do on Windows, wasn't it? And it had quick MIDI test which rocked on my Creative AWE 64.

Sad to see DxDiag crippled in the Windows 7 RTM...no video tests in DxDiag  :( :( :(



Saturday, October 17, 2009

Longest time without formatting XP :)

My laptop harddisk has started locking up recently. Seems like a sign of failure in near future :(

Incidentaly this laptop has not been formatted since I messed up with it when I got it first. A small VBScript found here tells me that it was done on "Friday, January 05, 2007". So that means I am using one install instance of Windows XP for 2 years 9 months!!!! It has slowed down over time but not till the point that its needs a format :)

The first format was accidental. I had got it home and after booting up, I decided to install Windows 2000. I immidiately created Ghost image of the partition and installed Windows 2000. Just to discover that there are no drivers and I had no pen drive etc to download and copy using my desktop. Ghosted image was put back in minutes and thus XP stayed on.

This is most used instance so far ever for me.



Tuesday, October 13, 2009

Make yourself a Nokia N series USB Charger cable

Many a times I forgot my charger at home and the battery died while at work. Carrying a charger worked opposite as I forgot it at work. Earlier I used my mobile for internet access and it required charger to be plugged in to avoid disconnection. Plugging laptop and phone to their chargers and connecting via cable caused chassis current due to unbalanced ground connections. Nokia had a data cable + charger cable but its not available around here. I could buy two chargers but creating a chargerless solution for yourself seems more attractive :)

Follow these simple steps to make yourself a Nokia N series USB Charger cable. This can work for older Nokia phones as well if you get the right connector. Nokia chargers, like most other chargers, are nothing but 5VDC adapters without any intelligence. The phone handles all charging functions using this 5VDC supply.




Requirements:
  • USB cable - This can be any USB cable as long as you don't need it for anything else. It needs to have typical USB connector to connect to your laptop or desktop. Connector at the other end can be anything as it would be discarded anyway.
  • N series connector - I bought a cheap Nokia adaptor charger adaptor cable. One end of this connects to older Nokia chargers and other end connects to the handset. This is officially called CA-44
  •  
  • Wire stripper/cutter tool
  • Insulation tape
  • Digital Multi Meter with continuity tester
 Steps to follow

  • Cut the USB cable in between. You can cut it to desired length. It need not be as long as it is.
  • There would be four wires inside - Red  (+5V), White (Data+), Green (Data-) and Black (GND). You need to open insulation of Red and Black wire.
  • Cut the charger adapter cable near its female end. This adapter cable is usually shorter in length so cut near unwanted connector to get maximum length.
  • Using multimeter find out which wire connects to outer conductor of charger pin. Connect this wire to black wire of USB cable.
  • Connect red wire on USB cable to other wire of charger pin.
  • You can solder these connections or use insulation tape to properly cover up the cable. Soldering is preferable as it will make the cable less prone to accidental pulls or rough use.
  • Test that there is no short between connectors after the joint has been covered up.
  • Connect the cable to computer and phone and check. 
Enjoy your new charger :)

Saturday, October 03, 2009

The limited edition pen by Mont Blanc

I did not like the INR 11+ lac pen brought out as a tribute to Gandhiji. Nor did many others. It obviously does not relate to his preachings of  simplicity and austerity.

And if you ever use this pen to write, you would be writing with his image held upside down!!!

Back to school...

बांद्र्याला कामासाठी गेलो होतो. मग अचानक विचार केला की जरा शाळा पाहून यावी. शाळेबाहेर थांबलो आणि आत एक चक्कर मारायची तीव्र इच्छा झाली. आत जावं की नाही, कोणी ओळखीचं भेटेल काय, ओळखेल काय - मनात चलबिचल झाली पण शेवटी आत गेलो...तब्बल १७ वर्षानंतर!

"teacher's room कुठे आहे?" आत शिरताना एका शिपायाला मी विचारलं,
"काय पाहिजे?". मला शंकेने न्याहाळत त्याने विचारलं, "काय काम आहे?".
पण जेव्हा मी सांगितलं की मी शाळेचा विद्यार्थी होतो, तेव्हा त्याचा सूर एकदम पालटला. मला उत्साहाने त्याने रस्ता दाखवला.

शाळा आता खूप वाढलेली होती. आधी मोठ्या दोन इमारती होत्या आणि त्यातल्या एकीला लागून एक बैठी शाळा होती. या बैठ्या शाळेतच आमचे वर्ग होते. ती तोडून मुख्य दोन्ही इमारतींना जोडणारी एक तिसरी इमारत आता आली होती. शाळेत junior college आणि मुलींसाठी वसतिगृह आले होते. लहानपणी मोठ्ठं वाटणारं मैदान आता छोटं वाटत होतं.
Passage मधून जाताना time machine मध्ये चालत असल्याचा भास होत होता. Teacher's room जवळ पोहोचलो आणि माझ्या एका class teacher चे नाव head master पाटीखाली पाहिलं. "Madam आहेत का?" मी तिथे चौकशी केली. तिथल्या शिपायाने माझं नाव आणि काम विचारलं. मी घाग म्हणाल्यावर त्याने पटकन "किरण घाग?" असा प्रश्न केला. मी चकीत झालो. मनातली एक जुनी आठवणींची cassatte लोड झाली. मला विचारणारे प्रकाश मामा, समोर बसलेल्या पुळेकरबाई, सगळं पटकन आठवलं.
मला बसायला खुर्ची आणि प्यायला पाणी मिळालं आणि सगळी विचारपूस सुरु झाली. ओळखीचे बरेच जण retired झाले होते. परिक्षा सुरु होती म्हणून सगळे शिक्षक वर्गावर होते.  मग मी वर्गावर जायचं ठरवलं.
सोमणबाई, वालावलकरबाई आणि पावसकरसर भेटले. आपला विद्यार्थी इतक्या वर्षांनंतर आल्याचा आनंद मला स्पष्ट दिसत होता आणि त्यांच्या प्रश्नांना उत्तरं देताना माझं मन तृप्त होत होतं.

बोलण्यात मला शिक्षकांच्या आणि शाळेच्या काही व्यथा जाणवल्या. शि़क्षण महाग होत चाललय, मराठी तुकड्या कमी होत आहेत, मराठी माध्यमातून शिकणं स्पर्धात्मक राहिलं नाही असा गृह बळावतोय, मुलांचा उत्साह कमी होत चाललयं, या त्यापैकी काही. हळुहळू मला जाणवलं की शाळेची इमारतच फ़क्त बदलली होती. पण शाळेतलं शिक्षण अगदी तसच होतं. आमच्या वेळेला भिंतीवर असणारे तक्ते, frame केलेले models, सुंदर अक्षरांवर जोर देणारे, जिव्हाळ्याचे शिक्षक अजून तसेच होते. 

- एका वर्गात २ मुलं अशीच बसली होती. मग कळलं की त्यांचा आज पेपर नव्हता, पण ती चुकून आली होती. मग एकटं परत पाठवण्यापेक्षा त्यांना बसवून ठेवलं होतं.
- वालावलकरबाईंशी बोलताना एक मुलगा करंगळी वर करुन आला - "बाई सूसू!" त्याला पाठवलं मग एकामागून एक ४-५ जणं आली. अशी संसर्गजन्य सू आम्हालापण व्हायची :)

बाहेर पडताना बहुतेक पेपर सुटला होता. मुलं रांगेत बाहेर पडत होती. त्या रांगेतून मार्ग काढत मी पण बाहेर निघालो. घरी येउन २ दिवस झाले, मन मात्र अजून एका छोट्या बाकावर बसलय.