0

I followed these steps to install win7 on my ubuntu system-

  1. Created a logical ntfs partition. (dev/sda6)
  2. Installed win7 into that partition using a windows bootable usb. Now I lost the option to boot into ubuntu.
  3. Then I used an ubuntu live usb to run boot-repair. Now I can boot into ubuntu (on dev/sda3) but lost the option to boot into windows.

Can someone please help so that I can boot into either OS?

Here is the boot-info- https://paste2.org/LINU6Uyf

  • I always install windows first and then ubuntu, and it works every time ... – Greg May 11 '17 at 19:41
  • Could you please run Boot-Info and [edit] your question to include a link to its resulting info log? Thanks. – David Foerster May 11 '17 at 20:13
  • @DavidFoerster , Kindly take a look at boot-info – techno holick May 11 '17 at 21:22
  • Could you please disable secure Boot, run Boot-Repair with the suggested steps and try again? What happens when you try to boot Windows? What do you see on the screen? – David Foerster May 11 '17 at 22:23
  • @DavidFoerster The Boot-Repair finished without detecting windows. Here's the new boot info link - https://paste2.org/z0WCA9kg. I do not get any option to boot into windows when I restart. – techno holick May 11 '17 at 22:52
  • 1
    You have a really mixed up system. Ubuntu was UEFI boot and probably was gpt partitioned. Then it looks like you installed Windows in BIOS boot mode converting system to BIOS with MBR partitioning.Then you installed grub to partition boot sectors as well as MBR. But in BIOS mode Windows will not boot directly from a logical partition. It only boots from a primary NTFS partition with Boot flag. Do you want UEFI/gpt or BIOS/MBR. And which ever you want you must be consist on how you boot install media. Windows 7 default install is BIOS only, but it can be copied to flash drive and made for UEFI. – oldfred May 11 '17 at 23:49
  • @oldfred: I think that's actually the answer here. You don't need to describe how to do each of these things because OP needs to decide which one first and can ask how in a new question. – David Foerster May 12 '17 at 06:24
  • @oldfred, Thanks for the diagnosis. I would like to go for whatever is easier- UEFI or BIOS. I guess UEFI being new is preferable. How can I convert my existing windows on BIOS/MBR to UEFI/gpt? Or what are steps to create UEFI windows flash drive for reinstall of windows? – techno holick May 12 '17 at 15:45
  • How you boot install media UEFI or BIOS is then how it installs. For Windows 7 you have to copy DVD to flash drive and move files around. UEFI only boots external devices from /EFI/Boot/bootx64.efi, so you have to make that be a Windows file. Make Windows bootable installer from Ubuntu http://onetransistor.blogspot.ch/2014/09/make-bootable-windows-usb-from-ubuntu.html https://ubuntuforums.org/showthread.php?t=2328513&p=13557011#post13557011 http://askubuntu.com/questions/289559/how-can-i-create-a-windows-bootable-usb-stick-using-ubuntu Install Windows first, then Ubuntu both in UEFI mode. – oldfred May 12 '17 at 16:15
  • @oldfred Thanks for the information. I will follow these to create win7 usb and install it again. After I install windows in UEFI do I again need to install ubuntu? Can't I recover my existing ubuntu in /dev/sda3 by boot-repair or something else? Is there chance of losing data on /dev/sda3 ? – techno holick May 12 '17 at 19:05
  • I built windows usb using mkusb, but still it doesn't shows up in my uefi boot options. In bios mode, I do get the option - 'install windows in bios mode alias csm' but that wont fix my issue, right? When I look inside usb I find folder 'efi/microsoft/boot' which contains file like bcd, cdboot.efi, efisys.bin etc. Is that fine or is there supposed to be a /EFI/Boot/bootx64.efi in windows usb? – techno holick May 12 '17 at 20:42
  • /EFI/Boot/bootx64.efi is required for all UEFI external boots. One of the links discusses which file to copy & rename for a Windows version, but I do not know details. Windows install will probably erase Ubuntu in process of converting from MBR to gpt. If you convert to gpt first (with gdisk) you may then be able to repair the Ubuntu install, but probably easier to just reinstall after Windows. If you configured system or have data, that should have already been backed up. – oldfred May 12 '17 at 21:38

2 Answers2

0

Windows needs a primary partition to boot from, not a logical partition like sda6. You might be able to use sda2 (converted to ntfs) as a Windows boot partition,and leave the bulk of the Windows on sda6, but instructions for that are inappropriate for this site. Backup, Wipe the disk partitions, install Windows first, shrink Windows partition, and install Ubuntu, which does not care if it is in a logical partition.

ubfan1
  • 17,838
-1

basically you boot into linux from hdd and inside of a root terminal execute

update-grub

or you do a fast google search and from already answered posts you edit /boot/grub/grub.cfg and after the last menuentry you add

menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod part_msdos insmod ntfs set root='(hd0,msdos1)' chainloader +1 }

taking care to specify the partition your windows is; found solution here

`How do I manually add windows 7 to grub list?

Add Windows 7 to boot menu

grub2 add entry for Windows 7

How to boot into Windows 7 when grub is installed in the Windows partition? `