0

I tried to dual boot Ubuntu with Windows 7 and it turned out that I booted only Ubuntu. All my data in windows 7 OS are gone. Is there any chance I can retrive those data? And I want to dual boot windows 7 now. How do I do it? If I do it will it be enough for me to get the datas back?

Zanna
  • 69,223
  • 56
  • 216
  • 327
  • In addition to the answers below, just try `sudo update-grub` from the terminal and then reboot when it's done. That does the trick in most cases. – KGIII Oct 31 '15 at 07:27
  • 1
    Too broad but relevant posts are [How can I install Windows after I've installed Ubuntu](http://askubuntu.com/questions/6317/how-can-i-install-windows-after-ive-installed-ubuntu) and probably [How to recover a deleted NTFS partition with data](http://askubuntu.com/questions/171163/how-to-recover-a-deleted-ntfs-partition-with-data) – Zanna Jan 06 '17 at 19:05

2 Answers2

-1

first try to get your data back, try if you can recover your lost partition with testdisk you can install it just by typing in the terminal

sudo apt-get install testdisk

it doesn't have a graphical interface so run in terminal by typing testdisk and choose the appropriate hard drive and tell us the results

zguell
  • 758
  • 1
  • 6
  • 18
-1

Well .. the most popular (and safest) way is boot-repair

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

and follow recommended repair. But there are some chances that it won't work. If that's the case, try using os-prober directly. Os-prober is the tool that does the job of detecting OSes (including windows). Most probably it will already be installed. If not,

sudo apt-get install os-prober

Next,

sudo os-prober

Now for next step, you need to know if your partition table is MBR or GPT. If MBR,

sudo grub-mkconfig -o /boot/grub/grub.cfg

if GPT,

sudo grub-mkconfig -o /boot/efi/EFI/GRUB/grub.cfg

If you can't figure out whether your partition table is MBR or GPT style, look for /boot/efi/EFI directory. If it is available, most probably it is GPT.

mshr
  • 42
  • 2