Results 1 to 10 of 10

Thread: Lost windows entry on grub-2 after trying to reorder entries

  1. #1
    Join Date
    Jun 2011
    Beans
    4

    Lost windows entry on grub-2 after trying to reorder entries

    Hey, I followed the instructions from this post to reorder my boot options. But somehow I was stupid enough not to copy the windows entry, as indicated (I was mainly following only terminal instructions and such).

    Now I have a grub menu without my Windows 7 entry, please tell me there is a way to restore it.

    Thank you very much.

  2. #2
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Lost windows entry on grub-2 after trying to reorder entries

    What happens if you open a terminal and run:
    Code:
    sudo grub-mkconfig
    Code:
    grep menuentry /boot/grub/grub.cfg
    Above will tell you your menu entrys in terminal so you know:
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

  3. #3
    Join Date
    Jun 2011
    Beans
    4

    Re: Lost windows entry on grub-2 after trying to reorder entries

    Quote Originally Posted by garvinrick4 View Post
    What happens if you open a terminal and run:
    Code:
    sudo grub-mkconfig
    Code:
    Generating grub.cfg ...
    #
    # 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="1"
    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 {
      insmod vbe
      insmod vga
      insmod video_bochs
      insmod video_cirrus
    }
    
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos5)'
    search --no-floppy --fs-uuid --set=root 339c318f-c319-4787-9e14-7b5af7180bb9
    if loadfont /usr/share/grub/unicode.pf2 ; then
      set gfxmode=auto
      load_video
      insmod gfxterm
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='(/dev/sda,msdos5)'
    search --no-floppy --fs-uuid --set=root 339c318f-c319-4787-9e14-7b5af7180bb9
    set locale_dir=($root)/boot/grub/locale
    set lang=en_US
    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=white/black
    set menu_color_highlight=black/light-gray
    if background_color 44,0,30; then
      clear
    fi
    ### END /etc/grub.d/05_debian_theme ###
    
    ### BEGIN /etc/grub.d/06_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/06_custom ###
    
    ### BEGIN /etc/grub.d/10_linux ###
    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
    Found linux image: /boot/vmlinuz-2.6.38-8-generic
    Found initrd image: /boot/initrd.img-2.6.38-8-generic
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	set gfxpayload=$linux_gfx_mode
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 339c318f-c319-4787-9e14-7b5af7180bb9
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=339c318f-c319-4787-9e14-7b5af7180bb9 ro   quiet splash vt.handoff=7
    	initrd	/boot/initrd.img-2.6.38-8-generic
    }
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    	recordfail
    	set gfxpayload=$linux_gfx_mode
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 339c318f-c319-4787-9e14-7b5af7180bb9
    	echo	'Loading Linux 2.6.38-8-generic ...'
    	linux	/boot/vmlinuz-2.6.38-8-generic root=UUID=339c318f-c319-4787-9e14-7b5af7180bb9 ro single 
    	echo	'Loading initial ramdisk ...'
    	initrd	/boot/initrd.img-2.6.38-8-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+ ###
    Found memtest86+ image: /boot/memtest86+.bin
    menuentry "Memory test (memtest86+)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 339c318f-c319-4787-9e14-7b5af7180bb9
    	linux16	/boot/memtest86+.bin
    }
    menuentry "Memory test (memtest86+, serial console 115200)" {
    	insmod part_msdos
    	insmod ext2
    	set root='(/dev/sda,msdos5)'
    	search --no-floppy --fs-uuid --set=root 339c318f-c319-4787-9e14-7b5af7180bb9
    	linux16	/boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###
    
    ### BEGIN /etc/grub.d/30_os-prober ###
    ### END /etc/grub.d/30_os-prober ###
    
    ### 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  $prefix/custom.cfg ]; then
      source $prefix/custom.cfg;
    fi
    ### END /etc/grub.d/41_custom ###
    done
    Code:
    grep menuentry /boot/grub/grub.cfg
    Above will tell you your menu entrys in terminal so you know:
    Code:
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry 'Ubuntu, with Linux 2.6.38-8-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
    menuentry "Memory test (memtest86+)" {
    menuentry "Memory test (memtest86+, serial console 115200)"

  4. #4
    Join Date
    Nov 2008
    Beans
    Hidden!

    Re: Lost windows entry on grub-2 after trying to reorder entries

    in the future if all you want to do is change boot order just install start-up-manager. its the GUI way of doing it, a few clicks and your done. its in the software center

  5. #5
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Lost windows entry on grub-2 after trying to reorder entries

    os-prober was working and did not find Windows install. os-prober is the part that
    finds other operating systems and puts them in grub menu entrys and config file.
    Did site you used tell you how to make a custom entry? Since os-prober did not
    find it, got to make a entry of your own in other words.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

  6. #6
    Join Date
    Jun 2011
    Beans
    4

    Re: Lost windows entry on grub-2 after trying to reorder entries

    Quote Originally Posted by garvinrick4 View Post
    os-prober was working and did not find Windows install. os-prober is the part that
    finds other operating systems and puts them in grub menu entrys and config file.
    Did site you used tell you how to make a custom entry? Since os-prober did not
    find it, got to make a entry of your own in other words.
    AFAIK I disabled the os-prober, should I try to turn it back on?

  7. #7
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Lost windows entry on grub-2 after trying to reorder entries

    I saw your link and it has link to make custom menu entrys I have not gotten involved
    in making custom entrys so it is more or less out of my paygrade. There are a lot of users
    and articles on it so do not fret to much.
    **
    Hey users need to give this fellow a hand please. This will bump you up to beginning of forum.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

  8. #8
    Join Date
    Aug 2009
    Location
    United States
    Beans
    4,459
    Distro
    Ubuntu Development Release

    Re: Lost windows entry on grub-2 after trying to reorder entries

    afaik i disabled the os-prober, should i try to turn it back on?
    yes.

    ###
    BEGIN /etc/grub.d/30_os-prober ### ### END /etc/grub.d/30_os-prober
    ###
    I thought it was working hope it is not, will be easy for you then.
    Last edited by garvinrick4; June 1st, 2011 at 04:28 AM.
    Remember hence where you come and pass it down.
    Ubuntu Forums member #899097 and Ubuntu Member:
    http://www.ubuntupocketguide.com/index_main.html
    Main Page -

  9. #9
    Join Date
    Jun 2011
    Beans
    4

    Re: Lost windows entry on grub-2 after trying to reorder entries

    Quote Originally Posted by garvinrick4 View Post
    yes.

    ### ###
    I thought it was working hope it is not, will be easy for you then.
    Re enabling os prober did the trick, I didn't think it'd be so automagically.

    Thanks a bunch.

  10. #10
    Join Date
    Mar 2011
    Beans
    18

    Re: Lost windows entry on grub-2 after trying to reorder entries

    On the other hand, you can try "Super Boot Manager". It's easier to configure boot entries with it.

    http://www.omgubuntu.co.uk/2011/05/s...mg!+Ubuntu!%29

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
  •