1

I know there are several threads on these but none of their solutions seem to help me.

I had WIN7 and Ubuntu 14.04 installed on this computer and dual booting was working fine. Keep in mind they are being booted from the same SSD. I updated ubuntu to 18.04 (It failed updating through the terminal and I did a clean reinstall with a live usb) and grub disappeared and it boots straight into ubuntu. All my windows files are still here and intact.

What I've tried:

  • os-prober and update-grub or update-grub2 (made no difference).
  • boot-repair and boot-info, none of which made a difference.
  • Used the grub config file to force grub to load (grub loads but the only option I have is to start ubuntu).
  • Tried manually adding the win7 installation to the grub config file without much avail (but I probably did this wrong anyway).
  • Tried grub-customizer, which did not detect win7.

The boot-info pastebin file is found here:

http://paste.ubuntu.com/p/yRDNz8rnCk/

According to the pastebin it seems there is windows 7 loader files on sda1 and sda2 (Assuming one of these is the system reserved partition?) but if I run update-grub I get the following output:

Found linux image: /boot/vmlinuz-4.15.0-33-generic
Found initrd image: /boot/initrd.img-4.15.0-33-generic
Found linux image: /boot/vmlinuz-4.15.0-29-generic
Found initrd image: /boot/initrd.img-4.15.0-29-generic

So I get the impression it does not find windows at all. Should it be looking in sector 2 of sda instead of sector 1? I honestly have no clue what is wrong here.

Any help would be greatly appreciated.

Edit: When I try to manually add windows to grub I get the following error:

error: no such device: D8E475D4E475B57A
error: can't find command 'drivemap' .
error: invalid EIF file path.

Thinking maybe I should repair the win7 loader.

Edit 2: I tried repairing the win7 boot manager using a win7 live usb. It finds windows ok but assures me there are no errors.

Edit 3: Running boot-repair on a live usb instead of in the installed version gave a tiny bit of progress. After doing this, two instances of win7 showed up in grub (Windows 7 /dev/sda1 and Windows 7 /dev/sda2). This is how it used to look when I was dualbooting with ubuntu 14.04.

Unfortunately, neither of them work, prompting this error:

error: file '/boot/grub/x86_64-efi/ntfs.mod' not found.
error: no such device: 4CA8732DA8731524.
error: can't find command 'parttool'.
error: invalid EFI file path.

Upon restarting the computer these two instances of win 7 were gone again.

Edit 4:

I read someone said that checking the partition with gparted fixed some issues for them which made it work. Well, when I tried doing this I got an error message pertaining to sectors being listed multiple times and that I should do chckdisk /f /r. Thinking maybe there were sector issues I made a new windows live USB so I could run chckdisk from the command window. I booted into BIOS and told BIOS to boot from USB. Instead it loaded GRUB (but now in a much higher resolution) and selecting win 7 actually booted into my win 7 installation and everything seems to work fine.

If I do NOT attempt to boot through the usb, win7 will NOT work through Grub. What's more confusing is that if I try to access this USB from Windows it says it is corrupted (I had some error messages when I attempted making the windows bootable so I'm assuming that's why).

Long story short I have a solution if I want to use Windows, but it's not exactly ideal... Maybe this additional information helps diagnose the problem.

  • 1
  • Cheers @karel, I've seen the reply but never looked past the accepted answer (which didn't work, doing this gave me similar errors as when adding the win7 loader using grub-customizer). I would love to run boot-repair with "Repair Windows boot files" ticked but it is grayed out. I followed the answer you linked but it doesn't mention a grayed out "Repair Windows boot files" box, other than James Ray mentioning it but none of your comments are there. – – user3932479 Sep 10 '18 at 14:42

2 Answers2

0

With grub customizer, add a new entry, name it windows, and set the type to windows chainloader. After you finish adding it, hit save, and reboot. Spam escape while booting to get the grub menu to appear and check to see if it boots. If this is what you already tried, then I'm sorry for waisting your time. Edit: people have suggested solutions for this situation at the link following Add Windows 7 to boot menu

  • It's not entirely what I tried, I attempted modifying the config files and doing the same thing by hand. I tried again using grub-customizer hoping I had simply done it wrong when I tried but I get the same error. Will update original post with them. – user3932479 Sep 10 '18 at 12:32
  • The link added in the update might help! – Lucy Brown Sep 10 '18 at 13:29
0

If your windows is installed in EFI and you installed your ubuntu in BIOS than it happen usually.You will only able to boot ubuntu. If you want to load the grub than your both the OS must be in the same mode either in BIOS or EFI. Suppose your Windows is in BIOS than make your ubuntu bootable of BIOS and select the "Legacy mode(i.e BIOS)" - Enable from boot menu and than try to install ubuntu. Suppose your Windows is in EFI than make your ubuntu bootable of EFI and select the "Lagacy mode" - Disable from boot menu and than try to install ubuntu. (Download iso file specifing EFI or BIOS or while creating bootable via software select both option boot via BIOS as well as EFI.)