0

I just installed an Ubuntu 18.04 on the side of my windows 10 partition. after the install, every time I tried to boot to windows it always told me that winload.exe does not exist/is corrupted and windows can't boot.

Apparently grub has incorrectly assigned my second HDD as the windows 10 boot drive (/dev/sdc1) instead of my SSD (SATA 0, partition 0)(/dev/sda0/ I think), that of telling windows to try to boot from there, and of course, it didn't work, as there are no windows there.

So how can I change it to point to the SSD instead?

also, a little clarifier :

I have 1 SSD and 2 HDD, formerly I only have 1 HDD, but I've since upgraded to an SSD and proceed to reinstall windows to the new SSD. I forgot if I ever did a full wipe on the former HDD, as there is still some leftover windows file (who knows if the MBR ever get wiped on that HDD)

I haven't yet tried to boot it from the windows boot manager option on bios, I guess I will try that later

edit : added the output from boot-info

after i see the boot-info output, there are something that i don't understand. like why grub told me in the grub menu that windows is on /dev/sdc3/ when clearly sdc3 is not even a thing on my computer.

and when i run the sudo update-grub command, the windows partition changes to sdc1, which is a thing, but still is the wrong HDD

Edit 2 :

I did the bootrec /fixmbr thing to try and restore windows bootloader into MBR. But sadly i still can't boot back to windows, let alone ubuntu. And as i dont have much time, i just reinstalled the whole thing.

Thank you very much for everyone bothering to answer. I hope your answer will be beneficial for someone else

  • 2
  • If that doesn’t help could you please run Boot-Info and [edit] your question to include a link to its resulting info log? Thanks. – David Foerster Sep 06 '18 at 07:49
  • @DavidFoerster i added the boot-info output. i will be reading from the link you give. thank you. and sorry i dont reply you quickly, as i was out at work – Muhammad Syarif Sep 06 '18 at 13:21
  • Windows only boots from one drive, default in BIOS and one partition on that drive, the one with the boot flag. Grub2's os-prober looks for boot files. Also with Windows 10 make sure fast start up is off, and Windows with updates will turn fast start up back on. It sets hibernation flag on all NTFS partitions. http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions You should be able to repair your SSD install, but must make it boot drive default and add boot flag to that partition. Then restore grub. I might use Boot-Repair's advanced mode to install grub to sdb. – oldfred Sep 06 '18 at 13:57
  • @oldfred sadly. I think i had fast startup enabled on my windows before installation. That probably contributed to the error. I've now done the bootrec /fixmbr to uninstall grub and install windows bootloader, but it seems like the ubuntu installer somehow nuked my windows partition and rendered it unbootable. (But the files is intact (???)) So i just reinstalled the whole thing. But thank you for answering! Hopefully your solution will be useful for others – Muhammad Syarif Sep 08 '18 at 05:09

2 Answers2

0

I would first repair your Windows 10 boot up with Win 10 ISO USB or DVD.

After your Windows is booting from MBR, boot up Ubuntu live CD or USB, open terminal and issue following commands (/dev/sda1 should be your linux partition, if not, change the letter accordingly, sda should be your first disk where you are booting from in BIOS - see grub-install command):

sudo su

fdisk -l

mount /dev/sda1 /mnt/

mount -t proc none /mnt/proc

mount -o bind /dev /mnt/dev

mount -t sysfs sys /mnt/sys

chroot /mnt/ /bin/bash

update-grub

/usr/sbin/grub-install --recheck --no-floppy /dev/sda

sync

reboot

In the last step may instead of reboot command choose reboot from the menu.

kukulo
  • 2,015
  • I tried the bootrec /fixmbr method, and after that i was greeted with no boot devices found error from the bios. So at that point I believe ubuntu installer nuked my windows boot loader. So i just reinstalled windows. But thanks for answering! – Muhammad Syarif Sep 08 '18 at 05:05
0

IF the two are on separate drives installed internally, you would (or may) have to use the Advanced Boot Menu (F12 usually). For the non-default OS, you would highlight and select the alternate drive to boot from.

Basically, the secondary drive boot manager is hidden unless you are booting directly into that drive. I have a similar set-up on one of my systems. My Ubuntu is installed onto a secondary HDD while Windows 10 (my default for gaming purposes) is the default drive. Ubuntu is the layer UNDER the initial layer to boot so when pressing F12 for the boot options I'd have something like:

LEGACY BOOT

•Internal HDD <- (this is actually my default SSD)

•CD/DVD/CD-RW Drive

•Onboard NIC

•USB Storage Device

UEFI BOOT:

•Windows Boot Manager (Or name of 2nd hard drive containing Windows®)

OTHER OPTIONS:

•BIOS Setup

•Device Configuration

•Diagnostics