Announcement

Collapse
No announcement yet.

Grub Update Problem (Mostly solved)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grub Update Problem (Mostly solved)

    GRUB has caused problems on my last two system updates. After my previous update, it loaded my old Kubuntu 9.04 as a terminal. Fortunately I have installed all the applications I use in 10.04, so I don't need 9.04 any more.

    I just did an update, and now GRUB won't recognize Windows as well as 9.04. When I boot, all the 10.04 kernels and memtest show up on the GRUB menu, but Windows & 9.04 aren't on the menu. I did a sudo update-grub, and Windows & 9.04 appear in /boot/grub/grub.cfg, but they still don't appear in the GRUB menu.

    EDITED 3/8/11 to delete lengthy listing of old grub.cfg

    #2
    Re: Grub Update Problem

    They are there, as listed under ### BEGIN /etc/grub.d/30_os-prober ### in grub.cfg. You have a butt-load of installed kernels!! I'm suprised you haven't run out of space on your root partition.

    Have you tried scrolling all the way down through the displayed entries?
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Grub Update Problem

      I used Synaptic to get rid of the excess kernels, copied the Windows & K9.04 entires from /boot/grub/grub.cfg and pasted them into /etc/grub.d/40_custom, then did a sudo update-grub in Konsole.

      Konsole gave me the following message:

      Generating grub.cfg ...
      Found linux image: /boot/vmlinuz-2.6.32-29-generic
      Found initrd image: /boot/initrd.img-2.6.32-29-generic
      Found memtest86+ image: /boot/memtest86+.bin
      Found Microsoft Windows XP Home Edition on /dev/sda2
      Found Ubuntu 9.04 (9.04) on /dev/sdb2
      done

      I checked to be sure that Windows & K9.04 were still listed in grub.cfg.

      However, when I rebooted only the remaining Linux kernel and memtest appeared. Could something be stopping grub.cfg from reading past memtest?

      Comment


        #4
        Re: Grub Update Problem

        40_custom needs to be 'executable' otherwise it won't be run. Just make sure it is.
        Using Kubuntu Linux since March 23, 2007
        "It is a capital mistake to theorize before one has data." - Sherlock Holmes

        Comment


          #5
          Re: Grub Update Problem

          I removed the execute bit from 30_os-prober, and made 40_custom executable, as you suggested in another thread, and did a sudo update-grub in Konsole. This is my grub.cfg now:

          #
          # DO NOT EDIT THIS FILE
          #
          # It is automatically generated by /usr/sbin/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
          load_env
          fi
          set default="0"
          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
          }
          insmod ext2
          set root='(hd0,3)'
          search --no-floppy --fs-uuid --set dee8536d-d303-49a9-b9cb-1e573d371b52
          if loadfont /usr/share/grub/unicode.pf2 ; then
          set gfxmode=640x480
          insmod gfxterm
          insmod vbe
          if terminal_output gfxterm ; then true ; else
          # For backward compatibility with versions of terminal.mod that don't
          # understand terminal_output
          terminal gfxterm
          fi
          fi
          insmod ext2
          set root='(hd0,3)'
          search --no-floppy --fs-uuid --set dee8536d-d303-49a9-b9cb-1e573d371b52
          set locale_dir=($root)/boot/grub/locale
          set lang=en
          insmod gettext
          if [ ${recordfail} = 1 ]; then
          set timeout=-1
          else
          set timeout=10
          fi
          ### END /etc/grub.d/00_header ###

          ### BEGIN /etc/grub.d/05_debian_theme ###
          set menu_color_normal=light-gray/blue
          set menu_color_highlight=yellow/blue
          ### END /etc/grub.d/05_debian_theme ###

          ### BEGIN /etc/grub.d/10_linux ###
          menuentry 'Ubuntu, with Linux 2.6.32-29-generic' --class ubuntu --class gnu-linux --class gnu --class os {
          recordfail
          insmod ext2
          set root='(hd0,3)'
          search --no-floppy --fs-uuid --set dee8536d-d303-49a9-b9cb-1e573d371b52
          linux /boot/vmlinuz-2.6.32-29-generic root=UUID=dee8536d-d303-49a9-b9cb-1e573d371b52 ro quiet splash
          initrd /boot/initrd.img-2.6.32-29-generic
          }
          menuentry 'Ubuntu, with Linux 2.6.32-29-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
          recordfail
          insmod ext2
          set root='(hd0,3)'
          search --no-floppy --fs-uuid --set dee8536d-d303-49a9-b9cb-1e573d371b52
          echo 'Loading Linux 2.6.32-29-generic ...'
          linux /boot/vmlinuz-2.6.32-29-generic root=UUID=dee8536d-d303-49a9-b9cb-1e573d371b52 ro single
          echo 'Loading initial ramdisk ...'
          initrd /boot/initrd.img-2.6.32-29-generic
          }
          ### END /etc/grub.d/10_linux ###

          ### BEGIN /etc/grub.d/20_memtest86+ ###
          menuentry "Memory test (memtest86+)" {
          insmod ext2
          set root='(hd0,3)'
          search --no-floppy --fs-uuid --set dee8536d-d303-49a9-b9cb-1e573d371b52
          linux16 /boot/memtest86+.bin
          }
          # menuentry "Memory test (memtest86+, serial console 115200)" {
          # EOF
          # printf '%s\n' " insmod ext2
          set root='(hd0,3)'
          search --no-floppy --fs-uuid --set dee8536d-d303-49a9-b9cb-1e573d371b52"
          # cat << EOF
          # linux16 /boot/memtest86+.bin console=ttyS0,115200n8
          # }
          ### END /etc/grub.d/20_memtest86+ ###

          ### 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.
          menuentry "Microsoft Windows XP Home Edition (on /dev/sda2)" {
          insmod ntfs
          set root='(hd0,2)'
          search --no-floppy --fs-uuid --set a278aa1c78a9eeeb
          drivemap -s (hd0) ${root}
          chainloader +1
          }
          menuentry "Ubuntu 9.04, kernel 2.6.28-19-generic (on /dev/sdb2)" {
          insmod ext2
          set root='(hd1,2)'
          search --no-floppy --fs-uuid --set 8b5d2a45-5b5c-481d-b83e-b096e5c98b71
          linux /boot/vmlinuz-2.6.28-19-generic root=UUID=8b5d2a45-5b5c-481d-b83e-b096e5c98b71 ro quiet splash
          initrd /boot/initrd.img-2.6.28-19-generic
          }
          menuentry "Ubuntu 9.04, kernel 2.6.28-19-generic (recovery mode) (on /dev/sdb2)" {
          insmod ext2
          set root='(hd1,2)'
          search --no-floppy --fs-uuid --set 8b5d2a45-5b5c-481d-b83e-b096e5c98b71
          linux /boot/vmlinuz-2.6.28-19-generic root=UUID=8b5d2a45-5b5c-481d-b83e-b096e5c98b71 ro single
          initrd /boot/initrd.img-2.6.28-19-generic
          }
          menuentry "Ubuntu 9.04, memtest86+ (on /dev/sdb2)" {
          insmod ext2
          set root='(hd1,2)'
          search --no-floppy --fs-uuid --set 8b5d2a45-5b5c-481d-b83e-b096e5c98b71
          linux /boot/memtest86+.bin
          }
          ### END /etc/grub.d/40_custom ###

          When I rebooted only Linux kernel 2.6.32-29 and memtest appeared in the Grub menu.

          Finally I noticed that there were 2 non-commented lines under memtest (serial console). The only thing I could think to try was to manually edit grub.cfg and add # in front of them. When I rebooted I got the full Grub menu. 9.04 is still booting as a terminal, but at least I can get into Windows again. Could my /etc/grub.d/20_memtest86+ be corrupted?

          Comment


            #6
            Re: Grub Update Problem

            Your 30_os-prober isn't executable, as it doesn't appear in your grub.cfg at all. Look at the permissions. They should be:
            -rwxr-xr-x
            If you see:
            -rw-r--r--
            then it's not executable.

            I make my 20_memtest86+ unexecutable, as I don't care to have it in my Grub menu.
            Using Kubuntu Linux since March 23, 2007
            "It is a capital mistake to theorize before one has data." - Sherlock Holmes

            Comment


              #7
              Re: Grub Update Problem

              Snowhog, thanks for helping me track this down. I'll make 20_memtest86+ non-executable, and hope that solves the problem.

              Comment

              Working...
              X