Page 1 of 5 123 ... LastLast
Results 1 to 10 of 46

Thread: update-grub syntax error

  1. #1
    Join Date
    Mar 2012
    Beans
    246

    update-grub syntax error

    Hi. I nned your help

    Recently i've been fighting with update-grub syntax error. Don't know why this happens, don't know how to fix it. Could you help?

    When updating grub this is showing up:

    Code:
    firekage@deusex:/boot/grub$ sudo update-grub
    Generowanie grub.cfg...
    Znaleziono obraz Linuksa: /boot/vmlinuz-3.5.0-26-generic
    Znaleziono obraz initrd: /boot/initrd.img-3.5.0-26-generic
    Znaleziono obraz Linuksa: /boot/vmlinuz-3.5.0-25-generic
    Znaleziono obraz initrd: /boot/initrd.img-3.5.0-25-generic
    Znaleziono obraz Linuksa: /boot/vmlinuz-3.5.0-24-generic
    Znaleziono obraz initrd: /boot/initrd.img-3.5.0-24-generic
    Found memtest86+ image: /boot/memtest86+.bin
    Znaleziono Slackware Linux (Slackware 13.37.0) na /dev/sda2
    Znaleziono Windows Vista (loader) na /dev/sdc1
    Znaleziono Slackware Linux (Slackware 14.0) na /dev/sdd1
    Znaleziono Ubuntu 12.04.2 LTS (12.04) na /dev/sdf1
    Znaleziono Ubuntu 12.04 LTS (12.04) na /dev/sdg1
    błąd: syntax error.
    błąd: Incorrect command.
    błąd: syntax error.
    Błąd składni w linii 287
    W wygenerowanym pliku konfiguracyjnym GRUB-a wykryto błędy składni.
    Proszę się upewnić, że w plikach /etc/default/grub oraz /etc/grub.d/*
    nie ma błędów lub wypełnić raport o błędzie z załączonym plikiem /boot/grub/grub.cfg.new.gotowe
    Quick translation:

    Znaleziono obraz Linuksa: /boot/vmlinuz-3.5.0-26-generic : found linux image /boot/vmlinuz-3.5.0-26-generic
    Znaleziono Ubuntu 12.04 LTS (12.04) na /dev/sdg1 : found Ubuntu 12.04 LTS (12.04) on /dev/sdg1
    błąd: syntax error. error: syntax error
    błąd: Incorrect command. error: incorect command
    błąd: syntax error. error: syntax error
    Błąd składni w linii 287 error: in line 287
    W wygenerowanym pliku konfiguracyjnym GRUB-a wykryto błędy składni. In generated grub found error.
    Proszę się upewnić, że w plikach /etc/default/grub oraz /etc/grub.d/* Please check that in /etc/default/grub and /etc/grub.d/*
    nie ma błędów lub wypełnić raport o błędzie z załączonym plikiem /boot/grub/grub.cfg.new.gotowe there are no errors or send raport with provided file /boot/grub.grub.cfg.new.ready





    This is my grub.cfg from /etc/default/grub.cfg:

    Code:
    # 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'
    
    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="quiet splash"
    GRUB_CMDLINE_LINUX="resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee"
    
    # 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=640x480
    
    # 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_RECOVERY="true"
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"
    This is my /boot/default.grub.cfg

    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
    else
      search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
    fi
        font="/usr/share/grub/unicode.pf2"
    fi
    
    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=pl_PL
      insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
            set vt_handoff=vt.handoff=7
        else
            set vt_handoff=
        fi
    }
    if [ "${recordfail}" != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
    recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee  quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.5.0-24-generic
    }
    submenu 'Opcje zaawansowane dla systemu Ubuntu' $menuentry_id_option 'gnulinux-advanced-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-24-generic-advanced-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        recordfail
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
            else
              search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
            fi
            echo    'Wczytywanie systemu Linux 3.5.0-24-generic...'
            linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee  quiet splash $vt_handoff
            echo    'Wczytywanie początkowego dysku RAM...'
            initrd    /boot/initrd.img-3.5.0-24-generic
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-24-generic (tryb ratunkowy)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-24-generic-recovery-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        recordfail
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
            else
              search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
            fi
            echo    'Wczytywanie systemu Linux 3.5.0-24-generic...'
            linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro recovery nomodeset resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee
            echo    'Wczytywanie początkowego dysku RAM...'
            initrd    /boot/initrd.img-3.5.0-24-generic
        }
    }
    
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Slackware Linux (Slackware 13.37.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-0a2ebb07-8b93-4938-9bee-7eca19168eee' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  0a2ebb07-8b93-4938-9bee-7eca19168eee
        else
          search --no-floppy --fs-uuid --set=root 0a2ebb07-8b93-4938-9bee-7eca19168eee
        fi
        linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga = normal append = resume=/dev/sda1
    }
    submenu 'Opcje zaawansowane dla systemu Slackware Linux (Slackware 13.37.0)' $menuentry_id_option 'osprober-gnulinux-advanced-0a2ebb07-8b93-4938-9bee-7eca19168eee' {
        menuentry 'Slackware (na /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--0a2ebb07-8b93-4938-9bee-7eca19168eee' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos2'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  0a2ebb07-8b93-4938-9bee-7eca19168eee
            else
              search --no-floppy --fs-uuid --set=root 0a2ebb07-8b93-4938-9bee-7eca19168eee
            fi
            linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga = normal append = resume=/dev/sda1
        }
    }
    
    menuentry 'Windows Vista (loader) (na /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-chain-20FEB393FEB36028' {
        insmod part_msdos
        insmod ntfs
        set root='hd2,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  20FEB393FEB36028
        else
          search --no-floppy --fs-uuid --set=root 20FEB393FEB36028
        fi
        chainloader +1
    }
    menuentry 'Slackware Linux (Slackware 14.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-340d8335-6690-46fd-8b73-26f68cfb317d' {
        insmod part_msdos
        insmod ext2
        set root='hd3,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  340d8335-6690-46fd-8b73-26f68cfb317d
        else
          search --no-floppy --fs-uuid --set=root 340d8335-6690-46fd-8b73-26f68cfb317d
        fi
        linux /boot/vmlinuz root=/dev/sdd1 ro  vt.default_utf8=0 vga = normal
    }
    submenu 'Opcje zaawansowane dla systemu Slackware Linux (Slackware 14.0)' $menuentry_id_option 'osprober-gnulinux-advanced-340d8335-6690-46fd-8b73-26f68cfb317d' {
        menuentry 'Slackware_14 (na /dev/sdd1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--340d8335-6690-46fd-8b73-26f68cfb317d' {
            insmod part_msdos
            insmod ext2
            set root='hd3,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  340d8335-6690-46fd-8b73-26f68cfb317d
            else
              search --no-floppy --fs-uuid --set=root 340d8335-6690-46fd-8b73-26f68cfb317d
            fi
            linux /boot/vmlinuz root=/dev/sdd1 ro  vt.default_utf8=0 vga = normal
        }
    }
    
    menuentry 'Ubuntu 12.10 (12.10)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-35d29952-1f7b-44b9-9ddf-aeebc653d50f' {
        insmod part_msdos
        insmod ext2
        set root='hd4,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4,msdos1  35d29952-1f7b-44b9-9ddf-aeebc653d50f
        else
          search --no-floppy --fs-uuid --set=root 35d29952-1f7b-44b9-9ddf-aeebc653d50f
        fi
        linux /boot/vmlinuz-3.5.0-17-generic root=UUID=35d29952-1f7b-44b9-9ddf-aeebc653d50f ro quiet splash $vt_handoff
        initrd /boot/initrd.img-3.5.0-17-generic
    }
    submenu 'Opcje zaawansowane dla systemu Ubuntu 12.10 (12.10)' $menuentry_id_option 'osprober-gnulinux-advanced-35d29952-1f7b-44b9-9ddf-aeebc653d50f' {
        menuentry 'Ubuntu (na /dev/sde1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.5.0-17-generic--35d29952-1f7b-44b9-9ddf-aeebc653d50f' {
            insmod part_msdos
            insmod ext2
            set root='hd4,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4,msdos1  35d29952-1f7b-44b9-9ddf-aeebc653d50f
            else
              search --no-floppy --fs-uuid --set=root 35d29952-1f7b-44b9-9ddf-aeebc653d50f
            fi
            linux /boot/vmlinuz-3.5.0-17-generic root=UUID=35d29952-1f7b-44b9-9ddf-aeebc653d50f ro quiet splash $vt_handoff
            initrd /boot/initrd.img-3.5.0-17-generic
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-17-generic (na /dev/sde1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.5.0-17-generic--35d29952-1f7b-44b9-9ddf-aeebc653d50f' {
            insmod part_msdos
            insmod ext2
            set root='hd4,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4,msdos1  35d29952-1f7b-44b9-9ddf-aeebc653d50f
            else
              search --no-floppy --fs-uuid --set=root 35d29952-1f7b-44b9-9ddf-aeebc653d50f
            fi
            linux /boot/vmlinuz-3.5.0-17-generic root=UUID=35d29952-1f7b-44b9-9ddf-aeebc653d50f ro quiet splash $vt_handoff
            initrd /boot/initrd.img-3.5.0-17-generic
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-17-generic (tryb ratunkowy) (na /dev/sde1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.5.0-17-generic-root=UUID=35d29952-1f7b-44b9-9ddf-aeebc653d50f ro recovery nomodeset-35d29952-1f7b-44b9-9ddf-aeebc653d50f' {
            insmod part_msdos
            insmod ext2
            set root='hd4,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd4,msdos1 --hint-efi=hd4,msdos1 --hint-baremetal=ahci4,msdos1  35d29952-1f7b-44b9-9ddf-aeebc653d50f
            else
              search --no-floppy --fs-uuid --set=root 35d29952-1f7b-44b9-9ddf-aeebc653d50f
            fi
            linux /boot/vmlinuz-3.5.0-17-generic root=UUID=35d29952-1f7b-44b9-9ddf-aeebc653d50f ro recovery nomodeset
            initrd /boot/initrd.img-3.5.0-17-generic
        }
    }
    
    menuentry 'Ubuntu 12.04 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
        insmod part_msdos
        insmod ext2
        set root='hd5,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
        else
          search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
        fi
        linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro quiet splash $vt_handoff

    Is there a way to fix it?

  2. #2
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: update-grub syntax error

    Maybe it's just the result of a hasty copy&paste, but your grub.cfg lacks closing } at the end. Other than this, I don't see any obvious errors.

    Please post the output of
    Code:
    grub-script-check -v
    Last edited by schragge; March 10th, 2013 at 02:44 PM.

  3. #3
    Join Date
    Mar 2012
    Beans
    246

    Re: update-grub syntax error

    Quote Originally Posted by schragge View Post
    Maybe it's just the result of a hasty copy&paste, but your grub.cfg lacks closing } at the end. Other than this, I don't see any obvious errors.
    I should have } at the end of this:

    Code:
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    It that it?

    Please post the output of
    Code:
    grub-script-check -v

    There is nothing. When i type it this command in terminal, prompt seems busy and nothing more. Prompt blinks. I waited for several minutes and still no results. Cursor/prompt is busy.
    Last edited by firekage; March 10th, 2013 at 04:06 PM.

  4. #4
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: update-grub syntax error

    Is there perhaps an error in your 12.04 install, or did you cut off the full script in you post?

    It shows 12.04 linux line, but then it ends without initrd or ending }.

    Grub2's os-prober copies entries from other installs and if somehow that entry is wrong it can cause errors.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  5. #5
    Join Date
    Mar 2012
    Beans
    246

    Re: update-grub syntax error

    Quote Originally Posted by oldfred View Post
    Is there perhaps an error in your 12.04 install, or did you cut off the full script in you post?
    I have another ubuntu install - 12.04, works fine. I will post again these files - maybe i cuted them when posted them.

    It shows 12.04 linux line, but then it ends without initrd or ending }.
    I will post it again, here it is:

    /boot/grub/grub.cfg:

    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
    else
      search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
    fi
        font="/usr/share/grub/unicode.pf2"
    fi
    
    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=pl_PL
      insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
            set vt_handoff=vt.handoff=7
        else
            set vt_handoff=
        fi
    }
    if [ "${recordfail}" != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
    recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee  quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.5.0-24-generic
    }
    submenu 'Opcje zaawansowane dla systemu Ubuntu' $menuentry_id_option 'gnulinux-advanced-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-24-generic-advanced-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        recordfail
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
            else
              search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
            fi
            echo    'Wczytywanie systemu Linux 3.5.0-24-generic...'
            linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee  quiet splash $vt_handoff
            echo    'Wczytywanie początkowego dysku RAM...'
            initrd    /boot/initrd.img-3.5.0-24-generic
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-24-generic (tryb ratunkowy)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-24-generic-recovery-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        recordfail
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
            else
              search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
            fi
            echo    'Wczytywanie systemu Linux 3.5.0-24-generic...'
            linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro recovery nomodeset resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee
            echo    'Wczytywanie początkowego dysku RAM...'
            initrd    /boot/initrd.img-3.5.0-24-generic
        }
    }
    
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Slackware Linux (Slackware 13.37.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-0a2ebb07-8b93-4938-9bee-7eca19168eee' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  0a2ebb07-8b93-4938-9bee-7eca19168eee
        else
          search --no-floppy --fs-uuid --set=root 0a2ebb07-8b93-4938-9bee-7eca19168eee
        fi
        linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga = normal append = resume=/dev/sda1
    }
    submenu 'Opcje zaawansowane dla systemu Slackware Linux (Slackware 13.37.0)' $menuentry_id_option 'osprober-gnulinux-advanced-0a2ebb07-8b93-4938-9bee-7eca19168eee' {
        menuentry 'Slackware (na /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--0a2ebb07-8b93-4938-9bee-7eca19168eee' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos2'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  0a2ebb07-8b93-4938-9bee-7eca19168eee
            else
              search --no-floppy --fs-uuid --set=root 0a2ebb07-8b93-4938-9bee-7eca19168eee
            fi
            linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga = normal append = resume=/dev/sda1
        }
    }
    
    menuentry 'Windows Vista (loader) (na /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-chain-20FEB393FEB36028' {
        insmod part_msdos
        insmod ntfs
        set root='hd2,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  20FEB393FEB36028
        else
          search --no-floppy --fs-uuid --set=root 20FEB393FEB36028
        fi
        chainloader +1
    }
    menuentry 'Slackware Linux (Slackware 14.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-340d8335-6690-46fd-8b73-26f68cfb317d' {
        insmod part_msdos
        insmod ext2
        set root='hd3,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  340d8335-6690-46fd-8b73-26f68cfb317d
        else
          search --no-floppy --fs-uuid --set=root 340d8335-6690-46fd-8b73-26f68cfb317d
        fi
        linux /boot/vmlinuz root=/dev/sdd1 ro  vt.default_utf8=0 vga = normal
    }
    submenu 'Opcje zaawansowane dla systemu Slackware Linux (Slackware 14.0)' $menuentry_id_option 'osprober-gnulinux-advanced-340d8335-6690-46fd-8b73-26f68cfb317d' {
        menuentry 'Slackware_14 (na /dev/sdd1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--340d8335-6690-46fd-8b73-26f68cfb317d' {
            insmod part_msdos
            insmod ext2
            set root='hd3,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  340d8335-6690-46fd-8b73-26f68cfb317d
            else
              search --no-floppy --fs-uuid --set=root 340d8335-6690-46fd-8b73-26f68cfb317d
            fi
            linux /boot/vmlinuz root=/dev/sdd1 ro  vt.default_utf8=0 vga = normal
        }
    }
    
    
    menuentry 'Ubuntu 12.04 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
        insmod part_msdos
        insmod ext2
        set root='hd5,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
        else
          search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
        fi
        linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro quiet splash $vt_handoff
        initrd /boot/initrd.img-3.2.0-23-generic-pae
    }
    submenu 'Opcje zaawansowane dla systemu Ubuntu 12.04 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
        menuentry 'Ubuntu, za pomocą systemu Linux 3.2.0-23-generic-pae (na /dev/sdf1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-23-generic-pae--7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
            insmod part_msdos
            insmod ext2
            set root='hd5,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
            else
              search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
            fi
            linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro quiet splash $vt_handoff
            initrd /boot/initrd.img-3.2.0-23-generic-pae
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.2.0-23-generic-pae (tryb ratunkowy) (na /dev/sdf1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-23-generic-pae-root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro recovery nomodeset-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
            insmod part_msdos
            insmod ext2
            set root='hd5,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
            else
              search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
            fi
            linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-23-generic-pae
        }
    }
    
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # 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.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    }
    ### END /etc/grub.d/41_custom ###
    I haven't modified it in any way.

    Here is a /etc/default/grub:

    Code:
    # 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'
    
    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="quiet splash"
    GRUB_CMDLINE_LINUX="resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee"
    
    # 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=640x480
    
    # 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_RECOVERY="true"
    
    # Uncomment to get a beep at grub start
    #GRUB_INIT_TUNE="480 440 1"

    Grub2's os-prober copies entries from other installs and if somehow that entry is wrong it can cause errors.
    There are entries from os-prober:

    Code:
    #! /bin/sh
    set -e
    
    # grub-mkconfig helper script.
    # Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
    #
    # GRUB is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # GRUB is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
    
    prefix="/usr"
    exec_prefix="${prefix}"
    datarootdir="${prefix}/share"
    
    export TEXTDOMAIN=grub
    export TEXTDOMAINDIR="${datarootdir}/locale"
    
    . "${datarootdir}/grub/grub-mkconfig_lib"
    
    found_other_os=
    
    make_timeout () {
      if [ "x${found_other_os}" = "x" ] ; then
        if [ "x${1}" != "x" ] ; then
          if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
        verbose=
          else
        verbose=" --verbose"
          fi
    
          if [ "x${1}" = "x0" ] ; then
        cat <<EOF
    if [ "x\${timeout}" != "x-1" ]; then
      if keystatus; then
        if keystatus --shift; then
          set timeout=-1
        else
          set timeout=0
        fi
      else
        if sleep$verbose --interruptible 3 ; then
          set timeout=0
        fi
      fi
    fi
    EOF
          else
        cat << EOF
    if [ "x\${timeout}" != "x-1" ]; then
      if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
        set timeout=0
      fi
    fi
    EOF
          fi
        fi
      fi
    }
    
    adjust_timeout () {
      if [ "x$GRUB_BUTTON_CMOS_ADDRESS" != "x" ]; then
        cat <<EOF
    if cmostest $GRUB_BUTTON_CMOS_ADDRESS ; then
    EOF
        make_timeout "${GRUB_HIDDEN_TIMEOUT_BUTTON}" "${GRUB_TIMEOUT_BUTTON}"
        echo else
        make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
        echo fi
      else
        make_timeout "${GRUB_HIDDEN_TIMEOUT}" "${GRUB_TIMEOUT}"
      fi
    }
    
    if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
      adjust_timeout
      exit 0
    fi
    
    if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
      # missing os-prober and/or linux-boot-prober
      adjust_timeout
      exit 0
    fi
    
    OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
    if [ -z "${OSPROBED}" ] ; then
      # empty os-prober output, nothing doing
      adjust_timeout
      exit 0
    fi
    
    osx_entry() {
        found_other_os=1
        if [ x$2 = x32 ]; then
            # TRANSLATORS: it refers to kernel architecture (32-bit)
        bitstr="$(gettext "(32-bit)")"
        else
            # TRANSLATORS: it refers to kernel architecture (64-bit)
        bitstr="$(gettext "(64-bit)")"
        fi
        # TRANSLATORS: it refers on the OS residing on device %s
        onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
            cat << EOF
    menuentry '$(echo "${LONGNAME} $bitstr $onstr" | grub_quote)' --class osx --class darwin --class os \$menuentry_id_option 'osprober-xnu-$2-$(grub_get_device_id "${DEVICE}")'  {
    EOF
        save_default_entry | sed -e "s/^/\t/"
        prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
        cat << EOF
            load_video
            set do_resume=0
            if [ /var/vm/sleepimage -nt10 / ]; then
               if xnu_resume /var/vm/sleepimage; then
                 set do_resume=1
               fi
            fi
            if [ \$do_resume = 0 ]; then
               xnu_uuid ${OSXUUID} uuid
               if [ -f /Extra/DSDT.aml ]; then
                  acpi -e /Extra/DSDT.aml
               fi
               if [ /kernelcache -nt /System/Library/Extensions ]; then
                  $1 /kernelcache boot-uuid=\${uuid} rd=*uuid
               else
                  $1 /mach_kernel boot-uuid=\${uuid} rd=*uuid
                  if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                    xnu_mkext /System/Library/Extensions.mkext
                  else
                    xnu_kextdir /System/Library/Extensions
                  fi
               fi
               if [ -f /Extra/Extensions.mkext ]; then
                  xnu_mkext /Extra/Extensions.mkext
               fi
               if [ -d /Extra/Extensions ]; then
                  xnu_kextdir /Extra/Extensions
               fi
               if [ -f /Extra/devprop.bin ]; then
                  xnu_devprop_load /Extra/devprop.bin
               fi
               if [ -f /Extra/splash.jpg ]; then
                  insmod jpeg
                  xnu_splash /Extra/splash.jpg
               fi
               if [ -f /Extra/splash.png ]; then
                  insmod png
                  xnu_splash /Extra/splash.png
               fi
               if [ -f /Extra/splash.tga ]; then
                  insmod tga
                  xnu_splash /Extra/splash.tga
               fi
            fi
    }
    EOF
    }
    
    used_osprober_linux_ids=
    
    wubi=
    
    for OS in ${OSPROBED} ; do
      DEVICE="`echo ${OS} | cut -d ':' -f 1`"
      LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
      LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
      BOOT="`echo ${OS} | cut -d ':' -f 4`"
    
      if [ -z "${LONGNAME}" ] ; then
        LONGNAME="${LABEL}"
      fi
    
      gettext_printf "Found %s on %s\n" "${LONGNAME}" "${DEVICE}" >&2
    
      case ${BOOT} in
        chain)
    
          case ${LONGNAME} in
        Windows*)
          if [ -z "$wubi" ]; then
            if [ -x /usr/share/lupin-support/grub-mkimage ] && \
               /usr/share/lupin-support/grub-mkimage --test; then
              wubi=yes
            else
              wubi=no
            fi
          fi
          if [ "$wubi" = yes ]; then
            echo "Skipping ${LONGNAME} on Wubi system" >&2
            continue
          fi
          ;;
          esac
    
          found_other_os=1
          onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
          cat << EOF
    menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class windows --class os \$menuentry_id_option 'osprober-chain-$(grub_get_device_id "${DEVICE}")' {
    EOF
          save_default_entry | sed -e "s/^/\t/"
          prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
    
          case ${LONGNAME} in
        Windows\ Vista*|Windows\ 7*|Windows\ Server\ 2008*)
        ;;
        *)
          cat << EOF
        drivemap -s (hd0) \${root}
    EOF
        ;;
          esac
    
          cat <<EOF
        chainloader +1
    }
    EOF
        ;;
        linux)
          LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
          prepare_boot_cache=
          boot_device_id=
          is_first_entry=true
          title_correction_code=
          OS="${LONGNAME}"
    
          for LINUX in ${LINUXPROBED} ; do
            LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
            LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
            LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
            LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
            LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
            LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
    
            if [ -z "${LLABEL}" ] ; then
              LLABEL="${LONGNAME}"
            fi
    
        if [ "${LROOT}" != "${LBOOT}" ]; then
          LKERNEL="${LKERNEL#/boot}"
          LINITRD="${LINITRD#/boot}"
        fi
    
        if [ -z "${prepare_boot_cache}" ]; then
          prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
          [ "${prepare_boot_cache}" ] || continue
        fi
    
        found_other_os=1
        onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
        recovery_params="$(echo "${LPARAMS}" | grep 'single\|recovery')" || true
        counter=1
        while echo "$used_osprober_linux_ids" | grep 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id' > /dev/null; do
            counter=$((counter+1));
        done
        if [ -z "$boot_device_id" ]; then
            boot_device_id="$(grub_get_device_id "${DEVICE}")"
        fi
        used_osprober_linux_ids="$used_osprober_linux_ids 'osprober-gnulinux-$LKERNEL-${recovery_params}-$counter-$boot_device_id'"
    
        if [ "x$is_first_entry" = xtrue ]; then
                cat << EOF
    menuentry '$(echo "$OS" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-simple-$boot_device_id' {
    EOF
            save_default_entry | sed -e "s/^/\t/"
            printf '%s\n' "${prepare_boot_cache}"
            cat <<  EOF
        linux ${LKERNEL} ${LPARAMS}
    EOF
                if [ -n "${LINITRD}" ] ; then
              cat << EOF
        initrd ${LINITRD}
    EOF
                fi
            cat << EOF
    }
    EOF
            echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'osprober-gnulinux-advanced-$boot_device_id' {"
            is_first_entry=false
        fi
        title="${LLABEL} $onstr"
            cat << EOF
        menuentry '$(echo "$title" | grub_quote)' --class gnu-linux --class gnu --class os \$menuentry_id_option 'osprober-gnulinux-$LKERNEL-${recovery_params}-$boot_device_id' {
    EOF
        save_default_entry | sed -e "s/^/\t\t/"
        printf '%s\n' "${prepare_boot_cache}" | sed -e "s/^/\t/"
        cat <<  EOF
            linux ${LKERNEL} ${LPARAMS}
    EOF
            if [ -n "${LINITRD}" ] ; then
                cat << EOF
            initrd ${LINITRD}
    EOF
            fi
            cat << EOF
        }
    EOF
        if [ x"$title" = x"$GRUB_ACTUAL_DEFAULT" ] || [ x"Previous Linux versions>$title" = x"$GRUB_ACTUAL_DEFAULT" ]; then
            replacement_title="$(echo "Advanced options for ${OS}" | sed 's,>,>>,g')>$(echo "$title" | sed 's,>,>>,g')"
            quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
            title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
            grub_warn "$(gettext_printf "Please don't use old title \`%s' for GRUB_DEFAULT, use \`%s' (for versions before 2.00) or \`%s' (for 2.00 or later)" "$GRUB_ACTUAL_DEFAULT" "$replacement_title" "gnulinux-advanced-$boot_device_id>gnulinux-$version-$type-$boot_device_id")"
        fi
          done
          if [ x"$is_first_entry" != xtrue ]; then
          echo '}'
          fi
          echo "$title_correction_code"
        ;;
        macosx)
          OSXUUID="`${grub_probe} --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
          osx_entry xnu_kernel 32
          osx_entry xnu_kernel64 64
        ;;
        hurd)
          found_other_os=1
          onstr="$(gettext_printf "(on %s)" "${DEVICE}")"
          cat << EOF
    menuentry '$(echo "${LONGNAME} $onstr" | grub_quote)' --class hurd --class gnu --class os \$menuentry_id_option 'osprober-gnuhurd-/boot/gnumach.gz-false-$(grub_get_device_id "${DEVICE}")' {
    EOF
          save_default_entry | sed -e "s/^/\t/"
          prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
          grub_device="`${grub_probe} --device ${DEVICE} --target=drive`"
          mach_device="`echo "${grub_device}" | sed -e 's/(\(hd.*\),msdos\(.*\))/\1s\2/'`"
          grub_fs="`${grub_probe} --device ${DEVICE} --target=fs`"
          case "${grub_fs}" in
        *fs)    hurd_fs="${grub_fs}" ;;
        *)    hurd_fs="${grub_fs}fs" ;;
          esac
          cat << EOF
        multiboot /boot/gnumach.gz root=device:${mach_device}
        module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
                --multiboot-command-line='\${kernel-command-line}' \\
                --host-priv-port='\${host-port}' \\
                --device-master-port='\${device-port}' \\
                --exec-server-task='\${exec-task}' -T typed '\${root}' \\
                '\$(task-create)' '\$(task-resume)'
        module /lib/ld.so.1 exec /hurd/exec '\$(exec-task=task-create)'
    }
    EOF
        ;;
        *)
          echo -n "  "
          # TRANSLATORS: %s is replaced by OS name.
          gettext_printf "%s is not yet supported by grub-mkconfig.\n" "${LONGNAME}" >&2
        ;;
      esac
    done
    
    adjust_timeout

  6. #6
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: update-grub syntax error

    It was not grub, but grub.cfg.

    And you posted the script, not the output from the script.

    I had a typo in my 40_custom from about the beginning of grub2, but with grub1.99 it stopped writing the file and called it an error. I was missing an ending } on a old version I did not boot any more so my older version just did not post that I did not notice it missing. New version would not convert entire file.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  7. #7
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: update-grub syntax error

    Yes, /boot/grub/grub.cfg was cut off the first time. It's much better now.

    I've noticed spaces between kernel boot option names and their values in several menu entries inserted by os-prober like this line for Slackware:
    Code:
    linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga_=_normal append_=_resume=/dev/sda1
    I think they shouldn't be there.
    Last edited by schragge; March 11th, 2013 at 12:40 PM.

  8. #8
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: update-grub syntax error

    It could be slackware allows the spaces and grub2 does not?

    You can copy that boot stanza to 40_custom and edit out spaces. If you then turn off os-prober will it add it to your grub.cfg?

    gedit /boot/grub/grub.cfg
    Copy and edit :

    gksudo gedit /etc/grub.d/40_custom
    #Turn off prober
    gksudo gedit /etc/default/grub
    #Add this line
    GRUB_DISABLE_OS_PROBER=true
    #update grub menu
    sudo update-grub
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  9. #9
    Join Date
    Feb 2013
    Beans
    Hidden!

    Re: update-grub syntax error

    Quote Originally Posted by oldfred View Post
    It could be slackware allows the spaces and grub2 does not?
    I highly doubt that Slackware kernel allows the spaces. Most probably, the parameters containing spaces are just silently ignored by kernel. Slackware is notoriously famous for offering minimally tweaked upstream kernels and software, and nothing in the kernel documentation on boot parameters leads me to believe that the spaces are supported by vanilla Linux kernel out of the box.

    @firekage
    BTW, do you have /etc/grub.d/custom.cfg or /boot/grub/custom.cfg referenced in /etc/grub.d/41_custom?
    Last edited by schragge; March 11th, 2013 at 04:13 PM.

  10. #10
    Join Date
    Mar 2012
    Beans
    246

    Re: update-grub syntax error

    Quote Originally Posted by oldfred View Post
    It was not grub, but grub.cfg.
    Here is a grub.cfg:

    Code:
    #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #
    
    ### BEGIN /etc/grub.d/00_header ###
    if [ -s $prefix/grubenv ]; then
      set have_grubenv=true
      load_env
    fi
    set default="0"
    
    if [ x"${feature_menuentry_id}" = xy ]; then
      menuentry_id_option="--id"
    else
      menuentry_id_option=""
    fi
    
    export menuentry_id_option
    
    if [ "${prev_saved_entry}" ]; then
      set saved_entry="${prev_saved_entry}"
      save_env saved_entry
      set prev_saved_entry=
      save_env prev_saved_entry
      set boot_once=true
    fi
    
    function savedefault {
      if [ -z "${boot_once}" ]; then
        saved_entry="${chosen}"
        save_env saved_entry
      fi
    }
    
    function recordfail {
      set recordfail=1
      if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
    }
    
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    
    if [ x$feature_default_font_path = xy ] ; then
       font=unicode
    else
    insmod part_msdos
    insmod ext2
    set root='hd1,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
    else
      search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
    fi
        font="/usr/share/grub/unicode.pf2"
    fi
    
    if loadfont $font ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=pl_PL
      insmod gettext
    fi
    terminal_output gfxterm
    if [ "${recordfail}" = 1 ]; then
      set timeout=-1
    else
      set timeout=5
    fi
    ### END /etc/grub.d/00_header ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    function gfxmode {
        set gfxpayload="${1}"
        if [ "${1}" = "keep" ]; then
            set vt_handoff=vt.handoff=7
        else
            set vt_handoff=
        fi
    }
    if [ "${recordfail}" != 1 ]; then
      if [ -e ${prefix}/gfxblacklist.txt ]; then
        if hwmatch ${prefix}/gfxblacklist.txt 3; then
          if [ ${match} = 0 ]; then
            set linux_gfx_mode=keep
          else
            set linux_gfx_mode=text
          fi
        else
          set linux_gfx_mode=text
        fi
      else
        set linux_gfx_mode=keep
      fi
    else
      set linux_gfx_mode=text
    fi
    export linux_gfx_mode
    if [ "${linux_gfx_mode}" != "text" ]; then load_video; fi
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
    recordfail
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee  quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.5.0-24-generic
    }
    submenu 'Opcje zaawansowane dla systemu Ubuntu' $menuentry_id_option 'gnulinux-advanced-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-24-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-24-generic-advanced-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        recordfail
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
            else
              search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
            fi
            echo    'Wczytywanie systemu Linux 3.5.0-24-generic...'
            linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee  quiet splash $vt_handoff
            echo    'Wczytywanie początkowego dysku RAM...'
            initrd    /boot/initrd.img-3.5.0-24-generic
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.5.0-24-generic (tryb ratunkowy)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.5.0-24-generic-recovery-149ac71c-7444-48aa-bc0c-9fb07bccf74c' {
        recordfail
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd1,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
            else
              search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
            fi
            echo    'Wczytywanie systemu Linux 3.5.0-24-generic...'
            linux    /boot/vmlinuz-3.5.0-24-generic root=UUID=149ac71c-7444-48aa-bc0c-9fb07bccf74c ro recovery nomodeset resume=UUID=9a4b8b62-9163-4d61-b9af-4d4c75e29fee
            echo    'Wczytywanie początkowego dysku RAM...'
            initrd    /boot/initrd.img-3.5.0-24-generic
        }
    }
    
    ### END /etc/grub.d/10_linux ###
    
    ### BEGIN /etc/grub.d/20_linux_xen ###
    
    ### END /etc/grub.d/20_linux_xen ###
    
    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry "Memory test (memtest86+)" {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux16    /boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
        insmod part_msdos
        insmod ext2
        set root='hd1,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  149ac71c-7444-48aa-bc0c-9fb07bccf74c
        else
          search --no-floppy --fs-uuid --set=root 149ac71c-7444-48aa-bc0c-9fb07bccf74c
        fi
        linux16    /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry 'Slackware Linux (Slackware 13.37.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-0a2ebb07-8b93-4938-9bee-7eca19168eee' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos2'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  0a2ebb07-8b93-4938-9bee-7eca19168eee
        else
          search --no-floppy --fs-uuid --set=root 0a2ebb07-8b93-4938-9bee-7eca19168eee
        fi
        linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga = normal append = resume=/dev/sda1
    }
    submenu 'Opcje zaawansowane dla systemu Slackware Linux (Slackware 13.37.0)' $menuentry_id_option 'osprober-gnulinux-advanced-0a2ebb07-8b93-4938-9bee-7eca19168eee' {
        menuentry 'Slackware (na /dev/sda2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--0a2ebb07-8b93-4938-9bee-7eca19168eee' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos2'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  0a2ebb07-8b93-4938-9bee-7eca19168eee
            else
              search --no-floppy --fs-uuid --set=root 0a2ebb07-8b93-4938-9bee-7eca19168eee
            fi
            linux /boot/vmlinuz root=/dev/sda2 ro  vt.default_utf8=0 vga = normal append = resume=/dev/sda1
        }
    }
    
    menuentry 'Windows Vista (loader) (na /dev/sdc1)' --class windows --class os $menuentry_id_option 'osprober-chain-20FEB393FEB36028' {
        insmod part_msdos
        insmod ntfs
        set root='hd2,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd2,msdos1 --hint-efi=hd2,msdos1 --hint-baremetal=ahci2,msdos1  20FEB393FEB36028
        else
          search --no-floppy --fs-uuid --set=root 20FEB393FEB36028
        fi
        chainloader +1
    }
    menuentry 'Slackware Linux (Slackware 14.0)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-340d8335-6690-46fd-8b73-26f68cfb317d' {
        insmod part_msdos
        insmod ext2
        set root='hd3,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  340d8335-6690-46fd-8b73-26f68cfb317d
        else
          search --no-floppy --fs-uuid --set=root 340d8335-6690-46fd-8b73-26f68cfb317d
        fi
        linux /boot/vmlinuz root=/dev/sdd1 ro  vt.default_utf8=0 vga = normal
    }
    submenu 'Opcje zaawansowane dla systemu Slackware Linux (Slackware 14.0)' $menuentry_id_option 'osprober-gnulinux-advanced-340d8335-6690-46fd-8b73-26f68cfb317d' {
        menuentry 'Slackware_14 (na /dev/sdd1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz--340d8335-6690-46fd-8b73-26f68cfb317d' {
            insmod part_msdos
            insmod ext2
            set root='hd3,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  340d8335-6690-46fd-8b73-26f68cfb317d
            else
              search --no-floppy --fs-uuid --set=root 340d8335-6690-46fd-8b73-26f68cfb317d
            fi
            linux /boot/vmlinuz root=/dev/sdd1 ro  vt.default_utf8=0 vga = normal
        }
    }
    
    
    menuentry 'Ubuntu 12.04 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
        insmod part_msdos
        insmod ext2
        set root='hd5,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
        else
          search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
        fi
        linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro quiet splash $vt_handoff
        initrd /boot/initrd.img-3.2.0-23-generic-pae
    }
    submenu 'Opcje zaawansowane dla systemu Ubuntu 12.04 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
        menuentry 'Ubuntu, za pomocą systemu Linux 3.2.0-23-generic-pae (na /dev/sdf1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-23-generic-pae--7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
            insmod part_msdos
            insmod ext2
            set root='hd5,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
            else
              search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
            fi
            linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro quiet splash $vt_handoff
            initrd /boot/initrd.img-3.2.0-23-generic-pae
        }
        menuentry 'Ubuntu, za pomocą systemu Linux 3.2.0-23-generic-pae (tryb ratunkowy) (na /dev/sdf1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-23-generic-pae-root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro recovery nomodeset-7b9ea669-1ad4-4640-a0ce-18fb539d7858' {
            insmod part_msdos
            insmod ext2
            set root='hd5,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd5,msdos1 --hint-efi=hd5,msdos1 --hint-baremetal=ahci5,msdos1  7b9ea669-1ad4-4640-a0ce-18fb539d7858
            else
              search --no-floppy --fs-uuid --set=root 7b9ea669-1ad4-4640-a0ce-18fb539d7858
            fi
            linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=7b9ea669-1ad4-4640-a0ce-18fb539d7858 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-23-generic-pae
        }
    }
    
    ### END /etc/grub.d/30_os-prober ###
    
    ### BEGIN /etc/grub.d/30_uefi-firmware ###
    ### END /etc/grub.d/30_uefi-firmware ###
    
    ### BEGIN /etc/grub.d/40_custom ###
    # 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.
    ### END /etc/grub.d/40_custom ###
    
    ### BEGIN /etc/grub.d/41_custom ###
    if [ -f  ${config_directory}/custom.cfg ]; then
      source ${config_directory}/custom.cfg
    elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    }
    ### END /etc/grub.d/41_custom ###
    And you posted the script, not the output from the script.
    Yes, i posted grub.cfg. I can't post output of grub-script-check -v because of what i wrote earlier - prompt/cursor is busy and nothing more. I waited for several minutes, no results.
    Last edited by firekage; March 11th, 2013 at 10:48 PM.

Page 1 of 5 123 ... LastLast

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
  •