0

I recently installed windows 7 alongside my Ubuntu installation but am having some trouble getting things to boot properly.

There are two issues (probably related).. First thing is that there just isnt an option to boot for windows in the Grub menu. Second issue being that Windows will not load unless a USB stick and I navigate to BOOT menu to choose USB boot (despite that there is nothing to do with Windows on the USB stick)

Here is a look at my system in Gparted:

enter image description here

The Windows install is on the same drive as my Ubuntu 14.04 install (different partition). UEFI is the boot method. Here is output of my Grub file

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""

Here is the output of sudo fdisk -l with /dev/sda being the drive with the windows & Ubuntu installations. sdb is a media drive and sdc is a thumb drive.

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006e69e

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     1050623      524288    b  W95 FAT32
/dev/sda2         1050624   103450623    51200000   83  Linux
/dev/sda3       233527296   488396799   127434752   83  Linux
/dev/sda4   *   103450624   233527295    65038336    7  HPFS/NTFS/exFAT

Partition table entries are not in disk order

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 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
Disk identifier: 0x0b3923d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048  1953521663   976759808    7  HPFS/NTFS/exFAT

WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! 
The util fdisk doesn't support GPT. Use GNU Parted.


Disk /dev/sdc: 7736 MB, 7736072192 bytes
255 heads, 63 sectors/track, 940 cylinders, total 15109516 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
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1    15109515     7554757+  ee  GPT

also when I tried to reinstall Grub on sda with sudo grub-install /dev/sda I go the following output:

Installing for x86_64-efi platform.
grub-install: error: cannot find EFI directory

Is there a way I can add Windows to my Grub menu or get windows to load wihtout having to have a USB stick plugged in? I tried boot repiar, but it said 'Grub was still present' so it didnt seem to work

--------(EDIT) NEW INFO ADDED--------------

so I completely formatted dev/sda/ and then created new partitions for Windows & Ubuntu.. I then installed Windows first and was successfully able to boot to Windows on Startup. The Next Step I did was to clone my backup Ubuntu partition back onto a separate partion of the new sda volume.
enter image description here

I was not able to boot into the Ubuntu installation until I reinstalled grub with Boot Repair. I am now able to login to Ubuntu, but Windows is still not showing up in the Grub menu. Here is the new output of sudo fdisk -l

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0007f9d1

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048     1050623      524288    b  W95 FAT32
/dev/sda2         1050624   103450623    51200000   83  Linux
/dev/sda3   *   103450624   233527295    65038336    7  HPFS/NTFS/exFAT
/dev/sda4       233527296   488396799   127434752    7  HPFS/NTFS/exFAT

Disk /dev/sdb: 1019 MB, 1019215872 bytes
255 heads, 63 sectors/track, 123 cylinders, total 1990656 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
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           2     1990655      995327    b  W95 FAT32

The output of Boot Repair can be seen HERE

  • Windows only boots in UEFI mode from gpt partitioned drives & you must boot Windows installer in UEFI mode. Windows 7 default is BIOS only. But it can be changed. Do not mix UEFI & BIOS. Either both Windows & Ubuntu in BIOS mode or both in UEFI boot mode. – oldfred May 27 '16 at 21:35
1

Boot into Windows and download and install EasyBCD. Run it, and click "BCD Deployment, click "Write MBR" and then install BCD on your Windows partition (This case NTFS Partition 4). Now go to "Add New Entry" and select your Windows partition, then click "Add Entry". Next, go to the Linux tab and select GRUB2 and select "Automatically Locate and Load" then "Add Entry". You should now be able to boot Windows and Linux painlessly.

  • I will try this but let me ask. Do I need to install Grub in different places for different installs, like make a boot sector for each partition? – Kalamalka Kid May 26 '16 at 9:18
  • 1
    No, EasyBCD will load GRUB from the partition where it is installed. – WinMacLinUser May 26 '16 at 9:19
  • i meant in general , like say if i wasnt using EasyBCD – Kalamalka Kid May 26 '16 at 9:21
  • Your disk only has one boot sector, so your MBR is only capable of loading one bootloader, however one bootloader may chaiload another. – WinMacLinUser May 26 '16 at 9:26
  • You only need ONE bootloader per device in order to make it bootable. One bootloader for sda, one for sdc, etc. Your problem isn't the bootloader, but the partitioning scheme. See my answer. – ipse lute May 26 '16 at 9:51
2

The two issues are just one: your sda has an MBR partitioning scheme (that's why no EFI partition on it) and your sdc has a GPT partitioning scheme. That's an incompatibility. The install source device (sdc) and the target (to install to) device MUST have the same partitioning scheme in order for GRUB to install correctly. It can be MBR --> MBR, or GPT --> GPT, but NOT MBR --> GPT or GPT --> MBR.
Judging by the size (and Win7) of your internal disk, i assume you have an older PC that just might not support UEFI and GPT. It is most likely a BIOS PC who only supports MBR.
The safest solution would be to erase sdc and create an MBR scheme to it. Then create a Ubuntu liveUSB on it. Easiest way to do that would be by using Rufus under Windows and selecting BIOS scheme for your usb thumb. And then reinstall Ubuntu.

  • thank you for explaining this. I did mention though that I am running UEFI. THe computer is an i7 NUC515RYH so its pretty new. Also, SDC is simply a thumb drive that has no boot data on it. As for reinstalling UBUNTU, that's just not an option. – Kalamalka Kid May 26 '16 at 9:52
  • "The install source device (sdc) and the target (to install to) device MUST have the same partitioning scheme in order for GRUB to install correctly" this makes sense, but does that mean I have to completely install windows all over again because the Windows installer USB disk was GPT at the time of the install? – Kalamalka Kid May 26 '16 at 9:54
  • 1
    Ok, you're having an UEFI PC. Which is GPT scheme capable. But currently it doesn't have a GPT on sda. It has a MBR scheme. Because GParted and fdisk tell you NO EFI partition/directory on it. The incompatibility still remains. – ipse lute May 26 '16 at 9:58
  • 1
    One more thing: GParted tells you Win7 is flaged as boot partition. To make GRUB work you need to flag the partition where GRUB is installed as boot partition. Try this flag thing before erasing any device/partition. – ipse lute May 26 '16 at 10:12
  • 1
    Grub does not use boot flag. Windows in BIOS boot mode on a MBR partitioned drive must have boot flag on primary NTFS partition. Your Windows install is BIOS. Windows only installs in UEFI boot mode if you boot Windows installer in UEFI mode and drive is gpt partitioned. And Windows 7 default is BIOS, you have to have it on a flash drive and move some files around & rename so it can be an UEFI installer. – oldfred May 27 '16 at 21:32

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.