0

I have a Windows 10 in my sda2. Today I tried to install Ubuntu 16.04 on sda7. I set sda6 as the boot partition.

After the installation completed, the system booted to Windows 10. I booted to Ubuntu live version and set my boot partition as active. After that the system did not detect any bootable devices.

What should I do to make the system boot to grub? Below is the output of fdisk -l:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 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
Disklabel type: dos
Disk identifier: 0xd9fa2484

Device     Boot      Start        End   Sectors   Size Id Type
/dev/sda1             2048    1026047   1024000   500M  7 HPFS/NTFS/exFAT
/dev/sda2          1026048  695230463 694204416   331G  7 HPFS/NTFS/exFAT
/dev/sda3        695230464 1114660863 419430400   200G  7 HPFS/NTFS/exFAT
/dev/sda4       1114662910 1953523711 838860802   400G  f W95 Ext'd (LBA)
/dev/sda5       1114662912 1338780099 224117188 106.9G  7 HPFS/NTFS/exFAT
/dev/sda6  *    1338782148 1349265407  10483260     5G 83 Linux
/dev/sda7       1349267456 1534093311 184825856  88.1G 83 Linux
/dev/sda8       1534095360 1930083641 395988282 188.8G  7 HPFS/NTFS/exFAT
/dev/sda9       1930084352 1937989631   7905280   3.8G 83 Linux
/dev/sda10      1937991680 1953523711  15532032   7.4G 82 Linux swap / Solaris

Partition 4 does not start on physical sector boundary.
Partition 6 does not start on physical sector boundary.
Robby1212
  • 880
  • I manged to reinstall grub on the sda6 and the problem solved. but the cause of problem is a mystery yet. – hussein ghasemi May 29 '17 at 17:41
  • 1
    Grub does not use boot flag. In fact to repair Windows, it will need to see the bootable partition or in Windows the active partition. So move boot flag back to sda1. Then later when you have to fix Windows those fixes should work from your Windows repair flash drive. If Windows 10, updates may reinstall Windows boot loader and/or turn on Windows fast start up. Then you need to boot Windows and turn off fast startup. But you cannot do that from grub and need the Windows boot loader. So always have both Windows repair disk & Ubuntu live installer. – oldfred May 29 '17 at 18:59
  • thanks. i changed the flag and booted to windows for now. – hussein ghasemi May 30 '17 at 10:09
  • Is Windows fast start up off? That must be off. Then use Boot-Repair or installer to reinstall grub to MBR. http://askubuntu.com/questions/843153/ubuntu-16-showing-windows-10-partitions & http://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation Then install grub: How to restore the Ubuntu/XP/Vista/7/8/10 BIOS bootloader https://help.ubuntu.com/community/RestoreUbuntu/XP/Vista/7Bootloader and: https://help.ubuntu.com/community/Grub2/Installing#Fixing_a_Broken_System – oldfred May 30 '17 at 13:45

1 Answers1

0

Are you booting Legacy(MBR) or EFI?

Legacy boot uses CMS addressing. the boot partition has to be within the first 15G. Grub circumvents this limitation by mounting the partitions. Install grub to the MBR not the partition. IE /sda not /sda6. Note: some windows updates might put the windows bootloader back in the MBR.

ravery
  • 6,874
  • As I mentioned on a comment in the question, after reinstalling grub on sda6, the system boot grub successfully. So I think you made a mistake somewhere. – hussein ghasemi May 30 '17 at 07:52
  • I'm booting Legacy mode – hussein ghasemi May 30 '17 at 08:11
  • Is drive set for AHCI? The old IDE may have the older limit of 137GB where boot files must be inside. Any system with older limits would not run Windows 10. – oldfred May 30 '17 at 13:43
  • 1
    likely there was a config file missing somewhere. only core grub is installed in the mbr, the rest is stored in the boot partition. installing grub on /sda6, probably repaired the error, ad allowed the mbr boot to work – ravery May 30 '17 at 13:44