selecting * (=bootable) instead of D (=Deleted)

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Message
Author
vedhas
Posts: 7
Joined: 24 May 2015, 10:53
Location: Passau, Germany

selecting * (=bootable) instead of D (=Deleted)

#1 Post by vedhas »

Hello,

When doing partition recovery I selected * (=bootable) instead of D (=Deleted), now system does not boot. Am I in a serious trouble? Have I lost all my data?

Details/chronology of events:
* I have (/had? :-() Acer laptop with windows 7 and Ubuntu 12.04 installed. The hdd is known to have bad sectors.
* I was on Windows watching some facebook video, when system got stuck -with sound from the laptop speakers being last audio frame (probably due to some memory/disk issue?)
* so i restarted laptop with power button, and it reached grub successfully. However instead of choosing windows 7, I mistakenly chose something else in hurry (I guess windows recovery environment (loader)) -which upon entering I exited immediately by clicking 'exit' related option given on that first screen itself.
* Now system rebooted, but instead of showing me grub, gave me screen that said:
error: no such partition.
grub rescue>
* following the advice here: http://ubuntuforums.org/showthread.php?t=1836303, I used Ubuntu CD to 'try ububtu' and run bootinfoscript (I have the output backed up, can provide if relevant) + bootrepair.
Bootrepair output is here :
pastebin.Ubuntu.com/11313381/
I guess it recovered windows.
* So now upon restart, I got to a black-white screen where only windows options were listed (command prompt, command prompt safe mode, windows 7). I chose windows 7 and verified that it worked okay.
* I now wanted to get my Ubuntu back. I used liveCD to 'try Ubuntu' + install + run testdisk. Here, testdisk did find my Linux partition. I went down the directories in testdisc to make sure, filenames did show up!
But before initiating this partition recovery I changed D to *.(will send screenshots). It immediately asked me to reboot which was surprising (took no time for recovery, is it done that fast?).
* now system won't boot at all! Gives me:
"Intel UNDI, PXE-2.0 (build 083)
Copyright (C) 1997-2000 Intel Corporation

For Atheros PCIE Ethernet Controller v2.0.1.9 (12/15/09)

Check cable connection!
PXE-M0F : Exiting Intel PXE ROM.
No bootable device -- insert boot disk and press any key"
* if I insert my previously working liveCD now to 'try ubuntu', it wouldn't work. I see garbled green colored text on the Ubuntu startup screen which i guesd roughly reads 'edd: error ???? reading sector #####'(image attached).

vedhas
Posts: 7
Joined: 24 May 2015, 10:53
Location: Passau, Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#2 Post by vedhas »

I will send laptop-screen photographs soon as I get access to some laptop/PC to compress those images. (Right now, all I have is smartphone.)

Kindly reply until then if there is a way I can get the data back and get the two OS working normally...

One thing I forgot to add... After using testdisk for recovery with * option instead of D, I ran boot repair as well. The output is here: pastebin.ubuntu.com/11314088

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#3 Post by Fiona »

I'd need info running testdisk / Analyse about your current partition structure.
At least it might be possible to get windows working again.
Next step would be checking your Linux partition.
Grub is a bootmanager and modifies your MBR.
TestDisk works Intel standard and will at least allow you to boot 1 partition.
So grub settings will be overridden and you must reinstall/repair it.

Fiona

vedhas
Posts: 7
Joined: 24 May 2015, 10:53
Location: Passau, Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#4 Post by vedhas »

Thanks for your positive reply. How do I get you that necessary info? Please see if the photographs attached suffice, or if more info is needed.
First overview
First overview
rps20150525_122003.jpg (107.58 KiB) Viewed 4406 times
------
Overview upon search?
Overview upon search?
rps20150525_122049.jpg (107.58 KiB) Viewed 4406 times
-------
Secondly, about livecd boot (to attempt recover partitions), in regards to error reading sector problem, some posts online suggest that a different livecd needs to be used. Any thoughts?

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#5 Post by Fiona »

If you have problems reading bad sectors would be a different case.
Normally I use Knoppix.
You should run testdisk with root.
Your photos are suffice.
Your current partition structure (partition table) is ok except your Linux partition is missing.
But testdisk found it running Quick Search
Before you could recover it, you should have a try to list your files.
Both partitions Linux and Swap should be set to L for logical and you can use Write to recover all partitions.

On the other side, it doesn't mean that you're able to boot.
If you still experience some difficulties, windows might need a startup repair running windows repair options.
You probably have to repair/reinstall Grub too.

Fiona

vedhas
Posts: 7
Joined: 24 May 2015, 10:53
Location: Passau, Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#6 Post by vedhas »

So currently my primary question is how do I achieve things you listed? Esp fix grub and/or windows startup repair? I will need to boot some standard OS first right? (Or not?)
* its not booting to any OS on its own, but shows PXE-M0F error posted earlier.
* Ubuntu CD wouldn't work, says edd error reading sector
Ubuntu CD startup screen
Ubuntu CD startup screen
rps20150525_153637.jpg (113.03 KiB) Viewed 4394 times
Do I 'try ubuntu' with another USB/live CD?

Kindly let me know first thing I should do. Thanks for the clarifications.

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#7 Post by Fiona »

* Ubuntu CD wouldn't work, says edd error reading sector
Might be an idea to create another ubuntu cd?
Here are some instruction on how to get windows bootable again:
http://www.howtogeek.com/howto/7728/tro ... s-7-vista/
Did you already write all partitions into your partition table using testdisk?

Fiona

vedhas
Posts: 7
Joined: 24 May 2015, 10:53
Location: Passau, Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#8 Post by vedhas »

No... I did not know how to use the tool correctly. I had only asked it to write Linux, that too with * and NOT D.
Write screen was like this...
Write screen was like this...
rps20150525_172616.jpg (130.76 KiB) Viewed 4378 times
And then this:
.
AndAthen this...
AndAthen this...
rps20150525_172949.jpg (134.49 KiB) Viewed 4378 times
I will try getting new Ubuntu CD, also will go through link you posted...

vedhas
Posts: 7
Joined: 24 May 2015, 10:53
Location: Passau, Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#9 Post by vedhas »

I am not getting advanced boot options upon pressing F8 per the link, but rather Intel PXE error I posted earlier.
Pressing F8 again makes the error reappear aftwr last line on the b&w screen

User avatar
Fiona
Posts: 2835
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: selecting * (=bootable) instead of D (=Deleted)

#10 Post by Fiona »

Check your BIOS and boot option that you´re booting from the right device/disk:
Is your disk your boot device?
Instruction on how to recover your partitions
The status of your current partitions have all the status D for deleted.
http://forum.cgsecurity.org/phpBB3/down ... hp?id=3074
But you have to write all partitions into your partition table.
You should mark each partition and use your left or right arrow key on your keyboard to set your partitions in right order as explained below:
You can watch it at the left side.
Mark your first Recovery partition and set it to P for primary only.
Set your Windows Reserved partition to star for primary active andf bootable.
Set your Acer partition to P for primary.
Set your Linux partition to L for logical and your Swap partition too.
Please note:
You have 5 partitions including your Linux Swap.
Intel MBR can have up to 4 primary partitions or three primary and 1 Extended partition for logical partitions.
Only primary partitions can be active bootable.
Might be possible that Grub as a bootmanager can start a logical partition too?

Locked