Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!

Notices

Welcome to LinuxQuestions.org, a friendly and active Linux Community.

You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!

Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.

If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.

Having a problem logging in? Please visit this page to clear all LQ-related cookies.

Introduction to Linux - A Hands on Guide

This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.

Everything went on well. Today morning when I rebooted my workstation, I was appalled by the grub rescue screen that appeared on boot up. I could not guess what could be the reason for this. Trying to find out a solution, I googled and browsed several sites and performed the following commands from a live cd.
sudo mount /dev/sda2 /mnt
sudo grub-install /dev/sda /mnt
I later recognized that I should have installed grub in sda1 and not in sda2. sda2 is my ubuntu partition with all my data.
On reboot, I was further taken aback by appearance of a grub prompt. On googling again, I was instructed to run find command in grub. I then got this error.
"grub>unknown command find"
Not knowing what to do, I booted again using a live CD.
I felt awwww when I saw my 2 TB file system showing only five folders leaving out the main home folder which contained all the users and the data. I assumed that I have made a mistake by installing grub on /dev/sda2 and it has replaced ubuntu and the data.
I then tried several solutions given online. Like I tried to recover using boot-repair, followed this link http://www.dedoimedo.com/computers/g...mozTocId842078 and tried to chroot. On giving chroot I get "chroot: cannot run command /bin/bash no such file or directory".
Kindly help me out.
I have also posted the results of bootinfoscript for your reference.http://paste.ubuntu.com/1202960/
Is my presumption correct ? Has grub replaced the ubuntu partition and all its data ?
How could I bring my machine back to its original state ?

I think your sda2 might not have been replaced. the grub-install loaded the bootloader alongside your data. Have you tried to locate your files in your sda2. see if you can view your files by again going through the procedure through live CD becoming chroot. if you do, back it up some where safe. Then again try installing grub on sda1.

If you are using a current version of Ubuntu you are using Grub2 which is why you got the command not found with the "find" command. That command only is available on Grub Legacy. Why do you think you should have installed Grub on sda1? What do you have on sda1? If you wanted to install the Grub bootloader to the Ubuntu partition, which bootloader were you going to use to boot? Do you have another operating system? The best way to get help is to go to the site below, read the instructions on using the bootinfoscript, download and run it using your Ubuntu Live CD and post the output (results.txt file) here if you don't understand it your self. It will include a lot of detailed information on drives/partitions and boot files.

If you are using a current version of Ubuntu you are using Grub2 which is why you got the command not found with the "find" command. That command only is available on Grub Legacy. Why do you think you should have installed Grub on sda1? What do you have on sda1? If you wanted to install the Grub bootloader to the Ubuntu partition, which bootloader were you going to use to boot? Do you have another operating system? The best way to get help is to go to the site below, read the instructions on using the bootinfoscript, download and run it using your Ubuntu Live CD and post the output (results.txt file) here if you don't understand it your self. It will include a lot of detailed information on drives/partitions and boot files.

I used gparted and found that sda1 was an "unknown file system" and it had a flag, bios_grub. I think this is the actual boot partition and should have reinstalled grub in it. Instead I installed grub in sda2, which actually is my ubuntu partition and the data. I have pasted the results.txt. Here it is for you again, http://paste.ubuntu.com/1202960/ , the results of bootscriptinfo.