3

I've been running Windows 10 alongside Ubuntu and Windows did an update that removed the GRUB loader. After running BootRepair, the message displayed changed to "An operating system wasn't found ...". Then I ran Gparted and it showed that my Ubuntu partition was unallocated.

At this point, I don't know what to do and if I can recover my partition. The URL link generated by BootRepair is http://paste.ubuntu.com/18088419

Thanks for your help!

1

Wait for somebody else's opinion, but here's mine.

Notice this from your log:

Drive: sda _____________________________________________________________________

Disk /dev/sda: 512.1 GB, 512110190592 bytes
255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1             206,848   292,184,795   291,977,948   7 NTFS / exFAT / HPFS
/dev/sda2    *    292,186,112   293,181,439       995,328  27 Hidden NTFS (Recovery Environment)
/dev/sda3         293,183,486 1,000,214,527   707,031,042   5 Extended
/dev/sda5         970,917,888 1,000,214,527    29,296,640  82 Linux swap / Solaris

...

Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.

Yes, your main ext4 partition is in fact absent, however your swap partition is still there. That could possibly be an indicator that the destruction isn't too serious.

The way I see it you have two options:

  • Attempt recovery
  • Reinstall Ubuntu

For attempting recovery, the first thing you're going to need to do is create a live USB drive. As you seem to be a technically inclined person, I'll simply recommend using the program from http://pendrivelinux.com

I found this success story about ext4 recovery even though the poster had LVM: http://ubuntuforums.org/showthread.php?t=1376383

He used the program testdisk, so I would suggest that as well.

But first,

Do you have an external HDD >= in capacity to your internal HDD?

If not, you need to decide how important this recovery is to you. Remember, your data is probably still there somewhere.

But in order to recover it, you will be performing dangerous operations with the potential to destroy the vulnerable data.

So assuming you have the right sized external HDD as I mentioned previously, boot from that live USB you created earlier and dd your internal drive to the external one, like so:

#Keep in mind this will destroy everything on the external HDD. You'll need to replace the path to the external HDD's partition accordingly, or else you will most certainly facilitate further destruction.
sudo dd if="/dev/sda" of="/dev/sdb"

That will take several hours to complete. So give it some time.

Afterwards, disconnect your external drive.

Congratulations! You now have a complete drive image, meaning that if you completely wreck the entire partition table on your internal one, you can still restore to the exact state you are in now

Now that you have said drive image, have a go with testdisk and see what it comes up with.

  • Shouldn’t it be dd instead of did? – Melebius Jun 29 '16 at 11:32
  • @Melebius - Whoops. Yes, you are correct. I fixed it. This is one of those times when spell check isn't helpful :) – Android Dev Jun 29 '16 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.