-1

First of all, i tried finding previous questions, didn't find anything that quite matches my case.

I have Windows 8.1 as well as Ubuntu 14.04 LTS in dual boot.

In the grub OS list at boot, I selected my acer laptop's recovery partition by mistake, didn't do the recovery obviously and quickly turned my laptop off. That, for some reason messed up grub and i was presented by the grub rescue screen. I tried the Ubuntu boot repair from a live CD and now my laptop boots straight to windows. I couldn't see my Linux partition using gparted. I tried using test disk and i was able to see my Linux partition, but i wasn't quite sure how to restore it.

How do I get back GRUB and Ubuntu, or at least how would I get my data from the hidden Linux partition?

Jens Erat
  • 5,051
  • 7
  • 31
  • 37
Tao
  • 3
  • It sounds like before you could shut off the computer the recovery partition deleted the Ubuntu partition, since gparted can't find it. The best bet is to start from scratch and reinstall Ubuntu and restore your data from backups. You do make backups, don't you? – user68186 Jan 09 '15 at 14:52
  • The thing is, when I chose the recovery partition, I was presented with a setup window. The actual recovery happens after a few steps. I don't understand how just choosing the recovery partition could do such harm. – Tao Jan 09 '15 at 14:57
  • I understand what you are saying. I have no idea, as I have never played with the Windows recovery partition. I can only speculate that some startup program in the recovery partition begins the "clean up" process before anything. Irrespective of how you got there,it seems your Ubuntu partitions are gone. – user68186 Jan 09 '15 at 15:02
  • In my experience, gparted would have definitely seen any Ubuntu partition. If it does not see it then it seems it was deleted just as user68186 said. Windows does not recognize or read anything with Ubuntu. It labels it as unknown. Windows 7 has prompted me to format my Ubuntu partition before. (It was something extreme like that.) So it must have been some kind of clean up process that started. Interesting though. Sorry about that. – jbrock Jan 09 '15 at 15:22
  • Thanks for your comments.

    As I said in the question, after doing a scan for file systems using test-disk, I was able to see my partition and my data in it. there is a restore method using test disk, but i was afraid I would mess up my windows partition. Which is also a problem.

    – Tao Jan 09 '15 at 15:28
  • Sorry. I should have read more closely. – jbrock Jan 09 '15 at 15:50
  • Here is an idea that I hear you can do, but I am not sure whether it would work. If Ubuntu is not recoverable, you could cd into the Ubuntu partition, then back up your home folder. You could then reinstall Ubuntu. Then before booting into it replace the new install's home folder with your old home folder that has your settings. I am curious too of others' input on how well this would work or if it would work. – jbrock Jan 09 '15 at 16:01

1 Answers1

1

This is pretty off-topic here as it's a pure Windows 8 problem. Windows 8 shut down is by definition not a shutdown -h now as we know it, but a hybrid hibernate. As we're trying to rescue the Ubuntu partition, it's back on-topic again! ;-)

Basically, all your data is still there, it's just invisible, so even booting from a live CD and using gparted will not show you the partitions.

Steps to take:

  1. Stop doing recovery on the disk itself NOW.
  2. Buy an additional hard disk
  3. Add the new hard disk to the machine
  4. Boot a LiveUSB, install ddrescue
  5. Go to a terminal using

    ddrescue --binary-prefixes --cluster-size=64 --timeout=20s /dev/sdX /dev/sdY /media/ubuntu/PathToUSB/CrashRecovery.log
    

    where X is the original and Y the new one

  6. Physically remove /dev/sdX from the machine
  7. Use testdisk on sdY
  8. If you make a mess of things, restore the image made in step 4 and try again from step 7
  9. Copy any rescued files to your current back-up drive (you do have have a back-up drive, don't you?) If you do not have one, read the following Q&A (you're user type 4)
Fabby
  • 34,259