0

I was trying to change default boot option for my laptop(ubuntu and Windows). I can not update the grub which is the last step. When enter the command "sudo update-grub" i get this error "Searching for GRUB installation directory ... found: /boot/grub /etc/default/grub: line 1: ^Y: command not found".

I followed these instructions, How do I set Windows to boot as the default in the boot loader?

I installed boot-repair tool and this is my URL: http://paste.ubuntu.com/11907417/

algOs
  • 1

1 Answers1

1

Your /etc/default/grub has a stray ^Y in it:

=================== /etc/default/grub :

^Y

If you change this file, run 'update-grub' afterwards to update

/boot/grub/grub.cfg.

For full documentation of the options in this file, see:

info -f grub -n 'Simple configuration'

Just delete that line and you should be fine. You can use the following command to delete line 1 (since that's where the error is):

sed -i.bak 1d /etc/default/grub
muru
  • 197,895
  • 55
  • 485
  • 740
  • Thanks. That solved my current problem, but even though after updating grub I am not able to boot in windows as default OS. The prompt still selects Ubuntu. – algOs Jul 27 '15 at 03:03