1

I've got Windows 10 previously, then simultaneously installed Ubuntu 16.04 with dual boot (Grub). I've been trying to get to my windows partition (100GB Linux-50GB) with no results, tried to ntfsfix, every one recommended this, but my Windows was hibernated which made things worse. Next I tried to reinstall Grub, which led to disappearing windows from boot options in Grub before that windows was able as option in boot menu, but wasn't launching. Afterwards I burned windows 10 on usb and booted it form bios. I tried every recovery option, with no results, so I was instructed to go to the cmd and use bootrec and do it manually.
I used bootrec /FixMbr and now there is no boot menu, I can't get to any partition or OS. I can go only to BIOS and boot something from external drives.
What do I do? Work calls, not much time.

PS:I've got 2 big projects on Windows partition I can not afford to lose.

Edit: I restored GRUB by rescatux, and now I am on my Ubuntu 16.04. I've typed "sudo mount /dev/sda1 /mnt" into terminal and this is what I got.

Failed to open ntfs attribute: Not such file or directory

Failed to load $MFT: Not such file or directory

Failed to mount '/dev/sda1': Not such file or directory

cieniu97
  • 11
  • 4

3 Answers3

2

When you install Windows, Windows assumes it is the only operating system (OS) on the machine, or at least it does not account for Linux. So it replaces GRUB with its own boot loader. What you have to do is replace the Windows boot loader with GRUB. I've seen various instructions for replacing GRUB by mucking around with GRUB commands or some such, but to me the easiest way is to simply chroot into your install and run update-grub. chroot is great because it allows you to work on your actual install, instead of trying to redirect things here and there. It is really clean.

Here's how:

  1. Boot from the live CD or live USB, in "Try Ubuntu" mode.
  2. Determine the partition number of your main partition. GParted (which should already be installed, by default, on the live session) can help you here. I'm going to assume in this answer that it's /dev/sda2, but make sure you use the correct partition number for your system!
  3. Mount your partition:

    sudo mount /dev/sda2 /mnt  #Replace sda2 with your partition number
    
  4. Bind mount some other necessary stuff:

    for i in /sys /proc /run /dev; do sudo mount --bind "$i" "/mnt$i"; done
    
  5. If Ubuntu is installed in EFI mode ([see this answer if you're unsure][efi]), use GParted to find your EFI partition. It will have a label of EFI. Mount this partition, replacing sdXY with the actual partition number for your system:

    sudo mount /dev/sdXY /mnt/boot/efi
    
  6. chroot into your Ubuntu install:

    sudo chroot /mnt
    
  7. At this point, you're in your install, not the live session, and running as root. Update grub:

    update-grub
    

    If you get errors or if going up to step 7 didn't fix your problem, go to step 8. (Otherwise, it is optional.)

  8. Depending on your situation, you might have to reinstall grub:

    grub-install /dev/sda
    update-grub # In order to find and add windows to grub menu.
    
  9. If everything worked without errors, then you're all set:

    exit
    sudo reboot
    
  10. At this point, you should be able to boot normally.

If you cannot boot normally, and didn't do step 8 because there were no error messages, try again with step 8.

  • Sometimes giving GRUB2 the correct configuration for your partitions is not enough, and you must actually install it (or reinstall it) to the Master Boot Record, which step 8 does. Experience helping users in chat has shown that step 8 is sometimes necessary even when no error messages are shown.

[efi]: https://askubuntu.com/a/764702/13398

copied from https://askubuntu.com/a/88432

Mee
  • 21
  • 2
1

My cursory examination of Mee's answer makes me think it should be helpful; however, I want to address this at another level.

The most important point I want to make is that you should NEVER hibernate a dual-boot system and then boot into the other OS. Hibernation leaves filesystems in an inconsistent state, so if the other OS tries to access them, they're likely to be damaged. It's likely that this has happened to you, and it's possible that the damage is bad enough to prevent Windows from booting. If so, you may need to re-install Windows -- but that's only a possibility, not a certainty or even a likelihood, so I won't go into more detail about it.

What's more, Windows 8 and later include a feature (called Fast Startup) that turns "shut down" operations into hibernation, so it's hard to avoid this problem. Fortunately, it is possible to turn off this feature. See this page and this one to learn how to fix the Windows problem.

Note that, even if you don't explicitly access Windows filesystems from Ubuntu, one partition may be affected: the EFI System Partition (ESP). This partition holds boot loaders for both Windows and Ubuntu, so if it's damaged because of Fast Startup, the results can include strange boot operation, up to and including an inability to boot anything at all.

One more point: You may want to download the USB flash drive or CD-R version of my rEFInd boot manager and prepare a medium with it. rEFInd can boot Ubuntu even if GRUB is damaged, and it can boot Windows even if GRUB's menu omits the Windows entry. (These features depend on an intact and valid ESP and Linux /boot directory, though; rEFInd may not help if the ESP is damaged because of Fast Startup.) One caveat: The USB flash drive and CD-R images of rEFInd on its downloads page do not support Secure Boot, so you may need to disable that feature to use rEFInd in this way. Alternatively, you could add Shim to a rEFInd USB flash drive, but this will take some effort. The point, though, is that rEFInd can be a useful recovery tool in some situations like yours, so having it available can help you get at least one OS booting, and with any luck fixed.

Rod Smith
  • 44,284
  • 7
  • 63
  • 105
1

Addressing your concern about your data:

Before you do anything else, you should boot from a live Ubuntu from a USB flash-drive. You can then mount your Ubuntu and Windows partitions even if the OS is quite broken. (Unless you should have destroyed the partition itself with your efforts to rescue it.)

This allows you to copy your data to a separate drive before trying any other rescue attempts on the OS.

user7019377
  • 111
  • 2