Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: GRUB "error: syntax error" on boot

  1. #1
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Beans
    75
    Distro
    Ubuntu Development Release

    Exclamation GRUB "error: syntax error" on boot

    Whenever I boot my laptop, I get the following three lines:

    Code:
    error: syntax error.
    error: Incorrect command.
    error: syntax error.
    Right after I see the error messages for a couple seconds, the boot screen shows up and the rest of the boot progresses as normal. I'm on a Wubi 10.10 ubuntu install and I'm pretty sure this error has something to do with the GRUB_TIMEOUT line on 'etc/default/grub' file.

    I was experiencing some weird glitches with the boot splash screen (it was in the wrong resolution and would not display some times) so I edited that file to make it work. Here is the file:

    Code:
    # If you change this file, run 'update-grub' afterwards to update
    # /boot/grub/grub.cfg.
    
    GRUB_DEFAULT=0
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=0
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset video=uvesafb:mode_option=1280x1024-24,mtrr=3,scroll=ywrap"
    GRUB_CMDLINE_LINUX=""
    
    # Uncomment to enable BadRAM filtering, modify to suit your needs
    # This works with Linux (no patch required) and with any kernel that obtains
    # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
    #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
    
    # Uncomment to disable graphical terminal (grub-pc only)
    #GRUB_TERMINAL=console
    
    # The resolution used on graphical terminal
    # note that you can use only modes which your graphic card supports via VBE
    # you can see them in real GRUB with the command `vbeinfo'
    GRUB_GFXMODE=1280x1024
    
    # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
    #GRUB_DISABLE_LINUX_UUID=true
    
    # Uncomment to disable generation of recovery mode menu entries
    #GRUB_DISABLE_LINUX_RECOVERY="true"
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    When I set GRUB_TIMEOUT to 5, I don't get the error messages on boot. Any help in this problem would be greatly appreciated. Thanks!
    Dual Boot - Windows 7 64-bit Premium Edition & Ubuntu 10.10
    3 GB RAM, 2.1 Ghz AMD Athlon II Dual Core, ATI Mobility Radeon HD 4250

  2. #2
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: GRUB "error: syntax error" on boot

    Don't set it to 0. You need to set that to 1 or higher. Explained here.

    https://help.ubuntu.com/community/Gr...ing%20GRUB%202

  3. #3
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Beans
    75
    Distro
    Ubuntu Development Release

    Re: GRUB "error: syntax error" on boot

    Quote Originally Posted by sikander3786 View Post
    Don't set it to 0. You need to set that to 1 or higher. Explained here.

    https://help.ubuntu.com/community/Gr...ing%20GRUB%202
    If I set it to 1, doesn't it make it show the GRUB menu for 1 second?

    I installed Ubuntu by Wubi, so I can choose whether to boot into Windows 7 or Ubuntu via the Windows bootloader (which appears before the GRUB menu in my boot).

    I dont' want to see the GRUB bootloader at all - how can I do this?
    Dual Boot - Windows 7 64-bit Premium Edition & Ubuntu 10.10
    3 GB RAM, 2.1 Ghz AMD Athlon II Dual Core, ATI Mobility Radeon HD 4250

  4. #4
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,198
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: GRUB "error: syntax error" on boot

    I'm just guessing here but shouldn't
    mode_option=1280x1024-24 be
    mode_option=1280x1024x24
    or am I wrong?
    MacBook Pro 10,1 retina

  5. #5
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Beans
    75
    Distro
    Ubuntu Development Release

    Re: GRUB "error: syntax error" on boot

    Quote Originally Posted by Quackers View Post
    I'm just guessing here but shouldn't
    mode_option=1280x1024-24 be
    mode_option=1280x1024x24
    or am I wrong?
    When I set it to 1280x1024x24, I get a weird greenish-colored screen with horizontal lines instead of the regular boot screen animation. The other way (1280x1024-24) works fine.
    Dual Boot - Windows 7 64-bit Premium Edition & Ubuntu 10.10
    3 GB RAM, 2.1 Ghz AMD Athlon II Dual Core, ATI Mobility Radeon HD 4250

  6. #6
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,198
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: GRUB "error: syntax error" on boot

    Oh dear! Sorry about that, but it just looked odd to me. Ignore me, I'll eventually go away
    MacBook Pro 10,1 retina

  7. #7
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Beans
    75
    Distro
    Ubuntu Development Release

    Re: GRUB "error: syntax error" on boot

    Quote Originally Posted by Quackers View Post
    Oh dear! Sorry about that, but it just looked odd to me. Ignore me, I'll eventually go away
    Haha no problem, I just changed the line back and everything's fine now - except for the original problem. Any ideas on how to fix it?
    Dual Boot - Windows 7 64-bit Premium Edition & Ubuntu 10.10
    3 GB RAM, 2.1 Ghz AMD Athlon II Dual Core, ATI Mobility Radeon HD 4250

  8. #8
    Join Date
    Aug 2007
    Location
    a puddle in Manchester
    Beans
    9,198
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: GRUB "error: syntax error" on boot

    Unfortunately not. I am unfamiliar with wubi installs and I would not like to give dodgy information!
    You know what the doctors say - first do no harm!
    MacBook Pro 10,1 retina

  9. #9
    Join Date
    Mar 2010
    Location
    Maryland, USA
    Beans
    75
    Distro
    Ubuntu Development Release

    Re: GRUB "error: syntax error" on boot

    Quote Originally Posted by Quackers View Post
    Unfortunately not. I am unfamiliar with wubi installs and I would not like to give dodgy information!
    You know what the doctors say - first do no harm!
    I don't think this is a Wubi-specific problem, but more a problem of GRUB.
    Dual Boot - Windows 7 64-bit Premium Edition & Ubuntu 10.10
    3 GB RAM, 2.1 Ghz AMD Athlon II Dual Core, ATI Mobility Radeon HD 4250

  10. #10
    Join Date
    Apr 2009
    Location
    Rawalpindi, Pakistan
    Beans
    5,669
    Distro
    Ubuntu Gnome Development Release

    Re: GRUB "error: syntax error" on boot

    From the link in my previos post, it states,

    GRUB_HIDDEN_TIMEOUT=0 on single operating system computers.

    * No menu is displayed. The system is immediately booted to the default OS.
    * This is the default setting with only one identified operating system.
    o

    To display the menu under this condition, place a # symbol at the start of the line and ensure the GRUB_TIMEOUT setting is a positive integer.
    *

    If the value is set to 0, a keystatus check is performed to determine if the SHIFT key is depressed. If GRUB 2 determines the SHIFT key is depressed during the boot process, the menu will be displayed. This gives the user a method of interrupting an automatic boot which would normally not display the menu.
    So all you need to do is set GRUB_HIDDEN_TIMEOUT=0, GRUB_TIMEOUT=5 or 10 and then run

    Code:
    sudo update-grub
    Starup manager is another option.

    https://help.ubuntu.com/community/StartUpManager

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •