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?


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

| improve this answer | |

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


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.

| improve this answer | |

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