To recover previously installed Ubuntu after upgrading to Windows 10 follow the steps.
Open command prompt in Windows 10 as Admin.
Right click on the start menu -->
Now Run this command " bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi "
Now Restart the system to get Grub