I've installed Windows 10 boot on /dev/sda1 but grub2 doesn't detect that as operating system.

$ fdisk -l

Device      Boot    Start       End         Blocks      Id  System
/dev/sda1   *       2048        2050047     1024000     b   W95 FAT32
/dev/sda2           2050048     232736767   115343360   7   HPFS/NTFS/exFAT
/dev/sda4           232738814   500117503   133689345   f   W95 Ext'd (LBA)
/dev/sda5           476450816   492834815   8192000     82  Linux swap / Solaris
/dev/sda6           492836864   500117503   3640320     83  Linux
/dev/sda7           232738816   476450815   121856000   83  Linux

For that reason I added a menuentry in /etc/grub.d/40_custom leaving the file as

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows 10' {
set root ='(hd0,msdos1)'
chainloader +1

But when I try to get into the Windows 10, I receive this error


error: not an assigment.
error: invalid signature.

Press any key to continue...

But I tried to boot with SuperGrub usb disk and it detected the OS and I could boot without problems.

What am I doing wrong?

  • 1
    Not a big problem this time, but can you use LANG=C when your command's output is localized? For example LANG=C fdisk -l, this way the output will be in english – kos Aug 24 '15 at 9:09
  • I tried, but it doesn't work – Joe Aug 24 '15 at 9:22
  • 1
    btw, I don't think it is /etc/grub.d/40_default but it is /etc/grub.d/40_custom – Ron Aug 24 '15 at 9:24
  • yes, my mistake, /etc/grub.d/40_custom – Joe Aug 24 '15 at 9:27
  • it was just a misspelling in the question. I was actually using /etc/grub.d/40_custom. It is still not working – Joe Aug 24 '15 at 9:33

Changing the menuentry to below:

menuentry 'Windows 10' {
    set root='(hd0,msdos1)' #No 'space' between 'root' and '='
    chainloader +1

works for me. I tried this and it took me back to Windows bootloader (installed in my sda1). So I guess it should work for you as well.

  • Yes, it works, a simple space was the cause of all the problems! I could become crazy to find this. – Joe Aug 24 '15 at 10:09

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.