Huston….Our GRUB needs to be rescued….

Here we are talking about grub rescue and reinint the GRUB.

#GRUB #GRUB2 #rescue #grubrescue #Linux #reinit


Hello all,

After so long time i am writing a new blog post. This post is about recent error i encountered on my dual boot machine. What i did was made some changes in my hard disk partitions. After that i restarted my pc and we had to call Huston!!!!

It was GRUB rescue which greeted me. GRUB rescue is linux-alike command prompt with limited commands. What went wrong is as i have changed partitions, it lost all it references to GRUB`s configuration file. Now i had two options. One was get bootable CD/DVD/PenDrive of Linux and reinstall GRUB. That was not possible for me as i didn’t have another machine to prepare any of such media. So i have to use GRUB rescue and get it running.

So i started like this. The problem was GRUB lost references to hard disk partitions. The solution coud be point grub to new partitions. With this in mind i started to search where is grub actually located on my hard disk.

Grub Rescue prompt
Grub Rescue prompt

After little Googling i came to know that i can use “ls” to list all my hard disk partitions with numbers. It goes as follows.

grub rescue> ls

grub rescue> (hd0), (hd0,msdos8), (hd0,msdos9), (hd0,msdos6), (hd0,msdos7)

Your output may be different but it should be like (hdX,msdosXX). Here big X after hd shows the number of storage attached with machine. One can have hd1, hd2 if more than one storage is attached with the machine. The msdos part says that the partition type is of msdos. It can also be different.

Lets move on. After using ls command we have to find where is GRUB. This can be done using suffix /boot.

grub rescue>ls (hd0)/boot

…. some error/not found

grub rescue>ls (hd0,msdos8)/boot

…. some error/not found

grub rescue>ls (hd0,msdos9)/boot

…. list of files like inintrd.img, vmlinuz and others…

Finally, Found it…

So my GRUB files are in msdos9. Now we just have to boot from here. Lets tell GRUB to boot from msdos9. Just follow below given small commands.

grub rescue> set root=(hd0,msdos9)

grub rescue> set prefix=(hd0,msdos9)/boot/grub

grub rescue> insmod normal

grub rescue> normal

Thats it…After writing last command you should see regular grub prompt. One final thing left.

Go to your linux command prompt and follow these commands. We are reinstalling grub with new references.

sudo grub-install /dev/sda

( In case, you have multiple storage installed, you have to find on which storage you are supposed to install GRUB. In my case i was installing on “sda”. ).

Now it`s time to say..

Huston we are up and running. Earth looks nice from here….

#GRUB #GRUB2 #rescue #grubrescue #Linux #reinit

Install Software/Package in Ubuntu and Backup for Future Use or Share With Friends…

Hello there.

Today i am going to tell you how you can share softwares form your ubuntu system to your friends or just back up for yourself for future use.Just make sure that the version is exactly same.For example use softwares from ubuntu 12.04 for 12.04 only,else you may encounter unseen errors.One final note:You always learn by playing around,so never hesitate to try your wildest idea.

So here is how you do it.

The softwares you install via Ubuntu Software Center or Terminal Or Synaptic on any damm way you can think,it all goes to /var/cache/apt/archives.Aptitude Path  Here you will find all the files for the packages you have installed so far.

Clean all this by typing following in terminal:sudo apt-get clean

apt cleanThis will delete all files from /var/cache/….. folder.


Now lets install a new software.For Example synapse.Its one of its kind shortcut utility for launching applications.

Go to software Center and install….

software centersynaptic

Select Synapse,i.e. Second entry in screenshot,and install it via left side button.It will take time depending on your INTERNET speed.

Once installation is finished,go to terminal and type following

sudo nautilus

it will ask for the password.give your login will have ubuntu file manager with root privileges.Now navigate to /var/cache/apt/archives.

Copy all files in any folder.Now you can share that folder.All you have to do is put back all files in /var/cache/apt/archives and install the software via Software Center,and that also is possible in off line mode.


Offline Package/Software installation in Ubuntu

Hello there,

You are probably here to see how to install software/package into ubuntu system which is not connected to internet via any mean.Follow the given trick.This applies to any ubuntu with Synaptic installed.


  1. Goto Software Center and search for synaptic.(For first step you need internet.For the rest you can work without internet for life time!!).Its Synaptic Package manager.Install it.
  2. For some older Ubuntu releases,its pre installed.
  3. Once you got Synaptic,you can download all package you want from other pc with internet.Let it be windows system.Synaptic Mark
  4. Now open synaptic package manager.Give your login password,when asked.
  5. Search for package you want to install.Synaptic Search
  6. Mark it,now go to file menu and then select Generate package download script.Synaptic Save
  7. Save this script in some folder.Its advised to save it in new folder with given package name.SynapticGen
  8. Now this script file can be opened in notepad or even download managers like Internet Download manager or Free Download Manager can open it.
  9. Download all packages in the folder which you saved your script.In short all your downloaded packages and that script should be in same folder.
  10. Now get that folder in your ubuntu system.
  11. Open Synaptic,goto file>add downloaded packages.
  12. Select your folder and your packages will be installed.

Some times Synaptic may not show package you want in the search.In this case you have to add repository in synaptic.I am going to write tut for that soon.Remember Google is your friend.