Friday, October 12, 2012

Using Tata Photon+ on Ubuntu 12.04

The Huawei modem model EC1260 supplied by Tata Photon is detected automatically by the Network Manager in Ubuntu 12.04 as New Mobile Broadband connection after you wait for one to two minutes. You need to choose country as India, and service provider as Tata Photon+. In addition after setting up you need to edit the connection and write username and password as internet.

Wednesday, October 10, 2012

Installing Ubuntu on hard disk having bad sectors


Today I was approached for installation of Ubuntu on a Laptop on which the hard disk had many bad sectors. We booted the machine with Ubuntu start up USB disk and started checking the 320 GB hard disk with badblocks command. Then we found that it may take several hours to check the hard drive since it had many many badblocks. We used gparted to make two 20 GB partitions at the beginning of the drive and found that both partitions had bad blocks. We interrupted the command with Ctrl+C if bad block was found. We made 20 GB partition after 100 GB and interrupted the badblocks command because bad block was found. Then we made 20 GB partition after 200 GB and no bad block was found. We decided to install Ubuntu on that EXT4 partition having no bad blocks. We made 200 GB NTFS partition at the beginning of the drive. Following are the screen-shots.





After completing the above operation I thought why not check my Laptop Hard Disk for bad sectors. I booted with the start up disk and used badblocks command to check two ext4 partitions having Ubuntu 10.04 and Ubuntu 12.04 and NTFS partition having Windows XP and found no bad blocks. Following is the screen-shot.

Friday, September 28, 2012

Backing up Thunderbird mails on Company's server.

I use Ubuntu Linux on my office Laptop and download mails in Thunderbird. IT Department of every company dislike Linux users and find out ways to prevent them or complain to top management that they have this or that problem due to Linux user. Generally I am able to deal with such complaints.

I am working at Jharsuguda for over two and half years now and there are more than 10000 emails in my inbox and 1000 emails in the sent box. IT Department complained that it is not possible to back up my mails since they are doing back ups through Outlook Express in .pst format.

I installed Import/Export tools on Thunderbird and found that either I could export in .mbox format in one single file or individual mails in .eml format without attachments.

I proposed that Thunderbird on Windows could import the .mbox file but IT Department did not agree.

Then I found mbox2xml converter and told them that the IT Department could convert the mbox file into xml and read it directly in the browser but I had to do that conversion for them and convince that the mail was backed up in usable format.

Thursday, September 20, 2012

Revisiting Ubuntu installation on Windows Desktop

I carry a boot-able pen-drive with Ubuntu so that it can be used for quick installation on Desktops/Laptops whose owners permit me to do so.

Yesterday I found a Desktop in Delhi where previous installation of Ubuntu done by me using Live CD was wiped out due to reformatting of hard disk. I tried booting with pendrive after changing the first boot device to USB-HDD, USB-FDD, USB-ZIP etc but could not boot. I will investigate the problem some other day.

Then I decided to download Ubuntu 12.04.1 iso and burn a CD. For cheking md5sum I downloaded WinMD5Sum   The iso failed in md5sum check. Then I downloaded Free Download Manager to download the iso and the iso passed the md5sum check. For burning the iso on CD I downloaded Infra Recorder. After making Live CD I could install Ubuntu 12.04.1 on the Desktop.

This post is just to record what software is needed on Windows ( WinMD5Sum, Free Download Manager, Infra Recorder) to install Ubuntu on Windows machine.

Tuesday, July 17, 2012

Search News, Wikipedia and many other things directly from Ubuntu Desktop

Although I have installed Ubuntu 12.04 for last two months I could not use various lenses and search the web directly from Ubuntu Desktop.

Today I installed Wikipedia Lens which was available in Ubuntu Software Centre and could search for God Particle Article on Wikipedia as seen in the screen shot below:

Then I decided to use the Unity News Lens and installed it as follow
 sudo add-apt-repository ppa:scopes-packagers/ppa
 sudo apt-get update && sudo apt-get install unity-lens-news

After installing I logged out and logged in

Following is the screen shot:

Monday, June 04, 2012

Screen Shots of Micromax USB Modem on Ubuntu 12.04

I had posted about using Micromax USB Modem on Ubuntu 12.04 here.One visitor requested me to post the screen shots. Here they are:
The above screen shot shows that there is no network connection.

