LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   issues with my grub - seems like data is lost (https://www.linuxquestions.org/questions/linux-newbie-8/issues-with-my-grub-seems-like-data-is-lost-4175427088/)

kngosling 09-13-2012 11:33 AM

issues with my grub - seems like data is lost
 
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 ?

aniketmeshram 09-13-2012 12:42 PM

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.

yancek 09-13-2012 12:54 PM

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.

kngosling 09-13-2012 10:47 PM

Quote:

Originally Posted by yancek (Post 4779606)
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.


All times are GMT -5. The time now is 09:53 AM.