Sunday, January 31, 2010

I wanna be "teen" again

I always feel nostalgic for my childhood days when i used be a prankster in the field. Yeah childhood is the best phase in everyone's life as during those time we do not really feel responsibility of anyone. At those time We are like a free bird who dont think whats going to be tomorrow, what has happend till now, and fly endlessly to enjoy the present.
                                              I remember in those days i was too much involved in my favourite sport cricket that i could barely resist playing it even before exams ( be it annual exam). I used to literary prove the famous saying of that time i.e "EAT CRICKET , DRINK CRICKET" ( i couldn't satisfy the drink only coco cola part :P). During school days i never know how i slowy departed from playing games. I stopped playing any game just after 10th standard thinking its hard to be an engineer (i was wrong indeed). Every studious body leaves playing by that time for the sake of study i guess. But when i came to college i realized that i have left my whole childhood behind where i used to be the "prankster of the field". I wished to turn back time to be a teen again. But its been said u cant go back and turn time but u can always start afresh and make it worthful. 
                                                                    Throughout 3.5 years in engineering life i never ever felt like playing as i was surrounded by much of involvements (mostly studies + chatting). In addition to that the recession played spoilsport by making me fearful about job. So books and studying were the best friends and sports in those times. Then came the day when i got placed on 17th dec. Really then i realized that post placement life is a bliss. 
                                   The placement, Other then bringing the security in my life brought another thing i.e the feeling of being a "teen" again. All credit goes to my fellow classmates as we all started playing cricket all over again. We all may be grown up engineers but we all were a kid in the field.I have the last sem left in my college life and this time i am playing and enjoying as much i can coz i know life will never again give me chance to feel like "teen again".
I could only say:
                               "Give me another chance i wanna grow up once again."



Thursday, January 28, 2010

Recovering Ubuntu After Installing Windows


Few days ago i installed windows over already existing ubuntu , and then i was not able to boot into ubuntu.This was because the grub in MBR was over writtern by bootstrap loader.
So i searched every possibility and recoved my ubuntu.
The method that worked for me is......

Requirements:

 
UBUNTU LIVE CD (i used jaunty ya 9.04)

Method:

This method will overwrite your Master Boot Record. In order to boot Ubuntu we will be overwriting the Master Boot Record. This is to be expected and is part of this guide.

The Master Boot Record will then point to Grub as the initial bootloader. The Windows bootloader is contained within the Windows partition and will then be chainloaded by the Grub bootloader.

WARNING

Do not use Ubuntu 9.10 live CD to restore the boot loader from a previous version.

Ubuntu 9.10 (and later) uses Grub2, which differs considerably from Grub Legacy (the version of Grub used in Ubuntu 9.04 and earlier). Attempting this method with Grub2 will leave you in shell mode with no boot menu. If this happens, repeat the procedure with 9.04 or earlier (i.e. one that uses Grub Legacy). Installing Ubuntu 9.04 and updating it to 9.10 through the Update Manager does not upgrade Grub to Grub2.

The first step is to boot from a Live CD and open a terminal. You will need to run a few commands as root. One option is to first run sudo -i which will send you to a root shell from which you will simply run the commands without the sudo prefix. Be extremely careful when running a root shell, especially for typos! Even an extra space can do damage to your system. Always backup on external media before attempting recovery, if at all possible.

Next we will need to find the partition in which your Ubuntu system is installed. Type the command fdisk -l. It will output a list of all your partitions. Example :

fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1           8       64228+  83  Linux
/dev/sda2               9        1224     9767520   83  Linux
/dev/sda3   *        1225        2440     9767520   a5  FreeBSD
/dev/sda4            2441       14593    97618972+   5  Extended
/dev/sda5           14532       14593      498015   82  Linux swap / Solaris
/dev/sda6            2441       14530    97112862   83  Linux

Partition table entries are not in disk order

In this example three Linux partitions are listed. /dev/sda2 is the root partition, /dev/sda1 is the /boot partition, and /dev/sda6 is the /home partition. If you only have one partition, this means that your entire Ubuntu system is installed there.

First, create a mountpoint for your partition, for example:

mkdir /media/root

Then mount your partition in it. If you don't know which one it is, then mount any of them, we will determine if it is the correct one.

mount /dev/sda2 /media/root

Replace /dev/sda2 with the correct name of your partition. To check if it is the correct one, run ls /media/root which should output something like this:

bin    dev      home        lib    mnt   root     srv  usr
boot   etc      initrd      lib64  opt   sbin     sys  var
cdrom  initrd.img  media  proc  selinux  tmp  vmlinuz

If what you have looks nothing like this, the drive you have selected is incorrect. Run umount /media/root in the Terminal to unmount it then mount and try another one. Should you have made a /boot partition you can mount it like so:

mount /dev/sda1 /media/root/boot

To make sure this is indeed the /boot partition, run ls /media/root/boot, which should output something like this :

config-2.6.18-3-686      initrd.img-2.6.18-3-686.bak  System.map-2.6.18-3-686
grub                     lost+found                   vmlinuz-2.6.18-3-686
initrd.img-2.6.18-3-686  memtest86+.bin

Once again, if what you have is not similar, unmount it and try another partition.

Now that everything is mounted, we just need to reinstall GRUB:

sudo grub-install --root-directory=/media/root /dev/sda

If you get BIOS warnings try:

sudo grub-install --root-directory=/media/root /dev/sda --recheck

Note: Replace /dev/sda with the location you want to install GRUB on. If all went well, you should see something like this:

Installation finished. No error reported.
This is the contents of the device map /boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.

(hd0)   /dev/sda

Reboot, making sure to boot to your hard drive and not to the live CD. Grub should be installed and both Ubuntu and Windows should have been automatically detected.

If, after installing grub, Windows does not appear in the boot menu, you will need to edit /boot/grub/menu.lst
Open a terminal and enter:


sudo gedit /boot/grub/menu.lst

Now enjoy with your dual boot ubuntu and windows.