The above screen shot shows the commands to be typed in the terminal. After this you insert the modem in USB slot.
The above screen shot shows that the modem has been working. Please note that Network Manager is not showing anything so far. You need to wait upto 3 minutes till it shows on Network Manager
The above screen shot shows that the Network Manager has detected a new Mobile Broadband connection. Please note the clock time.

Thursday, May 24, 2012

Copying Thunderbird Mails and Address Book from Ubuntu 10.04 to 12.04

I am running Ubuntu 10.04 on my office Laptop since April 2010. When Ubuntu 12.04 came I considered distribution upgrade but decided not to do it since I was running latest versions of Libreofice, Thunderbird, Firefox using Launchpad PPAs. My only problem was to transfer the Mails and Address Book in Thunderbird. The other problem was to resize the big NTFS partition to install Ubuntu 12.04 on a new partition. I solved the NTFS resize problem as described on this post.

For copying Mails and Address Book I copied  xxxxxxxx.default folder and profiles.ini file from/to .thunderbird folder from Ubuntu 10.04 to 12.04 and it works perfectly.

Now I am using Ubuntu 12.04 on my office Laptop.

Tuesday, May 22, 2012

Resizing NTFS Partition using gparted and chkdsk

Today I installed Ubuntu 12.04 on a Laptop which had Windows XP and Ubuntu 10.04 in dual boot and large extended NTFS partition on E:/ drive. First I tried to resize the NTFS partition using gparted of Ubuntu 10.04 but it failed and also made the NTFS partition unmountable on Ubuntu. I corrected the partition using testdisk and it became mountable. Then I decided to try gparted on Ubuntu 12.04 and successfully resize the partition as follows:
I inserted the usb Startup disk into usb port of the Laptop and booted into Ubuntu 12.04. Clicked on top left icon called Dash Home and searched for gparted and clicked on the gparted icon. I right clicked on the NTFS partition and selected check. As expected the gparted produced following error:
GParted 0.11.0 --enable-libparted-dmraid
Libparted 2.3
Check and repair file system (ntfs) on /dev/sda5  00:00:07    ( ERROR )
    
calibrate /dev/sda5  00:00:00    ( SUCCESS )
    
