Page 17 of 58 FirstFirst ... 7151617181927 ... LastLast
Results 161 to 170 of 580

Thread: How to have a custom Grub2 menu that is maintenance free

  1. #161
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    I couldn't take that light theme for very long. I just basically wanted to prove to myself that with a background picture you could use black/black as either the normal or highlight font.
    I prefer darker pictures/fonts.
    Here is my current Grub2 screen on Raring:

    20130529_110744.jpg

  2. #162
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    SOLVED: How to have a custom Grub2 menu that is maintenance free

    Hey people;

    I am unable to effect any change to the grub boot menu. No changes made in /etc/default/grub or to any of the scripts in /etc/grub.d are reflected in the boot menu.
    After going around and around with this for a week, I am at my wit's end and looking for advise.
    I am triple booting -> raring, ubuntu 12.04 and lubuntu 12.04;
    raring is a MINIMAL install with xfce4 for the desktop environment fairly fresh install and this is my initial boot menu item that goaded me to attempt to change the boot menu: Choosing to use Cavsfab's excellent wiki guide:
    ubuntu' --class ubuntu --class gnu-linux --class gnu --class
    ubuntu, with linux 3.8.0-21-generic os 'gnulin->
    --class ubuntu --class gnu-linux -->
    Initially I was not able to update the kernel, however I now have kernel 3.8.0-22-generic installed:
    sysop@1304mini:~$ uname -r
    3.8.0-22-generic
    sysop@1304mini:~$
    After following the guide; here is my results and system set up:
    my /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="${saved_entry}"
    
    
    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
    }
    
    
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    else
      search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    fi
    if loadfont /boot/grub/DejaVuSansMono.pf2 ; then
      set gfxmode=1600x900
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    else
      search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    fi
    insmod tga
    background_image -m stretch /usr/share/images/grub/050817-N-3488C-028.tga
    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 ###
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    else
      search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    fi
    insmod tga
    if background_image /usr/share/images/grub/050817-N-3488C-028.tga; then
     set color_normal=cyan/black
     set color_highlight=light-cyan/black
      true
    else
      set menu_color_normal=white/black
      set menu_color_highlight=black/light-gray
    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.
    menuentry "RaRing 13.04" {
        set root=(hd0,1)
            linux /vmlinuz root=/dev/sda1 ro quiet splash
            initrd /initrd.img
    }
    menuentry "     RaRing 13.04 (Recovery Mode)" {
        set root=(hd0,1)
            linux /vmlinuz root=/dev/sda1 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "LUBU12.04" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "     LUBU12.04 (Recovery Mode)" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro single
            initrd /initrd.img
    }
    menuentry "ubie12.04" {
        set root=(hd2,1)
            linux /vmlinuz root=/dev/sdc1 ro quiet splash
            initrd /initrd.img
    }
    menuentry "     ubie12.04 (Recovery Mode)" {
        set root=(hd2,1)
            linux /vmlinuz root=/dev/sdc1 ro single
            initrd /initrd.img
    }
    
    
    ### END /etc/grub.d/06_custom ###
    
    
    ### 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
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
    recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
        else
          search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
        fi
        linux    /boot/vmlinuz-3.8.0-22-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro   quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.8.0-22-generic
    }
    submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        menuentry 'Ubuntu, with Linux 3.8.0-22-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-22-generic-advanced-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-22-generic ...'
            linux    /boot/vmlinuz-3.8.0-22-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro   quiet splash $vt_handoff
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-22-generic
        }
        menuentry 'Ubuntu, with Linux 3.8.0-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-22-generic-recovery-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-22-generic ...'
            linux    /boot/vmlinuz-3.8.0-22-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro recovery nomodeset 
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-22-generic
        }
        menuentry 'Ubuntu, with Linux 3.8.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-21-generic-advanced-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-21-generic ...'
            linux    /boot/vmlinuz-3.8.0-21-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro   quiet splash $vt_handoff
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-21-generic
        }
        menuentry 'Ubuntu, with Linux 3.8.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-21-generic-recovery-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-21-generic ...'
            linux    /boot/vmlinuz-3.8.0-21-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro recovery nomodeset 
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-21-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/30_os-prober ###
    menuentry 'Ubuntu 12.04.2 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
        else
          search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
        fi
        linux /vmlinuz root=/dev/sda7
        initrd /initrd.img
    }
    submenu 'Advanced options for Ubuntu 12.04.2 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img.old
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-41-generic--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /boot/vmlinuz-3.2.0-41-generic root=/dev/sda7
            initrd /boot/initrd.img-3.2.0-41-generic
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-43-generic--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /boot/vmlinuz-3.2.0-43-generic root=/dev/sda7
            initrd /boot/initrd.img-3.2.0-43-generic
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-44-generic--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /boot/vmlinuz-3.2.0-44-generic root=/dev/sda7
            initrd /boot/initrd.img-3.2.0-44-generic
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img.old
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz.old--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz.old root=/dev/sda7
            initrd /initrd.img.old
        }
    }
    
    
    menuentry 'Ubuntu 12.04.2 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
        insmod part_msdos
        insmod ext2
        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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
        else
          search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
        fi
        linux /boot/vmlinuz-3.2.0-44-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
        initrd /boot/initrd.img-3.2.0-44-generic
    }
    submenu 'Advanced options for Ubuntu 12.04.2 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
        menuentry 'Ubuntu, with Linux 3.2.0-44-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-44-generic--5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-44-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
            initrd /boot/initrd.img-3.2.0-44-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-44-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-44-generic-root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-44-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-44-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-43-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-43-generic--5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-43-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
            initrd /boot/initrd.img-3.2.0-43-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-43-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-43-generic-root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-43-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-43-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-41-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-41-generic--5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-41-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
            initrd /boot/initrd.img-3.2.0-41-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-41-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-41-generic-root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-41-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-41-generic
        }
    }
    
    
    ### 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 ###
    my /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=saved
    GRUB_HIDDEN_TIMEOUT=0
    GRUB_HIDDEN_TIMEOUT_QUIET=true
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
    #28may13-quiet splash removed from following line: 29may13 - ZFR.
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
    GRUB_CMDLINE_LINUX=""
    #28may13 font changed to the following
    GRUB_FONT=/boot/grub/DejaVuSansMono.pf2 
    #28may13=image backgrounding added
    GRUB_BACKGROUND=/usr/share/images/grub/050817-N-3488C-028.tga
    # 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'
    #28may13-GFXMODE enabled (uncommented) and resolution changed from 640x480
    GRUB_GFXMODE=1600x900
    
    
    # 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"
    My system set up from "blkid" :
    Code:
    /dev/sda1: LABEL="1304mroot" UUID="3a47f1f1-ed1f-4134-b6aa-be101a7d97b4" TYPE="ext4" 
    /dev/sda2: LABEL="1304mhome" UUID="29a6fc4f-ff12-4cac-8eb1-e98e50f1107f" TYPE="ext4" 
    /dev/sda5: UUID="192a4783-56fa-4fd0-a62f-c45a14c08482" TYPE="swap" 
    /dev/sda6: LABEL="DATA" UUID="3ad091a1-5036-463b-ba4e-88e98e41b07a" TYPE="ext4" 
    /dev/sda7: LABEL="LUBU1204" UUID="4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d" TYPE="ext4" 
    /dev/sda8: LABEL="1304mvar" UUID="136af805-5758-4880-acc4-0e1d35e2c266" TYPE="ext4" 
    /dev/sdb1: LABEL="my_stuff" UUID="6a24777c-8191-4230-81f1-376f31b321e5" TYPE="ext4" 
    /dev/sdc1: LABEL="ubie1204" UUID="5bae8c40-b15d-42f8-9fc9-0cf087f338d4" TYPE="ext4"
    The prerequisite image file exist and is installed to /usr/share/images/grub/ ;
    I have removed grub from the lubuntu install on sda7 --- grub remains installed on ubuntu 12.04 sdc1;
    Resolution mode 1600x900 verified by grub's "vbeinfo";
    Numerous times rewritten the grub.cfg file ("sudo update-grub');

    Hours and hours spent trolling sites to understand why/what is failing, been over and over the scrips and guidance, perceiving no errors, making some change - update grub - reboot.... no change at all to grub's boot menu.

    For sure /boot/grub/grub/cfg is executing, else would not have a boot menu at all (???) as /boot/grub/grub.cfg supposedly executes upon boot-up !
    -------
    Request advise on what I am not seeing and/or overlooking ! ;
    What can I do to see the execution process of /boot/grub/grub.cfg, How can I verify that the variables in the script are "set" ?

    Why can I not effect a change in the boot grub menu ??

    help and guidance is muchly appreciated
    Last edited by Bashing-om; June 2nd, 2013 at 02:53 AM. Reason: solved
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  3. #163
    Join Date
    Feb 2010
    Location
    Nr BrandsHatch, S'oaks UK
    Beans
    1,241
    Distro
    Lubuntu 13.04 Raring Ringtail

    Re: How to have a custom Grub2 menu that is maintenance free

    Hi!, Bashing_om,

    Without going through your boot/grub/grub.cfg file in detail, it looks to me that your are editing the files in one installation, say Raring, whilst the grub menu and boot sequence are controlled by grub in another installation, probably 12.04 on another drive. Edit: The last command in this Post will tell you what is actually the current state.

    If that is the case, what you need to do is to boot the drive and installation you want to be in control and run:
    Code:
    sudo grub-install /dev/sdx # where 'sdx' is the drive in operation, not the partition
    sudo update-grub
    sudo reboot:
    To confirm the installation had no error:
    Code:
    sudo grub-install --recheck /dev/sdx
    You may also need to run
    Code:
    sudo grub-install --root-directory=/mnt /dev/sdx # or:
    sudo grub-install grub-pc # space-bar to select drive, tab to OK, enter to accept
    sudo debconf-show grub-pc # will show you full details.
    Chao!, bogan.
    "Better Solutions may bring Worsened Problems": After Lao Tse, b. circa 405BC. a contemporary of Confucius, who died circa 600BC.
    They did things differently in those days, apparently!!

  4. #164
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to have a custom Grub2 menu that is maintenance free

    @ bogan, Hi !

    Appreciate the input. and the assist even more.... But, I am aware of and have done so MANY times... 'Nother grub as primary had occurred to me and I removed grub from my Lubuntu install in sda7, Since my last go-around with sda1 [raring](what I want as primary) after running the grub install routine for sda, I have not gone back and did any thing on the sda7 (lubuntu) or sdc1 (ubuntu) installations.
    bk
    After going round and a-round with - not able to effect a change to the booting grub menu - I am frustrated and continue to be mystified ! My thinking process has become cloudy and missfocused. So, I appreciate a fresh perspective on this one !

    What I am currently considering is:
    Backup the present /boot/grub/grub.cfg file;
    Make a "custom" menu entry in that grub/cfg file (prepared to have to get back in the system via other means), reboot to see if THAT has an effect.
    And/or -- not knowing if the capability yet exists this early in the boot process -- see if I can put an echo statement to redirect output to a file (nice if I can figure out how to get the variable contents to this file).

    I am going to run through the process again, and will advise.

    again, thanks
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  5. #165
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to have a custom Grub2 menu that is maintenance free

    @ bogan ... Wow
    The "grub-install grub-pc" returned an error ! The only error I have encountered to this time !
    sysop@1304mini:~$ sudo grub-install /dev/sdaInstallation finished. No error reported.
    sysop@1304mini:~$ sudo grub-install grub-pc
    [sudo] password for sysop:
    /usr/sbin/grub-probe: error: cannot find a GRUB drive for grub-pc. Check your device.map.
    sysop@1304mini:~$
    For some past reason I have a copy of "device.map"... maybe I have erroneously removed it. (???)

    Hey Back to checking on what is happening with the "device.map"

    Next:
    sysop@1304mini:~$ sudo update-grub
    Generating grub.cfg ...
    Found background: /usr/share/images/grub/050817-N-3488C-028.tga
    Found background image: /usr/share/images/grub/050817-N-3488C-028.tga
    What do you want to boot up, Billy
    Found linux image: /boot/vmlinuz-3.8.0-22-generic
    Found initrd image: /boot/initrd.img-3.8.0-22-generic
    Found linux image: /boot/vmlinuz-3.8.0-21-generic
    Found initrd image: /boot/initrd.img-3.8.0-21-generic
    Found Ubuntu 12.04.2 LTS (12.04) on /dev/sda7
    Found Ubuntu 12.04.2 LTS (12.04) on /dev/sdc1
    done
    sysop@1304mini:~$ sudo grub-install grub-pc
    /usr/sbin/grub-probe: error: cannot find a GRUB drive for grub-pc. Check your device.map.

    I'll be back
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  6. #166
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to have a custom Grub2 menu that is maintenance free

    et all ; My current sloppyation:
    Remove, purge and (re-)install of grub ->
    Get to "configuring grub-pc" screen and select "ok" ->
    "configuring grub-pc" application -> no choice is accepted: as below
    │ │ You chose not to install GRUB to any devices. If you continue, the boot │
    │ loader may not be properly configured, and when this computer next starts │
    │ up it will use whatever was previously in the boot sector. If there is an │
    │ earlier version of GRUB 2 in the boot sector, it may be unable to load │
    │ modules or handle the current configuration file. │
    │ │
    │ If you are already using a different boot loader and want to carry on │
    │ doing so, or if this is a special environment where you do not need a boot │
    │ loader, then you should continue anyway. Otherwise, you should install │
    │ GRUB somewhere. │
    │ │
    │ Continue without installing GRUB? │
    │ │
    │ <Yes> <No> │
    │ │
    └───────────────────────────────────────────────── ────────────────────────────
    so what I did: ->sysop@1304mini:~$ "sudo grub-install --root-directory=/mnt /dev/sda"
    Installation finished. No error reported.
    sysop@1304mini:~$
    then:"sudo update-grub"
    sysop@1304mini:~$ sudo update-grub
    Generating grub.cfg ...
    What do you want to boot up, Billy
    Found linux image: /boot/vmlinuz-3.8.0-22-generic
    Found initrd image: /boot/initrd.img-3.8.0-22-generic
    Found linux image: /boot/vmlinuz-3.8.0-21-generic
    Found initrd image: /boot/initrd.img-3.8.0-21-generic
    Found Ubuntu 12.04.2 LTS (12.04) on /dev/sda7
    Found Ubuntu 12.04.2 LTS (12.04) on /dev/sdc1
    done
    sysop@1304mini:~$

    And now I am backing out of all open aps, and rebooting to see if any affects.


    Presently after reboot -> no change to grub's booting menu. and ->
    "debconf-show:"
    sysop@1304mini:~$ sudo debconf-show grub-pc
    [sudo] password for sysop:
    grub-pc/kopt_extracted: false
    grub2/kfreebsd_cmdline:
    grub2/device_map_regenerated:
    * grub-pc/install_devices:
    grub-pc/postrm_purge_boot_grub: false
    grub-pc/install_devices_failed_upgrade: true
    grub-pc/disk_description:
    grub2/linux_cmdline:
    * grub-pc/install_devices_empty: true
    grub2/kfreebsd_cmdline_default: quiet splash
    grub-pc/partition_description:
    grub-pc/install_devices_failed: false
    grub-pc/install_devices_disks_changed:
    grub2/linux_cmdline_default: quiet splash
    grub-pc/chainload_from_menu.lst: true
    grub-pc/hidden_timeout: true
    grub-pc/mixed_legacy_and_grub2: true
    grub-pc/timeout: 10
    sysop@1304mini:~$

    Please compare an output on a known stable system to mine; 4 of the entries in my output are "suspect" to me.
    ---------------
    Right now I just do not know;
    1. dd out my boot sector and try again ?
    2. Is because I did not (re-)install grub onto my sda7 install of lubuntu the cause of this effect ?
    3. Some how is my grub on sdc -ubuntu 12,04 - an issue ? How ? it is not mounted !// albeit in past attempts I did mount all my systems and run the "update-grub" routine, could this have complicated my sloppyation in that this corrupted my boot sector on sda ?
    -------------

    I would certainly appreciate any insight and guidance on a remedy/

    with all due respect
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  7. #167
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Let me see if I can come up with what you need to do.

  8. #168
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    Quote Originally Posted by Bashing-om View Post
    Hey people;
    It's not really people although I appreciate help from others like Bogan and Oldfred.

    If you want Raring to be your default you need to boot into Raring and enter sudo grub-install /dev/sda and sudo update-grub.

    Place a single picture the size of your resolution in /boot/grub/. It can contain only 1 picture and if you want to change it, you have to remove the other one while making the change.
    It can be any type of picture file as the code looks for the existance of a background file in 05_debian_theme looks like this:

    Code:
    	case "${1}" in
    		*.jpg|*.JPG|*.jpeg|*.JPEG) reader="jpeg";;
    		*.png|*.PNG) reader="png";;
    		*.tga|*.TGA) reader="tga";;
    		*) return 3;; # Unknown image type.
    	esac
    Be aware that some pictures just do not work. They will be listed in the output of sudo update-grub but they will not show at boot time. It has happened to me and I just chose another picture.
    By having a picture there you can set your font colors in etc/grub.d//05_debian_theme after line 114 (See the Editing /etc/grub.d/05_debian_theme part in the wiki)

    You know never make any changes to /boot/grub/grub.cfg right.

    Make these changes to your /etc/default/grub file gksudo gedit /etc/default/grub
    Delete this line from the file GRUB_BACKGROUND=/usr/share/images/grub/050817-N-3488C-028.tga

    I do not know what "saved" means by GRUB_DEFAULT=saved
    I have mine set to a number based on the output of this command:

    This command reads the bootable lines which are only the contents of /etc/grub/06_custom as that is all I have executable.
    Code:
    cavsfan@cavsfan-MS-7529:~$ grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f1,2 | nl
         1	menuentry "Precise Pangolin 12.04" {
         2	menuentry "Precise Pangolin 12.04 (Recovery Mode)" {
         3	menuentry "Quantal Quetzal 12.10" {
         4	menuentry "Quantal Quetzal 12.10 (Recovery Mode)" {
         5	menuentry "Raring Ringtail 13.04" {
         6	menuentry "Raring Ringtail 13.04 (Recovery Mode)" {
         7	menuentry "Saucy Salamander 13.10" {
         8	menuentry "Saucy Salamander 13.10 (Recovery Mode)" {
         9	menuentry "Linux Mint 14 Nadia" {
        10	menuentry "Linux Mint 14 Nadia (Recovery Mode)" {
        11	menuentry "Windows 7" {
    This is the output of my sudo blkid:
    Code:
    cavsfan@cavsfan-MS-7529:~$ sudo blkid
    [sudo] password for cavsfan: 
    /dev/sda1: LABEL="C:" UUID="1CFC7A8DFC7A60C6" TYPE="ntfs" 
    /dev/sda2: LABEL="Precise" UUID="a162dc8a-e4df-4b79-b4c3-524761ff7ae1" TYPE="ext4" 
    /dev/sda3: UUID="e14dc02e-6ea8-4c95-b4d0-9dc04d32294d" TYPE="swap" 
    /dev/sda5: LABEL="Linux-Mint" UUID="b796e378-c9dd-4557-825b-5d5687197609" TYPE="ext4" 
    /dev/sda6: LABEL="Quantal" UUID="4d6a25ba-5a4b-4da4-8ae1-9939bc6b6b4c" TYPE="ext4" 
    /dev/sda7: LABEL="Saucy" UUID="89642e6f-ee35-49b7-b34b-c2f1b9871f42" TYPE="ext4" 
    /dev/sda8: LABEL="Raring" UUID="21fd827b-a771-4e96-9311-5ad11382d6f1" TYPE="ext4" 
    /dev/sda9: LABEL="Extra" UUID="e5387ae4-6423-4d97-b08b-9f2d31e235a2" TYPE="ext4" 
    /dev/sdb1: LABEL="Fantom" UUID="78B8D1A1B8D15DE6" TYPE="ntfs"
    Here is what my /etc/grub/06_custom file looks like on Raring:

    Code:
    cavsfan@cavsfan-MS-7529:~$ cat /etc/grub.d/06_custom
    #!/bin/sh
    echo 1>&2 "Adding Ubuntu Precise Pangolin 12.04, Quantal Quetzal 12.10, Raring Ringtail 13.04, Saucy Salamander 13.10, Linux Mint 14 Nadia and Windows 7"
    exec tail -n +4 $0
    # 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 "Precise Pangolin 12.04" {
        set root=(hd0,2)
            linux /vmlinuz root=/dev/sda2 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Precise Pangolin 12.04 (Recovery Mode)" {
        set root=(hd0,2)
            linux /vmlinuz root=/dev/sda2 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "Quantal Quetzal 12.10" {
        set root=(hd0,6)
            linux /vmlinuz root=/dev/sda6 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Quantal Quetzal 12.10 (Recovery Mode)" {
        set root=(hd0,6)
            linux /vmlinuz root=/dev/sda6 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "Raring Ringtail 13.04" {
        set root=(hd0,8)
            linux /vmlinuz root=/dev/sda8 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Raring Ringtail 13.04 (Recovery Mode)" {
        set root=(hd0,8)
            linux /vmlinuz root=/dev/sda8 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "Saucy Salamander 13.10" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Saucy Salamander 13.10 (Recovery Mode)" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "Linux Mint 14 Nadia" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro quiet splash
            initrd /initrd.img
    }
    menuentry "Linux Mint 14 Nadia (Recovery Mode)" {
        set root=(hd0,5)
            linux /vmlinuz root=/dev/sda5 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "Windows 7" {
        insmod ntfs
        set root='(hd0,1)'
        search --no-floppy --fs-uuid --set 1CFC7A8DFC7A60C6
        chainloader +1
    }
    I hope this gets you back up and I'll check tomorrow on your progress.
    Thanks Bogan for your help!

  9. #169
    Join Date
    Jul 2010
    Location
    ozarks, Arkansas, USA
    Beans
    14,193
    Distro
    Xubuntu 22.04 Jammy Jellyfish

    Re: How to have a custom Grub2 menu that is maintenance free

    Cavsfan;
    Thank you for your time and effort. In regards to your last directive I have complied. Starting with a "clean" slate, making the edits; the result remains that my boot grub menu remains unchanged.
    This is not to imply that there is any fault in your excellent tutorial. It boils down to I have a fault in my system and to this time I have not isolated it.
    I presently do not have the knowledge to find this fault, though I keep pressing on.
    Background:
    Recently I had Ubuntu 10.04 standard desk-top install, ubuntu 12.04 standard desk-top install and lubuntu 12.04 standard desk-top install;
    all booting with no issue on a standard grub menu.

    At 10.04's EOL I prepared to end 10.04 and set up for whatever I was going to install in it's place.
    GParted: deleted all the 10.04 partitions, and in their place I made 3 smaller partitions to house 13.04 and at that time I decided to do a "minimal"install.
    The new install went with out an issue, smooth as one would want;
    Rebooted: The grub boot menu in respect to the new raring install was presented in an unfamiliar syntax, but still worked to boot raring up.
    installed xorg, xfce4 for the DE - no issue
    installing google-chrome I encountered "authentication" issues, found there had been no .Xauthority file generated nor was the XAUTHORITY variable set. I worked through that;
    Found I could not run a graphical application with root's access, installing "gksudo" resolved that one.

    Now I am back to fixing the grub boot menu ...have been at this for a few weeks and nothing I do effects that boot menu.
    The boot menu is fully functional, just no indication of which kernel I am booting.
    Kinda pleased with my install of 13.04 ...got all ,less the menu, set up and I feel good about it. Now I feel good about my system and all I do and can do with it... a bit of pride perhaps on my part -> but while I was trying to doctor my boot menu, how bout the eye candy to show it off ??

    I am unable to change anything on the grub boot menu from what was the initial setting when installed. And yes I am in a serious learning mode. I have done lots of homework to the point that I want to know how /boot/grub/grub.cfg is parsed as well as what tools I can make at my disposal to understand what is not taking place.

    /boot/grub/grub.cfg is supposed to be executed at boot up, but is it ? (for 1 question)
    "sudo apt-get install grub"'s install wizard balks at a destination device, and certain lines in "debconf's" output I wonder about (more homework); do I need to zero out the disk's boot sector and (re-)install (for 2nd question)
    --------
    This is where I stand now with my newly generated grub.cfg file:
    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
    }
    
    
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    else
      search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    fi
    if loadfont /boot/grub/DejaVuSansMono.pf2 ; then
      set gfxmode=1600x900
      load_video
      insmod gfxterm
      set locale_dir=$prefix/locale
      set lang=en_US
      insmod gettext
    fi
    terminal_output gfxterm
    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 ###
    insmod part_msdos
    insmod ext2
    set root='hd0,msdos1'
    if [ x$feature_platform_search_hint = xy ]; then
      search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    else
      search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
    fi
    insmod tga
    if background_image /boot/grub/050817-N-3488C-028.tga; then
      true
    else
      set menu_color_normal=white/black
      set menu_color_highlight=black/light-gray
    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.
    menuentry "RaRing 13.04" {
        set root=(hd0,1)
            linux /vmlinuz root=/dev/sda1 ro quiet splash
            initrd /initrd.img
    }
    menuentry "     RaRing 13.04 (Recovery Mode)" {
        set root=(hd0,1)
            linux /vmlinuz root=/dev/sda1 ro recovery nomodeset
            initrd /initrd.img
    }
    menuentry "LUBU12.04" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro quiet splash
            initrd /initrd.img
    }
    menuentry "     LUBU12.04 (Recovery Mode)" {
        set root=(hd0,7)
            linux /vmlinuz root=/dev/sda7 ro single
            initrd /initrd.img
    }
    menuentry "ubie12.04" {
        set root=(hd2,1)
            linux /vmlinuz root=/dev/sdc1 ro quiet splash
            initrd /initrd.img
    }
    menuentry "     ubie12.04 (Recovery Mode)" {
        set root=(hd2,1)
            linux /vmlinuz root=/dev/sdc1 ro single
            initrd /initrd.img
    }
    
    
    ### END /etc/grub.d/06_custom ###
    
    
    ### 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
    menuentry 'Ubuntu' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
    recordfail
        load_video
        gfxmode $linux_gfx_mode
        insmod gzio
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
        else
          search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
        fi
        linux    /boot/vmlinuz-3.8.0-22-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro   quiet splash $vt_handoff
        initrd    /boot/initrd.img-3.8.0-22-generic
    }
    submenu 'Advanced options for Ubuntu' $menuentry_id_option 'gnulinux-advanced-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        menuentry 'Ubuntu, with Linux 3.8.0-22-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-22-generic-advanced-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-22-generic ...'
            linux    /boot/vmlinuz-3.8.0-22-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro   quiet splash $vt_handoff
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-22-generic
        }
        menuentry 'Ubuntu, with Linux 3.8.0-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-22-generic-recovery-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-22-generic ...'
            linux    /boot/vmlinuz-3.8.0-22-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro recovery nomodeset 
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-22-generic
        }
        menuentry 'Ubuntu, with Linux 3.8.0-21-generic' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-21-generic-advanced-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            gfxmode $linux_gfx_mode
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-21-generic ...'
            linux    /boot/vmlinuz-3.8.0-21-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro   quiet splash $vt_handoff
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-21-generic
        }
        menuentry 'Ubuntu, with Linux 3.8.0-21-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.0-21-generic-recovery-3a47f1f1-ed1f-4134-b6aa-be101a7d97b4' {
        recordfail
            load_video
            insmod gzio
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos1'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            else
              search --no-floppy --fs-uuid --set=root 3a47f1f1-ed1f-4134-b6aa-be101a7d97b4
            fi
            echo    'Loading Linux 3.8.0-21-generic ...'
            linux    /boot/vmlinuz-3.8.0-21-generic root=UUID=3a47f1f1-ed1f-4134-b6aa-be101a7d97b4 ro recovery nomodeset 
            echo    'Loading initial ramdisk ...'
            initrd    /boot/initrd.img-3.8.0-21-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/30_os-prober ###
    menuentry 'Ubuntu 12.04.2 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
        insmod part_msdos
        insmod ext2
        set root='hd0,msdos7'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
        else
          search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
        fi
        linux /vmlinuz root=/dev/sda7
        initrd /initrd.img
    }
    submenu 'Advanced options for Ubuntu 12.04.2 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img.old
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-41-generic--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /boot/vmlinuz-3.2.0-41-generic root=/dev/sda7
            initrd /boot/initrd.img-3.2.0-41-generic
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-43-generic--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /boot/vmlinuz-3.2.0-43-generic root=/dev/sda7
            initrd /boot/initrd.img-3.2.0-43-generic
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-44-generic--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /boot/vmlinuz-3.2.0-44-generic root=/dev/sda7
            initrd /boot/initrd.img-3.2.0-44-generic
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz root=/dev/sda7
            initrd /initrd.img.old
        }
        menuentry 'Ubuntu 12.04.2 LTS (12.04) (on /dev/sda7)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz.old--4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d' {
            insmod part_msdos
            insmod ext2
            set root='hd0,msdos7'
            if [ x$feature_platform_search_hint = xy ]; then
              search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos7 --hint-efi=hd0,msdos7 --hint-baremetal=ahci0,msdos7  4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            else
              search --no-floppy --fs-uuid --set=root 4e6cd96d-49bd-47f0-9dfe-8eeebad4cf9d
            fi
            linux /vmlinuz.old root=/dev/sda7
            initrd /initrd.img.old
        }
    }
    
    
    menuentry 'Ubuntu 12.04.2 LTS (12.04)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
        insmod part_msdos
        insmod ext2
        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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
        else
          search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
        fi
        linux /boot/vmlinuz-3.2.0-44-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
        initrd /boot/initrd.img-3.2.0-44-generic
    }
    submenu 'Advanced options for Ubuntu 12.04.2 LTS (12.04)' $menuentry_id_option 'osprober-gnulinux-advanced-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
        menuentry 'Ubuntu, with Linux 3.2.0-44-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-44-generic--5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-44-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
            initrd /boot/initrd.img-3.2.0-44-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-44-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-44-generic-root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-44-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-44-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-43-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-43-generic--5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-43-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
            initrd /boot/initrd.img-3.2.0-43-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-43-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-43-generic-root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-43-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-43-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-41-generic (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-41-generic--5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-41-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro
            initrd /boot/initrd.img-3.2.0-41-generic
        }
        menuentry 'Ubuntu, with Linux 3.2.0-41-generic (recovery mode) (on /dev/sdc1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-3.2.0-41-generic-root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset-5bae8c40-b15d-42f8-9fc9-0cf087f338d4' {
            insmod part_msdos
            insmod ext2
            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  5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            else
              search --no-floppy --fs-uuid --set=root 5bae8c40-b15d-42f8-9fc9-0cf087f338d4
            fi
            linux /boot/vmlinuz-3.2.0-41-generic root=UUID=5bae8c40-b15d-42f8-9fc9-0cf087f338d4 ro recovery nomodeset
            initrd /boot/initrd.img-3.2.0-41-generic
        }
    }
    
    
    ### 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 ###
    The contents of /boot/grub/
    Code:
    
    sysop@1304mini:~$ ls -la /boot/grub/
    total 996
    drwxr-xr-x 5 root root   4096 May 30 19:22 .
    drwxr-xr-x 3 root root   4096 May 28 22:02 ..
    -rw-r--r-- 1 root root 814353 Jan 26 17:09 050817-N-3488C-028.tga
    -rw-r--r-- 1 root root 142763 May 27 14:39 DejaVuSansMono.pf2
    drwxr-xr-x 2 root root   4096 May 19 11:04 fonts
    -rw-r--r-- 1 root root    699 May 30 14:04 gfxblacklist.txt
    -r--r--r-- 1 root root  21363 May 30 19:22 grub.cfg
    -rw-r--r-- 1 root root   1024 May 30 19:31 grubenv
    drwxr-xr-x 2 root root  12288 May 30 18:40 i386-pc
    drwxr-xr-x 2 root root   4096 May 30 18:40 locale
    sysop@1304mini:~$
    Note there is no device.map file generated.... huh ? (this be question 3)

    Forum questions are to be like dead men "one to the box" but my three questions I consider all related to a single issue -> why can I not alter the boot grub menu ?

    all help remains hugely appreciated.
    THE current(cy) in Documentation:
    https://help.ubuntu.com/community/PopularPages

    Happy ubuntu'n !

  10. #170
    Join Date
    Aug 2009
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: How to have a custom Grub2 menu that is maintenance free

    You definitely do not want to install Grub 1 with this command sudo apt-get install grub.
    What is the output of this on Raring: grub-install -v.

    It should look like this:

    Code:
    cavsfan@cavsfan-MS-7529:~$ grub-install -v
    grub-install (GRUB) 2.00-13ubuntu3
    Always make sure you enter sudo update-grub after you have made any changes to any of the grub files.
    Keep in mind that when you get down to have just what is in your 06_custom file displaying at bootup the most recently installed kernel is what you will boot up with.
    It is not the highest number but, the most recently installed kernel.

    Can you post the contents of your /etc/grub.d/06_custom file?
    Can you also post the output of this command
    Code:
    grep -e "menuentry " -e "submenu" /boot/grub/grub.cfg | sed 's/^[ \t]*//' | cut -d "'" -f1,2 | nl
    I noticed that in Precise 12.04 you have 3 kernels. You only need to retain two so you could enter this while in Precise:
    This is not critical but, it will free up about 200+MB of disk space.
    Code:
    sudo apt-get purge linux-headers-3.2.0-41 linux-headers-3.2.0-41-generic linux-image-3.2.0-41-generic

Page 17 of 58 FirstFirst ... 7151617181927 ... 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
  •