Page 1 of 24 12311 ... LastLast
Results 1 to 10 of 236

Thread: Grub 2 Title Tweaks Thread

  1. #1
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Grub 2 Title Tweaks Thread

    Grub 2 (Title) Tweaks

    or the


    UPDATE: The Day Has Arrived When This Guide Becomes Largely Unneccesary

    Daniel Richter has developed a great GUI app which can do simply and quickly what the following command-line actions accomplish. I highly recommend you visit my Grub Customizer thread and try his application.


    I Don't Want It to Say "Microsoft Windows Vista Home Edition" Thread



    Purpose
    This thread offers tweaks to the Grub 2 10_linux and 30_os-prober files in /etc/grub.d. The purpose is to change the way Titles are displayed on the Grub 2 menu.

    With the exception of the "But First" section, the tweaks in this thread are outside the normal options currently available in Grub 2's /etc/default/grub. As Grub 2 options are incorporated by the developers these scripts will be annotated or removed. Before you get too deep into editing these scripts, remember you can also simply create a custom menu in which you can use your own titles, include or omit boot options, etc. See meierfra's page for creating a custom menu.

    If you are looking for an introduction on how Grub 2 works, please visit Grub 2 (Ubuntu Community Help doc), Grub 2 Basics or Grub 2 Introduction elsewhere on the Ubuntu Forums. This thread also does not discuss custom configuration files such as /etc/grub.d/40_custom although these tweaks could be incorporated therein.

    Feel free to post your tweaks but please limit this thread to posts concerning the Grub text you see in the menu. Also suggest improvements to the ones I posted - I'll edit them to keep them udpated. See the end of this post for some suggestions.

    Hopefully as the capabilities of Grub 2 are expanded or become better understood many of these tweaks will become unnecessary. In the meantime those truly anal among us who can never leave things alone will have a place of refuge.

    Tweaks This Guide Covers
    • Remove MEMTEST86+
    • Remove Recovery Mode

    1. Changing/Limiting Ubuntu & Linux Titles
    2. Limiting the Number of Main Linux Kernel Entries
    3. Changing Windows/Other OS Titles
    4. Hiding the Recovery/Single User Partition
    5. Hiding Memtest
    6. Hiding the Windows Recovery Partition
    7. Changing "Windows Recovery Environment (loader)"
    8. Hiding Other Partitions
    9. Hiding the 32/64 bit OSX Entry When Both Appear
    10. Changing Menu Entry Order
    11. Hiding the Menu on Multi-OS Computers
    12. Hiding Partitions Using Parttool
    13. Removing the Grub 1.99 Submenu
    14. Troubleshooting
    15. Custom Menus
    16. Custom Tweaks Provided by Others in This Thread
    17. Get the Splash Screen to Display before the Menu (See Post #233)



    Background
    Grub 2 displays, unlike Grub, are not controlled by a single file but rather by the settings in /etc/default/grub and a series of script files located in /etc/grub.d/ . These scripts determine, in part, how the menu options are transferred into /boot/grub/grub.cfg and the menu you see on boot.

    See Grub 2 Basics for a general overview of Grub 2 and for links to other Grub 2 resources.

    Before You Start
    1. Make copies of the system files you will be altering.
      Note: If you leave the .bak files executable and in the /etc/grub.d folder they will be run by update-grub.
      Code:
      sudo cp /etc/grub.d/10_linux /etc/grub.d/10_linux.bak
      sudo cp /etc/grub.d/30_os-prober /etc/grub.d/30_os-prober.bak
      sudo chmod -x /etc/grub.d/*.bak
    2. Make sure you are working in the correct file, and in the applicable section of that file.
    3. Run "sudo update-grub" to incorporate the changes into Grub 2's menu.
    4. When defining variables, the ` symbol is not a straight quote symbol but a 'grave'. It is often found near the top left of the keyboard.
    5. Wubi Users: Replace all instances of 10_linux to 10_lupin in /etc/grub.d/



    Built-In Settings and Non-Tweak Ways to Limit Menu Entries
    • Removing Older Kernels
      If you are just seeing too many versions of the Linux kernel (including the associated recovery option), you can reduce the number by physically removing them from your machine. While it's best to keep at least one older kernel as a backup, others can be removed. Perhaps the easiest method to remove extra kernels is to install Ubuntu-Tweak from http://ubuntu-tweak.com/. Details on how to use Ubuntu-Tweak to remove kernels can be found in this HOWTO. Alternatively, you can use Synaptic and search for "linux-image" and select the lower-numbered kernels you no longer use. An example would be "linux-image-2.6.31-9-generic". You could also remove the "linux-header...." for the same kernel number. Once they are removed, run "sudo udpate-grub" and your menu will be less cluttered.

    • Turn Off "MEMTEST86+"
      There is no setting to turn off the "memtest86+" option in /etc/default/grub but you can eliminate these entries by turning off the script that searches for them. The following command removes the "executable" bit from the /etc/grud.d/20_memtest86+ file. To restore the setting, change the "-" to a "+":
      Code:
      sudo chmod -x /etc/grub.d/20_memtest86+
      • This effects only the system partition. If you have multiple partitions with Linux installations there is a tweak later that will turn off memtest86+ on them as well.
      • In the Tweaks section there is an explanation of how to boot into the "Recovery Mode" even without a menu option.

    • Turn Off Recovery Mode
      If you don't want to see the Recovery Mode Options for any item, change the setting in /etc/default/grub. While it may be a good idea to have the "Recovery" mode option displayed, if you don't want it, here is how to get rid of it.


      You can do this by opening the file as 'root' with any text editor and removing the # symbol from the beginning of the line, or by running the following command.
      Code:
      sudo sed s/'#GRUB_DISABLE_LINUX_RECOVERY="true"'/'GRUB_DISABLE_LINUX_RECOVERY="true"'/g -i /etc/default/grub



    Grub 2 Files
    The basic configuration settings are made in /etc/default/grub. This thread will not deal with those settings.
    The two primary files altered by tweaks in this thread are:
    • /etc/grub.d/10_linux
      • This file contains instructions and scripts which deal with linux kernels on the default system partition.

    • /etc/grub.d/30_os-prober
      • This file contains instructions and scripts to deal with kernels and other operating systems found on other partitions.
      • The file contains four sections. Changes must be made in the correct section, as changes in one section will not effect the scripts in the other sections.
        • The four sections are for Windows, other Linux installations, OSX, and Hurd.





    1. CHANGING/LIMITING UBUNTU & LINUX TITLES (on default partition) - /etc/grub.d/10_linux *

    • A. Changing Linux Titles on Main Partition

      Code:
      gksu gedit /etc/grub.d/10_linux
      • New: Starting with Grub 1.98, the user can change the codename (Ubuntu, Kubuntu, etc) from the /etc/default/grub file. The entry to add is "GRUB_DISTRIBUTOR=", which will replace "Ubuntu" in the menuentry with whatever is entered in this setting. Example: GRUB_DISTRIBUTOR=MyLinux will produce an entry of "MyLinux, with Linux 2.6.35-23-generic"
      • Defined Variable Examples: ${OS} Ubuntu, Kubuntu, etc.; ${version} 2.6.32-25, 2.6.32-25-generic, etc.
        Added Variable Example: ${codename} lucid
      • Add new variables codename and version_no_generic. The list of variables in 10_linux begins at approximately line 118.
        • If Recovery modes are displayed, make the change in that section as well. It's the next section of 10_linux.

        • Code:
          while [ "x$list" != "x" ] ; do
            linux=`version_find_latest $list`
            echo "Found linux image: $linux" >&2
            basename=`basename $linux`
            dirname=`dirname $linux`
            rel_dirname=`make_system_path_relative_to_its_root $dirname`
            version=`echo $basename | sed -e "s,^[^0-9]*-,,g"`
            alt_version=`echo $version | sed -e "s,\.old$,,g"`
            linux_root_device_thisversion="${LINUX_ROOT_DEVICE}"
          # User-added variable
            codename="`lsb_release -cs`"
            version_no_generic="`echo ${version} | cut -d "-" -f 1-2`"
          Original: Ubuntu, Linux 2.6.32-25
          This should be located at approximately line 144.
          New: Ubuntu 2.6.32-25
          Change the original line above to look like the following by removing ", Linux":
          Code:
          # Old code   # New code
          #  if ${recovery} ; then
          #    title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
          #  else
          #    title="$(gettext_quoted "%s, with Linux %s")"
          #  fi
          
            if ${recovery} ; then
              title="$(gettext_quoted "%s %s (recovery mode)")"
            else
              title="$(gettext_quoted "%s %s")"
            fi
          New: lucid 2.6.32-25
          Ensure the variable ${codename} has been added into the file's variable list.
          The codename returned in this script will always be the current codename of your present Linux OS (i.e. karmic, lucid, etc.).
          Change the original line at approximately 148 to look like the following (also change the same line in the Recovery section several lines down):
          Code:
          #linux_entry "${OS} ${version}" \
          linux_entry "${codename} ${version}" \

      • Run "sudo update-grub" to update the Grub 2 Menu.
      • Note: If you want to capitalize the codename (Hardy, Lucid, Maverick) see post #38.

      * Wubi users should make the changes to /etc/grub.d/10_lupin rather than /etc/grub.d/10_linux


    2. LIMITING MAIN KERNEL ENTRIES
    New for Grub 1.99: Older kernels will be placed in a submenu and will not be visible on the main Grub2 menu. The older kernels can be accessed by selecting the submenu entry. This guide currently does not cover hiding kernels displayed in the submenu.

    Grub 1.98 & Earlier: When a new kernel is introduced, it is automatically entered into the Grub 2 menu. Over time, the number of kernels listed may become quite long. The number of the current system kernels displayed can be changed via script editing (the kernels remain on the system but not displayed) or physically removing the kernels from the system via APT (command line, Synaptic, etc).

    With this tweak, you will be able to set the number of main OS Linux kernels (plus their associated Recovery modes if enabled) you want to see on the menu. The variable will be called LINUX_KERNELS_DISPLAYED. In this example, two kernels will be listed on the menu. Edits will be made to /etc/grub.d/10_linux and will affect only the primary partition's Linux kernels.

    Note this tweak does not remove kernels from your system or free up disk space. See the section on removing older kernels in the "Before You Start" section if you want to physically remove the kernels from the system.

    Find this section of /etc/grub.d/10_linux in Grub 1.98 (approximately line 116). Note this is not the entire file!. Added sections are in bold dark red:
    prepare_boot_cache=

    # Added to limit number of Linux kernels displayed.
    COUNTER=0
    LINUX_KERNELS_DISPLAYED=2
    #


    while [ "x$list" != "x" ] ; do
    linux=`version_find_latest $list`
    echo "Found linux image: $linux" >&2
    .....
    ..... < omitted lines >
    ..... < several lines from the bottom of the file >

    list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`


    # Added to limit number of Linux kernels displayed.
    COUNTER=`expr $COUNTER + 1`
    if [ $COUNTER -eq $LINUX_KERNELS_DISPLAYED ]; then
    list=""
    fi
    #

    done
    Save the file and update-grub.

    3. CHANGING WINDOWS/OTHER OS TITLES (including Linux) - /etc/grub.d/30_os-prober
    This file is divided into sections for various types of operating systems. The first section is for Windows (OS), the second Linux (linux), the third OSX (macosx), and finally Hurd (hurd).

    Code:
    gksu gedit /etc/grub.d/30_os-prober
    A. Changing Windows Entries
    • Changes made via this method are best done to OS or kernels which the user does not expect to change. If the system detects a title change the entry in #3 may no longer be correct.

      Placing Windows at the Top of the Menu:
      Although you can make Windows the default by with the 'GRUB_DEFAULT' setting in /etc/default/grub, if you really want Windows to be the first item on the menu there are two fairly easy ways to do it.
      • Rename /etc/grub.d/30_os-prober
        If you only have one Ubuntu partition and Windows, renaming /etc/grub.d/30_os-prober to /etc/grub.d/09_os-prober will place Windows at the top of the list
      • Create a /etc/grub.d/06_custom menu.
        Creating a custom file in the /etc/grub.d folder with a beginning number of 06 will place it's contents before any of the standard menu entries. To create the 06_custom file, open /etc/grub.d/40_custom for editing as root. Below the existing lines, copy the complete Windows menu entry from /boot/grub/grub.cfg.

        The entry will start with the "menuentry" line and end with "}" on a single line by itself. Make the file executable ( sudo chmod +x /etc/grub.d/06_custom ) and update-grub.


      Original: Microsoft Windows XP Home Edition (on /dev/sda1)

      1. Run this command to get the current Grub 2 menu entries:
      Code:
      sudo cat /boot/grub/grub.cfg | grep "menuentry" | cut -d '"' -f 2
      New: Whatever (on /dev/sda7)
      2. This section appears around line 150 of the file. Replace the section in red.
      3. Copy the exact title you wish to change (Example: Microsoft Windows XP Home Edition ) and place it between the quotes in the first line below. Note the title does not include the portion "(on /dev/sdXX)"
      Enter the desired title between the quotes in the second line below - in this example, "Windows XP" would replace "Enter Desired New Title Here".
      Code:
      # Old code   # New code  # Old Title  # New Title
      # if [ -z "${LONGNAME}" ] ; then
      #    LONGNAME="${LABEL}"
      # fi
      
        if [ "${LONGNAME}" = "Enter Exact Title You Just Copied" ] ; then
          LONGNAME="Enter Desired New Title Here"
        elif [ -z "${LONGNAME}" ] ; then
          LONGNAME="${LABEL}"
        fi
      5. Multiple entries can be made in the same section:
      Code:
        if [ "${LONGNAME}" = "Enter Exact Title You Just Copied" ] ; then
          LONGNAME="Enter Desired New Title Here"
        elif [ "${LONGNAME}" = "Enter Second Title You  Copied" ] ; then
          LONGNAME="Enter Desired Second Title Here"
        elif [ -z "${LONGNAME}" ] ; then
          LONGNAME="${LABEL}"
        fi


    B. Changing Other Linux Installations
    1. Included in the first codeblock below are all the user-defined variables used in this section of the guide. They apply to the "linux" section of /etc/grub.d/30_os-prober file.
      It is only necessary to insert the ones you wish to use. For simplicity and space-saving, they have all been included in the first codeblock below.
    2. Defined Variables Examples: ${LONGNAME} Microsoft Windows XP Home Edition, Ubuntu 10.04 (9.04); ${DEVICE} sda1, sdb6, etc; ${LLABEL} Ubuntu, linux 2.6.32-25
    3. Find the linux section of the file at approximately line 170 (before other additions).
    4. Add the variables you wish to use from the examples below. Following the added variables are examples of possible returned value:
      ${newtitle} Ubuntu 10.04 ;${shortkernel} 2.6.32-25 ; ${nomemtest} memtest86+ ; ${nosingle} single ; shortdevice (sda5) ; ${hidekernel} 2.6.32
      Code:
          ;;
          linux)
            LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
      
            for LINUX in ${LINUXPROBED} ; do
              LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
              LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
              LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
              LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
              LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
              LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
      # User-added variables
          newtitle=`echo ${LONGNAME} | cut -d " " -f 1-2`
          shortkernel="`echo ${LKERNEL} | cut -d "-" -f 2-4`"
              shortdevice="`echo ${DEVICE} | cut -d "/" -f 3`"           
              nomemtest="`echo ${LLABEL} | cut -d " " -f 1`"
              nosingle="`echo ${LPARAMS} | sed 's/^.* //'`"
              hidekernel-all="`echo ${LKERNEL} | cut -d'-' -f2`"
              hidekernel-one="`echo ${LKERNEL} | cut -d'-' -f2-3`"
      
      Original: Linux, Ubuntu 10.04 2.6.32-25 (on /dev/sda7)
      Modify the entry in red for each section you want to change (approximately line 193 in original file):
      New Format: Ubuntu 10.04 2.6.32-25 (on /dev/sda7)
      Code:
      # Old code   # New code  
      #        cat << EOF
      #menuentry "${LLABEL} (on ${DEVICE})" {
      #EOF
              cat << EOF
      menuentry "${newtitle}  ${shortkernel}  (on ${DEVICE})" {
      EOF
      New: Ubuntu 10.04 2.6.32-25
      Code:
      # Old code   # New code  # New Variable
      #        cat << EOF
      #menuentry "${LLABEL} (on ${DEVICE})" {
      #EOF
              cat << EOF
      menuentry "${newtitle}  ${shortkernel}" {
      EOF


    C. Eliminating or Changing "(on /dev/sdX)"
    • There are specific sections for Windows (OS), Linux (linux), and OSX (macosx). Users must find the section(s) they wish to change or do a universal search/replace.
    • Defined Variables: ${LONGNAME} OS title; ${device} Partition location (e.g. sda1, sdb6, etc)
    • Modify the entry in red for each section you want to change.

      Original: Windows XP Home (on /dev/sda7)
      Approximately line 144.
      Code:
      menuentry "${LONGNAME} (on ${DEVICE})" {
      New: Windows XP Home (sda1)
      Code:
      menuentry "${LONGNAME} (${shortdevice})" {
      New: Windows XP Home
      Code:
      menuentry "${LONGNAME}" {
      Original: Linux, Ubuntu 10.04 2.6.32-25 (on /dev/sda7)
      Approximately line 193.
      Code:
      menuentry "${LLABEL} (on ${DEVICE})" {
      New: Linux, Ubuntu 10.04 2.6.32-25 (sda7)
      Code:
      menuentry "${LLABEL} (${shortdevice})" {
      New: Linux, Ubuntu 10.04 2.6.32-25
      Code:
      menuentry "${LLABEL}" {



    D. Hiding a Specific Kernel (All Examples use 2.6.26... Substitute the kernel you desire to replace)
    • There are two components necessary for this option:
      • The Variable, entered into either /etc/grub.d/10_os-prober, or the linux section of /etc/grub.d/30_os-prober. For the location of the variables, see Section 1 for main kernel variables or Section 2B for linux variables on other partitions.
      • The Conditional Statement: if [ ${hidekernel} = "X.X.XX" or "X.X.XX-X" or "X.X.XX-X-generic" ]; then # Use the appropriate kernel format.


      • X.X.XX or X.X.XX-XX example: 2.6.28 or 2.6.28-12

    • The dark green items are lines to be inserted into the script. The red items are those which must be tailored by the user. The dark blue items are variables to be inserted in the appropriate area of the script.



    • To Hide a Kernel on the main partition & listed in the 10_linux section of /boot/grub/grub.cfg:
      • The Variable is pre-defined - no additional user entry is required: ${version}"
      • The Conditional Statement: if [ ${version} != "X.X.XX" ]; then
        • X.X.XX or X.X.XX-XX or X.X.XX-X-generic : 2.6.28 or 2.6.28-12 or 2.6.28-12-generic
        • Note the "!=" translates to "Run this unless the entry is equal to the following".


      1. Determine the kernel you want to hide (Example: 2.6.26 ) and change the code below in /etc/grub.d/10_linux at approximately line 144.
      Code:
      if [ ${version} != "2.6.32-25-generic" ]; then
        linux_entry "${OS}, Linux ${version}" \
            "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_EXTRA} ${GRUB_CMDLINE_LINUX_DEFAULT}" \
            quiet
        if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
          linux_entry "${OS}, Linux ${version} (recovery mode)" \
          "single ${GRUB_CMDLINE_LINUX}"
        fi
      fi



    • To Hide All Instances of a Kernel on Another Partition:
      • hidekernel-all="`echo ${LKERNEL} | cut -d'-' -f2`"
      • if [ ${hidekernel-all} = "2.6.26" ]; then


    • To Hide a Specific Kernel on Another Partition ( in the 30_os-prober section of /boot/grub/grub.cfg :
      • hidekernel-one="`echo ${LKERNEL} | cut -d'-' -f2-3`"
      • if [ ${hidekernel-one} = "2.6.26-11" ]; then


      1. Add the variable(s) to the linux variable list (approximately line 175).
      Code:
              
              hidekernel-all="`echo ${LKERNEL} | cut -d'-' -f2`"
              hidekernel-one="`echo ${LKERNEL} | cut -d'-' -f2-3`"
      2. Determine the kernel(s) you want to hide (Example: 2.6.26 ) and include it in linux section of /etc/grub.d/30_os-prober, at approximately line 183).
      Code:
              if [ -z "${LLABEL}" ] ; then
                LLABEL="${LONGNAME}"
              fi
      
              
              if [ ${hidekernel-XXX} = "2.6.26" ]; then   # Change XXX to 'one' or 'all'
             continue
          fi
      
              cat << EOF
      menuentry "${LLABEL} (on ${DEVICE}" \
      EOF
      * Note: os-prober can be disabled in various ways to prevent Grub 2 from searching any secondary partitions for bootable operating systems. See Grub 2 Basics for more information.



    4. Hiding Recovery/Single User Entries (from other partitions)
    • Grub 2 provides the ability to hide Recovery mode (single user) entries for the default partition without modifying the 10_linux or 30_os-prober files (see later in this section) .
    • Refer to the previous section for information on inserting variables. The variable associated with hiding the Recovery mode (single-user) is ${nosingle}. Make sure you add it to the variable list.
    • The conditional statement below tells Grub to skip an entry if it is a recovery mode[/I] option. While a bit inelegant, when inserted in 30_os-prober it will effectively prevent the applicable options from appearing in the Grub 2 menu.
    • To remove Recovery mode/single user entries for other partitions found by 30_os-prober:
      • Insert the code in green just after the linux variable definitions and before the first "menuentry" in the linux section (approximately line 180 before any additions).
        Code:
                LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
                LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
        # User-added variables
            newtitle=`echo ${LONGNAME} | cut -d " " -f 1-2`
            shortkernel="`echo ${LKERNEL} | cut -d "-" -f 2-4`"
                shortdevice="`echo ${DEVICE} | cut -d "/" -f 3`"           
                
                nosingle="`echo ${LPARAMS} | sed 's/^.* //'`"
                hidekernel="`echo ${LKERNEL} | cut -d'-' -f2`"
        
        
                if [ -z "${LLABEL}" ] ; then
                  LLABEL="${LONGNAME}"
                fi
        
                
                if [ "${nosingle}" = "single" ]; then
               continue 
            fi
        
                cat << EOF
        menuentry "${LLABEL} (on ${DEVICE}" \
        EOF

    • To inhibit the display of recovery options on the system partition, uncomment or add this line to /etc/default/grub:
      GRUB_DISABLE_LINUX_RECOVERY=true
    • Run "sudo update-grub" to incorporate these changes into the Grub menu.



    5. Hiding MEMTEST+86
    • The memtest86+ entry can be removed from the Grub2 menu by two methods.
    • Change the file attribute.
      • The memtest86+ entry can be removed from the menu simply by removing the executable bit from the /etc/grub.d/20_memtest86+ file.
      • To make memtest86+ non-executable, run the following commands:
        Code:
        sudo chmod -x /etc/grub.d/20_memtest86+ && sudo update-grub
      • Note: kansasnoob has discovered that the memtest86+ entries generated from partitions containing a Grub legacy menu.lst file can be disabled by opening the associated /boot/grub/menu.lst file, finding the memtest86+ entry, and changing it to read:
        # memtest86=false
    • Change the scripts.

      Insert the code in green.

      • In /etc/default/grub, add the following lines:
        GRUB_NOMEMTEST=true
        export GRUB_NOMEMTEST
      • In /etc/grub.d/20_memtest86+, add two lines in dark green. (The second line is the last fi at the bottom of the quoted text):
        if test -e /boot/memtest86+.bin ; then

        if [ ! "x${GRUB_NOMEMTEST}" = "xtrue" ] ; then

        MEMTESTPATH=$( make_system_path_relative_to_its_root "/boot/memtest86+.bin" )
        echo "Found memtest86+ image: $MEMTESTPATH" >&2

        cat << EOF
        menuentry "Memory test (memtest86+)" {
        EOF
        printf '%s\n' "${prepare_boot_cache}"
        cat << EOF
        $LX $MEMTESTPATH
        }
        menuentry "Memory test (memtest86+, serial console 115200)" {
        EOF
        printf '%s\n' "${prepare_boot_cache}"
        cat << EOF
        $LX $MEMTESTPATH console=ttyS0,115200n8
        }
        EOF
        fi
        fi
    • Run "sudo update-grub" to incorporate these changes into the Grub menu.



    6. HIDING THE WINDOWS RECOVERY PARTITION (Vista)

    • GRUB 2 will find and create a menuentry for the Windows (Vista) Recovery partition. At least in Vista, the menu name is the same as the normal Vista operating partition, the only difference being the parttion designation. To remove the Recovery partition entry from the menu:
      • Backup the existing /etc/grub.d/30_os-prober file, remove the executable bit from the backup so it isn't run during updates, and open the original for editing (the section starts around line 134):
        • Code:
          sudo cp /etc/grub.d/30_os-prober /etc/grub.d/30_os-prober.original  && sudo chmod -x /etc/grub.d/30_os-prober.original
          gksu gedit +83 /etc/grub.d/30_os-prober &
        • Determine the exact title and the Windows recovery partition. These can be located in the /boot/grub/grub.cfg file. Add the highlighted entry below. In the example, the menuentry appeared as "Windows Vista (loader) (on /dev/sda1)". Make sure you select the correct partition as the title may be the same for the normal and recovery titles. The area in bright red should be the exact contents between the quotes in the menuentry for the recovery partition:
        • for OS in ${OSPROBED} ; do
          DEVICE="`echo ${OS} | cut -d ':' -f 1`"
          LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
          LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
          BOOT="`echo ${OS} | cut -d ':' -f 4`"

          if [ -z "${LONGNAME}" ] ; then
          LONGNAME="${LABEL}"
          fi

          # Added to remove Windows Recovery
          if [ "$LONGNAME" = "Windows Vista (loader)" ] && [ "${DEVICE}" = "/dev/sda1" ] ; then
          continue
          fi
          # End Added
        • Save the file, then run:
          Code:
          sudo update-grub



    7. CHANGING "Windows Recovery Environment (loader)" to "Windows Vista"
    or Any Other Windows Title in the 30_os-prober Section of grub.cfg


    • If Grub 2 mistakenly identifies the real Windows Vista partition as the Recovery Partition, use this section to rename the menu entry. In the example the new title is Windows Vista. You can change the "Windows Vista" title within the quotation marks to anything you wish:
      • Backup the existing /etc/grub.d/30_os-prober file, remove the executable bit from the backup so it isn't run during updates, and open the original for editing (the section starts around line 134):
        • Code:
          sudo cp /etc/grub.d/30_os-prober /etc/grub.d/30_os-prober.original  && sudo chmod -x /etc/grub.d/30_os-prober.original
          gksu gedit +83 /etc/grub.d/30_os-prober &
        • Determine the exact title and the Windows recovery partition. These can be located in the /boot/grub/grub.cfg file. Add the highlighted entry below. In the example, the menuentry appeared as "Windows Vista (loader) (on /dev/sda1)". Make sure you select the correct partition as the title may be the same for the normal and recovery titles. The area in bright red should be the exact contents between the quotes in the menuentry for the recovery partition:
        • for OS in ${OSPROBED} ; do
          DEVICE="`echo ${OS} | cut -d ':' -f 1`"
          LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
          LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
          BOOT="`echo ${OS} | cut -d ':' -f 4`"

          if [ -z "${LONGNAME}" ] ; then
          LONGNAME="${LABEL}"
          fi

          # Added to change "Windows Recovery Environment (loader)" to "Windows Vista"
          if [ "$LONGNAME" = "Windows Recovery Environment (loader)" ] && [ "${DEVICE}" = "/dev/sda1" ] ; then
          LONGNAME="Windows Vista"
          fi
          # End Added
        • Save the file, then run:
          Code:
          sudo update-grub



    8. HIDING OTHER PARTITIONS
    You can hide any partition other than the system partition by editing /etc/grub.d/30_os-prober.

    • To hide a partition with linux kernels, insert the additional lines, substituting the correct drive/partition designations (sda3, sdb5, etc):
      • if [ -z "${LLABEL}" ] ; then
        LLABEL="${LONGNAME}"
        fi
        if [ "${LROOT}" = "/dev/sdXY" ]; then
        continue
        fi



    • To hide a Windows partition, insert the additional lines, substituting the correct drive/partition designations (sda3, sdb5, etc):
      • if [ -z "${LONGNAME}" ] ; then
        LONGNAME="${LABEL}"
        fi
        if [ "${DEVICE}" = "/dev/sdXY" ]; then
        continue
        fi



    9. HIDING THE 32/64 BIT OSX ENTRY WHEN BOTH APPEAR
    If Grub 2 lists both 32-bit and 64-bit OSX entries and the user wishes to display only one or the other, edit /etc/grub.d/30_os-prober:
    Remove either of the following lines (approximately line 218) to remove the associated entry from the Grub 2 menu.
    osx_entry xnu_kernel 32
    osx_entry xnu_kernel64 64
    Run "sudo update-grub" after saving the file to incorporate the changes into the Grub 2 configuration file.


    10. CHANGING MENU ENTRY ORDER
    Two simple ways to change the basic order of entries appearing in the Grub 2 menu:
    • Create a custom menu. /etc/grub.d/40_custom menus will appear at the bottom of the menu. Rename the file 06_custom and the menu entries will appear at the top of the menu.
    • Rename one (or more) of the existing /etc/grub.d scripts. The scripts are run in order. So if you want the "Other OS" entries found by 30_os-prober to be run first (and placed first in the menu), simply rename 30_os-prober to 06_os-prober, 07_os-prober, etc or rename 10_linux to 99_linux, etc.



    11. HIDING THE MENU ON MULTI-OS SYSTEMS
    By design, Grub 2 allows hiding the menu only on single-OS systems. This is established in the /etc/grub.d/30_os-prober file. For users with multiple OS's on their machines, hiding the menu can be accomplished by altering the scripts. There are two ways to accomplish the task. The first edits only one file and eliminates a conditional; the second edits two files and adds a conditional, but is a bit more 'elegant'.

    Shown are the applicable sections. Changes are highlighted in bold red. The lines between the altered lines have been omitted.
    • Method 1. Remove a conditional from /etc/grub.d/30_os-prober.
      For both Grub 1.97~beta (Karmic) and 1.98 (Lucid & later), the first line to edit is the same. It appears at approximately line 25-30 of /etc/grub.d/30_os-prober in both versions.
      # if [ "x${found_other_os}" = "x" ] ; then
      The second change is to place a # symbol at the end of the conditional. There are many if statements, and it's important to find the correct nested fi.

      In Karmic, the nested fi comes just before the "GRUB_DISABLE_PROBER" section. If Lucid and later, it preceeds the "() adjust timeout" section.
      Karmic (Grub 1.97~beta):
      fi
      fi
      # fi
      }

      if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
      Lucid & later (Grub 1.98+):
      #
      fi
      }

      adjust_timeout () {
    • Method 2. Add a conditional.
      This procedure modifies both /etc/grub.d/30_os-prober and /etc/default/grub. Open both with:
      Code:
      gksu gedit /etc/default/grub /etc/grub.d/30_os-prober
      Add this line to /etc/default/grub:
      GRUB_FORCE_HIDDEN_MENU="true"
      export GRUB_FORCE_HIDDEN_MENU
      Change this line in /etc/grub.d/30_os-prober, approximately line 25-30,
      From this:
      if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
      To this:
      if [ "x${found_other_os}" = "x" ] || [ "x${GRUB_FORCE_HIDDEN_MENU}" = "xtrue" ] ; then



    12. HIDING PARTITIONS USING PARTTOOL
    Hiding Windows partitions from other Windows installs was a capability in Grub legacy using the "hide" option. In Grub2, this function is now incorporated using the parttool module. This section of the guide was the result of a post 9142327 by GMHilltop, who wanted to hide one Windows partition when booting into another one.

    The easiest way to incorporate this into the Grub2 menu is through a modification of the /etc/grub.40_custom file. Add the following entries, which should be self-explanatory. If not, GMHilltop provides a bit more explanation in his post.
    Code:
    menuentry "Mom & Dads" {
    insmod chain
    insmod ntfs
    parttool (hd0,1) hidden-
    parttool (hd0,2) hidden+
    parttool (hd0,5) hidden-
    set root= (hd0,1)
    search --no-floppy --fs-uuid --set 9A7A430F7A42E819
    chainloader +1
    }
    
    menuentry "Kids Operating System" {
    insmod chain
    insmod ntfs
    parttool (hd0,2) hidden-
    parttool (hd0,1) hidden+
    parttool (hd0,5) hidden+
    set root= (hd0,2)
    search --no-floppy --fs-uuid --set 9A18464D18462919
    chainloader +1
    }
    
    menuentry "Ubuntu" {
    parttool (hd0,2) hidden-
    parttool (hd0,1) hidden-
    parttool (hd0,5) hidden-
    parttool (hd0,6) hidden-
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,3)
    search --no-floppy --fs-uuid --set 9a1e8016-a158-4e98-ae38-6da0fd528d9a
    linux /boot/vmlinuz-2.6.31-14-generic root=UUID=9a1e8016-a158-4e98-ae38-6da0fd528d9a ro quiet splash
    initrd /boot/initrd.img-2.6.31-14-generic
    }

    13. Removing the Grub 1.99 Submenu
    If you want to display all the kernels and eliminate Linux entries from the submenu feature introduced with Grub 1.99, here is how to edit /etc/grub.d/10_linux. These lines (uncommented) appear at the bottom of the file. Do not comment the "done" line.
    # if [ "$list" ] && ! $in_submenu; then
    # echo "submenu \"Previous Linux versions\" {"
    # in_submenu=:
    # fi
    done

    #if $in_submenu; then
    # echo "}"
    #fi

    14. Troubleshooting
    If the tweaks in this section do not work there are several things to check.
    • Are you working with the correct file? Make sure you are making the changes to the file which deals with the item you are trying to hide. Check the grub.cfg file to see which section the entry is appearing in (10_, 30_, etc).
    • Is the variable producing the correct result? The easiest way to check is to either echo the variable results for viewing while update-grub is running or insert the variable in the grub.cfg file for review.
      • Example: The memtest86+ option keeps appearing in the menu, even though you have inserted "nomemtest="`echo ${LLABEL} | cut -d " " -f 1`" into 30_os-prober.
        • Check that the undesired 'memtest86+' menu item is in the 30_os-prober section of grub.cfg
        • Find out what value 'LLABEL' and 'nomemtest' are returning.
        • Alter the following line:
          Code:
           cat << EOF
          menuentry "${LLABEL} (on ${DEVICE})" {ile allowing os-prob
          to
          Code:
           cat << EOF
          nomemtest=${nomemtest} LLABEL=${LLABEL}
          menuentry "${LLABEL} (on ${DEVICE}" \
          A sample entry would now look like this, showing you the values:
          Code:
          nomemtest=memtest86+ LLABEL=Debian GNU/Linux, kernel memtest86+
          menuentry "Debian GNU/Linux, kernel memtest86+" (sda8) {
          Now for each entry, you will have a line directly above displaying the values of nomemtest and LLABEL just before that menu entry was created. With that knowledge, you should be able to tweak the variable to ensure it returns the correct value for the current situation.




    15. CUSTOM MENUS
    Grub2 allows the user to place customized menu entries into the main Grub menu via scripts in the /etc/grub.d folder. One, 40_custom, is prebuilt and items can be added to it's contents. Do not change the existing lines - simply add items below. An easy way to add entries is to copy entries from the /boot/grub/grub.cfg file and then alter them as desired.

    Note: The scripts in /etc/grub.d are run, and menu items are placed in the Grub2 menu, sequentially. Naming your /etc/grub.d custom file 06_custom will place the custom menu entries before those in 10_linux and 30_os-prober. That means they will be placed at the top of GRUB 2's menu. Menu items placed in 40_custom will appear the bottom of the menu.

    If you use a numbered filename less than 30 you may want to check the "DEFAULT=" line in /etc/default/grub after running sudo update-grub to ensure the correct menuentry item is identified.


    1. This custom entry is based on ranch hand's post #26. It provides an entry for the latest kernel on the system and will remain current even after a kernel update. UUIDs may be used to identify root if desired.

      Code:
      menuentry "Latest Kernel" {
              set root=(hdX,Y)
              linux /vmlinuz root=/dev/sdXY ro quiet splash
              initrd /initrd.img
      }

    15. POST YOUR TWEAKS!

    Thread Recommendations
    • Tweaks that only alter the text on the Grub 2 Menu.
    • If possible, on the first line post the existing title and how it will change.


    • Original Menu Entry: Microsoft Windows XP Home Edition on sda1 >> New: XP

      To achieve this on the first line, copy/paste the code from the last line of this post and then alter it.


      [size="3"][b]Original Menu Entry: [color="DarkRed"]Microsoft Windows XP Home Edition on sda1[/color] >> New: [color="DarkGreen"]XP[/color][/b][/size]
      [/size]
    ery/Single User Entrie
    Last edited by drs305; July 12th, 2012 at 09:00 PM. Reason: Grub 1.99 Submenus for older kernels.
    GRUB2

    Retired.

  2. #2
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu 14.04 Trusty Tahr

    Re: Grub 2 Title Tweaks Thread

    Moved to karmic

  3. #3
    Join Date
    Feb 2006
    Location
    So.San Francisco
    Beans
    745

    Re: Grub 2 Title Tweaks Thread

    Wow, really nice job.....


    darco
    Reason: no beans

  4. #4
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    105
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Title Tweaks Thread

    Heaps good.. Very Helpful Thanks

  5. #5
    Join Date
    Aug 2008
    Location
    South East Montana
    Beans
    6,153

    Re: Grub 2 Title Tweaks Thread

    I surely have not read it all yet but I am subscribed and then I had to read a little.

    Looks really good.
    Dell 480 XPS 3G ram Quad Core 2.40GHz, Radeon HD 2400 PRO, Audigy1, 3x320G HDD, 320G External, Debian Testing for use, Debian Squeeze for secure use, Debian Sid for FUN

  6. #6
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    105
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Title Tweaks Thread

    Alright so I have changed the name of the entries so they come up as

    Code:
    Ubuntu karmic Koala
    Ubuntu, Linux 2.6.31-13-generic (recovery mode)
    Ubuntu karmic Koala
    Ubuntu, Linux 2.6.31-12-generic (recovery mode)
    Memory test (memtest86+)
    Memory test (memtest86+, serial console 115200)
    Windows Vista
    But i can't remove the recovery mode kernels or the Memory test options..
    This is my 30_os-prober
    Code:
    #! /bin/sh -e
    
    # grub-mkconfig helper script.
    # Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
    #
    # GRUB is free software: you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation, either version 3 of the License, or
    # (at your option) any later version.
    #
    # GRUB is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    #
    # You should have received a copy of the GNU General Public License
    # along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
    
    prefix=/usr
    exec_prefix=${prefix}
    libdir=${exec_prefix}/lib
    
    . ${libdir}/grub/grub-mkconfig_lib
    
    found_other_os=
    
    adjust_timeout () {
      if [ "x${found_other_os}" = "x" ] ; then
        if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
          if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then
    	verbose=
          else
    	verbose=" --verbose"
          fi
    
          if [ "x${GRUB_HIDDEN_TIMEOUT}" = "x0" ] ; then
    	cat <<EOF
    if [ \${timeout} != -1 ]; then
      if keystatus; then
        if keystatus --shift; then
          set timeout=-1
        else
          set timeout=0
        fi
      else
        if sleep$verbose --interruptible 3 ; then
          set timeout=0
        fi
      fi
    fi
    EOF
          else
    	cat << EOF
    if [ \${timeout} != -1 ]; then
      if sleep$verbose --interruptible ${GRUB_HIDDEN_TIMEOUT} ; then
        set timeout=0
      fi
    fi
    EOF
          fi
        fi
      fi
    }
    
    if [ "x${GRUB_DISABLE_OS_PROBER}" = "xtrue" ]; then
      adjust_timeout
      exit 0
    fi
    
    if [ -z "`which os-prober 2> /dev/null`" -o -z "`which linux-boot-prober 2> /dev/null`" ] ; then
      # missing os-prober and/or linux-boot-prober
      adjust_timeout
      exit 0
    fi
    
    OSPROBED="`os-prober | tr ' ' '^' | paste -s -d ' '`"
    if [ -z "${OSPROBED}" ] ; then
      # empty os-prober output, nothing doing
      adjust_timeout
      exit 0
    fi
    
    for OS in ${OSPROBED} ; do
      DEVICE="`echo ${OS} | cut -d ':' -f 1`"
      LONGNAME="`echo ${OS} | cut -d ':' -f 2 | tr '^' ' '`"
      LABEL="`echo ${OS} | cut -d ':' -f 3 | tr '^' ' '`"
      BOOT="`echo ${OS} | cut -d ':' -f 4`"
    
      if [ "${LONGNAME}" = "Windows Vista (loader)" ] ; then
        LONGNAME="Windows Vista"
      elif [ -z "${LONGNAME}" ] ; then
        LONGNAME="${LABEL}"
      fi
    
      echo "Found ${LONGNAME} on ${DEVICE}" >&2
      found_other_os=1
    
      case ${BOOT} in
        chain)
    
          cat << EOF
    menuentry "${LONGNAME}" {
    EOF
          save_default_entry | sed -e "s/^/\t/"
          prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
    
          case ${LONGNAME} in
    	Windows\ Vista*|Windows\ 7*)
    	;;
    	*)
    	  cat << EOF
    	drivemap -s (hd0) \${root}
    EOF
    	;;
          esac
    
          cat <<EOF
    	chainloader +1
    }
    EOF
        ;;
        linux)
          LINUXPROBED="`linux-boot-prober ${DEVICE} 2> /dev/null | tr ' ' '^' | paste -s -d ' '`"
    
          for LINUX in ${LINUXPROBED} ; do
            LROOT="`echo ${LINUX} | cut -d ':' -f 1`"
            LBOOT="`echo ${LINUX} | cut -d ':' -f 2`"
            LLABEL="`echo ${LINUX} | cut -d ':' -f 3 | tr '^' ' '`"
            LKERNEL="`echo ${LINUX} | cut -d ':' -f 4`"
            LINITRD="`echo ${LINUX} | cut -d ':' -f 5`"
            LPARAMS="`echo ${LINUX} | cut -d ':' -f 6- | tr '^' ' '`"
    # User-added variables          
            nomemtest="`echo ${LLABEL} | cut -d " " -f 1`"
            nosingle="`echo ${LPARAMS} | sed 's/^.* //'`"
            hidekernel="`echo ${LKERNEL} | cut -d'-' -f2`"
    
    
            if [ -z "${LLABEL}" ] ; then
              LLABEL="${LONGNAME}"
            fi
    
            if [ ${nomemtest} = "Memory" ] || [ ${nosingle} = "single" ]; then
    	   break 
    	fi
    
    
    
            cat << EOF
    menuentry "${LLABEL}" {
    EOF
    	save_default_entry | sed -e "s/^/\t/"
    	prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
    	cat <<  EOF
    	linux ${LKERNEL} ${LPARAMS}
    EOF
            if [ -n "${LINITRD}" ] ; then
              cat << EOF
    	initrd ${LINITRD}
    EOF
            fi
            cat << EOF
    }
    EOF
          done
        ;;
        macosx)
          OSXUUID="`grub-probe --target=fs_uuid --device ${DEVICE} 2> /dev/null`"
            cat << EOF
    menuentry "${LONGNAME}" {
    EOF
    	save_default_entry | sed -e "s/^/\t/"
    	prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/"
    	cat << EOF
            insmod vbe
            do_resume=0
            if [ /var/vm/sleepimage -nt10 / ]; then
               if xnu_resume /var/vm/sleepimage; then
                 do_resume=1
               fi
            fi
            if [ \$do_resume == 0 ]; then
               xnu_uuid ${OSXUUID} uuid
               if [ -f /Extra/DSDT.aml ]; then
                  acpi -e /Extra/DSDT.aml
               fi
               xnu_kernel /mach_kernel boot-uuid=\${uuid} rd=*uuid
               if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                  xnu_mkext /System/Library/Extensions.mkext
               else
                  xnu_kextdir /System/Library/Extensions
               fi
               if [ -f /Extra/Extensions.mkext ]; then
                  xnu_mkext /Extra/Extensions.mkext
               fi
               if [ -d /Extra/Extensions ]; then
                  xnu_kextdir /Extra/Extensions
               fi
               if [ -f /Extra/devtree.txt ]; then
                  xnu_devtree /Extra/devtree.txt
               fi
               if [ -f /Extra/splash.jpg ]; then
                  insmod jpeg
                  xnu_splash /Extra/splash.jpg
               fi
               if [ -f /Extra/splash.png ]; then
                  insmod png
                  xnu_splash /Extra/splash.png
               fi
               if [ -f /Extra/splash.tga ]; then
                  insmod tga
                  xnu_splash /Extra/splash.tga
               fi
            fi
    }
    EOF
        ;;
        hurd|*)
          echo "  ${LONGNAME} is not yet supported by grub-mkconfig." >&2
        ;;
      esac
    done
    
    adjust_timeout
    Would you be able to have a look at it and see if I did something wrong.. thanks

  7. #7
    Join Date
    Apr 2008
    Location
    Southern California, USA
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by woodbj View Post
    But i can't remove the recovery mode kernels or the Memory test options..
    /etc/grub.d/10_linux:
    GRUB_DISABLE_LINUX_RECOVERY=true
    also
    sudo chmod -x /etc/grub.d/20_memtest86+
    boot_info_script | AMD64 Athlon X2 Dual-Core - nVidia Geforce 6150 SE - 4GB DDR3

  8. #8
    Join Date
    Jun 2005
    Location
    Pacific NorthWest
    Beans
    2,782
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by VMC View Post
    /etc/grub.d/10_linux:
    GRUB_DISABLE_LINUX_RECOVERY=true
    also
    sudo chmod -x /etc/grub.d/20_memtest86+

    Should the GRUB_DISABLE be added in the:
    Code:
    # User-added variable
      codename="`lsb_release -cs`"
    "Let's nobody be dead today----Looks very bad on my report" One of my favourite lines from AVATAR
    Linux User#395230
    Ubuntu User# 13498

  9. #9
    Join Date
    Jan 2007
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Grub 2 Title Tweaks Thread

    Quote Originally Posted by autocrosser View Post
    Should the GRUB_DISABLE be added in the:
    Code:
    # User-added variable
      codename="`lsb_release -cs`"
    The line below should be added to /etc/default/grub to hide the recovery options.
    Code:
    GRUB_DISABLE_LINUX_RECOVERY="true"
    You can make the 20_memtest86+ file in etc/grub.d/ non-executable, as was mentioned. This will inhibit the display of the installed parittion's memtest86+ option.

    It doesn't appear that there is yet a similar entry available in this file to inhibit the display of memtest86+ for other partitions, which is the reason the tweak was added in this guide.

    I'll edit the first post in emphasize how to disable memtest86+ and recovery displays in the main partition.
    Last edited by drs305; October 11th, 2009 at 01:30 PM.
    GRUB2

    Retired.

  10. #10
    Join Date
    Mar 2009
    Location
    Australia
    Beans
    105
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: Grub 2 Title Tweaks Thread

    Thanks Worked like a charm
    I uncommented GRUB_DISABLE_LINUX_RECOVERY="true" in /etc/default/grub but that only got rid of the recovery kernels so I also did sudo chmod -x /etc/grub.d/20_memtest86+ and that got rid of the Memtest's.. Thanks again

Page 1 of 24 12311 ... 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
  •