path: /dev/sda5
start: 204,796,683
end: 623,032,829
size: 418,236,147 (199.43 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them  00:00:07    ( ERROR )
    
ntfsresize -P -i -f -v /dev/sda5
    
ntfsresize v2012.1.15AR.1 (libntfs-3g)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 214136902144 bytes (214137 MB)
Current device size: 214136907264 bytes (214137 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Cluster accounting failed at 12408217 (0xbd5599): extra cluster in $Bitmap
Cluster accounting failed at 12408218 (0xbd559a): extra cluster in $Bitmap
Cluster accounting failed at 12408219 (0xbd559b): extra cluster in $Bitmap


Filesystem check failed! Totally 2576 cluster accounting mismatches.
ERROR: NTFS is inconsistent. Run chkdsk /f on Windows then reboot it TWICE!
The usage of the /f parameter is very IMPORTANT! No modification was
and will be made to NTFS by this software until it gets repaired.


Then I rebooted into Windows XP and opened command prompt

>chkdsk E: /f
The type of the file system is NTFS.
CHKDSK is verifying files (stage 1 of 3)...
File verification completed.
CHKDSK is verifying indexes (stage 2 of 3)...
Index verification completed.
CHKDSK is verifying security descriptors (stage 3 of 3)...
Security descriptor verification completed.
CHKDSK discovered free space marked as allocated in the volume bitmap.
Windows has made corrections to the file system.
209118068 KB total disk space.
51761464 KB in 45713 files.
19896 KB in 7661 indexes.
0 KB in bad sectors.
131132 KB in use by the system.
65536 KB occupied by the log file.
157205576 KB available on disk.
4096 bytes in each allocation unit.
52279517 total allocation units on disk.
39301394 allocation units available on disk.

Then I  rebooted twice in Windows XP.

Once again I booted into Ubuntu 12.04 using usb startup disk and started gparted, right clicked on the partition and selected check. This time gparted reported as follows:
GParted 0.11.0 --enable-libparted-dmraid
Libparted 2.3
Check and repair file system (ntfs) on /dev/sda5    ( SUCCESS )
    
calibrate /dev/sda5  00:00:00    ( SUCCESS )
    
path: /dev/sda5
start: 204,796,683
end: 623,032,829
size: 418,236,147 (199.43 GiB)
check file system on /dev/sda5 for errors and (if possible) fix them    ( SUCCESS )
    
ntfsresize -P -i -f -v /dev/sda5
    
ntfsresize v2012.1.15AR.1 (libntfs-3g)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 214136902144 bytes (214137 MB)
Current device size: 214136907264 bytes (214137 MB)
Checking for bad sectors ...
Checking filesystem consistency ...
Accounting clusters ...
Space in use : 53159 MB (24.8%)
Collecting resizing constraints ...
Estimating smallest shrunken size supported ...
File feature Last used at By inode
$MFT : 162676 MB 0
Multi-Record : 170638 MB 27119
$MFTMirr : 107604 MB 1
Compressed : 42052 MB 30556
Ordinary : 168508 MB 26979
You might resize at 53158412288 bytes or 53159 MB (freeing 160978 MB).
Please make a test run using both the -n and -s options before real resizing!
grow file system to fill the partition  00:00:00    ( SUCCESS )
    
run simulation  00:00:00    ( SUCCESS )
    
ntfsresize -P --force --force /dev/sda5 --no-action
    
ntfsresize v2012.1.15AR.1 (libntfs-3g)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 214136902144 bytes (214137 MB)
Current device size: 214136907264 bytes (214137 MB)
New volume size : 214136902144 bytes (214137 MB)
Nothing to do: NTFS volume size is already OK.
real resize    ( ERROR )
    
ntfsresize -P --force --force /dev/sda5
    
ntfsresize v2012.1.15AR.1 (libntfs-3g)
Device name : /dev/sda5
NTFS volume version: 3.1
Cluster size : 4096 bytes
Current volume size: 214136902144 bytes (214137 MB)
Current device size: 214136907264 bytes (214137 MB)
New volume size : 214136902144 bytes (214137 MB)
Nothing to do: NTFS volume size is already OK.
Finally I could resize the NTFS partition and make a new ext4 partition to install Ubuntu 12.04.
















Saturday, May 12, 2012

Using Micromax 3G Modem on Ubuntu 12.04

In Sep 2010 I had written about using Micromax 3G modem on Ubuntu 10.04. Since then I could not find time to see whether Ubuntu 10.11, 11.04 and 11.10 has any changes wrt modeswitch etc. In Ubuntu 12.04 the newest version of usb-modeswitch is already installed by default and  mode switching takes place in the background.

Today I downloaded the iso of Ubuntu 12.04 Desktop iso and made a boot-able pen-drive and wanted to use the Micromax 3G Modem. Before implementing the procedure in my last post I searched and found following procedure on askubuntu:
Open up a terminal from Applications -> Accessories. Type:
sudo gedit /etc/modules
At the bottom of the file, make two new lines, like this:
usbserial
option
Then close the editor program and save it. Reboot the computer and hopefully you’ll be right from now on!

Since I was running from usb stick I used the following commands to load these modules:
sudo modprobe usbserial
sudo modprobe option

Then I inserted Micromax usb modem and configured a new Mobile Broadband connection through the Network Manager.

Although the Network Manager had not detected the insertion of modem but after configuring the connection it worked.

If you have installed Ubuntu 12.04 and want to use this modem on regular basis you can edit /etc/modules file as per the procedure on askubuntu so that the modules would be loaded on boot.

If you want to occasionally use this modem you can use my procedure i.e. to load the modules before inserting the modem.

NB: Network Manager takes about 3 minutes to detect the modem on LiveCD/USB or even installed Ubuntu 12.04. You need to have some patience after inserting the modem. In addition the modules 'usbserial' and 'option' need to be loaded before insertion as described above. In Ubuntu 11.10 this Modem shows up in Network Manager after a few minutes without giving any command.

One visitor wanted me to post screen shots. Here they are.

Air India direct flight to San Fransisco has flown through China today.

 My sister in law left for San Fransisco by AI 173 flight which flows over North Pole. I tracked that flight on flightstats.com till it land...