Here's the problem in short.

I had two hard drives, both separated into 2 partitions. Hard drive 1 partition 1 had windows xp once, used for data later. Hard drive 1 partition 2 was always just data. Hard drive 2 partition 1 was windows 8.1 system. Hard drive 2 partition 2 was always just data.

So, i just copied everything i could from hard drive 1 partition 1 somewhere else and installed Debian there.

It went fine (kinda), now i can boot into Debian. However, i can't boot into Windows 8.1. During Debian installation it said something about Grub not detecting other operation systems but that it could be tweaked further, so i went ahead.

This is fdisk -l output:

Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x4ebe4ebe

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *           63 122881184 122881122  58.6G 83 Linux
/dev/sda2       122881246 488375999 365494754 174.3G  f W95 Ext'd (LBA)
/dev/sda5       122881248 488375999 365494752 174.3G  7 HPFS/NTFS/exFAT

Disk /dev/sdb: 7.5 GiB, 8086618112 bytes, 15794176 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x39768880

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *       64 2296991 2296928  1.1G 17 Hidden HPFS/NTFS

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0000b9de

Device     Boot     Start        End    Sectors  Size Id Type
/dev/sdc1  *           63  524281274  524281212  250G  7 HPFS/NTFS/exFAT
/dev/sdc2       524281275 3907024064 3382742790  1.6T  7 HPFS/NTFS/exFAT

/dev/sdc1 is the Windows 8.1 one.

I can't even mount it, however:

Error mounting /dev/sdc1 at /media/root/system3: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=0,gid=0,dmask=0077,fmask=0177" "/dev/sdc1" "/media/root/system3"' exited with non-zero exit status 14: Windows is hibernated, refused to mount.
Failed to mount '/dev/sdc1': Operation not permitted
The NTFS partition is in an unsafe state. Please resume and shutdown
Windows fully (no hibernation or fast restarting), or mount the volume
read-only with the 'ro' mount option.

Well, i'm pretty sure i shut it down the normal way, or actually, restarted it... but eh.

I tried using Windows restore/install usb, tried automatic repair - no luck, tried bootrec - well, it detects windows (actually, two of them, since i have a backup lying around somewhere) but it can't fixboot & rebuildbcd.

What should i try next?


First try:

Boot using a live usb/cd of ubuntu or use your own debian(check the link a bit lower). Use boot-repair to fix the problem.

After booting with live usb/cd, run following command in terminal:

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

Use Recomended Repair

To use the boot-repair straight on debian visit : http://www.matthiaskauer.com/2015/03/install-boot-repair-on-debian-from-ubuntu-ppa/

Further some other options:

Solution for future when you get in (only for Windows 8 and 10):

Open an elevated Command Prompt (right click on the shortcut, click on “Run as Administrator”), and input:

powercfg /h off

You can check the results with:

powercfg /a

If you can't solve booting into windows NOTE: HIGHLY destructive

Use ntfsfix in the terminal , even if you can't access Windows

sudo ntfsfix /dev/XY

where XY is the partition

e.g sda2 or sdb1

ntfsfix repairs some fundamental NTFS inconsistencies, resets the NTFS journal file and schedules an NTFS consistency check for the first boot into Windows.

  • Here's the boot repair output: paste2.org/7K0g438f , wishing myself luck and going into reboot... What's highly destructive about ntfsfix, by the way? Should i back up win partition? If so, how - if i can't mount it? – Huita Aug 5 '16 at 21:18
  • The "BCD error" is gone from trying to boot from the Win drive. However, both hard drive choices from boot menu just boot me into Debian. Eeh... What next, proceeding to ntfsfix or there's something else to do? – Huita Aug 5 '16 at 21:24
  • !! NB : Prior of doing anything you always should backup if possible. – dExIT Aug 6 '16 at 7:59
  • So Hibernation/Fast boot error is gone. Boot into debian and follow this guide [link]wiki.debian.org/DualBoot/Windows10 (Disable os-prober create a custom GRUB menu entry for Windows.) Please look into middle section ; wiki.debian.org/Grub#Configuring_GRUB – dExIT Aug 6 '16 at 8:11
  • Well, it tries to load windows now but tells about BCD files missing. I'll try to rebuildbcd and all using win disk, but not getting hopes high. – Huita Aug 6 '16 at 12:48

Long story short, i just unplugged linux drive, reinstalled windows and plugged linux drive back in.

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.